Parrot and Perl 6 Parrot and Perl 6 - Environments for Dynamic Languages #24

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