[antlr-interest] Pruning the Parse Tree

Richard Clark rdclark at gmail.com
Mon Mar 10 19:22:35 PDT 2008


So Aaron, what are you trying to identify in the target language?
If you need to pick and choose, why not write a filter using ANTLR? Filters
use lexer rules to identify and extract parts of larger files.

Krugle uses ANTLR filters to extract method declarations from multiple
languages. I've used filters to extract database table definitions from a
giant mix of table defs and procedural code (over 10,000 lines) and then
used the lexer definitions as the base of a SQL dialect translator.

With as many struggles as you seem to be having, the right answer is usually
to back up and look at other ways to use the tool. (Years of working tech
support taught me this.)

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


More information about the antlr-interest mailing list