From the command line:
> pegex help > pegex compile --to=yaml your-grammar.pgx > pegex compile --to=json your-grammar.pgx > pegex compile --to=perl your-grammar.pgx > pegex compile --to=perl6 your-grammar.pgx > pegex compile --to=python your-grammar.pgx
The pegex command line tool compiles a Pegex grammar into a particular format and prints it to STDOUT. This tool just provides a simple way to invoke Pegex::Compiler from the command line. See the Pegex documentation for more information.
pegex
To install Pegex::Cmd, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pegex::Cmd
CPAN shell
perl -MCPAN -e shell install Pegex::Cmd
For more information on module installation, please visit the detailed CPAN module installation guide.