[antlr-interest] Stack overflow in Antlr extensions
Peter Piper
peterpiper797 at hotmail.com
Mon Jan 2 06:31:59 PST 2012
Thank you, Sam, for the extensions, they are very useful! However, I think I may have come across a problem. It's probably because of the messy way that I write code but, consider a grammar like this:
myRule : subRule anotherSub*
;
subRule : SOMETHING
;
anotherSub
: SOMETHINGELSE
;
If I change the anotherSub to insert a new clause at the start (i.e. hit Enter and '|'):
anotherSub
:
| SOMETHINGELSE
;
and then hit "Save", Visual Studio 2010 will crash, apparently with a Stack Overflow (sometimes it tells me that's the problem and other times it just freezes).
I checked today that I'm using version 1.0.6.318 of the extensions which I believe to be the latest. I get the impression that something doesn't like the infinite loop that this generates. Also, I assume it's the extensions because I'm not building the grammar, merely editing it; unless, of course, the extensions are invoking Antlr3 behind the scenes?
Yours,
Dan
More information about the antlr-interest
mailing list