This section describes the compiler’s programming interface.
Most of the time, its command-line interface is all is needed; it is
section is intended for users who need more flexibility than is provided
The compiler consists of a lexer, a parser and two compiler
back-ends. The lexer separates input data into valid XDR/RPC language
tokens; the parser then validates the input syntax and produces an
abstract syntax tree of the input. Finally, the back-ends are
responsible for actually “compiling” the input into something usable
by the programmer. The back-end used by the
command is the code generation back-end. In addition, an
experimental run-time compiler back-end is available, making it
possible to compile dynamically definitions in the XDR/RPC language
at run-time; this technology paves the way for a wide range of
crazy distributed applications, the programmer’s imagination being the
only real limitation3.
|• Parser:||Parser API|
|• Code Generation Compiler Back-End:||Code generation API|
|• Run-Time Compiler Back-End:||The incredible run-time compiler|
Finding useful applications leveraging the flexibility offered by the run-time compiler back-end is left as an exercise to the reader.