Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Let's consider the messages from the first shift/reduce conflict. You can read the period (".") as a pointer. What the message says, more or less in English, is</p> <p>"When I'm in state 299, and I have recognized a <code>type_identifier</code>, I must decide whether to reduce by rule 7 (recognize <code>c_complex_object_id : type_identifier</code>) or to shift to state 63 (continue scanning for a <code>V_LOCAL_TERM_CODE_REF</code>)."</p> <p>Usually a conflict like this comes about when the production not yet recognized (<code>V_LOCAL_TERM_CODE_REF</code>) is optional.</p> <p>Your definition of the tokens V_LOCAL_TERM_CODE_REF, etc. looks OK as far as I can tell from your comment.</p> <p><strike>It's hard to diagnose this further without seeing the yacc diagnostic output for state 63. Could you edit your question to show the output for state 63? It might tell us something.</strike></p> <p>I found some <a href="http://www.cs.man.ac.uk/~pjj/cs212/ho/node7.html" rel="nofollow">lecture notes by Pete Jinks</a> that might be useful background for you. You might also read some of the other questions listed in the right column of this page, under the "Related" heading.</p> <p><strong>Update</strong></p> <p>In one way, you are correct: a shift/reduce conflict can be ignored. bison/yacc will produce a parser that runs, that does <em>something</em>. But it is important to understand <em>why</em> you are ignoring a specific conflict. Then you will understand why the parser, when presented with an input program, parses it the way it does and produces the output that it does. It is not good to say, "oh, this is too complex, I can't figure it out."</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload