* Parser numbers again.
* Include missing files in distributions.
This commit is contained in:
parent
c625718513
commit
619f20775d
|
@ -2,7 +2,7 @@ noinst_LIBRARIES = libexpr.a
|
|||
|
||||
libexpr_a_SOURCES = nixexpr.cc nixexpr.hh parser.cc parser.hh \
|
||||
eval.cc eval.hh primops.cc primops.hh \
|
||||
lexer-tab.c lexer-tab.h parser-tab.c parser-tab.h
|
||||
lexer.l lexer-tab.c lexer-tab.h parser.y parser-tab.c parser-tab.h
|
||||
|
||||
AM_CXXFLAGS = \
|
||||
-I.. -I../../externals/inst/include -I../libutil -I../libstore
|
||||
|
|
|
@ -58,7 +58,10 @@ rec { return REC; }
|
|||
\-\> { return IMPL; }
|
||||
|
||||
{ID} { yylval->t = ATmake("<str>", yytext); return ID; /* !!! alloc */ }
|
||||
{INT} { return INT; }
|
||||
{INT} { int n = atoi(yytext); /* !!! overflow */
|
||||
yylval->t = ATmake("<int>", n);
|
||||
return INT;
|
||||
}
|
||||
{STR} { int len = strlen(yytext);
|
||||
yytext[len - 1] = 0;
|
||||
yylval->t = ATmake("<str>", yytext + 1);
|
||||
|
|
|
@ -85,6 +85,7 @@ expr_select
|
|||
|
||||
expr_simple
|
||||
: ID { $$ = ATmake("Var(<term>)", $1); }
|
||||
| INT { $$ = ATmake("Int(<term>)", $1); }
|
||||
| STR { $$ = ATmake("Str(<term>)", $1); }
|
||||
| PATH { $$ = ATmake("Path(<term>)", absParsedPath(data, $1)); }
|
||||
| URI { $$ = ATmake("Uri(<term>)", $1); }
|
||||
|
|
Loading…
Reference in a new issue