Take advantage of ANTLR keyword validation 03/92203/11
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 20 Aug 2020 09:44:42 +0000 (11:44 +0200)
committerRobert Varga <nite@hq.sk>
Wed, 9 Sep 2020 12:46:42 +0000 (12:46 +0000)
commite57c344fea2425c0b88a257dacc00bfc939a1aa3
tree53c4d818ec3402a143fcff81d93c41bc1372157a
parent8dd08cfffbefdb658e9a626f566651c19c66b097
Take advantage of ANTLR keyword validation

We can guarantee keyword matches only valid identifiers, hence there
is little reason to perform additional validation in QName itself.

This patch punches a hole in the API for the sake of improved CPU
usage in the most common use case.

Change-Id: Ib190f44cbe29ed4dd62ab20e62254a9d23b78e10
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/QName.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/repo/StatementContextVisitor.java