Tiger compiler, lexical analysis: looking for reviews and comments

Bart Vandewoestyne <bart.vandewoestyne@gmail.com>
Tue, 25 Sep 2012 05:40:18 -0700 (PDT)

          From comp.compilers

Related articles
Tiger compiler, lexical analysis: looking for reviews and comments bart.vandewoestyne@gmail.com (Bart Vandewoestyne) (2012-09-25)
| List of all articles for this month |

From: Bart Vandewoestyne <bart.vandewoestyne@gmail.com>
Newsgroups: comp.compilers
Date: Tue, 25 Sep 2012 05:40:18 -0700 (PDT)
Organization: Compilers Central
Keywords: question, lex
Posted-Date: 26 Sep 2012 11:18:19 EDT

Hello all,

As a hobby and fun project, and partly also to improve my C
programming skills, I have started working my way through Appel's
'Modern Compiler Implementation in C'.

I have just finished chapter 2 on lexical analysis and I think I have
a lexer which is quite ok. However, before I move on to chapter 2, i
want to make sure my lexer is *more than* OK. So if you're
interested, then I would like to ask you:

1) Please review my tiger.lex file from both the style point of view
(indentation, comments, clean coding?) and from the correctness point
of view.

2) Please stress-test my lexer and find bugs. If you find a bug, then
please provide me a .tig file that illustrates what goes wrong and I
will try to fix it myself.

3) If you have a GitHub account, feel free to follow me and send me
pull requests with improvements. If you don't have a GitHub account,
create one, because social coding rockzzz! ;-)

Any other suggestions or comments are also always welcome! My code
can be found on GitHub in the chap02 directory at


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.