[antlr-interest] Re: BENCHMARK. ANTLR. Bad results.

Ric Klaren klaren at cs.utwente.nl
Sun Nov 14 07:12:44 PST 2004


On Sun, Nov 14, 2004 at 12:35:25AM +0300, Alex Sedow wrote:
> Little question. Why ANTLR still use buffering for source files? 

For C++ there's buffering in the stream interface (if you use the default
inputbuffers). And there's some internal buffering for syntactic predicates
in a cyclic buffer.

> I think modern computers and operating systems has enough physical or
> virtual memory to load full source file. Maybe better remove buffering and
> simplify logic?

In a sense a good point. But there's always some tension between features
and simplicity (and of course speed) ANTLR2 lexers pay dearly for some
features. Also keep in mind that ANTLR is used in a lot of varying
situations. For some buffering a whole file may be impossible. ANTLR2 does
not stop you from reading the whole file in advance, the parts to do that
are all there. See also my post in this thread about the ANTLR3 prototype
for C.

Cheers,

Ric
--
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893755  ----
-----+++++*****************************************************+++++++++-------
     Human beings, who are almost unique in having the ability to learn
   from the experience of others, are also remarkable for their apparent
         disinclination to do so. --- Douglas Adams, Last Chance to See



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the antlr-interest mailing list