|
From: | Ramaswamy |
Subject: | Ambiguous Parse |
Date: | Tue, 18 Feb 2003 17:36:23 +0530 |
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 |
[Prev in Thread] | Current Thread | [Next in Thread] |