Update YANG lexer/parser to accept free-standing '+' 04/89104/5
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 17 Apr 2020 18:01:36 +0000 (20:01 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 6 Jul 2020 12:09:39 +0000 (14:09 +0200)
commit04ed60d275521fd6e6ee57d5b1ce4e6a519d2e35
tree5d9da9a43987aa25c34137d57a30dd177195e518
parentcae75524154a2916c5cebc504d52aedc47daeb7c
Update YANG lexer/parser to accept free-standing '+'

The lexer is not quite accurate, as it does not allow for strings
starting with a '+' when not quoted. Fix this up, relaxing the
rules.

JIRA: YANGTOOLS-1089
Change-Id: Ifaf9c65966b43f26f37fc88a11d77fc9f43d2c8c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-parser-antlr/src/main/antlr4/org/opendaylight/yangtools/yang/parser/antlr/YangStatementLexer.g4
yang/yang-parser-antlr/src/main/antlr4/org/opendaylight/yangtools/yang/parser/antlr/YangStatementParser.g4
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/repo/ArgumentContextUtils.java
yang/yang-parser-rfc7950/src/test/java/org/opendaylight/yangtools/yang/stmt/YT1089Test.java [new file with mode: 0644]
yang/yang-parser-rfc7950/src/test/resources/bugs/YT1089/foo.yang [new file with mode: 0644]