help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Identifying rule responsible for lookahead


From: Soumitra Kumar
Subject: Re: Identifying rule responsible for lookahead
Date: Tue, 1 Mar 2005 10:02:26 -0800 (PST)

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), finding the ambiguous rules is
trivial.

state 10

    3 hier_id: hier_id . opt_select YYDOT simple_id
    4 opt_select: .  [YYDOT (3), '[' (5)]
                            ^^^      ^^^
    5           | . opt_select '[' expr ']'
    7 expr: hier_id .  [YYDOT (9), ']' (5)]

    YYDOT     reduce using rule 4 (opt_select)
    YYDOT     [reduce using rule 7 (expr)]

I was wondering if there is a way to get this
information out of bison.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]