You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all. I'm a newbie to YACC parsing, so apologies if this is trivial.
I'm using the debugfile and need a little help understanding the structure of each state printout.
Here's an example from my file:
state 4
(3) phrase -> quant .
$end reduce using rule 3 (phrase -> quant .)
CONJ reduce using rule 3 (phrase -> quant .)
CARD reduce using rule 3 (phrase -> quant .)
ART reduce using rule 3 (phrase -> quant .)
What I'm confused by:
In this particular state the terminals CONJ, CARD, and ART are not mentioned in the first line, but they are mentioned in the actions. Why is this? My impression was that the actions refer back to the position within the parse.
The text was updated successfully, but these errors were encountered:
After doing my homework, I believe I now have a good understanding of what's going on. After the position marker quant ., we may encounter any of the 4 input tokens next (given the grammar), i.e. end of string, CONJ, CARD, or ART. So it doesn't matter that they aren't listed.
I'm not yet clear why the printout sometimes does and doesn't include the next input token in the position string. Maybe this is just for brevity in some cases?
If anyone else is also trying to grasp the parser output, I've found the YACC documentation very instructive (see section 4 of http://dinosaur.compilertools.net/yacc/)
Hi all. I'm a newbie to YACC parsing, so apologies if this is trivial.
I'm using the debugfile and need a little help understanding the structure of each state printout.
Here's an example from my file:
What I'm confused by:
In this particular state the terminals
CONJ
,CARD
, andART
are not mentioned in the first line, but they are mentioned in the actions. Why is this? My impression was that the actions refer back to the position within the parse.The text was updated successfully, but these errors were encountered: