Separate parser code from generated data
Use normal properties instead of static ones
Make names in the parser more descriptive

And improve the code a tad bit in general.

I left YY2TBLSTATES and YYNLSTATES around, because I don't fully
understand their role in the action double indexing.
Make sure that pretty printer preserves whitespace after <?php