|Please comment on my first parser email@example.com (Bart Vandewoestyne) (2012-10-10)|
|Re: Please comment on my first parser firstname.lastname@example.org (Jim Patchell) (2012-10-13)|
|From:||Bart Vandewoestyne <email@example.com>|
|Date:||Wed, 10 Oct 2012 06:28:33 -0700 (PDT)|
|Posted-Date:||10 Oct 2012 16:05:06 EDT|
Just as a hobby project, I am working my way through Appel's 'Modern Compiler
Implementation in C'. I have now finished Chapter 3 and it looks like my
parser for the Tiger language can parse all test examples from the book.
Nevertheless, I want to learn from this experience and improve my skills. It
would therefore be nice to get some more feedback from experts.
Comments/suggestions on my grammar rules, C-style, code-layout (indentation
etc),... are highly appreciated. Also, test-programs that reveal bugs in my
parser are welcome.
One thing I am not completely sure of is whether i solved the shift-reduce
problems correctly by adding some nonassoc lines for the DO, OF, THEN and ELSE
tokens... please let me know if this is the correct way to do it or not.
My grammar file and all other code for Chapter 3 can be found at:
Return to the
Search the comp.compilers archives again.