diff options
Diffstat (limited to 'glcpp-lex.l')
-rw-r--r-- | glcpp-lex.l | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/glcpp-lex.l b/glcpp-lex.l index a51d9e185f..0954ab7e83 100644 --- a/glcpp-lex.l +++ b/glcpp-lex.l @@ -47,6 +47,17 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]? %% + /* Single-line comments */ +"//"[^\n]+\n { + return NEWLINE; +} + + /* Multi-line comments */ +[/][*]([^*]*[*]+[^/])*[^*]*[*]*[/] { + if (yyextra->space_tokens) + return SPACE; +} + {HASH}if/.*\n { yyextra->lexing_if = 1; yyextra->space_tokens = 0; |