exprList : expr (',' expr)*
971826
ExprList exprList() {
		List<Expr> exprList = new ArrayList<Expr>();
		while (true) {
			Expr stat = expr();
			if (stat != null) {
				exprList.add(stat);
				if (peek().sym == Sym.COMMA) {
					move();
					if (peek() == EOF) {
						throw new ParseException("Expression error: can not match the char of comma ','", location);
					}
					continue ;
				}
			}
			break ;
		}
		return new ExprList(exprList);
	}
15906
def p_expr1(p):
    
    p[0] = node.expr(op=p[1], args=node.expr_list([p[2]]))
829097
def p_expr_usr(p):
    
    if p[2].type_ == TYPE.string:
        p[0] = make_builtin(p.lineno(1), 'USR_STR', p[2], type_=TYPE.uinteger)
    else:
        p[0] = make_builtin(p.lineno(1), 'USR',
                            make_typecast(TYPE.uinteger, p[2], p.lineno(1)),
                            type_=TYPE.uinteger)
1365770
def p_expression_inlist(self, p):
        '''  
        '''
        _LOGGER.debug("expresion -> expresion IN lexp")

        if self._autodefine_vars:
            self._init_vars(TypedList([]), p[3])

        if p[3].type != TypedClass.LIST: raise TypeError("expected list for IN operator")
        
        retval = False
        for v in p[3].value:
            if p[1] == v:
                retval = True
                break
        
        p[0] = TypedClass(retval, TypedClass.BOOLEAN)
1303699
def p_expr_assign(p):
    ''''''
    if len(p) == 5:
        p[0] = ast.Assignment(p[1], p[4], True, lineno=p.lineno(2))
    else:
        p[0] = ast.Assignment(p[1], p[3], False, lineno=p.lineno(2))
1039556
def p_l_expression(self, p):
        '''     
        '''
        _LOGGER.debug("l -> expresion")

        l = TypedList( [ p[1] ] )
        p[0] = l
896134
def ast2expr(ast):
    """"""
    if ast[0] == 'const':
        return _CONSTS[ast[1]]
    elif ast[0] == 'var':
        return exprvar(ast[1], ast[2])
    else:
        xs = [ast2expr(x) for x in ast[1:]]
        return ASTOPS[ast[0]](*xs, simplify=False)
679266
def process_list_arg(arg):
    
    if isinstance(arg, list):
        return arg
    elif isinstance(arg, basestring):
        args = []
        for part in arg.split(","):
            args.append(part.strip())
        return args
48600
def p_expr_function(p):
    ''
    p[0] = ast.Closure(p[4], p[6], p[8], p[2], lineno=p.lineno(1))
1255285
def p_exprle(p):
    
    a = int(p[1]) if p[1].isdigit() else 0
    b = int(p[3]) if p[3].isdigit() else 0

    p[0] = '1' if a <= b else '0'
858526
def parse(expression):
    
    result = []
    current = ""
    for i in expression:
        if i.isdigit() or i == '.':
            current += i
        else:
            if len(current) > 0:
                result.append(current)
                current = ""
            if i in __operators__ or i in __parenthesis__:
                result.append(i)
            else:
                raise Exception("invalid syntax " + i)

    if len(current) > 0:
        result.append(current)
    return result
335819
public final void expressionList() throws RecognitionException {
		int expressionList_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 105) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1107:5: ( expression ( ',' expression )* )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1107:9: expression ( ',' expression )*
			{
			pushFollow(FOLLOW_expression_in_expressionList4817);
			expression();
			state._fsp--;
			if (state.failed) return;
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1107:20: ( ',' expression )*
			loop139:
			while (true) {
				int alt139=2;
				int LA139_0 = input.LA(1);
				if ( (LA139_0==43) ) {
					alt139=1;
				}

				switch (alt139) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1107:21: ',' expression
					{
					match(input,43,FOLLOW_43_in_expressionList4820); if (state.failed) return;
					pushFollow(FOLLOW_expression_in_expressionList4822);
					expression();
					state._fsp--;
					if (state.failed) return;
					}
					break;

				default :
					break loop139;
				}
			}

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 105, expressionList_StartIndex); }

		}
	}
586157
public final hqlParser.exprList_return exprList() throws RecognitionException {
		hqlParser.exprList_return retval = new hqlParser.exprList_return();
		retval.start = input.LT(1);

		CommonTree root_0 = null;

		Token f=null;
		Token f2=null;
		Token TRAILING287=null;
		Token LEADING288=null;
		Token BOTH289=null;
		Token COMMA291=null;
		Token AS294=null;
		ParserRuleReturnScope expression290 =null;
		ParserRuleReturnScope expression292 =null;
		ParserRuleReturnScope expression293 =null;
		ParserRuleReturnScope identifier295 =null;
		ParserRuleReturnScope expression296 =null;

		CommonTree f_tree=null;
		CommonTree f2_tree=null;
		CommonTree TRAILING287_tree=null;
		CommonTree LEADING288_tree=null;
		CommonTree BOTH289_tree=null;
		CommonTree COMMA291_tree=null;
		CommonTree AS294_tree=null;

		try {
			// hql.g:669:2: ( ( TRAILING | LEADING | BOTH )? ( expression ( ( COMMA ! expression )+ |f= FROM expression | AS ! identifier )? |f2= FROM expression )? )
			// hql.g:669:4: ( TRAILING | LEADING | BOTH )? ( expression ( ( COMMA ! expression )+ |f= FROM expression | AS ! identifier )? |f2= FROM expression )?
			{
			root_0 = (CommonTree)adaptor.nil();


			// hql.g:669:4: ( TRAILING | LEADING | BOTH )?
			int alt103=4;
			switch ( input.LA(1) ) {
				case TRAILING:
					{
					alt103=1;
					}
					break;
				case LEADING:
					{
					alt103=2;
					}
					break;
				case BOTH:
					{
					alt103=3;
					}
					break;
			}
			switch (alt103) {
				case 1 :
					// hql.g:669:5: TRAILING
					{
					TRAILING287=(Token)match(input,TRAILING,FOLLOW_TRAILING_in_exprList3375);
					TRAILING287_tree = (CommonTree)adaptor.create(TRAILING287);
					adaptor.addChild(root_0, TRAILING287_tree);

					TRAILING287.setType( IDENT );
					}
					break;
				case 2 :
					// hql.g:670:10: LEADING
					{
					LEADING288=(Token)match(input,LEADING,FOLLOW_LEADING_in_exprList3388);
					LEADING288_tree = (CommonTree)adaptor.create(LEADING288);
					adaptor.addChild(root_0, LEADING288_tree);

					LEADING288.setType( IDENT );
					}
					break;
				case 3 :
					// hql.g:671:10: BOTH
					{
					BOTH289=(Token)match(input,BOTH,FOLLOW_BOTH_in_exprList3401);
					BOTH289_tree = (CommonTree)adaptor.create(BOTH289);
					adaptor.addChild(root_0, BOTH289_tree);

					BOTH289.setType( IDENT );
					}
					break;

			}

			// hql.g:673:4: ( expression ( ( COMMA ! expression )+ |f= FROM expression | AS ! identifier )? |f2= FROM expression )?
			int alt106=3;
			int LA106_0 = input.LA(1);
			if ( (LA106_0==ALL||LA106_0==ANY||LA106_0==AVG||LA106_0==BNOT||LA106_0==CASE||LA106_0==COLON||LA106_0==COUNT||LA106_0==ELEMENTS||LA106_0==EMPTY||LA106_0==EXISTS||LA106_0==FALSE||LA106_0==IDENT||LA106_0==INDICES||LA106_0==MAX||(LA106_0 >= MIN && LA106_0 <= MINUS)||LA106_0==NOT||(LA106_0 >= NULL && LA106_0 <= NUM_LONG)||LA106_0==OPEN||(LA106_0 >= PARAM && LA106_0 <= PLUS)||LA106_0==QUOTED_String||LA106_0==SOME||LA106_0==SUM||LA106_0==TRUE) ) {
				alt106=1;
			}
			else if ( (LA106_0==FROM) ) {
				alt106=2;
			}
			switch (alt106) {
				case 1 :
					// hql.g:674:5: expression ( ( COMMA ! expression )+ |f= FROM expression | AS ! identifier )?
					{
					pushFollow(FOLLOW_expression_in_exprList3425);
					expression290=expression();
					state._fsp--;

					adaptor.addChild(root_0, expression290.getTree());

					// hql.g:674:16: ( ( COMMA ! expression )+ |f= FROM expression | AS ! identifier )?
					int alt105=4;
					switch ( input.LA(1) ) {
						case COMMA:
							{
							alt105=1;
							}
							break;
						case FROM:
							{
							alt105=2;
							}
							break;
						case AS:
							{
							alt105=3;
							}
							break;
					}
					switch (alt105) {
						case 1 :
							// hql.g:674:18: ( COMMA ! expression )+
							{
							// hql.g:674:18: ( COMMA ! expression )+
							int cnt104=0;
							loop104:
							while (true) {
								int alt104=2;
								int LA104_0 = input.LA(1);
								if ( (LA104_0==COMMA) ) {
									alt104=1;
								}

								switch (alt104) {
								case 1 :
									// hql.g:674:19: COMMA ! expression
									{
									COMMA291=(Token)match(input,COMMA,FOLLOW_COMMA_in_exprList3430);
									pushFollow(FOLLOW_expression_in_exprList3433);
									expression292=expression();
									state._fsp--;

									adaptor.addChild(root_0, expression292.getTree());

									}
									break;

								default :
									if ( cnt104 >= 1 ) break loop104;
									EarlyExitException eee = new EarlyExitException(104, input);
									throw eee;
								}
								cnt104++;
							}

							}
							break;
						case 2 :
							// hql.g:675:9: f= FROM expression
							{
							f=(Token)match(input,FROM,FOLLOW_FROM_in_exprList3448);
							f_tree = (CommonTree)adaptor.create(f);
							adaptor.addChild(root_0, f_tree);

							pushFollow(FOLLOW_expression_in_exprList3450);
							expression293=expression();
							state._fsp--;

							adaptor.addChild(root_0, expression293.getTree());

							f.setType( IDENT );
							}
							break;
						case 3 :
							// hql.g:676:9: AS ! identifier
							{
							AS294=(Token)match(input,AS,FOLLOW_AS_in_exprList3462);
							pushFollow(FOLLOW_identifier_in_exprList3465);
							identifier295=identifier();
							state._fsp--;

							adaptor.addChild(root_0, identifier295.getTree());

							}
							break;

					}

					}
					break;
				case 2 :
					// hql.g:677:7: f2= FROM expression
					{
					f2=(Token)match(input,FROM,FOLLOW_FROM_in_exprList3479);
					f2_tree = (CommonTree)adaptor.create(f2);
					adaptor.addChild(root_0, f2_tree);

					pushFollow(FOLLOW_expression_in_exprList3481);
					expression296=expression();
					state._fsp--;

					adaptor.addChild(root_0, expression296.getTree());

					f2.setType( IDENT );
					}
					break;

			}

			}

			retval.stop = input.LT(-1);

			retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);


			    assert false : "PLEASE CHECK THAT IT WORKS !!!";
			    CommonTree root = (CommonTree) adaptor.create( EXPR_LIST, "exprList" );
			    root.addChild( retval.getTree() );
			    retval.tree = root ;
			   //IASTNode root = (IASTNode) adaptor.Create(EXPR_LIST, "exprList");
			   //root.AddChild((IASTNode)retval.Tree);
			   //retval.Tree = root;

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}
296831
def parse_expr(tokens, options):
    """"""
    seq = parse_seq(tokens, options)
    if tokens.current() != '|':
        return seq
    result = [Required(*seq)] if len(seq) > 1 else seq
    while tokens.current() == '|':
        tokens.move()
        seq = parse_seq(tokens, options)
        result += [Required(*seq)] if len(seq) > 1 else seq
    return [Either(*result)] if len(result) > 1 else result
1041361
def p_expr_AND_expr(p):
    
    p[0] = make_binary(p.lineno(2), 'AND', p[1], p[3], lambda x, y: x and y)
1155658
def p_expression_invar(self, p):
        '''  
        '''
        _LOGGER.debug("expresion -> expresion IN VAR")
    
        if p[3] not in self._VAR_VALUES:
            if self._autodefine_vars:
                self._VAR_VALUES[p[3]] = TypedList([])
            else:
                raise TypeError("list expected for IN operator")
            
        l = self._VAR_VALUES[p[3]]
        if l.type != TypedList.LIST: raise TypeError("list expected for IN operator")
        p[3] = l
        
        self.p_expression_inlist(p)
866595
def p_call_expr(self, p):
        
        if len(p) == 3:
            p[0] = ast.FunctionCall(p[1], p[2])
        elif len(p) == 4:
            p[0] = ast.DotAccessor(p[1], p[3])
        else:
            p[0] = ast.BracketAccessor(p[1], p[3])