ckit 1.0

ckit is a C front end written in SML that translates C source code into abstract syntax represented as a set of SML datatypes.
ckit is a C front end written in SML that translates C source code (after preprocessing) into abstract syntax represented as a set of SML datatypes. It also provides facilities for extending the C language with additional syntactic constructs, which can be useful for implementing "C-like" domain-specific languages as well as C dialects. Ckit is currently used as the front end for a variety of tools for static analysis of C code and at least one domain-specific language.

INSTALLATION:

Let CKIT be the directory containing the CKit code.
Run SML in directory $CKIT/ast.
Execute "CM.make();". This gives you the parser/elaborator.

On unpacking the ckit sources, you should see a src directory, a doc directory and a README file (and possibly other directories, depending on the distribution).

The src directory contains the following subdirectories:

parser/
lexer and parser, parse trees.
ast/
abstract syntax trees (Ast), type-checker, pretty-printer.
variants/
flags for controlling the parser and type-checker.

To build the system, cd to src, run SML/NJ and type

- CM.make();

To test the parser on "test.c", type

- ParseToAst.fileToAst "test.c";

This parses and typechecks "test.c" and returns an abstract syntax tree for "test.c". Alternatively, to parse, type-check and then pretty-print "test.c", type

- ParseToAst.fileToC "test.c";

What's New in This Release:

Reworked size and alignment mechanism to support parameterization (see src/ast/sizes[-sig].sml). A utility program (src/c-util/sizes.c) can be used to generate sizes info for a given compiler/platform combination.

last updated on:
March 11th, 2008, 10:15 GMT
price:
FREE!
developed by:
Dave MacQueen
homepage:
www.smlnj.org
license type:
GPL (GNU General Public License) 
category:
ROOT \ Programming \ Code Generators

FREE!

In a hurry? Add it to your Download Basket!

user rating 19

2.6/5
 

0/5

Rate it!

Add your review!

SUBMIT