//---------------------------------------------------- // The following code was generated by CUP v0.10k // Wed May 16 12:28:36 NZST 2007 //---------------------------------------------------- package grammar; /** CUP generated class containing symbol constants. */ public class sym { /* terminals */ public static final int DIVIDE = 45; public static final int GE = 36; public static final int PATH = 4; public static final int OUT = 6; public static final int MINUS = 42; public static final int FOR = 14; public static final int COMPONENT = 7; public static final int DEFINE = 3; public static final int NOT = 47; public static final int SEMICOLON = 25; public static final int AND = 32; public static final int LT = 33; public static final int RIGHTSQ = 21; public static final int IN = 5; public static final int OR = 31; public static final int COMMA = 26; public static final int UPTO = 16; public static final int BEGIN = 8; public static final int LEFTSQ = 20; public static final int PLUS = 41; public static final int ASSIGN = 28; public static final int IF = 10; public static final int DECLITERAL = 51; public static final int AMPERSAND = 43; public static final int DOT = 27; public static final int LE = 35; public static final int LEFT = 18; public static final int EOF = 0; public static final int TRUE = 48; public static final int error = 1; public static final int INCLUDE = 2; public static final int MOD = 46; public static final int IDENT = 54; public static final int BINLITERAL = 50; public static final int EQ = 37; public static final int FROM = 15; public static final int TIMES = 44; public static final int RIGHTBRACE = 24; public static final int COLON = 30; public static final int ELSE = 12; public static final int QUEST = 29; public static final int LEFTBRACE = 23; public static final int THEN = 11; public static final int NE = 38; public static final int END = 9; public static final int STRINGLITERAL = 53; public static final int RIGHTSHIFT = 40; public static final int AT = 22; public static final int FALSE = 49; public static final int RIGHT = 19; public static final int HEXLITERAL = 52; public static final int GT = 34; public static final int ELIF = 13; public static final int LEFTSHIFT = 39; public static final int DO = 17; static final int ValueDecl = 6; static final int PathName = 30; static final int AddExpr = 39; static final int ForStmt = 19; static final int PathNameList = 29; static final int $START = 0; static final int GlobalDeclStmtList = 1; static final int GlobalDeclStmt = 3; static final int AndExpr = 36; static final int PathDefnList = 15; static final int Invoc = 23; static final int OrExpr = 35; static final int ValueParamDefnList = 10; static final int Primary = 42; static final int Body = 17; static final int ShiftExpr = 38; static final int LiteralValue = 43; static final int PrefixExpr = 41; static final int InitValueDefn = 11; static final int LocalDeclStmt = 4; static final int InputParams = 25; static final int OutputParams = 26; static final int IncludeStmt = 21; static final int RelExpr = 37; static final int OutputParamDecl = 14; static final int LocalDeclStmtList = 2; static final int InvocList = 22; static final int PathArray = 28; static final int InitValueDefnList = 8; static final int ComponentDecl = 5; static final int CondExpr = 34; static final int ExprList = 32; static final int IfStmt = 18; static final int InvocationStmt = 20; static final int ValueParams = 31; static final int PathDefn = 16; static final int Expr = 33; static final int PathDecl = 7; static final int MulExpr = 40; static final int PathArrayList = 27; static final int InputParamDecl = 13; static final int ValueParamDecl = 9; static final int ValueParamDefn = 12; static final int ElseOpt = 24; public static String terminal_name( int id ) { switch ( id ) { case 45: return "DIVIDE"; case 36: return "GE"; case 4: return "PATH"; case 6: return "OUT"; case 42: return "MINUS"; case 14: return "FOR"; case 7: return "COMPONENT"; case 3: return "DEFINE"; case 47: return "NOT"; case 25: return "SEMICOLON"; case 32: return "AND"; case 33: return "LT"; case 21: return "RIGHTSQ"; case 5: return "IN"; case 31: return "OR"; case 26: return "COMMA"; case 16: return "UPTO"; case 8: return "BEGIN"; case 20: return "LEFTSQ"; case 41: return "PLUS"; case 28: return "ASSIGN"; case 10: return "IF"; case 51: return "DECLITERAL"; case 43: return "AMPERSAND"; case 27: return "DOT"; case 35: return "LE"; case 18: return "LEFT"; case 0: return "EOF"; case 48: return "TRUE"; case 1: return "error"; case 2: return "INCLUDE"; case 46: return "MOD"; case 54: return "IDENT"; case 50: return "BINLITERAL"; case 37: return "EQ"; case 15: return "FROM"; case 44: return "TIMES"; case 24: return "RIGHTBRACE"; case 30: return "COLON"; case 12: return "ELSE"; case 29: return "QUEST"; case 23: return "LEFTBRACE"; case 11: return "THEN"; case 38: return "NE"; case 9: return "END"; case 53: return "STRINGLITERAL"; case 40: return "RIGHTSHIFT"; case 22: return "AT"; case 49: return "FALSE"; case 19: return "RIGHT"; case 52: return "HEXLITERAL"; case 34: return "GT"; case 13: return "ELIF"; case 39: return "LEFTSHIFT"; case 17: return "DO"; default: return "unknown terminal" + id; } } public static String non_terminal_name( int id ) { switch ( id ) { case 6: return "ValueDecl"; case 30: return "PathName"; case 39: return "AddExpr"; case 19: return "ForStmt"; case 29: return "PathNameList"; case 0: return "$START"; case 1: return "GlobalDeclStmtList"; case 3: return "GlobalDeclStmt"; case 36: return "AndExpr"; case 15: return "PathDefnList"; case 23: return "Invoc"; case 35: return "OrExpr"; case 10: return "ValueParamDefnList"; case 42: return "Primary"; case 17: return "Body"; case 38: return "ShiftExpr"; case 43: return "LiteralValue"; case 41: return "PrefixExpr"; case 11: return "InitValueDefn"; case 4: return "LocalDeclStmt"; case 25: return "InputParams"; case 26: return "OutputParams"; case 21: return "IncludeStmt"; case 37: return "RelExpr"; case 14: return "OutputParamDecl"; case 2: return "LocalDeclStmtList"; case 22: return "InvocList"; case 28: return "PathArray"; case 8: return "InitValueDefnList"; case 5: return "ComponentDecl"; case 34: return "CondExpr"; case 32: return "ExprList"; case 18: return "IfStmt"; case 20: return "InvocationStmt"; case 31: return "ValueParams"; case 16: return "PathDefn"; case 33: return "Expr"; case 7: return "PathDecl"; case 40: return "MulExpr"; case 27: return "PathArrayList"; case 13: return "InputParamDecl"; case 9: return "ValueParamDecl"; case 12: return "ValueParamDefn"; case 24: return "ElseOpt"; default: return "unknown non_terminal" + id; } } public static String rule_name( int id ) { switch ( id ) { case 98: return "LiteralValue ::= STRINGLITERAL "; case 97: return "LiteralValue ::= FALSE "; case 96: return "LiteralValue ::= TRUE "; case 95: return "LiteralValue ::= HEXLITERAL "; case 94: return "LiteralValue ::= DECLITERAL "; case 93: return "LiteralValue ::= BINLITERAL "; case 92: return "Primary ::= LiteralValue "; case 91: return "Primary ::= IDENT "; case 90: return "Primary ::= LEFT Expr RIGHT "; case 89: return "PrefixExpr ::= Primary "; case 88: return "PrefixExpr ::= NOT PrefixExpr "; case 87: return "PrefixExpr ::= MINUS PrefixExpr "; case 86: return "MulExpr ::= PrefixExpr "; case 85: return "MulExpr ::= MulExpr MOD PrefixExpr "; case 84: return "MulExpr ::= MulExpr DIVIDE PrefixExpr "; case 83: return "MulExpr ::= MulExpr TIMES PrefixExpr "; case 82: return "AddExpr ::= MulExpr "; case 81: return "AddExpr ::= AddExpr AMPERSAND MulExpr "; case 80: return "AddExpr ::= AddExpr MINUS MulExpr "; case 79: return "AddExpr ::= AddExpr PLUS MulExpr "; case 78: return "ShiftExpr ::= AddExpr "; case 77: return "ShiftExpr ::= ShiftExpr RIGHTSHIFT AddExpr "; case 76: return "ShiftExpr ::= ShiftExpr LEFTSHIFT AddExpr "; case 75: return "RelExpr ::= ShiftExpr "; case 74: return "RelExpr ::= ShiftExpr NE ShiftExpr "; case 73: return "RelExpr ::= ShiftExpr EQ ShiftExpr "; case 72: return "RelExpr ::= ShiftExpr GE ShiftExpr "; case 71: return "RelExpr ::= ShiftExpr LE ShiftExpr "; case 70: return "RelExpr ::= ShiftExpr GT ShiftExpr "; case 69: return "RelExpr ::= ShiftExpr LT ShiftExpr "; case 68: return "AndExpr ::= RelExpr "; case 67: return "AndExpr ::= AndExpr AND RelExpr "; case 66: return "OrExpr ::= AndExpr "; case 65: return "OrExpr ::= OrExpr OR AndExpr "; case 64: return "CondExpr ::= OrExpr "; case 63: return "CondExpr ::= OrExpr QUEST Expr COLON Expr "; case 62: return "Expr ::= CondExpr "; case 61: return "ExprList ::= ExprList COMMA Expr "; case 60: return "ExprList ::= Expr "; case 59: return "PathName ::= IDENT LEFTSQ Expr AT Expr RIGHTSQ "; case 58: return "PathName ::= IDENT LEFTSQ Expr RIGHTSQ "; case 57: return "PathName ::= IDENT "; case 56: return "PathNameList ::= PathNameList PathName "; case 55: return "PathNameList ::= "; case 54: return "PathArray ::= PathNameList "; case 53: return "PathArrayList ::= PathArrayList COMMA PathArray "; case 52: return "PathArrayList ::= PathArray "; case 51: return "OutputParams ::= "; case 50: return "OutputParams ::= LEFTBRACE OUT PathArrayList RIGHTBRACE "; case 49: return "ValueParams ::= "; case 48: return "ValueParams ::= LEFT ExprList RIGHT "; case 47: return "InputParams ::= "; case 46: return "InputParams ::= LEFTBRACE IN PathArrayList RIGHTBRACE "; case 45: return "Invoc ::= IDENT ValueParams "; case 44: return "InvocList ::= InvocList DOT Invoc "; case 43: return "InvocList ::= Invoc "; case 42: return "InvocationStmt ::= InputParams InvocList OutputParams SEMICOLON "; case 41: return "ForStmt ::= FOR IDENT FROM Expr UPTO Expr DO LocalDeclStmtList END "; case 40: return "ElseOpt ::= ELIF Expr THEN LocalDeclStmtList ElseOpt "; case 39: return "ElseOpt ::= ELSE LocalDeclStmtList "; case 38: return "ElseOpt ::= "; case 37: return "IfStmt ::= IF Expr THEN LocalDeclStmtList ElseOpt END "; case 36: return "IncludeStmt ::= INCLUDE STRINGLITERAL SEMICOLON "; case 35: return "Body ::= SEMICOLON "; case 34: return "Body ::= BEGIN LocalDeclStmtList END "; case 33: return "ComponentDecl ::= COMPONENT InputParamDecl IDENT ValueParamDecl OutputParamDecl Body "; case 32: return "OutputParamDecl ::= "; case 31: return "OutputParamDecl ::= LEFTBRACE OUT PathDefnList RIGHTBRACE "; case 30: return "InputParamDecl ::= "; case 29: return "InputParamDecl ::= LEFTBRACE IN PathDefnList RIGHTBRACE "; case 28: return "PathDefn ::= IDENT LEFTSQ Expr RIGHTSQ "; case 27: return "PathDefn ::= IDENT "; case 26: return "PathDefnList ::= PathDefnList COMMA PathDefn "; case 25: return "PathDefnList ::= PathDefn "; case 24: return "PathDecl ::= PATH PathDefnList SEMICOLON "; case 23: return "ValueParamDefn ::= IDENT "; case 22: return "ValueParamDefnList ::= ValueParamDefnList COMMA ValueParamDefn "; case 21: return "ValueParamDefnList ::= ValueParamDefn "; case 20: return "ValueParamDecl ::= "; case 19: return "ValueParamDecl ::= LEFT ValueParamDefnList RIGHT "; case 18: return "InitValueDefn ::= IDENT ASSIGN Expr "; case 17: return "InitValueDefnList ::= InitValueDefnList COMMA InitValueDefn "; case 16: return "InitValueDefnList ::= InitValueDefn "; case 15: return "ValueDecl ::= DEFINE InitValueDefnList SEMICOLON "; case 14: return "LocalDeclStmt ::= error END "; case 13: return "LocalDeclStmt ::= error SEMICOLON "; case 12: return "LocalDeclStmt ::= InvocationStmt "; case 11: return "LocalDeclStmt ::= ForStmt "; case 10: return "LocalDeclStmt ::= IfStmt "; case 9: return "LocalDeclStmt ::= PathDecl "; case 8: return "LocalDeclStmt ::= ValueDecl "; case 7: return "LocalDeclStmtList ::= LocalDeclStmtList LocalDeclStmt "; case 6: return "LocalDeclStmtList ::= "; case 5: return "GlobalDeclStmt ::= LocalDeclStmt "; case 4: return "GlobalDeclStmt ::= IncludeStmt "; case 3: return "GlobalDeclStmt ::= ComponentDecl "; case 2: return "GlobalDeclStmtList ::= GlobalDeclStmtList GlobalDeclStmt "; case 1: return "GlobalDeclStmtList ::= "; case 0: return "$START ::= GlobalDeclStmtList EOF "; default: return "unknown rule" + id; } } }