Force path expression parsing consume all data 47/86547/1
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 22 Dec 2019 10:20:29 +0000 (11:20 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 22 Dec 2019 13:12:29 +0000 (14:12 +0100)
commit6b23166bbbb71dd63edbd2f6c74277e878e4091c
tree7202bd3ce8e779eaef11dbe878ac1939a2f4c55a
parente984af8bfde34628fcce791f241e13121650ad50
Force path expression parsing consume all data

We really need to make sure we do not end up ignoring part of the
expression just because our rules are not exhaustive. This adds
the appropriate test and fix in grammar.

JIRA: YANGTOOLS-1049
Change-Id: I85278f0cd109897459be1db029fafbc95e203201
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 8dc8c85e43be7c78a8aa4081d970e924b9757b3f)
yang/yang-data-impl/src/main/antlr/org/opendaylight/yangtools/yang/data/impl/leafref/LeafRefPathParser.g4
yang/yang-parser-rfc7950/src/main/antlr/org/opendaylight/yangtools/antlrv4/code/gen/LeafRefPathParser.g4
yang/yang-parser-rfc7950/src/test/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/path/PathExpressionParserTest.java [new file with mode: 0644]