How do I create a LAR parser for state machines?

I want to play with building LR parser generators. Does anyone know of a good (free) resource describing how to create a machine state table from a grammar?

+1


source to share


4 answers


For a free resource, consider the Python source code for PLY - the complete implementation of Lex and Yacc in Python.



I would recommend the book, but you can hardly do better than getting The Dragon Book .

+2


source


The best resource I've come across is:



Analysis Methods - A Practical Guide

+1


source


The obvious answer is the standard Aho / Ullman / Ravi compiler text, Compiled by: Principles, Methods and Tools

It has full parse chapters. It's not free, but it's worth every penny, and if you're going to build parsers or other compiler-like tools, you're crazy if you don't have this book.

+1


source


Maybe you will find Grammatica useful. This is a free Parser generator for .NET. I have some experience with him and it was good. You can try and examine its code. http://grammatica.percederberg.net/

-1


source







All Articles