1 parser grammar LeafRefPathParser;
4 tokenVocab = LeafRefPathLexer;
7 path_arg : (absolute_path | relative_path) EOF;
9 absolute_path : (SLASH node_identifier (path_predicate)*)+;
11 relative_path : (DOTS SLASH)* descendant_path;
13 descendant_path : node_identifier ((path_predicate)* absolute_path)?;
15 path_predicate : LEFT_SQUARE_BRACKET SEP? path_equality_expr SEP? RIGHT_SQUARE_BRACKET;
17 path_equality_expr : node_identifier SEP? EQUAL SEP? path_key_expr;
19 path_key_expr : current_function_invocation SEP? SLASH SEP? rel_path_keyexpr;
21 rel_path_keyexpr : (DOTS SEP? SLASH SEP?)* (node_identifier SEP? SLASH SEP?)* node_identifier;
23 node_identifier : (prefix COLON)? identifier;
25 current_function_invocation : CURRENT_KEYWORD SEP? LEFT_PARENTHESIS SEP? RIGHT_PARENTHESIS;
29 identifier: IDENTIFIER | CURRENT_KEYWORD;