KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ppg > atoms > PrecedenceModifier


1 package ppg.atoms;
2
3 import ppg.util.*;
4
5 public class PrecedenceModifier
6     extends GrammarPart
7     implements Equatable
8 {
9     protected String JavaDoc terminalName;
10     public String JavaDoc getTerminalName() { return terminalName; }
11
12     public PrecedenceModifier(String JavaDoc terminalName) {
13         this.terminalName = terminalName;
14     }
15
16     public Object JavaDoc clone() {
17         return new PrecedenceModifier(getTerminalName());
18     }
19
20     public void unparse(CodeWriter cw) {
21         cw.begin(0);
22         cw.write("%prec ");
23         cw.write(getTerminalName());
24         cw.end();
25     }
26
27     public String JavaDoc toString() {
28         return "%prec " + getTerminalName();
29     }
30 }
31
Popular Tags