book page 56 meme

Oct 09, 2008 09:06

* Grab the nearest book.
* Open the book to page 56.
* Find the fifth sentence.
* Post the text of the next seven sentences in your journal along with these instructions.
* Don't dig for your favorite book, the cool book, or the intellectual one: pick the CLOSEST.

The second rule of the grammar is S -> id := E, so the top three tokens are popped from the stack and S is pushed.
The action for "+" in state 11 is to shift; so if the token had been + instead, it would have been eaten from the input and pushed onto the stack.
Rather than rescan the stack for each token, the parser can remember instead the state reached for each stack element. Then the parsing algorithm is:
blah blah blah, I'm too lazy to continue

Appel, Andrew W. modern compiler implementation in ML Cambridge University Press, Cambridge, UK 1998

I really wish this book was more relevant to my work.
Previous post Next post
Up