com.thoughtworks.qdox.parser.impl.Parser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.apache.fop Show documentation
Show all versions of org.apache.fop Show documentation
The core maven build properties
The newest version!
//### 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 com.thoughtworks.qdox.parser.impl;
//#line 2 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import com.thoughtworks.qdox.builder.Builder;
import com.thoughtworks.qdox.parser.*;
import com.thoughtworks.qdox.parser.expression.*;
import com.thoughtworks.qdox.parser.structs.*;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
import java.util.Stack;
//#line 45 "Parser.java"
public class Parser
implements CommentHandler
{
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 moduleTargets = new LinkedList();
private List typeParams = new LinkedList(); //for both JavaClass and JavaMethod
private LinkedList annotationStack = new LinkedList(); // Use LinkedList instead of Stack because it is unsynchronized
private List> annoValueListStack = new LinkedList>(); // Use LinkedList instead of Stack because it is unsynchronized
private List annoValueList = null;
private FieldDef param = new FieldDef();
private java.util.Set modifiers = new java.util.LinkedHashSet();
private TypeDef fieldType;
private TypeVariableDef typeVariable;
private Stack typeStack = new Stack();
private List typeList = new LinkedList();
private int line;
private int column;
private boolean debugLexer;
private void appendToBuffer(String word) {
if (textBuffer.length() > 0) {
char lastChar = textBuffer.charAt(textBuffer.length() - 1);
if (!Character.isWhitespace(lastChar)) {
textBuffer.append(' ');
}
}
textBuffer.append(word);
}
private String buffer() {
String result = textBuffer.toString().trim();
textBuffer.setLength(0);
return result;
}
public Parser( JavaLexer lexer, Builder builder )
{
lexer.addCommentHandler( this );
this.lexer = lexer;
this.builder = builder;
}
public void setDebugParser(boolean debug) {
yydebug = debug;
}
public void setDebugLexer(boolean debug) {
debugLexer = debug;
}
/**
* Parse file. Return true if successful.
*/
public boolean parse() {
return yyparse() == 0;
}
private int yylex() {
try {
final int result = lexer.lex();
yylval = new Value();
yylval.sval = lexer.text();
if (debugLexer) {
System.err.println("Token: " + yyname[result] + " \"" + yylval.sval + "\"");
}
return result;
}
catch(IOException e) {
return 0;
}
}
private void yyerror(String msg) {
throw new ParseException(msg, lexer.getLine(), lexer.getColumn());
}
private class Value {
Object oval;
String sval;
int ival;
boolean bval;
TypeDef type;
ElemValueDef annoval;
}
private void makeField(TypeDef field, String body, boolean enumConstant) {
fd = new FieldDef( field.getName() );
fd.setName(field.getName());
fd.setLineNumber(lexer.getLine());
fd.getModifiers().addAll(modifiers);
fd.setType( fieldType );
fd.setDimensions(field.getDimensions());
fd.setEnumConstant(enumConstant);
fd.setBody(body);
}
public void onComment( String comment, int line, int column ) {
DefaultJavaCommentLexer commentLexer = new DefaultJavaCommentLexer( new java.io.StringReader( comment ) );
commentLexer.setLineOffset( line );
commentLexer.setColumnOffset( column );
DefaultJavaCommentParser commentParser = new DefaultJavaCommentParser( commentLexer, builder);
commentParser.setDebugLexer( this.debugLexer );
commentParser.setDebugParser( this.yydebug );
commentParser.parse();
}
//#line 1759 "Parser.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 8:
//#line 94 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
ModuleDef module = new ModuleDef(val_peek(0).sval);
module.setOpen(true);
builder.setModule(module);
}
break;
case 10:
//#line 101 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
builder.setModule(new ModuleDef(val_peek(0).sval));
}
break;
case 13:
//#line 112 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
moduleTargets.add(val_peek(0).sval);
}
break;
case 14:
//#line 115 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
moduleTargets.add(val_peek(0).sval);
}
break;
case 15:
//#line 127 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
ModuleDef.RequiresDef req = new ModuleDef.RequiresDef(val_peek(1).sval, modifiers);
modifiers = new java.util.LinkedHashSet();
req.setLineNumber(line);
builder.addRequires(req);
}
break;
case 16:
//#line 134 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
exp = new ModuleDef.ExportsDef(val_peek(0).sval);
exp.setLineNumber(line);
}
break;
case 17:
//#line 139 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
exp.getTargets().addAll(moduleTargets);
moduleTargets = new LinkedList();
builder.addExports(exp);
}
break;
case 18:
//#line 145 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
opn = new ModuleDef.OpensDef(val_peek(0).sval);
opn.setLineNumber(line);
}
break;
case 19:
//#line 150 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
opn.getTargets().addAll(moduleTargets);
moduleTargets = new LinkedList();
builder.addOpens(opn);
}
break;
case 20:
//#line 155 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
ModuleDef.UsesDef uss = new ModuleDef.UsesDef(val_peek(1).type);
uss.setLineNumber(line);
builder.addUses(uss);
}
break;
case 21:
//#line 161 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
prv = new ModuleDef.ProvidesDef(val_peek(0).type);
prv.setLineNumber(line);
}
break;
case 22:
//#line 166 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
prv.getImplementations().addAll(typeList);
builder.addProvides(prv);
}
break;
case 25:
//#line 175 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{ modifiers.add("transitive"); }
break;
case 26:
//#line 176 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{ modifiers.add("static"); }
break;
case 31:
//#line 191 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
line = lexer.getLine();
}
break;
case 32:
//#line 195 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
builder.addPackage(new PackageDef(val_peek(1).sval, line));
}
break;
case 37:
//#line 214 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
builder.addImport( val_peek(1).sval );
}
break;
case 38:
//#line 222 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
builder.addImport( val_peek(3).sval + ".*" );
}
break;
case 39:
//#line 230 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
builder.addImport( "static " + val_peek(1).sval);
}
break;
case 40:
//#line 238 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
builder.addImport( "static " + val_peek(3).sval + ".*" );
}
break;
case 46:
//#line 266 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
cls.setType(ClassDef.CLASS);
cls.setLineNumber(lexer.getLine());
cls.getModifiers().addAll(modifiers); modifiers.clear();
cls.setName( val_peek(0).sval );
}
break;
case 47:
//#line 273 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
cls.setTypeParameters(typeParams);
builder.beginClass(cls);
cls = new ClassDef();
}
break;
case 48:
//#line 279 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
builder.endClass();
}
break;
case 49:
//#line 287 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
typeParams = new LinkedList();
}
break;
case 56:
//#line 306 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
cls.getExtends().add(val_peek(0).type);
}
break;
case 58:
//#line 315 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
cls.getImplements().addAll( typeList );
typeList.clear();
}
break;
case 66:
//#line 345 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
line = lexer.getLine();
}
break;
case 73:
//#line 367 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
fieldType = val_peek(1).type;
/* we're doing some lexer magic: lexer.getCodeBody() contains [= VariableInitializer]*/
makeField(val_peek(0).type, lexer.getCodeBody(), false);
builder.beginField(fd);
builder.endField();
}
break;
case 74:
//#line 375 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
modifiers.clear();
}
break;
case 76:
//#line 382 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
line = lexer.getLine();
}
break;
case 77:
//#line 386 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
/* we're doing some lexer magic: lexer.getCodeBody() contains [= VariableInitializer]*/
makeField(val_peek(0).type, lexer.getCodeBody(), false);
builder.beginField(fd);
builder.endField();
}
break;
case 78:
//#line 397 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.type = new TypeDef(val_peek(1).sval,val_peek(0).ival);
}
break;
case 79:
//#line 405 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
mth.setBody(val_peek(0).sval);
builder.endMethod(mth);
mth = new MethodDef();
}
break;
case 80:
//#line 426 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
builder.beginMethod();
mth.setLineNumber(lexer.getLine());
mth.getModifiers().addAll(modifiers); modifiers.clear();
mth.setTypeParams(typeParams);
mth.setReturnType(val_peek(1).type);
mth.setName(val_peek(0).sval);
}
break;
case 81:
//#line 435 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
mth.setDimensions(val_peek(1).ival);
}
break;
case 82:
//#line 439 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
builder.beginMethod();
mth.setLineNumber(lexer.getLine());
mth.getModifiers().addAll(modifiers); modifiers.clear();
mth.setTypeParams(typeParams);
mth.setReturnType(val_peek(1).type);
mth.setName(val_peek(0).sval);
}
break;
case 83:
//#line 448 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
mth.setDimensions(val_peek(1).ival);
}
break;
case 84:
//#line 452 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
builder.beginMethod();
mth.setLineNumber(lexer.getLine());
mth.getModifiers().addAll(modifiers); modifiers.clear();
mth.setReturnType(val_peek(1).type);
mth.setName(val_peek(0).sval);
}
break;
case 85:
//#line 460 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
mth.setDimensions(val_peek(1).ival);
}
break;
case 92:
//#line 486 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
param.getModifiers().addAll(modifiers); modifiers.clear();
param.setType(val_peek(1).type);
param.setName(val_peek(0).type.getName());
param.setDimensions(val_peek(0).type.getDimensions());
param.setVarArgs(false);
builder.addParameter(param);
param = new FieldDef();
}
break;
case 93:
//#line 501 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
param.getModifiers().addAll(modifiers); modifiers.clear();
param.setType(val_peek(2).type);
param.setName(val_peek(0).type.getName());
param.setDimensions(val_peek(0).type.getDimensions());
param.setVarArgs(true);
builder.addParameter(param);
param = new FieldDef();
}
break;
case 97:
//#line 526 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
mth.getExceptions().add(val_peek(0).type);
}
break;
case 98:
//#line 530 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
mth.getExceptions().add(val_peek(0).type);
}
break;
case 99:
//#line 539 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.sval = lexer.getCodeBody();
}
break;
case 100:
//#line 543 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.sval = "";
}
break;
case 101:
//#line 559 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
InitDef def = new InitDef();
def.setStatic(modifiers.contains("static"));modifiers.clear();
def.setBlockContent(lexer.getCodeBody());
builder.addInitializer(def);
}
break;
case 102:
//#line 570 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
builder.beginConstructor();
mth.setLineNumber(lexer.getLine());
mth.getModifiers().addAll(modifiers); modifiers.clear();
mth.setConstructor(true);
mth.setName(val_peek(0).sval);
}
break;
case 103:
//#line 578 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
mth.setBody(val_peek(0).sval);
builder.endConstructor(mth);
mth = new MethodDef();
}
break;
case 104:
//#line 584 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
builder.beginConstructor();
mth.setLineNumber(lexer.getLine());
mth.setTypeParams(typeParams);
mth.getModifiers().addAll(modifiers); modifiers.clear();
mth.setConstructor(true);
mth.setName(val_peek(0).sval);
}
break;
case 105:
//#line 593 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
mth.setBody(lexer.getCodeBody());
builder.endConstructor(mth);
mth = new MethodDef();
}
break;
case 106:
//#line 614 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
cls.setLineNumber(lexer.getLine());
cls.getModifiers().addAll(modifiers);
cls.setName( val_peek(0).sval );
cls.setType(ClassDef.ENUM);
builder.beginClass(cls);
cls = new ClassDef();
fieldType = new TypeDef(val_peek(0).sval, 0);
}
break;
case 108:
//#line 632 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
builder.endClass();
fieldType = null;
modifiers.clear();
}
break;
case 112:
//#line 653 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
TypeDef td = new TypeDef(val_peek(0).sval, 0);
typeStack.push(td);
makeField( td, "", true );
builder.beginField( fd );
}
break;
case 113:
//#line 660 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
builder.endField();
typeStack.pop();
}
break;
case 118:
//#line 686 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
cls.setType(ClassDef.INTERFACE);
cls.setLineNumber(lexer.getLine());
cls.getModifiers().addAll(modifiers); modifiers.clear();
}
break;
case 119:
//#line 692 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
cls.setName( val_peek(2).sval );
cls.setTypeParameters(typeParams);
builder.beginClass(cls);
cls = new ClassDef();
}
break;
case 120:
//#line 699 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
builder.endClass();
}
break;
case 121:
//#line 707 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
cls.getExtends().addAll( typeList );
typeList.clear();
}
break;
case 124:
//#line 738 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
cls.setType(ClassDef.ANNOTATION_TYPE);
cls.setLineNumber(lexer.getLine());
cls.getModifiers().addAll(modifiers); modifiers.clear();
cls.setName( val_peek(0).sval );
builder.beginClass(cls);
cls = new ClassDef();
}
break;
case 125:
//#line 747 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
builder.endClass();
}
break;
case 126:
//#line 779 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
line = lexer.getLine();
}
break;
case 127:
//#line 783 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
AnnoDef annotation = new AnnoDef( new TypeDef(val_peek(0).sval) );
annotation.setLineNumber(line);
annotationStack.addFirst(annotation);
}
break;
case 128:
//#line 789 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
AnnoDef annotation = annotationStack.removeFirst();
if(annotationStack.isEmpty())
{
builder.addAnnotation(annotation);
}
yyval.annoval = annotation;
}
break;
case 131:
//#line 808 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
annotationStack.getFirst().getArgs().put(val_peek(2).sval, val_peek(0).annoval);
}
break;
case 135:
//#line 828 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
annoValueListStack.add(annoValueList);
annoValueList = new LinkedList();
}
break;
case 136:
//#line 833 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new ElemValueListDef(annoValueList);
annoValueList = annoValueListStack.remove(annoValueListStack.size() - 1);
}
break;
case 139:
//#line 846 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
annotationStack.getFirst().getArgs().put("value", val_peek(0).annoval);
}
break;
case 141:
//#line 854 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
annoValueList.add(val_peek(0).annoval);
}
break;
case 151:
//#line 912 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new TypeRefDef(new TypeDef(val_peek(3).type.getName(), val_peek(2).ival));
}
break;
case 152:
//#line 916 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new ParenExpressionDef(val_peek(1).annoval);
}
break;
case 154:
//#line 921 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new TypeRefDef(new TypeDef(val_peek(2).sval, 0));
}
break;
case 155:
//#line 925 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new TypeRefDef(new TypeDef(val_peek(3).sval, val_peek(2).ival));
}
break;
case 157:
//#line 930 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new FieldRefDef(val_peek(0).sval);
}
break;
case 158:
//#line 941 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
CreatorDef creator = new CreatorDef();
creator.setCreatedName( val_peek(5).sval );
yyval.annoval = creator;
}
break;
case 159:
//#line 947 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
CreatorDef creator = new CreatorDef();
creator.setCreatedName( val_peek(5).sval );
yyval.annoval = creator;
}
break;
case 166:
//#line 984 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new MethodInvocationDef( val_peek(6).annoval + "." + val_peek(3).sval, null);
}
break;
case 167:
//#line 988 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new MethodInvocationDef(val_peek(3).sval, null);
}
break;
case 168:
//#line 992 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new MethodInvocationDef(val_peek(3).sval, null);
}
break;
case 169:
//#line 996 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new MethodInvocationDef(val_peek(6).sval, null);
}
break;
case 170:
//#line 1000 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new MethodInvocationDef("super." + val_peek(6).sval, null);
}
break;
case 171:
//#line 1004 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new MethodInvocationDef(val_peek(8).sval + ".super", null);
}
break;
case 172:
//#line 1012 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
builder.addArgument( (ExpressionDef) val_peek(0).annoval);
}
break;
case 173:
//#line 1016 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
builder.addArgument( (ExpressionDef) val_peek(0).annoval);
}
break;
case 176:
//#line 1033 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new MethodReferenceDef();
}
break;
case 177:
//#line 1037 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new MethodReferenceDef();
}
break;
case 178:
//#line 1041 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new MethodReferenceDef();
}
break;
case 179:
//#line 1045 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new MethodReferenceDef();
}
break;
case 180:
//#line 1056 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
CreatorDef creator = new CreatorDef();
creator.setCreatedName( val_peek(2).type.getName() );
yyval.annoval = creator;
}
break;
case 181:
//#line 1062 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
CreatorDef creator = new CreatorDef();
creator.setCreatedName( val_peek(2).type.getName() );
yyval.annoval = creator;
}
break;
case 182:
//#line 1068 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
CreatorDef creator = new CreatorDef();
creator.setCreatedName( val_peek(2).type.getName() );
yyval.annoval = creator;
}
break;
case 183:
//#line 1074 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
CreatorDef creator = new CreatorDef();
creator.setCreatedName( val_peek(2).type.getName() );
yyval.annoval = creator;
}
break;
case 190:
//#line 1123 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new AssignmentDef(val_peek(2).annoval, val_peek(1).sval, val_peek(0).annoval);
}
break;
case 191:
//#line 1133 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new FieldRefDef(val_peek(0).sval);
}
break;
case 205:
//#line 1170 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new QueryDef(val_peek(4).annoval, val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 207:
//#line 1180 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new LogicalOrDef(val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 209:
//#line 1190 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new LogicalAndDef(val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 211:
//#line 1200 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new OrDef(val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 213:
//#line 1210 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new ExclusiveOrDef(val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 215:
//#line 1220 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new AndDef(val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 217:
//#line 1231 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new EqualsDef(val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 218:
//#line 1235 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new NotEqualsDef(val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 220:
//#line 1249 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new LessThanDef(val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 221:
//#line 1253 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new GreaterThanDef(val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 222:
//#line 1257 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new LessEqualsDef(val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 223:
//#line 1261 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new GreaterEqualsDef(val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 225:
//#line 1273 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new ShiftLeftDef(val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 226:
//#line 1277 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new ShiftRightDef(val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 227:
//#line 1281 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new UnsignedShiftRightDef(val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 229:
//#line 1292 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new AddDef(val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 230:
//#line 1296 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new SubtractDef(val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 232:
//#line 1308 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new MultiplyDef(val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 233:
//#line 1312 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new DivideDef(val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 234:
//#line 1316 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new RemainderDef(val_peek(2).annoval, val_peek(0).annoval);
}
break;
case 237:
//#line 1330 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new PlusSignDef(val_peek(0).annoval);
}
break;
case 238:
//#line 1334 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new MinusSignDef(val_peek(0).annoval);
}
break;
case 240:
//#line 1343 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new PreIncrementDef(val_peek(0).annoval);
}
break;
case 241:
//#line 1351 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new PreDecrementDef(val_peek(0).annoval);
}
break;
case 243:
//#line 1363 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new NotDef(val_peek(0).annoval);
}
break;
case 244:
//#line 1367 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new LogicalNotDef(val_peek(0).annoval);
}
break;
case 249:
//#line 1386 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new PostIncrementDef(val_peek(1).annoval);
}
break;
case 250:
//#line 1394 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new PostDecrementDef(val_peek(1).annoval);
}
break;
case 251:
//#line 1404 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new CastDef(new TypeDef(val_peek(3).type.getName(), val_peek(2).ival), val_peek(0).annoval);
}
break;
case 252:
//#line 1408 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new CastDef(new TypeDef(val_peek(2).sval, 0), val_peek(0).annoval);
}
break;
case 253:
//#line 1412 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new CastDef(new TypeDef(val_peek(3).sval, val_peek(2).ival), val_peek(0).annoval);
}
break;
case 259:
//#line 1461 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
TypeDef td = new TypeDef(val_peek(3).sval + '.' + val_peek(0).sval,0);
yyval.type = typeStack.push(td);
}
break;
case 260:
//#line 1466 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.type = typeStack.pop();
}
break;
case 261:
//#line 1471 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
TypeDef td = new TypeDef(val_peek(0).sval,0);
yyval.type = typeStack.push(td);
}
break;
case 262:
//#line 1476 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.type = typeStack.pop();
}
break;
case 263:
//#line 1484 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.type = new TypeDef(val_peek(0).sval,0);
}
break;
case 264:
//#line 1494 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
TypeDef td = val_peek(1).type;
td.setDimensions(val_peek(0).ival);
yyval.type = td;
}
break;
case 265:
//#line 1500 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
TypeDef td = val_peek(1).type;
td.setDimensions(val_peek(0).ival);
yyval.type = td;
}
break;
case 266:
//#line 1510 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.ival = 1;
}
break;
case 267:
//#line 1514 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.ival = val_peek(2).ival + 1;
}
break;
case 268:
//#line 1517 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.ival = 0;
}
break;
case 270:
//#line 1526 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
typeVariable = new TypeVariableDef(val_peek(0).sval);
typeVariable.setBounds(new LinkedList());
}
break;
case 271:
//#line 1531 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
typeParams.add(typeVariable);
typeVariable = null;
}
break;
case 272:
//#line 1540 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
typeVariable.setBounds(new LinkedList());
typeVariable.getBounds().add(val_peek(0).type);
}
break;
case 276:
//#line 1553 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
typeVariable.getBounds().add(val_peek(0).type);
}
break;
case 279:
//#line 1564 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
typeStack.peek().setActualArgumentTypes(new LinkedList());
}
break;
case 283:
//#line 1576 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
(typeStack.peek()).getActualArgumentTypes().add(val_peek(0).type);
}
break;
case 284:
//#line 1580 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
(typeStack.peek()).getActualArgumentTypes().add(val_peek(0).type);
}
break;
case 287:
//#line 1595 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.type = val_peek(0).type;
}
break;
case 288:
//#line 1599 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.type = new WildcardTypeDef();
}
break;
case 289:
//#line 1608 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.type = new WildcardTypeDef(val_peek(0).type, "extends" );
}
break;
case 290:
//#line 1612 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.type = new WildcardTypeDef(val_peek(0).type, "super" );
}
break;
case 292:
//#line 1622 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.sval = val_peek(2).sval + '.' + val_peek(0).sval;
}
break;
case 293:
//#line 1648 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.type = new TypeDef("byte");
}
break;
case 294:
//#line 1652 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.type = new TypeDef("short");
}
break;
case 295:
//#line 1656 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.type = new TypeDef("char");
}
break;
case 296:
//#line 1660 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.type = new TypeDef("int");
}
break;
case 297:
//#line 1664 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.type = new TypeDef("long");
}
break;
case 298:
//#line 1668 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.type = new TypeDef("float");
}
break;
case 299:
//#line 1672 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.type = new TypeDef("double");
}
break;
case 300:
//#line 1676 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.type = new TypeDef("boolean");
}
break;
case 302:
//#line 1686 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.sval = val_peek(2).type.getName() + '.' + val_peek(0).sval;
}
break;
case 303:
//#line 1699 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
typeList.add( val_peek(0).type );
}
break;
case 304:
//#line 1703 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
typeList.add( val_peek(0).type );
}
break;
case 308:
//#line 1726 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
modifiers.add("public");
}
break;
case 309:
//#line 1730 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
modifiers.add("protected");
}
break;
case 310:
//#line 1734 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
modifiers.add("private");
}
break;
case 311:
//#line 1738 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
modifiers.add("static");
}
break;
case 312:
//#line 1742 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
modifiers.add("final");
}
break;
case 313:
//#line 1746 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
modifiers.add("abstract");
}
break;
case 314:
//#line 1750 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
modifiers.add("native");
}
break;
case 315:
//#line 1754 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
modifiers.add("synchronized");
}
break;
case 316:
//#line 1758 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
modifiers.add("volatile");
}
break;
case 317:
//#line 1762 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
modifiers.add("transient");
}
break;
case 318:
//#line 1766 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
modifiers.add("strictfp");
}
break;
case 319:
//#line 1770 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
modifiers.add("default");
}
break;
case 322:
//#line 1793 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new ConstantDef(val_peek(0).sval, Integer.class);
}
break;
case 323:
//#line 1797 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new ConstantDef(val_peek(0).sval, Float.class);
}
break;
case 324:
//#line 1801 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
String s = lexer.getCodeBody();
yyval.annoval = new ConstantDef(s, Character.class);
}
break;
case 325:
//#line 1806 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
String s = lexer.getCodeBody();
yyval.annoval = new ConstantDef(s, String.class);
}
break;
case 326:
//#line 1811 "E:\java-workspace\github\qdox\target\checkout/src/grammar/parser.y"
{
yyval.annoval = new ConstantDef(val_peek(0).sval, Boolean.class);
}
break;
//#line 3075 "Parser.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 ##############################
© 2015 - 2025 Weber Informatics LLC | Privacy Policy