Elsa (original) (raw)

Elsa: The Elkhound-based C/C++ Parser

Elsa is a C and C++ parser. It is based on the Elkhound parser generator. It lexes and parses input C/C++ code into an abstract syntax tree. It does some type checking, in the interest of elaborating the meaning of constructs, but it does not (yet?) reject all invalid programs.

To download Elkhound and Elsa, see theElkhound distribution page.

High-level documentation:

Low-level documentation:

Elsa requires the following external software:

Build instructions:

$ ./configure $ make $ make check

./configure understandsthese options. You can also look at the Makefile.

Parsing some sample (already preprocessed) input:

$ ./ccparse in/t0001.cc

The above command will parse and type check the given file. To make it print the annotated, post-type-check AST, say

$ ./ccparse -tr printTypedAST in/t0001.cc

Additional -tr flags of interest:

Module List:

Module dependency diagram:
Module dependencies
Or, in Postscript.

Miscellanous files:

Valid HTML 4.01!