diff options
author | Martin Mares <mj@ucw.cz> | 1998-11-27 22:32:45 +0100 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1998-11-27 22:32:45 +0100 |
commit | 0b62c3a7c7548cd447b4f18e0346cc9e74862ab3 (patch) | |
tree | b74b1a9ffa4f59b7d86765eac906c67827e83a12 /conf/cf-lex.l | |
parent | c74c0e3cdf008988a8873d3f76c0d71b29ab8673 (diff) | |
download | bird-0b62c3a7c7548cd447b4f18e0346cc9e74862ab3.tar bird-0b62c3a7c7548cd447b4f18e0346cc9e74862ab3.zip |
Trivial 15-line bison excercise: Implemented expressions including
user-defined numeric symbols. Whenever possible, use `expr' instead
of `NUM' to get full express ion power :-)
Diffstat (limited to 'conf/cf-lex.l')
-rw-r--r-- | conf/cf-lex.l | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/conf/cf-lex.l b/conf/cf-lex.l index f653bca..66f3038 100644 --- a/conf/cf-lex.l +++ b/conf/cf-lex.l @@ -101,7 +101,7 @@ WHITE [ \t] return SYM; } -[{}:;,] { +[={}:;,()+*/%-] { return yytext[0]; } @@ -177,6 +177,7 @@ cf_find_sym(byte *c, unsigned int h0) sym_hash[h] = s; s->class = SYM_VOID; s->def = NULL; + s->aux = 0; strcpy(s->name, c); return s; } |