[antlr-interest] Re: Enhance ANTLR support for comments?
David Wigg
wiggjd at sbu.ac.uk
Fri Jul 18 04:52:24 PDT 2003
I would like to support this suggestion strongly.
When I was saving comments I "overloaded?" the consume function
which enabled me to interleave the comments again using line
numbers (and that's another thing which should be in standard
ANTLR, Line and Column numbers!). It was horrendous and I don't
think it ever worked perfectly!
At the time I tried working out a system of giving comments a
special type number (as Andy suggests) which the parser would
know to ignore (such as zero) but provide a feature (in
consume?) which would enable us to pick up the comments after
parsing in the correct sequence (I don't think it would matter
whether multi-line or end-of-line if they were in sequence) but
I gave up because I didn't have the time to understand all the
antlr support code.
I agree that saying you can do all these things by using this or
that technique is quite unhelpful. We are not all steeped in
understanding how ANTLR works, we use a car but we don't have to
know how it works, and we are not all programming geniuses
anyway (as much as we'd like to think we were pretty good at it!).
David
Research Fellow
Centre for Systems and Software Engineering
South Bank University
London, UK.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list