diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-23 16:10:07 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-23 16:10:07 +0300 |
commit | 6e8ad128fe65ae8803e3e92c383256ae6afca02e (patch) | |
tree | ea6166df7bc788027ecdbb101ddafd1537d405c5 /src/grecs-lex.l | |
parent | 63da417be1dfe1366a4a8984770c06cbbadcda39 (diff) | |
download | grecs-6e8ad128fe65ae8803e3e92c383256ae6afca02e.tar.gz grecs-6e8ad128fe65ae8803e3e92c383256ae6afca02e.tar.bz2 |
Fix handling of C comments in bind and grecs lexers.
* src/bind-lex.l: Fix unquoted string rule.
* src/grecs-lex.l: Likewise.
* tests/bind00.at: Update.
* tests/grecs00.at: New testcase.
* tests/Makefile.am: Add new testcases.
* tests/testsuite.at: Likewise.
* tests/gcffmt.c (main): New options -x and -X.
Diffstat (limited to 'src/grecs-lex.l')
-rw-r--r-- | src/grecs-lex.l | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/grecs-lex.l b/src/grecs-lex.l index 205a8f4..5ca4e31 100644 --- a/src/grecs-lex.l +++ b/src/grecs-lex.l @@ -94,7 +94,8 @@ P [1-9][0-9]* /* Identifiers */ <INITIAL>{ID} return ident(); /* Strings */ -[a-zA-Z0-9_\.\*/:@-]+ { grecs_line_begin(); +[a-zA-Z0-9_\.\*/:@-]([a-zA-Z0-9_\./:@-][a-zA-Z0-9_\.\*/:@-]*)? { + grecs_line_begin(); grecs_line_add(yytext, yyleng); yylval.string = grecs_line_finish(); return STRING; } |