Special-case identifier lexer token 06/92206/2
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 15:42:21 +0000 (17:42 +0200)
commit0ec7fd50a8d7768f55d03e2ad1c6156fb6836c67
tree7b851544fc978fecb5d0b5b0690283a641e53c04
parented4fc2d7195ad18fa5c8a8d085a25f0f428e5c41
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>
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