TITLE ^

pgc.pir - The parser grammar compiler

SYNOPSIS ^

    > ./parrot compilers/pge/pgc.pir [OPTIONS] FILE [...]

DESCRIPTION ^

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.

Options ^

--output=OUTFILE

Send the output to OUTFILE. By default, output is directed to the standard output.

--encoding=ENCODING

Encoding to use when reading input files. Defaults to 'ascii', but can also be set to 'iso-8859-1' or 'utf8'.

Functions ^

main()

We just load the P6Grammar module, and then pass control to it's 'main' routine. Processes command line arguments, reads input files, dispatches to appropriate PIR-generating subroutines, and then sends the output to the correct output file.


parrot