Posts

Showing posts with the label LLVM IR
Finding Libc So,  as you know, I've been tooling around with the LLVM IR syntax and the Gold Parser framework. I have the scaffolding for the CIL conversion 90% done, and I am almost ready to parse the "Hello world" code found in the LLVM documentation. There is just one catch. In the Hello world, there is a call to an external standard io library function called puts() . Those fimilar with C/C++ would know that you include the standard header, #include <stdio> or #include <stdio.h> and you magically gain access to this function. Porting that specific line into CIL would be easy, i'd just replace any puts call with a WriteLine call included in the standard System Library. This is fine to get the sample code running, but it is not a solution going forward. I need to get a list of basic libc commands and rewrite them to work with the System library in the CLI. DotGnu Project Resurrected? Years ago (around 2003-2004), the GNU community was really int...

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 ...