📄 parser.java
字号:
CUP$parser$result = new java_cup.runtime.Symbol(46/*NT$7*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 41: // precedence_l ::= preced { Object RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(30/*precedence_l*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 40: // precedence_l ::= precedence_l preced { Object RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(30/*precedence_l*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 39: // precedence_list ::= empty { Object RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(27/*precedence_list*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 38: // precedence_list ::= precedence_l { Object RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(27/*precedence_list*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 37: // non_term_name_list ::= new_non_term_id { Object RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(18/*non_term_name_list*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 36: // non_term_name_list ::= non_term_name_list COMMA new_non_term_id { Object RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(18/*non_term_name_list*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 35: // term_name_list ::= new_term_id { Object RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(17/*term_name_list*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 34: // term_name_list ::= term_name_list COMMA new_term_id { Object RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(17/*term_name_list*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 33: // declares_non_term ::= non_term_name_list NT$6 SEMI { Object RESULT = null; // propagate RESULT from NT$6 if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value != null ) RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; CUP$parser$result = new java_cup.runtime.Symbol(32/*declares_non_term*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 32: // NT$6 ::= { Object RESULT = null; /* reset the accumulated multipart name */ multipart_name = new String(); CUP$parser$result = new java_cup.runtime.Symbol(45/*NT$6*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 31: // declares_term ::= term_name_list NT$5 SEMI { Object RESULT = null; // propagate RESULT from NT$5 if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value != null ) RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; CUP$parser$result = new java_cup.runtime.Symbol(31/*declares_term*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 30: // NT$5 ::= { Object RESULT = null; /* reset the accumulated multipart name */ multipart_name = new String(); CUP$parser$result = new java_cup.runtime.Symbol(44/*NT$5*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 29: // symbol ::= NON TERMINAL error NT$4 SEMI { Object RESULT = null; // propagate RESULT from NT$4 if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value != null ) RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; CUP$parser$result = new java_cup.runtime.Symbol(15/*symbol*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 28: // NT$4 ::= { Object RESULT = null; /* reset the accumulated multipart name */ multipart_name = new String(); CUP$parser$result = new java_cup.runtime.Symbol(43/*NT$4*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 27: // symbol ::= TERMINAL error NT$3 SEMI { Object RESULT = null; // propagate RESULT from NT$3 if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value != null ) RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; CUP$parser$result = new java_cup.runtime.Symbol(15/*symbol*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 26: // NT$3 ::= { Object RESULT = null; /* reset the accumulated multipart name */ multipart_name = new String(); CUP$parser$result = new java_cup.runtime.Symbol(42/*NT$3*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 25: // symbol ::= NON TERMINAL declares_non_term { Object RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(15/*symbol*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 24: // symbol ::= NON TERMINAL type_id declares_non_term { Object RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(15/*symbol*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 23: // symbol ::= TERMINAL declares_term { Object RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(15/*symbol*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 22: // symbol ::= TERMINAL type_id declares_term { Object RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(15/*symbol*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 21: // symbol_list ::= symbol { Object RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(7/*symbol_list*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 20: // symbol_list ::= symbol_list symbol { Object RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(7/*symbol_list*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 19: // scan_code ::= empty { Object RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(14/*scan_code*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 18: // scan_code ::= SCAN WITH CODE_STRING SEMI { Object RESULT = null; int user_codeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int user_coderight = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; String user_code = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; /* save the user code */ emit.scan_code = user_code; CUP$parser$result = new java_cup.runtime.Symbol(14/*scan_code*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 17: // init_code ::= empty { Object RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(13/*init_code*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 16: // init_code ::= INIT WITH CODE_STRING SEMI { Object RESULT = null; int user_codeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int user_coderight = ((java_cup.runtime.Symbol)CUP$parser$stack.ele
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -