Creating compilers in Parrot
Parrot is developing a robust suite of tools for language translators
- Parser Grammar Engine (PGE)
- Rules for matching and transforming sequences
- Perl 6 regular expression support
- Built-in operator precedence parser
- Performs lexical and syntactic analysis
- Tree Grammar Engine (TGE)
- Rules for matching and transforming trees
- Still exploring design
- Currently used for perl6, punie, pheme, APL, abc, Tcl
- Performs semantic analysis and code generation
- Parrot Abstract Syntax Tree (PAST)
- Standard AST representation for dynamic languages
- Handles AST-to-bytecode translation