Hi. Also, here is a simplified version of my bison file. You can just copy
and paste it in a file and compile it with:
bison -y -v -d file_name.y
%token NOT IN UNION ICONST SELECT FROM SCONST
%left UNION
%left '+' '-'
%left '*' '/'
%%
search_cond: NOT IN '(' exp_list ')'
| NOT IN '(' query_list ')'
;
exp_list: exp_list ',' expression
| expression
;
query_list: query_list UNION query_list
| '(' query_list ')'
| query_specification
;
expression: ICONST
| expression '+' expression
| expression '-' expression
| expression '/' expression
| expression '*' expression
| '(' expression ')'
| '(' query_specification ')'
;
query_specification: SELECT '*' FROM table
;
table: SCONST
;
%%
--
View this message in context:
http://www.nabble.com/SQL-grammar-tp17127516p17127524.html
Sent from the Gnu - Bison - Help mailing list archive at Nabble.com.
_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison