[antlr-interest] Problems with C++-target

Marc klists at saphor.de
Sat Apr 28 06:06:20 PDT 2007


Hi!

Using a small grammar with antlr 3.0b7 that generates Java-files without
problems I tried the language option Cpp. and get the following error
message:

--------

error(10):  internal error: group Cpp does not satisfy interface
ANTLRCore: missing templates [parameterSetAttributeRef,
scopeSetAttributeRef, returnSetAttributeRef, lexerRulePropertyRef_text,
lexerRulePropertyRef_type, lexerRulePropertyRef_line,
lexerRulePropertyRef_pos, lexerRulePropertyRef_index,
lexerRulePropertyRef_channel, lexerRulePropertyRef_start,
lexerRulePropertyRef_stop, ruleSetPropertyRef_tree, ruleSetPropertyRef_st]

error(10):  internal error: group Cpp does not satisfy interface
ANTLRCore: mismatched arguments on these templates [outputFile(LEXER,
PARSER, TREE_PARSER, actionScope, actions, docComment, recognizer, name,
tokens, tokenNames, rules, cyclicDFAs, bitsets, buildTemplate, buildAST,
rewrite, profile, backtracking, synpreds, memoize, numRules, fileName,
ANTLRVersion, generatedTimestamp, trace, scopes, superClass, literals),
optional headerFile(LEXER, PARSER, TREE_PARSER, actionScope, actions,
docComment, recognizer, name, tokens, tokenNames, rules, cyclicDFAs,
bitsets, buildTemplate, buildAST, rewrite, profile, backtracking,
synpreds, memoize, numRules, fileName, ANTLRVersion, generatedTimestamp,
trace, scopes, superClass, literals), rule(ruleName, ruleDescriptor,
block, emptyRule, description, exceptions, finally, memoize),
listLabel(label, elem), lexerRuleRef(rule, label, args, elementIndex)]

error(10):  internal error: FILE.g : java.util.NoSuchElementException:
no such attribute: buildAST in template context
[headerFile]org.antlr.stringtemplate.StringTemplate.rawSetAttribute(StringTemplate.java:739)
org.antlr.stringtemplate.StringTemplate.setAttribute(StringTemplate.java:600)
org.antlr.codegen.CodeGenerator.genRecognizer(Unknown Source)
org.antlr.Tool.processGrammar(Unknown Source)
org.antlr.Tool.process(Unknown Source)
org.antlr.Tool.main(Unknown Source)

---

No C++ files are generated.

A similar error war reported on April 7th for the C target where it was
suggested to use the latest daily build. The latest I could find on the
page was dated April 21st and still exhibits this error.

Any ideas what I should do? Thanks in advance for any advice!

Best regards,

Marc



More information about the antlr-interest mailing list