|Version 5 (modified by kjs, 7 years ago)|
PIRC is a fresh implementation of the PIR language. It was developed as a replacement for the current PIR compiler, IMCC. The lexer and parser are implemented with Flex and Bison specifications. During the parsing phase, a data structure is built that represents the parse. After the parse, this data structure is traversed and for each instruction the appropriate bytecode is emitted.
PIRC is not complete yet. All stages are implemented (lexer, parser, bytecode generator), but all of them need some additional work to complete them.
PIRC Development Tasks
- ticket #43: autoheaderize all PIRC sources.
Hardcore hacking tasks
- Fix parser to accept syntax such as:
$P0 = new ['Integer']
- Convert all C strings in PIRC into STRINGs. All identifiers and strings that are scanned should be stored as STRING objects, not C strings.
- Fix bug #198. It seems that when there is a sequence of more than one instruction dealing with STRINGs or NUMs, the resulting bytecode segfaults. Apparently, PIRC is emitting the wrong bytecode. Bug #186 is related to this issue.
- Fix bug #173. Lexicals are not stored correctly in the generated bytecode. The code for storing the lexicals is taken from IMCC, and therefore it doesn't come as a complete surprise it's not working. However, I don't see what's wrong.
- Fix bug #14. Braced arguments to macros are not handled correctly. Nested macro expansion isn't correctly handled yet.