Terence Parr wrote:
>
> On Mar 22, 2009, at 7:49 AM, Sam Barnett-Cormack wrote:
>
>> Hi all,
>>
>> Trying to build my grammar, I get the following (including my command
>> line):
>>
>> s...@canth:~$ java -cp javalib/antlr-3.1.2/lib/antlr-3.1.2.jar
>> org.antlr.Tool -o tmp/junk workspace/asn.1-parse/grammars/ASN_1.g
>> error(10): internal error: workspace/asn.1-parse/grammars/ASN_1.g :
>> java.lang.IllegalArgumentException: Can't find template
>> matchSetTrack.st; group hierarchy is [Java]
>
> term+=(~(RSQR|LSQR)))*
>
> is your problem. known bug :) can't add sets to a list yet.
The full rule is:
encodingInstruction : (term+=(~(RSQR|LSQR)))* -> ^(ENCINS $term*);
I read that as
(
term+=(
~(RSQR|LSQR)
)
)*
So the term+= is applying to the *single* (~(RSQR|LSQR)), and the whole
lot has cardinality zero-to-N. So each iteration adds one thing that is
anything-but-rsqr-or-lsqr to term, and this happens zero or more times.
Is this not what it says?
--
Sam Barnett-Cormack
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---