$ANTLR start "OR_ASSIGN"
19142
public final void mOR_ASSIGN() throws RecognitionException {
		try {
			int _type = OR_ASSIGN;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:176:5: ( '|=' )
			// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:176:7: '|='
			{
			match("|="); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
1315909
def parse_assign(string):
    
    try:
        a, b = string.split(" = ")
        return a.strip(), b.strip()
    except:
        print("Error with assignment: %s" % string, file=sys.stderr)
        return None, None
921700
function matchRegExp(oRule, context, options) {
    if (context[oRule.key] === undefined) {
        return undefined;
    }
    var sKey = oRule.key;
    var s1 = context[oRule.key].toLowerCase();
    var reg = oRule.regexp;
    var m = reg.exec(s1);
    if (debuglogV.enabled) {
        debuglogV("applying regexp: " + s1 + " " + JSON.stringify(m));
    }
    if (!m) {
        return undefined;
    }
    options = options || {};
    var delta = compareContext(context, oRule.follows, oRule.key);
    debuglogV(function () { return JSON.stringify(delta); });
    debuglogV(function () { return JSON.stringify(options); });
    if (options.matchothers && (delta.different > 0)) {
        return undefined;
    }
    var oExtractedContext = extractArgsMap(m, oRule.argsMap);
    debuglogV(function () { return "extracted args " + JSON.stringify(oRule.argsMap); });
    debuglogV(function () { return "match " + JSON.stringify(m); });
    debuglogV(function () { return "extracted args " + JSON.stringify(oExtractedContext); });
    var res = AnyObject.assign({}, oRule.follows);
    res = AnyObject.assign(res, oExtractedContext);
    res = AnyObject.assign(res, context);
    if (oExtractedContext[sKey] !== undefined) {
        res[sKey] = oExtractedContext[sKey];
    }
    if (options.override) {
        res = AnyObject.assign(res, oRule.follows);
        res = AnyObject.assign(res, oExtractedContext);
    }
    Object.freeze(res);
    debuglog(debuglog.enabled ? ('Found one' + JSON.stringify(res, undefined, 2)) : '-');
    return res;
}
1201227
public final AntlrDatatypeRuleToken ruleOpCompare() throws RecognitionException {
        AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();

        Token kw=null;


        	enterRule();

        try {
            // InternalPureXbase.g:1498:2: ( (kw= '>=' | (kw= '<' kw= '=' ) | kw= '>' | kw= '<' ) )
            // InternalPureXbase.g:1499:2: (kw= '>=' | (kw= '<' kw= '=' ) | kw= '>' | kw= '<' )
            {
            // InternalPureXbase.g:1499:2: (kw= '>=' | (kw= '<' kw= '=' ) | kw= '>' | kw= '<' )
            int alt27=4;
            switch ( input.LA(1) ) {
            case 30:
                {
                alt27=1;
                }
                break;
            case 28:
                {
                int LA27_2 = input.LA(2);

                if ( (LA27_2==EOF||(LA27_2>=RULE_STRING && LA27_2<=RULE_ID)||(LA27_2>=14 && LA27_2<=15)||LA27_2==28||(LA27_2>=44 && LA27_2<=45)||LA27_2==50||(LA27_2>=58 && LA27_2<=59)||LA27_2==61||LA27_2==64||LA27_2==66||(LA27_2>=69 && LA27_2<=80)) ) {
                    alt27=4;
                }
                else if ( (LA27_2==20) ) {
                    alt27=2;
                }
                else {
                    if (state.backtracking>0) {state.failed=true; return current;}
                    NoViableAltException nvae =
                        new NoViableAltException("", 27, 2, input);

                    throw nvae;
                }
                }
                break;
            case 29:
                {
                alt27=3;
                }
                break;
            default:
                if (state.backtracking>0) {state.failed=true; return current;}
                NoViableAltException nvae =
                    new NoViableAltException("", 27, 0, input);

                throw nvae;
            }

            switch (alt27) {
                case 1 :
                    // InternalPureXbase.g:1500:3: kw= '>='
                    {
                    kw=(Token)match(input,30,FOLLOW_2); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      			current.merge(kw);
                      			newLeafNode(kw, grammarAccess.getOpCompareAccess().getGreaterThanSignEqualsSignKeyword_0());
                      		
                    }

                    }
                    break;
                case 2 :
                    // InternalPureXbase.g:1506:3: (kw= '<' kw= '=' )
                    {
                    // InternalPureXbase.g:1506:3: (kw= '<' kw= '=' )
                    // InternalPureXbase.g:1507:4: kw= '<' kw= '='
                    {
                    kw=(Token)match(input,28,FOLLOW_13); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      				current.merge(kw);
                      				newLeafNode(kw, grammarAccess.getOpCompareAccess().getLessThanSignKeyword_1_0());
                      			
                    }
                    kw=(Token)match(input,20,FOLLOW_2); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      				current.merge(kw);
                      				newLeafNode(kw, grammarAccess.getOpCompareAccess().getEqualsSignKeyword_1_1());
                      			
                    }

                    }


                    }
                    break;
                case 3 :
                    // InternalPureXbase.g:1519:3: kw= '>'
                    {
                    kw=(Token)match(input,29,FOLLOW_2); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      			current.merge(kw);
                      			newLeafNode(kw, grammarAccess.getOpCompareAccess().getGreaterThanSignKeyword_2());
                      		
                    }

                    }
                    break;
                case 4 :
                    // InternalPureXbase.g:1525:3: kw= '<'
                    {
                    kw=(Token)match(input,28,FOLLOW_2); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      			current.merge(kw);
                      			newLeafNode(kw, grammarAccess.getOpCompareAccess().getLessThanSignKeyword_3());
                      		
                    }

                    }
                    break;

            }


            }

            if ( state.backtracking==0 ) {

              	leaveRule();

            }
        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
997118
def assignment(self):
        
        node = self.logical_or_expr()
        if self.token.nature == Nature.ASSIGN:
            token = self.token
            self._process(Nature.ASSIGN)
            right = self.logical_or_expr()
            return Assignment(left=node, op=token, right=right)
        else:
            return node
450665
public final void mTHEN() throws RecognitionException {
		try {
			int _type = THEN;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// druidG.g:644:6: ( ( 'THEN' | 'then' ) )
			// druidG.g:644:8: ( 'THEN' | 'then' )
			{
			// druidG.g:644:8: ( 'THEN' | 'then' )
			int alt32=2;
			int LA32_0 = input.LA(1);
			if ( (LA32_0=='T') ) {
				alt32=1;
			}
			else if ( (LA32_0=='t') ) {
				alt32=2;
			}

			else {
				NoViableAltException nvae =
					new NoViableAltException("", 32, 0, input);
				throw nvae;
			}

			switch (alt32) {
				case 1 :
					// druidG.g:644:9: 'THEN'
					{
					match("THEN"); 

					}
					break;
				case 2 :
					// druidG.g:644:18: 'then'
					{
					match("then"); 

					}
					break;

			}

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
400055
public final void mAS() throws RecognitionException {
		try {
			int _type = AS;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// hql.g:10:4: ( 'as' )
			// hql.g:10:6: 'as'
			{
			match("as"); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
650579
public Expr or(Expr expr) {
        if (type == Type.TRUE ||
            type == Type.FALSE ||
            type == NONE) {
            set(expr);
        } else if (expr.type != Type.TRUE &&
                   expr.type != Type.FALSE &&
                   expr.type != Type.NONE) {
            if (type.isLogical() && !expr.type.isLogical()) {
                if (type == OR)
                    right.or(expr);
                else if (type != NOT)
                    setLogical(Type.OR, expr, new Expr(this));
                else
                    setLogical(Type.OR, new Expr(this), expr);
            }
            else
                setLogical(Type.OR, new Expr(this), expr);
        }
        return this;
    }
876330
public final void mANY() throws RecognitionException {
		try {
			int _type = ANY;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// hql.g:9:5: ( 'any' )
			// hql.g:9:7: 'any'
			{
			match("any"); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
681918
public void mTokens() throws RecognitionException {
        // /home/victor/srec/core/src/main/antlr/srec.g:1:8: ( T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | BOOLEAN | NULL | ID | NUMBER | STRING | WS | NEWLINE | COMMENT )
        int alt12=15;
        alt12 = dfa12.predict(input);
        switch (alt12) {
            case 1 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:10: T__28
                {
                mT__28(); 

                }
                break;
            case 2 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:16: T__29
                {
                mT__29(); 

                }
                break;
            case 3 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:22: T__30
                {
                mT__30(); 

                }
                break;
            case 4 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:28: T__31
                {
                mT__31(); 

                }
                break;
            case 5 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:34: T__32
                {
                mT__32(); 

                }
                break;
            case 6 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:40: T__33
                {
                mT__33(); 

                }
                break;
            case 7 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:46: T__34
                {
                mT__34(); 

                }
                break;
            case 8 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:52: BOOLEAN
                {
                mBOOLEAN(); 

                }
                break;
            case 9 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:60: NULL
                {
                mNULL(); 

                }
                break;
            case 10 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:65: ID
                {
                mID(); 

                }
                break;
            case 11 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:68: NUMBER
                {
                mNUMBER(); 

                }
                break;
            case 12 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:75: STRING
                {
                mSTRING(); 

                }
                break;
            case 13 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:82: WS
                {
                mWS(); 

                }
                break;
            case 14 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:85: NEWLINE
                {
                mNEWLINE(); 

                }
                break;
            case 15 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:93: COMMENT
                {
                mCOMMENT(); 

                }
                break;

        }

    }
962597
function checkAttributeSelector1(i) {
  const start = i;

  if (tokens[i].type === TokenType.LeftSquareBracket) i++;
  else return 0;

  let l;
  if (l = checkSC(i)) i += l;

  if (l = checkAttributeName(i)) i += l;
  else return 0;

  if (l = checkSC(i)) i += l;

  if (l = checkAttributeMatch(i)) i += l;
  else return 0;

  if (l = checkSC(i)) i += l;

  if (l = checkAttributeValue(i)) i += l;
  else return 0;

  if (l = checkSC(i)) i += l;

  if (l = checkAttributeFlags(i)) {
    i += l;
    if (l = checkSC(i)) i += l;
  }

  if (tokens[i].type === TokenType.RightSquareBracket) i++;
  else return 0;

  return i - start;
}
691701
public final void mMOD_ASSIGN() throws RecognitionException {
		try {
			int _type = MOD_ASSIGN;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:184:5: ( '%=' )
			// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:184:7: '%='
			{
			match("%="); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
321309
public final void mCOMMENT() throws RecognitionException {
		try {
			int _type = COMMENT;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1399:5: ( '/*' ( options {greedy=false; } : . )* '*/' )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1399:9: '/*' ( options {greedy=false; } : . )* '*/'
			{
			match("/*"); 

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1399:14: ( options {greedy=false; } : . )*
			loop29:
			while (true) {
				int alt29=2;
				int LA29_0 = input.LA(1);
				if ( (LA29_0=='*') ) {
					int LA29_1 = input.LA(2);
					if ( (LA29_1=='/') ) {
						alt29=2;
					}
					else if ( ((LA29_1 >= '\u0000' && LA29_1 <= '.')||(LA29_1 >= '0' && LA29_1 <= '\uFFFF')) ) {
						alt29=1;
					}

				}
				else if ( ((LA29_0 >= '\u0000' && LA29_0 <= ')')||(LA29_0 >= '+' && LA29_0 <= '\uFFFF')) ) {
					alt29=1;
				}

				switch (alt29) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1399:42: .
					{
					matchAny(); 
					}
					break;

				default :
					break loop29;
				}
			}

			match("*/"); 

			_channel=HIDDEN;
			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
65624
def p_foo_stmt(p):
    ""
    expr1 = p[1][1][0]
    expr2 = p[3][1][0]
    ident = expr1.ret
    args1 = expr1.args
    args2 = expr2.args
    p[0] = node.let(ret=ident,
                    args=node.expr("or", node.expr_list([args1, args2])))
218286
def _Assign(self, t):
        
        self._fill()
        for target in t.nodes:
            self._dispatch(target)
            self._write(" = ")
        self._dispatch(t.expr)
        if not self._do_indent:
            self._write('; ')
268420
def p_expression_Or(self, p):
        ''
        p[0] = Or(p[1], p[3], lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
973656
public final void mMINUS_ASSIGN() throws RecognitionException {
		try {
			int _type = MINUS_ASSIGN;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:160:5: ( '-=' )
			// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:160:7: '-='
			{
			match("-="); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}