Loading ...
Sorry, an error occurred while loading the content.

2909Re: [antlr-interest] RE: C++ stack overflow

Expand Messages
  • Sinan
    Dec 1, 2000
    • 0 Attachment
      Ernest Pasour wrote:
      >
      [...]
      > The last "while" loop (marked with the asterisks) walks all the way to the end of the list. So my spec file had a loop in it like the following:
      >
      > JSPTokenList:
      > {
      > RefAST tagList= #(nullAST);
      > }
      > ...
      > (
      > TAG:aTag
      > {#tagList = #(nullAST, #tagList, #TAG);}
      > )*
      > ...
      >

      Try a tail recursion.

      jSPTagList:
      TAG:aTag (jSPTagList)?
      ;


      Sinan
    • Show all 6 messages in this topic