Why not use a generic preprocessor?
I tend to agree with acme. What's new, and distinguish Rufus from CPP, for instance?
TPC GC Chair
I don't really see the point of this project.
The idea of rufus language is to have a fast language with a static design and with some dynamic features.
There is a very good language "PIR", but for my knowlwdge of that language is designed for make easier programming for dynamic languages.
My design is to use registers as posible, then when more varibles are needed use arrays, and use hashes when they are the best option for a special purpose.
That means a fast static language with dynamic features.
The idea is to create stand alone programs and make some things with it like a rufus translator with the use of ncurses, a translator with its terminal.
It can be used to construct fast procedures, like a module that find words "m//".
It will have a full interconection with PIR, PASM and c and languages that require fast static modules.
I need to construct rufus in steps and the first step is a preprocessor(only find directives and replace code, whitout separated lexer and parser).
Then IÂ´m going to replace parts of the preprocessor by adding automatas for recognize labels, strings, arrays, integers, floats and so on.
Then I have to construct the parsers for PASM(is the first step), and then enhance them to manage mixed sentences like set I5,23 if I7,milevel, and then construct additional parsers for manage the more complex instructions like (I6=4), and have instructions like set I5,23 if (I6=4) or bsr label if (I6=4)
ItÂ´s intended that rufus language have integrated rufus preprocessor, one use could be a pretty printer, pretty printer have almost the same code as the code that find tokens in the "lexer" in the preprocessor, with preprocessor directives like if an else the pretty printer will have the code to format the output and code to bring statistics for printing line numbers and token positions and directives contents.