[antlr-interest] Re: urgent problem with stack overflow, please help
netminka
netminka at netscape.net
Fri Oct 10 11:33:36 PDT 2003
Thanks for your reply.
I don't believe I could have recursion as a problem because
the parser stack trace does not show that. I can get files of
very large size through the translator, the only problem is with
individual procedures, their size over a certain limit causes
stack overflow. If I split them into smaller procedures,
otherwise same code, no problem.
megan
--- In antlr-interest at yahoogroups.com, "lgcraymer" <lgc at m...> wrote:
> --- In antlr-interest at yahoogroups.com, "netminka" <netminka at n...>
> wrote:
> > hi all,
> > I am writing a commercial grade translator. The source language
> > environment has tools which generate large initialization
> > procedures, I have seen up to 1100 lines. This causes stack
> overflow.
> > We are using C# antlr. Stack overflow happens at about 600 lines.
> > This happens in the first stage of parsing, not the tree parser.
> >
>
> Megan--
>
> Is there any chance that you have recursion in place of iteration?
> Say something like
>
> statements
> :
> statement ( statements )?
> ;
>
> If so, a succession of statements ("statements"
calling "statements"
> calling ...) could blow the stack. It should not (well, C$ is a
> Microsoft product) otherwise be possible to overflow the stack
unless
> C# does unbounded dynamic allocation of stack space within routines.
>
> --Loring
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list