From 8d58ac0a08547cf4e307d491e4798d8165b84141 Mon Sep 17 00:00:00 2001 From: Boolean-True Date: Wed, 8 May 2024 11:28:52 +0200 Subject: [PATCH] Fix numbers in variable names --- src/main/antlr/Decaf.g4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/antlr/Decaf.g4 b/src/main/antlr/Decaf.g4 index 0171f6e..f0e3a96 100644 --- a/src/main/antlr/Decaf.g4 +++ b/src/main/antlr/Decaf.g4 @@ -88,6 +88,6 @@ CHAR : 'char'; BOOLEANLITERAL : 'true' | 'false' ; CHARLITERAL : ['][a-zA-Z][']; -IDENTIFIER : [a-zA-Z]+; +IDENTIFIER : ([a-zA-Z]+[0-9]*)+; NUMBER : [0-9]+; WS : [ \t\r\n] -> skip;