[antlr-interest] Simple ASP-like grammar
robgreene at gmail.com
Tue Nov 29 19:13:57 PST 2005
On 11/29/05, Dimitrios Kolovos <dskolovos at gmail.com> wrote:
> The grammar I have developed is compiled without errors or warnings.
> However the parser returns the whole text as a single child of the root
> AST node. I have tried to find similar grammars on the web but no luck.
I'm going to punt. Being the newbie, take this with a grain of salt...
I've read that ANTLR's lexer is greedy. I'd guess that once it enters
either of the antText or tagged rule, there's nothing to make it exit.
I'm not sure if the answer is to define the "[%" and "%]" in the lexer
or to exclude them from the AnyTextBlock.
Hope that leads to something...
More information about the antlr-interest