diff options
author | Carl Worth <cworth@cworth.org> | 2010-05-25 16:28:26 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-05-25 16:28:26 -0700 |
commit | b1854fdfb6b567fa61d544d8080e2acb4cc78dc1 (patch) | |
tree | 5bb3d217c3d94234f7b15f571b72ad59887763a6 /glcpp-lex.l | |
parent | e6fb7827c96451d4a09dfda31979a6b9cb27301e (diff) |
Implement simplified substitution for function-like macro invocation.
This supports function-like macro invocation but without any argument
substitution. This now makes test 11 through 14 pass.
Diffstat (limited to 'glcpp-lex.l')
-rw-r--r-- | glcpp-lex.l | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/glcpp-lex.l b/glcpp-lex.l index 7b5cdd57a0..b1980742d3 100644 --- a/glcpp-lex.l +++ b/glcpp-lex.l @@ -144,6 +144,18 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]? return IDENTIFIER; } +"(" { + return '('; +} + +")" { + return ')'; +} + +"," { + return ','; +} + {OTHER}+ { yylval.str = xtalloc_strdup (yyextra, yytext); return OTHER; @@ -151,7 +163,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]? {HSPACE}+ { yylval.str = xtalloc_strdup (yyextra, yytext); - return OTHER; + return SPACE; } \n { |