//---------------------------------------------------- // The following code was generated by CUP v0.10k // Thu Jan 04 09:34:04 NZDT 2007 //---------------------------------------------------- package grammar; /** CUP generated class containing symbol constants. */ public class sym { /* terminals */ public static final int BAR = 10; public static final int LEXERROR = 2; public static final int LEFT = 6; public static final int EXPANDSTO = 4; public static final int INTVALUE = 11; public static final int VARIABLE = 13; public static final int EOF = 0; public static final int RIGHT = 7; public static final int RIGHTSQ = 9; public static final int DOT = 3; public static final int error = 1; public static final int COMMA = 5; public static final int NAME = 12; public static final int LEFTSQ = 8; static final int Program = 1; static final int ElementListOpt = 9; static final int Expr = 7; static final int ExprList = 6; static final int StructureList = 4; static final int Structure = 5; static final int Clause = 3; static final int ClauseList = 2; static final int $START = 0; static final int ElementList = 10; static final int List = 8; public static String terminal_name( int id ) { switch ( id ) { case 10: return "BAR"; case 2: return "LEXERROR"; case 6: return "LEFT"; case 4: return "EXPANDSTO"; case 11: return "INTVALUE"; case 13: return "VARIABLE"; case 0: return "EOF"; case 7: return "RIGHT"; case 9: return "RIGHTSQ"; case 3: return "DOT"; case 1: return "error"; case 5: return "COMMA"; case 12: return "NAME"; case 8: return "LEFTSQ"; default: return "unknown terminal" + id; } } public static String non_terminal_name( int id ) { switch ( id ) { case 1: return "Program"; case 9: return "ElementListOpt"; case 7: return "Expr"; case 6: return "ExprList"; case 4: return "StructureList"; case 5: return "Structure"; case 3: return "Clause"; case 2: return "ClauseList"; case 0: return "$START"; case 10: return "ElementList"; case 8: return "List"; default: return "unknown non_terminal" + id; } } public static String rule_name( int id ) { switch ( id ) { case 22: return "ElementList ::= Expr BAR Expr "; case 21: return "ElementList ::= Expr COMMA ElementList "; case 20: return "ElementList ::= Expr "; case 19: return "ElementListOpt ::= "; case 18: return "ElementListOpt ::= ElementList "; case 17: return "List ::= LEFTSQ ElementListOpt RIGHTSQ "; case 16: return "Expr ::= List "; case 15: return "Expr ::= Structure "; case 14: return "Expr ::= VARIABLE "; case 13: return "Expr ::= NAME "; case 12: return "Expr ::= INTVALUE "; case 11: return "ExprList ::= ExprList COMMA Expr "; case 10: return "ExprList ::= Expr "; case 9: return "Structure ::= NAME LEFT ExprList RIGHT "; case 8: return "StructureList ::= StructureList COMMA Structure "; case 7: return "StructureList ::= Structure "; case 6: return "Clause ::= error DOT "; case 5: return "Clause ::= Structure EXPANDSTO StructureList DOT "; case 4: return "Clause ::= Structure DOT "; case 3: return "ClauseList ::= Clause "; case 2: return "ClauseList ::= ClauseList Clause "; case 1: return "Program ::= ClauseList "; case 0: return "$START ::= Program EOF "; default: return "unknown rule" + id; } } }