diff options
Diffstat (limited to 'bin/hilex/mdoc.l')
-rw-r--r-- | bin/hilex/mdoc.l | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/bin/hilex/mdoc.l b/bin/hilex/mdoc.l index 2f01ce2a..4db147c8 100644 --- a/bin/hilex/mdoc.l +++ b/bin/hilex/mdoc.l @@ -25,6 +25,8 @@ %% +[[:blank:]]+ { return Normal; } + ^"." { BEGIN(MacroLine); return Keyword; @@ -32,7 +34,7 @@ ^".\\\"".* { return Comment; } -<MacroLine>{ +<MacroLine,Heading>{ "\n" { BEGIN(0); return Normal; @@ -52,18 +54,13 @@ "\""([^""]|"\\\"")*"\"" { return String; } } -<Heading>{ - "\n" { - BEGIN(0); - return Normal; - } - - [^[:space:]].* { return IdentifierTag; } -} +<Heading>[^[:space:]].* { return IdentifierTag; } "\\"(.|"("..|"["[^]]*"]") { return String; } -[[:blank:]]+|[^.\n""\\[:space:]]+|.|\n { return Normal; } +[^.\\""[:space:]]+ { return Normal; } + +.|\n { return Normal; } %{ (void)yyunput; |