Hello. Welcome back :)
For the record, current nqp-rx based ops compiler does parse subset of C already. In opsc_llvm branch it does parse even more. I would suggest to join efforts in defining "C subset" which we are going to use as m1 ops language. Most problematic parts iirc was: 1. Macros. C macros are pure evil. If we are going to support free-defined C macros it will require a lot of work. Limiting them to VTABLE macros will reduce this issue to trivial. 2. Ambiguous casting. 3. Implicit string concatenation. -- Bacek -- Vasily On Sat, May 19, 2012 at 6:15 AM, kjstol <[email protected]> wrote: > hi there, > > I've indulged in some hacking time, and implemented a simple subset of C. > Attached is a zip file, just type "make" and it should work (assuming > you have bison and flex). > > What it currently does, it generates the parsed code from the AST (mostly). > Not everything of the language is supported yet (e.g., parameters > etc.) The parser would have to be fixed a bit, it has some known > limitations. > > The idea next is to implement a simple code generator to generate the > M0 ops that have been spec'ed so far. > There are many todos (e.g, thread-safety of the compiler), > register-allocator, etc.) most of which would be easy to implement. > For now, the focus would be on a simple and clean language > implementation that generate M0. > > Comments welcome, > kjs > > _______________________________________________ > http://lists.parrot.org/mailman/listinfo/parrot-dev > _______________________________________________ http://lists.parrot.org/mailman/listinfo/parrot-dev
