aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bind-lex.l5
-rw-r--r--src/grecs-lex.l3
2 files changed, 5 insertions, 3 deletions
diff --git a/src/bind-lex.l b/src/bind-lex.l
index 67fade0..10df618 100644
--- a/src/bind-lex.l
+++ b/src/bind-lex.l
@@ -42,7 +42,7 @@ P [1-9][0-9]*
%%
/* C-style comments */
-"/*".* BEGIN(COMMENT);
+"/*" BEGIN(COMMENT);
<COMMENT>[^*\n]* /* eat anything that's not a '*' */
<COMMENT>"*"+[^*/\n]* /* eat up '*'s not followed by '/'s */
<COMMENT>\n ++grecs_current_locus.line;
@@ -68,7 +68,8 @@ P [1-9][0-9]*
BIND_CONTROLS : BIND_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 BIND_STRING; }
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; }

Return to:

Send suggestions and report system problems to the System administrator.