[antlr-interest] Nested Tree Construction vs. Recognition

Randall R Schulz rschulz at sonic.net
Thu Jul 5 07:10:50 PDT 2007


On Thursday 05 July 2007 07:06, Randall R Schulz wrote:
> Hi,
>
> I'm curious about whether it's possible to write tree grammar rules
> whose right-hand-sides (or alternatives thereof) can have nested tree
> node structure.
>
> ...
>
> error(100): CLIFBuilder.g:752:6: syntax error: antlr:
> CLIFBuilder.g:752:6: expecting RPAREN, found '?' error(100):
> CLIFBuilder.g:757:3: syntax error: antlr: CLIFBuilder.g:757:3:
> expecting SEMI, found ')' error(10):  internal error: CLIFBuilder.g :
> java.lang.NullPointerException

It occurs to me that I should have included the entire stack trace:

ANTLR Parser Generator  Version 3.0 (May 17, 2007)  1989-2007
error(100): CLIFBuilder.g:752:6: syntax error: antlr: CLIFBuilder.g:752:6: expecting RPAREN, found '?'
error(100): CLIFBuilder.g:757:3: syntax error: antlr: CLIFBuilder.g:757:3: expecting SEMI, found ')'
error(10):  internal error: CLIFBuilder.g : java.lang.NullPointerException
org.antlr.tool.ActionAnalysisLexer.mX_Y(ActionAnalysisLexer.java:139)
org.antlr.tool.ActionAnalysisLexer.mTokens(ActionAnalysisLexer.java:323)
org.antlr.tool.ActionAnalysisLexer.nextToken(ActionAnalysisLexer.java:69)
org.antlr.tool.ActionAnalysisLexer.analyze(ActionAnalysisLexer.java:43)
org.antlr.tool.Grammar.examineAllExecutableActions(Grammar.java:1283)
org.antlr.tool.Grammar.setGrammarContent(Grammar.java:567)
org.antlr.tool.Grammar.<init>(Grammar.java:456)
org.antlr.Tool.getGrammar(Tool.java:331)
org.antlr.Tool.process(Tool.java:267)
org.antlr.Tool.main(Tool.java:70)


Randall Schulz


More information about the antlr-interest mailing list