[antlr-interest] C target up to date

Jim Idle jimi at temporal-wave.com
Fri May 4 23:19:34 PDT 2007


As of about 5 minutes ago, the C target was up to date with all the
latest template and runtime changes. It could do with a bit of testing
though as I have not tried much on tree rewrites yet. If you are able
to, please test and let me know of any issues. A new distribution is
checked in to perforce (and should therefore be available shortly via
Fisheye.)

 

Additional examples are added to the C examples (you should look at
these carefully as I have changed macro names (for the last time - they
are fixed in stone now). Macros that appeared to mirror functions such
as INPUT() have now been rationalized and are now INPUT when a function
call is not involved and XYZ() when a function call is required. It
seems like Fisheye is still not tracking the examples folder, so perhaps
we can fix this, or supply a link to a tar on the download page.

 

You will need to use the next snapshot that Ter produces, as the C.stg
and AST.stg code generation templates have changed quite a lot. All
recent bug fixes to the Java target are now applied to the C target.
Again, if you are able to assist by testing this out a bit, I will be
happy to supply fixes. This "release" has been extensively profiled and
memory leak tested, but I have yet to do coverage testing.

 

The only functionality missing from the C target is the
TokenRewriteStream, which won't take too long and is way too cool a
feature to leave out of the upcoming Release 1. There is also no support
for template output and I shan't be implementing the debug compatible
code gen template until we are sure that the current codegen templates
are stable as it is too much to track changes in three templates, and I
have to implement some socket stuff to support it, which is not a big
deal, but time is better spent on having the generated code reliable and
performing.

 

Also, the C runtime library provides a number of useful data structures,
including vectors, hash tables, list, stack and a decent implementation
of an integer keyed Patricia Trie, all of which are reasonably doxygen
documented, but I will provide wiki docs in the end. The C parser
example uses one of these, which you may be able to copy as an example.

 

I hope you find this useful - please report any errors here.

 

Up Next:

 

*         TokenRewriteStream

*         How-to docs/cookbook for Wiki

*         All remaining examples

*         Expansive example project for MultiValue/Pick BASIC, including
Tree parser and code formatter.

 

Share and Enjoy!

 

Jim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070504/bbd59cd6/attachment-0001.html 


More information about the antlr-interest mailing list