diff --git a/frontends/LexOccam.x b/frontends/LexOccam.x index 8e67e5f..4986663 100644 --- a/frontends/LexOccam.x +++ b/frontends/LexOccam.x @@ -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]* diff --git a/frontends/PreprocessOccam.hs b/frontends/PreprocessOccam.hs index 02e5e21..f83cf02 100644 --- a/frontends/PreprocessOccam.hs +++ b/frontends/PreprocessOccam.hs @@ -120,6 +120,7 @@ directives :: [(Regex, DirectiveFunc)] directives = [ (mkRegex "^INCLUDE \"(.*)\"$", handleInclude) , (mkRegex "^USE \"(.*)\"$", handleUse) + , (mkRegex "^COMMENT .*$", (\_ _ -> return id)) ] -- | Handle the @#INCLUDE@ directive.