From c9b6670608577521c883db4bccd75b871568b7f7 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 15 Jan 1999 18:04:28 +0000 Subject: Original `expr' is back, filter expressions renamed to `term'. In the future, we'll allow any filter term in place of `expr' and we'll just evaluate it immediately, but not now as we have no evaluation routines. --- filter/config.Y | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'filter') diff --git a/filter/config.Y b/filter/config.Y index 265463d3..17f687a2 100644 --- a/filter/config.Y +++ b/filter/config.Y @@ -21,7 +21,7 @@ CF_DECLS CF_KEYWORDS(FUNCTION, FILTER, PRINTDEBUG, INT, PRINT) -%type expr +%type term CF_GRAMMAR @@ -38,7 +38,7 @@ program: /* EMPTY */ CF_ADDTO(conf, function) function: - FUNCTION SYM '(' ')' '{' expr '}' { + FUNCTION SYM '(' ')' '{' term '}' { extern struct f_instruction *last_func; if ($2->class != SYM_VOID) cf_error("Symbol already defined" ); $2->class = SYM_FUNCTION; @@ -50,7 +50,7 @@ function: CF_ADDTO(conf, filter) filter: - FILTER SYM '{' expr '}' { + FILTER SYM '{' term '}' { if ($2->class != SYM_VOID) cf_error("Symbol already defined" ); $2->class = SYM_FILTER; $2->aux = $4; @@ -60,8 +60,8 @@ filter: /* Programs */ -expr: /* EMPTY */ { $$ = NULL; } - | expr ';' expr { +term: /* EMPTY */ { $$ = NULL; } + | term ';' term { $$ = cfg_alloc(sizeof(struct f_instruction)); printf( "We've got statement here\n" ); $$->code = ','; @@ -74,7 +74,7 @@ expr: /* EMPTY */ { $$ = NULL; } printf( "New variable\n" ); $$ = NULL; } - | SYM '=' cexpr { + | SYM '=' expr { $$ = cfg_alloc(sizeof(struct f_instruction)); printf( "Ook, we'll set value\n" ); if ($1->class != SYM_VARIABLE_INT) -- cgit v1.2.3