[antlr-interest] Building C++-Target fails in ANTLR 3.4

Jost Baron Jost.Baron at gmx.de
Wed Aug 1 14:00:39 PDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Ivan,

thanks for your answer - I didn't know that there are different
C++-Targets. I used the old CPP target (it was the only one in
antlr-3.4-complete), but now I've found the "Cpp"-target, and it seems
to work fine.

Jost

PS: here's the code from pastebin, in case it gets deleted there:

CPP.stg 133:33: anonymous template has 0 arg(s) but mapped across 1
value(s)
CPP.stg 134:33: anonymous template has 0 arg(s) but mapped across 1
value(s)
CPP.stg 208:6: required parameters (filterMode) must appear before
optional parameters
CPP.stg 272:1: required parameters (labelType) must appear before
optional parameters
CPP.stg 272:12: required parameters (members) must appear before
optional parameters
CPP.stg 272:21: required parameters (filterMode) must appear before
optional parameters
CPP.stg 279:18: anonymous template has 0 arg(s) but mapped across 1
value(s)
CPP.stg 280:18: anonymous template has 0 arg(s) but mapped across 1
value(s)
CPP.stg 324:66: required parameters (filterMode) must appear before
optional parameters
CPP.stg 458:51: anonymous template has 0 arg(s) but mapped across 1
value(s)
CPP.stg 459:51: anonymous template has 0 arg(s) but mapped across 1
value(s)
CPP.stg 475:27: anonymous template has 0 arg(s) but mapped across 1
value(s)
CPP.stg 478:27: anonymous template has 0 arg(s) but mapped across 1
value(s)
CPP.stg 484:27: anonymous template has 0 arg(s) but mapped across 1
value(s)
CPP.stg 501:46: anonymous template has 0 arg(s) but mapped across 1
value(s)
CPP.stg 502:46: anonymous template has 0 arg(s) but mapped across 1
value(s)
CPP.stg 540:68: invalid character '<'
CPP.stg 540:68: invalid character '\'
CPP.stg 540:70: 'n' came as a complete surprise to me
CPP.stg 667:28: implicitly-defined attribute i not visible
CPP.stg 980:49: anonymous template has 0 arg(s) but mapped across 1
value(s)
CPP.stg 1029:21: invalid character '}'
CPP.stg 1029:21: mismatched input '};' expecting ID
CPP.stg 1154:56: anonymous template has 0 arg(s) but mapped across 1
value(s)
CPP.stg 1163:54: anonymous template has 0 arg(s) but mapped across 1
value(s)
CPP.stg 1215:47: anonymous template has 0 arg(s) but mapped across 1
value(s)
CPP.stg 1221:46: anonymous template has 0 arg(s) but mapped across 1
value(s)
CPP.stg 1341:95: anonymous template has 0 arg(s) but mapped across 1
value(s)
error(10):  internal error: grammar.g :
java.lang.IllegalArgumentException: no such attribute: buildAST
org.stringtemplate.v4.ST.add(ST.java:187)
org.antlr.codegen.CodeGenerator.genRecognizer(CodeGenerator.java:349)
org.antlr.Tool.generateRecognizer(Tool.java:655)
org.antlr.Tool.process(Tool.java:468)
org.antlr.Tool.main(Tool.java:93)

On 08/01/2012 10:01 PM, Ivan Brezina wrote:
> On 08/01/2012 09:14 PM, Jost Baron wrote:
>> Hi!
>> 
>> I've build a quite large grammar for ANTLR, and it compiles fine 
>> for the Java target. But as soon as I switch to the CPP-Target,
>> I get the following error:
>> 
>> http://pastebin.com/8GZ96Ew6
>> 
>> I've googled, but have not found a solution to this problem - 
>> According to the ANTLR-site the CPP-target was synced with ANTLR 
>> 3.4, so i guess the error is somewhere on my side. Any hints 
>> where?
>> 
>> 
> I'm afraid I will not help you too much. Just to clarify you use 
> target "Cpp" - written by Terence Parr not the "alternative"
> target "CPP" - written by Gokul
> 
> Ivan PS: please do not refer to pastebin, when asking for help. 
> Your question will be helpful lately for others.
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJQGZjxAAoJEG6HPMAgWtVztOEP+QGar2Zq8ybTd8N9pB9Bb8qy
KTa19lzYT83f++6hrK4bRY2rj6SAbcIi+E3BBsEnd5+i6iCW8jghC1q9EgX9Ht5Q
anbNe7GW0H+oqZJvGKOVHKcAte7+7Z9APFTU3+wXnawNV8s1+MLuApwJ6gdvq34z
AoZLXAJwaO97gjF6+Mk9XEJItQrCcpkYOeaW+dax86Shex10VHrDDI80Adlfi+0F
XXDf0BsDkBFbUrR9Zsvck1fWgbRzDA7gFggjN65yBpa7oQXefE86CxVTRHpDZARl
k+Hn0Dv/dO/If1heInlEh4QMmy4f57Rv0BB2lVU8imvb+HuvvHEaRqLR1kMDA+c4
X2n+iaVLFshAfTjYhJChdytSP/QzZ5gRvnakWoo4S9M7YIy/kePfgg1CqfXWLWOa
bXTZdWwMw+J2ckSCjEPl6VRZkM5+zI11dh8diczK+Mkpr+xEnamM3XtnCTomsIJz
vz14nr2054MWoXpLEx3h/2A6XVcsLCh+nSX3dPiJkkm2wqR9wjB77cy3je2y1IKO
CZdL99qL7+5uieGO6MNV+KHCqDnXniQ0b6ozCY9GuQPw4dE7/7Q3hXRNjsjlKuhY
ktKBpchuY+FT4O2YwxLo3XuQPpbXTQPbR6pvE8rfJhdiEwh1jdKPs66wm25MqSc2
At2S8IbjHSOtu408w+Ro
=4FLT
-----END PGP SIGNATURE-----


More information about the antlr-interest mailing list