Re: Identifying rule responsible for lookahead

2005-03-11 Thread Hans Aberg
At 01:10 -0500 2005/03/11, Alfonso Urdaneta wrote: >> No, there is no such Bison design doc's: Only reading the Bison source code >> itself. (Apart from that somebody wrote something in Spanish, I think.) > >link ? It was a Spanish fellow "CJ" <[EMAIL PROTECTED]>, writing a thesis on his tutor's D

Re: Identifying rule responsible for lookahead

2005-03-10 Thread Alfonso Urdaneta
No, there is no such Bison design doc's: Only reading the Bison source code itself. (Apart from that somebody wrote something in Spanish, I think.) link ? -- alfonso e. urdaneta www.red82.com - are you ready ? ___ Help-bison@gnu.org http://lists.gnu.org/m

Re: Identifying rule responsible for lookahead

2005-03-02 Thread Soumitra Kumar
For the grammar: %token YYID YYDOT %% identifier : hier_id ; hier_id : simple_id | hier_id opt_select YYDOT simple_id ; opt_select : | opt_select '[' expr ']' ; simple_id : YYID ; expr : hier_id | function_call ; function_call : expr YYDOT Y

Re: Identifying rule responsible for lookahead

2005-03-02 Thread Henrik Sorensen
On Wednesday 02 March 2005 19.50, Hans Aberg wrote: > Please keep the cc to help-bison so that others may help. could you restate your problem ? ___ Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Re: Identifying rule responsible for lookahead

2005-03-02 Thread Hans Aberg
Please keep the cc to help-bison so that others may help. On 2005/03/02 00:38, Soumitra Kumar at [EMAIL PROTECTED] wrote: > Thanks for your comment. > I thought there may be a way to get this information > from --trace option, that's why I posted on help-bison > list. The question is how. > I h

Re: Identifying rule responsible for lookahead

2005-03-01 Thread Hans Aberg
At 12:46 -0800 2005/02/28, Soumitra Kumar wrote: >Following is a sample grammar. There is one r/r >conflict. > >% cat test.y >%token YYID YYDOT >%% >identifier : hier_id >; >hier_id : simple_id >| hier_id opt_select YYDOT simple_id >; >opt_select : >| opt_select '['

Re: Identifying rule responsible for lookahead

2005-03-01 Thread Henrik Sorensen
On Tuesday 01 March 2005 19.02, Soumitra Kumar wrote: > Henrik, > So, if I get the following output (rule no after a > lookahead symbol), finding the ambiguous rules is > trivial. well, in the output file you can search for all the states that have a goto your state 10. _

Re: Identifying rule responsible for lookahead

2005-03-01 Thread Soumitra Kumar
Henrik, I understand that grammar is ambiguous. In case of big grammars, it gets difficult to find out the rules causing the conflicts. While creating the lookahead set, if bison can annotate the rules too, it would be helpful. So, if I get the following output (rule no after a lookahead symbol)

Re: Identifying rule responsible for lookahead

2005-02-28 Thread Henrik Sorensen
Your grammar is ambigious. It can be seen if you make the following transformation, factoring out the null transition of opt_select, and you will see the shift/reduce conflict: %token YYID YYDOT %% identifier : hier_id; hier_id : simple_id | hier_id YYDOT simple_id | hier_id opt_select YYDOT simp

Identifying rule responsible for lookahead

2005-02-28 Thread Soumitra Kumar
Following is a sample grammar. There is one r/r conflict. % cat test.y %token YYID YYDOT %% identifier : hier_id ; hier_id : simple_id | hier_id opt_select YYDOT simple_id ; opt_select : | opt_select '[' expr ']' ; simple_id : YYID ; expr : hier_id