Example "compiler", part 2 of 2
# compiler object (HLL::Compiler is base class for compilers)
class ABC::Compiler is HLL::Compiler {
ABC::Compiler.language('abc');
ABC::Compiler.parsegrammar(ABC::Grammar);
ABC::Compiler.parseactions(ABC::Actions);
}
# invoke the compiler
my @ARGS := (pir::getinterp__p)[2]; # args from Parrot
ABC::Compiler.command_line(@ARGS);
Run the program:
$ ./nqp Abc.pm > 3+4 7 > 87-100 -13