Make the lexer only recognise known preprocessor directives.
This is another one for the list of occam oddities: there are situations where both a hex literal and a preprocessor directive are legal, so the two can't be ambiguous -- no #FACE or #ADA in the future!
This commit is contained in:
parent
1bac142a53
commit
87574796fb
|
@ -34,7 +34,10 @@ $hexDigit = [0-9 a-f A-F]
|
|||
$horizSpace = [\ \t]
|
||||
$vertSpace = [\r\n]
|
||||
|
||||
@preprocessor = "#" [^\n]*
|
||||
@directive = "ELSE" | "ENDIF" | "IF" | "INCLUDE"
|
||||
| "OPTION" | "PRAGMA" | "RELAX" | "USE"
|
||||
|
||||
@preprocessor = "#" @directive [^\n]*
|
||||
|
||||
@reserved = "[" | "]" | "(" | ")"
|
||||
| "::" | ":=" | ":" | "," | ";" | "&"
|
||||
|
|
Loading…
Reference in New Issue
Block a user