Python on Parrot Python on Parrot - under the hood #27

Building parsers in Parrot

Suppose we're creating a small programming language.

The language has statements like the following:

variable = expression
print expression
if expression then statement
if expression then statement else statement

How can we write a parser in Parrot to parse programs in this language?

Copyright © 2007 Patrick Michaud