Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #762
| From | Bart Vandewoestyne <bart.vandewoestyne@gmail.com> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Please comment on my first parser |
| Date | 2012-10-10 06:28 -0700 |
| Organization | Compilers Central |
| Message-ID | <12-10-004@comp.compilers> (permalink) |
Hello all, 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: https://github.com/BartVandewoestyne/c/blob/master/books/Modern_Compiler_Impl ementation_in_C/chap03/tiger.grm https://github.com/BartVandewoestyne/c/tree/master/books/Modern_Compiler_Impl ementation_in_C/chap03 Thanks! Bart
Back to comp.compilers | Previous | Next — Next in thread | Find similar
Please comment on my first parser Bart Vandewoestyne <bart.vandewoestyne@gmail.com> - 2012-10-10 06:28 -0700 Re: Please comment on my first parser Jim Patchell <patchell@cox.net> - 2012-10-13 20:50 -0700
csiph-web