summaryrefslogtreecommitdiffabout
path: root/lib/forlanlex.l
authorSergey Poznyakoff <gray@gnu.org>2014-12-10 06:56:48 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2014-12-10 06:56:48 (GMT)
commitbdd68868836f01ac766afa1a6c79a5f7d4287da6 (patch) (side-by-side diff)
treed875e9fbf02575c9da52a2846ac00d09d5d3cefa /lib/forlanlex.l
parent85dfe24a45c65a9f414769fe059b1c5a06a3b176 (diff)
downloadeclat-bdd68868836f01ac766afa1a6c79a5f7d4287da6.tar.gz
eclat-bdd68868836f01ac766afa1a6c79a5f7d4287da6.tar.bz2
Fix coredump when comparing non-existing nodes.
* lib/forlan.c (coerce_value): Handle NULL nodes. (values_equal): Handle NULL strings. (dump_expr): Handle EQ and NE. * lib/forlanlex.l: Fix distinction before negative numeric and identifier. * etc/describe-security-groups.fln: ipProtocol == "-1" means "all". * tests/Makefile.am: Add new tests. * tests/testsuite.at: Likewise. * tests/comp00.at: New file. * tests/comp01.at: New file. * tests/comp02.at: New file. * tests/comp03.at: New file. * tests/comp04.at: New file. * tests/tforlan.c (main): Optionally read XML from standard input.
Diffstat (limited to 'lib/forlanlex.l') (more/less context) (ignore whitespace changes)
-rw-r--r--lib/forlanlex.l6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/forlanlex.l b/lib/forlanlex.l
index c5afdcd..d6fb335 100644
--- a/lib/forlanlex.l
+++ b/lib/forlanlex.l
@@ -59,7 +59,7 @@ static int yywrap(void);
%option nounput
WS [ \t\f][ \t\f]*
-IDC [a-zA-Z_0-9-]
+ID [a-zA-Z_][a-zA-Z_0-9-]*
%x COMMENT ML STR
%%
/* Comments */
@@ -70,7 +70,7 @@ IDC [a-zA-Z_0-9-]
<COMMENT>"*"+"/" BEGIN(INITIAL);
"//".* ;
/* Decimal numbers */
-[0-9][0-9]* { grecs_line_begin();
+-?[0-9][0-9]* { grecs_line_begin();
grecs_line_add(yytext, yyleng);
yylval.string = grecs_line_finish();
return STRING; }
@@ -88,7 +88,7 @@ continue return CONTINUE;
"||" return OR;
"==" return EQ;
"!=" return NE;
-{IDC}{IDC}* { grecs_line_begin();
+{ID} { grecs_line_begin();
grecs_line_add(yytext, yyleng);
yylval.string = grecs_line_finish();
return IDENT; }

Return to:

Send suggestions and report system problems to the System administrator.