Skip to content

Commit

Permalink
Homework: improve readability of MiniC grammar (B04)
Browse files Browse the repository at this point in the history
  • Loading branch information
cagix committed Oct 30, 2024
1 parent 2eb998f commit c56c8c5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions homework/src/sample_project/src/main/antlr/Hello.g4
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ atom : ID | NUM ;
// Lexer
ID : [a-z][a-zA-Z]* ;
NUM : [0-9]+ ;

WS : [ \t\n]+ -> skip ;
1 change: 1 addition & 0 deletions homework/src/sample_project/src/main/antlr/MiniC.g4
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@ type : 'int' | 'string' | 'bool' ;
ID : [a-z][a-zA-Z0-9]* ;
NUMBER : [0-9]+ ;
STRING : '"' (~[\n\r"])* '"' ;
COMMENT : '#' ~[\n\r]* -> skip ;
WS : [ \t\n\r]+ -> skip ;
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ atom : ID | NUM ;
// Lexer
ID : [a-z][a-zA-Z]* ;
NUM : [0-9]+ ;

WS : [ \t\n]+ -> skip ;

0 comments on commit c56c8c5

Please sign in to comment.