5 ms·
In the meantime, if you (or anybody) can point me to modern compiler techniques I'd appreciate it a lot. Been devouring all I can find online but nothing satisf
by Kilimanjaro 15y ago
In the meantime, if you (or anybody) can point me to modern compiler techniques I'd appreciate it a lot. Been devouring all I can find online but nothing satisfies me.
- andrewflnr 15y agoWhat have you been reading that hasn't satisfied you? What are you looking for? The basics of parsing haven't changed much. . I'm still learning, too, so I don't know how much I can help. As I've stated elsewhere on the thread, I prefer the idea of giving another language the ease of use of PHP. It is likely to be less work, especially in the case of Lua (super easy to embed in C). And the compiler is already built for you. :)
- Kilimanjaro 15y agoI've been reading mostly about lexers and parsers (antlr, yacc, bison, etc) that produce C code and would like to try different approaches like SML but haven't found any literature. Read also about LLVM but C++ is not my type. Haskell and GHC are cool but again C shows its ugly head. So, I'd like to know if C is the only way or if there are new papers that I don't know of for implementing modern compilers before committing to C. I am just starting so there is a lot to read about different contexts and ideas. (PS: Java is not an option)
- andrewflnr 15y agoPersonally, I've been using Python for prototyping. It has lots of lexing libraries, and from there I just do recursive descent. I figure I'll switch to C for a "real" implementation, partly because what I'm going for in my current project is as much database as programming language. I don't think you have to use C++ to target LLVM. I think you can output LLVM IR from anything and then just call LLVM from the shell to get an executable.
- deleted 15y ago[deleted]
- spacemanaki 15y agoAre you looking for an alternative to emitting C or to using C as the implementation language of the compiler? I'm not totally sure what you're after, and I'm a compiler noob, but I've been enjoying Appel's Modern Compiler Implementation in ML, which uses SML as the implementation language and emits RISC machine code or assembly (I think, I haven't actually gotten that far). I don't know how suitable it would be as a stepping stone to forking PHP, but it's something.
- Kilimanjaro 15y ago'Modern Compiler Implementation in ML' any online resource you can share?
- spacemanaki 15y agoIt's a book: http://www.cs.princeton.edu/~appel/modern/ml/ http://www.cs.princeton.edu/~appel/modern/ml/