[antlr-interest] we can do push/pop error stuff for 4%
Terence Parr
parrt at cs.usfca.edu
Sat May 27 14:29:57 PDT 2006
On May 27, 2006, at 2:31 PM, Olivier Dragon wrote:
>> Good point, though I thought that synchronization had gotten much
>> faster these days...
>
> I think it might also have to do with fact that java.util.Stack is
> based on Vector, which is a resizeable array with default size 10. If
> your grammar uses more than 10 elements it's going to do a lot of
> resizing.
Oh, right. Yeah, I set my stack at 75 min.
> If you're interested in seeing the possible effect of either
> synchronisation or resizing, build a stack class using
> java.util.ArrayList which is resizeable but not synchronised. I
> presume
> you build your stack with a fixed size array?
Yep, but it grows of course when it sees an overflow.
> Do you know ahead of time the maximum size of the Stack based on the
> grammar?
Nope :)
Ter
More information about the antlr-interest
mailing list