1 parser grammar LeafRefPathParser;
4 package org.opendaylight.yangtools.antlrv4.code.gen;
8 tokenVocab = LeafRefPathLexer;
11 path_arg : absolute_path | relative_path;
13 absolute_path : (SLASH node_identifier (path_predicate)*)+;
15 relative_path : (DOTS SLASH)* descendant_path;
17 descendant_path : node_identifier ((path_predicate)* absolute_path)?;
19 path_predicate : LEFT_SQUARE_BRACKET SEP? path_equality_expr SEP? RIGHT_SQUARE_BRACKET;
21 path_equality_expr : node_identifier SEP? EQUAL SEP? path_key_expr;
23 path_key_expr : current_function_invocation SEP? SLASH SEP? rel_path_keyexpr;
25 rel_path_keyexpr : (DOTS SEP? SLASH SEP?)* (node_identifier SEP? SLASH SEP?)* node_identifier;
27 node_identifier : (prefix COLON)? identifier;
29 current_function_invocation : CURRENT_KEYWORD SEP? LEFT_PARENTHESIS SEP? RIGHT_PARENTHESIS;
33 identifier: IDENTIFIER | CURRENT_KEYWORD;