Related articles |
---|
C-Tree: C Parser flisakow@cs.wisc.edu (1995-07-18) |
Newsgroups: | comp.compilers |
From: | flisakow@cs.wisc.edu (Shaun Flisakowski) |
Keywords: | C, tools, available, FTP |
Organization: | Compilers Central |
Date: | Tue, 18 Jul 1995 05:20:08 GMT |
Announcing C-Tree version 0.0
ctree is a free package, it takes the name of a file to parse as
input, and returns a pointer to the parse tree generated; or
NULL if there are errors, printing the errors to stderr.
It is written using flex and bison.
Notable features:
No leaking memory - Even if the parse fails through an error
all memory allocated is freed. (Checked via Purify (tm))
All tokens remaining in the parse tree (some are eliminated)
are marked with the line# and col# they originated at.
Includes a symbol table, and is basically ready-to-run
(I include a small example that parses its input and
_attempts_ to print it back out in a sensible way)
Seperate table for storing types (with the pointers to there
trees)
Is set up to allow parsing directly from a char buffer.
The input is normally passed through /lib/cpp, but the flex
lexer understands continuation lines and #line directives
as well.
Lexer understands C++ style comments, gives a warning for
'//*' and parses as ANSI C requires.
Current site is:
ftp.cs.wisc.edu:/coral/tmp/spf/ctree.0.0.tar.gz
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shaun Flisakowski
flisakow@cs.wisc.edu
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.