Added support for the #COMMENT directive to the occam parser
This commit is contained in:
parent
acca3d03fd
commit
7d8f170b7d
|
@ -35,7 +35,7 @@ $hexDigit = [0-9 a-f A-F]
|
|||
$horizSpace = [\ \t]
|
||||
$vertSpace = [\r\n]
|
||||
|
||||
@directive = "ELSE" | "ENDIF" | "IF" | "INCLUDE"
|
||||
@directive = "COMMENT" | "ELSE" | "ENDIF" | "IF" | "INCLUDE"
|
||||
| "OPTION" | "PRAGMA" | "RELAX" | "USE"
|
||||
|
||||
@preprocessor = "#" @directive [^\n]*
|
||||
|
|
|
@ -120,6 +120,7 @@ directives :: [(Regex, DirectiveFunc)]
|
|||
directives =
|
||||
[ (mkRegex "^INCLUDE \"(.*)\"$", handleInclude)
|
||||
, (mkRegex "^USE \"(.*)\"$", handleUse)
|
||||
, (mkRegex "^COMMENT .*$", (\_ _ -> return id))
|
||||
]
|
||||
|
||||
-- | Handle the @#INCLUDE@ directive.
|
||||
|
|
Loading…
Reference in New Issue
Block a user