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 simple_id
;
opt_select : '[' expr ']'
| opt_select '[' expr ']';
simple_id : YYID ;
expr : hier_id
| function_call;
function_call : expr YYDOT YYID
;


now you see the function_call is the same as the added hier_id YYDOT simple_id

hope this helps

Henrik


On Monday 28 February 2005 21.46, Soumitra Kumar wrote:
> %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 YYID
>         ;


_______________________________________________
Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to