📄 miniparser.java
字号:
"\000\004\021\042\001\001\000\026\003\013\006\021\011" +
"\025\015\031\016\023\017\032\023\024\025\011\030\012" +
"\031\057\001\001\000\024\003\013\006\021\011\025\015" +
"\031\016\023\017\032\023\024\025\011\030\060\001\001" +
"\000\002\001\001\000\002\001\001\000\002\001\001\000" +
"\002\001\001\000\002\001\001\000\004\017\067\001\001" +
"\000\002\001\001\000\002\001\001\000\002\001\001\000" +
"\002\001\001\000\024\003\013\006\021\011\025\015\031" +
"\016\023\017\032\023\024\025\011\030\060\001\001\000" +
"\002\001\001\000\014\012\035\013\076\014\075\017\037" +
"\032\036\001\001\000\002\001\001\000\004\021\042\001" +
"\001\000\012\012\035\013\102\017\037\032\036\001\001" +
"\000\002\001\001\000\002\001\001\000\004\021\042\001" +
"\001\000\002\001\001\000\006\021\042\027\105\001\001" +
"\000\012\012\035\013\114\017\037\032\036\001\001\000" +
"\002\001\001\000\002\001\001\000\002\001\001\000\002" +
"\001\001\000\002\001\001\000\002\001\001\000\004\021" +
"\042\001\001\000\026\003\013\006\021\011\025\015\031" +
"\016\023\017\032\023\024\025\011\030\012\031\116\001" +
"\001\000\024\003\013\006\021\011\025\015\031\016\023" +
"\017\032\023\024\025\011\030\060\001\001\000\026\003" +
"\013\006\021\011\025\015\031\016\023\017\032\023\024" +
"\025\011\030\012\031\122\001\001\000\002\001\001\000" +
"\002\001\001\000\024\003\013\006\021\011\025\015\031" +
"\016\023\017\032\023\024\025\011\030\060\001\001\000" +
"\002\001\001\000\002\001\001\000\002\001\001\000\014" +
"\012\035\013\076\014\127\017\037\032\036\001\001\000" +
"\002\001\001\000\002\001\001\000\002\001\001\000\002" +
"\001\001\000\026\003\013\006\021\011\025\015\031\016" +
"\023\017\032\023\024\025\011\030\012\031\134\001\001" +
"\000\024\003\013\006\021\011\025\015\031\016\023\017" +
"\032\023\024\025\011\030\060\001\001\000\002\001\001" +
"\000\002\001\001\000\006\017\063\020\140\001\001\000" +
"\002\001\001\000\002\001\001\000\002\001\001\000\004" +
"\004\145\001\001\000\010\017\063\020\150\024\147\001" +
"\001\000\002\001\001\000\002\001\001\000\002\001\001" +
"\000\002\001\001\000\004\004\152\001\001\000\002\001" +
"\001\000\002\001\001\000\002\001\001" });
/** access to reduce_goto table */
public short[][] reduce_table() {return _reduce_table;}
/** instance of action encapsulation class */
protected CUP$MiniParser$actions action_obj;
/** action encapsulation object initializer */
protected void init_actions()
{
action_obj = new CUP$MiniParser$actions(this);
}
/** invoke a user supplied parse action */
public java_cup.runtime.Symbol do_action(
int act_num,
java_cup.runtime.lr_parser parser,
java.util.Stack stack,
int top)
throws java.lang.Exception
{
/* call code in generated class */
return action_obj.CUP$MiniParser$do_action(act_num, parser, stack, top);
}
/** start state */
public int start_state() {return 0;}
/** start production */
public int start_production() {return 0;}
/** EOF Symbol index */
public int EOF_sym() {return 0;}
/** error Symbol index */
public int error_sym() {return 1;}
/** user initialization */
public void user_init() throws java.lang.Exception
{
}
/** scan to get the next Symbol */
public java_cup.runtime.Symbol scan()
throws java.lang.Exception
{
return cupTokenScanner.nextToken ( );
}
protected CUPTokenScanner cupTokenScanner;
public MiniParser ( CUPTokenScanner cupTokenScanner )
//////////////////////////////////////////////////////////////////////
{
this.cupTokenScanner = cupTokenScanner;
}
}
/** Cup generated class to encapsulate user supplied action code.*/
class CUP$MiniParser$actions {
//////////////////////////////////////////////////////////////////////
// Action Code
//////////////////////////////////////////////////////////////////////
private final MiniParser parser;
/** Constructor */
CUP$MiniParser$actions(MiniParser parser) {
this.parser = parser;
}
/** Method with the actual generated action code. */
public final java_cup.runtime.Symbol CUP$MiniParser$do_action(
int CUP$MiniParser$act_num,
java_cup.runtime.lr_parser CUP$MiniParser$parser,
java.util.Stack CUP$MiniParser$stack,
int CUP$MiniParser$top)
throws java.lang.Exception
{
/* Symbol object for return from actions */
java_cup.runtime.Symbol CUP$MiniParser$result;
/* select the action based on the action number */
switch (CUP$MiniParser$act_num)
{
/*. . . . . . . . . . . . . . . . . . . .*/
case 50: // strongOperator ::= DIVIDE
{
OperatorMiniNode RESULT = null;
RESULT = new OperatorMiniNode ( MiniSymbols.DIVIDE );
CUP$MiniParser$result = new java_cup.runtime.Symbol(16/*strongOperator*/, ((java_cup.runtime.Symbol)CUP$MiniParser$stack.elementAt(CUP$MiniParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$MiniParser$stack.elementAt(CUP$MiniParser$top-0)).right, RESULT);
}
return CUP$MiniParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 49: // strongOperator ::= TIMES
{
OperatorMiniNode RESULT = null;
RESULT = new OperatorMiniNode ( MiniSymbols.TIMES );
CUP$MiniParser$result = new java_cup.runtime.Symbol(16/*strongOperator*/, ((java_cup.runtime.Symbol)CUP$MiniParser$stack.elementAt(CUP$MiniParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$MiniParser$stack.elementAt(CUP$MiniParser$top-0)).right, RESULT);
}
return CUP$MiniParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 48: // weakOperator ::= MINUS
{
OperatorMiniNode RESULT = null;
RESULT = new OperatorMiniNode ( MiniSymbols.MINUS );
CUP$MiniParser$result = new java_cup.runtime.Symbol(15/*weakOperator*/, ((java_cup.runtime.Symbol)CUP$MiniParser$stack.elementAt(CUP$MiniParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$MiniParser$stack.elementAt(CUP$MiniParser$top-0)).right, RESULT);
}
return CUP$MiniParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 47: // weakOperator ::= PLUS
{
OperatorMiniNode RESULT = null;
RESULT = new OperatorMiniNode ( MiniSymbols.PLUS );
CUP$MiniParser$result = new java_cup.runtime.Symbol(15/*weakOperator*/, ((java_cup.runtime.Symbol)CUP$MiniParser$stack.elementAt(CUP$MiniParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$MiniParser$stack.elementAt(CUP$MiniParser$top-0)).right, RESULT);
}
return CUP$MiniParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 46: // relation ::= NE
{
RelationMiniNode RESULT = null;
RESULT = new RelationMiniNode ( MiniSymbols.NE );
CUP$MiniParser$result = new java_cup.runtime.Symbol(21/*relation*/, ((java_cup.runtime.Symbol)CUP$MiniParser$stack.elementAt(CUP$MiniParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$MiniParser$stack.elementAt(CUP$MiniParser$top-0)).right, RESULT);
}
return CUP$MiniParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 45: // relation ::= GE
{
RelationMiniNode RESULT = null;
RESULT = new RelationMiniNode ( MiniSymbols.GE );
CUP$MiniParser$result = new java_cup.runtime.Symbol(21/*relation*/, ((java_cup.runtime.Symbol)CUP$MiniParser$stack.elementAt(CUP$MiniParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$MiniParser$stack.elementAt(CUP$MiniParser$top-0)).right, RESULT);
}
return CUP$MiniParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 44: // relation ::= GT
{
RelationMiniNode RESULT = null;
RESULT = new RelationMiniNode ( MiniSymbols.GT );
CUP$MiniParser$result = new java_cup.runtime.Symbol(21/*relation*/, ((java_cup.runtime.Symbol)CUP$MiniParser$stack.elementAt(CUP$MiniParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$MiniParser$stack.elementAt(CUP$MiniParser$top-0)).right, RESULT);
}
return CUP$MiniParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 43: // relation ::= LT
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -