[antlr-interest] ANTLR 2.x or 3 feature request re: input buffers (source available)

Terence Parr parrt at cs.usfca.edu
Wed Aug 4 15:02:01 PDT 2004


On Aug 4, 2004, at 2:23 PM, Richard Clark wrote:

> I've been working on an Eclipse editor based on ANTLR and would like to
> request a small change in how the Lexer gets its input.
>
> At the moment, there's an abstract InputBuffer class that is subclassed
> by CharBuffer and ByteBuffer. InputBuffer's design assumes it's getting
> input from a sequential device (via the fill command) and puts the
> result into a queue to allow limited backtracking.
>
> However, if I'm building an editor, I already have a big fat juicy
> character buffer in memory -- it's awkward and inefficient to have to
> emulate a character-at-a-time sequential device just to feed
> InputBuffer.

The new ANTLR 3.0 mechanism will make exactly this assumption.  
Sequential devices will be the "poor cousin" this time. ;)  With 
memory-mapped I/O and such, this is a good assumption especially with 
systems that have 1G ram ;)

Ter
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com
Cofounder, http://www.knowspam.net enjoy email again!
Cofounder, http://www.peerscope.com pure link sharing





 
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