Closed krame505 closed 5 years ago
It also appears that this issue persists even removing the <Operator>
field.
This grammar produces an LR DFA with a state that has a goto transition to itself -- something Copper has apparently never encountered before.
You should be able to set the associativity of a terminal-less production the same way as you set the precedence.
Interesting, thanks for taking a look.
Associativity and precedence are both specified on a production using <Operator>
, right? Then why does the above grammar still yield a shift-reduce conflict when using the new version of Copper?
Because the shift-reduce conflict is on Identifier_t
(the only used terminal in the grammar), and Identifier_t
has no assigned precedence.
Ah, nevermind then. Thanks.
But should Copper ever fail to terminate when compiling a grammar? Even if the grammar has problems Copper should not hang.
On Mon, Apr 15, 2019 at 10:32 PM Lucas Kramer notifications@github.com wrote:
Ah, nevermind then. Thanks.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/melt-umn/copper/issues/42#issuecomment-483498010, or mute the thread https://github.com/notifications/unsubscribe-auth/ADOhd7MbdO0DBiJGI6TT8fz6ElTdkHvXks5vhURmgaJpZM4cxHrN .
The non-terminating behavior was a bug (fixed in commit ddfe1dd) unrelated to the precedence issue.
OK, thanks. I was reading this in its email form and that didn't include the mention about the commit. But I see it only when I go to the web interface for this. Thanks.
See title, Copper didn't terminate when trying to compile the attached .copper file Parser_edu_umn_cs_melt_metaocaml_driver_parse.copper.txt (renamed so github lets me upload it). This corresponds to the Silver grammar
Also, as a side question, does Copper support setting the associativity of a production lacking terminals using the
<Operator>
field? It seems like it should but the behavior I am seeing seems to indicate not.