Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
net.ripe.db.whois.common.generated.InterfaceParser Maven / Gradle / Ivy
//### This file created by BYACC 1.8(/Java extension 1.15)
//### Java capabilities added 7 Jan 97, Bob Jamison
//### Updated : 27 Nov 97 -- Bob Jamison, Joe Nieten
//### 01 Jan 98 -- Bob Jamison -- fixed generic semantic constructor
//### 01 Jun 99 -- Bob Jamison -- added Runnable support
//### 06 Aug 00 -- Bob Jamison -- made state variables class-global
//### 03 Jan 01 -- Bob Jamison -- improved flags, tracing
//### 16 May 01 -- Bob Jamison -- added custom stack sizing
//### 04 Mar 02 -- Yuval Oren -- improved java performance, added options
//### 14 Mar 02 -- Tomas Hurka -- -d support, static initializer workaround
//### Please send bug reports to [email protected]
//### static char yysccsid[] = "@(#)yaccpar 1.8 (Berkeley) 01/20/90";
package net.ripe.db.whois.common.generated;
//#line 2 "src/main/parser/byacc/interface.y"
import net.ripe.db.whois.common.rpsl.AttributeParser;
import net.ripe.db.whois.common.rpsl.ParserHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.io.StringReader;
/*
filename: interface.y
description:
Defines the grammar for an RPSLng interface attribute. Derived
from ifaddr.y.
notes:
Defines tokens for the associated lexer, interface.l.
*/
//#line 35 "InterfaceParser.java"
public class InterfaceParser
implements AttributeParser
{
boolean yydebug; //do I want debug output?
int yynerrs; //number of errors so far
int yyerrflag; //was there an error?
int yychar; //the current working character
//########## MESSAGES ##########
//###############################################################
// method: debug
//###############################################################
void debug(String msg)
{
if (yydebug)
System.out.println(msg);
}
//########## STATE STACK ##########
final static int YYSTACKSIZE = 500; //maximum stack size
int statestk[] = new int[YYSTACKSIZE]; //state stack
int stateptr;
int stateptrmax; //highest index of stackptr
int statemax; //state when highest index reached
//###############################################################
// methods: state stack push,pop,drop,peek
//###############################################################
final void state_push(int state)
{
try {
stateptr++;
statestk[stateptr]=state;
}
catch (ArrayIndexOutOfBoundsException e) {
int oldsize = statestk.length;
int newsize = oldsize * 2;
int[] newstack = new int[newsize];
System.arraycopy(statestk,0,newstack,0,oldsize);
statestk = newstack;
statestk[stateptr]=state;
}
}
final int state_pop()
{
return statestk[stateptr--];
}
final void state_drop(int cnt)
{
stateptr -= cnt;
}
final int state_peek(int relative)
{
return statestk[stateptr-relative];
}
//###############################################################
// method: init_stacks : allocate and prepare stacks
//###############################################################
final boolean init_stacks()
{
stateptr = -1;
val_init();
return true;
}
//###############################################################
// method: dump_stacks : show n levels of the stacks
//###############################################################
void dump_stacks(int count)
{
int i;
System.out.println("=index==state====value= s:"+stateptr+" v:"+valptr);
for (i=0;i=YYSTACKSIZE)
return;
valstk[++valptr]=val;
}
InterfaceParserVal val_pop()
{
if (valptr<0)
return new InterfaceParserVal();
return valstk[valptr--];
}
void val_drop(int cnt)
{
int ptr;
ptr=valptr-cnt;
if (ptr<0)
return;
valptr = ptr;
}
InterfaceParserVal val_peek(int relative)
{
int ptr;
ptr=valptr-relative;
if (ptr<0)
return new InterfaceParserVal();
return valstk[ptr];
}
final InterfaceParserVal dup_yyval(InterfaceParserVal val)
{
InterfaceParserVal dup = new InterfaceParserVal();
dup.ival = val.ival;
dup.dval = val.dval;
dup.sval = val.sval;
dup.obj = val.obj;
return dup;
}
//#### end semantic value section ####
public final static short OP_OR=257;
public final static short OP_EQUAL=258;
public final static short OP_APPEND=259;
public final static short OP_COMPARE=260;
public final static short TKN_ASNO=261;
public final static short TKN_IPV4=262;
public final static short TKN_IPV6=263;
public final static short TKN_IPV6DC=264;
public final static short KEYW_ACTION=265;
public final static short TKN_PREF=266;
public final static short TKN_MED=267;
public final static short TKN_DPA=268;
public final static short TKN_ASPATH=269;
public final static short TKN_COMMUNITY=270;
public final static short TKN_NEXT_HOP=271;
public final static short TKN_COST=272;
public final static short TKN_COMM_NO=273;
public final static short KEYW_IGP_COST=274;
public final static short KEYW_SELF=275;
public final static short KEYW_PREPEND=276;
public final static short KEYW_APPEND=277;
public final static short KEYW_DELETE=278;
public final static short KEYW_CONTAINS=279;
public final static short KEYW_INTERNET=280;
public final static short KEYW_NO_EXPORT=281;
public final static short KEYW_NO_ADVERTISE=282;
public final static short KEYW_MASKLEN=283;
public final static short KEYW_AFI=284;
public final static short KEYW_ENCAPSULATION=285;
public final static short KEYW_TUNNEL=286;
public final static short TKN_INT=287;
public final static short YYERRCODE=256;
final static short yylhs[] = { -1,
0, 0, 0, 0, 0, 0, 1, 4, 2, 2,
5, 5, 6, 6, 6, 6, 6, 6, 6, 7,
7, 7, 7, 7, 7, 7, 8, 9, 9, 10,
11, 16, 16, 12, 12, 12, 12, 12, 12, 12,
17, 18, 18, 19, 19, 19, 19, 19, 13, 13,
15, 15, 14, 3, 3,
};
final static short yylen[] = { 2,
3, 5, 3, 5, 7, 9, 1, 1, 2, 3,
2, 3, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 3, 3, 3, 3,
6, 1, 3, 3, 3, 6, 6, 6, 4, 3,
3, 1, 3, 1, 1, 1, 1, 1, 3, 3,
3, 3, 3, 1, 1,
};
final static short yydefred[] = { 0,
0, 54, 55, 0, 0, 0, 0, 7, 0, 8,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 13, 14, 15, 16, 17, 18, 19,
0, 0, 0, 20, 21, 22, 23, 24, 26, 25,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 9, 0, 0, 0, 11, 0, 27,
29, 28, 30, 0, 0, 34, 35, 40, 0, 0,
0, 48, 44, 45, 46, 47, 0, 42, 49, 50,
53, 10, 52, 51, 0, 12, 5, 0, 0, 0,
0, 0, 0, 39, 0, 32, 0, 41, 0, 0,
0, 43, 6, 0, 31, 36, 37, 38, 33,
};
final static short yydgoto[] = { 4,
9, 22, 5, 11, 32, 23, 33, 24, 25, 26,
27, 28, 29, 30, 40, 97, 66, 77, 78,
};
final static short yysindex[] = { -185,
-257, 0, 0, 0, -241, -206, -204, 0, -181, 0,
-261, -207, -200, -189, -178, -173, -172, 41, -40, -170,
-169, -207, 31, 0, 0, 0, 0, 0, 0, 0,
-167, -259, 33, 0, 0, 0, 0, 0, 0, 0,
49, -193, -255, -192, -180, -25, -25, -25, -222, -242,
-221, -190, 40, 0, -217, -189, 42, 0, -183, 0,
0, 0, 0, 60, -242, 0, 0, 0, 63, 64,
65, 0, 0, 0, 0, 0, -21, 0, 0, 0,
0, 0, 0, 0, 62, 0, 0, -154, -43, -242,
-242, -242, -242, 0, -177, 0, 7, 0, 8, 9,
32, 0, 0, -152, 0, 0, 0, 0, 0,
};
final static short yyrindex[] = { 0,
0, 0, 0, 0, 0, 0, 0, 0, 110, 0,
111, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 112, 0, 0, 0, 0, 0, 0, 0, 0,
0, 113, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
};
final static short yygindex[] = { 0,
0, 0, -12, 0, 0, 92, 83, -8, 1, 2,
3, 4, 0, 5, 0, 0, -26, -62, 23,
};
final static int YYTABLESIZE=220;
static short yytable[];
static { yytable();}
static void yytable(){
yytable = new short[]{ 50,
93, 41, 89, 13, 34, 49, 15, 16, 17, 18,
19, 31, 21, 35, 36, 37, 38, 39, 61, 94,
67, 68, 93, 34, 14, 6, 56, 99, 100, 101,
72, 62, 35, 36, 37, 38, 39, 73, 74, 75,
79, 7, 84, 85, 76, 2, 3, 105, 106, 107,
104, 93, 93, 80, 69, 70, 71, 83, 15, 16,
17, 18, 19, 20, 21, 15, 16, 17, 18, 19,
31, 21, 108, 2, 3, 93, 1, 2, 3, 42,
8, 98, 10, 12, 43, 44, 45, 51, 52, 54,
55, 58, 59, 60, 63, 64, 81, 65, 82, 88,
86, 87, 90, 91, 92, 95, 96, 103, 109, 1,
3, 2, 4, 53, 57, 102, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 46, 47, 48,
};
}
static short yycheck[];
static { yycheck(); }
static void yycheck() {
yycheck = new short[] { 40,
44, 14, 65, 265, 13, 46, 266, 267, 268, 269,
270, 271, 272, 13, 13, 13, 13, 13, 274, 41,
47, 48, 44, 32, 286, 283, 286, 90, 91, 92,
273, 287, 32, 32, 32, 32, 32, 280, 281, 282,
262, 283, 55, 56, 287, 263, 264, 41, 41, 41,
44, 44, 44, 275, 277, 278, 279, 275, 266, 267,
268, 269, 270, 271, 272, 266, 267, 268, 269, 270,
271, 272, 41, 263, 264, 44, 262, 263, 264, 258,
287, 125, 287, 265, 258, 258, 46, 258, 258, 59,
258, 59, 44, 287, 287, 276, 287, 123, 59, 40,
59, 285, 40, 40, 40, 44, 261, 285, 261, 0,
0, 0, 0, 22, 32, 93, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 258, 259, 260,
};
}
final static short YYFINAL=4;
final static short YYMAXTOKEN=287;
final static String yyname[] = {
"end-of-file",null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,"'('","')'",null,null,"','",
null,"'.'",null,null,null,null,null,null,null,null,null,null,null,null,"';'",
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
"'{'",null,"'}'",null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,"OP_OR","OP_EQUAL","OP_APPEND","OP_COMPARE",
"TKN_ASNO","TKN_IPV4","TKN_IPV6","TKN_IPV6DC","KEYW_ACTION","TKN_PREF",
"TKN_MED","TKN_DPA","TKN_ASPATH","TKN_COMMUNITY","TKN_NEXT_HOP","TKN_COST",
"TKN_COMM_NO","KEYW_IGP_COST","KEYW_SELF","KEYW_PREPEND","KEYW_APPEND",
"KEYW_DELETE","KEYW_CONTAINS","KEYW_INTERNET","KEYW_NO_EXPORT",
"KEYW_NO_ADVERTISE","KEYW_MASKLEN","KEYW_AFI","KEYW_ENCAPSULATION",
"KEYW_TUNNEL","TKN_INT",
};
final static String yyrule[] = {
"$accept : interface",
"interface : TKN_IPV4 KEYW_MASKLEN v4_masklen",
"interface : TKN_IPV4 KEYW_MASKLEN v4_masklen KEYW_ACTION v4_action",
"interface : ipv6_address KEYW_MASKLEN v6_masklen",
"interface : ipv6_address KEYW_MASKLEN v6_masklen KEYW_ACTION v6_action",
"interface : ipv6_address KEYW_MASKLEN v6_masklen KEYW_TUNNEL ipv6_address ',' KEYW_ENCAPSULATION",
"interface : ipv6_address KEYW_MASKLEN v6_masklen KEYW_ACTION v6_action KEYW_TUNNEL ipv6_address ',' KEYW_ENCAPSULATION",
"v4_masklen : TKN_INT",
"v6_masklen : TKN_INT",
"v4_action : v4_rp_attribute ';'",
"v4_action : v4_action v4_rp_attribute ';'",
"v6_action : v6_rp_attribute ';'",
"v6_action : v6_action v6_rp_attribute ';'",
"v4_rp_attribute : pref",
"v4_rp_attribute : med",
"v4_rp_attribute : dpa",
"v4_rp_attribute : aspath",
"v4_rp_attribute : community",
"v4_rp_attribute : v4_next_hop",
"v4_rp_attribute : cost",
"v6_rp_attribute : pref",
"v6_rp_attribute : med",
"v6_rp_attribute : dpa",
"v6_rp_attribute : aspath",
"v6_rp_attribute : community",
"v6_rp_attribute : v6_next_hop",
"v6_rp_attribute : cost",
"pref : TKN_PREF OP_EQUAL TKN_INT",
"med : TKN_MED OP_EQUAL TKN_INT",
"med : TKN_MED OP_EQUAL KEYW_IGP_COST",
"dpa : TKN_DPA OP_EQUAL TKN_INT",
"aspath : TKN_ASPATH '.' KEYW_PREPEND '(' asno_list ')'",
"asno_list : TKN_ASNO",
"asno_list : asno_list ',' TKN_ASNO",
"community : TKN_COMMUNITY OP_EQUAL community_list",
"community : TKN_COMMUNITY OP_APPEND community_list",
"community : TKN_COMMUNITY '.' KEYW_APPEND '(' community_elm_list ')'",
"community : TKN_COMMUNITY '.' KEYW_DELETE '(' community_elm_list ')'",
"community : TKN_COMMUNITY '.' KEYW_CONTAINS '(' community_elm_list ')'",
"community : TKN_COMMUNITY '(' community_elm_list ')'",
"community : TKN_COMMUNITY OP_COMPARE community_list",
"community_list : '{' community_elm_list '}'",
"community_elm_list : community_elm",
"community_elm_list : community_elm_list ',' community_elm",
"community_elm : KEYW_INTERNET",
"community_elm : KEYW_NO_EXPORT",
"community_elm : KEYW_NO_ADVERTISE",
"community_elm : TKN_INT",
"community_elm : TKN_COMM_NO",
"v4_next_hop : TKN_NEXT_HOP OP_EQUAL TKN_IPV4",
"v4_next_hop : TKN_NEXT_HOP OP_EQUAL KEYW_SELF",
"v6_next_hop : TKN_NEXT_HOP OP_EQUAL ipv6_address",
"v6_next_hop : TKN_NEXT_HOP OP_EQUAL KEYW_SELF",
"cost : TKN_COST OP_EQUAL TKN_INT",
"ipv6_address : TKN_IPV6",
"ipv6_address : TKN_IPV6DC",
};
//#line 149 "src/main/parser/byacc/interface.y"
protected final Logger LOGGER = LoggerFactory.getLogger(InterfaceParser.class);
private InterfaceLexer lexer;
@Override
public Void parse(final String attributeValue) {
lexer = new InterfaceLexer(new StringReader(attributeValue), this);
final int result = yyparse();
if (result > 0) {
LOGGER.error("can't parse " + attributeValue);
throw new IllegalArgumentException("Unexpected parse result: " + result);
}
return null;
}
public int yylex () {
int yyl_return = -1;
try {
yyl_return = lexer.yylex();
}
catch (IOException e) {
LOGGER.error(e.getMessage(), e);
}
return yyl_return;
}
public void yyerror (final String error) {
String errorMessage = (yylval.sval == null ? error : yylval.sval);
ParserHelper.parserError(errorMessage);
}
//#line 377 "InterfaceParser.java"
//###############################################################
// method: yylexdebug : check lexer state
//###############################################################
void yylexdebug(int state,int ch)
{
String s=null;
if (ch < 0) ch=0;
if (ch <= YYMAXTOKEN) //check index bounds
s = yyname[ch]; //now get it
if (s==null)
s = "illegal-symbol";
debug("state "+state+", reading "+ch+" ("+s+")");
}
//The following are now global, to aid in error reporting
int yyn; //next next thing to do
int yym; //
int yystate; //current parsing state from state table
String yys; //current token string
//###############################################################
// method: yyparse : parse input and execute indicated items
//###############################################################
int yyparse()
{
boolean doaction;
init_stacks();
yynerrs = 0;
yyerrflag = 0;
yychar = -1; //impossible char forces a read
yystate=0; //initial state
state_push(yystate); //save it
val_push(yylval); //save empty value
while (true) //until parsing is done, either correctly, or w/error
{
doaction=true;
//if (yydebug) debug("loop");
//#### NEXT ACTION (from reduction table)
for (yyn=yydefred[yystate];yyn==0;yyn=yydefred[yystate])
{
//if (yydebug) debug("yyn:"+yyn+" state:"+yystate+" yychar:"+yychar);
if (yychar < 0) //we want a char?
{
yychar = yylex(); //get next token
//if (yydebug) debug(" next yychar:"+yychar);
//#### ERROR CHECK ####
if (yychar < 0) //it it didn't work/error
{
yychar = 0; //change it to default string (no -1!)
//if (yydebug)
// yylexdebug(yystate,yychar);
}
}//yychar<0
yyn = yysindex[yystate]; //get amount to shift by (shift index)
if ((yyn != 0) && (yyn += yychar) >= 0 &&
yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
{
//if (yydebug)
//debug("state "+yystate+", shifting to state "+yytable[yyn]);
//#### NEXT STATE ####
yystate = yytable[yyn];//we are in a new state
state_push(yystate); //save it
val_push(yylval); //push our lval as the input for next rule
yychar = -1; //since we have 'eaten' a token, say we need another
if (yyerrflag > 0) //have we recovered an error?
--yyerrflag; //give ourselves credit
doaction=false; //but don't process yet
break; //quit the yyn=0 loop
}
yyn = yyrindex[yystate]; //reduce
if ((yyn !=0 ) && (yyn += yychar) >= 0 &&
yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
{ //we reduced!
//if (yydebug) debug("reduce");
yyn = yytable[yyn];
doaction=true; //get ready to execute
break; //drop down to actions
}
else //ERROR RECOVERY
{
if (yyerrflag==0)
{
yyerror("syntax error");
yynerrs++;
}
if (yyerrflag < 3) //low error count?
{
yyerrflag = 3;
while (true) //do until break
{
if (stateptr<0) //check for under & overflow here
{
yyerror("stack underflow. aborting..."); //note lower case 's'
return 1;
}
yyn = yysindex[state_peek(0)];
if ((yyn != 0) && (yyn += YYERRCODE) >= 0 &&
yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
{
//if (yydebug)
//debug("state "+state_peek(0)+", error recovery shifting to state "+yytable[yyn]+" ");
yystate = yytable[yyn];
state_push(yystate);
val_push(yylval);
doaction=false;
break;
}
else
{
//if (yydebug)
//debug("error recovery discarding state "+state_peek(0)+" ");
if (stateptr<0) //check for under & overflow here
{
yyerror("Stack underflow. aborting..."); //capital 'S'
return 1;
}
state_pop();
val_pop();
}
}
}
else //discard this token
{
if (yychar == 0)
return 1; //yyabort
//if (yydebug)
//{
//yys = null;
//if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
//if (yys == null) yys = "illegal-symbol";
//debug("state "+yystate+", error recovery discards token "+yychar+" ("+yys+")");
//}
yychar = -1; //read another
}
}//end error recovery
}//yyn=0 loop
if (!doaction) //any reason not to proceed?
continue; //skip action
yym = yylen[yyn]; //get count of terminals on rhs
//if (yydebug)
//debug("state "+yystate+", reducing "+yym+" by rule "+yyn+" ("+yyrule[yyn]+")");
if (yym>0) //if count of rhs not 'nil'
yyval = val_peek(yym-1); //get current semantic value
yyval = dup_yyval(yyval); //duplicate yyval if ParserVal is used as semantic value
switch(yyn)
{
//########## USER-SUPPLIED ACTIONS ##########
case 7:
//#line 47 "src/main/parser/byacc/interface.y"
{
ParserHelper.checkMaskLength(val_peek(0).sval);
}
break;
case 8:
//#line 52 "src/main/parser/byacc/interface.y"
{
ParserHelper.checkMaskLengthv6(val_peek(0).sval);
}
break;
case 27:
//#line 83 "src/main/parser/byacc/interface.y"
{
ParserHelper.check16bit(val_peek(0).sval);
}
break;
case 28:
//#line 88 "src/main/parser/byacc/interface.y"
{
ParserHelper.check16bit(val_peek(0).sval);
}
break;
case 30:
//#line 94 "src/main/parser/byacc/interface.y"
{
ParserHelper.check16bit(val_peek(0).sval);
}
break;
case 47:
//#line 125 "src/main/parser/byacc/interface.y"
{
ParserHelper.check32bit(val_peek(0).sval);
}
break;
case 53:
//#line 139 "src/main/parser/byacc/interface.y"
{
ParserHelper.check16bit(val_peek(0).sval);
}
break;
//#line 568 "InterfaceParser.java"
//########## END OF USER-SUPPLIED ACTIONS ##########
}//switch
//#### Now let's reduce... ####
//if (yydebug) debug("reduce");
state_drop(yym); //we just reduced yylen states
yystate = state_peek(0); //get new state
val_drop(yym); //corresponding value drop
yym = yylhs[yyn]; //select next TERMINAL(on lhs)
if (yystate == 0 && yym == 0)//done? 'rest' state and at first TERMINAL
{
//if (yydebug) debug("After reduction, shifting from state 0 to state "+YYFINAL+"");
yystate = YYFINAL; //explicitly say we're done
state_push(YYFINAL); //and save it
val_push(yyval); //also save the semantic value of parsing
if (yychar < 0) //we want another character?
{
yychar = yylex(); //get next character
if (yychar<0) yychar=0; //clean, if necessary
//if (yydebug)
//yylexdebug(yystate,yychar);
}
if (yychar == 0) //Good exit (if lex returns 0 ;-)
break; //quit the loop--all DONE
}//if yystate
else //else not done yet
{ //get next state and push, for next yydefred[]
yyn = yygindex[yym]; //find out where to go
if ((yyn != 0) && (yyn += yystate) >= 0 &&
yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
yystate = yytable[yyn]; //get new state
else
yystate = yydgoto[yym]; //else go to new defred
//if (yydebug) debug("after reduction, shifting from state "+state_peek(0)+" to state "+yystate+"");
state_push(yystate); //going again, so push state & val...
val_push(yyval); //for next action
}
}//main loop
return 0;//yyaccept!!
}
//## end of method parse() ######################################
//## run() --- for Thread #######################################
//## The -Jnorun option was used ##
//## end of method run() ########################################
//## Constructors ###############################################
//## The -Jnoconstruct option was used ##
//###############################################################
}
//################### END OF CLASS ##############################