Correct and/or/div/mod in path expressions 32/99032/1
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 19 Dec 2021 09:35:17 +0000 (10:35 +0100)
committerRobert Varga <nite@hq.sk>
Mon, 20 Dec 2021 09:50:11 +0000 (09:50 +0000)
commit74d69e2cbc3ddea6a2c6ed0dc21769b9136e43e3
tree6d28f3c63be0c7f6cf2b32f4a00676770efb652c
parentd5aac826f6c8b0b09d9dc23337e11b4070da9e64
Correct and/or/div/mod in path expressions

The grammar is creating implicit lexer tokens for and/or/div/mod, which
take precedence overt NCName. Make sure we define these tokens
explicitly and allow them to be an alternative wherever NCName is
valid.

JIRA: YANGTOOLS-1387
Change-Id: I4f4f26fe0f8bc27614b769b465a76696a49ad7c2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 1a7e93a50d22944771fe2ea4fc18c24fcf3aae11)
xpath/yang-xpath-antlr/src/main/antlr4/org/opendaylight/yangtools/yang/xpath/antlr/xpath.g4
xpath/yang-xpath-impl/src/test/java/org/opendaylight/yangtools/yang/xpath/impl/XPathParserTest.java