Parrot/PGE, parsers Parsers, Perl 6 Rules, and the Parrot Grammar Engine #2

Introduction

Suppose we're creating a small programming language.

The language has statements like the following:

variable = expression ;
input variable ;
print expression ;
if expression then something_1 [ else something_2 ]

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

Copyright © 2006 Patrick Michaud