Commit ef8b3b00 authored by Michael Meskes's avatar Michael Meskes

Fix ecpg parsing of sizeof().

The last fix used the wrong non-terminal to define valid types.
parent 559d5358
......@@ -1865,10 +1865,10 @@ Iresult: Iconst { $$ = $1; }
| Iresult '%' Iresult { $$ = cat_str(3, $1, mm_strdup("%"), $3); }
| ecpg_sconst { $$ = $1; }
| ColId { $$ = $1; }
| ColId '(' ColId ')' { if (pg_strcasecmp($1, "sizeof") != 0)
| ColId '(' var_type ')' { if (pg_strcasecmp($1, "sizeof") != 0)
mmerror(PARSE_ERROR, ET_ERROR, "operator not allowed in variable definition");
else
$$ = cat_str(4,$1, mm_strdup("("), $3, mm_strdup(")"));
$$ = cat_str(4, $1, mm_strdup("("), $3.type_str, mm_strdup(")"));
}
;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment