|
|
| Author |
Message |
|
| Guest |
Posted: Thu Mar 04, 2010 11:38 am |
|
|
|
Guest
|
The parser produced by this grammar:
Nonterminals boolean command.
Terminals '(' ')' if then else true and or skip while do.
Rootsymbol command.
Left 100 or.
Left 200 and.
boolean -> '(' boolean ')'.
boolean -> 'true'.
boolean -> boolean 'and' boolean.
boolean -> boolean 'or' boolean.
command -> 'skip'.
command -> 'if' boolean 'then' command 'else' command.
command -> 'while' boolean 'do' command.
crashes when encountering an 'or', but works fine with 'and'. Here is
an example:
3> bug2:parse([{'if',1}, {'true',1}, {'or',1}, {'true',1}, {'then',1},
{'skip',1}, {'else',1}, {'skip',1}]).
** exception error: {yecc_bug,"1.3",{missing_state_in_action_table,11}}
in function bug2:yeccpars2/7
in call from bug2:yeccpars0/5
This is as simple as I've managed to get the failing grammar. Removing
the parentheses, 'and' or 'while' constructs from the grammar fixes
the crash.
________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org
Post received from mailinglist |
|
|
| Back to top |
|
| Hans Bolinder |
Posted: Thu Mar 04, 2010 2:33 pm |
|
|
|
User
Joined: 05 Nov 2008
Posts: 24
Location: Stockholm
|
[Manolis Papadakis:]
> The parser produced by this grammar:
>
> Nonterminals boolean command.
> Terminals '(' ')' if then else true and or skip while do.
> Rootsymbol command.
> Left 100 or.
> Left 200 and.
> boolean -> '(' boolean ')'.
> boolean -> 'true'.
> boolean -> boolean 'and' boolean.
> boolean -> boolean 'or' boolean.
> command -> 'skip'.
> command -> 'if' boolean 'then' command 'else' command.
> command -> 'while' boolean 'do' command.
>
> crashes when encountering an 'or', but works fine with 'and'. Here is
> an example:
Thanks! The bug will be fixed in R14A.
Best regards,
Hans Bolinder, Erlang/OTP team, Ericsson
________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org
Post received from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|