Added support for the #COMMENT directive to the occam parser

This commit is contained in:
Neil Brown 2007-10-15 17:12:53 +00:00
parent acca3d03fd
commit 7d8f170b7d
2 changed files with 2 additions and 1 deletions

View File

@ -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]*

View File

@ -120,6 +120,7 @@ directives :: [(Regex, DirectiveFunc)]
directives =
[ (mkRegex "^INCLUDE \"(.*)\"$", handleInclude)
, (mkRegex "^USE \"(.*)\"$", handleUse)
, (mkRegex "^COMMENT .*$", (\_ _ -> return id))
]
-- | Handle the @#INCLUDE@ directive.