RelativeLocationPath ::= Step | RelativeLocationPath '/' Step | RelativeLocationPath '//' Step
| 9282 | |
| 9283 | // RelativeLocationPath ::= Step | RelativeLocationPath '/' Step | RelativeLocationPath '//' Step |
| 9284 | xpath_ast_node* parse_relative_location_path(xpath_ast_node* set) |
| 9285 | { |
| 9286 | xpath_ast_node* n = parse_step(set); |
| 9287 | |
| 9288 | while (_lexer.current() == lex_slash || _lexer.current() == lex_double_slash) |
| 9289 | { |
| 9290 | lexeme_t l = _lexer.current(); |
| 9291 | _lexer.next(); |
| 9292 | |
| 9293 | if (l == lex_double_slash) |
| 9294 | n = new (alloc_node()) xpath_ast_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0); |
| 9295 | |
| 9296 | n = parse_step(n); |
| 9297 | } |
| 9298 | |
| 9299 | return n; |
| 9300 | } |
| 9301 | |
| 9302 | // LocationPath ::= RelativeLocationPath | AbsoluteLocationPath |
| 9303 | // AbsoluteLocationPath ::= '/' RelativeLocationPath? | '//' RelativeLocationPath |