make newline optional member of a statement
This commit is contained in:
parent
7758b76c7d
commit
9b46389801
|
@ -6,7 +6,7 @@ grammar CommentMacro;
|
|||
|
||||
prog : statement+ EOF ;
|
||||
|
||||
statement : macro (':' macro)* NEWLINE
|
||||
statement : macro (':' macro)* NEWLINE?
|
||||
| NEWLINE
|
||||
;
|
||||
|
||||
|
@ -70,6 +70,9 @@ number : NUMBER ;
|
|||
** LEXAR Rules
|
||||
**/
|
||||
|
||||
fragment DIGIT : [0-9] ;
|
||||
NUMBER : DIGIT+ ('.' DIGIT+)? ;
|
||||
|
||||
SLASH : '/' ;
|
||||
THRU : '>' ;
|
||||
NEXT : '+' ;
|
||||
|
@ -81,11 +84,8 @@ WHOLEHOG : [hH] ;
|
|||
DP8K : [dD] ;
|
||||
IOP : 'IOP';
|
||||
|
||||
fragment DIGIT : [0-9] ;
|
||||
NUMBER : DIGIT+ ('.' DIGIT+)? ;
|
||||
|
||||
NEWLINE : '\r'? '\n' ; // return newlines to parser
|
||||
WS : [ \t]+ -> skip ; // ignore whitespace
|
||||
NEWLINE : '\r'? '\n' ; // return newlines to parser
|
||||
WS : [ \t]+ -> skip ; // ignore whitespace
|
||||
|
||||
COMMENT // toss c and HTML sytle block comments
|
||||
: ( '<!--' .*? '-->'
|
||||
|
|
Loading…
Reference in New Issue