Elkhound: A GLR Parser Generator
Friday, April 23rd, 2004Thanks to David Wagner for a pointer to Elkhound, which is a GLR (Generalized LR) parser generator. It can generate parsers in C++ and OCaml, and includes Elsa, a grammar for C++.
Thanks to David Wagner for a pointer to Elkhound, which is a GLR (Generalized LR) parser generator. It can generate parsers in C++ and OCaml, and includes Elsa, a grammar for C++.
CIL is a tool and library that inputs C source code and outputs simplified C that is more amenable to program analysis. It can generate CFGs and can perform several analyses and transformations out of the box. See here for more details; some notables follow:
FrontC is a C front-end written in OCaml. From the web page:
FrontC is an OCAML library providing a C parser and lexer. The result is a
syntactic tree easy to process with usual OCAML tree management.It provides support for ANSI C syntax, old-C K&R style syntax and the standard
GNU CC attributes.It provides also a C pretty printer as an example of use.
From Christian Lindig and the C–– group comes OCamlBurg, which is an implementation of a Burg-like code-generator-generator that produces OCaml code.
C–– is a “portable assembly language” — a target language for compiler backends that can compile into native code on several platforms. It is implemented in OCaml and appears sufficiently general to handle a wide range of language features: for example, all values are untyped strings of bits, multiple return values are possible, and tail call optimization is readily available. C–– also supports a run-time interface, so that one may use implementations of support code that are most suitable for a given language.
There are code generators for x86, PPC, IA-64, SPARC, MIPS, ARM, and Alpha. According to the web page, as of July 2003, the x86 backend is reasonably mature, whereas the rest are under development.
Thanks to Kent Hunter for the pointer.