Welcome to the Lounge
The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
|So I was about to buy the 2nd edition of a book for which I have the first edition, but then the author tells me that epsilon rules in a CFG don't require special casing.
But he offers no example on how to generate an LR table using a grammar with epsilon transitions in it.
Meanwhile, I'm over here trying to generate the (S)LR table, and so I create the extended grammar.
so I take this:
S -> A
A -> B b
B -> B a
And then I mark it up with the itemSet ids, like so:
0/Sstart/-1 -> 0/S/1 1/#EOS/2
0/S/1 -> 0/A/3
0/A/3 -> 0/B/4 4/b/5
0/B/4 -> 0/B/4 4/a/6
But the bold lines, I need a symbol there but i don't have it. Should be like
0/B/4 -> number/#EPSILON/number
but if i add the artificial #EPSILON tag it breaks everything.
And if I leave it out I don't end up generating my reductions for the corresponding state in the LR table.
Again, the book I have says epsilons don't need any special handling.
But here I am. I got the first edition of this book for free. The second one, new costs over $200? (i think thats the publishers ask - not necessarily the cheapest price), used costs $80-$120.
I guess the author doesn't want me to buy it.
Real programmers use butterflies
modified 16-Feb-20 6:06am.
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.