Assignments and function output have same sintax [message #985883] |
Fri, 16 November 2012 14:51 |
|
I've got a situation that can be summarized with this little code:
Instruction:
EmptyInstruction | Assignment;
EmptyInstruction: ';';
Assignment:
variable=[Variable]':='expression=Expression';' ;
Function:
'FUNCTION' name=ID
instructions+=Instruction*
output=[Function]':='expression=Expression';' ;
I know where is the problem, but how can I resolve the non-LL decision?
Very thank you for help.
[Updated on: Fri, 16 November 2012 14:52] Report message to a moderator
|
|
|
|
|
|
|
|
Re: Assignments and function output have same sintax [message #986358 is a reply to message #986325] |
Tue, 20 November 2012 08:47 |
|
Boris Brodski wrote on Tue, 20 November 2012 01:36 is strongly discouraged. It suspends all those warnings, so you have no idea, something else is broken too.
Besides that, you have no control, which way the parse will take ignoring the warning. Consider using syntactic predicated '=>' instead.
Very thank you for suggest, I was able to disable the backtrack. For the moment it works fine.
Now I'm going to finish the grammar,
thanks!
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05247 seconds