next up previous
Next: What is a LL(1) Up: Machines and their languages Previous: Context free grammars and

How to implement a parser

A parser is a program which processes input defined by a context free grammar. The translation given in the previous section is not very useful in the design of such a program because of the non-determinism. Here I show how for a certain class of grammars this non-determinism can be eliminated and using the example of arithmetical expressions I will show how a JAVA-program can be constructed which parses and evaluates expressions.



Subsections

Thorsten Altenkirch 2001-05-08