diff options
Diffstat (limited to 'cibic.l')
-rw-r--r-- | cibic.l | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -4,7 +4,7 @@ letter [a-zA-Z_$] digit [0-9] -%s IN_BLOCK_COMMENT IN_INLINE_COMMENT +%s IN_BLOCK_COMMENT IN_INLINE_COMMENT IN_DIRECTIVE %% <INITIAL>{ @@ -25,6 +25,14 @@ digit [0-9] [^\n]+ } +<INITIAL>{ +"#" BEGIN(IN_INLINE_COMMENT); +} +<IN_DIRECTIVE>{ +\n BEGIN(INITIAL); +[^\n]+ +} + "void" { return KW_VOID; } "char" { return KW_CHAR; } "int" { return KW_INT; } |