diff --git a/lib/asn1/lex.l b/lib/asn1/lex.l index 8b9ece52f..cb9dd4d42 100644 --- a/lib/asn1/lex.l +++ b/lib/asn1/lex.l @@ -7,15 +7,19 @@ #include #include #include +#include #include "symbol.h" #include "parse.h" +#ifndef HAVE_STRDUP char *strdup(char *); +#endif void error_message(char *, ...); static unsigned lineno = 1; static char filename[256]; +/* ","|"{"|"}"|"("|")"|"["|"]"|"|" { return *yytext; } */ %} @@ -33,7 +37,9 @@ OPTIONAL { return OPTIONAL; } BEGIN { return TBEGIN; } END { return END; } DEFINITIONS { return DEFINITIONS; } -,|\{|\}|\(|\)|\[|\]|\| { return *yytext; } +[,{}()|] { return *yytext; } +"[" { return *yytext; } +"]" { return *yytext; } ::= { return EEQUAL; } --[^\n]*\n { ; } -?[0-9]+ { yylval.constant = atoi(yytext); return CONSTANT; }