Perl6Grammar - compiler for Perl 6 grammars
parrot Perl6Grammar.pir [options] file ...
.local string grammar_source .local pmc pgc pgc = compreg 'PGE::Perl6Grammar' # Compile grammar_source to PIR $P1 = pgc(grammar_source, 'target' => 'PIR') # Compile and install grammar_source $P1 = pgc(grammar_source)
This program takes a set of parser rules (i.e., a parser grammar) specified in the input
FILEs, and compiles it into the PIR code needed to execute the grammar. This PIR code is then suitable for inclusion or compilation into other larger programs.
Send the output to OUTFILE. By default, output is directed to the standard output.
Encoding to use when reading input files. Defaults to 'ascii', but can also be set to 'iso-8859-1' or 'utf8'.
Processes command line arguments, reads input files, dispatches to appropriate PIR-generating subroutines, and then sends the output to the correct output file.