| 87 | The data flow of PIRC is as follows. First, the [source:/trunk/compilers/pirc/src/hdocprep.l heredoc preprocessor] takes the PIR file and flattens all heredoc strings. The output is written to a temporary file, which is then parsed by the [source:/trunk/compilers/pirc/src/pir.l Flex based lexer] and the [source:/trunk/compilers/pirc/src/pir.y Bison based parser]. The parser create an Abstract Syntax Tree (AST); the AST nodes for that are defined in [source:/trunk/compilers/pirc/src/pircompunit.c]. If the parse was successful, control is passed on to the [source:/trunk/compilers/pirc/src/piremit.c] module, which traverses the AST. During the traversal, bytecode is generated through the [source:/trunk/compilers/pirc/src/bcgen.c] module. The output is written to a file named a.pbc; the name of the output file can be overridden with the {{{-o}}}[wi option. |