Hello Anil,
the point is you can not resolve this problem. Stephan mentioned already
before that you have to modify your grammar in order to be able to write
a parser. This is an example of the issues.
The question whether an identifier is a variable identifier or a
parameter identifier can not be decided with a context free grammar. In
fact you need a context in order to be able to answer this questions.
Best regards,
Theo
AnilKrishna schrieb:
> Hello ,
> I am getting Reduce -Reduce Conflict for the following grammar.
> How can I resolve it?
>
>
Production
> Rules
> VariableRef ::= (VarIdentifier | ValueParIdentifier)
> [ExtendedFieldReference]
>
> VarIdentifier ::= Identifier
> ValueParIdentifier ::= Identifier
>
> ExtendedFieldReference:=...........
>
>
> As 'Identifier' is giving two production we will get this conflict. What
> is the way to resolve it?
> I am using Yacc for the parsing.
>
> regards,
> Anil Krishna
--
Theofanis Vassiliou-Gioles Testing Technologies IST
Oranienburger Str. 65 The TTCN-3 Company
10117 Berlin, Germany phone +49 30 726 19 19 0
This email address is being protected from spambots. You need JavaScript enabled to view it. DDI +49 30 726 19 19 12
www.testingtech.de fax +49 30 726 19 19 20