Posts

Showing posts with the label AST

Quick Progress!

Parsing for fun and profit I remember creating parsers to be a bit harder. I tried using Antlr when doing the JavaFX DLR project and failed at it miserably. It felt messy. I couldnt get a feel for how to structure the document, etc. I was drawn to the Irony parser framework because declaring the grammar in C# somehow felt (at the time) cleaner and it seemed to allow for more expressive statements and character logic. I am not sure if it was my previous experience with parsing and Antlr (or Irony), or how clean and expressive the GOLD parser framework is, but I've been able to create a working parser in just a few days of coding. And by working, I mean it parses and understands valid LLVM IR straight from the project's documentation:  I actually implemented a a lot more operations and keywords needed to parse the example. It was just easier that way. I am going to now start building an AST. I've decided to be a bit aggressive because I think the AST will drive ...
So I've again been bitten by the Transcoding/transpiling bug...Doh! My history with Transcoding  A few years back (around mid-2007), I was enamored with a new language on the block, JavaFX (now vala). Alas, I had moved on from the Java platform to the .Net platform during that time, and Silverlight just hit the stage (and WPF). I was more of a fan of the declarative and expressive nature of JavaFX than I was of XAML, so I looked into porting JavaFX script to the .Net platform (and later the DLR). I halted my work in 2008-2009, as JavaFX script was dying, and the Parser technology I was using (a great C# based parser called Irony) was giving me issues when integrating with the DLR. The LLVM Project I've been a fan of the LLVM project since about 2009. I have also watched its MSIL backend go into disrepair and interest in C# as part of the vmkit wane. I answered some stack overflow questions in 2011 about this http://stackoverflow.com/questions/5054938/how-to-translate...