com.imsweb.validation.translation.language.GeneditsParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of validation-translation Show documentation
Show all versions of validation-translation Show documentation
This project allows a Genedits Metafile to be translated into Groovy edits that can be executed in the SEER Validation framework.
The newest version!
//----------------------------------------------------
// The following code was generated by CUP v0.11a beta 20060608
// Thu Apr 12 14:35:56 EDT 2018
//----------------------------------------------------
package com.imsweb.validation.translation.language;
import com.imsweb.validation.translation.language.entity.ArgumentList;
import com.imsweb.validation.translation.language.entity.AssignmentStatement;
import com.imsweb.validation.translation.language.entity.CommentStatement;
import com.imsweb.validation.translation.language.entity.ConstantExpression;
import com.imsweb.validation.translation.language.entity.DeclarationStatement;
import com.imsweb.validation.translation.language.entity.EmptyLineStatement;
import com.imsweb.validation.translation.language.entity.Expression;
import com.imsweb.validation.translation.language.entity.ExpressionWithParenthesis;
import com.imsweb.validation.translation.language.entity.FieldExpression;
import com.imsweb.validation.translation.language.entity.FunctionStatement;
import com.imsweb.validation.translation.language.entity.IfThenElseStatement;
import com.imsweb.validation.translation.language.entity.LiteralExpression;
import com.imsweb.validation.translation.language.entity.MethodInvocationExpression;
import com.imsweb.validation.translation.language.entity.MethodInvocationStatement;
import com.imsweb.validation.translation.language.entity.OperationExpression;
import com.imsweb.validation.translation.language.entity.ParsedTree;
import com.imsweb.validation.translation.language.entity.ReturnStatement;
import com.imsweb.validation.translation.language.entity.Statement;
import com.imsweb.validation.translation.language.entity.Statements;
import com.imsweb.validation.translation.language.entity.VariableDeclaration;
import com.imsweb.validation.translation.language.entity.WhileStatement;
/** CUP v0.11a beta 20060608 generated parser.
* @version Thu Apr 12 14:35:56 EDT 2018
*/
@SuppressWarnings("CStyleArrayDeclaration")
public class GeneditsParser extends java_cup.runtime.lr_parser {
/** Default constructor. */
public GeneditsParser() {super();}
/** Constructor which sets the default scanner. */
public GeneditsParser(java_cup.runtime.Scanner s) {super(s);}
/** Constructor which sets the default scanner. */
public GeneditsParser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}
/** Production table. */
protected static final short _production_table[][] =
unpackFromStrings(new String[] {
"\000\061\000\002\002\004\000\002\002\003\000\002\003" +
"\005\000\002\003\005\000\002\004\004\000\002\004\004" +
"\000\002\004\004\000\002\004\003\000\002\005\006\000" +
"\002\006\002\000\002\006\004\000\002\007\004\000\002" +
"\007\006\000\002\007\007\000\002\007\006\000\002\007" +
"\010\000\002\007\011\000\002\007\007\000\002\007\007" +
"\000\002\007\007\000\002\020\002\000\002\020\003\000" +
"\002\010\003\000\002\010\003\000\002\011\003\000\002" +
"\011\003\000\002\012\003\000\002\012\003\000\002\012" +
"\003\000\002\012\003\000\002\012\003\000\002\012\004" +
"\000\002\012\004\000\002\012\006\000\002\012\006\000" +
"\002\012\006\000\002\012\004\000\002\012\004\000\002" +
"\012\006\000\002\012\006\000\002\013\005\000\002\017" +
"\003\000\002\017\005\000\002\016\006\000\002\016\003" +
"\000\002\014\002\000\002\014\003\000\002\015\003\000" +
"\002\015\005" });
/** Access to production table. */
public short[][] production_table() {return _production_table;}
/** Parse-action table. */
protected static final short[][] _action_table =
unpackFromStrings(new String[] {
"\000\151\000\026\004\013\006\004\007\022\010\021\013" +
"\005\022\017\024\016\034\020\035\014\036\023\001\002" +
"\000\004\011\150\001\002\000\026\004\013\006\004\007" +
"\022\010\021\013\005\022\017\024\016\034\020\035\014" +
"\036\023\001\002\000\004\017\141\001\002\000\004\002" +
"\140\001\002\000\024\004\013\006\004\007\022\010\021" +
"\022\017\024\016\034\020\035\014\036\023\001\002\000" +
"\004\002\000\001\002\000\032\002\ufffa\004\013\006\004" +
"\007\022\010\021\013\005\014\ufffa\022\017\024\016\034" +
"\020\035\014\036\023\001\002\000\004\011\127\001\002" +
"\000\004\034\121\001\002\000\032\002\uffe9\004\uffe9\006" +
"\uffe9\007\uffe9\010\uffe9\013\uffe9\014\uffe9\022\uffe9\024\uffe9" +
"\034\uffe9\035\uffe9\036\uffe9\001\002\000\054\002\uffeb\004" +
"\uffeb\005\uffeb\006\uffeb\007\uffeb\010\uffeb\011\uffeb\013\uffeb" +
"\014\uffeb\020\uffeb\021\uffeb\022\uffeb\024\uffeb\027\uffeb\030" +
"\uffeb\031\uffeb\032\uffeb\033\uffeb\034\uffeb\035\uffeb\036\uffeb" +
"\001\002\000\034\002\uffed\004\uffed\005\uffed\006\uffed\007" +
"\uffed\010\uffed\013\uffed\014\uffed\022\uffed\024\uffed\034\uffed" +
"\035\uffed\036\065\001\002\000\010\011\110\015\107\017" +
"\uffd5\001\002\000\004\034\076\001\002\000\024\011\037" +
"\020\031\021\026\027\032\030\027\031\030\032\033\033" +
"\025\034\036\001\002\000\054\002\uffea\004\uffea\005\uffea" +
"\006\uffea\007\uffea\010\uffea\011\uffea\013\uffea\014\uffea\020" +
"\uffea\021\uffea\022\uffea\024\uffea\027\uffea\030\uffea\031\uffea" +
"\032\uffea\033\uffea\034\uffea\035\uffea\036\uffea\001\002\000" +
"\032\002\uffe8\004\uffe8\006\uffe8\007\uffe8\010\uffe8\013\uffe8" +
"\014\uffe8\022\uffe8\024\uffe8\034\uffe8\035\uffe8\036\uffe8\001" +
"\002\000\020\011\073\012\uffe6\022\uffe6\023\uffe6\025\uffe6" +
"\026\uffe6\030\uffe6\001\002\000\004\032\072\001\002\000" +
"\024\011\037\020\031\021\026\027\032\030\027\031\030" +
"\032\033\033\025\034\036\001\002\000\016\012\uffe4\022" +
"\uffe4\023\uffe4\025\uffe4\026\uffe4\030\uffe4\001\002\000\004" +
"\032\070\001\002\000\024\011\037\020\031\021\026\027" +
"\032\030\027\031\030\032\033\033\025\034\036\001\002" +
"\000\016\012\uffe5\022\uffe5\023\uffe5\025\uffe5\026\uffe5\030" +
"\uffe5\001\002\000\012\022\064\025\043\026\044\030\042" +
"\001\002\000\016\012\uffe7\022\uffe7\023\uffe7\025\uffe7\026" +
"\uffe7\030\uffe7\001\002\000\020\011\055\012\uffe3\022\uffe3" +
"\023\uffe3\025\uffe3\026\uffe3\030\uffe3\001\002\000\024\011" +
"\037\020\031\021\026\027\032\030\027\031\030\032\033" +
"\033\025\034\036\001\002\000\012\012\041\025\043\026" +
"\044\030\042\001\002\000\016\012\uffd9\022\uffd9\023\uffd9" +
"\025\uffd9\026\uffd9\030\uffd9\001\002\000\030\011\ufff8\020" +
"\ufff8\021\ufff8\024\016\027\ufff8\030\ufff8\031\ufff8\032\ufff8" +
"\033\ufff8\034\ufff8\036\023\001\002\000\030\011\ufff8\020" +
"\ufff8\021\ufff8\024\016\027\ufff8\030\ufff8\031\ufff8\032\ufff8" +
"\033\ufff8\034\ufff8\036\023\001\002\000\030\011\ufff8\020" +
"\ufff8\021\ufff8\024\016\027\ufff8\030\ufff8\031\ufff8\032\ufff8" +
"\033\ufff8\034\ufff8\036\023\001\002\000\024\011\037\020" +
"\031\021\026\027\032\030\027\031\030\032\033\033\025" +
"\034\036\001\002\000\054\002\ufff8\004\ufff8\005\ufff8\006" +
"\ufff8\007\ufff8\010\ufff8\011\ufff8\013\ufff8\014\ufff8\020\ufff8" +
"\021\ufff8\022\ufff8\024\016\027\ufff8\030\ufff8\031\ufff8\032" +
"\ufff8\033\ufff8\034\ufff8\035\ufff8\036\023\001\002\000\054" +
"\002\ufff7\004\ufff7\005\ufff7\006\ufff7\007\ufff7\010\ufff7\011" +
"\ufff7\013\ufff7\014\ufff7\020\ufff7\021\ufff7\022\ufff7\024\ufff7" +
"\027\ufff7\030\ufff7\031\ufff7\032\ufff7\033\ufff7\034\ufff7\035" +
"\ufff7\036\ufff7\001\002\000\016\012\uffdf\022\uffdf\023\uffdf" +
"\025\uffdf\026\uffdf\030\uffdf\001\002\000\024\011\037\020" +
"\031\021\026\027\032\030\027\031\030\032\033\033\025" +
"\034\036\001\002\000\016\012\uffe0\022\uffe0\023\uffe0\025" +
"\uffe0\026\uffe0\030\uffe0\001\002\000\024\011\037\020\031" +
"\021\026\027\032\030\027\031\030\032\033\033\025\034" +
"\036\001\002\000\016\012\uffde\022\uffde\023\uffde\025\uffde" +
"\026\uffde\030\uffde\001\002\000\026\011\037\012\uffd4\020" +
"\031\021\026\027\032\030\027\031\030\032\033\033\025" +
"\034\036\001\002\000\004\012\063\001\002\000\006\012" +
"\uffd3\023\061\001\002\000\014\012\uffd2\023\uffd2\025\043" +
"\026\044\030\042\001\002\000\024\011\037\020\031\021" +
"\026\027\032\030\027\031\030\032\033\033\025\034\036" +
"\001\002\000\014\012\uffd1\023\uffd1\025\043\026\044\030" +
"\042\001\002\000\016\012\uffdb\022\uffdb\023\uffdb\025\uffdb" +
"\026\uffdb\030\uffdb\001\002\000\034\002\uffed\004\uffed\005" +
"\uffed\006\uffed\007\uffed\010\uffed\013\uffed\014\uffed\022\uffed" +
"\024\uffed\034\uffed\035\uffed\036\065\001\002\000\034\002" +
"\uffec\004\uffec\005\uffec\006\uffec\007\uffec\010\uffec\013\uffec" +
"\014\uffec\022\uffec\024\uffec\034\uffec\035\uffec\036\uffec\001" +
"\002\000\034\002\ufff3\004\ufff3\005\ufff3\006\ufff3\007\ufff3" +
"\010\ufff3\013\ufff3\014\ufff3\022\ufff3\024\ufff3\034\ufff3\035" +
"\ufff3\036\ufff3\001\002\000\016\012\uffdd\022\uffdd\023\uffdd" +
"\025\043\026\044\030\042\001\002\000\016\012\uffe2\022" +
"\uffe2\023\uffe2\025\uffe2\026\uffe2\030\uffe2\001\002\000\016" +
"\012\uffdc\022\uffdc\023\uffdc\025\uffdc\026\uffdc\030\uffdc\001" +
"\002\000\016\012\uffe1\022\uffe1\023\uffe1\025\uffe1\026\uffe1" +
"\030\uffe1\001\002\000\026\011\037\012\uffd4\020\031\021" +
"\026\027\032\030\027\031\030\032\033\033\025\034\036" +
"\001\002\000\004\012\075\001\002\000\016\012\uffda\022" +
"\uffda\023\uffda\025\uffda\026\uffda\030\uffda\001\002\000\004" +
"\011\077\001\002\000\004\012\100\001\002\000\026\004" +
"\ufff8\006\ufff8\007\ufff8\010\ufff8\013\ufff8\022\ufff8\024\016" +
"\034\ufff8\035\ufff8\036\023\001\002\000\034\002\uffee\004" +
"\uffee\005\uffee\006\uffee\007\uffee\010\uffee\013\uffee\014\uffee" +
"\022\uffee\024\uffee\034\uffee\035\uffee\036\uffee\001\002\000" +
"\022\004\013\006\004\007\022\010\021\013\005\022\017" +
"\034\020\035\014\001\002\000\034\002\ufff8\004\ufff8\005" +
"\ufff8\006\ufff8\007\ufff8\010\ufff8\013\ufff8\014\ufff8\022\ufff8" +
"\024\016\034\ufff8\035\ufff8\036\023\001\002\000\034\002" +
"\ufff8\004\ufff8\005\ufff8\006\ufff8\007\ufff8\010\ufff8\013\ufff8" +
"\014\ufff8\022\ufff8\024\016\034\ufff8\035\ufff8\036\023\001" +
"\002\000\034\002\ufffe\004\ufffe\005\ufffe\006\ufffe\007\ufffe" +
"\010\ufffe\013\ufffe\014\ufffe\022\ufffe\024\ufffe\034\ufffe\035" +
"\ufffe\036\ufffe\001\002\000\034\002\uffff\004\uffff\005\uffff" +
"\006\uffff\007\uffff\010\uffff\013\uffff\014\uffff\022\uffff\024" +
"\uffff\034\uffff\035\uffff\036\uffff\001\002\000\004\031\115" +
"\001\002\000\026\011\037\012\uffd4\020\031\021\026\027" +
"\032\030\027\031\030\032\033\033\025\034\036\001\002" +
"\000\004\012\112\001\002\000\004\022\113\001\002\000" +
"\034\002\uffed\004\uffed\005\uffed\006\uffed\007\uffed\010\uffed" +
"\013\uffed\014\uffed\022\uffed\024\uffed\034\uffed\035\uffed\036" +
"\065\001\002\000\034\002\ufff2\004\ufff2\005\ufff2\006\ufff2" +
"\007\ufff2\010\ufff2\013\ufff2\014\ufff2\022\ufff2\024\ufff2\034" +
"\ufff2\035\ufff2\036\ufff2\001\002\000\004\016\116\001\002" +
"\000\010\017\uffd6\022\uffd6\023\uffd6\001\002\000\034\002" +
"\ufff6\004\ufff6\005\ufff6\006\ufff6\007\ufff6\010\ufff6\013\ufff6" +
"\014\ufff6\022\ufff6\024\ufff6\034\ufff6\035\ufff6\036\ufff6\001" +
"\002\000\004\022\125\001\002\000\010\015\107\022\uffd5" +
"\023\uffd5\001\002\000\006\022\uffd8\023\123\001\002\000" +
"\004\034\121\001\002\000\004\022\uffd7\001\002\000\034" +
"\002\uffed\004\uffed\005\uffed\006\uffed\007\uffed\010\uffed\013" +
"\uffed\014\uffed\022\uffed\024\uffed\034\uffed\035\uffed\036\065" +
"\001\002\000\034\002\ufff5\004\ufff5\005\ufff5\006\ufff5\007" +
"\ufff5\010\ufff5\013\ufff5\014\ufff5\022\ufff5\024\ufff5\034\ufff5" +
"\035\ufff5\036\ufff5\001\002\000\024\011\037\020\031\021" +
"\026\027\032\030\027\031\030\032\033\033\025\034\036" +
"\001\002\000\012\012\131\025\043\026\044\030\042\001" +
"\002\000\026\004\ufff8\006\ufff8\007\ufff8\010\ufff8\013\ufff8" +
"\022\ufff8\024\016\034\ufff8\035\ufff8\036\023\001\002\000" +
"\034\002\ufff0\004\ufff0\005\133\006\ufff0\007\ufff0\010\ufff0" +
"\013\ufff0\014\ufff0\022\ufff0\024\ufff0\034\ufff0\035\ufff0\036" +
"\ufff0\001\002\000\026\004\ufff8\006\ufff8\007\ufff8\010\ufff8" +
"\013\ufff8\022\ufff8\024\016\034\ufff8\035\ufff8\036\023\001" +
"\002\000\034\002\ufff1\004\ufff1\005\ufff1\006\ufff1\007\ufff1" +
"\010\ufff1\013\ufff1\014\ufff1\022\ufff1\024\ufff1\034\ufff1\035" +
"\ufff1\036\ufff1\001\002\000\006\002\ufffd\014\ufffd\001\002" +
"\000\030\002\ufffc\004\013\006\004\007\022\010\021\014" +
"\ufffc\022\017\024\016\034\020\035\014\036\023\001\002" +
"\000\006\002\ufffb\014\ufffb\001\002\000\004\002\001\001" +
"\002\000\024\011\037\020\031\021\026\027\032\030\027" +
"\031\030\032\033\033\025\034\036\001\002\000\012\022" +
"\143\025\043\026\044\030\042\001\002\000\034\002\uffed" +
"\004\uffed\005\uffed\006\uffed\007\uffed\010\uffed\013\uffed\014" +
"\uffed\022\uffed\024\uffed\034\uffed\035\uffed\036\065\001\002" +
"\000\034\002\ufff4\004\ufff4\005\ufff4\006\ufff4\007\ufff4\010" +
"\ufff4\013\ufff4\014\ufff4\022\ufff4\024\ufff4\034\ufff4\035\ufff4" +
"\036\ufff4\001\002\000\004\014\146\001\002\000\034\002" +
"\ufff8\004\ufff8\005\ufff8\006\ufff8\007\ufff8\010\ufff8\013\ufff8" +
"\014\ufff8\022\ufff8\024\016\034\ufff8\035\ufff8\036\023\001" +
"\002\000\034\002\ufff9\004\ufff9\005\ufff9\006\ufff9\007\ufff9" +
"\010\ufff9\013\ufff9\014\ufff9\022\ufff9\024\ufff9\034\ufff9\035" +
"\ufff9\036\ufff9\001\002\000\024\011\037\020\031\021\026" +
"\027\032\030\027\031\030\032\033\033\025\034\036\001" +
"\002\000\012\012\152\025\043\026\044\030\042\001\002" +
"\000\026\004\ufff8\006\ufff8\007\ufff8\010\ufff8\013\ufff8\022" +
"\ufff8\024\016\034\ufff8\035\ufff8\036\023\001\002\000\034" +
"\002\uffef\004\uffef\005\uffef\006\uffef\007\uffef\010\uffef\013" +
"\uffef\014\uffef\022\uffef\024\uffef\034\uffef\035\uffef\036\uffef" +
"\001\002" });
/** Access to parse-action table. */
public short[][] action_table() {return _action_table;}
/** reduce_goto
table. */
protected static final short[][] _reduce_table =
unpackFromStrings(new String[] {
"\000\151\000\020\002\006\004\010\005\007\007\014\010" +
"\023\011\011\016\005\001\001\000\002\001\001\000\016" +
"\004\144\005\007\007\014\010\023\011\011\016\005\001" +
"\001\000\002\001\001\000\002\001\001\000\012\007\014" +
"\010\023\011\136\016\005\001\001\000\002\001\001\000" +
"\016\004\134\005\135\007\014\010\023\011\011\016\005" +
"\001\001\000\002\001\001\000\006\016\121\017\117\001" +
"\001\000\002\001\001\000\002\001\001\000\004\020\116" +
"\001\001\000\002\001\001\000\002\001\001\000\006\012" +
"\033\013\034\001\001\000\002\001\001\000\002\001\001" +
"\000\002\001\001\000\002\001\001\000\006\012\070\013" +
"\034\001\001\000\002\001\001\000\002\001\001\000\006" +
"\012\066\013\034\001\001\000\002\001\001\000\002\001" +
"\001\000\002\001\001\000\002\001\001\000\006\012\037" +
"\013\034\001\001\000\002\001\001\000\002\001\001\000" +
"\006\006\052\010\045\001\001\000\006\006\050\010\045" +
"\001\001\000\006\006\044\010\045\001\001\000\006\012" +
"\047\013\034\001\001\000\006\006\046\010\045\001\001" +
"\000\002\001\001\000\002\001\001\000\006\012\051\013" +
"\034\001\001\000\002\001\001\000\006\012\053\013\034" +
"\001\001\000\002\001\001\000\012\012\057\013\034\014" +
"\055\015\056\001\001\000\002\001\001\000\002\001\001" +
"\000\002\001\001\000\006\012\061\013\034\001\001\000" +
"\002\001\001\000\002\001\001\000\004\020\065\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\012" +
"\012\057\013\034\014\073\015\056\001\001\000\002\001" +
"\001\000\002\001\001\000\002\001\001\000\002\001\001" +
"\000\010\003\100\006\101\010\045\001\001\000\002\001" +
"\001\000\010\005\102\007\103\016\005\001\001\000\006" +
"\006\105\010\045\001\001\000\006\006\104\010\045\001" +
"\001\000\002\001\001\000\002\001\001\000\002\001\001" +
"\000\012\012\057\013\034\014\110\015\056\001\001\000" +
"\002\001\001\000\002\001\001\000\004\020\113\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\002" +
"\001\001\000\006\016\121\017\123\001\001\000\002\001" +
"\001\000\004\020\125\001\001\000\002\001\001\000\006" +
"\012\127\013\034\001\001\000\002\001\001\000\010\003" +
"\131\006\101\010\045\001\001\000\002\001\001\000\010" +
"\003\133\006\101\010\045\001\001\000\002\001\001\000" +
"\002\001\001\000\012\007\014\010\023\011\136\016\005" +
"\001\001\000\002\001\001\000\002\001\001\000\006\012" +
"\141\013\034\001\001\000\002\001\001\000\004\020\143" +
"\001\001\000\002\001\001\000\002\001\001\000\006\006" +
"\146\010\045\001\001\000\002\001\001\000\006\012\150" +
"\013\034\001\001\000\002\001\001\000\010\003\152\006" +
"\101\010\045\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$GeneditsParser$actions action_obj;
/** Action encapsulation object initializer. */
protected void init_actions()
{
action_obj = new CUP$GeneditsParser$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$GeneditsParser$do_action(act_num, parser, stack, top);
}
/** Indicates start state. */
public int start_state() {return 0;}
/** Indicates 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;}
public void report_error(String message, Object info) {
StringBuilder m = new StringBuilder("Error");
if (info instanceof java_cup.runtime.Symbol) {
java_cup.runtime.Symbol s = ((java_cup.runtime.Symbol) info);
if (s.left >= 0) {
m.append(" in line "+(s.left+1));
if (s.right >= 0)
m.append(", column "+(s.right+1));
}
}
m.append(" : " + message);
}
public void report_fatal_error(String message, Object info) {
StringBuilder m = new StringBuilder("Error");
if (info instanceof java_cup.runtime.Symbol) {
java_cup.runtime.Symbol s = ((java_cup.runtime.Symbol) info);
if (s.left >= 0) {
m.append(" in line "+(s.left+1));
if (s.right >= 0)
m.append(", column "+(s.right+1));
}
}
m.append(" : " + message);
}
}
/** Cup generated class to encapsulate user supplied action code.*/
@SuppressWarnings({"rawtypes", "unchecked"})
class CUP$GeneditsParser$actions {
private final GeneditsParser parser;
/** Constructor */
CUP$GeneditsParser$actions(GeneditsParser parser) {
this.parser = parser;
}
/** Method with the actual generated action code. */
public final java_cup.runtime.Symbol CUP$GeneditsParser$do_action(
int CUP$GeneditsParser$act_num,
java_cup.runtime.lr_parser CUP$GeneditsParser$parser,
java.util.Stack CUP$GeneditsParser$stack,
int CUP$GeneditsParser$top)
throws java.lang.Exception
{
/* Symbol object for return from actions */
java_cup.runtime.Symbol CUP$GeneditsParser$result;
/* select the action based on the action number */
switch (CUP$GeneditsParser$act_num)
{
/*. . . . . . . . . . . . . . . . . . . .*/
case 48: // argument_list ::= argument_list COMMA expression
{
ArgumentList RESULT =null;
int aleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).left;
int aright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).right;
ArgumentList a = (ArgumentList)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).value;
int eleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int eright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Expression e = (Expression)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new ArgumentList(a, e);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("argument_list",11, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 47: // argument_list ::= expression
{
ArgumentList RESULT =null;
int eleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int eright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Expression e = (Expression)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new ArgumentList(e);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("argument_list",11, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 46: // argument_list_opt ::= argument_list
{
ArgumentList RESULT =null;
int aleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int aright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
ArgumentList a = (ArgumentList)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new ArgumentList(a);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("argument_list_opt",10, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 45: // argument_list_opt ::=
{
ArgumentList RESULT =null;
RESULT = new ArgumentList();
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("argument_list_opt",10, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 44: // variable_decleration ::= IDENTIFIER
{
VariableDeclaration RESULT =null;
int ileft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int iright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
java.lang.String i = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new VariableDeclaration(i);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("variable_decleration",12, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 43: // variable_decleration ::= IDENTIFIER LBRACK NUMBER RBRACK
{
VariableDeclaration RESULT =null;
int ileft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).left;
int iright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).right;
java.lang.String i = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).value;
int nleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).left;
int nright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).right;
java.lang.Integer n = (java.lang.Integer)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).value;
RESULT = new VariableDeclaration(i, n);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("variable_decleration",12, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 42: // variable_decleration_list ::= variable_decleration COMMA variable_decleration_list
{
java.util.List RESULT =null;
int vleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).left;
int vright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).right;
VariableDeclaration v = (VariableDeclaration)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).value;
int lleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int lright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
java.util.List l = (java.util.List)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new java.util.ArrayList(); RESULT.add(v); RESULT.addAll(l);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("variable_decleration_list",13, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 41: // variable_decleration_list ::= variable_decleration
{
java.util.List RESULT =null;
int vleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int vright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
VariableDeclaration v = (VariableDeclaration)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new java.util.ArrayList(); RESULT.add(v);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("variable_decleration_list",13, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 40: // expression_with_parenthesis ::= LPAREN expression RPAREN
{
ExpressionWithParenthesis RESULT =null;
int eleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).left;
int eright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).right;
Expression e = (Expression)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).value;
RESULT = new ExpressionWithParenthesis(e);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("expression_with_parenthesis",9, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 39: // expression ::= CONSTANT LPAREN argument_list_opt RPAREN
{
Expression RESULT =null;
int ileft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).left;
int iright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).right;
java.lang.String i = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).value;
int aleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).left;
int aright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).right;
ArgumentList a = (ArgumentList)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).value;
RESULT = new MethodInvocationExpression(i, a);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("expression",8, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 38: // expression ::= IDENTIFIER LPAREN argument_list_opt RPAREN
{
Expression RESULT =null;
int ileft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).left;
int iright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).right;
java.lang.String i = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).value;
int aleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).left;
int aright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).right;
ArgumentList a = (ArgumentList)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).value;
RESULT = new MethodInvocationExpression(i, a);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("expression",8, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 37: // expression ::= MINUS_OP expression
{
Expression RESULT =null;
int oleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).left;
int oright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).right;
java.lang.String o = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).value;
int eleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int eright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Expression e = (Expression)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new OperationExpression(e, o);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("expression",8, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 36: // expression ::= UNARY_OP expression
{
Expression RESULT =null;
int oleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).left;
int oright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).right;
java.lang.String o = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).value;
int eleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int eright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Expression e = (Expression)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new OperationExpression(e, o);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("expression",8, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 35: // expression ::= expression MINUS_OP empty_statements_opt expression
{
Expression RESULT =null;
int e1left = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).left;
int e1right = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).right;
Expression e1 = (Expression)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).value;
int oleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).left;
int oright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).right;
java.lang.String o = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).value;
int e2left = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int e2right = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Expression e2 = (Expression)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new OperationExpression(e1, e2, o);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("expression",8, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 34: // expression ::= expression BINARY_OP empty_statements_opt expression
{
Expression RESULT =null;
int e1left = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).left;
int e1right = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).right;
Expression e1 = (Expression)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).value;
int oleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).left;
int oright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).right;
java.lang.String o = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).value;
int e2left = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int e2right = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Expression e2 = (Expression)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new OperationExpression(e1, e2, o);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("expression",8, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 33: // expression ::= expression ARITHMETHIC_OP empty_statements_opt expression
{
Expression RESULT =null;
int e1left = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).left;
int e1right = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).right;
Expression e1 = (Expression)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).value;
int oleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).left;
int oright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).right;
java.lang.String o = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).value;
int e2left = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int e2right = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Expression e2 = (Expression)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new OperationExpression(e1, e2, o);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("expression",8, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 32: // expression ::= LPOUND STRING
{
Expression RESULT =null;
int sleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int sright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
java.lang.String s = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new FieldExpression(s.substring(1, s.length() - 1), false);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("expression",8, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 31: // expression ::= SPOUND STRING
{
Expression RESULT =null;
int pleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).left;
int pright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).right;
Object p = (Object)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).value;
int sleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int sright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
java.lang.String s = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new FieldExpression(s.substring(1, s.length() - 1), true);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("expression",8, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 30: // expression ::= IDENTIFIER
{
Expression RESULT =null;
int ileft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int iright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
java.lang.String i = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new LiteralExpression(i);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("expression",8, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 29: // expression ::= NUMBER
{
Expression RESULT =null;
int nleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int nright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
java.lang.Integer n = (java.lang.Integer)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new LiteralExpression(String.valueOf(n));
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("expression",8, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 28: // expression ::= STRING
{
Expression RESULT =null;
int sleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int sright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
java.lang.String s = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new LiteralExpression(s.replaceAll("\r?\n", ""));
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("expression",8, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 27: // expression ::= CONSTANT
{
Expression RESULT =null;
int cleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int cright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
java.lang.String c = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new ConstantExpression(c);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("expression",8, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 26: // expression ::= expression_with_parenthesis
{
Expression RESULT =null;
int eleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int eright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
ExpressionWithParenthesis e = (ExpressionWithParenthesis)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = e;
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("expression",8, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 25: // statement_with_empty_line_and_comment ::= empty_line_and_comment
{
Statement RESULT =null;
int sleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int sright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Statement s = (Statement)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = s;
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("statement_with_empty_line_and_comment",7, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 24: // statement_with_empty_line_and_comment ::= statement
{
Statement RESULT =null;
int sleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int sright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Statement s = (Statement)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = s;
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("statement_with_empty_line_and_comment",7, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 23: // empty_line_and_comment ::= COMMENT
{
Statement RESULT =null;
int cleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int cright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
java.lang.String c = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new CommentStatement(c);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("empty_line_and_comment",6, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 22: // empty_line_and_comment ::= EMPTY_LINE
{
Statement RESULT =null;
int eleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int eright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Object e = (Object)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new EmptyLineStatement();
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("empty_line_and_comment",6, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 21: // end_of_line_comment_opt ::= COMMENT
{
java.lang.String RESULT =null;
int cleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int cright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
java.lang.String c = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = c;
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("end_of_line_comment_opt",14, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 20: // end_of_line_comment_opt ::=
{
java.lang.String RESULT =null;
RESULT = null;
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("end_of_line_comment_opt",14, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 19: // statement ::= FUNCTION IDENTIFIER LPAREN RPAREN statements
{
Statement RESULT =null;
int ileft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).left;
int iright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).right;
java.lang.String i = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).value;
int ssleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int ssright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Statements ss = (Statements)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new FunctionStatement(i, ss);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("statement",5, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-4)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 18: // statement ::= WHILE LPAREN expression RPAREN statements
{
Statement RESULT =null;
int eleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).left;
int eright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).right;
Expression e = (Expression)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).value;
int ssleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int ssright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Statements ss = (Statements)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new WhileStatement(e, ss);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("statement",5, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-4)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 17: // statement ::= IF LPAREN expression RPAREN statements
{
Statement RESULT =null;
int eleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).left;
int eright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).right;
Expression e = (Expression)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).value;
int s1left = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int s1right = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Statements s1 = (Statements)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new IfThenElseStatement(e, s1, null);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("statement",5, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-4)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 16: // statement ::= IF LPAREN expression RPAREN statements ELSE statements
{
Statement RESULT =null;
int eleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-4)).left;
int eright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-4)).right;
Expression e = (Expression)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-4)).value;
int s1left = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).left;
int s1right = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).right;
Statements s1 = (Statements)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).value;
int s2left = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int s2right = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Statements s2 = (Statements)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new IfThenElseStatement(e, s1, s2);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("statement",5, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-6)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 15: // statement ::= IDENTIFIER LPAREN argument_list_opt RPAREN SEMICOLON end_of_line_comment_opt
{
Statement RESULT =null;
int ileft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-5)).left;
int iright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-5)).right;
java.lang.String i = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-5)).value;
int aleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).left;
int aright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).right;
ArgumentList a = (ArgumentList)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).value;
int oleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int oright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
java.lang.String o = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new MethodInvocationStatement(i, a, o);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("statement",5, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-5)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 14: // statement ::= RETURN expression SEMICOLON end_of_line_comment_opt
{
Statement RESULT =null;
int eleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).left;
int eright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).right;
Expression e = (Expression)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).value;
int oleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int oright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
java.lang.String o = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new ReturnStatement(e, o);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("statement",5, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 13: // statement ::= variable_decleration EQ expression SEMICOLON end_of_line_comment_opt
{
Statement RESULT =null;
int ileft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-4)).left;
int iright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-4)).right;
VariableDeclaration i = (VariableDeclaration)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-4)).value;
int eleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).left;
int eright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).right;
Expression e = (Expression)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).value;
int oleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int oright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
java.lang.String o = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new AssignmentStatement(i, e, o);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("statement",5, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-4)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 12: // statement ::= TYPE variable_decleration_list SEMICOLON end_of_line_comment_opt
{
Statement RESULT =null;
int tleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).left;
int tright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).right;
java.lang.String t = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)).value;
int lleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).left;
int lright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).right;
java.util.List l = (java.util.List)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).value;
int oleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int oright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
java.lang.String o = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new DeclarationStatement(t, l, o);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("statement",5, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 11: // statement ::= SEMICOLON end_of_line_comment_opt
{
Statement RESULT =null;
int oleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int oright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
java.lang.String o = (java.lang.String)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new MethodInvocationStatement(o);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("statement",5, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 10: // empty_statements_opt ::= empty_line_and_comment empty_statements_opt
{
Statements RESULT =null;
int sleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).left;
int sright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).right;
Statement s = (Statement)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).value;
int ssleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int ssright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Statements ss = (Statements)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new Statements(s, ss);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("empty_statements_opt",4, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 9: // empty_statements_opt ::=
{
Statements RESULT =null;
RESULT = null;
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("empty_statements_opt",4, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 8: // statements_with_braces ::= LBRACE statements_without_braces RBRACE empty_statements_opt
{
Statements RESULT =null;
int ssleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).left;
int ssright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).right;
Statements ss = (Statements)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).value;
int eleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int eright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Statements e = (Statements)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new Statements(null, ss, e);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("statements_with_braces",3, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-3)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 7: // statements_without_braces ::= statement_with_empty_line_and_comment
{
Statements RESULT =null;
int sleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int sright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Statement s = (Statement)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new Statements(s);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("statements_without_braces",2, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 6: // statements_without_braces ::= statements_with_braces statement_with_empty_line_and_comment
{
Statements RESULT =null;
int ssleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).left;
int ssright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).right;
Statements ss = (Statements)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).value;
int sleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int sright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Statement s = (Statement)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new Statements(ss, s);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("statements_without_braces",2, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 5: // statements_without_braces ::= statement_with_empty_line_and_comment statements_with_braces
{
Statements RESULT =null;
int sleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).left;
int sright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).right;
Statement s = (Statement)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).value;
int ssleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int ssright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Statements ss = (Statements)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new Statements(s, ss);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("statements_without_braces",2, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 4: // statements_without_braces ::= statement_with_empty_line_and_comment statements_without_braces
{
Statements RESULT =null;
int sleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).left;
int sright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).right;
Statement s = (Statement)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).value;
int ssleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int ssright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Statements ss = (Statements)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new Statements(s, ss);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("statements_without_braces",2, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 3: // statements ::= empty_statements_opt statement empty_statements_opt
{
Statements RESULT =null;
int o1left = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).left;
int o1right = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).right;
Statements o1 = (Statements)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).value;
int sleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).left;
int sright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).right;
Statement s = (Statement)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).value;
int o2left = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int o2right = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Statements o2 = (Statements)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new Statements(o1, s, o2);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("statements",1, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 2: // statements ::= empty_statements_opt statements_with_braces empty_statements_opt
{
Statements RESULT =null;
int o1left = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).left;
int o1right = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).right;
Statements o1 = (Statements)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)).value;
int ssleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).left;
int ssright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).right;
Statements ss = (Statements)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).value;
int o2left = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int o2right = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Statements o2 = (Statements)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new Statements(o1, ss, o2);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("statements",1, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-2)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 1: // parsed_tree ::= statements_without_braces
{
ParsedTree RESULT =null;
int sleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).left;
int sright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()).right;
Statements s = (Statements)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.peek()).value;
RESULT = new ParsedTree(s);
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("parsed_tree",0, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
return CUP$GeneditsParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 0: // $START ::= parsed_tree EOF
{
Object RESULT =null;
int start_valleft = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).left;
int start_valright = ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).right;
ParsedTree start_val = (ParsedTree)((java_cup.runtime.Symbol) CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)).value;
RESULT = start_val;
CUP$GeneditsParser$result = parser.getSymbolFactory().newSymbol("$START",0, ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.elementAt(CUP$GeneditsParser$top-1)), ((java_cup.runtime.Symbol)CUP$GeneditsParser$stack.peek()), RESULT);
}
/* ACCEPT */
CUP$GeneditsParser$parser.done_parsing();
return CUP$GeneditsParser$result;
/* . . . . . .*/
default:
throw new Exception(
"Invalid action number found in internal parse table");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy