diff options
Diffstat (limited to 'data/java-8')
| -rw-r--r-- | data/java-8/tokens.grammar | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/data/java-8/tokens.grammar b/data/java-8/tokens.grammar index 3521ac0..3941b94 100644 --- a/data/java-8/tokens.grammar +++ b/data/java-8/tokens.grammar @@ -43,7 +43,13 @@ Identifier: IdentifierChars: JavaLetter {JavaLetterOrDigit} +# Java 8 only has reserved keywords, but use modern names +# here to make a shared tokenizer simpler. Keyword: + ReservedKeyword + ContextualKeyword + +ReservedKeyword: abstract continue for @@ -95,14 +101,20 @@ Keyword: super while +ContextualKeyword: + Literal: IntegerLiteral FloatingPointLiteral BooleanLiteral CharacterLiteral StringLiteral + TextBlock NullLiteral +# Java 8 doesn't have TextBlock, but add it as newer grammers have it +TextBlock: + IntegerLiteral: DecimalIntegerLiteral HexIntegerLiteral |
