diff --git a/README b/README index bf004cc..df449d9 100644 --- a/README +++ b/README @@ -64,14 +64,19 @@ operation appropriate to the test. Normally, control returns to the trigger method and execution continues by executing the target line. It is possible for a rule to alter the flow of control. A rule action -can invoke a builtin to 'kill' the current thread, by throwing a -runtime exception. This may not actually kill the thread if the -trigger method code or one of its callers catches a generic exception -but it can be used effectively. Another builtin can be used to signal -other waiting threads and cause them to 'abort'. Finally, a third -builtin allows the JVM to be halted. It is possible to call arbitrary -Java code inside rule actions so the opportunites for messing around -with control flow extend beyond these builtin options. +may employ the return builtin to force a return from the triggering +method at the point where the trigger call was made. If the triggering +method is is not void then the return expression must include an +argument whose type is compatible with the method return type. A rule +action can also invoke a builtin to 'kill' the current thread, by +throwing a runtime exception. This may not actually kill the thread if +the trigger method code or one of its callers catches a generic +exception but it can still be used effectively in many cases. Another +builtin can be used to signal other waiting threads and cause them to +'abort'. Finally, a third builtin allows the JVM to be halted. It is +possible to call arbitrary Java code inside rule actions so the +opportunites for messing around with control flow extend beyond these +builtin options. The target class may be specified with or without a full package qualification. If no package is specified then all classes whose diff --git a/dd/grammar/ECAGrammar.g b/dd/grammar/ECAGrammar.g index 49a56e0..27de5eb 100644 --- a/dd/grammar/ECAGrammar.g +++ b/dd/grammar/ECAGrammar.g @@ -93,7 +93,9 @@ action_expr_list | action_expr ; -action_expr : expr +action_expr : RETURN -> ^(RETURN) + | RETURN expr -> ^(RETURN expr) + | expr ; expr : simple_expr infix_oper expr -> ^(BINOP infix_oper simple_expr expr) diff --git a/dd/grammar/ECAToken.g b/dd/grammar/ECAToken.g index 6302a8b..83b74ed 100644 --- a/dd/grammar/ECAToken.g +++ b/dd/grammar/ECAToken.g @@ -76,6 +76,9 @@ TRUE : 'TRUE' | 'true' FALSE : 'FALSE'|'false' ; +RETURN : 'RETURN'|'return' + ; + // various bracket pairs LPAREN : '(' diff --git a/handler.txt b/handler.txt index 9cac412..ec0b9e9 100644 --- a/handler.txt +++ b/handler.txt @@ -159,7 +159,7 @@ IF recovered AND getCountDown(identifier) DO debug("!!!killing committed thread for " + identifier + "!!!"), - killThread() + return ENDRULE ####################################################################### diff --git a/src/TestScript.java b/src/TestScript.java index d5664b7..2e7e927 100644 --- a/src/TestScript.java +++ b/src/TestScript.java @@ -81,9 +81,9 @@ private void checkRules(List ruleScripts) ClassLoader loader = getClass().getClassLoader(); for (String script : ruleScripts) { + String ruleName = ""; try { String[] lines = script.split("\n"); - String ruleName; String targetClassName; String targetMethodName; int targetLine; @@ -205,13 +205,13 @@ private void checkRules(List ruleScripts) System.err.println("TestJar: multiple matching methods for rule " + ruleName); } } catch (ParseException e) { - System.err.println("TestScript: parse exception for rule " + script + " : " + e); + System.err.println("TestScript: parse exception for rule " + ruleName + " : " + e); e.printStackTrace(System.err); } catch (TypeException e) { - System.err.println("TestScript: type exception for rule " + script + " : " + e); + System.err.println("TestScript: type exception for rule " + ruleName + " : " + e); e.printStackTrace(System.err); } catch (CompileException e) { - System.err.println("TestScript: compile exception for rule " + " : " + script + e); + System.err.println("TestScript: compile exception for rule " + " : " + ruleName + e); e.printStackTrace(System.err); } } diff --git a/src/org/jboss/jbossts/orchestration/agent/RuleAdapter.java b/src/org/jboss/jbossts/orchestration/agent/RuleAdapter.java index 4d181b0..ac66f40 100644 --- a/src/org/jboss/jbossts/orchestration/agent/RuleAdapter.java +++ b/src/org/jboss/jbossts/orchestration/agent/RuleAdapter.java @@ -120,6 +120,21 @@ public void visitLineNumber(final int line, final Label start) { public void visitEnd() { Type exceptionType = Type.getType(TypeHelper.externalizeType("org.jboss.jbossts.orchestration.rule.exception.ExecuteException")); + Type earlyReturnExceptionType = Type.getType(TypeHelper.externalizeType("org.jboss.jbossts.orchestration.rule.exception.EarlyReturnException")); + Type returnType = Type.getReturnType(descriptor); + // add exception handling code subclass first + super.catchException(startLabel, endLabel, earlyReturnExceptionType); + if (returnType == Type.VOID_TYPE) { + // drop exception and just return + super.pop(); + super.visitInsn(Opcodes.RETURN); + } else { + // fetch value from exception, unbox if needed and return value + Method getReturnValueMethod = Method.getMethod("Object getReturnValue()"); + super.invokeVirtual(earlyReturnExceptionType, getReturnValueMethod); + super.unbox(returnType); + super.returnValue(); + } super.catchException(startLabel, endLabel, exceptionType); super.throwException(exceptionType, rule.getName() + " execution exception "); super.visitEnd(); diff --git a/src/org/jboss/jbossts/orchestration/rule/Rule.java b/src/org/jboss/jbossts/orchestration/rule/Rule.java index 89d53c7..b2538bd 100644 --- a/src/org/jboss/jbossts/orchestration/rule/Rule.java +++ b/src/org/jboss/jbossts/orchestration/rule/Rule.java @@ -368,20 +368,27 @@ private void installParameters(boolean isStatic, String className, String descri Binding binding = new Binding("0", type); parameterBindings.add(binding); } - List parameterTypenames = Type.parseDescriptor(descriptor, false); + List parameterTypenames = Type.parseDescriptor(descriptor, true); int paramIdx = 1; + int last = parameterTypenames.size(); if (parameterTypenames != null) { for (String typeName : parameterTypenames) { String[] typeAndArrayBounds = typeName.split("\\["); Type baseType = typeGroup.create(typeAndArrayBounds[0]); Type paramType = baseType; + Binding binding; if (baseType.isUndefined()) { throw new TypeException("Rule.installParameters : Rule " + name + " unable to load class " + baseType); } for (int i = 1; i < typeAndArrayBounds.length ; i++) { paramType = typeGroup.createArray(baseType); } - Binding binding = new Binding(Integer.toString(paramIdx++), paramType); + if (paramIdx == last) { + // we also add a special binding to allow us to identify the return type + binding = new Binding("$!", paramType); + } else { + binding = new Binding(Integer.toString(paramIdx++), paramType); + } parameterBindings.add(binding); } } @@ -801,12 +808,14 @@ public void execute(Bindings bindings, Object recipient, Object[] args) Type type = binding.getType(); if (binding.isHelper()) { bindingMap.put(name, this); + bindingTypeMap.put(name, type); } else if (binding.isRecipient()) { bindingMap.put(name, recipient); + bindingTypeMap.put(name, type); } else if (binding.isParam()) { bindingMap.put(name, args[binding.getIndex() - 1]); + bindingTypeMap.put(name, type); } - bindingTypeMap.put(name, type); } // now do the actual execution diff --git a/src/org/jboss/jbossts/orchestration/rule/binding/Binding.java b/src/org/jboss/jbossts/orchestration/rule/binding/Binding.java index 8611764..42eb7c4 100644 --- a/src/org/jboss/jbossts/orchestration/rule/binding/Binding.java +++ b/src/org/jboss/jbossts/orchestration/rule/binding/Binding.java @@ -32,8 +32,10 @@ public Binding(String name, Type type, Expression value) index = -1; } else if (name.matches("[0-9].*")) { index = Integer.valueOf(name); - } else { + } else if (name.equals("$!")) { index = -2; + } else { + index = -3; } } @@ -97,9 +99,14 @@ public boolean isParam() return index > 0; } + public boolean isReturn() + { + return index == -2; + } + public boolean isVar() { - return index < -1; + return index < -2; } public int getIndex() diff --git a/src/org/jboss/jbossts/orchestration/rule/exception/EarlyReturnException.java b/src/org/jboss/jbossts/orchestration/rule/exception/EarlyReturnException.java new file mode 100644 index 0000000..2d8554b --- /dev/null +++ b/src/org/jboss/jbossts/orchestration/rule/exception/EarlyReturnException.java @@ -0,0 +1,37 @@ +package org.jboss.jbossts.orchestration.rule.exception; + +/** + * Specialization of ExecuteException which is used to cause a trigger method to return + * early the trigger point, possibly supplying an object to be returned. This is used + * to implement the RETURN action + * + */ +public class EarlyReturnException extends ExecuteException +{ + public EarlyReturnException(String message) { + super(message); + this.returnValue = null; + } + + public EarlyReturnException(String message, Throwable th) { + super(message, th); + this.returnValue = null; + } + + public EarlyReturnException(String message, Object returnValue) { + super(message); + this.returnValue = returnValue; + } + + public EarlyReturnException(String message, Throwable th, Object returnValue) { + super(message, th); + this.returnValue = returnValue; + } + + public Object getReturnValue() + { + return returnValue; + } + + private Object returnValue; +} diff --git a/src/org/jboss/jbossts/orchestration/rule/expression/ExpressionHelper.java b/src/org/jboss/jbossts/orchestration/rule/expression/ExpressionHelper.java index 93157e2..864bc7c 100644 --- a/src/org/jboss/jbossts/orchestration/rule/expression/ExpressionHelper.java +++ b/src/org/jboss/jbossts/orchestration/rule/expression/ExpressionHelper.java @@ -37,6 +37,8 @@ public static Expression createExpression(Bindings bindings, CommonTree exprTree // (METH SYMBOL expr_list) // (NUMBER) // (STRING) + // (RETURN) + // (RETURN expr) // expr Token token = exprTree.getToken(); @@ -161,6 +163,18 @@ public static Expression createExpression(Bindings bindings, CommonTree exprTree expr = new StringLiteral(token); } break; + case RETURN: + { + Expression returnValue; + if (exprTree.getChildCount() > 0) { + CommonTree child0 = (CommonTree) exprTree.getChild(0); + returnValue = createExpression(bindings,child0); + } else { + returnValue = null; + } + expr = new ReturnExpression(token, returnValue); + } + break; case UNOP: { expr = createUnaryExpression(bindings, exprTree, type); diff --git a/src/org/jboss/jbossts/orchestration/rule/expression/ReturnExpression.java b/src/org/jboss/jbossts/orchestration/rule/expression/ReturnExpression.java new file mode 100644 index 0000000..dcb920c --- /dev/null +++ b/src/org/jboss/jbossts/orchestration/rule/expression/ReturnExpression.java @@ -0,0 +1,111 @@ +package org.jboss.jbossts.orchestration.rule.expression; + +import org.jboss.jbossts.orchestration.rule.binding.Bindings; +import org.jboss.jbossts.orchestration.rule.binding.Binding; +import org.jboss.jbossts.orchestration.rule.type.Type; +import org.jboss.jbossts.orchestration.rule.type.TypeGroup; +import org.jboss.jbossts.orchestration.rule.exception.TypeException; +import org.jboss.jbossts.orchestration.rule.exception.ExecuteException; +import org.jboss.jbossts.orchestration.rule.exception.EarlyReturnException; +import org.jboss.jbossts.orchestration.rule.Rule; +import org.antlr.runtime.Token; + +import java.io.StringWriter; + +/** + * A return expression which is used in a rule action to cause a return from the rule trigger + * method, supplying a return value where appropriate. + */ + +public class ReturnExpression extends Expression +{ + private Expression returnValue; + + public ReturnExpression(Token token, Expression returnValue) + { + // the trigger method may return any old tyep but the return expression can only occur + // at the top level in a rule action seuqence so it is actually a VOID expression + + super(Type.VOID, token); + + this.returnValue = returnValue; + } + /** + * verify that variables mentioned in this expression are actually available in the supplied + * bindings list and infer/validate the type of this expression or its subexpressions + * where possible + * + * @param bindings the set of bindings in place at the point of evaluation of this expression + * @return true if all variables in this expression are bound and no type mismatches have + * been detected during inference/validation. + */ + public boolean bind(Bindings bindings) { + if (returnValue != null) { + // ensure the return value expression has all its bindings + return returnValue.bind(bindings); + } + return true; + } + + /** + * ensure that all type references in the expression and its component expressions + * can be resolved, that the type of the expression is well-defined and that it is + * compatible with the type expected in the context in which it occurs. + * + * @param bindings the bound variable in scope at the point where the expression is + * to be evaluate + * @param typegroup the set of types employed by the rule + * @param expected the type expected for the expression in the contxt in which it occurs. this + * may be void but shoudl not be undefined at the point where type checking is performed. + * @return + * @throws org.jboss.jbossts.orchestration.rule.exception.TypeException + * + */ + public Type typeCheck(Bindings bindings, TypeGroup typegroup, Type expected) throws TypeException { + // we need to check the returnValue expression against the type of the trigger method + Binding returnBinding = bindings.lookup("$!"); + Type returnBindingType = (returnBinding != null ? returnBinding.getType() : Type.VOID); + if (returnValue == null && !returnBindingType.isVoid()) { + throw new TypeException("ReturnExpression.typeCheck : return expression must supply argument when triggered from method with return type " + returnBindingType.getName() + getPos()); + } else if (returnValue != null) { + if (returnBindingType.isVoid()) { + throw new TypeException("ReturnExpression.typeCheck : return expression must not supply argument when triggered from void method" + getPos()); + } + returnValue.typeCheck(bindings, typegroup, returnBindingType); + } + return type; + } + + /** + * evaluate the expression by interpreting the expression tree + * + * @param helper an execution context associated with the rule whcih contains a map of + * current bindings for rule variables and another map of their declared types both of which + * are indexed by varoable name. This includes entries for the helper (name "-1"), the + * recipient if the trigger method is not static (name "0") and the trigger method arguments + * (names "1", ...) + * @return the result of evaluation as an Object + * @throws org.jboss.jbossts.orchestration.rule.exception.ExecuteException + * + */ + public Object interpret(Rule.BasicHelper helper) throws ExecuteException + { + // time to take an early bath -- the code compield into the trigger method should + // catch this and return as appropriate + if (returnValue != null) { + Object value = returnValue.interpret(helper); + throw new EarlyReturnException("return from " + helper.getName(), value); + } else { + throw new EarlyReturnException("return from " + helper.getName()); + } + } + + public void writeTo(StringWriter stringWriter) { + if (returnValue != null) { + stringWriter.write("RETURN "); + returnValue.writeTo(stringWriter); + } else { + stringWriter.write("RETURN"); + } + } +} diff --git a/src/org/jboss/jbossts/orchestration/rule/grammar/ECAGrammarParser.java b/src/org/jboss/jbossts/orchestration/rule/grammar/ECAGrammarParser.java index 6a53ca9..cd04cc7 100644 --- a/src/org/jboss/jbossts/orchestration/rule/grammar/ECAGrammarParser.java +++ b/src/org/jboss/jbossts/orchestration/rule/grammar/ECAGrammarParser.java @@ -1,4 +1,4 @@ -// $ANTLR 3.0.1 dd/grammar/ECAGrammar.g 2008-09-22 16:26:20 +// $ANTLR 3.0.1 dd/grammar/ECAGrammar.g 2008-09-23 13:29:23 package org.jboss.jbossts.orchestration.rule.grammar; @@ -14,85 +14,86 @@ public class ECAGrammarParser extends Parser { public static final String[] tokenNames = new String[] { - "", "", "", "", "DIGIT", "POSDIGIT", "SIGN", "BAREINT", "INTEGER", "POINT", "EXPPART", "FLOAT", "NUMBER", "BIND", "IF", "DO", "RULE", "CLASS", "METHOD", "LINE", "ENDRULE", "NOTHING", "TRUE", "FALSE", "LPAREN", "RPAREN", "LSQUARE", "RSQUARE", "LBRACE", "RBRACE", "SEPR", "DOT", "ASSIGN", "OR", "AND", "NOT", "EQ", "NEQ", "GT", "LT", "GEQ", "LEQ", "BOR", "BAND", "BXOR", "TWIDDLE", "MUL", "DIV", "PLUS", "MINUS", "MOD", "TERN_IF", "COLON", "LETTER", "UNDERSCORE", "QUOTE", "DQUOTE", "SPACE", "NEWLINE", "PUNCT", "STRING", "BARESYM", "QUOTSYM", "DOTSYM", "SYMBOL", "DOLLAR", "DOLLARSYM", "WS", "Tokens", "UNOP", "BINOP", "TERNOP", "METH", "ARRAY", "NUM_LIT", "STRING_LIT" + "", "", "", "", "DIGIT", "POSDIGIT", "SIGN", "BAREINT", "INTEGER", "POINT", "EXPPART", "FLOAT", "NUMBER", "BIND", "IF", "DO", "RULE", "CLASS", "METHOD", "LINE", "ENDRULE", "NOTHING", "TRUE", "FALSE", "RETURN", "LPAREN", "RPAREN", "LSQUARE", "RSQUARE", "LBRACE", "RBRACE", "SEPR", "DOT", "ASSIGN", "OR", "AND", "NOT", "EQ", "NEQ", "GT", "LT", "GEQ", "LEQ", "BOR", "BAND", "BXOR", "TWIDDLE", "MUL", "DIV", "PLUS", "MINUS", "MOD", "TERN_IF", "COLON", "LETTER", "UNDERSCORE", "QUOTE", "DQUOTE", "SPACE", "NEWLINE", "PUNCT", "STRING", "BARESYM", "QUOTSYM", "DOTSYM", "SYMBOL", "DOLLAR", "DOLLARSYM", "WS", "Tokens", "UNOP", "BINOP", "TERNOP", "METH", "ARRAY", "NUM_LIT", "STRING_LIT" }; - public static final int MINUS=49; - public static final int ARRAY=73; + public static final int MINUS=50; + public static final int ARRAY=74; public static final int NUMBER=12; public static final int FALSE=23; public static final int METHOD=18; public static final int FLOAT=11; public static final int POSDIGIT=5; - public static final int LEQ=41; - public static final int TWIDDLE=45; + public static final int LEQ=42; + public static final int TWIDDLE=46; public static final int RULE=16; - public static final int MOD=50; - public static final int GEQ=40; - public static final int DQUOTE=56; - public static final int BOR=42; - public static final int OR=33; - public static final int STRING_LIT=75; + public static final int MOD=51; + public static final int GEQ=41; + public static final int DQUOTE=57; + public static final int BOR=43; + public static final int OR=34; + public static final int STRING_LIT=76; public static final int BAREINT=7; - public static final int LBRACE=28; - public static final int NEWLINE=58; - public static final int DOT=31; - public static final int RBRACE=29; + public static final int LBRACE=29; + public static final int NEWLINE=59; + public static final int DOT=32; + public static final int RBRACE=30; public static final int INTEGER=8; - public static final int AND=34; - public static final int NUM_LIT=74; - public static final int ASSIGN=32; - public static final int SYMBOL=64; - public static final int RPAREN=25; + public static final int AND=35; + public static final int NUM_LIT=75; + public static final int ASSIGN=33; + public static final int SYMBOL=65; + public static final int RPAREN=26; public static final int SIGN=6; - public static final int LPAREN=24; - public static final int METH=72; - public static final int PLUS=48; + public static final int LPAREN=25; + public static final int METH=73; + public static final int PLUS=49; public static final int DIGIT=4; public static final int LINE=19; - public static final int BINOP=70; - public static final int BAND=43; - public static final int NEQ=37; - public static final int TERNOP=71; - public static final int SPACE=57; - public static final int LETTER=53; - public static final int LSQUARE=26; + public static final int BINOP=71; + public static final int BAND=44; + public static final int NEQ=38; + public static final int TERNOP=72; + public static final int SPACE=58; + public static final int LETTER=54; + public static final int LSQUARE=27; public static final int DO=15; public static final int POINT=9; - public static final int BARESYM=61; + public static final int BARESYM=62; public static final int NOTHING=21; - public static final int SEPR=30; - public static final int WS=67; - public static final int EQ=36; - public static final int STRING=60; - public static final int QUOTSYM=62; - public static final int LT=39; - public static final int GT=38; - public static final int DOLLAR=65; - public static final int RSQUARE=27; - public static final int TERN_IF=51; - public static final int QUOTE=55; - public static final int UNOP=69; + public static final int SEPR=31; + public static final int WS=68; + public static final int EQ=37; + public static final int STRING=61; + public static final int QUOTSYM=63; + public static final int LT=40; + public static final int GT=39; + public static final int DOLLAR=66; + public static final int RSQUARE=28; + public static final int TERN_IF=52; + public static final int QUOTE=56; + public static final int UNOP=70; public static final int CLASS=17; - public static final int MUL=46; + public static final int MUL=47; public static final int EXPPART=10; - public static final int PUNCT=59; + public static final int PUNCT=60; + public static final int RETURN=24; public static final int IF=14; public static final int EOF=-1; - public static final int Tokens=68; - public static final int COLON=52; - public static final int DIV=47; - public static final int DOTSYM=63; - public static final int BXOR=44; + public static final int Tokens=69; + public static final int COLON=53; + public static final int DIV=48; + public static final int DOTSYM=64; + public static final int BXOR=45; public static final int ENDRULE=20; public static final int BIND=13; - public static final int NOT=35; + public static final int NOT=36; public static final int TRUE=22; - public static final int UNDERSCORE=54; - public static final int DOLLARSYM=66; + public static final int UNDERSCORE=55; + public static final int DOLLARSYM=67; public ECAGrammarParser(TokenStream input) { super(input); - ruleMemo = new HashMap[59+1]; + ruleMemo = new HashMap[61+1]; } protected TreeAdaptor adaptor = new CommonTreeAdaptor(); @@ -313,7 +314,7 @@ public final eca_script_rule_one_return eca_script_rule_one() throws Recognition // AST REWRITE - // elements: e, n, c, l, a, RULE, m, cl + // elements: n, cl, l, m, a, c, e, RULE // token labels: cl, m, n, l // rule labels: a, c, retval, e // token list labels: @@ -748,7 +749,7 @@ public final eca_return eca() throws RecognitionException { if ( backtracking==0 ) stream_action.add(a.getTree()); // AST REWRITE - // elements: c, e, a, BIND + // elements: BIND, a, c, e // token labels: // rule labels: a, c, retval, e // token list labels: @@ -920,7 +921,7 @@ else if ( (true) ) { if ( backtracking==0 ) stream_bindings.add(bindings24.getTree()); // AST REWRITE - // elements: binding, SEPR, bindings + // elements: binding, bindings, SEPR // token labels: // rule labels: retval // token list labels: @@ -1142,7 +1143,7 @@ else if ( (LA2_1==ASSIGN) ) { // AST REWRITE - // elements: t, COLON, v + // elements: COLON, t, v // token labels: t, v // rule labels: retval // token list labels: @@ -1393,7 +1394,7 @@ public final action_return action() throws RecognitionException { if ( (LA4_0==NOTHING) ) { alt4=1; } - else if ( (LA4_0==NUMBER||LA4_0==LPAREN||LA4_0==NOT||LA4_0==TWIDDLE||LA4_0==STRING||LA4_0==SYMBOL||LA4_0==DOLLARSYM) ) { + else if ( (LA4_0==NUMBER||(LA4_0>=RETURN && LA4_0<=LPAREN)||LA4_0==NOT||LA4_0==TWIDDLE||LA4_0==STRING||LA4_0==SYMBOL||LA4_0==DOLLARSYM) ) { alt4=2; } else { @@ -1500,7 +1501,7 @@ public final action_expr_list_return action_expr_list() throws RecognitionExcept // dd/grammar/ECAGrammar.g:92:2: ( action_expr SEPR action_expr_list -> ^( SEPR action_expr action_expr_list ) | action_expr ) int alt5=2; switch ( input.LA(1) ) { - case DOLLARSYM: + case RETURN: { int LA5_1 = input.LA(2); @@ -1519,7 +1520,7 @@ else if ( (true) ) { } } break; - case SYMBOL: + case DOLLARSYM: { int LA5_2 = input.LA(2); @@ -1538,7 +1539,7 @@ else if ( (true) ) { } } break; - case NUMBER: + case SYMBOL: { int LA5_3 = input.LA(2); @@ -1557,7 +1558,7 @@ else if ( (true) ) { } } break; - case STRING: + case NUMBER: { int LA5_4 = input.LA(2); @@ -1576,7 +1577,7 @@ else if ( (true) ) { } } break; - case LPAREN: + case STRING: { int LA5_5 = input.LA(2); @@ -1595,8 +1596,7 @@ else if ( (true) ) { } } break; - case NOT: - case TWIDDLE: + case LPAREN: { int LA5_6 = input.LA(2); @@ -1615,6 +1615,26 @@ else if ( (true) ) { } } break; + case NOT: + case TWIDDLE: + { + int LA5_7 = input.LA(2); + + if ( (synpred6()) ) { + alt5=1; + } + else if ( (true) ) { + alt5=2; + } + else { + if (backtracking>0) {failed=true; return retval;} + NoViableAltException nvae = + new NoViableAltException("91:1: action_expr_list : ( action_expr SEPR action_expr_list -> ^( SEPR action_expr action_expr_list ) | action_expr );", 5, 7, input); + + throw nvae; + } + } + break; default: if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = @@ -1643,7 +1663,7 @@ else if ( (true) ) { if ( backtracking==0 ) stream_action_expr_list.add(action_expr_list38.getTree()); // AST REWRITE - // elements: action_expr, action_expr_list, SEPR + // elements: SEPR, action_expr_list, action_expr // token labels: // rule labels: retval // token list labels: @@ -1710,31 +1730,149 @@ public static class action_expr_return extends ParserRuleReturnScope { }; // $ANTLR start action_expr - // dd/grammar/ECAGrammar.g:96:1: action_expr : expr ; + // dd/grammar/ECAGrammar.g:96:1: action_expr : ( RETURN -> ^( RETURN ) | RETURN expr -> ^( RETURN expr ) | expr ); public final action_expr_return action_expr() throws RecognitionException { action_expr_return retval = new action_expr_return(); retval.start = input.LT(1); Object root_0 = null; - expr_return expr40 = null; + Token RETURN40=null; + Token RETURN41=null; + expr_return expr42 = null; + expr_return expr43 = null; + Object RETURN40_tree=null; + Object RETURN41_tree=null; + RewriteRuleTokenStream stream_RETURN=new RewriteRuleTokenStream(adaptor,"token RETURN"); + RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr"); try { - // dd/grammar/ECAGrammar.g:96:13: ( expr ) - // dd/grammar/ECAGrammar.g:96:15: expr - { - root_0 = (Object)adaptor.nil(); + // dd/grammar/ECAGrammar.g:96:13: ( RETURN -> ^( RETURN ) | RETURN expr -> ^( RETURN expr ) | expr ) + int alt6=3; + int LA6_0 = input.LA(1); - pushFollow(FOLLOW_expr_in_action_expr516); - expr40=expr(); - _fsp--; - if (failed) return retval; - if ( backtracking==0 ) adaptor.addChild(root_0, expr40.getTree()); + if ( (LA6_0==RETURN) ) { + int LA6_1 = input.LA(2); + + if ( (LA6_1==NUMBER||LA6_1==LPAREN||LA6_1==NOT||LA6_1==TWIDDLE||LA6_1==STRING||LA6_1==SYMBOL||LA6_1==DOLLARSYM) ) { + alt6=2; + } + else if ( (LA6_1==EOF||LA6_1==ENDRULE||LA6_1==SEPR) ) { + alt6=1; + } + else { + if (backtracking>0) {failed=true; return retval;} + NoViableAltException nvae = + new NoViableAltException("96:1: action_expr : ( RETURN -> ^( RETURN ) | RETURN expr -> ^( RETURN expr ) | expr );", 6, 1, input); + throw nvae; + } } + else if ( (LA6_0==NUMBER||LA6_0==LPAREN||LA6_0==NOT||LA6_0==TWIDDLE||LA6_0==STRING||LA6_0==SYMBOL||LA6_0==DOLLARSYM) ) { + alt6=3; + } + else { + if (backtracking>0) {failed=true; return retval;} + NoViableAltException nvae = + new NoViableAltException("96:1: action_expr : ( RETURN -> ^( RETURN ) | RETURN expr -> ^( RETURN expr ) | expr );", 6, 0, input); + + throw nvae; + } + switch (alt6) { + case 1 : + // dd/grammar/ECAGrammar.g:96:15: RETURN + { + RETURN40=(Token)input.LT(1); + match(input,RETURN,FOLLOW_RETURN_in_action_expr516); if (failed) return retval; + if ( backtracking==0 ) stream_RETURN.add(RETURN40); + + + // AST REWRITE + // elements: RETURN + // token labels: + // rule labels: retval + // token list labels: + // rule list labels: + if ( backtracking==0 ) { + retval.tree = root_0; + RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null); + + root_0 = (Object)adaptor.nil(); + // 96:23: -> ^( RETURN ) + { + // dd/grammar/ECAGrammar.g:96:26: ^( RETURN ) + { + Object root_1 = (Object)adaptor.nil(); + root_1 = (Object)adaptor.becomeRoot(stream_RETURN.next(), root_1); + + adaptor.addChild(root_0, root_1); + } + + } + + } + + } + break; + case 2 : + // dd/grammar/ECAGrammar.g:97:4: RETURN expr + { + RETURN41=(Token)input.LT(1); + match(input,RETURN,FOLLOW_RETURN_in_action_expr528); if (failed) return retval; + if ( backtracking==0 ) stream_RETURN.add(RETURN41); + + pushFollow(FOLLOW_expr_in_action_expr530); + expr42=expr(); + _fsp--; + if (failed) return retval; + if ( backtracking==0 ) stream_expr.add(expr42.getTree()); + + // AST REWRITE + // elements: expr, RETURN + // token labels: + // rule labels: retval + // token list labels: + // rule list labels: + if ( backtracking==0 ) { + retval.tree = root_0; + RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null); + + root_0 = (Object)adaptor.nil(); + // 97:17: -> ^( RETURN expr ) + { + // dd/grammar/ECAGrammar.g:97:20: ^( RETURN expr ) + { + Object root_1 = (Object)adaptor.nil(); + root_1 = (Object)adaptor.becomeRoot(stream_RETURN.next(), root_1); + + adaptor.addChild(root_1, stream_expr.next()); + + adaptor.addChild(root_0, root_1); + } + + } + + } + + } + break; + case 3 : + // dd/grammar/ECAGrammar.g:98:4: expr + { + root_0 = (Object)adaptor.nil(); + + pushFollow(FOLLOW_expr_in_action_expr544); + expr43=expr(); + _fsp--; + if (failed) return retval; + if ( backtracking==0 ) adaptor.addChild(root_0, expr43.getTree()); + + } + break; + } retval.stop = input.LT(-1); if ( backtracking==0 ) { @@ -1758,36 +1896,36 @@ public static class expr_return extends ParserRuleReturnScope { }; // $ANTLR start expr - // dd/grammar/ECAGrammar.g:99:1: expr : ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) ); + // dd/grammar/ECAGrammar.g:101:1: expr : ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) ); public final expr_return expr() throws RecognitionException { expr_return retval = new expr_return(); retval.start = input.LT(1); Object root_0 = null; - Token TERN_IF47=null; - Token COLON48=null; + Token TERN_IF50=null; + Token COLON51=null; simple_expr_return cond = null; expr_return iftrue = null; expr_return iffalse = null; - simple_expr_return simple_expr41 = null; + simple_expr_return simple_expr44 = null; - infix_oper_return infix_oper42 = null; + infix_oper_return infix_oper45 = null; - expr_return expr43 = null; + expr_return expr46 = null; - simple_expr_return simple_expr44 = null; + simple_expr_return simple_expr47 = null; - unary_oper_return unary_oper45 = null; + unary_oper_return unary_oper48 = null; - expr_return expr46 = null; + expr_return expr49 = null; - Object TERN_IF47_tree=null; - Object COLON48_tree=null; + Object TERN_IF50_tree=null; + Object COLON51_tree=null; RewriteRuleTokenStream stream_COLON=new RewriteRuleTokenStream(adaptor,"token COLON"); RewriteRuleTokenStream stream_TERN_IF=new RewriteRuleTokenStream(adaptor,"token TERN_IF"); RewriteRuleSubtreeStream stream_unary_oper=new RewriteRuleSubtreeStream(adaptor,"rule unary_oper"); @@ -1795,12 +1933,29 @@ public final expr_return expr() throws RecognitionException { RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr"); RewriteRuleSubtreeStream stream_simple_expr=new RewriteRuleSubtreeStream(adaptor,"rule simple_expr"); try { - // dd/grammar/ECAGrammar.g:99:6: ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) ) - int alt6=4; + // dd/grammar/ECAGrammar.g:101:6: ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) ) + int alt7=4; switch ( input.LA(1) ) { case DOLLARSYM: { switch ( input.LA(2) ) { + case EOF: + case IF: + case DO: + case ENDRULE: + case RPAREN: + case RSQUARE: + case SEPR: + case COLON: + { + alt7=2; + } + break; + case TERN_IF: + { + alt7=4; + } + break; case OR: case AND: case EQ: @@ -1817,30 +1972,13 @@ public final expr_return expr() throws RecognitionException { case PLUS: case MINUS: { - alt6=1; - } - break; - case TERN_IF: - { - alt6=4; - } - break; - case EOF: - case IF: - case DO: - case ENDRULE: - case RPAREN: - case RSQUARE: - case SEPR: - case COLON: - { - alt6=2; + alt7=1; } break; default: if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("99:1: expr : ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) );", 6, 1, input); + new NoViableAltException("101:1: expr : ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) );", 7, 1, input); throw nvae; } @@ -1852,53 +1990,53 @@ public final expr_return expr() throws RecognitionException { switch ( input.LA(2) ) { case LPAREN: { - int LA6_10 = input.LA(3); + int LA7_10 = input.LA(3); - if ( (synpred7()) ) { - alt6=1; + if ( (synpred9()) ) { + alt7=1; } - else if ( (synpred8()) ) { - alt6=2; + else if ( (synpred10()) ) { + alt7=2; } else if ( (true) ) { - alt6=4; + alt7=4; } else { if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("99:1: expr : ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) );", 6, 10, input); + new NoViableAltException("101:1: expr : ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) );", 7, 10, input); throw nvae; } } break; - case TERN_IF: - { - alt6=4; - } - break; case LSQUARE: { - int LA6_11 = input.LA(3); + int LA7_11 = input.LA(3); - if ( (synpred7()) ) { - alt6=1; + if ( (synpred9()) ) { + alt7=1; } - else if ( (synpred8()) ) { - alt6=2; + else if ( (synpred10()) ) { + alt7=2; } else if ( (true) ) { - alt6=4; + alt7=4; } else { if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("99:1: expr : ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) );", 6, 11, input); + new NoViableAltException("101:1: expr : ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) );", 7, 11, input); throw nvae; } } break; + case TERN_IF: + { + alt7=4; + } + break; case EOF: case IF: case DO: @@ -1908,7 +2046,7 @@ else if ( (true) ) { case SEPR: case COLON: { - alt6=2; + alt7=2; } break; case OR: @@ -1927,13 +2065,13 @@ else if ( (true) ) { case PLUS: case MINUS: { - alt6=1; + alt7=1; } break; default: if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("99:1: expr : ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) );", 6, 2, input); + new NoViableAltException("101:1: expr : ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) );", 7, 2, input); throw nvae; } @@ -1959,12 +2097,7 @@ else if ( (true) ) { case PLUS: case MINUS: { - alt6=1; - } - break; - case TERN_IF: - { - alt6=4; + alt7=1; } break; case EOF: @@ -1976,13 +2109,18 @@ else if ( (true) ) { case SEPR: case COLON: { - alt6=2; + alt7=2; + } + break; + case TERN_IF: + { + alt7=4; } break; default: if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("99:1: expr : ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) );", 6, 3, input); + new NoViableAltException("101:1: expr : ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) );", 7, 3, input); throw nvae; } @@ -2001,12 +2139,7 @@ else if ( (true) ) { case SEPR: case COLON: { - alt6=2; - } - break; - case TERN_IF: - { - alt6=4; + alt7=2; } break; case OR: @@ -2025,13 +2158,18 @@ else if ( (true) ) { case PLUS: case MINUS: { - alt6=1; + alt7=1; + } + break; + case TERN_IF: + { + alt7=4; } break; default: if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("99:1: expr : ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) );", 6, 4, input); + new NoViableAltException("101:1: expr : ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) );", 7, 4, input); throw nvae; } @@ -2040,21 +2178,21 @@ else if ( (true) ) { break; case LPAREN: { - int LA6_5 = input.LA(2); + int LA7_5 = input.LA(2); - if ( (synpred7()) ) { - alt6=1; + if ( (synpred9()) ) { + alt7=1; } - else if ( (synpred8()) ) { - alt6=2; + else if ( (synpred10()) ) { + alt7=2; } else if ( (true) ) { - alt6=4; + alt7=4; } else { if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("99:1: expr : ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) );", 6, 5, input); + new NoViableAltException("101:1: expr : ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) );", 7, 5, input); throw nvae; } @@ -2063,39 +2201,39 @@ else if ( (true) ) { case NOT: case TWIDDLE: { - alt6=3; + alt7=3; } break; default: if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("99:1: expr : ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) );", 6, 0, input); + new NoViableAltException("101:1: expr : ( simple_expr infix_oper expr -> ^( BINOP infix_oper simple_expr expr ) | simple_expr | unary_oper expr -> ^( UNOP unary_oper expr ) | cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr -> ^( TERNOP $cond $iftrue $iffalse) );", 7, 0, input); throw nvae; } - switch (alt6) { + switch (alt7) { case 1 : - // dd/grammar/ECAGrammar.g:99:8: simple_expr infix_oper expr + // dd/grammar/ECAGrammar.g:101:8: simple_expr infix_oper expr { - pushFollow(FOLLOW_simple_expr_in_expr526); - simple_expr41=simple_expr(); + pushFollow(FOLLOW_simple_expr_in_expr554); + simple_expr44=simple_expr(); _fsp--; if (failed) return retval; - if ( backtracking==0 ) stream_simple_expr.add(simple_expr41.getTree()); - pushFollow(FOLLOW_infix_oper_in_expr528); - infix_oper42=infix_oper(); + if ( backtracking==0 ) stream_simple_expr.add(simple_expr44.getTree()); + pushFollow(FOLLOW_infix_oper_in_expr556); + infix_oper45=infix_oper(); _fsp--; if (failed) return retval; - if ( backtracking==0 ) stream_infix_oper.add(infix_oper42.getTree()); - pushFollow(FOLLOW_expr_in_expr530); - expr43=expr(); + if ( backtracking==0 ) stream_infix_oper.add(infix_oper45.getTree()); + pushFollow(FOLLOW_expr_in_expr558); + expr46=expr(); _fsp--; if (failed) return retval; - if ( backtracking==0 ) stream_expr.add(expr43.getTree()); + if ( backtracking==0 ) stream_expr.add(expr46.getTree()); // AST REWRITE - // elements: infix_oper, expr, simple_expr + // elements: simple_expr, expr, infix_oper // token labels: // rule labels: retval // token list labels: @@ -2105,9 +2243,9 @@ else if ( (true) ) { RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null); root_0 = (Object)adaptor.nil(); - // 99:37: -> ^( BINOP infix_oper simple_expr expr ) + // 101:37: -> ^( BINOP infix_oper simple_expr expr ) { - // dd/grammar/ECAGrammar.g:99:40: ^( BINOP infix_oper simple_expr expr ) + // dd/grammar/ECAGrammar.g:101:40: ^( BINOP infix_oper simple_expr expr ) { Object root_1 = (Object)adaptor.nil(); root_1 = (Object)adaptor.becomeRoot(adaptor.create(BINOP, "BINOP"), root_1); @@ -2126,31 +2264,31 @@ else if ( (true) ) { } break; case 2 : - // dd/grammar/ECAGrammar.g:100:4: simple_expr + // dd/grammar/ECAGrammar.g:102:4: simple_expr { root_0 = (Object)adaptor.nil(); - pushFollow(FOLLOW_simple_expr_in_expr548); - simple_expr44=simple_expr(); + pushFollow(FOLLOW_simple_expr_in_expr576); + simple_expr47=simple_expr(); _fsp--; if (failed) return retval; - if ( backtracking==0 ) adaptor.addChild(root_0, simple_expr44.getTree()); + if ( backtracking==0 ) adaptor.addChild(root_0, simple_expr47.getTree()); } break; case 3 : - // dd/grammar/ECAGrammar.g:101:4: unary_oper expr + // dd/grammar/ECAGrammar.g:103:4: unary_oper expr { - pushFollow(FOLLOW_unary_oper_in_expr553); - unary_oper45=unary_oper(); + pushFollow(FOLLOW_unary_oper_in_expr581); + unary_oper48=unary_oper(); _fsp--; if (failed) return retval; - if ( backtracking==0 ) stream_unary_oper.add(unary_oper45.getTree()); - pushFollow(FOLLOW_expr_in_expr555); - expr46=expr(); + if ( backtracking==0 ) stream_unary_oper.add(unary_oper48.getTree()); + pushFollow(FOLLOW_expr_in_expr583); + expr49=expr(); _fsp--; if (failed) return retval; - if ( backtracking==0 ) stream_expr.add(expr46.getTree()); + if ( backtracking==0 ) stream_expr.add(expr49.getTree()); // AST REWRITE // elements: expr, unary_oper @@ -2163,9 +2301,9 @@ else if ( (true) ) { RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null); root_0 = (Object)adaptor.nil(); - // 101:22: -> ^( UNOP unary_oper expr ) + // 103:22: -> ^( UNOP unary_oper expr ) { - // dd/grammar/ECAGrammar.g:101:25: ^( UNOP unary_oper expr ) + // dd/grammar/ECAGrammar.g:103:25: ^( UNOP unary_oper expr ) { Object root_1 = (Object)adaptor.nil(); root_1 = (Object)adaptor.becomeRoot(adaptor.create(UNOP, "UNOP"), root_1); @@ -2183,34 +2321,34 @@ else if ( (true) ) { } break; case 4 : - // dd/grammar/ECAGrammar.g:102:4: cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr + // dd/grammar/ECAGrammar.g:104:4: cond= simple_expr TERN_IF iftrue= expr COLON iffalse= expr { - pushFollow(FOLLOW_simple_expr_in_expr574); + pushFollow(FOLLOW_simple_expr_in_expr602); cond=simple_expr(); _fsp--; if (failed) return retval; if ( backtracking==0 ) stream_simple_expr.add(cond.getTree()); - TERN_IF47=(Token)input.LT(1); - match(input,TERN_IF,FOLLOW_TERN_IF_in_expr576); if (failed) return retval; - if ( backtracking==0 ) stream_TERN_IF.add(TERN_IF47); + TERN_IF50=(Token)input.LT(1); + match(input,TERN_IF,FOLLOW_TERN_IF_in_expr604); if (failed) return retval; + if ( backtracking==0 ) stream_TERN_IF.add(TERN_IF50); - pushFollow(FOLLOW_expr_in_expr580); + pushFollow(FOLLOW_expr_in_expr608); iftrue=expr(); _fsp--; if (failed) return retval; if ( backtracking==0 ) stream_expr.add(iftrue.getTree()); - COLON48=(Token)input.LT(1); - match(input,COLON,FOLLOW_COLON_in_expr582); if (failed) return retval; - if ( backtracking==0 ) stream_COLON.add(COLON48); + COLON51=(Token)input.LT(1); + match(input,COLON,FOLLOW_COLON_in_expr610); if (failed) return retval; + if ( backtracking==0 ) stream_COLON.add(COLON51); - pushFollow(FOLLOW_expr_in_expr586); + pushFollow(FOLLOW_expr_in_expr614); iffalse=expr(); _fsp--; if (failed) return retval; if ( backtracking==0 ) stream_expr.add(iffalse.getTree()); // AST REWRITE - // elements: iftrue, cond, iffalse + // elements: cond, iffalse, iftrue // token labels: // rule labels: iftrue, iffalse, cond, retval // token list labels: @@ -2223,9 +2361,9 @@ else if ( (true) ) { RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null); root_0 = (Object)adaptor.nil(); - // 102:60: -> ^( TERNOP $cond $iftrue $iffalse) + // 104:60: -> ^( TERNOP $cond $iftrue $iffalse) { - // dd/grammar/ECAGrammar.g:102:63: ^( TERNOP $cond $iftrue $iffalse) + // dd/grammar/ECAGrammar.g:104:63: ^( TERNOP $cond $iftrue $iffalse) { Object root_1 = (Object)adaptor.nil(); root_1 = (Object)adaptor.becomeRoot(adaptor.create(TERNOP, "TERNOP"), root_1); @@ -2268,7 +2406,7 @@ public static class simple_expr_return extends ParserRuleReturnScope { }; // $ANTLR start simple_expr - // dd/grammar/ECAGrammar.g:105:1: simple_expr : (v= DOLLARSYM | v= SYMBOL idx= array_idx -> ^( ARRAY $v $idx) | v= SYMBOL LPAREN RPAREN -> ^( METH $v) | v= SYMBOL | v= SYMBOL LPAREN args= expr_list RPAREN -> ^( METH $v $args) | NUMBER | STRING | LPAREN expr RPAREN -> ^( expr ) ); + // dd/grammar/ECAGrammar.g:107:1: simple_expr : (v= DOLLARSYM | v= SYMBOL idx= array_idx -> ^( ARRAY $v $idx) | v= SYMBOL LPAREN RPAREN -> ^( METH $v) | v= SYMBOL | v= SYMBOL LPAREN args= expr_list RPAREN -> ^( METH $v $args) | NUMBER | STRING | LPAREN expr RPAREN -> ^( expr ) ); public final simple_expr_return simple_expr() throws RecognitionException { simple_expr_return retval = new simple_expr_return(); retval.start = input.LT(1); @@ -2276,30 +2414,30 @@ public final simple_expr_return simple_expr() throws RecognitionException { Object root_0 = null; Token v=null; - Token LPAREN49=null; - Token RPAREN50=null; - Token LPAREN51=null; - Token RPAREN52=null; - Token NUMBER53=null; - Token STRING54=null; - Token LPAREN55=null; - Token RPAREN57=null; + Token LPAREN52=null; + Token RPAREN53=null; + Token LPAREN54=null; + Token RPAREN55=null; + Token NUMBER56=null; + Token STRING57=null; + Token LPAREN58=null; + Token RPAREN60=null; array_idx_return idx = null; expr_list_return args = null; - expr_return expr56 = null; + expr_return expr59 = null; Object v_tree=null; - Object LPAREN49_tree=null; - Object RPAREN50_tree=null; - Object LPAREN51_tree=null; - Object RPAREN52_tree=null; - Object NUMBER53_tree=null; - Object STRING54_tree=null; - Object LPAREN55_tree=null; - Object RPAREN57_tree=null; + Object LPAREN52_tree=null; + Object RPAREN53_tree=null; + Object LPAREN54_tree=null; + Object RPAREN55_tree=null; + Object NUMBER56_tree=null; + Object STRING57_tree=null; + Object LPAREN58_tree=null; + Object RPAREN60_tree=null; RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN"); RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN"); RewriteRuleTokenStream stream_SYMBOL=new RewriteRuleTokenStream(adaptor,"token SYMBOL"); @@ -2307,12 +2445,12 @@ public final simple_expr_return simple_expr() throws RecognitionException { RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr"); RewriteRuleSubtreeStream stream_array_idx=new RewriteRuleSubtreeStream(adaptor,"rule array_idx"); try { - // dd/grammar/ECAGrammar.g:105:13: (v= DOLLARSYM | v= SYMBOL idx= array_idx -> ^( ARRAY $v $idx) | v= SYMBOL LPAREN RPAREN -> ^( METH $v) | v= SYMBOL | v= SYMBOL LPAREN args= expr_list RPAREN -> ^( METH $v $args) | NUMBER | STRING | LPAREN expr RPAREN -> ^( expr ) ) - int alt7=8; + // dd/grammar/ECAGrammar.g:107:13: (v= DOLLARSYM | v= SYMBOL idx= array_idx -> ^( ARRAY $v $idx) | v= SYMBOL LPAREN RPAREN -> ^( METH $v) | v= SYMBOL | v= SYMBOL LPAREN args= expr_list RPAREN -> ^( METH $v $args) | NUMBER | STRING | LPAREN expr RPAREN -> ^( expr ) ) + int alt8=8; switch ( input.LA(1) ) { case DOLLARSYM: { - alt7=1; + alt8=1; } break; case SYMBOL: @@ -2320,28 +2458,23 @@ public final simple_expr_return simple_expr() throws RecognitionException { switch ( input.LA(2) ) { case LPAREN: { - int LA7_6 = input.LA(3); + int LA8_6 = input.LA(3); - if ( (LA7_6==RPAREN) ) { - alt7=3; + if ( (LA8_6==RPAREN) ) { + alt8=3; } - else if ( (LA7_6==NUMBER||LA7_6==LPAREN||LA7_6==NOT||LA7_6==TWIDDLE||LA7_6==STRING||LA7_6==SYMBOL||LA7_6==DOLLARSYM) ) { - alt7=5; + else if ( (LA8_6==NUMBER||LA8_6==LPAREN||LA8_6==NOT||LA8_6==TWIDDLE||LA8_6==STRING||LA8_6==SYMBOL||LA8_6==DOLLARSYM) ) { + alt8=5; } else { if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("105:1: simple_expr : (v= DOLLARSYM | v= SYMBOL idx= array_idx -> ^( ARRAY $v $idx) | v= SYMBOL LPAREN RPAREN -> ^( METH $v) | v= SYMBOL | v= SYMBOL LPAREN args= expr_list RPAREN -> ^( METH $v $args) | NUMBER | STRING | LPAREN expr RPAREN -> ^( expr ) );", 7, 6, input); + new NoViableAltException("107:1: simple_expr : (v= DOLLARSYM | v= SYMBOL idx= array_idx -> ^( ARRAY $v $idx) | v= SYMBOL LPAREN RPAREN -> ^( METH $v) | v= SYMBOL | v= SYMBOL LPAREN args= expr_list RPAREN -> ^( METH $v $args) | NUMBER | STRING | LPAREN expr RPAREN -> ^( expr ) );", 8, 6, input); throw nvae; } } break; - case LSQUARE: - { - alt7=2; - } - break; case EOF: case IF: case DO: @@ -2367,13 +2500,18 @@ else if ( (LA7_6==NUMBER||LA7_6==LPAREN||LA7_6==NOT||LA7_6==TWIDDLE||LA7_6==STRI case TERN_IF: case COLON: { - alt7=4; + alt8=4; + } + break; + case LSQUARE: + { + alt8=2; } break; default: if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("105:1: simple_expr : (v= DOLLARSYM | v= SYMBOL idx= array_idx -> ^( ARRAY $v $idx) | v= SYMBOL LPAREN RPAREN -> ^( METH $v) | v= SYMBOL | v= SYMBOL LPAREN args= expr_list RPAREN -> ^( METH $v $args) | NUMBER | STRING | LPAREN expr RPAREN -> ^( expr ) );", 7, 2, input); + new NoViableAltException("107:1: simple_expr : (v= DOLLARSYM | v= SYMBOL idx= array_idx -> ^( ARRAY $v $idx) | v= SYMBOL LPAREN RPAREN -> ^( METH $v) | v= SYMBOL | v= SYMBOL LPAREN args= expr_list RPAREN -> ^( METH $v $args) | NUMBER | STRING | LPAREN expr RPAREN -> ^( expr ) );", 8, 2, input); throw nvae; } @@ -2382,35 +2520,35 @@ else if ( (LA7_6==NUMBER||LA7_6==LPAREN||LA7_6==NOT||LA7_6==TWIDDLE||LA7_6==STRI break; case NUMBER: { - alt7=6; + alt8=6; } break; case STRING: { - alt7=7; + alt8=7; } break; case LPAREN: { - alt7=8; + alt8=8; } break; default: if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("105:1: simple_expr : (v= DOLLARSYM | v= SYMBOL idx= array_idx -> ^( ARRAY $v $idx) | v= SYMBOL LPAREN RPAREN -> ^( METH $v) | v= SYMBOL | v= SYMBOL LPAREN args= expr_list RPAREN -> ^( METH $v $args) | NUMBER | STRING | LPAREN expr RPAREN -> ^( expr ) );", 7, 0, input); + new NoViableAltException("107:1: simple_expr : (v= DOLLARSYM | v= SYMBOL idx= array_idx -> ^( ARRAY $v $idx) | v= SYMBOL LPAREN RPAREN -> ^( METH $v) | v= SYMBOL | v= SYMBOL LPAREN args= expr_list RPAREN -> ^( METH $v $args) | NUMBER | STRING | LPAREN expr RPAREN -> ^( expr ) );", 8, 0, input); throw nvae; } - switch (alt7) { + switch (alt8) { case 1 : - // dd/grammar/ECAGrammar.g:105:15: v= DOLLARSYM + // dd/grammar/ECAGrammar.g:107:15: v= DOLLARSYM { root_0 = (Object)adaptor.nil(); v=(Token)input.LT(1); - match(input,DOLLARSYM,FOLLOW_DOLLARSYM_in_simple_expr613); if (failed) return retval; + match(input,DOLLARSYM,FOLLOW_DOLLARSYM_in_simple_expr641); if (failed) return retval; if ( backtracking==0 ) { v_tree = (Object)adaptor.create(v); adaptor.addChild(root_0, v_tree); @@ -2419,13 +2557,13 @@ else if ( (LA7_6==NUMBER||LA7_6==LPAREN||LA7_6==NOT||LA7_6==TWIDDLE||LA7_6==STRI } break; case 2 : - // dd/grammar/ECAGrammar.g:106:4: v= SYMBOL idx= array_idx + // dd/grammar/ECAGrammar.g:108:4: v= SYMBOL idx= array_idx { v=(Token)input.LT(1); - match(input,SYMBOL,FOLLOW_SYMBOL_in_simple_expr620); if (failed) return retval; + match(input,SYMBOL,FOLLOW_SYMBOL_in_simple_expr648); if (failed) return retval; if ( backtracking==0 ) stream_SYMBOL.add(v); - pushFollow(FOLLOW_array_idx_in_simple_expr624); + pushFollow(FOLLOW_array_idx_in_simple_expr652); idx=array_idx(); _fsp--; if (failed) return retval; @@ -2444,9 +2582,9 @@ else if ( (LA7_6==NUMBER||LA7_6==LPAREN||LA7_6==NOT||LA7_6==TWIDDLE||LA7_6==STRI RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null); root_0 = (Object)adaptor.nil(); - // 106:29: -> ^( ARRAY $v $idx) + // 108:29: -> ^( ARRAY $v $idx) { - // dd/grammar/ECAGrammar.g:106:32: ^( ARRAY $v $idx) + // dd/grammar/ECAGrammar.g:108:32: ^( ARRAY $v $idx) { Object root_1 = (Object)adaptor.nil(); root_1 = (Object)adaptor.becomeRoot(adaptor.create(ARRAY, "ARRAY"), root_1); @@ -2464,19 +2602,19 @@ else if ( (LA7_6==NUMBER||LA7_6==LPAREN||LA7_6==NOT||LA7_6==TWIDDLE||LA7_6==STRI } break; case 3 : - // dd/grammar/ECAGrammar.g:107:4: v= SYMBOL LPAREN RPAREN + // dd/grammar/ECAGrammar.g:109:4: v= SYMBOL LPAREN RPAREN { v=(Token)input.LT(1); - match(input,SYMBOL,FOLLOW_SYMBOL_in_simple_expr645); if (failed) return retval; + match(input,SYMBOL,FOLLOW_SYMBOL_in_simple_expr673); if (failed) return retval; if ( backtracking==0 ) stream_SYMBOL.add(v); - LPAREN49=(Token)input.LT(1); - match(input,LPAREN,FOLLOW_LPAREN_in_simple_expr647); if (failed) return retval; - if ( backtracking==0 ) stream_LPAREN.add(LPAREN49); + LPAREN52=(Token)input.LT(1); + match(input,LPAREN,FOLLOW_LPAREN_in_simple_expr675); if (failed) return retval; + if ( backtracking==0 ) stream_LPAREN.add(LPAREN52); - RPAREN50=(Token)input.LT(1); - match(input,RPAREN,FOLLOW_RPAREN_in_simple_expr649); if (failed) return retval; - if ( backtracking==0 ) stream_RPAREN.add(RPAREN50); + RPAREN53=(Token)input.LT(1); + match(input,RPAREN,FOLLOW_RPAREN_in_simple_expr677); if (failed) return retval; + if ( backtracking==0 ) stream_RPAREN.add(RPAREN53); // AST REWRITE @@ -2491,9 +2629,9 @@ else if ( (LA7_6==NUMBER||LA7_6==LPAREN||LA7_6==NOT||LA7_6==TWIDDLE||LA7_6==STRI RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null); root_0 = (Object)adaptor.nil(); - // 107:29: -> ^( METH $v) + // 109:29: -> ^( METH $v) { - // dd/grammar/ECAGrammar.g:107:32: ^( METH $v) + // dd/grammar/ECAGrammar.g:109:32: ^( METH $v) { Object root_1 = (Object)adaptor.nil(); root_1 = (Object)adaptor.becomeRoot(adaptor.create(METH, "METH"), root_1); @@ -2510,12 +2648,12 @@ else if ( (LA7_6==NUMBER||LA7_6==LPAREN||LA7_6==NOT||LA7_6==TWIDDLE||LA7_6==STRI } break; case 4 : - // dd/grammar/ECAGrammar.g:108:4: v= SYMBOL + // dd/grammar/ECAGrammar.g:110:4: v= SYMBOL { root_0 = (Object)adaptor.nil(); v=(Token)input.LT(1); - match(input,SYMBOL,FOLLOW_SYMBOL_in_simple_expr667); if (failed) return retval; + match(input,SYMBOL,FOLLOW_SYMBOL_in_simple_expr695); if (failed) return retval; if ( backtracking==0 ) { v_tree = (Object)adaptor.create(v); adaptor.addChild(root_0, v_tree); @@ -2524,28 +2662,28 @@ else if ( (LA7_6==NUMBER||LA7_6==LPAREN||LA7_6==NOT||LA7_6==TWIDDLE||LA7_6==STRI } break; case 5 : - // dd/grammar/ECAGrammar.g:109:4: v= SYMBOL LPAREN args= expr_list RPAREN + // dd/grammar/ECAGrammar.g:111:4: v= SYMBOL LPAREN args= expr_list RPAREN { v=(Token)input.LT(1); - match(input,SYMBOL,FOLLOW_SYMBOL_in_simple_expr674); if (failed) return retval; + match(input,SYMBOL,FOLLOW_SYMBOL_in_simple_expr702); if (failed) return retval; if ( backtracking==0 ) stream_SYMBOL.add(v); - LPAREN51=(Token)input.LT(1); - match(input,LPAREN,FOLLOW_LPAREN_in_simple_expr676); if (failed) return retval; - if ( backtracking==0 ) stream_LPAREN.add(LPAREN51); + LPAREN54=(Token)input.LT(1); + match(input,LPAREN,FOLLOW_LPAREN_in_simple_expr704); if (failed) return retval; + if ( backtracking==0 ) stream_LPAREN.add(LPAREN54); - pushFollow(FOLLOW_expr_list_in_simple_expr680); + pushFollow(FOLLOW_expr_list_in_simple_expr708); args=expr_list(); _fsp--; if (failed) return retval; if ( backtracking==0 ) stream_expr_list.add(args.getTree()); - RPAREN52=(Token)input.LT(1); - match(input,RPAREN,FOLLOW_RPAREN_in_simple_expr682); if (failed) return retval; - if ( backtracking==0 ) stream_RPAREN.add(RPAREN52); + RPAREN55=(Token)input.LT(1); + match(input,RPAREN,FOLLOW_RPAREN_in_simple_expr710); if (failed) return retval; + if ( backtracking==0 ) stream_RPAREN.add(RPAREN55); // AST REWRITE - // elements: v, args + // elements: args, v // token labels: v // rule labels: args, retval // token list labels: @@ -2557,9 +2695,9 @@ else if ( (LA7_6==NUMBER||LA7_6==LPAREN||LA7_6==NOT||LA7_6==TWIDDLE||LA7_6==STRI RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null); root_0 = (Object)adaptor.nil(); - // 109:43: -> ^( METH $v $args) + // 111:43: -> ^( METH $v $args) { - // dd/grammar/ECAGrammar.g:109:46: ^( METH $v $args) + // dd/grammar/ECAGrammar.g:111:46: ^( METH $v $args) { Object root_1 = (Object)adaptor.nil(); root_1 = (Object)adaptor.becomeRoot(adaptor.create(METH, "METH"), root_1); @@ -2577,48 +2715,48 @@ else if ( (LA7_6==NUMBER||LA7_6==LPAREN||LA7_6==NOT||LA7_6==TWIDDLE||LA7_6==STRI } break; case 6 : - // dd/grammar/ECAGrammar.g:110:4: NUMBER + // dd/grammar/ECAGrammar.g:112:4: NUMBER { root_0 = (Object)adaptor.nil(); - NUMBER53=(Token)input.LT(1); - match(input,NUMBER,FOLLOW_NUMBER_in_simple_expr701); if (failed) return retval; + NUMBER56=(Token)input.LT(1); + match(input,NUMBER,FOLLOW_NUMBER_in_simple_expr729); if (failed) return retval; if ( backtracking==0 ) { - NUMBER53_tree = (Object)adaptor.create(NUMBER53); - adaptor.addChild(root_0, NUMBER53_tree); + NUMBER56_tree = (Object)adaptor.create(NUMBER56); + adaptor.addChild(root_0, NUMBER56_tree); } } break; case 7 : - // dd/grammar/ECAGrammar.g:111:4: STRING + // dd/grammar/ECAGrammar.g:113:4: STRING { root_0 = (Object)adaptor.nil(); - STRING54=(Token)input.LT(1); - match(input,STRING,FOLLOW_STRING_in_simple_expr706); if (failed) return retval; + STRING57=(Token)input.LT(1); + match(input,STRING,FOLLOW_STRING_in_simple_expr734); if (failed) return retval; if ( backtracking==0 ) { - STRING54_tree = (Object)adaptor.create(STRING54); - adaptor.addChild(root_0, STRING54_tree); + STRING57_tree = (Object)adaptor.create(STRING57); + adaptor.addChild(root_0, STRING57_tree); } } break; case 8 : - // dd/grammar/ECAGrammar.g:112:4: LPAREN expr RPAREN + // dd/grammar/ECAGrammar.g:114:4: LPAREN expr RPAREN { - LPAREN55=(Token)input.LT(1); - match(input,LPAREN,FOLLOW_LPAREN_in_simple_expr711); if (failed) return retval; - if ( backtracking==0 ) stream_LPAREN.add(LPAREN55); + LPAREN58=(Token)input.LT(1); + match(input,LPAREN,FOLLOW_LPAREN_in_simple_expr739); if (failed) return retval; + if ( backtracking==0 ) stream_LPAREN.add(LPAREN58); - pushFollow(FOLLOW_expr_in_simple_expr713); - expr56=expr(); + pushFollow(FOLLOW_expr_in_simple_expr741); + expr59=expr(); _fsp--; if (failed) return retval; - if ( backtracking==0 ) stream_expr.add(expr56.getTree()); - RPAREN57=(Token)input.LT(1); - match(input,RPAREN,FOLLOW_RPAREN_in_simple_expr715); if (failed) return retval; - if ( backtracking==0 ) stream_RPAREN.add(RPAREN57); + if ( backtracking==0 ) stream_expr.add(expr59.getTree()); + RPAREN60=(Token)input.LT(1); + match(input,RPAREN,FOLLOW_RPAREN_in_simple_expr743); if (failed) return retval; + if ( backtracking==0 ) stream_RPAREN.add(RPAREN60); // AST REWRITE @@ -2632,9 +2770,9 @@ else if ( (LA7_6==NUMBER||LA7_6==LPAREN||LA7_6==NOT||LA7_6==TWIDDLE||LA7_6==STRI RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null); root_0 = (Object)adaptor.nil(); - // 112:25: -> ^( expr ) + // 114:25: -> ^( expr ) { - // dd/grammar/ECAGrammar.g:112:28: ^( expr ) + // dd/grammar/ECAGrammar.g:114:28: ^( expr ) { Object root_1 = (Object)adaptor.nil(); root_1 = (Object)adaptor.becomeRoot(stream_expr.nextNode(), root_1); @@ -2673,43 +2811,43 @@ public static class expr_list_return extends ParserRuleReturnScope { }; // $ANTLR start expr_list - // dd/grammar/ECAGrammar.g:115:1: expr_list : ( expr SEPR expr_list -> ^( SEPR expr expr_list ) | expr ); + // dd/grammar/ECAGrammar.g:117:1: expr_list : ( expr SEPR expr_list -> ^( SEPR expr expr_list ) | expr ); public final expr_list_return expr_list() throws RecognitionException { expr_list_return retval = new expr_list_return(); retval.start = input.LT(1); Object root_0 = null; - Token SEPR59=null; - expr_return expr58 = null; + Token SEPR62=null; + expr_return expr61 = null; - expr_list_return expr_list60 = null; + expr_list_return expr_list63 = null; - expr_return expr61 = null; + expr_return expr64 = null; - Object SEPR59_tree=null; + Object SEPR62_tree=null; RewriteRuleTokenStream stream_SEPR=new RewriteRuleTokenStream(adaptor,"token SEPR"); RewriteRuleSubtreeStream stream_expr_list=new RewriteRuleSubtreeStream(adaptor,"rule expr_list"); RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr"); try { - // dd/grammar/ECAGrammar.g:116:2: ( expr SEPR expr_list -> ^( SEPR expr expr_list ) | expr ) - int alt8=2; + // dd/grammar/ECAGrammar.g:118:2: ( expr SEPR expr_list -> ^( SEPR expr expr_list ) | expr ) + int alt9=2; switch ( input.LA(1) ) { case DOLLARSYM: { - int LA8_1 = input.LA(2); + int LA9_1 = input.LA(2); - if ( (synpred17()) ) { - alt8=1; + if ( (synpred19()) ) { + alt9=1; } else if ( (true) ) { - alt8=2; + alt9=2; } else { if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("115:1: expr_list : ( expr SEPR expr_list -> ^( SEPR expr expr_list ) | expr );", 8, 1, input); + new NoViableAltException("117:1: expr_list : ( expr SEPR expr_list -> ^( SEPR expr expr_list ) | expr );", 9, 1, input); throw nvae; } @@ -2717,18 +2855,18 @@ else if ( (true) ) { break; case SYMBOL: { - int LA8_2 = input.LA(2); + int LA9_2 = input.LA(2); - if ( (synpred17()) ) { - alt8=1; + if ( (synpred19()) ) { + alt9=1; } else if ( (true) ) { - alt8=2; + alt9=2; } else { if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("115:1: expr_list : ( expr SEPR expr_list -> ^( SEPR expr expr_list ) | expr );", 8, 2, input); + new NoViableAltException("117:1: expr_list : ( expr SEPR expr_list -> ^( SEPR expr expr_list ) | expr );", 9, 2, input); throw nvae; } @@ -2736,18 +2874,18 @@ else if ( (true) ) { break; case NUMBER: { - int LA8_3 = input.LA(2); + int LA9_3 = input.LA(2); - if ( (synpred17()) ) { - alt8=1; + if ( (synpred19()) ) { + alt9=1; } else if ( (true) ) { - alt8=2; + alt9=2; } else { if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("115:1: expr_list : ( expr SEPR expr_list -> ^( SEPR expr expr_list ) | expr );", 8, 3, input); + new NoViableAltException("117:1: expr_list : ( expr SEPR expr_list -> ^( SEPR expr expr_list ) | expr );", 9, 3, input); throw nvae; } @@ -2755,18 +2893,18 @@ else if ( (true) ) { break; case STRING: { - int LA8_4 = input.LA(2); + int LA9_4 = input.LA(2); - if ( (synpred17()) ) { - alt8=1; + if ( (synpred19()) ) { + alt9=1; } else if ( (true) ) { - alt8=2; + alt9=2; } else { if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("115:1: expr_list : ( expr SEPR expr_list -> ^( SEPR expr expr_list ) | expr );", 8, 4, input); + new NoViableAltException("117:1: expr_list : ( expr SEPR expr_list -> ^( SEPR expr expr_list ) | expr );", 9, 4, input); throw nvae; } @@ -2774,18 +2912,18 @@ else if ( (true) ) { break; case LPAREN: { - int LA8_5 = input.LA(2); + int LA9_5 = input.LA(2); - if ( (synpred17()) ) { - alt8=1; + if ( (synpred19()) ) { + alt9=1; } else if ( (true) ) { - alt8=2; + alt9=2; } else { if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("115:1: expr_list : ( expr SEPR expr_list -> ^( SEPR expr expr_list ) | expr );", 8, 5, input); + new NoViableAltException("117:1: expr_list : ( expr SEPR expr_list -> ^( SEPR expr expr_list ) | expr );", 9, 5, input); throw nvae; } @@ -2794,18 +2932,18 @@ else if ( (true) ) { case NOT: case TWIDDLE: { - int LA8_6 = input.LA(2); + int LA9_6 = input.LA(2); - if ( (synpred17()) ) { - alt8=1; + if ( (synpred19()) ) { + alt9=1; } else if ( (true) ) { - alt8=2; + alt9=2; } else { if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("115:1: expr_list : ( expr SEPR expr_list -> ^( SEPR expr expr_list ) | expr );", 8, 6, input); + new NoViableAltException("117:1: expr_list : ( expr SEPR expr_list -> ^( SEPR expr expr_list ) | expr );", 9, 6, input); throw nvae; } @@ -2814,32 +2952,32 @@ else if ( (true) ) { default: if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("115:1: expr_list : ( expr SEPR expr_list -> ^( SEPR expr expr_list ) | expr );", 8, 0, input); + new NoViableAltException("117:1: expr_list : ( expr SEPR expr_list -> ^( SEPR expr expr_list ) | expr );", 9, 0, input); throw nvae; } - switch (alt8) { + switch (alt9) { case 1 : - // dd/grammar/ECAGrammar.g:116:4: expr SEPR expr_list + // dd/grammar/ECAGrammar.g:118:4: expr SEPR expr_list { - pushFollow(FOLLOW_expr_in_expr_list734); - expr58=expr(); + pushFollow(FOLLOW_expr_in_expr_list762); + expr61=expr(); _fsp--; if (failed) return retval; - if ( backtracking==0 ) stream_expr.add(expr58.getTree()); - SEPR59=(Token)input.LT(1); - match(input,SEPR,FOLLOW_SEPR_in_expr_list736); if (failed) return retval; - if ( backtracking==0 ) stream_SEPR.add(SEPR59); + if ( backtracking==0 ) stream_expr.add(expr61.getTree()); + SEPR62=(Token)input.LT(1); + match(input,SEPR,FOLLOW_SEPR_in_expr_list764); if (failed) return retval; + if ( backtracking==0 ) stream_SEPR.add(SEPR62); - pushFollow(FOLLOW_expr_list_in_expr_list738); - expr_list60=expr_list(); + pushFollow(FOLLOW_expr_list_in_expr_list766); + expr_list63=expr_list(); _fsp--; if (failed) return retval; - if ( backtracking==0 ) stream_expr_list.add(expr_list60.getTree()); + if ( backtracking==0 ) stream_expr_list.add(expr_list63.getTree()); // AST REWRITE - // elements: expr_list, SEPR, expr + // elements: expr, SEPR, expr_list // token labels: // rule labels: retval // token list labels: @@ -2849,9 +2987,9 @@ else if ( (true) ) { RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null); root_0 = (Object)adaptor.nil(); - // 116:26: -> ^( SEPR expr expr_list ) + // 118:26: -> ^( SEPR expr expr_list ) { - // dd/grammar/ECAGrammar.g:116:29: ^( SEPR expr expr_list ) + // dd/grammar/ECAGrammar.g:118:29: ^( SEPR expr expr_list ) { Object root_1 = (Object)adaptor.nil(); root_1 = (Object)adaptor.becomeRoot(stream_SEPR.next(), root_1); @@ -2869,15 +3007,15 @@ else if ( (true) ) { } break; case 2 : - // dd/grammar/ECAGrammar.g:117:4: expr + // dd/grammar/ECAGrammar.g:119:4: expr { root_0 = (Object)adaptor.nil(); - pushFollow(FOLLOW_expr_in_expr_list755); - expr61=expr(); + pushFollow(FOLLOW_expr_in_expr_list783); + expr64=expr(); _fsp--; if (failed) return retval; - if ( backtracking==0 ) adaptor.addChild(root_0, expr61.getTree()); + if ( backtracking==0 ) adaptor.addChild(root_0, expr64.getTree()); } break; @@ -2906,40 +3044,40 @@ public static class array_idx_list_return extends ParserRuleReturnScope { }; // $ANTLR start array_idx_list - // dd/grammar/ECAGrammar.g:120:1: array_idx_list : ( array_idx array_idx_list -> ^( SEPR array_idx array_idx_list ) | array_idx ); + // dd/grammar/ECAGrammar.g:122:1: array_idx_list : ( array_idx array_idx_list -> ^( SEPR array_idx array_idx_list ) | array_idx ); public final array_idx_list_return array_idx_list() throws RecognitionException { array_idx_list_return retval = new array_idx_list_return(); retval.start = input.LT(1); Object root_0 = null; - array_idx_return array_idx62 = null; + array_idx_return array_idx65 = null; - array_idx_list_return array_idx_list63 = null; + array_idx_list_return array_idx_list66 = null; - array_idx_return array_idx64 = null; + array_idx_return array_idx67 = null; RewriteRuleSubtreeStream stream_array_idx=new RewriteRuleSubtreeStream(adaptor,"rule array_idx"); RewriteRuleSubtreeStream stream_array_idx_list=new RewriteRuleSubtreeStream(adaptor,"rule array_idx_list"); try { - // dd/grammar/ECAGrammar.g:121:2: ( array_idx array_idx_list -> ^( SEPR array_idx array_idx_list ) | array_idx ) - int alt9=2; - int LA9_0 = input.LA(1); + // dd/grammar/ECAGrammar.g:123:2: ( array_idx array_idx_list -> ^( SEPR array_idx array_idx_list ) | array_idx ) + int alt10=2; + int LA10_0 = input.LA(1); - if ( (LA9_0==LSQUARE) ) { - int LA9_1 = input.LA(2); + if ( (LA10_0==LSQUARE) ) { + int LA10_1 = input.LA(2); - if ( (synpred18()) ) { - alt9=1; + if ( (synpred20()) ) { + alt10=1; } else if ( (true) ) { - alt9=2; + alt10=2; } else { if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("120:1: array_idx_list : ( array_idx array_idx_list -> ^( SEPR array_idx array_idx_list ) | array_idx );", 9, 1, input); + new NoViableAltException("122:1: array_idx_list : ( array_idx array_idx_list -> ^( SEPR array_idx array_idx_list ) | array_idx );", 10, 1, input); throw nvae; } @@ -2947,27 +3085,27 @@ else if ( (true) ) { else { if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("120:1: array_idx_list : ( array_idx array_idx_list -> ^( SEPR array_idx array_idx_list ) | array_idx );", 9, 0, input); + new NoViableAltException("122:1: array_idx_list : ( array_idx array_idx_list -> ^( SEPR array_idx array_idx_list ) | array_idx );", 10, 0, input); throw nvae; } - switch (alt9) { + switch (alt10) { case 1 : - // dd/grammar/ECAGrammar.g:121:4: array_idx array_idx_list + // dd/grammar/ECAGrammar.g:123:4: array_idx array_idx_list { - pushFollow(FOLLOW_array_idx_in_array_idx_list766); - array_idx62=array_idx(); + pushFollow(FOLLOW_array_idx_in_array_idx_list794); + array_idx65=array_idx(); _fsp--; if (failed) return retval; - if ( backtracking==0 ) stream_array_idx.add(array_idx62.getTree()); - pushFollow(FOLLOW_array_idx_list_in_array_idx_list768); - array_idx_list63=array_idx_list(); + if ( backtracking==0 ) stream_array_idx.add(array_idx65.getTree()); + pushFollow(FOLLOW_array_idx_list_in_array_idx_list796); + array_idx_list66=array_idx_list(); _fsp--; if (failed) return retval; - if ( backtracking==0 ) stream_array_idx_list.add(array_idx_list63.getTree()); + if ( backtracking==0 ) stream_array_idx_list.add(array_idx_list66.getTree()); // AST REWRITE - // elements: array_idx_list, array_idx + // elements: array_idx, array_idx_list // token labels: // rule labels: retval // token list labels: @@ -2977,9 +3115,9 @@ else if ( (true) ) { RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null); root_0 = (Object)adaptor.nil(); - // 121:31: -> ^( SEPR array_idx array_idx_list ) + // 123:31: -> ^( SEPR array_idx array_idx_list ) { - // dd/grammar/ECAGrammar.g:121:34: ^( SEPR array_idx array_idx_list ) + // dd/grammar/ECAGrammar.g:123:34: ^( SEPR array_idx array_idx_list ) { Object root_1 = (Object)adaptor.nil(); root_1 = (Object)adaptor.becomeRoot(adaptor.create(SEPR, "SEPR"), root_1); @@ -2997,15 +3135,15 @@ else if ( (true) ) { } break; case 2 : - // dd/grammar/ECAGrammar.g:122:4: array_idx + // dd/grammar/ECAGrammar.g:124:4: array_idx { root_0 = (Object)adaptor.nil(); - pushFollow(FOLLOW_array_idx_in_array_idx_list785); - array_idx64=array_idx(); + pushFollow(FOLLOW_array_idx_in_array_idx_list813); + array_idx67=array_idx(); _fsp--; if (failed) return retval; - if ( backtracking==0 ) adaptor.addChild(root_0, array_idx64.getTree()); + if ( backtracking==0 ) adaptor.addChild(root_0, array_idx67.getTree()); } break; @@ -3034,39 +3172,39 @@ public static class array_idx_return extends ParserRuleReturnScope { }; // $ANTLR start array_idx - // dd/grammar/ECAGrammar.g:125:1: array_idx : LSQUARE expr RSQUARE -> ^( expr ) ; + // dd/grammar/ECAGrammar.g:127:1: array_idx : LSQUARE expr RSQUARE -> ^( expr ) ; public final array_idx_return array_idx() throws RecognitionException { array_idx_return retval = new array_idx_return(); retval.start = input.LT(1); Object root_0 = null; - Token LSQUARE65=null; - Token RSQUARE67=null; - expr_return expr66 = null; + Token LSQUARE68=null; + Token RSQUARE70=null; + expr_return expr69 = null; - Object LSQUARE65_tree=null; - Object RSQUARE67_tree=null; + Object LSQUARE68_tree=null; + Object RSQUARE70_tree=null; RewriteRuleTokenStream stream_LSQUARE=new RewriteRuleTokenStream(adaptor,"token LSQUARE"); RewriteRuleTokenStream stream_RSQUARE=new RewriteRuleTokenStream(adaptor,"token RSQUARE"); RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr"); try { - // dd/grammar/ECAGrammar.g:126:2: ( LSQUARE expr RSQUARE -> ^( expr ) ) - // dd/grammar/ECAGrammar.g:126:4: LSQUARE expr RSQUARE + // dd/grammar/ECAGrammar.g:128:2: ( LSQUARE expr RSQUARE -> ^( expr ) ) + // dd/grammar/ECAGrammar.g:128:4: LSQUARE expr RSQUARE { - LSQUARE65=(Token)input.LT(1); - match(input,LSQUARE,FOLLOW_LSQUARE_in_array_idx796); if (failed) return retval; - if ( backtracking==0 ) stream_LSQUARE.add(LSQUARE65); + LSQUARE68=(Token)input.LT(1); + match(input,LSQUARE,FOLLOW_LSQUARE_in_array_idx824); if (failed) return retval; + if ( backtracking==0 ) stream_LSQUARE.add(LSQUARE68); - pushFollow(FOLLOW_expr_in_array_idx798); - expr66=expr(); + pushFollow(FOLLOW_expr_in_array_idx826); + expr69=expr(); _fsp--; if (failed) return retval; - if ( backtracking==0 ) stream_expr.add(expr66.getTree()); - RSQUARE67=(Token)input.LT(1); - match(input,RSQUARE,FOLLOW_RSQUARE_in_array_idx800); if (failed) return retval; - if ( backtracking==0 ) stream_RSQUARE.add(RSQUARE67); + if ( backtracking==0 ) stream_expr.add(expr69.getTree()); + RSQUARE70=(Token)input.LT(1); + match(input,RSQUARE,FOLLOW_RSQUARE_in_array_idx828); if (failed) return retval; + if ( backtracking==0 ) stream_RSQUARE.add(RSQUARE70); // AST REWRITE @@ -3080,9 +3218,9 @@ public final array_idx_return array_idx() throws RecognitionException { RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null); root_0 = (Object)adaptor.nil(); - // 126:27: -> ^( expr ) + // 128:27: -> ^( expr ) { - // dd/grammar/ECAGrammar.g:126:30: ^( expr ) + // dd/grammar/ECAGrammar.g:128:30: ^( expr ) { Object root_1 = (Object)adaptor.nil(); root_1 = (Object)adaptor.becomeRoot(stream_expr.nextNode(), root_1); @@ -3119,32 +3257,32 @@ public static class infix_oper_return extends ParserRuleReturnScope { }; // $ANTLR start infix_oper - // dd/grammar/ECAGrammar.g:129:1: infix_oper : ( infix_bit_oper | infix_arith_oper | infix_bool_oper | infix_cmp_oper ); + // dd/grammar/ECAGrammar.g:131:1: infix_oper : ( infix_bit_oper | infix_arith_oper | infix_bool_oper | infix_cmp_oper ); public final infix_oper_return infix_oper() throws RecognitionException { infix_oper_return retval = new infix_oper_return(); retval.start = input.LT(1); Object root_0 = null; - infix_bit_oper_return infix_bit_oper68 = null; + infix_bit_oper_return infix_bit_oper71 = null; - infix_arith_oper_return infix_arith_oper69 = null; + infix_arith_oper_return infix_arith_oper72 = null; - infix_bool_oper_return infix_bool_oper70 = null; + infix_bool_oper_return infix_bool_oper73 = null; - infix_cmp_oper_return infix_cmp_oper71 = null; + infix_cmp_oper_return infix_cmp_oper74 = null; try { - // dd/grammar/ECAGrammar.g:129:12: ( infix_bit_oper | infix_arith_oper | infix_bool_oper | infix_cmp_oper ) - int alt10=4; + // dd/grammar/ECAGrammar.g:131:12: ( infix_bit_oper | infix_arith_oper | infix_bool_oper | infix_cmp_oper ) + int alt11=4; switch ( input.LA(1) ) { case BOR: case BAND: case BXOR: { - alt10=1; + alt11=1; } break; case MUL: @@ -3152,13 +3290,13 @@ public final infix_oper_return infix_oper() throws RecognitionException { case PLUS: case MINUS: { - alt10=2; + alt11=2; } break; case OR: case AND: { - alt10=3; + alt11=3; } break; case EQ: @@ -3168,67 +3306,67 @@ public final infix_oper_return infix_oper() throws RecognitionException { case GEQ: case LEQ: { - alt10=4; + alt11=4; } break; default: if (backtracking>0) {failed=true; return retval;} NoViableAltException nvae = - new NoViableAltException("129:1: infix_oper : ( infix_bit_oper | infix_arith_oper | infix_bool_oper | infix_cmp_oper );", 10, 0, input); + new NoViableAltException("131:1: infix_oper : ( infix_bit_oper | infix_arith_oper | infix_bool_oper | infix_cmp_oper );", 11, 0, input); throw nvae; } - switch (alt10) { + switch (alt11) { case 1 : - // dd/grammar/ECAGrammar.g:129:14: infix_bit_oper + // dd/grammar/ECAGrammar.g:131:14: infix_bit_oper { root_0 = (Object)adaptor.nil(); - pushFollow(FOLLOW_infix_bit_oper_in_infix_oper818); - infix_bit_oper68=infix_bit_oper(); + pushFollow(FOLLOW_infix_bit_oper_in_infix_oper846); + infix_bit_oper71=infix_bit_oper(); _fsp--; if (failed) return retval; - if ( backtracking==0 ) adaptor.addChild(root_0, infix_bit_oper68.getTree()); + if ( backtracking==0 ) adaptor.addChild(root_0, infix_bit_oper71.getTree()); } break; case 2 : - // dd/grammar/ECAGrammar.g:130:4: infix_arith_oper + // dd/grammar/ECAGrammar.g:132:4: infix_arith_oper { root_0 = (Object)adaptor.nil(); - pushFollow(FOLLOW_infix_arith_oper_in_infix_oper823); - infix_arith_oper69=infix_arith_oper(); + pushFollow(FOLLOW_infix_arith_oper_in_infix_oper851); + infix_arith_oper72=infix_arith_oper(); _fsp--; if (failed) return retval; - if ( backtracking==0 ) adaptor.addChild(root_0, infix_arith_oper69.getTree()); + if ( backtracking==0 ) adaptor.addChild(root_0, infix_arith_oper72.getTree()); } break; case 3 : - // dd/grammar/ECAGrammar.g:131:4: infix_bool_oper + // dd/grammar/ECAGrammar.g:133:4: infix_bool_oper { root_0 = (Object)adaptor.nil(); - pushFollow(FOLLOW_infix_bool_oper_in_infix_oper828); - infix_bool_oper70=infix_bool_oper(); + pushFollow(FOLLOW_infix_bool_oper_in_infix_oper856); + infix_bool_oper73=infix_bool_oper(); _fsp--; if (failed) return retval; - if ( backtracking==0 ) adaptor.addChild(root_0, infix_bool_oper70.getTree()); + if ( backtracking==0 ) adaptor.addChild(root_0, infix_bool_oper73.getTree()); } break; case 4 : - // dd/grammar/ECAGrammar.g:132:4: infix_cmp_oper + // dd/grammar/ECAGrammar.g:134:4: infix_cmp_oper { root_0 = (Object)adaptor.nil(); - pushFollow(FOLLOW_infix_cmp_oper_in_infix_oper833); - infix_cmp_oper71=infix_cmp_oper(); + pushFollow(FOLLOW_infix_cmp_oper_in_infix_oper861); + infix_cmp_oper74=infix_cmp_oper(); _fsp--; if (failed) return retval; - if ( backtracking==0 ) adaptor.addChild(root_0, infix_cmp_oper71.getTree()); + if ( backtracking==0 ) adaptor.addChild(root_0, infix_cmp_oper74.getTree()); } break; @@ -3257,27 +3395,27 @@ public static class infix_bit_oper_return extends ParserRuleReturnScope { }; // $ANTLR start infix_bit_oper - // dd/grammar/ECAGrammar.g:135:1: infix_bit_oper : ( BAND | BOR | BXOR ); + // dd/grammar/ECAGrammar.g:137:1: infix_bit_oper : ( BAND | BOR | BXOR ); public final infix_bit_oper_return infix_bit_oper() throws RecognitionException { infix_bit_oper_return retval = new infix_bit_oper_return(); retval.start = input.LT(1); Object root_0 = null; - Token set72=null; + Token set75=null; - Object set72_tree=null; + Object set75_tree=null; try { - // dd/grammar/ECAGrammar.g:136:2: ( BAND | BOR | BXOR ) + // dd/grammar/ECAGrammar.g:138:2: ( BAND | BOR | BXOR ) // dd/grammar/ECAGrammar.g: { root_0 = (Object)adaptor.nil(); - set72=(Token)input.LT(1); + set75=(Token)input.LT(1); if ( (input.LA(1)>=BOR && input.LA(1)<=BXOR) ) { input.consume(); - if ( backtracking==0 ) adaptor.addChild(root_0, adaptor.create(set72)); + if ( backtracking==0 ) adaptor.addChild(root_0, adaptor.create(set75)); errorRecovery=false;failed=false; } else { @@ -3313,27 +3451,27 @@ public static class infix_arith_oper_return extends ParserRuleReturnScope { }; // $ANTLR start infix_arith_oper - // dd/grammar/ECAGrammar.g:141:1: infix_arith_oper : ( MUL | DIV | PLUS | MINUS ); + // dd/grammar/ECAGrammar.g:143:1: infix_arith_oper : ( MUL | DIV | PLUS | MINUS ); public final infix_arith_oper_return infix_arith_oper() throws RecognitionException { infix_arith_oper_return retval = new infix_arith_oper_return(); retval.start = input.LT(1); Object root_0 = null; - Token set73=null; + Token set76=null; - Object set73_tree=null; + Object set76_tree=null; try { - // dd/grammar/ECAGrammar.g:142:2: ( MUL | DIV | PLUS | MINUS ) + // dd/grammar/ECAGrammar.g:144:2: ( MUL | DIV | PLUS | MINUS ) // dd/grammar/ECAGrammar.g: { root_0 = (Object)adaptor.nil(); - set73=(Token)input.LT(1); + set76=(Token)input.LT(1); if ( (input.LA(1)>=MUL && input.LA(1)<=MINUS) ) { input.consume(); - if ( backtracking==0 ) adaptor.addChild(root_0, adaptor.create(set73)); + if ( backtracking==0 ) adaptor.addChild(root_0, adaptor.create(set76)); errorRecovery=false;failed=false; } else { @@ -3369,27 +3507,27 @@ public static class infix_bool_oper_return extends ParserRuleReturnScope { }; // $ANTLR start infix_bool_oper - // dd/grammar/ECAGrammar.g:148:1: infix_bool_oper : ( AND | OR ); + // dd/grammar/ECAGrammar.g:150:1: infix_bool_oper : ( AND | OR ); public final infix_bool_oper_return infix_bool_oper() throws RecognitionException { infix_bool_oper_return retval = new infix_bool_oper_return(); retval.start = input.LT(1); Object root_0 = null; - Token set74=null; + Token set77=null; - Object set74_tree=null; + Object set77_tree=null; try { - // dd/grammar/ECAGrammar.g:149:2: ( AND | OR ) + // dd/grammar/ECAGrammar.g:151:2: ( AND | OR ) // dd/grammar/ECAGrammar.g: { root_0 = (Object)adaptor.nil(); - set74=(Token)input.LT(1); + set77=(Token)input.LT(1); if ( (input.LA(1)>=OR && input.LA(1)<=AND) ) { input.consume(); - if ( backtracking==0 ) adaptor.addChild(root_0, adaptor.create(set74)); + if ( backtracking==0 ) adaptor.addChild(root_0, adaptor.create(set77)); errorRecovery=false;failed=false; } else { @@ -3425,27 +3563,27 @@ public static class infix_cmp_oper_return extends ParserRuleReturnScope { }; // $ANTLR start infix_cmp_oper - // dd/grammar/ECAGrammar.g:153:1: infix_cmp_oper : ( EQ | NEQ | GT | LT | GEQ | LEQ ); + // dd/grammar/ECAGrammar.g:155:1: infix_cmp_oper : ( EQ | NEQ | GT | LT | GEQ | LEQ ); public final infix_cmp_oper_return infix_cmp_oper() throws RecognitionException { infix_cmp_oper_return retval = new infix_cmp_oper_return(); retval.start = input.LT(1); Object root_0 = null; - Token set75=null; + Token set78=null; - Object set75_tree=null; + Object set78_tree=null; try { - // dd/grammar/ECAGrammar.g:154:2: ( EQ | NEQ | GT | LT | GEQ | LEQ ) + // dd/grammar/ECAGrammar.g:156:2: ( EQ | NEQ | GT | LT | GEQ | LEQ ) // dd/grammar/ECAGrammar.g: { root_0 = (Object)adaptor.nil(); - set75=(Token)input.LT(1); + set78=(Token)input.LT(1); if ( (input.LA(1)>=EQ && input.LA(1)<=LEQ) ) { input.consume(); - if ( backtracking==0 ) adaptor.addChild(root_0, adaptor.create(set75)); + if ( backtracking==0 ) adaptor.addChild(root_0, adaptor.create(set78)); errorRecovery=false;failed=false; } else { @@ -3481,27 +3619,27 @@ public static class unary_oper_return extends ParserRuleReturnScope { }; // $ANTLR start unary_oper - // dd/grammar/ECAGrammar.g:162:1: unary_oper : ( NOT | TWIDDLE ); + // dd/grammar/ECAGrammar.g:164:1: unary_oper : ( NOT | TWIDDLE ); public final unary_oper_return unary_oper() throws RecognitionException { unary_oper_return retval = new unary_oper_return(); retval.start = input.LT(1); Object root_0 = null; - Token set76=null; + Token set79=null; - Object set76_tree=null; + Object set79_tree=null; try { - // dd/grammar/ECAGrammar.g:162:12: ( NOT | TWIDDLE ) + // dd/grammar/ECAGrammar.g:164:12: ( NOT | TWIDDLE ) // dd/grammar/ECAGrammar.g: { root_0 = (Object)adaptor.nil(); - set76=(Token)input.LT(1); + set79=(Token)input.LT(1); if ( input.LA(1)==NOT||input.LA(1)==TWIDDLE ) { input.consume(); - if ( backtracking==0 ) adaptor.addChild(root_0, adaptor.create(set76)); + if ( backtracking==0 ) adaptor.addChild(root_0, adaptor.create(set79)); errorRecovery=false;failed=false; } else { @@ -3569,84 +3707,84 @@ public final void synpred6_fragment() throws RecognitionException { } // $ANTLR end synpred6 - // $ANTLR start synpred7 - public final void synpred7_fragment() throws RecognitionException { - // dd/grammar/ECAGrammar.g:99:8: ( simple_expr infix_oper expr ) - // dd/grammar/ECAGrammar.g:99:8: simple_expr infix_oper expr + // $ANTLR start synpred9 + public final void synpred9_fragment() throws RecognitionException { + // dd/grammar/ECAGrammar.g:101:8: ( simple_expr infix_oper expr ) + // dd/grammar/ECAGrammar.g:101:8: simple_expr infix_oper expr { - pushFollow(FOLLOW_simple_expr_in_synpred7526); + pushFollow(FOLLOW_simple_expr_in_synpred9554); simple_expr(); _fsp--; if (failed) return ; - pushFollow(FOLLOW_infix_oper_in_synpred7528); + pushFollow(FOLLOW_infix_oper_in_synpred9556); infix_oper(); _fsp--; if (failed) return ; - pushFollow(FOLLOW_expr_in_synpred7530); + pushFollow(FOLLOW_expr_in_synpred9558); expr(); _fsp--; if (failed) return ; } } - // $ANTLR end synpred7 + // $ANTLR end synpred9 - // $ANTLR start synpred8 - public final void synpred8_fragment() throws RecognitionException { - // dd/grammar/ECAGrammar.g:100:4: ( simple_expr ) - // dd/grammar/ECAGrammar.g:100:4: simple_expr + // $ANTLR start synpred10 + public final void synpred10_fragment() throws RecognitionException { + // dd/grammar/ECAGrammar.g:102:4: ( simple_expr ) + // dd/grammar/ECAGrammar.g:102:4: simple_expr { - pushFollow(FOLLOW_simple_expr_in_synpred8548); + pushFollow(FOLLOW_simple_expr_in_synpred10576); simple_expr(); _fsp--; if (failed) return ; } } - // $ANTLR end synpred8 + // $ANTLR end synpred10 - // $ANTLR start synpred17 - public final void synpred17_fragment() throws RecognitionException { - // dd/grammar/ECAGrammar.g:116:4: ( expr SEPR expr_list ) - // dd/grammar/ECAGrammar.g:116:4: expr SEPR expr_list + // $ANTLR start synpred19 + public final void synpred19_fragment() throws RecognitionException { + // dd/grammar/ECAGrammar.g:118:4: ( expr SEPR expr_list ) + // dd/grammar/ECAGrammar.g:118:4: expr SEPR expr_list { - pushFollow(FOLLOW_expr_in_synpred17734); + pushFollow(FOLLOW_expr_in_synpred19762); expr(); _fsp--; if (failed) return ; - match(input,SEPR,FOLLOW_SEPR_in_synpred17736); if (failed) return ; - pushFollow(FOLLOW_expr_list_in_synpred17738); + match(input,SEPR,FOLLOW_SEPR_in_synpred19764); if (failed) return ; + pushFollow(FOLLOW_expr_list_in_synpred19766); expr_list(); _fsp--; if (failed) return ; } } - // $ANTLR end synpred17 + // $ANTLR end synpred19 - // $ANTLR start synpred18 - public final void synpred18_fragment() throws RecognitionException { - // dd/grammar/ECAGrammar.g:121:4: ( array_idx array_idx_list ) - // dd/grammar/ECAGrammar.g:121:4: array_idx array_idx_list + // $ANTLR start synpred20 + public final void synpred20_fragment() throws RecognitionException { + // dd/grammar/ECAGrammar.g:123:4: ( array_idx array_idx_list ) + // dd/grammar/ECAGrammar.g:123:4: array_idx array_idx_list { - pushFollow(FOLLOW_array_idx_in_synpred18766); + pushFollow(FOLLOW_array_idx_in_synpred20794); array_idx(); _fsp--; if (failed) return ; - pushFollow(FOLLOW_array_idx_list_in_synpred18768); + pushFollow(FOLLOW_array_idx_list_in_synpred20796); array_idx_list(); _fsp--; if (failed) return ; } } - // $ANTLR end synpred18 + // $ANTLR end synpred20 - public final boolean synpred18() { + public final boolean synpred9() { backtracking++; int start = input.mark(); try { - synpred18_fragment(); // can never throw exception + synpred9_fragment(); // can never throw exception } catch (RecognitionException re) { System.err.println("impossible: "+re); } @@ -3656,11 +3794,11 @@ public final boolean synpred18() { failed=false; return success; } - public final boolean synpred7() { + public final boolean synpred19() { backtracking++; int start = input.mark(); try { - synpred7_fragment(); // can never throw exception + synpred19_fragment(); // can never throw exception } catch (RecognitionException re) { System.err.println("impossible: "+re); } @@ -3670,11 +3808,11 @@ public final boolean synpred7() { failed=false; return success; } - public final boolean synpred1() { + public final boolean synpred20() { backtracking++; int start = input.mark(); try { - synpred1_fragment(); // can never throw exception + synpred20_fragment(); // can never throw exception } catch (RecognitionException re) { System.err.println("impossible: "+re); } @@ -3684,11 +3822,11 @@ public final boolean synpred1() { failed=false; return success; } - public final boolean synpred17() { + public final boolean synpred1() { backtracking++; int start = input.mark(); try { - synpred17_fragment(); // can never throw exception + synpred1_fragment(); // can never throw exception } catch (RecognitionException re) { System.err.println("impossible: "+re); } @@ -3712,11 +3850,11 @@ public final boolean synpred6() { failed=false; return success; } - public final boolean synpred8() { + public final boolean synpred10() { backtracking++; int start = input.mark(); try { - synpred8_fragment(); // can never throw exception + synpred10_fragment(); // can never throw exception } catch (RecognitionException re) { System.err.println("impossible: "+re); } @@ -3732,19 +3870,19 @@ public final boolean synpred8() { public static final BitSet FOLLOW_eca_script_rule_one_in_eca_script_rule88 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_EOF_in_eca_script_rule90 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_RULE_in_eca_script_rule_one107 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000001L}); + public static final BitSet FOLLOW_RULE_in_eca_script_rule_one107 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000002L}); public static final BitSet FOLLOW_SYMBOL_in_eca_script_rule_one111 = new BitSet(new long[]{0x0000000000020000L}); - public static final BitSet FOLLOW_CLASS_in_eca_script_rule_one115 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000001L}); + public static final BitSet FOLLOW_CLASS_in_eca_script_rule_one115 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000002L}); public static final BitSet FOLLOW_SYMBOL_in_eca_script_rule_one119 = new BitSet(new long[]{0x0000000000040000L}); - public static final BitSet FOLLOW_METHOD_in_eca_script_rule_one123 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000001L}); + public static final BitSet FOLLOW_METHOD_in_eca_script_rule_one123 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000002L}); public static final BitSet FOLLOW_SYMBOL_in_eca_script_rule_one127 = new BitSet(new long[]{0x0000000000080000L}); public static final BitSet FOLLOW_LINE_in_eca_script_rule_one131 = new BitSet(new long[]{0x0000000000001000L}); public static final BitSet FOLLOW_NUMBER_in_eca_script_rule_one135 = new BitSet(new long[]{0x0000000000002000L}); - public static final BitSet FOLLOW_BIND_in_eca_script_rule_one139 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000001L}); + public static final BitSet FOLLOW_BIND_in_eca_script_rule_one139 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000002L}); public static final BitSet FOLLOW_event_in_eca_script_rule_one143 = new BitSet(new long[]{0x0000000000004000L}); - public static final BitSet FOLLOW_IF_in_eca_script_rule_one147 = new BitSet(new long[]{0x1000200801C01000L,0x0000000000000005L}); + public static final BitSet FOLLOW_IF_in_eca_script_rule_one147 = new BitSet(new long[]{0x2000401002C01000L,0x000000000000000AL}); public static final BitSet FOLLOW_condition_in_eca_script_rule_one151 = new BitSet(new long[]{0x0000000000008000L}); - public static final BitSet FOLLOW_DO_in_eca_script_rule_one155 = new BitSet(new long[]{0x1000200801201000L,0x0000000000000005L}); + public static final BitSet FOLLOW_DO_in_eca_script_rule_one155 = new BitSet(new long[]{0x2000401003201000L,0x000000000000000AL}); public static final BitSet FOLLOW_action_in_eca_script_rule_one159 = new BitSet(new long[]{0x0000000000100000L}); public static final BitSet FOLLOW_ENDRULE_in_eca_script_rule_one163 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_eca_in_eca_rule200 = new BitSet(new long[]{0x0000000000000000L}); @@ -3755,22 +3893,22 @@ public final boolean synpred8() { public static final BitSet FOLLOW_EOF_in_eca_condition239 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_action_in_eca_action255 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_EOF_in_eca_action257 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_BIND_in_eca273 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000001L}); + public static final BitSet FOLLOW_BIND_in_eca273 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000002L}); public static final BitSet FOLLOW_event_in_eca277 = new BitSet(new long[]{0x0000000000004000L}); - public static final BitSet FOLLOW_IF_in_eca281 = new BitSet(new long[]{0x1000200801C01000L,0x0000000000000005L}); + public static final BitSet FOLLOW_IF_in_eca281 = new BitSet(new long[]{0x2000401002C01000L,0x000000000000000AL}); public static final BitSet FOLLOW_condition_in_eca285 = new BitSet(new long[]{0x0000000000008000L}); - public static final BitSet FOLLOW_DO_in_eca289 = new BitSet(new long[]{0x1000200801201000L,0x0000000000000005L}); + public static final BitSet FOLLOW_DO_in_eca289 = new BitSet(new long[]{0x2000401003201000L,0x000000000000000AL}); public static final BitSet FOLLOW_action_in_eca293 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_bindings_in_event320 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_binding_in_bindings332 = new BitSet(new long[]{0x0000000040000000L}); - public static final BitSet FOLLOW_SEPR_in_bindings334 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000001L}); + public static final BitSet FOLLOW_binding_in_bindings332 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_SEPR_in_bindings334 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000002L}); public static final BitSet FOLLOW_bindings_in_bindings336 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_binding_in_bindings351 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_bind_sym_in_binding361 = new BitSet(new long[]{0x0000000100000000L}); - public static final BitSet FOLLOW_ASSIGN_in_binding363 = new BitSet(new long[]{0x1000200801001000L,0x0000000000000005L}); + public static final BitSet FOLLOW_bind_sym_in_binding361 = new BitSet(new long[]{0x0000000200000000L}); + public static final BitSet FOLLOW_ASSIGN_in_binding363 = new BitSet(new long[]{0x2000401002001000L,0x000000000000000AL}); public static final BitSet FOLLOW_expr_in_binding365 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_SYMBOL_in_bind_sym388 = new BitSet(new long[]{0x0010000000000000L}); - public static final BitSet FOLLOW_COLON_in_bind_sym390 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000001L}); + public static final BitSet FOLLOW_SYMBOL_in_bind_sym388 = new BitSet(new long[]{0x0020000000000000L}); + public static final BitSet FOLLOW_COLON_in_bind_sym390 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000002L}); public static final BitSet FOLLOW_SYMBOL_in_bind_sym394 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_SYMBOL_in_bind_sym412 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_TRUE_in_condition426 = new BitSet(new long[]{0x0000000000000002L}); @@ -3778,71 +3916,74 @@ public final boolean synpred8() { public static final BitSet FOLLOW_expr_in_condition450 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_NOTHING_in_action464 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_action_expr_list_in_action476 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_action_expr_in_action_expr_list487 = new BitSet(new long[]{0x0000000040000000L}); - public static final BitSet FOLLOW_SEPR_in_action_expr_list489 = new BitSet(new long[]{0x1000200801001000L,0x0000000000000005L}); + public static final BitSet FOLLOW_action_expr_in_action_expr_list487 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_SEPR_in_action_expr_list489 = new BitSet(new long[]{0x2000401003001000L,0x000000000000000AL}); public static final BitSet FOLLOW_action_expr_list_in_action_expr_list491 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_action_expr_in_action_expr_list506 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_expr_in_action_expr516 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_simple_expr_in_expr526 = new BitSet(new long[]{0x0003DFF600000000L}); - public static final BitSet FOLLOW_infix_oper_in_expr528 = new BitSet(new long[]{0x1000200801001000L,0x0000000000000005L}); - public static final BitSet FOLLOW_expr_in_expr530 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_simple_expr_in_expr548 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_unary_oper_in_expr553 = new BitSet(new long[]{0x1000200801001000L,0x0000000000000005L}); - public static final BitSet FOLLOW_expr_in_expr555 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_simple_expr_in_expr574 = new BitSet(new long[]{0x0008000000000000L}); - public static final BitSet FOLLOW_TERN_IF_in_expr576 = new BitSet(new long[]{0x1000200801001000L,0x0000000000000005L}); - public static final BitSet FOLLOW_expr_in_expr580 = new BitSet(new long[]{0x0010000000000000L}); - public static final BitSet FOLLOW_COLON_in_expr582 = new BitSet(new long[]{0x1000200801001000L,0x0000000000000005L}); - public static final BitSet FOLLOW_expr_in_expr586 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_DOLLARSYM_in_simple_expr613 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_SYMBOL_in_simple_expr620 = new BitSet(new long[]{0x0000000004000000L}); - public static final BitSet FOLLOW_array_idx_in_simple_expr624 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_SYMBOL_in_simple_expr645 = new BitSet(new long[]{0x0000000001000000L}); - public static final BitSet FOLLOW_LPAREN_in_simple_expr647 = new BitSet(new long[]{0x0000000002000000L}); - public static final BitSet FOLLOW_RPAREN_in_simple_expr649 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_SYMBOL_in_simple_expr667 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_SYMBOL_in_simple_expr674 = new BitSet(new long[]{0x0000000001000000L}); - public static final BitSet FOLLOW_LPAREN_in_simple_expr676 = new BitSet(new long[]{0x1000200801001000L,0x0000000000000005L}); - public static final BitSet FOLLOW_expr_list_in_simple_expr680 = new BitSet(new long[]{0x0000000002000000L}); - public static final BitSet FOLLOW_RPAREN_in_simple_expr682 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_NUMBER_in_simple_expr701 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_STRING_in_simple_expr706 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LPAREN_in_simple_expr711 = new BitSet(new long[]{0x1000200801001000L,0x0000000000000005L}); - public static final BitSet FOLLOW_expr_in_simple_expr713 = new BitSet(new long[]{0x0000000002000000L}); - public static final BitSet FOLLOW_RPAREN_in_simple_expr715 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_expr_in_expr_list734 = new BitSet(new long[]{0x0000000040000000L}); - public static final BitSet FOLLOW_SEPR_in_expr_list736 = new BitSet(new long[]{0x1000200801001000L,0x0000000000000005L}); - public static final BitSet FOLLOW_expr_list_in_expr_list738 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_expr_in_expr_list755 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_array_idx_in_array_idx_list766 = new BitSet(new long[]{0x0000000004000000L}); - public static final BitSet FOLLOW_array_idx_list_in_array_idx_list768 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_array_idx_in_array_idx_list785 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_LSQUARE_in_array_idx796 = new BitSet(new long[]{0x1000200801001000L,0x0000000000000005L}); - public static final BitSet FOLLOW_expr_in_array_idx798 = new BitSet(new long[]{0x0000000008000000L}); - public static final BitSet FOLLOW_RSQUARE_in_array_idx800 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_infix_bit_oper_in_infix_oper818 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_infix_arith_oper_in_infix_oper823 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_infix_bool_oper_in_infix_oper828 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_infix_cmp_oper_in_infix_oper833 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_RETURN_in_action_expr516 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_RETURN_in_action_expr528 = new BitSet(new long[]{0x2000401002001000L,0x000000000000000AL}); + public static final BitSet FOLLOW_expr_in_action_expr530 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_expr_in_action_expr544 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_simple_expr_in_expr554 = new BitSet(new long[]{0x0007BFEC00000000L}); + public static final BitSet FOLLOW_infix_oper_in_expr556 = new BitSet(new long[]{0x2000401002001000L,0x000000000000000AL}); + public static final BitSet FOLLOW_expr_in_expr558 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_simple_expr_in_expr576 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_unary_oper_in_expr581 = new BitSet(new long[]{0x2000401002001000L,0x000000000000000AL}); + public static final BitSet FOLLOW_expr_in_expr583 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_simple_expr_in_expr602 = new BitSet(new long[]{0x0010000000000000L}); + public static final BitSet FOLLOW_TERN_IF_in_expr604 = new BitSet(new long[]{0x2000401002001000L,0x000000000000000AL}); + public static final BitSet FOLLOW_expr_in_expr608 = new BitSet(new long[]{0x0020000000000000L}); + public static final BitSet FOLLOW_COLON_in_expr610 = new BitSet(new long[]{0x2000401002001000L,0x000000000000000AL}); + public static final BitSet FOLLOW_expr_in_expr614 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_DOLLARSYM_in_simple_expr641 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_SYMBOL_in_simple_expr648 = new BitSet(new long[]{0x0000000008000000L}); + public static final BitSet FOLLOW_array_idx_in_simple_expr652 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_SYMBOL_in_simple_expr673 = new BitSet(new long[]{0x0000000002000000L}); + public static final BitSet FOLLOW_LPAREN_in_simple_expr675 = new BitSet(new long[]{0x0000000004000000L}); + public static final BitSet FOLLOW_RPAREN_in_simple_expr677 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_SYMBOL_in_simple_expr695 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_SYMBOL_in_simple_expr702 = new BitSet(new long[]{0x0000000002000000L}); + public static final BitSet FOLLOW_LPAREN_in_simple_expr704 = new BitSet(new long[]{0x2000401002001000L,0x000000000000000AL}); + public static final BitSet FOLLOW_expr_list_in_simple_expr708 = new BitSet(new long[]{0x0000000004000000L}); + public static final BitSet FOLLOW_RPAREN_in_simple_expr710 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_NUMBER_in_simple_expr729 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_STRING_in_simple_expr734 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LPAREN_in_simple_expr739 = new BitSet(new long[]{0x2000401002001000L,0x000000000000000AL}); + public static final BitSet FOLLOW_expr_in_simple_expr741 = new BitSet(new long[]{0x0000000004000000L}); + public static final BitSet FOLLOW_RPAREN_in_simple_expr743 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_expr_in_expr_list762 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_SEPR_in_expr_list764 = new BitSet(new long[]{0x2000401002001000L,0x000000000000000AL}); + public static final BitSet FOLLOW_expr_list_in_expr_list766 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_expr_in_expr_list783 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_array_idx_in_array_idx_list794 = new BitSet(new long[]{0x0000000008000000L}); + public static final BitSet FOLLOW_array_idx_list_in_array_idx_list796 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_array_idx_in_array_idx_list813 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_LSQUARE_in_array_idx824 = new BitSet(new long[]{0x2000401002001000L,0x000000000000000AL}); + public static final BitSet FOLLOW_expr_in_array_idx826 = new BitSet(new long[]{0x0000000010000000L}); + public static final BitSet FOLLOW_RSQUARE_in_array_idx828 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_infix_bit_oper_in_infix_oper846 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_infix_arith_oper_in_infix_oper851 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_infix_bool_oper_in_infix_oper856 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_infix_cmp_oper_in_infix_oper861 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_set_in_infix_bit_oper0 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_set_in_infix_arith_oper0 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_set_in_infix_bool_oper0 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_set_in_infix_cmp_oper0 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_set_in_unary_oper0 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_binding_in_synpred1332 = new BitSet(new long[]{0x0000000040000000L}); - public static final BitSet FOLLOW_SEPR_in_synpred1334 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000001L}); + public static final BitSet FOLLOW_binding_in_synpred1332 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_SEPR_in_synpred1334 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000002L}); public static final BitSet FOLLOW_bindings_in_synpred1336 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_action_expr_in_synpred6487 = new BitSet(new long[]{0x0000000040000000L}); - public static final BitSet FOLLOW_SEPR_in_synpred6489 = new BitSet(new long[]{0x1000200801001000L,0x0000000000000005L}); + public static final BitSet FOLLOW_action_expr_in_synpred6487 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_SEPR_in_synpred6489 = new BitSet(new long[]{0x2000401003001000L,0x000000000000000AL}); public static final BitSet FOLLOW_action_expr_list_in_synpred6491 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_simple_expr_in_synpred7526 = new BitSet(new long[]{0x0003DFF600000000L}); - public static final BitSet FOLLOW_infix_oper_in_synpred7528 = new BitSet(new long[]{0x1000200801001000L,0x0000000000000005L}); - public static final BitSet FOLLOW_expr_in_synpred7530 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_simple_expr_in_synpred8548 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_expr_in_synpred17734 = new BitSet(new long[]{0x0000000040000000L}); - public static final BitSet FOLLOW_SEPR_in_synpred17736 = new BitSet(new long[]{0x1000200801001000L,0x0000000000000005L}); - public static final BitSet FOLLOW_expr_list_in_synpred17738 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_array_idx_in_synpred18766 = new BitSet(new long[]{0x0000000004000000L}); - public static final BitSet FOLLOW_array_idx_list_in_synpred18768 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_simple_expr_in_synpred9554 = new BitSet(new long[]{0x0007BFEC00000000L}); + public static final BitSet FOLLOW_infix_oper_in_synpred9556 = new BitSet(new long[]{0x2000401002001000L,0x000000000000000AL}); + public static final BitSet FOLLOW_expr_in_synpred9558 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_simple_expr_in_synpred10576 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_expr_in_synpred19762 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_SEPR_in_synpred19764 = new BitSet(new long[]{0x2000401002001000L,0x000000000000000AL}); + public static final BitSet FOLLOW_expr_list_in_synpred19766 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_array_idx_in_synpred20794 = new BitSet(new long[]{0x0000000008000000L}); + public static final BitSet FOLLOW_array_idx_list_in_synpred20796 = new BitSet(new long[]{0x0000000000000002L}); } \ No newline at end of file diff --git a/src/org/jboss/jbossts/orchestration/rule/grammar/ECATokenLexer.java b/src/org/jboss/jbossts/orchestration/rule/grammar/ECATokenLexer.java index 6e36ded..6093bbd 100644 --- a/src/org/jboss/jbossts/orchestration/rule/grammar/ECATokenLexer.java +++ b/src/org/jboss/jbossts/orchestration/rule/grammar/ECATokenLexer.java @@ -1,4 +1,4 @@ -// $ANTLR 3.0.1 dd/grammar/ECAToken.g 2008-09-22 16:26:17 +// $ANTLR 3.0.1 dd/grammar/ECAToken.g 2008-09-23 13:29:19 package org.jboss.jbossts.orchestration.rule.grammar; @@ -9,72 +9,73 @@ import java.util.ArrayList; public class ECATokenLexer extends Lexer { - public static final int MINUS=49; + public static final int MINUS=50; public static final int NUMBER=12; public static final int METHOD=18; public static final int FLOAT=11; public static final int FALSE=23; public static final int POSDIGIT=5; - public static final int TWIDDLE=45; - public static final int LEQ=41; + public static final int TWIDDLE=46; + public static final int LEQ=42; public static final int RULE=16; - public static final int MOD=50; - public static final int GEQ=40; - public static final int DQUOTE=56; - public static final int OR=33; - public static final int BOR=42; + public static final int MOD=51; + public static final int GEQ=41; + public static final int DQUOTE=57; + public static final int OR=34; + public static final int BOR=43; public static final int BAREINT=7; - public static final int LBRACE=28; - public static final int NEWLINE=58; - public static final int DOT=31; - public static final int RBRACE=29; + public static final int LBRACE=29; + public static final int NEWLINE=59; + public static final int DOT=32; + public static final int RBRACE=30; public static final int INTEGER=8; - public static final int AND=34; - public static final int ASSIGN=32; - public static final int SYMBOL=64; - public static final int RPAREN=25; + public static final int AND=35; + public static final int ASSIGN=33; + public static final int SYMBOL=65; + public static final int RPAREN=26; public static final int SIGN=6; - public static final int LPAREN=24; - public static final int PLUS=48; + public static final int LPAREN=25; + public static final int PLUS=49; public static final int DIGIT=4; public static final int LINE=19; - public static final int BAND=43; - public static final int NEQ=37; - public static final int SPACE=57; - public static final int LETTER=53; - public static final int LSQUARE=26; + public static final int BAND=44; + public static final int NEQ=38; + public static final int SPACE=58; + public static final int LETTER=54; + public static final int LSQUARE=27; public static final int DO=15; public static final int POINT=9; - public static final int BARESYM=61; + public static final int BARESYM=62; public static final int NOTHING=21; - public static final int SEPR=30; - public static final int WS=67; - public static final int STRING=60; - public static final int EQ=36; - public static final int QUOTSYM=62; - public static final int LT=39; - public static final int GT=38; - public static final int DOLLAR=65; - public static final int RSQUARE=27; - public static final int QUOTE=55; - public static final int TERN_IF=51; - public static final int MUL=46; + public static final int SEPR=31; + public static final int WS=68; + public static final int STRING=61; + public static final int EQ=37; + public static final int QUOTSYM=63; + public static final int LT=40; + public static final int GT=39; + public static final int DOLLAR=66; + public static final int RSQUARE=28; + public static final int QUOTE=56; + public static final int TERN_IF=52; + public static final int MUL=47; public static final int CLASS=17; public static final int EXPPART=10; - public static final int PUNCT=59; + public static final int PUNCT=60; + public static final int RETURN=24; public static final int IF=14; public static final int EOF=-1; - public static final int Tokens=68; - public static final int COLON=52; - public static final int DIV=47; - public static final int DOTSYM=63; - public static final int BXOR=44; + public static final int Tokens=69; + public static final int COLON=53; + public static final int DIV=48; + public static final int DOTSYM=64; + public static final int BXOR=45; public static final int ENDRULE=20; public static final int BIND=13; - public static final int NOT=35; + public static final int NOT=36; public static final int TRUE=22; - public static final int UNDERSCORE=54; - public static final int DOLLARSYM=66; + public static final int UNDERSCORE=55; + public static final int DOLLARSYM=67; public ECATokenLexer() {;} public ECATokenLexer(CharStream input) { super(input); @@ -634,12 +635,58 @@ else if ( (LA8_0=='f') ) { } // $ANTLR end FALSE + // $ANTLR start RETURN + public final void mRETURN() throws RecognitionException { + try { + int _type = RETURN; + // dd/grammar/ECAToken.g:79:8: ( 'RETURN' | 'return' ) + int alt9=2; + int LA9_0 = input.LA(1); + + if ( (LA9_0=='R') ) { + alt9=1; + } + else if ( (LA9_0=='r') ) { + alt9=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("79:1: RETURN : ( 'RETURN' | 'return' );", 9, 0, input); + + throw nvae; + } + switch (alt9) { + case 1 : + // dd/grammar/ECAToken.g:79:10: 'RETURN' + { + match("RETURN"); + + + } + break; + case 2 : + // dd/grammar/ECAToken.g:79:19: 'return' + { + match("return"); + + + } + break; + + } + this.type = _type; + } + finally { + } + } + // $ANTLR end RETURN + // $ANTLR start LPAREN public final void mLPAREN() throws RecognitionException { try { int _type = LPAREN; - // dd/grammar/ECAToken.g:81:8: ( '(' ) - // dd/grammar/ECAToken.g:81:10: '(' + // dd/grammar/ECAToken.g:84:8: ( '(' ) + // dd/grammar/ECAToken.g:84:10: '(' { match('('); @@ -656,8 +703,8 @@ public final void mLPAREN() throws RecognitionException { public final void mRPAREN() throws RecognitionException { try { int _type = RPAREN; - // dd/grammar/ECAToken.g:84:8: ( ')' ) - // dd/grammar/ECAToken.g:84:10: ')' + // dd/grammar/ECAToken.g:87:8: ( ')' ) + // dd/grammar/ECAToken.g:87:10: ')' { match(')'); @@ -674,8 +721,8 @@ public final void mRPAREN() throws RecognitionException { public final void mLSQUARE() throws RecognitionException { try { int _type = LSQUARE; - // dd/grammar/ECAToken.g:87:9: ( '\\[' ) - // dd/grammar/ECAToken.g:87:11: '\\[' + // dd/grammar/ECAToken.g:90:9: ( '\\[' ) + // dd/grammar/ECAToken.g:90:11: '\\[' { match('['); @@ -692,8 +739,8 @@ public final void mLSQUARE() throws RecognitionException { public final void mRSQUARE() throws RecognitionException { try { int _type = RSQUARE; - // dd/grammar/ECAToken.g:90:9: ( '\\]' ) - // dd/grammar/ECAToken.g:90:11: '\\]' + // dd/grammar/ECAToken.g:93:9: ( '\\]' ) + // dd/grammar/ECAToken.g:93:11: '\\]' { match(']'); @@ -710,8 +757,8 @@ public final void mRSQUARE() throws RecognitionException { public final void mLBRACE() throws RecognitionException { try { int _type = LBRACE; - // dd/grammar/ECAToken.g:93:8: ( '{' ) - // dd/grammar/ECAToken.g:93:10: '{' + // dd/grammar/ECAToken.g:96:8: ( '{' ) + // dd/grammar/ECAToken.g:96:10: '{' { match('{'); @@ -728,8 +775,8 @@ public final void mLBRACE() throws RecognitionException { public final void mRBRACE() throws RecognitionException { try { int _type = RBRACE; - // dd/grammar/ECAToken.g:96:8: ( '}' ) - // dd/grammar/ECAToken.g:96:10: '}' + // dd/grammar/ECAToken.g:99:8: ( '}' ) + // dd/grammar/ECAToken.g:99:10: '}' { match('}'); @@ -746,7 +793,7 @@ public final void mRBRACE() throws RecognitionException { public final void mSEPR() throws RecognitionException { try { int _type = SEPR; - // dd/grammar/ECAToken.g:101:6: ( ';' | ',' ) + // dd/grammar/ECAToken.g:104:6: ( ';' | ',' ) // dd/grammar/ECAToken.g: { if ( input.LA(1)==','||input.LA(1)==';' ) { @@ -773,8 +820,8 @@ public final void mSEPR() throws RecognitionException { public final void mDOT() throws RecognitionException { try { int _type = DOT; - // dd/grammar/ECAToken.g:107:5: ( '.' ) - // dd/grammar/ECAToken.g:107:7: '.' + // dd/grammar/ECAToken.g:110:5: ( '.' ) + // dd/grammar/ECAToken.g:110:7: '.' { match('.'); @@ -791,32 +838,32 @@ public final void mDOT() throws RecognitionException { public final void mASSIGN() throws RecognitionException { try { int _type = ASSIGN; - // dd/grammar/ECAToken.g:112:8: ( '=' | '<--' ) - int alt9=2; - int LA9_0 = input.LA(1); + // dd/grammar/ECAToken.g:115:8: ( '=' | '<--' ) + int alt10=2; + int LA10_0 = input.LA(1); - if ( (LA9_0=='=') ) { - alt9=1; + if ( (LA10_0=='=') ) { + alt10=1; } - else if ( (LA9_0=='<') ) { - alt9=2; + else if ( (LA10_0=='<') ) { + alt10=2; } else { NoViableAltException nvae = - new NoViableAltException("112:1: ASSIGN : ( '=' | '<--' );", 9, 0, input); + new NoViableAltException("115:1: ASSIGN : ( '=' | '<--' );", 10, 0, input); throw nvae; } - switch (alt9) { + switch (alt10) { case 1 : - // dd/grammar/ECAToken.g:112:10: '=' + // dd/grammar/ECAToken.g:115:10: '=' { match('='); } break; case 2 : - // dd/grammar/ECAToken.g:113:4: '<--' + // dd/grammar/ECAToken.g:116:4: '<--' { match("<--"); @@ -836,34 +883,34 @@ else if ( (LA9_0=='<') ) { public final void mOR() throws RecognitionException { try { int _type = OR; - // dd/grammar/ECAToken.g:118:4: ( '||' | 'OR' | 'or' ) - int alt10=3; + // dd/grammar/ECAToken.g:121:4: ( '||' | 'OR' | 'or' ) + int alt11=3; switch ( input.LA(1) ) { case '|': { - alt10=1; + alt11=1; } break; case 'O': { - alt10=2; + alt11=2; } break; case 'o': { - alt10=3; + alt11=3; } break; default: NoViableAltException nvae = - new NoViableAltException("118:1: OR : ( '||' | 'OR' | 'or' );", 10, 0, input); + new NoViableAltException("121:1: OR : ( '||' | 'OR' | 'or' );", 11, 0, input); throw nvae; } - switch (alt10) { + switch (alt11) { case 1 : - // dd/grammar/ECAToken.g:118:6: '||' + // dd/grammar/ECAToken.g:121:6: '||' { match("||"); @@ -871,7 +918,7 @@ public final void mOR() throws RecognitionException { } break; case 2 : - // dd/grammar/ECAToken.g:119:4: 'OR' + // dd/grammar/ECAToken.g:122:4: 'OR' { match("OR"); @@ -879,7 +926,7 @@ public final void mOR() throws RecognitionException { } break; case 3 : - // dd/grammar/ECAToken.g:120:4: 'or' + // dd/grammar/ECAToken.g:123:4: 'or' { match("or"); @@ -899,34 +946,34 @@ public final void mOR() throws RecognitionException { public final void mAND() throws RecognitionException { try { int _type = AND; - // dd/grammar/ECAToken.g:123:5: ( '&&' | 'AND' | 'and' ) - int alt11=3; + // dd/grammar/ECAToken.g:126:5: ( '&&' | 'AND' | 'and' ) + int alt12=3; switch ( input.LA(1) ) { case '&': { - alt11=1; + alt12=1; } break; case 'A': { - alt11=2; + alt12=2; } break; case 'a': { - alt11=3; + alt12=3; } break; default: NoViableAltException nvae = - new NoViableAltException("123:1: AND : ( '&&' | 'AND' | 'and' );", 11, 0, input); + new NoViableAltException("126:1: AND : ( '&&' | 'AND' | 'and' );", 12, 0, input); throw nvae; } - switch (alt11) { + switch (alt12) { case 1 : - // dd/grammar/ECAToken.g:123:7: '&&' + // dd/grammar/ECAToken.g:126:7: '&&' { match("&&"); @@ -934,7 +981,7 @@ public final void mAND() throws RecognitionException { } break; case 2 : - // dd/grammar/ECAToken.g:124:4: 'AND' + // dd/grammar/ECAToken.g:127:4: 'AND' { match("AND"); @@ -942,7 +989,7 @@ public final void mAND() throws RecognitionException { } break; case 3 : - // dd/grammar/ECAToken.g:125:4: 'and' + // dd/grammar/ECAToken.g:128:4: 'and' { match("and"); @@ -962,41 +1009,41 @@ public final void mAND() throws RecognitionException { public final void mNOT() throws RecognitionException { try { int _type = NOT; - // dd/grammar/ECAToken.g:128:5: ( '!' | 'NOT' | 'not' ) - int alt12=3; + // dd/grammar/ECAToken.g:131:5: ( '!' | 'NOT' | 'not' ) + int alt13=3; switch ( input.LA(1) ) { case '!': { - alt12=1; + alt13=1; } break; case 'N': { - alt12=2; + alt13=2; } break; case 'n': { - alt12=3; + alt13=3; } break; default: NoViableAltException nvae = - new NoViableAltException("128:1: NOT : ( '!' | 'NOT' | 'not' );", 12, 0, input); + new NoViableAltException("131:1: NOT : ( '!' | 'NOT' | 'not' );", 13, 0, input); throw nvae; } - switch (alt12) { + switch (alt13) { case 1 : - // dd/grammar/ECAToken.g:128:7: '!' + // dd/grammar/ECAToken.g:131:7: '!' { match('!'); } break; case 2 : - // dd/grammar/ECAToken.g:129:4: 'NOT' + // dd/grammar/ECAToken.g:132:4: 'NOT' { match("NOT"); @@ -1004,7 +1051,7 @@ public final void mNOT() throws RecognitionException { } break; case 3 : - // dd/grammar/ECAToken.g:130:4: 'not' + // dd/grammar/ECAToken.g:133:4: 'not' { match("not"); @@ -1024,34 +1071,34 @@ public final void mNOT() throws RecognitionException { public final void mEQ() throws RecognitionException { try { int _type = EQ; - // dd/grammar/ECAToken.g:135:4: ( '==' | 'EQ' | 'eq' ) - int alt13=3; + // dd/grammar/ECAToken.g:138:4: ( '==' | 'EQ' | 'eq' ) + int alt14=3; switch ( input.LA(1) ) { case '=': { - alt13=1; + alt14=1; } break; case 'E': { - alt13=2; + alt14=2; } break; case 'e': { - alt13=3; + alt14=3; } break; default: NoViableAltException nvae = - new NoViableAltException("135:1: EQ : ( '==' | 'EQ' | 'eq' );", 13, 0, input); + new NoViableAltException("138:1: EQ : ( '==' | 'EQ' | 'eq' );", 14, 0, input); throw nvae; } - switch (alt13) { + switch (alt14) { case 1 : - // dd/grammar/ECAToken.g:135:6: '==' + // dd/grammar/ECAToken.g:138:6: '==' { match("=="); @@ -1059,7 +1106,7 @@ public final void mEQ() throws RecognitionException { } break; case 2 : - // dd/grammar/ECAToken.g:136:4: 'EQ' + // dd/grammar/ECAToken.g:139:4: 'EQ' { match("EQ"); @@ -1067,7 +1114,7 @@ public final void mEQ() throws RecognitionException { } break; case 3 : - // dd/grammar/ECAToken.g:137:4: 'eq' + // dd/grammar/ECAToken.g:140:4: 'eq' { match("eq"); @@ -1087,34 +1134,34 @@ public final void mEQ() throws RecognitionException { public final void mNEQ() throws RecognitionException { try { int _type = NEQ; - // dd/grammar/ECAToken.g:140:5: ( '!=' | 'NEQ' | 'neq' ) - int alt14=3; + // dd/grammar/ECAToken.g:143:5: ( '!=' | 'NEQ' | 'neq' ) + int alt15=3; switch ( input.LA(1) ) { case '!': { - alt14=1; + alt15=1; } break; case 'N': { - alt14=2; + alt15=2; } break; case 'n': { - alt14=3; + alt15=3; } break; default: NoViableAltException nvae = - new NoViableAltException("140:1: NEQ : ( '!=' | 'NEQ' | 'neq' );", 14, 0, input); + new NoViableAltException("143:1: NEQ : ( '!=' | 'NEQ' | 'neq' );", 15, 0, input); throw nvae; } - switch (alt14) { + switch (alt15) { case 1 : - // dd/grammar/ECAToken.g:140:7: '!=' + // dd/grammar/ECAToken.g:143:7: '!=' { match("!="); @@ -1122,7 +1169,7 @@ public final void mNEQ() throws RecognitionException { } break; case 2 : - // dd/grammar/ECAToken.g:141:4: 'NEQ' + // dd/grammar/ECAToken.g:144:4: 'NEQ' { match("NEQ"); @@ -1130,7 +1177,7 @@ public final void mNEQ() throws RecognitionException { } break; case 3 : - // dd/grammar/ECAToken.g:142:4: 'neq' + // dd/grammar/ECAToken.g:145:4: 'neq' { match("neq"); @@ -1150,41 +1197,41 @@ public final void mNEQ() throws RecognitionException { public final void mGT() throws RecognitionException { try { int _type = GT; - // dd/grammar/ECAToken.g:145:4: ( '>' | 'GT' | 'gt' ) - int alt15=3; + // dd/grammar/ECAToken.g:148:4: ( '>' | 'GT' | 'gt' ) + int alt16=3; switch ( input.LA(1) ) { case '>': { - alt15=1; + alt16=1; } break; case 'G': { - alt15=2; + alt16=2; } break; case 'g': { - alt15=3; + alt16=3; } break; default: NoViableAltException nvae = - new NoViableAltException("145:1: GT : ( '>' | 'GT' | 'gt' );", 15, 0, input); + new NoViableAltException("148:1: GT : ( '>' | 'GT' | 'gt' );", 16, 0, input); throw nvae; } - switch (alt15) { + switch (alt16) { case 1 : - // dd/grammar/ECAToken.g:145:6: '>' + // dd/grammar/ECAToken.g:148:6: '>' { match('>'); } break; case 2 : - // dd/grammar/ECAToken.g:146:4: 'GT' + // dd/grammar/ECAToken.g:149:4: 'GT' { match("GT"); @@ -1192,7 +1239,7 @@ public final void mGT() throws RecognitionException { } break; case 3 : - // dd/grammar/ECAToken.g:147:4: 'gt' + // dd/grammar/ECAToken.g:150:4: 'gt' { match("gt"); @@ -1212,41 +1259,41 @@ public final void mGT() throws RecognitionException { public final void mLT() throws RecognitionException { try { int _type = LT; - // dd/grammar/ECAToken.g:150:4: ( '<' | 'LT' | 'lt' ) - int alt16=3; + // dd/grammar/ECAToken.g:153:4: ( '<' | 'LT' | 'lt' ) + int alt17=3; switch ( input.LA(1) ) { case '<': { - alt16=1; + alt17=1; } break; case 'L': { - alt16=2; + alt17=2; } break; case 'l': { - alt16=3; + alt17=3; } break; default: NoViableAltException nvae = - new NoViableAltException("150:1: LT : ( '<' | 'LT' | 'lt' );", 16, 0, input); + new NoViableAltException("153:1: LT : ( '<' | 'LT' | 'lt' );", 17, 0, input); throw nvae; } - switch (alt16) { + switch (alt17) { case 1 : - // dd/grammar/ECAToken.g:150:6: '<' + // dd/grammar/ECAToken.g:153:6: '<' { match('<'); } break; case 2 : - // dd/grammar/ECAToken.g:151:4: 'LT' + // dd/grammar/ECAToken.g:154:4: 'LT' { match("LT"); @@ -1254,7 +1301,7 @@ public final void mLT() throws RecognitionException { } break; case 3 : - // dd/grammar/ECAToken.g:152:4: 'lt' + // dd/grammar/ECAToken.g:155:4: 'lt' { match("lt"); @@ -1274,34 +1321,34 @@ public final void mLT() throws RecognitionException { public final void mGEQ() throws RecognitionException { try { int _type = GEQ; - // dd/grammar/ECAToken.g:155:5: ( '>=' | 'EQ' | 'geq' ) - int alt17=3; + // dd/grammar/ECAToken.g:158:5: ( '>=' | 'EQ' | 'geq' ) + int alt18=3; switch ( input.LA(1) ) { case '>': { - alt17=1; + alt18=1; } break; case 'E': { - alt17=2; + alt18=2; } break; case 'g': { - alt17=3; + alt18=3; } break; default: NoViableAltException nvae = - new NoViableAltException("155:1: GEQ : ( '>=' | 'EQ' | 'geq' );", 17, 0, input); + new NoViableAltException("158:1: GEQ : ( '>=' | 'EQ' | 'geq' );", 18, 0, input); throw nvae; } - switch (alt17) { + switch (alt18) { case 1 : - // dd/grammar/ECAToken.g:155:7: '>=' + // dd/grammar/ECAToken.g:158:7: '>=' { match(">="); @@ -1309,7 +1356,7 @@ public final void mGEQ() throws RecognitionException { } break; case 2 : - // dd/grammar/ECAToken.g:156:4: 'EQ' + // dd/grammar/ECAToken.g:159:4: 'EQ' { match("EQ"); @@ -1317,7 +1364,7 @@ public final void mGEQ() throws RecognitionException { } break; case 3 : - // dd/grammar/ECAToken.g:157:4: 'geq' + // dd/grammar/ECAToken.g:160:4: 'geq' { match("geq"); @@ -1337,34 +1384,34 @@ public final void mGEQ() throws RecognitionException { public final void mLEQ() throws RecognitionException { try { int _type = LEQ; - // dd/grammar/ECAToken.g:160:5: ( '<=' | 'LEQ' | 'leq' ) - int alt18=3; + // dd/grammar/ECAToken.g:163:5: ( '<=' | 'LEQ' | 'leq' ) + int alt19=3; switch ( input.LA(1) ) { case '<': { - alt18=1; + alt19=1; } break; case 'L': { - alt18=2; + alt19=2; } break; case 'l': { - alt18=3; + alt19=3; } break; default: NoViableAltException nvae = - new NoViableAltException("160:1: LEQ : ( '<=' | 'LEQ' | 'leq' );", 18, 0, input); + new NoViableAltException("163:1: LEQ : ( '<=' | 'LEQ' | 'leq' );", 19, 0, input); throw nvae; } - switch (alt18) { + switch (alt19) { case 1 : - // dd/grammar/ECAToken.g:160:7: '<=' + // dd/grammar/ECAToken.g:163:7: '<=' { match("<="); @@ -1372,7 +1419,7 @@ public final void mLEQ() throws RecognitionException { } break; case 2 : - // dd/grammar/ECAToken.g:161:4: 'LEQ' + // dd/grammar/ECAToken.g:164:4: 'LEQ' { match("LEQ"); @@ -1380,7 +1427,7 @@ public final void mLEQ() throws RecognitionException { } break; case 3 : - // dd/grammar/ECAToken.g:162:4: 'leq' + // dd/grammar/ECAToken.g:165:4: 'leq' { match("leq"); @@ -1400,8 +1447,8 @@ public final void mLEQ() throws RecognitionException { public final void mBOR() throws RecognitionException { try { int _type = BOR; - // dd/grammar/ECAToken.g:167:5: ( '|' ) - // dd/grammar/ECAToken.g:167:7: '|' + // dd/grammar/ECAToken.g:170:5: ( '|' ) + // dd/grammar/ECAToken.g:170:7: '|' { match('|'); @@ -1418,8 +1465,8 @@ public final void mBOR() throws RecognitionException { public final void mBAND() throws RecognitionException { try { int _type = BAND; - // dd/grammar/ECAToken.g:170:6: ( '&' ) - // dd/grammar/ECAToken.g:170:8: '&' + // dd/grammar/ECAToken.g:173:6: ( '&' ) + // dd/grammar/ECAToken.g:173:8: '&' { match('&'); @@ -1436,8 +1483,8 @@ public final void mBAND() throws RecognitionException { public final void mBXOR() throws RecognitionException { try { int _type = BXOR; - // dd/grammar/ECAToken.g:173:6: ( '^' ) - // dd/grammar/ECAToken.g:173:8: '^' + // dd/grammar/ECAToken.g:176:6: ( '^' ) + // dd/grammar/ECAToken.g:176:8: '^' { match('^'); @@ -1454,8 +1501,8 @@ public final void mBXOR() throws RecognitionException { public final void mTWIDDLE() throws RecognitionException { try { int _type = TWIDDLE; - // dd/grammar/ECAToken.g:176:9: ( '~' ) - // dd/grammar/ECAToken.g:176:11: '~' + // dd/grammar/ECAToken.g:179:9: ( '~' ) + // dd/grammar/ECAToken.g:179:11: '~' { match('~'); @@ -1472,41 +1519,41 @@ public final void mTWIDDLE() throws RecognitionException { public final void mMUL() throws RecognitionException { try { int _type = MUL; - // dd/grammar/ECAToken.g:181:5: ( '*' | 'TIMES' | 'times' ) - int alt19=3; + // dd/grammar/ECAToken.g:184:5: ( '*' | 'TIMES' | 'times' ) + int alt20=3; switch ( input.LA(1) ) { case '*': { - alt19=1; + alt20=1; } break; case 'T': { - alt19=2; + alt20=2; } break; case 't': { - alt19=3; + alt20=3; } break; default: NoViableAltException nvae = - new NoViableAltException("181:1: MUL : ( '*' | 'TIMES' | 'times' );", 19, 0, input); + new NoViableAltException("184:1: MUL : ( '*' | 'TIMES' | 'times' );", 20, 0, input); throw nvae; } - switch (alt19) { + switch (alt20) { case 1 : - // dd/grammar/ECAToken.g:181:7: '*' + // dd/grammar/ECAToken.g:184:7: '*' { match('*'); } break; case 2 : - // dd/grammar/ECAToken.g:182:4: 'TIMES' + // dd/grammar/ECAToken.g:185:4: 'TIMES' { match("TIMES"); @@ -1514,7 +1561,7 @@ public final void mMUL() throws RecognitionException { } break; case 3 : - // dd/grammar/ECAToken.g:183:4: 'times' + // dd/grammar/ECAToken.g:186:4: 'times' { match("times"); @@ -1534,41 +1581,41 @@ public final void mMUL() throws RecognitionException { public final void mDIV() throws RecognitionException { try { int _type = DIV; - // dd/grammar/ECAToken.g:186:5: ( '/' | 'DIVIDE' | 'divide' ) - int alt20=3; + // dd/grammar/ECAToken.g:189:5: ( '/' | 'DIVIDE' | 'divide' ) + int alt21=3; switch ( input.LA(1) ) { case '/': { - alt20=1; + alt21=1; } break; case 'D': { - alt20=2; + alt21=2; } break; case 'd': { - alt20=3; + alt21=3; } break; default: NoViableAltException nvae = - new NoViableAltException("186:1: DIV : ( '/' | 'DIVIDE' | 'divide' );", 20, 0, input); + new NoViableAltException("189:1: DIV : ( '/' | 'DIVIDE' | 'divide' );", 21, 0, input); throw nvae; } - switch (alt20) { + switch (alt21) { case 1 : - // dd/grammar/ECAToken.g:186:7: '/' + // dd/grammar/ECAToken.g:189:7: '/' { match('/'); } break; case 2 : - // dd/grammar/ECAToken.g:187:4: 'DIVIDE' + // dd/grammar/ECAToken.g:190:4: 'DIVIDE' { match("DIVIDE"); @@ -1576,7 +1623,7 @@ public final void mDIV() throws RecognitionException { } break; case 3 : - // dd/grammar/ECAToken.g:188:4: 'divide' + // dd/grammar/ECAToken.g:191:4: 'divide' { match("divide"); @@ -1596,41 +1643,41 @@ public final void mDIV() throws RecognitionException { public final void mPLUS() throws RecognitionException { try { int _type = PLUS; - // dd/grammar/ECAToken.g:191:6: ( '+' | 'PLUS' | 'plus' ) - int alt21=3; + // dd/grammar/ECAToken.g:194:6: ( '+' | 'PLUS' | 'plus' ) + int alt22=3; switch ( input.LA(1) ) { case '+': { - alt21=1; + alt22=1; } break; case 'P': { - alt21=2; + alt22=2; } break; case 'p': { - alt21=3; + alt22=3; } break; default: NoViableAltException nvae = - new NoViableAltException("191:1: PLUS : ( '+' | 'PLUS' | 'plus' );", 21, 0, input); + new NoViableAltException("194:1: PLUS : ( '+' | 'PLUS' | 'plus' );", 22, 0, input); throw nvae; } - switch (alt21) { + switch (alt22) { case 1 : - // dd/grammar/ECAToken.g:191:8: '+' + // dd/grammar/ECAToken.g:194:8: '+' { match('+'); } break; case 2 : - // dd/grammar/ECAToken.g:192:4: 'PLUS' + // dd/grammar/ECAToken.g:195:4: 'PLUS' { match("PLUS"); @@ -1638,7 +1685,7 @@ public final void mPLUS() throws RecognitionException { } break; case 3 : - // dd/grammar/ECAToken.g:193:4: 'plus' + // dd/grammar/ECAToken.g:196:4: 'plus' { match("plus"); @@ -1658,41 +1705,41 @@ public final void mPLUS() throws RecognitionException { public final void mMINUS() throws RecognitionException { try { int _type = MINUS; - // dd/grammar/ECAToken.g:196:7: ( '-' | 'MINUS' | 'minus' ) - int alt22=3; + // dd/grammar/ECAToken.g:199:7: ( '-' | 'MINUS' | 'minus' ) + int alt23=3; switch ( input.LA(1) ) { case '-': { - alt22=1; + alt23=1; } break; case 'M': { - alt22=2; + alt23=2; } break; case 'm': { - alt22=3; + alt23=3; } break; default: NoViableAltException nvae = - new NoViableAltException("196:1: MINUS : ( '-' | 'MINUS' | 'minus' );", 22, 0, input); + new NoViableAltException("199:1: MINUS : ( '-' | 'MINUS' | 'minus' );", 23, 0, input); throw nvae; } - switch (alt22) { + switch (alt23) { case 1 : - // dd/grammar/ECAToken.g:196:9: '-' + // dd/grammar/ECAToken.g:199:9: '-' { match('-'); } break; case 2 : - // dd/grammar/ECAToken.g:197:4: 'MINUS' + // dd/grammar/ECAToken.g:200:4: 'MINUS' { match("MINUS"); @@ -1700,7 +1747,7 @@ public final void mMINUS() throws RecognitionException { } break; case 3 : - // dd/grammar/ECAToken.g:198:4: 'minus' + // dd/grammar/ECAToken.g:201:4: 'minus' { match("minus"); @@ -1720,41 +1767,41 @@ public final void mMINUS() throws RecognitionException { public final void mMOD() throws RecognitionException { try { int _type = MOD; - // dd/grammar/ECAToken.g:201:5: ( '%' | 'MOD' | 'mod' ) - int alt23=3; + // dd/grammar/ECAToken.g:204:5: ( '%' | 'MOD' | 'mod' ) + int alt24=3; switch ( input.LA(1) ) { case '%': { - alt23=1; + alt24=1; } break; case 'M': { - alt23=2; + alt24=2; } break; case 'm': { - alt23=3; + alt24=3; } break; default: NoViableAltException nvae = - new NoViableAltException("201:1: MOD : ( '%' | 'MOD' | 'mod' );", 23, 0, input); + new NoViableAltException("204:1: MOD : ( '%' | 'MOD' | 'mod' );", 24, 0, input); throw nvae; } - switch (alt23) { + switch (alt24) { case 1 : - // dd/grammar/ECAToken.g:201:7: '%' + // dd/grammar/ECAToken.g:204:7: '%' { match('%'); } break; case 2 : - // dd/grammar/ECAToken.g:202:4: 'MOD' + // dd/grammar/ECAToken.g:205:4: 'MOD' { match("MOD"); @@ -1762,7 +1809,7 @@ public final void mMOD() throws RecognitionException { } break; case 3 : - // dd/grammar/ECAToken.g:203:4: 'mod' + // dd/grammar/ECAToken.g:206:4: 'mod' { match("mod"); @@ -1782,8 +1829,8 @@ public final void mMOD() throws RecognitionException { public final void mTERN_IF() throws RecognitionException { try { int _type = TERN_IF; - // dd/grammar/ECAToken.g:208:9: ( '?' ) - // dd/grammar/ECAToken.g:208:11: '?' + // dd/grammar/ECAToken.g:211:9: ( '?' ) + // dd/grammar/ECAToken.g:211:11: '?' { match('?'); @@ -1800,8 +1847,8 @@ public final void mTERN_IF() throws RecognitionException { public final void mCOLON() throws RecognitionException { try { int _type = COLON; - // dd/grammar/ECAToken.g:211:7: ( ':' ) - // dd/grammar/ECAToken.g:211:9: ':' + // dd/grammar/ECAToken.g:214:7: ( ':' ) + // dd/grammar/ECAToken.g:214:9: ':' { match(':'); @@ -1817,7 +1864,7 @@ public final void mCOLON() throws RecognitionException { // $ANTLR start LETTER public final void mLETTER() throws RecognitionException { try { - // dd/grammar/ECAToken.g:217:8: ( 'a' .. 'z' | 'A' .. 'Z' ) + // dd/grammar/ECAToken.g:220:8: ( 'a' .. 'z' | 'A' .. 'Z' ) // dd/grammar/ECAToken.g: { if ( (input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) { @@ -1842,8 +1889,8 @@ public final void mLETTER() throws RecognitionException { // $ANTLR start UNDERSCORE public final void mUNDERSCORE() throws RecognitionException { try { - // dd/grammar/ECAToken.g:221:12: ( '_' ) - // dd/grammar/ECAToken.g:221:14: '_' + // dd/grammar/ECAToken.g:224:12: ( '_' ) + // dd/grammar/ECAToken.g:224:14: '_' { match('_'); @@ -1859,8 +1906,8 @@ public final void mUNDERSCORE() throws RecognitionException { public final void mQUOTE() throws RecognitionException { try { int _type = QUOTE; - // dd/grammar/ECAToken.g:224:7: ( '\\'' ) - // dd/grammar/ECAToken.g:224:9: '\\'' + // dd/grammar/ECAToken.g:227:7: ( '\\'' ) + // dd/grammar/ECAToken.g:227:9: '\\'' { match('\''); @@ -1877,8 +1924,8 @@ public final void mQUOTE() throws RecognitionException { public final void mDQUOTE() throws RecognitionException { try { int _type = DQUOTE; - // dd/grammar/ECAToken.g:227:8: ( '\"' ) - // dd/grammar/ECAToken.g:227:10: '\"' + // dd/grammar/ECAToken.g:230:8: ( '\"' ) + // dd/grammar/ECAToken.g:230:10: '\"' { match('\"'); @@ -1894,7 +1941,7 @@ public final void mDQUOTE() throws RecognitionException { // $ANTLR start SPACE public final void mSPACE() throws RecognitionException { try { - // dd/grammar/ECAToken.g:231:7: ( ' ' | '\\t' | '\\r' ) + // dd/grammar/ECAToken.g:234:7: ( ' ' | '\\t' | '\\r' ) // dd/grammar/ECAToken.g: { if ( input.LA(1)=='\t'||input.LA(1)=='\r'||input.LA(1)==' ' ) { @@ -1919,8 +1966,8 @@ public final void mSPACE() throws RecognitionException { // $ANTLR start NEWLINE public final void mNEWLINE() throws RecognitionException { try { - // dd/grammar/ECAToken.g:235:9: ( '\\n' ) - // dd/grammar/ECAToken.g:235:11: '\\n' + // dd/grammar/ECAToken.g:238:9: ( '\\n' ) + // dd/grammar/ECAToken.g:238:11: '\\n' { match('\n'); @@ -1935,7 +1982,7 @@ public final void mNEWLINE() throws RecognitionException { // $ANTLR start PUNCT public final void mPUNCT() throws RecognitionException { try { - // dd/grammar/ECAToken.g:239:7: ( '!' | '$' | '%' | '^' | '&' | '*' | '(' | ')' | '-' | '+' | '=' | '{' | '}' | '[' | ']' | ':' | ';' | '@' | '~' | '#' | '|' | '\\\\' | '`' | ',' | '<' | '.' | '>' | '/' | '?' ) + // dd/grammar/ECAToken.g:242:7: ( '!' | '$' | '%' | '^' | '&' | '*' | '(' | ')' | '-' | '+' | '=' | '{' | '}' | '[' | ']' | ':' | ';' | '@' | '~' | '#' | '|' | '\\\\' | '`' | ',' | '<' | '.' | '>' | '/' | '?' ) // dd/grammar/ECAToken.g: { if ( input.LA(1)=='!'||(input.LA(1)>='#' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='/')||(input.LA(1)>=':' && input.LA(1)<='@')||(input.LA(1)>='[' && input.LA(1)<='^')||input.LA(1)=='`'||(input.LA(1)>='{' && input.LA(1)<='~') ) { @@ -1961,22 +2008,22 @@ public final void mPUNCT() throws RecognitionException { public final void mSTRING() throws RecognitionException { try { int _type = STRING; - // dd/grammar/ECAToken.g:242:8: ( DQUOTE ( SPACE | PUNCT | LETTER | UNDERSCORE | DIGIT | QUOTE )* DQUOTE ) - // dd/grammar/ECAToken.g:242:10: DQUOTE ( SPACE | PUNCT | LETTER | UNDERSCORE | DIGIT | QUOTE )* DQUOTE + // dd/grammar/ECAToken.g:245:8: ( DQUOTE ( SPACE | PUNCT | LETTER | UNDERSCORE | DIGIT | QUOTE )* DQUOTE ) + // dd/grammar/ECAToken.g:245:10: DQUOTE ( SPACE | PUNCT | LETTER | UNDERSCORE | DIGIT | QUOTE )* DQUOTE { mDQUOTE(); - // dd/grammar/ECAToken.g:242:17: ( SPACE | PUNCT | LETTER | UNDERSCORE | DIGIT | QUOTE )* - loop24: + // dd/grammar/ECAToken.g:245:17: ( SPACE | PUNCT | LETTER | UNDERSCORE | DIGIT | QUOTE )* + loop25: do { - int alt24=2; - int LA24_0 = input.LA(1); + int alt25=2; + int LA25_0 = input.LA(1); - if ( (LA24_0=='\t'||LA24_0=='\r'||(LA24_0>=' ' && LA24_0<='!')||(LA24_0>='#' && LA24_0<='~')) ) { - alt24=1; + if ( (LA25_0=='\t'||LA25_0=='\r'||(LA25_0>=' ' && LA25_0<='!')||(LA25_0>='#' && LA25_0<='~')) ) { + alt25=1; } - switch (alt24) { + switch (alt25) { case 1 : // dd/grammar/ECAToken.g: { @@ -1995,7 +2042,7 @@ public final void mSTRING() throws RecognitionException { break; default : - break loop24; + break loop25; } } while (true); @@ -2013,8 +2060,8 @@ public final void mSTRING() throws RecognitionException { // $ANTLR start BARESYM public final void mBARESYM() throws RecognitionException { try { - // dd/grammar/ECAToken.g:246:9: ( ( LETTER | UNDERSCORE ) ( LETTER | DIGIT | UNDERSCORE )* ) - // dd/grammar/ECAToken.g:246:11: ( LETTER | UNDERSCORE ) ( LETTER | DIGIT | UNDERSCORE )* + // dd/grammar/ECAToken.g:249:9: ( ( LETTER | UNDERSCORE ) ( LETTER | DIGIT | UNDERSCORE )* ) + // dd/grammar/ECAToken.g:249:11: ( LETTER | UNDERSCORE ) ( LETTER | DIGIT | UNDERSCORE )* { if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { input.consume(); @@ -2026,18 +2073,18 @@ public final void mBARESYM() throws RecognitionException { recover(mse); throw mse; } - // dd/grammar/ECAToken.g:246:33: ( LETTER | DIGIT | UNDERSCORE )* - loop25: + // dd/grammar/ECAToken.g:249:33: ( LETTER | DIGIT | UNDERSCORE )* + loop26: do { - int alt25=2; - int LA25_0 = input.LA(1); + int alt26=2; + int LA26_0 = input.LA(1); - if ( ((LA25_0>='0' && LA25_0<='9')||(LA25_0>='A' && LA25_0<='Z')||LA25_0=='_'||(LA25_0>='a' && LA25_0<='z')) ) { - alt25=1; + if ( ((LA26_0>='0' && LA26_0<='9')||(LA26_0>='A' && LA26_0<='Z')||LA26_0=='_'||(LA26_0>='a' && LA26_0<='z')) ) { + alt26=1; } - switch (alt25) { + switch (alt26) { case 1 : // dd/grammar/ECAToken.g: { @@ -2056,7 +2103,7 @@ public final void mBARESYM() throws RecognitionException { break; default : - break loop25; + break loop26; } } while (true); @@ -2072,22 +2119,22 @@ public final void mBARESYM() throws RecognitionException { // $ANTLR start QUOTSYM public final void mQUOTSYM() throws RecognitionException { try { - // dd/grammar/ECAToken.g:249:9: ( QUOTE ( PUNCT | LETTER | UNDERSCORE | DIGIT | DQUOTE | SPACE )* QUOTE ) - // dd/grammar/ECAToken.g:249:11: QUOTE ( PUNCT | LETTER | UNDERSCORE | DIGIT | DQUOTE | SPACE )* QUOTE + // dd/grammar/ECAToken.g:252:9: ( QUOTE ( PUNCT | LETTER | UNDERSCORE | DIGIT | DQUOTE | SPACE )* QUOTE ) + // dd/grammar/ECAToken.g:252:11: QUOTE ( PUNCT | LETTER | UNDERSCORE | DIGIT | DQUOTE | SPACE )* QUOTE { mQUOTE(); - // dd/grammar/ECAToken.g:249:17: ( PUNCT | LETTER | UNDERSCORE | DIGIT | DQUOTE | SPACE )* - loop26: + // dd/grammar/ECAToken.g:252:17: ( PUNCT | LETTER | UNDERSCORE | DIGIT | DQUOTE | SPACE )* + loop27: do { - int alt26=2; - int LA26_0 = input.LA(1); + int alt27=2; + int LA27_0 = input.LA(1); - if ( (LA26_0=='\t'||LA26_0=='\r'||(LA26_0>=' ' && LA26_0<='&')||(LA26_0>='(' && LA26_0<='~')) ) { - alt26=1; + if ( (LA27_0=='\t'||LA27_0=='\r'||(LA27_0>=' ' && LA27_0<='&')||(LA27_0>='(' && LA27_0<='~')) ) { + alt27=1; } - switch (alt26) { + switch (alt27) { case 1 : // dd/grammar/ECAToken.g: { @@ -2106,7 +2153,7 @@ public final void mQUOTSYM() throws RecognitionException { break; default : - break loop26; + break loop27; } } while (true); @@ -2123,12 +2170,12 @@ public final void mQUOTSYM() throws RecognitionException { // $ANTLR start DOTSYM public final void mDOTSYM() throws RecognitionException { try { - // dd/grammar/ECAToken.g:254:8: ( BARESYM DOT DOTSYM | BARESYM ) - int alt27=2; - alt27 = dfa27.predict(input); - switch (alt27) { + // dd/grammar/ECAToken.g:257:8: ( BARESYM DOT DOTSYM | BARESYM ) + int alt28=2; + alt28 = dfa28.predict(input); + switch (alt28) { case 1 : - // dd/grammar/ECAToken.g:254:10: BARESYM DOT DOTSYM + // dd/grammar/ECAToken.g:257:10: BARESYM DOT DOTSYM { mBARESYM(); mDOT(); @@ -2137,7 +2184,7 @@ public final void mDOTSYM() throws RecognitionException { } break; case 2 : - // dd/grammar/ECAToken.g:255:4: BARESYM + // dd/grammar/ECAToken.g:258:4: BARESYM { mBARESYM(); @@ -2155,32 +2202,32 @@ public final void mDOTSYM() throws RecognitionException { public final void mSYMBOL() throws RecognitionException { try { int _type = SYMBOL; - // dd/grammar/ECAToken.g:258:8: ( DOTSYM | QUOTSYM ) - int alt28=2; - int LA28_0 = input.LA(1); + // dd/grammar/ECAToken.g:261:8: ( DOTSYM | QUOTSYM ) + int alt29=2; + int LA29_0 = input.LA(1); - if ( ((LA28_0>='A' && LA28_0<='Z')||LA28_0=='_'||(LA28_0>='a' && LA28_0<='z')) ) { - alt28=1; + if ( ((LA29_0>='A' && LA29_0<='Z')||LA29_0=='_'||(LA29_0>='a' && LA29_0<='z')) ) { + alt29=1; } - else if ( (LA28_0=='\'') ) { - alt28=2; + else if ( (LA29_0=='\'') ) { + alt29=2; } else { NoViableAltException nvae = - new NoViableAltException("258:1: SYMBOL : ( DOTSYM | QUOTSYM );", 28, 0, input); + new NoViableAltException("261:1: SYMBOL : ( DOTSYM | QUOTSYM );", 29, 0, input); throw nvae; } - switch (alt28) { + switch (alt29) { case 1 : - // dd/grammar/ECAToken.g:258:10: DOTSYM + // dd/grammar/ECAToken.g:261:10: DOTSYM { mDOTSYM(); } break; case 2 : - // dd/grammar/ECAToken.g:259:4: QUOTSYM + // dd/grammar/ECAToken.g:262:4: QUOTSYM { mQUOTSYM(); @@ -2198,8 +2245,8 @@ else if ( (LA28_0=='\'') ) { // $ANTLR start DOLLAR public final void mDOLLAR() throws RecognitionException { try { - // dd/grammar/ECAToken.g:264:8: ( '$' ) - // dd/grammar/ECAToken.g:264:10: '$' + // dd/grammar/ECAToken.g:267:8: ( '$' ) + // dd/grammar/ECAToken.g:267:10: '$' { match('$'); @@ -2215,36 +2262,36 @@ public final void mDOLLAR() throws RecognitionException { public final void mDOLLARSYM() throws RecognitionException { try { int _type = DOLLARSYM; - // dd/grammar/ECAToken.g:269:11: ( DOLLAR ( BAREINT | BARESYM ) ) - // dd/grammar/ECAToken.g:269:13: DOLLAR ( BAREINT | BARESYM ) + // dd/grammar/ECAToken.g:272:11: ( DOLLAR ( BAREINT | BARESYM ) ) + // dd/grammar/ECAToken.g:272:13: DOLLAR ( BAREINT | BARESYM ) { mDOLLAR(); - // dd/grammar/ECAToken.g:269:20: ( BAREINT | BARESYM ) - int alt29=2; - int LA29_0 = input.LA(1); + // dd/grammar/ECAToken.g:272:20: ( BAREINT | BARESYM ) + int alt30=2; + int LA30_0 = input.LA(1); - if ( ((LA29_0>='0' && LA29_0<='9')) ) { - alt29=1; + if ( ((LA30_0>='0' && LA30_0<='9')) ) { + alt30=1; } - else if ( ((LA29_0>='A' && LA29_0<='Z')||LA29_0=='_'||(LA29_0>='a' && LA29_0<='z')) ) { - alt29=2; + else if ( ((LA30_0>='A' && LA30_0<='Z')||LA30_0=='_'||(LA30_0>='a' && LA30_0<='z')) ) { + alt30=2; } else { NoViableAltException nvae = - new NoViableAltException("269:20: ( BAREINT | BARESYM )", 29, 0, input); + new NoViableAltException("272:20: ( BAREINT | BARESYM )", 30, 0, input); throw nvae; } - switch (alt29) { + switch (alt30) { case 1 : - // dd/grammar/ECAToken.g:269:21: BAREINT + // dd/grammar/ECAToken.g:272:21: BAREINT { mBAREINT(); } break; case 2 : - // dd/grammar/ECAToken.g:269:31: BARESYM + // dd/grammar/ECAToken.g:272:31: BARESYM { mBARESYM(); @@ -2267,8 +2314,8 @@ else if ( ((LA29_0>='A' && LA29_0<='Z')||LA29_0=='_'||(LA29_0>='a' && LA29_0<='z public final void mWS() throws RecognitionException { try { int _type = WS; - // dd/grammar/ECAToken.g:275:4: ( ( SPACE | NEWLINE ) ) - // dd/grammar/ECAToken.g:275:6: ( SPACE | NEWLINE ) + // dd/grammar/ECAToken.g:278:4: ( ( SPACE | NEWLINE ) ) + // dd/grammar/ECAToken.g:278:6: ( SPACE | NEWLINE ) { if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) { input.consume(); @@ -2292,18 +2339,18 @@ public final void mWS() throws RecognitionException { // $ANTLR end WS public void mTokens() throws RecognitionException { - // dd/grammar/ECAToken.g:1:8: ( NUMBER | BIND | IF | DO | RULE | CLASS | METHOD | LINE | ENDRULE | NOTHING | TRUE | FALSE | LPAREN | RPAREN | LSQUARE | RSQUARE | LBRACE | RBRACE | SEPR | DOT | ASSIGN | OR | AND | NOT | EQ | NEQ | GT | LT | GEQ | LEQ | BOR | BAND | BXOR | TWIDDLE | MUL | DIV | PLUS | MINUS | MOD | TERN_IF | COLON | QUOTE | DQUOTE | STRING | SYMBOL | DOLLARSYM | WS ) - int alt30=47; + // dd/grammar/ECAToken.g:1:8: ( NUMBER | BIND | IF | DO | RULE | CLASS | METHOD | LINE | ENDRULE | NOTHING | TRUE | FALSE | RETURN | LPAREN | RPAREN | LSQUARE | RSQUARE | LBRACE | RBRACE | SEPR | DOT | ASSIGN | OR | AND | NOT | EQ | NEQ | GT | LT | GEQ | LEQ | BOR | BAND | BXOR | TWIDDLE | MUL | DIV | PLUS | MINUS | MOD | TERN_IF | COLON | QUOTE | DQUOTE | STRING | SYMBOL | DOLLARSYM | WS ) + int alt31=48; switch ( input.LA(1) ) { case '+': { - int LA30_1 = input.LA(2); + int LA31_1 = input.LA(2); - if ( ((LA30_1>='0' && LA30_1<='9')) ) { - alt30=1; + if ( ((LA31_1>='0' && LA31_1<='9')) ) { + alt31=1; } else { - alt30=37;} + alt31=38;} } break; case '0': @@ -2317,53 +2364,53 @@ public void mTokens() throws RecognitionException { case '8': case '9': { - alt30=1; + alt31=1; } break; case 'B': { - int LA30_3 = input.LA(2); + int LA31_3 = input.LA(2); - if ( (LA30_3=='I') ) { - int LA30_57 = input.LA(3); + if ( (LA31_3=='I') ) { + int LA31_58 = input.LA(3); - if ( (LA30_57=='N') ) { - int LA30_112 = input.LA(4); + if ( (LA31_58=='N') ) { + int LA31_115 = input.LA(4); - if ( (LA30_112=='D') ) { - int LA30_143 = input.LA(5); + if ( (LA31_115=='D') ) { + int LA31_148 = input.LA(5); - if ( (LA30_143=='.'||(LA30_143>='0' && LA30_143<='9')||(LA30_143>='A' && LA30_143<='Z')||LA30_143=='_'||(LA30_143>='a' && LA30_143<='z')) ) { - alt30=45; + if ( (LA31_148=='.'||(LA31_148>='0' && LA31_148<='9')||(LA31_148>='A' && LA31_148<='Z')||LA31_148=='_'||(LA31_148>='a' && LA31_148<='z')) ) { + alt31=46; } else { - alt30=2;} + alt31=2;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } break; case 'I': { - int LA30_4 = input.LA(2); + int LA31_4 = input.LA(2); - if ( (LA30_4=='F') ) { - int LA30_58 = input.LA(3); + if ( (LA31_4=='F') ) { + int LA31_59 = input.LA(3); - if ( (LA30_58=='.'||(LA30_58>='0' && LA30_58<='9')||(LA30_58>='A' && LA30_58<='Z')||LA30_58=='_'||(LA30_58>='a' && LA30_58<='z')) ) { - alt30=45; + if ( (LA31_59=='.'||(LA31_59>='0' && LA31_59<='9')||(LA31_59>='A' && LA31_59<='Z')||LA31_59=='_'||(LA31_59>='a' && LA31_59<='z')) ) { + alt31=46; } else { - alt30=3;} + alt31=3;} } else { - alt30=45;} + alt31=46;} } break; case 'D': @@ -2371,324 +2418,361 @@ public void mTokens() throws RecognitionException { switch ( input.LA(2) ) { case 'O': { - int LA30_59 = input.LA(3); + int LA31_60 = input.LA(3); - if ( (LA30_59=='.'||(LA30_59>='0' && LA30_59<='9')||(LA30_59>='A' && LA30_59<='Z')||LA30_59=='_'||(LA30_59>='a' && LA30_59<='z')) ) { - alt30=45; + if ( (LA31_60=='.'||(LA31_60>='0' && LA31_60<='9')||(LA31_60>='A' && LA31_60<='Z')||LA31_60=='_'||(LA31_60>='a' && LA31_60<='z')) ) { + alt31=46; } else { - alt30=4;} + alt31=4;} } break; case 'I': { - int LA30_60 = input.LA(3); + int LA31_61 = input.LA(3); - if ( (LA30_60=='V') ) { - int LA30_115 = input.LA(4); + if ( (LA31_61=='V') ) { + int LA31_118 = input.LA(4); - if ( (LA30_115=='I') ) { - int LA30_144 = input.LA(5); + if ( (LA31_118=='I') ) { + int LA31_149 = input.LA(5); - if ( (LA30_144=='D') ) { - int LA30_163 = input.LA(6); + if ( (LA31_149=='D') ) { + int LA31_170 = input.LA(6); - if ( (LA30_163=='E') ) { - int LA30_178 = input.LA(7); + if ( (LA31_170=='E') ) { + int LA31_187 = input.LA(7); - if ( (LA30_178=='.'||(LA30_178>='0' && LA30_178<='9')||(LA30_178>='A' && LA30_178<='Z')||LA30_178=='_'||(LA30_178>='a' && LA30_178<='z')) ) { - alt30=45; + if ( (LA31_187=='.'||(LA31_187>='0' && LA31_187<='9')||(LA31_187>='A' && LA31_187<='Z')||LA31_187=='_'||(LA31_187>='a' && LA31_187<='z')) ) { + alt31=46; } else { - alt30=36;} + alt31=37;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } break; default: - alt30=45;} + alt31=46;} } break; case 'R': { - int LA30_6 = input.LA(2); + switch ( input.LA(2) ) { + case 'U': + { + int LA31_62 = input.LA(3); + + if ( (LA31_62=='L') ) { + int LA31_119 = input.LA(4); + + if ( (LA31_119=='E') ) { + int LA31_150 = input.LA(5); + + if ( (LA31_150=='.'||(LA31_150>='0' && LA31_150<='9')||(LA31_150>='A' && LA31_150<='Z')||LA31_150=='_'||(LA31_150>='a' && LA31_150<='z')) ) { + alt31=46; + } + else { + alt31=5;} + } + else { + alt31=46;} + } + else { + alt31=46;} + } + break; + case 'E': + { + int LA31_63 = input.LA(3); - if ( (LA30_6=='U') ) { - int LA30_61 = input.LA(3); + if ( (LA31_63=='T') ) { + int LA31_120 = input.LA(4); - if ( (LA30_61=='L') ) { - int LA30_116 = input.LA(4); + if ( (LA31_120=='U') ) { + int LA31_151 = input.LA(5); - if ( (LA30_116=='E') ) { - int LA30_145 = input.LA(5); + if ( (LA31_151=='R') ) { + int LA31_172 = input.LA(6); - if ( (LA30_145=='.'||(LA30_145>='0' && LA30_145<='9')||(LA30_145>='A' && LA30_145<='Z')||LA30_145=='_'||(LA30_145>='a' && LA30_145<='z')) ) { - alt30=45; + if ( (LA31_172=='N') ) { + int LA31_188 = input.LA(7); + + if ( (LA31_188=='.'||(LA31_188>='0' && LA31_188<='9')||(LA31_188>='A' && LA31_188<='Z')||LA31_188=='_'||(LA31_188>='a' && LA31_188<='z')) ) { + alt31=46; + } + else { + alt31=13;} + } + else { + alt31=46;} } else { - alt30=5;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} - } - else { - alt30=45;} + alt31=46;} + } + break; + default: + alt31=46;} + } break; case 'C': { - int LA30_7 = input.LA(2); + int LA31_7 = input.LA(2); - if ( (LA30_7=='L') ) { - int LA30_62 = input.LA(3); + if ( (LA31_7=='L') ) { + int LA31_64 = input.LA(3); - if ( (LA30_62=='A') ) { - int LA30_117 = input.LA(4); + if ( (LA31_64=='A') ) { + int LA31_121 = input.LA(4); - if ( (LA30_117=='S') ) { - int LA30_146 = input.LA(5); + if ( (LA31_121=='S') ) { + int LA31_152 = input.LA(5); - if ( (LA30_146=='S') ) { - int LA30_165 = input.LA(6); + if ( (LA31_152=='S') ) { + int LA31_173 = input.LA(6); - if ( (LA30_165=='.'||(LA30_165>='0' && LA30_165<='9')||(LA30_165>='A' && LA30_165<='Z')||LA30_165=='_'||(LA30_165>='a' && LA30_165<='z')) ) { - alt30=45; + if ( (LA31_173=='.'||(LA31_173>='0' && LA31_173<='9')||(LA31_173>='A' && LA31_173<='Z')||LA31_173=='_'||(LA31_173>='a' && LA31_173<='z')) ) { + alt31=46; } else { - alt30=6;} + alt31=6;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } break; case 'M': { switch ( input.LA(2) ) { - case 'I': + case 'E': { - int LA30_63 = input.LA(3); + int LA31_65 = input.LA(3); - if ( (LA30_63=='N') ) { - int LA30_118 = input.LA(4); + if ( (LA31_65=='T') ) { + int LA31_122 = input.LA(4); - if ( (LA30_118=='U') ) { - int LA30_147 = input.LA(5); + if ( (LA31_122=='H') ) { + int LA31_153 = input.LA(5); - if ( (LA30_147=='S') ) { - int LA30_166 = input.LA(6); + if ( (LA31_153=='O') ) { + int LA31_174 = input.LA(6); - if ( (LA30_166=='.'||(LA30_166>='0' && LA30_166<='9')||(LA30_166>='A' && LA30_166<='Z')||LA30_166=='_'||(LA30_166>='a' && LA30_166<='z')) ) { - alt30=45; + if ( (LA31_174=='D') ) { + int LA31_190 = input.LA(7); + + if ( (LA31_190=='.'||(LA31_190>='0' && LA31_190<='9')||(LA31_190>='A' && LA31_190<='Z')||LA31_190=='_'||(LA31_190>='a' && LA31_190<='z')) ) { + alt31=46; + } + else { + alt31=7;} } else { - alt30=38;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } break; - case 'E': + case 'O': { - int LA30_64 = input.LA(3); - - if ( (LA30_64=='T') ) { - int LA30_119 = input.LA(4); - - if ( (LA30_119=='H') ) { - int LA30_148 = input.LA(5); + int LA31_66 = input.LA(3); - if ( (LA30_148=='O') ) { - int LA30_167 = input.LA(6); + if ( (LA31_66=='D') ) { + int LA31_123 = input.LA(4); - if ( (LA30_167=='D') ) { - int LA30_180 = input.LA(7); - - if ( (LA30_180=='.'||(LA30_180>='0' && LA30_180<='9')||(LA30_180>='A' && LA30_180<='Z')||LA30_180=='_'||(LA30_180>='a' && LA30_180<='z')) ) { - alt30=45; - } - else { - alt30=7;} - } - else { - alt30=45;} - } - else { - alt30=45;} + if ( (LA31_123=='.'||(LA31_123>='0' && LA31_123<='9')||(LA31_123>='A' && LA31_123<='Z')||LA31_123=='_'||(LA31_123>='a' && LA31_123<='z')) ) { + alt31=46; } else { - alt30=45;} + alt31=40;} } else { - alt30=45;} + alt31=46;} } break; - case 'O': + case 'I': { - int LA30_65 = input.LA(3); + int LA31_67 = input.LA(3); - if ( (LA30_65=='D') ) { - int LA30_120 = input.LA(4); + if ( (LA31_67=='N') ) { + int LA31_124 = input.LA(4); - if ( (LA30_120=='.'||(LA30_120>='0' && LA30_120<='9')||(LA30_120>='A' && LA30_120<='Z')||LA30_120=='_'||(LA30_120>='a' && LA30_120<='z')) ) { - alt30=45; + if ( (LA31_124=='U') ) { + int LA31_154 = input.LA(5); + + if ( (LA31_154=='S') ) { + int LA31_175 = input.LA(6); + + if ( (LA31_175=='.'||(LA31_175>='0' && LA31_175<='9')||(LA31_175>='A' && LA31_175<='Z')||LA31_175=='_'||(LA31_175>='a' && LA31_175<='z')) ) { + alt31=46; + } + else { + alt31=39;} + } + else { + alt31=46;} } else { - alt30=39;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } break; default: - alt30=45;} + alt31=46;} } break; case 'L': { switch ( input.LA(2) ) { - case 'T': + case 'E': { - int LA30_66 = input.LA(3); + int LA31_68 = input.LA(3); + + if ( (LA31_68=='Q') ) { + int LA31_125 = input.LA(4); - if ( (LA30_66=='.'||(LA30_66>='0' && LA30_66<='9')||(LA30_66>='A' && LA30_66<='Z')||LA30_66=='_'||(LA30_66>='a' && LA30_66<='z')) ) { - alt30=45; + if ( (LA31_125=='.'||(LA31_125>='0' && LA31_125<='9')||(LA31_125>='A' && LA31_125<='Z')||LA31_125=='_'||(LA31_125>='a' && LA31_125<='z')) ) { + alt31=46; + } + else { + alt31=31;} } else { - alt30=28;} + alt31=46;} } break; - case 'I': + case 'T': { - int LA30_67 = input.LA(3); + int LA31_69 = input.LA(3); - if ( (LA30_67=='N') ) { - int LA30_121 = input.LA(4); - - if ( (LA30_121=='E') ) { - int LA30_149 = input.LA(5); - - if ( (LA30_149=='.'||(LA30_149>='0' && LA30_149<='9')||(LA30_149>='A' && LA30_149<='Z')||LA30_149=='_'||(LA30_149>='a' && LA30_149<='z')) ) { - alt30=45; - } - else { - alt30=8;} - } - else { - alt30=45;} + if ( (LA31_69=='.'||(LA31_69>='0' && LA31_69<='9')||(LA31_69>='A' && LA31_69<='Z')||LA31_69=='_'||(LA31_69>='a' && LA31_69<='z')) ) { + alt31=46; } else { - alt30=45;} + alt31=29;} } break; - case 'E': + case 'I': { - int LA30_68 = input.LA(3); + int LA31_70 = input.LA(3); + + if ( (LA31_70=='N') ) { + int LA31_126 = input.LA(4); - if ( (LA30_68=='Q') ) { - int LA30_122 = input.LA(4); + if ( (LA31_126=='E') ) { + int LA31_155 = input.LA(5); - if ( (LA30_122=='.'||(LA30_122>='0' && LA30_122<='9')||(LA30_122>='A' && LA30_122<='Z')||LA30_122=='_'||(LA30_122>='a' && LA30_122<='z')) ) { - alt30=45; + if ( (LA31_155=='.'||(LA31_155>='0' && LA31_155<='9')||(LA31_155>='A' && LA31_155<='Z')||LA31_155=='_'||(LA31_155>='a' && LA31_155<='z')) ) { + alt31=46; + } + else { + alt31=8;} } else { - alt30=30;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } break; default: - alt30=45;} + alt31=46;} } break; case 'E': { switch ( input.LA(2) ) { + case 'Q': + { + int LA31_71 = input.LA(3); + + if ( (LA31_71=='.'||(LA31_71>='0' && LA31_71<='9')||(LA31_71>='A' && LA31_71<='Z')||LA31_71=='_'||(LA31_71>='a' && LA31_71<='z')) ) { + alt31=46; + } + else { + alt31=26;} + } + break; case 'N': { - int LA30_69 = input.LA(3); + int LA31_72 = input.LA(3); - if ( (LA30_69=='D') ) { - int LA30_123 = input.LA(4); + if ( (LA31_72=='D') ) { + int LA31_127 = input.LA(4); - if ( (LA30_123=='R') ) { - int LA30_150 = input.LA(5); + if ( (LA31_127=='R') ) { + int LA31_156 = input.LA(5); - if ( (LA30_150=='U') ) { - int LA30_169 = input.LA(6); + if ( (LA31_156=='U') ) { + int LA31_177 = input.LA(6); - if ( (LA30_169=='L') ) { - int LA30_181 = input.LA(7); + if ( (LA31_177=='L') ) { + int LA31_191 = input.LA(7); - if ( (LA30_181=='E') ) { - int LA30_186 = input.LA(8); + if ( (LA31_191=='E') ) { + int LA31_198 = input.LA(8); - if ( (LA30_186=='.'||(LA30_186>='0' && LA30_186<='9')||(LA30_186>='A' && LA30_186<='Z')||LA30_186=='_'||(LA30_186>='a' && LA30_186<='z')) ) { - alt30=45; + if ( (LA31_198=='.'||(LA31_198>='0' && LA31_198<='9')||(LA31_198>='A' && LA31_198<='Z')||LA31_198=='_'||(LA31_198>='a' && LA31_198<='z')) ) { + alt31=46; } else { - alt30=9;} + alt31=9;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} - } - break; - case 'Q': - { - int LA30_70 = input.LA(3); - - if ( (LA30_70=='.'||(LA30_70>='0' && LA30_70<='9')||(LA30_70>='A' && LA30_70<='Z')||LA30_70=='_'||(LA30_70>='a' && LA30_70<='z')) ) { - alt30=45; - } - else { - alt30=25;} + alt31=46;} } break; default: - alt30=45;} + alt31=46;} } break; @@ -2697,54 +2781,54 @@ public void mTokens() throws RecognitionException { switch ( input.LA(2) ) { case 'E': { - int LA30_71 = input.LA(3); + int LA31_73 = input.LA(3); - if ( (LA30_71=='Q') ) { - int LA30_124 = input.LA(4); + if ( (LA31_73=='Q') ) { + int LA31_128 = input.LA(4); - if ( (LA30_124=='.'||(LA30_124>='0' && LA30_124<='9')||(LA30_124>='A' && LA30_124<='Z')||LA30_124=='_'||(LA30_124>='a' && LA30_124<='z')) ) { - alt30=45; + if ( (LA31_128=='.'||(LA31_128>='0' && LA31_128<='9')||(LA31_128>='A' && LA31_128<='Z')||LA31_128=='_'||(LA31_128>='a' && LA31_128<='z')) ) { + alt31=46; } else { - alt30=26;} + alt31=27;} } else { - alt30=45;} + alt31=46;} } break; case 'O': { - int LA30_72 = input.LA(3); + int LA31_74 = input.LA(3); - if ( (LA30_72=='T') ) { + if ( (LA31_74=='T') ) { switch ( input.LA(4) ) { case 'H': { - int LA30_151 = input.LA(5); + int LA31_157 = input.LA(5); - if ( (LA30_151=='I') ) { - int LA30_170 = input.LA(6); + if ( (LA31_157=='I') ) { + int LA31_178 = input.LA(6); - if ( (LA30_170=='N') ) { - int LA30_182 = input.LA(7); + if ( (LA31_178=='N') ) { + int LA31_192 = input.LA(7); - if ( (LA30_182=='G') ) { - int LA30_187 = input.LA(8); + if ( (LA31_192=='G') ) { + int LA31_199 = input.LA(8); - if ( (LA30_187=='.'||(LA30_187>='0' && LA30_187<='9')||(LA30_187>='A' && LA30_187<='Z')||LA30_187=='_'||(LA30_187>='a' && LA30_187<='z')) ) { - alt30=45; + if ( (LA31_199=='.'||(LA31_199>='0' && LA31_199<='9')||(LA31_199>='A' && LA31_199<='Z')||LA31_199=='_'||(LA31_199>='a' && LA31_199<='z')) ) { + alt31=46; } else { - alt30=10;} + alt31=10;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } break; case '.': @@ -2811,79 +2895,79 @@ public void mTokens() throws RecognitionException { case 'y': case 'z': { - alt30=45; + alt31=46; } break; default: - alt30=24;} + alt31=25;} } else { - alt30=45;} + alt31=46;} } break; default: - alt30=45;} + alt31=46;} } break; case 'T': { switch ( input.LA(2) ) { - case 'I': + case 'R': { - int LA30_73 = input.LA(3); - - if ( (LA30_73=='M') ) { - int LA30_126 = input.LA(4); + int LA31_75 = input.LA(3); - if ( (LA30_126=='E') ) { - int LA30_152 = input.LA(5); + if ( (LA31_75=='U') ) { + int LA31_130 = input.LA(4); - if ( (LA30_152=='S') ) { - int LA30_171 = input.LA(6); + if ( (LA31_130=='E') ) { + int LA31_158 = input.LA(5); - if ( (LA30_171=='.'||(LA30_171>='0' && LA30_171<='9')||(LA30_171>='A' && LA30_171<='Z')||LA30_171=='_'||(LA30_171>='a' && LA30_171<='z')) ) { - alt30=45; - } - else { - alt30=35;} + if ( (LA31_158=='.'||(LA31_158>='0' && LA31_158<='9')||(LA31_158>='A' && LA31_158<='Z')||LA31_158=='_'||(LA31_158>='a' && LA31_158<='z')) ) { + alt31=46; } else { - alt30=45;} + alt31=11;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } break; - case 'R': + case 'I': { - int LA30_74 = input.LA(3); + int LA31_76 = input.LA(3); - if ( (LA30_74=='U') ) { - int LA30_127 = input.LA(4); + if ( (LA31_76=='M') ) { + int LA31_131 = input.LA(4); - if ( (LA30_127=='E') ) { - int LA30_153 = input.LA(5); + if ( (LA31_131=='E') ) { + int LA31_159 = input.LA(5); - if ( (LA30_153=='.'||(LA30_153>='0' && LA30_153<='9')||(LA30_153>='A' && LA30_153<='Z')||LA30_153=='_'||(LA30_153>='a' && LA30_153<='z')) ) { - alt30=45; + if ( (LA31_159=='S') ) { + int LA31_180 = input.LA(6); + + if ( (LA31_180=='.'||(LA31_180>='0' && LA31_180<='9')||(LA31_180>='A' && LA31_180<='Z')||LA31_180=='_'||(LA31_180>='a' && LA31_180<='z')) ) { + alt31=46; + } + else { + alt31=36;} } else { - alt30=11;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } break; default: - alt30=45;} + alt31=46;} } break; @@ -2892,181 +2976,222 @@ public void mTokens() throws RecognitionException { switch ( input.LA(2) ) { case 'i': { - int LA30_75 = input.LA(3); + int LA31_77 = input.LA(3); - if ( (LA30_75=='m') ) { - int LA30_128 = input.LA(4); + if ( (LA31_77=='m') ) { + int LA31_132 = input.LA(4); - if ( (LA30_128=='e') ) { - int LA30_154 = input.LA(5); + if ( (LA31_132=='e') ) { + int LA31_160 = input.LA(5); - if ( (LA30_154=='s') ) { - int LA30_173 = input.LA(6); + if ( (LA31_160=='s') ) { + int LA31_181 = input.LA(6); - if ( (LA30_173=='.'||(LA30_173>='0' && LA30_173<='9')||(LA30_173>='A' && LA30_173<='Z')||LA30_173=='_'||(LA30_173>='a' && LA30_173<='z')) ) { - alt30=45; + if ( (LA31_181=='.'||(LA31_181>='0' && LA31_181<='9')||(LA31_181>='A' && LA31_181<='Z')||LA31_181=='_'||(LA31_181>='a' && LA31_181<='z')) ) { + alt31=46; } else { - alt30=35;} + alt31=36;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } break; case 'r': { - int LA30_76 = input.LA(3); + int LA31_78 = input.LA(3); - if ( (LA30_76=='u') ) { - int LA30_129 = input.LA(4); + if ( (LA31_78=='u') ) { + int LA31_133 = input.LA(4); - if ( (LA30_129=='e') ) { - int LA30_155 = input.LA(5); + if ( (LA31_133=='e') ) { + int LA31_161 = input.LA(5); - if ( (LA30_155=='.'||(LA30_155>='0' && LA30_155<='9')||(LA30_155>='A' && LA30_155<='Z')||LA30_155=='_'||(LA30_155>='a' && LA30_155<='z')) ) { - alt30=45; + if ( (LA31_161=='.'||(LA31_161>='0' && LA31_161<='9')||(LA31_161>='A' && LA31_161<='Z')||LA31_161=='_'||(LA31_161>='a' && LA31_161<='z')) ) { + alt31=46; } else { - alt30=11;} + alt31=11;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } break; default: - alt30=45;} + alt31=46;} } break; case 'F': { - int LA30_14 = input.LA(2); + int LA31_14 = input.LA(2); - if ( (LA30_14=='A') ) { - int LA30_77 = input.LA(3); + if ( (LA31_14=='A') ) { + int LA31_79 = input.LA(3); - if ( (LA30_77=='L') ) { - int LA30_130 = input.LA(4); + if ( (LA31_79=='L') ) { + int LA31_134 = input.LA(4); - if ( (LA30_130=='S') ) { - int LA30_156 = input.LA(5); + if ( (LA31_134=='S') ) { + int LA31_162 = input.LA(5); - if ( (LA30_156=='E') ) { - int LA30_174 = input.LA(6); + if ( (LA31_162=='E') ) { + int LA31_182 = input.LA(6); - if ( (LA30_174=='.'||(LA30_174>='0' && LA30_174<='9')||(LA30_174>='A' && LA30_174<='Z')||LA30_174=='_'||(LA30_174>='a' && LA30_174<='z')) ) { - alt30=45; + if ( (LA31_182=='.'||(LA31_182>='0' && LA31_182<='9')||(LA31_182>='A' && LA31_182<='Z')||LA31_182=='_'||(LA31_182>='a' && LA31_182<='z')) ) { + alt31=46; } else { - alt30=12;} + alt31=12;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } break; case 'f': { - int LA30_15 = input.LA(2); + int LA31_15 = input.LA(2); + + if ( (LA31_15=='a') ) { + int LA31_80 = input.LA(3); + + if ( (LA31_80=='l') ) { + int LA31_135 = input.LA(4); + + if ( (LA31_135=='s') ) { + int LA31_163 = input.LA(5); + + if ( (LA31_163=='e') ) { + int LA31_183 = input.LA(6); + + if ( (LA31_183=='.'||(LA31_183>='0' && LA31_183<='9')||(LA31_183>='A' && LA31_183<='Z')||LA31_183=='_'||(LA31_183>='a' && LA31_183<='z')) ) { + alt31=46; + } + else { + alt31=12;} + } + else { + alt31=46;} + } + else { + alt31=46;} + } + else { + alt31=46;} + } + else { + alt31=46;} + } + break; + case 'r': + { + int LA31_16 = input.LA(2); + + if ( (LA31_16=='e') ) { + int LA31_81 = input.LA(3); - if ( (LA30_15=='a') ) { - int LA30_78 = input.LA(3); + if ( (LA31_81=='t') ) { + int LA31_136 = input.LA(4); - if ( (LA30_78=='l') ) { - int LA30_131 = input.LA(4); + if ( (LA31_136=='u') ) { + int LA31_164 = input.LA(5); - if ( (LA30_131=='s') ) { - int LA30_157 = input.LA(5); + if ( (LA31_164=='r') ) { + int LA31_184 = input.LA(6); - if ( (LA30_157=='e') ) { - int LA30_175 = input.LA(6); + if ( (LA31_184=='n') ) { + int LA31_194 = input.LA(7); - if ( (LA30_175=='.'||(LA30_175>='0' && LA30_175<='9')||(LA30_175>='A' && LA30_175<='Z')||LA30_175=='_'||(LA30_175>='a' && LA30_175<='z')) ) { - alt30=45; + if ( (LA31_194=='.'||(LA31_194>='0' && LA31_194<='9')||(LA31_194>='A' && LA31_194<='Z')||LA31_194=='_'||(LA31_194>='a' && LA31_194<='z')) ) { + alt31=46; + } + else { + alt31=13;} } else { - alt30=12;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } break; case '(': { - alt30=13; + alt31=14; } break; case ')': { - alt30=14; + alt31=15; } break; case '[': { - alt30=15; + alt31=16; } break; case ']': { - alt30=16; + alt31=17; } break; case '{': { - alt30=17; + alt31=18; } break; case '}': { - alt30=18; + alt31=19; } break; case ',': case ';': { - alt30=19; + alt31=20; } break; case '.': { - alt30=20; + alt31=21; } break; case '=': { - int LA30_24 = input.LA(2); + int LA31_25 = input.LA(2); - if ( (LA30_24=='=') ) { - alt30=25; + if ( (LA31_25=='=') ) { + alt31=26; } else { - alt30=21;} + alt31=22;} } break; case '<': @@ -3074,130 +3199,130 @@ public void mTokens() throws RecognitionException { switch ( input.LA(2) ) { case '-': { - alt30=21; + alt31=22; } break; case '=': { - alt30=30; + alt31=31; } break; default: - alt30=28;} + alt31=29;} } break; case '|': { - int LA30_26 = input.LA(2); + int LA31_27 = input.LA(2); - if ( (LA30_26=='|') ) { - alt30=22; + if ( (LA31_27=='|') ) { + alt31=23; } else { - alt30=31;} + alt31=32;} } break; case 'O': { - int LA30_27 = input.LA(2); + int LA31_28 = input.LA(2); - if ( (LA30_27=='R') ) { - int LA30_85 = input.LA(3); + if ( (LA31_28=='R') ) { + int LA31_88 = input.LA(3); - if ( (LA30_85=='.'||(LA30_85>='0' && LA30_85<='9')||(LA30_85>='A' && LA30_85<='Z')||LA30_85=='_'||(LA30_85>='a' && LA30_85<='z')) ) { - alt30=45; + if ( (LA31_88=='.'||(LA31_88>='0' && LA31_88<='9')||(LA31_88>='A' && LA31_88<='Z')||LA31_88=='_'||(LA31_88>='a' && LA31_88<='z')) ) { + alt31=46; } else { - alt30=22;} + alt31=23;} } else { - alt30=45;} + alt31=46;} } break; case 'o': { - int LA30_28 = input.LA(2); + int LA31_29 = input.LA(2); - if ( (LA30_28=='r') ) { - int LA30_86 = input.LA(3); + if ( (LA31_29=='r') ) { + int LA31_89 = input.LA(3); - if ( (LA30_86=='.'||(LA30_86>='0' && LA30_86<='9')||(LA30_86>='A' && LA30_86<='Z')||LA30_86=='_'||(LA30_86>='a' && LA30_86<='z')) ) { - alt30=45; + if ( (LA31_89=='.'||(LA31_89>='0' && LA31_89<='9')||(LA31_89>='A' && LA31_89<='Z')||LA31_89=='_'||(LA31_89>='a' && LA31_89<='z')) ) { + alt31=46; } else { - alt30=22;} + alt31=23;} } else { - alt30=45;} + alt31=46;} } break; case '&': { - int LA30_29 = input.LA(2); + int LA31_30 = input.LA(2); - if ( (LA30_29=='&') ) { - alt30=23; + if ( (LA31_30=='&') ) { + alt31=24; } else { - alt30=32;} + alt31=33;} } break; case 'A': { - int LA30_30 = input.LA(2); + int LA31_31 = input.LA(2); - if ( (LA30_30=='N') ) { - int LA30_89 = input.LA(3); + if ( (LA31_31=='N') ) { + int LA31_92 = input.LA(3); - if ( (LA30_89=='D') ) { - int LA30_132 = input.LA(4); + if ( (LA31_92=='D') ) { + int LA31_137 = input.LA(4); - if ( (LA30_132=='.'||(LA30_132>='0' && LA30_132<='9')||(LA30_132>='A' && LA30_132<='Z')||LA30_132=='_'||(LA30_132>='a' && LA30_132<='z')) ) { - alt30=45; + if ( (LA31_137=='.'||(LA31_137>='0' && LA31_137<='9')||(LA31_137>='A' && LA31_137<='Z')||LA31_137=='_'||(LA31_137>='a' && LA31_137<='z')) ) { + alt31=46; } else { - alt30=23;} + alt31=24;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } break; case 'a': { - int LA30_31 = input.LA(2); + int LA31_32 = input.LA(2); - if ( (LA30_31=='n') ) { - int LA30_90 = input.LA(3); + if ( (LA31_32=='n') ) { + int LA31_93 = input.LA(3); - if ( (LA30_90=='d') ) { - int LA30_133 = input.LA(4); + if ( (LA31_93=='d') ) { + int LA31_138 = input.LA(4); - if ( (LA30_133=='.'||(LA30_133>='0' && LA30_133<='9')||(LA30_133>='A' && LA30_133<='Z')||LA30_133=='_'||(LA30_133>='a' && LA30_133<='z')) ) { - alt30=45; + if ( (LA31_138=='.'||(LA31_138>='0' && LA31_138<='9')||(LA31_138>='A' && LA31_138<='Z')||LA31_138=='_'||(LA31_138>='a' && LA31_138<='z')) ) { + alt31=46; } else { - alt30=23;} + alt31=24;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } break; case '!': { - int LA30_32 = input.LA(2); + int LA31_33 = input.LA(2); - if ( (LA30_32=='=') ) { - alt30=26; + if ( (LA31_33=='=') ) { + alt31=27; } else { - alt30=24;} + alt31=25;} } break; case 'n': @@ -3205,86 +3330,86 @@ public void mTokens() throws RecognitionException { switch ( input.LA(2) ) { case 'o': { - int LA30_93 = input.LA(3); + int LA31_96 = input.LA(3); - if ( (LA30_93=='t') ) { - int LA30_134 = input.LA(4); + if ( (LA31_96=='t') ) { + int LA31_139 = input.LA(4); - if ( (LA30_134=='.'||(LA30_134>='0' && LA30_134<='9')||(LA30_134>='A' && LA30_134<='Z')||LA30_134=='_'||(LA30_134>='a' && LA30_134<='z')) ) { - alt30=45; + if ( (LA31_139=='.'||(LA31_139>='0' && LA31_139<='9')||(LA31_139>='A' && LA31_139<='Z')||LA31_139=='_'||(LA31_139>='a' && LA31_139<='z')) ) { + alt31=46; } else { - alt30=24;} + alt31=25;} } else { - alt30=45;} + alt31=46;} } break; case 'e': { - int LA30_94 = input.LA(3); + int LA31_97 = input.LA(3); - if ( (LA30_94=='q') ) { - int LA30_135 = input.LA(4); + if ( (LA31_97=='q') ) { + int LA31_140 = input.LA(4); - if ( (LA30_135=='.'||(LA30_135>='0' && LA30_135<='9')||(LA30_135>='A' && LA30_135<='Z')||LA30_135=='_'||(LA30_135>='a' && LA30_135<='z')) ) { - alt30=45; + if ( (LA31_140=='.'||(LA31_140>='0' && LA31_140<='9')||(LA31_140>='A' && LA31_140<='Z')||LA31_140=='_'||(LA31_140>='a' && LA31_140<='z')) ) { + alt31=46; } else { - alt30=26;} + alt31=27;} } else { - alt30=45;} + alt31=46;} } break; default: - alt30=45;} + alt31=46;} } break; case 'e': { - int LA30_34 = input.LA(2); + int LA31_35 = input.LA(2); - if ( (LA30_34=='q') ) { - int LA30_95 = input.LA(3); + if ( (LA31_35=='q') ) { + int LA31_98 = input.LA(3); - if ( (LA30_95=='.'||(LA30_95>='0' && LA30_95<='9')||(LA30_95>='A' && LA30_95<='Z')||LA30_95=='_'||(LA30_95>='a' && LA30_95<='z')) ) { - alt30=45; + if ( (LA31_98=='.'||(LA31_98>='0' && LA31_98<='9')||(LA31_98>='A' && LA31_98<='Z')||LA31_98=='_'||(LA31_98>='a' && LA31_98<='z')) ) { + alt31=46; } else { - alt30=25;} + alt31=26;} } else { - alt30=45;} + alt31=46;} } break; case '>': { - int LA30_35 = input.LA(2); + int LA31_36 = input.LA(2); - if ( (LA30_35=='=') ) { - alt30=29; + if ( (LA31_36=='=') ) { + alt31=30; } else { - alt30=27;} + alt31=28;} } break; case 'G': { - int LA30_36 = input.LA(2); + int LA31_37 = input.LA(2); - if ( (LA30_36=='T') ) { - int LA30_98 = input.LA(3); + if ( (LA31_37=='T') ) { + int LA31_101 = input.LA(3); - if ( (LA30_98=='.'||(LA30_98>='0' && LA30_98<='9')||(LA30_98>='A' && LA30_98<='Z')||LA30_98=='_'||(LA30_98>='a' && LA30_98<='z')) ) { - alt30=45; + if ( (LA31_101=='.'||(LA31_101>='0' && LA31_101<='9')||(LA31_101>='A' && LA31_101<='Z')||LA31_101=='_'||(LA31_101>='a' && LA31_101<='z')) ) { + alt31=46; } else { - alt30=27;} + alt31=28;} } else { - alt30=45;} + alt31=46;} } break; case 'g': @@ -3292,201 +3417,201 @@ public void mTokens() throws RecognitionException { switch ( input.LA(2) ) { case 'e': { - int LA30_99 = input.LA(3); + int LA31_102 = input.LA(3); - if ( (LA30_99=='q') ) { - int LA30_136 = input.LA(4); + if ( (LA31_102=='q') ) { + int LA31_141 = input.LA(4); - if ( (LA30_136=='.'||(LA30_136>='0' && LA30_136<='9')||(LA30_136>='A' && LA30_136<='Z')||LA30_136=='_'||(LA30_136>='a' && LA30_136<='z')) ) { - alt30=45; + if ( (LA31_141=='.'||(LA31_141>='0' && LA31_141<='9')||(LA31_141>='A' && LA31_141<='Z')||LA31_141=='_'||(LA31_141>='a' && LA31_141<='z')) ) { + alt31=46; } else { - alt30=29;} + alt31=30;} } else { - alt30=45;} + alt31=46;} } break; case 't': { - int LA30_100 = input.LA(3); + int LA31_103 = input.LA(3); - if ( (LA30_100=='.'||(LA30_100>='0' && LA30_100<='9')||(LA30_100>='A' && LA30_100<='Z')||LA30_100=='_'||(LA30_100>='a' && LA30_100<='z')) ) { - alt30=45; + if ( (LA31_103=='.'||(LA31_103>='0' && LA31_103<='9')||(LA31_103>='A' && LA31_103<='Z')||LA31_103=='_'||(LA31_103>='a' && LA31_103<='z')) ) { + alt31=46; } else { - alt30=27;} + alt31=28;} } break; default: - alt30=45;} + alt31=46;} } break; case 'l': { switch ( input.LA(2) ) { - case 't': + case 'e': { - int LA30_101 = input.LA(3); + int LA31_104 = input.LA(3); + + if ( (LA31_104=='q') ) { + int LA31_142 = input.LA(4); - if ( (LA30_101=='.'||(LA30_101>='0' && LA30_101<='9')||(LA30_101>='A' && LA30_101<='Z')||LA30_101=='_'||(LA30_101>='a' && LA30_101<='z')) ) { - alt30=45; + if ( (LA31_142=='.'||(LA31_142>='0' && LA31_142<='9')||(LA31_142>='A' && LA31_142<='Z')||LA31_142=='_'||(LA31_142>='a' && LA31_142<='z')) ) { + alt31=46; + } + else { + alt31=31;} } else { - alt30=28;} + alt31=46;} } break; - case 'e': + case 't': { - int LA30_102 = input.LA(3); + int LA31_105 = input.LA(3); - if ( (LA30_102=='q') ) { - int LA30_137 = input.LA(4); - - if ( (LA30_137=='.'||(LA30_137>='0' && LA30_137<='9')||(LA30_137>='A' && LA30_137<='Z')||LA30_137=='_'||(LA30_137>='a' && LA30_137<='z')) ) { - alt30=45; - } - else { - alt30=30;} + if ( (LA31_105=='.'||(LA31_105>='0' && LA31_105<='9')||(LA31_105>='A' && LA31_105<='Z')||LA31_105=='_'||(LA31_105>='a' && LA31_105<='z')) ) { + alt31=46; } else { - alt30=45;} + alt31=29;} } break; default: - alt30=45;} + alt31=46;} } break; case '^': { - alt30=33; + alt31=34; } break; case '~': { - alt30=34; + alt31=35; } break; case '*': { - alt30=35; + alt31=36; } break; case '/': { - alt30=36; + alt31=37; } break; case 'd': { - int LA30_43 = input.LA(2); + int LA31_44 = input.LA(2); - if ( (LA30_43=='i') ) { - int LA30_103 = input.LA(3); + if ( (LA31_44=='i') ) { + int LA31_106 = input.LA(3); - if ( (LA30_103=='v') ) { - int LA30_138 = input.LA(4); + if ( (LA31_106=='v') ) { + int LA31_143 = input.LA(4); - if ( (LA30_138=='i') ) { - int LA30_158 = input.LA(5); + if ( (LA31_143=='i') ) { + int LA31_165 = input.LA(5); - if ( (LA30_158=='d') ) { - int LA30_176 = input.LA(6); + if ( (LA31_165=='d') ) { + int LA31_185 = input.LA(6); - if ( (LA30_176=='e') ) { - int LA30_184 = input.LA(7); + if ( (LA31_185=='e') ) { + int LA31_195 = input.LA(7); - if ( (LA30_184=='.'||(LA30_184>='0' && LA30_184<='9')||(LA30_184>='A' && LA30_184<='Z')||LA30_184=='_'||(LA30_184>='a' && LA30_184<='z')) ) { - alt30=45; + if ( (LA31_195=='.'||(LA31_195>='0' && LA31_195<='9')||(LA31_195>='A' && LA31_195<='Z')||LA31_195=='_'||(LA31_195>='a' && LA31_195<='z')) ) { + alt31=46; } else { - alt30=36;} + alt31=37;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } break; case '-': { - int LA30_44 = input.LA(2); + int LA31_45 = input.LA(2); - if ( ((LA30_44>='0' && LA30_44<='9')) ) { - alt30=1; + if ( ((LA31_45>='0' && LA31_45<='9')) ) { + alt31=1; } else { - alt30=38;} + alt31=39;} } break; case 'P': { - int LA30_45 = input.LA(2); + int LA31_46 = input.LA(2); - if ( (LA30_45=='L') ) { - int LA30_105 = input.LA(3); + if ( (LA31_46=='L') ) { + int LA31_108 = input.LA(3); - if ( (LA30_105=='U') ) { - int LA30_139 = input.LA(4); + if ( (LA31_108=='U') ) { + int LA31_144 = input.LA(4); - if ( (LA30_139=='S') ) { - int LA30_159 = input.LA(5); + if ( (LA31_144=='S') ) { + int LA31_166 = input.LA(5); - if ( (LA30_159=='.'||(LA30_159>='0' && LA30_159<='9')||(LA30_159>='A' && LA30_159<='Z')||LA30_159=='_'||(LA30_159>='a' && LA30_159<='z')) ) { - alt30=45; + if ( (LA31_166=='.'||(LA31_166>='0' && LA31_166<='9')||(LA31_166>='A' && LA31_166<='Z')||LA31_166=='_'||(LA31_166>='a' && LA31_166<='z')) ) { + alt31=46; } else { - alt30=37;} + alt31=38;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } break; case 'p': { - int LA30_46 = input.LA(2); + int LA31_47 = input.LA(2); - if ( (LA30_46=='l') ) { - int LA30_106 = input.LA(3); + if ( (LA31_47=='l') ) { + int LA31_109 = input.LA(3); - if ( (LA30_106=='u') ) { - int LA30_140 = input.LA(4); + if ( (LA31_109=='u') ) { + int LA31_145 = input.LA(4); - if ( (LA30_140=='s') ) { - int LA30_160 = input.LA(5); + if ( (LA31_145=='s') ) { + int LA31_167 = input.LA(5); - if ( (LA30_160=='.'||(LA30_160>='0' && LA30_160<='9')||(LA30_160>='A' && LA30_160<='Z')||LA30_160=='_'||(LA30_160>='a' && LA30_160<='z')) ) { - alt30=45; + if ( (LA31_167=='.'||(LA31_167>='0' && LA31_167<='9')||(LA31_167>='A' && LA31_167<='Z')||LA31_167=='_'||(LA31_167>='a' && LA31_167<='z')) ) { + alt31=46; } else { - alt30=37;} + alt31=38;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } break; case 'm': @@ -3494,90 +3619,90 @@ public void mTokens() throws RecognitionException { switch ( input.LA(2) ) { case 'i': { - int LA30_107 = input.LA(3); + int LA31_110 = input.LA(3); - if ( (LA30_107=='n') ) { - int LA30_141 = input.LA(4); + if ( (LA31_110=='n') ) { + int LA31_146 = input.LA(4); - if ( (LA30_141=='u') ) { - int LA30_161 = input.LA(5); + if ( (LA31_146=='u') ) { + int LA31_168 = input.LA(5); - if ( (LA30_161=='s') ) { - int LA30_177 = input.LA(6); + if ( (LA31_168=='s') ) { + int LA31_186 = input.LA(6); - if ( (LA30_177=='.'||(LA30_177>='0' && LA30_177<='9')||(LA30_177>='A' && LA30_177<='Z')||LA30_177=='_'||(LA30_177>='a' && LA30_177<='z')) ) { - alt30=45; + if ( (LA31_186=='.'||(LA31_186>='0' && LA31_186<='9')||(LA31_186>='A' && LA31_186<='Z')||LA31_186=='_'||(LA31_186>='a' && LA31_186<='z')) ) { + alt31=46; } else { - alt30=38;} + alt31=39;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } else { - alt30=45;} + alt31=46;} } break; case 'o': { - int LA30_108 = input.LA(3); + int LA31_111 = input.LA(3); - if ( (LA30_108=='d') ) { - int LA30_142 = input.LA(4); + if ( (LA31_111=='d') ) { + int LA31_147 = input.LA(4); - if ( (LA30_142=='.'||(LA30_142>='0' && LA30_142<='9')||(LA30_142>='A' && LA30_142<='Z')||LA30_142=='_'||(LA30_142>='a' && LA30_142<='z')) ) { - alt30=45; + if ( (LA31_147=='.'||(LA31_147>='0' && LA31_147<='9')||(LA31_147>='A' && LA31_147<='Z')||LA31_147=='_'||(LA31_147>='a' && LA31_147<='z')) ) { + alt31=46; } else { - alt30=39;} + alt31=40;} } else { - alt30=45;} + alt31=46;} } break; default: - alt30=45;} + alt31=46;} } break; case '%': { - alt30=39; + alt31=40; } break; case '?': { - alt30=40; + alt31=41; } break; case ':': { - alt30=41; + alt31=42; } break; case '\'': { - int LA30_51 = input.LA(2); + int LA31_52 = input.LA(2); - if ( (LA30_51=='\t'||LA30_51=='\r'||(LA30_51>=' ' && LA30_51<='~')) ) { - alt30=45; + if ( (LA31_52=='\t'||LA31_52=='\r'||(LA31_52>=' ' && LA31_52<='~')) ) { + alt31=46; } else { - alt30=42;} + alt31=43;} } break; case '\"': { - int LA30_52 = input.LA(2); + int LA31_53 = input.LA(2); - if ( (LA30_52=='\t'||LA30_52=='\r'||(LA30_52>=' ' && LA30_52<='~')) ) { - alt30=44; + if ( (LA31_53=='\t'||LA31_53=='\r'||(LA31_53>=' ' && LA31_53<='~')) ) { + alt31=45; } else { - alt30=43;} + alt31=44;} } break; case 'H': @@ -3599,7 +3724,6 @@ public void mTokens() throws RecognitionException { case 'j': case 'k': case 'q': - case 'r': case 's': case 'u': case 'v': @@ -3608,12 +3732,12 @@ public void mTokens() throws RecognitionException { case 'y': case 'z': { - alt30=45; + alt31=46; } break; case '$': { - alt30=46; + alt31=47; } break; case '\t': @@ -3621,17 +3745,17 @@ public void mTokens() throws RecognitionException { case '\r': case ' ': { - alt30=47; + alt31=48; } break; default: NoViableAltException nvae = - new NoViableAltException("1:1: Tokens : ( NUMBER | BIND | IF | DO | RULE | CLASS | METHOD | LINE | ENDRULE | NOTHING | TRUE | FALSE | LPAREN | RPAREN | LSQUARE | RSQUARE | LBRACE | RBRACE | SEPR | DOT | ASSIGN | OR | AND | NOT | EQ | NEQ | GT | LT | GEQ | LEQ | BOR | BAND | BXOR | TWIDDLE | MUL | DIV | PLUS | MINUS | MOD | TERN_IF | COLON | QUOTE | DQUOTE | STRING | SYMBOL | DOLLARSYM | WS );", 30, 0, input); + new NoViableAltException("1:1: Tokens : ( NUMBER | BIND | IF | DO | RULE | CLASS | METHOD | LINE | ENDRULE | NOTHING | TRUE | FALSE | RETURN | LPAREN | RPAREN | LSQUARE | RSQUARE | LBRACE | RBRACE | SEPR | DOT | ASSIGN | OR | AND | NOT | EQ | NEQ | GT | LT | GEQ | LEQ | BOR | BAND | BXOR | TWIDDLE | MUL | DIV | PLUS | MINUS | MOD | TERN_IF | COLON | QUOTE | DQUOTE | STRING | SYMBOL | DOLLARSYM | WS );", 31, 0, input); throw nvae; } - switch (alt30) { + switch (alt31) { case 1 : // dd/grammar/ECAToken.g:1:10: NUMBER { @@ -3717,245 +3841,252 @@ public void mTokens() throws RecognitionException { } break; case 13 : - // dd/grammar/ECAToken.g:1:78: LPAREN + // dd/grammar/ECAToken.g:1:78: RETURN { - mLPAREN(); + mRETURN(); } break; case 14 : - // dd/grammar/ECAToken.g:1:85: RPAREN + // dd/grammar/ECAToken.g:1:85: LPAREN { - mRPAREN(); + mLPAREN(); } break; case 15 : - // dd/grammar/ECAToken.g:1:92: LSQUARE + // dd/grammar/ECAToken.g:1:92: RPAREN { - mLSQUARE(); + mRPAREN(); } break; case 16 : - // dd/grammar/ECAToken.g:1:100: RSQUARE + // dd/grammar/ECAToken.g:1:99: LSQUARE { - mRSQUARE(); + mLSQUARE(); } break; case 17 : - // dd/grammar/ECAToken.g:1:108: LBRACE + // dd/grammar/ECAToken.g:1:107: RSQUARE { - mLBRACE(); + mRSQUARE(); } break; case 18 : - // dd/grammar/ECAToken.g:1:115: RBRACE + // dd/grammar/ECAToken.g:1:115: LBRACE { - mRBRACE(); + mLBRACE(); } break; case 19 : - // dd/grammar/ECAToken.g:1:122: SEPR + // dd/grammar/ECAToken.g:1:122: RBRACE { - mSEPR(); + mRBRACE(); } break; case 20 : - // dd/grammar/ECAToken.g:1:127: DOT + // dd/grammar/ECAToken.g:1:129: SEPR { - mDOT(); + mSEPR(); } break; case 21 : - // dd/grammar/ECAToken.g:1:131: ASSIGN + // dd/grammar/ECAToken.g:1:134: DOT { - mASSIGN(); + mDOT(); } break; case 22 : - // dd/grammar/ECAToken.g:1:138: OR + // dd/grammar/ECAToken.g:1:138: ASSIGN { - mOR(); + mASSIGN(); } break; case 23 : - // dd/grammar/ECAToken.g:1:141: AND + // dd/grammar/ECAToken.g:1:145: OR { - mAND(); + mOR(); } break; case 24 : - // dd/grammar/ECAToken.g:1:145: NOT + // dd/grammar/ECAToken.g:1:148: AND { - mNOT(); + mAND(); } break; case 25 : - // dd/grammar/ECAToken.g:1:149: EQ + // dd/grammar/ECAToken.g:1:152: NOT { - mEQ(); + mNOT(); } break; case 26 : - // dd/grammar/ECAToken.g:1:152: NEQ + // dd/grammar/ECAToken.g:1:156: EQ { - mNEQ(); + mEQ(); } break; case 27 : - // dd/grammar/ECAToken.g:1:156: GT + // dd/grammar/ECAToken.g:1:159: NEQ { - mGT(); + mNEQ(); } break; case 28 : - // dd/grammar/ECAToken.g:1:159: LT + // dd/grammar/ECAToken.g:1:163: GT { - mLT(); + mGT(); } break; case 29 : - // dd/grammar/ECAToken.g:1:162: GEQ + // dd/grammar/ECAToken.g:1:166: LT { - mGEQ(); + mLT(); } break; case 30 : - // dd/grammar/ECAToken.g:1:166: LEQ + // dd/grammar/ECAToken.g:1:169: GEQ { - mLEQ(); + mGEQ(); } break; case 31 : - // dd/grammar/ECAToken.g:1:170: BOR + // dd/grammar/ECAToken.g:1:173: LEQ { - mBOR(); + mLEQ(); } break; case 32 : - // dd/grammar/ECAToken.g:1:174: BAND + // dd/grammar/ECAToken.g:1:177: BOR { - mBAND(); + mBOR(); } break; case 33 : - // dd/grammar/ECAToken.g:1:179: BXOR + // dd/grammar/ECAToken.g:1:181: BAND { - mBXOR(); + mBAND(); } break; case 34 : - // dd/grammar/ECAToken.g:1:184: TWIDDLE + // dd/grammar/ECAToken.g:1:186: BXOR { - mTWIDDLE(); + mBXOR(); } break; case 35 : - // dd/grammar/ECAToken.g:1:192: MUL + // dd/grammar/ECAToken.g:1:191: TWIDDLE { - mMUL(); + mTWIDDLE(); } break; case 36 : - // dd/grammar/ECAToken.g:1:196: DIV + // dd/grammar/ECAToken.g:1:199: MUL { - mDIV(); + mMUL(); } break; case 37 : - // dd/grammar/ECAToken.g:1:200: PLUS + // dd/grammar/ECAToken.g:1:203: DIV { - mPLUS(); + mDIV(); } break; case 38 : - // dd/grammar/ECAToken.g:1:205: MINUS + // dd/grammar/ECAToken.g:1:207: PLUS { - mMINUS(); + mPLUS(); } break; case 39 : - // dd/grammar/ECAToken.g:1:211: MOD + // dd/grammar/ECAToken.g:1:212: MINUS { - mMOD(); + mMINUS(); } break; case 40 : - // dd/grammar/ECAToken.g:1:215: TERN_IF + // dd/grammar/ECAToken.g:1:218: MOD { - mTERN_IF(); + mMOD(); } break; case 41 : - // dd/grammar/ECAToken.g:1:223: COLON + // dd/grammar/ECAToken.g:1:222: TERN_IF { - mCOLON(); + mTERN_IF(); } break; case 42 : - // dd/grammar/ECAToken.g:1:229: QUOTE + // dd/grammar/ECAToken.g:1:230: COLON { - mQUOTE(); + mCOLON(); } break; case 43 : - // dd/grammar/ECAToken.g:1:235: DQUOTE + // dd/grammar/ECAToken.g:1:236: QUOTE { - mDQUOTE(); + mQUOTE(); } break; case 44 : - // dd/grammar/ECAToken.g:1:242: STRING + // dd/grammar/ECAToken.g:1:242: DQUOTE { - mSTRING(); + mDQUOTE(); } break; case 45 : - // dd/grammar/ECAToken.g:1:249: SYMBOL + // dd/grammar/ECAToken.g:1:249: STRING { - mSYMBOL(); + mSTRING(); } break; case 46 : - // dd/grammar/ECAToken.g:1:256: DOLLARSYM + // dd/grammar/ECAToken.g:1:256: SYMBOL { - mDOLLARSYM(); + mSYMBOL(); } break; case 47 : - // dd/grammar/ECAToken.g:1:266: WS + // dd/grammar/ECAToken.g:1:263: DOLLARSYM + { + mDOLLARSYM(); + + } + break; + case 48 : + // dd/grammar/ECAToken.g:1:273: WS { mWS(); @@ -3968,7 +4099,7 @@ public void mTokens() throws RecognitionException { protected DFA6 dfa6 = new DFA6(this); - protected DFA27 dfa27 = new DFA27(this); + protected DFA28 dfa28 = new DFA28(this); static final String DFA6_eotS = "\2\uffff\2\4\2\uffff\1\4"; static final String DFA6_eofS = @@ -4024,19 +4155,19 @@ public String getDescription() { return "41:1: NUMBER : ( INTEGER | FLOAT );"; } } - static final String DFA27_eotS = + static final String DFA28_eotS = "\1\uffff\2\3\2\uffff"; - static final String DFA27_eofS = + static final String DFA28_eofS = "\5\uffff"; - static final String DFA27_minS = + static final String DFA28_minS = "\1\101\2\56\2\uffff"; - static final String DFA27_maxS = + static final String DFA28_maxS = "\3\172\2\uffff"; - static final String DFA27_acceptS = + static final String DFA28_acceptS = "\3\uffff\1\2\1\1"; - static final String DFA27_specialS = + static final String DFA28_specialS = "\5\uffff}>"; - static final String[] DFA27_transitionS = { + static final String[] DFA28_transitionS = { "\32\1\4\uffff\1\1\1\uffff\32\1", "\1\4\1\uffff\12\2\7\uffff\32\2\4\uffff\1\2\1\uffff\32\2", "\1\4\1\uffff\12\2\7\uffff\32\2\4\uffff\1\2\1\uffff\32\2", @@ -4044,37 +4175,37 @@ public String getDescription() { "" }; - static final short[] DFA27_eot = DFA.unpackEncodedString(DFA27_eotS); - static final short[] DFA27_eof = DFA.unpackEncodedString(DFA27_eofS); - static final char[] DFA27_min = DFA.unpackEncodedStringToUnsignedChars(DFA27_minS); - static final char[] DFA27_max = DFA.unpackEncodedStringToUnsignedChars(DFA27_maxS); - static final short[] DFA27_accept = DFA.unpackEncodedString(DFA27_acceptS); - static final short[] DFA27_special = DFA.unpackEncodedString(DFA27_specialS); - static final short[][] DFA27_transition; + static final short[] DFA28_eot = DFA.unpackEncodedString(DFA28_eotS); + static final short[] DFA28_eof = DFA.unpackEncodedString(DFA28_eofS); + static final char[] DFA28_min = DFA.unpackEncodedStringToUnsignedChars(DFA28_minS); + static final char[] DFA28_max = DFA.unpackEncodedStringToUnsignedChars(DFA28_maxS); + static final short[] DFA28_accept = DFA.unpackEncodedString(DFA28_acceptS); + static final short[] DFA28_special = DFA.unpackEncodedString(DFA28_specialS); + static final short[][] DFA28_transition; static { - int numStates = DFA27_transitionS.length; - DFA27_transition = new short[numStates][]; + int numStates = DFA28_transitionS.length; + DFA28_transition = new short[numStates][]; for (int i=0; i parseDescriptor(String descriptor, boolean includeRet } else { // skip any trailing spaces before the return type idx++; - while (descriptor.charAt(idx) == ' ') + while (idx < length && descriptor.charAt(idx) == ' ') { idx++; } + if (idx == length) { + // ok, we need to add a void return type + argTypes.add("void"); + } } } break;