parrotcode: A basic calculator. | |
Contents | Language Implementations | abc |
abc.pir - A basic calculator.
This is the base file for the basic calculator.
This file includes the parsing and grammar rules from the src/ directory, loads the relevant PGE libraries, and registers the compiler under the name 'ABC'.
__onload()
compile(STR code [, 'target' =
target])>code
.
The target
named parameter allows the caller to specify the degree of compilation to be performed; a value of parse
returns the parse tree,
PAST
returns the abstract syntax tree,
PIR
returns the generated PIR code,
and other values return the compiled code as a PMC.
|