Re: Bison conflict ?

Yunzhong <gaoyunzhong@gmail.com>
Fri, 9 May 2008 14:24:44 -0700 (PDT)

          From comp.compilers

Related articles
Bison conflict ? judicator3@gmail.com (2008-05-08)
Re: Bison conflict ? gaoyunzhong@gmail.com (Yunzhong) (2008-05-09)
| List of all articles for this month |
From: Yunzhong <gaoyunzhong@gmail.com>
Newsgroups: comp.compilers
Date: Fri, 9 May 2008 14:24:44 -0700 (PDT)
Organization: Compilers Central
References: 08-05-022
Keywords: parse,yacc, SQL
Posted-Date: 10 May 2008 21:46:09 EDT

Richard,
Consider changing these rules:
exp_list => expression;
expression => '(' query_specification ')';
query_list => '(' query_list ')';
query_list => query_specification;


Whether the query_spec in your statement #3 should reduce to exp_list
or query_list will depend on the particular SQL dialect you are
working with, especially the treatment of redundant parentheses. You
may also consider creating an extra nonterminal such as
exp_or_query_list.


Hope it helps.
Y.



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.