aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--calculator-javacc/Calculator.jj4
1 files changed, 2 insertions, 2 deletions
diff --git a/calculator-javacc/Calculator.jj b/calculator-javacc/Calculator.jj
index b88937d..3dbf1b8 100644
--- a/calculator-javacc/Calculator.jj
+++ b/calculator-javacc/Calculator.jj
@@ -73,7 +73,7 @@ TOKEN : {
<END: "exit">|
<NUM: (["0"-"9"])+("."((["0"-"9"])+))?>|
<ID: (["a"-"z"]|["A"-"Z"])+>|
- <ILL: ~[]>
+ <ILL: ~[]> // Defined so that I can 'wipe' the half parsed line in case of malformations
}
double statement() :
@@ -182,7 +182,7 @@ void passStatement() :
{
}
{
- (<ILL>|<PAL>|<PAR>|<ADD>|<SUB>|<MUL>|<DIV>|<EQU>|<LET>|<END>|<NUM>|<ID>)* <EOL>| //Skip any token until the next EOL
+ (<ILL>|<PAL>|<PAR>|<ADD>|<SUB>|<MUL>|<DIV>|<EQU>|<LET>|<END>|<NUM>|<ID>)* <EOL>| //Skip *anything* until the next EOL
<EOF>{System.out.println("\nBuffer was closed. Exiting."); System.exit(0);}|
{}
} \ No newline at end of file