AdditiveExpr ::= MultiplicativeExpr | AdditiveExpr '+' MultiplicativeExpr | AdditiveExpr '-' MultiplicativeExpr
| 9445 | // | AdditiveExpr '+' MultiplicativeExpr |
| 9446 | // | AdditiveExpr '-' MultiplicativeExpr |
| 9447 | xpath_ast_node* parse_additive_expression() |
| 9448 | { |
| 9449 | xpath_ast_node* n = parse_multiplicative_expression(); |
| 9450 | |
| 9451 | while (_lexer.current() == lex_plus || _lexer.current() == lex_minus) |
| 9452 | { |
| 9453 | lexeme_t l = _lexer.current(); |
| 9454 | |
| 9455 | _lexer.next(); |
| 9456 | |
| 9457 | xpath_ast_node* expr = parse_multiplicative_expression(); |
| 9458 | |
| 9459 | n = new (alloc_node()) xpath_ast_node(l == lex_plus ? ast_op_add : ast_op_subtract, xpath_type_number, n, expr); |
| 9460 | } |
| 9461 | |
| 9462 | return n; |
| 9463 | } |
| 9464 | |
| 9465 | // RelationalExpr ::= AdditiveExpr |
| 9466 | // | RelationalExpr '<' AdditiveExpr |