aboutsummaryrefslogtreecommitdiff
path: root/calculator-javacc
diff options
context:
space:
mode:
authorMaël Gassmann <mael.gassmann@students.bfh.ch>2021-06-12 18:53:12 +0200
committerMaël Gassmann <mael.gassmann@students.bfh.ch>2021-06-12 18:53:12 +0200
commitd2ab3adb27a3b3f6df19b0b18dce3a749543c1e7 (patch)
tree00f4d258052876a1656854f2cb99571e9db61448 /calculator-javacc
parent0a7958a014eb746390c1e602b0e67c1a43f94a33 (diff)
[~] Added comments
Diffstat (limited to 'calculator-javacc')
-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