Hi,
I have done little more study on
this problem. From what I understood since the ambiguity is in the prdn -
" DefinedSyntaxTokenList ->
DefinedSyntaxTokenList DefinedSyntaxToken", when %merge is given for it,
the parse goes into an infinite loop (not sure y, I have not yet understood the
glr parser code). But the ambiguity is definitely here. Pls advise as to how to
tackle this ambiguity. Bye.
Regds
Ram
----- Original Message -----
Sent: Tuesday, February 18, 2003 5:36
PM
Subject: Ambiguous Parse
Hi,
I am working on on a
parser using GLR parsing mechanism (bison). I am not sure how to resolve
the following ambiguous parses. I gave to merge the ambiguity somewhere. If I
true to merge the 2 production of DefinedSyntaxTokenList the parser just
hangs. Kindly advise as to where the merging should be done.
DefinedSyntaxTokenList :
DefinedSyntaxToken | DefinedSyntaxTokenList
DefinedSyntaxToken
;
and the ambiguity is as
shown -
Ambiguity detected. Option
1, DefinedSyntaxTokenList -> <Rule 360, tokens 49 ..
66> DefinedSyntaxTokenList -> <Rule 360, tokens
49 .. 63> DefinedSyntaxTokenList
<tokens 49 .. 62> DefinedSyntaxToken
-> <Rule 362, tokens 63 ..
63> Setting -> <Rule
343, tokens 63 ..
63> Type ->
<Rule 70, tokens 63 ..
63>
ReferencedType -> <Rule 256, tokens 63 ..
63>
DefinedTypeOrObjectSet -> <Rule 262, tokens 63 ..
63>
UC_IDENTIFIER <tokens 63 .. 63> DefinedSyntaxToken
-> <Rule 362, tokens 64 .. 66>
Setting -> <Rule 345, tokens 64 ..
66> Object -> <Rule
334, tokens 64 ..
66> ObjectDefn
-> <Rule 338, tokens 64 ..
66>
DefinedSyntax -> <Rule 358, tokens 64 ..
66>
'{' <tokens 64 ..
64>
DefinedSyntaxTokenList -> <Rule 359, tokens 65 ..
65>
DefinedSyntaxToken -> <Rule 362, tokens 65 ..
65>
Setting -> <Rule 345, tokens 65 ..
65>
Object -> <Rule 335, tokens 65 ..
65>
DefinedValueOrObject -> <Rule 54, tokens 65 ..
65>
SimpleDefinedValueOrObject -> <Rule 59, tokens 65 ..
65>
LC_IDENTIFIER <tokens 65 ..
65>
'}' <tokens 66 .. 66>
Option 2,
DefinedSyntaxTokenList -> <Rule 360, tokens 49 ..
66> DefinedSyntaxTokenList <tokens 49 ..
62> DefinedSyntaxToken -> <Rule 362, tokens 63
.. 66> Setting -> <Rule 343, tokens
63 .. 66> Type -> <Rule
70, tokens 63 ..
66>
ReferencedType -> <Rule 256, tokens 63 ..
66>
DefinedTypeOrObjectSet -> <Rule 263, tokens 63 ..
66>
ParameterizedTypeOrObjectSet -> <Rule 265, tokens 63 ..
66>
DefinedTypeOrObjectSet -> <Rule 262, tokens 63 ..
63>
UC_IDENTIFIER <tokens 63 ..
63>
ActualParameterList -> <Rule 60, tokens 64 ..
66>
'{' <tokens 64 ..
64>
ActualParameterListPlus -> <Rule 61, tokens 65 ..
65>
ActualParameter -> <Rule 64, tokens 65 ..
65>
Value -> <Rule 131, tokens 65 ..
65>
ReferencedValue -> <Rule 159, tokens 65 ..
65>
DefinedValueOrObject -> <Rule 54, tokens 65 ..
65>
SimpleDefinedValueOrObject -> <Rule 59, tokens 65 ..
65>
LC_IDENTIFIER <tokens 65 ..
65>
'}' <tokens 66 .. 66>
Thankin in advance.
Regds Ram --------------------- Information contained and
transmitted by this E-MAIL is proprietary to Synergy Infotech Private
Limited and is intended for use only by the individual or entity to which
it is addressed, and may contain information that is privileged,
confidential or exempt from disclosure under applicable law. If this is a
forwarded message, the content of this E-MAIL may not have been sent with
the authority of the Company. If you are not the intended recipient, an
agent of the intended recipient or a person responsible
for delivering the information to the named recipient, you are
notified that any use, distribution, transmission, printing, copying or
dissemination of this information in any way or in any manner is strictly
prohibited. We have taken precautions to minimize the risk of transmitting
software viruses, but we advise you to carry out your own virus checks on
any attachment to this message. We cannot accept liability for any loss or
damage caused by software viruses. If you have received this communication
in error, please delete this mail & notify us immediately at mailto:address@hidden
|