Special-case identifier lexer token 08/92208/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 20 Aug 2020 14:48:41 +0000 (16:48 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 20 Aug 2020 18:35:57 +0000 (20:35 +0200)
commite169f54e6e9252fb31512775786a78aa0fee0ad4
treee7b0578434dda5c2e66ae630c19de8646ed1ae49
parentfe6459733ae355e5adb4c4e1ed257295861683c9
Special-case identifier lexer token

An unquoted string can be an IDENTIFIER, which is the most common
case anyway. This token does not have to be further validated and
thus it makes sense to special-case it. This has the neat effect
of reducing the depth of our parse tree, too -- bringing memory
usage down by 6.6% versus the original fix.

JIRA: YANGTOOLS-1089
Change-Id: I63701719e90334558048201d70d8264ab9299efb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 0ec7fd50a8d7768f55d03e2ad1c6156fb6836c67)
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