[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
>This may be a bit heretical, but have you considered abandoning
>streams/readers entirely, and just using a single large String as the lexer
>input? We're already building the entire parse tree in memory, which is
>many times larger than the input file. And using a raw String will
>probably be faster than reading a single character at a time from a stream.
I was planning to accept a Reader as Lexer constructor parameter and to use
BufferedReader internally. This would simplify the construction of the lexer
without compromising the speed.
I like your idea. I could provide a constructor accepting a String as
parameter. But, I must also provide the Reader to people that use customized
lexers/parsers to minimize memory usage.
Expect to see the String parameter in version SableCC 2.2 or 2.3. Depends on
the amount of work required.