- or download this
# build_parser.pl
...
Parse::RecDescent->Precompile($grammar, 'Parser')
or die("Bad Grammar\n");
- or download this
# Deparse.pm
...
sub IDENT { return $_[0] };
1;
- or download this
# test.pl
...
hap -prompt
hap -b sknxharvest01 -prompt
hap -prompt -b sknxharvest01
- or download this
>perl build_parser.pl
...
Unparsed: hap -prompt -b sknxharvest01
Parsed: ["hap",[["-prompt",1],["-b","sknxharvest01"]]]
Deparsed: hap -prompt 1 -b sknxharvest01