[antlr-interest] Disregarding subrule ordering

Alexey Demakov demakov at ispras.ru
Thu Dec 1 06:07:51 PST 2005


Hi,

Alternatively you should describe all possible combinations of parameters.
Custom code is better solution. :)
ANTLR doesn't have analogue of <interleave> tag in RELAX NG...

Regards,
Alexey

-----
Alexey Demakov
TreeDL: Tree Description Language: http://treedl.sourceforge.net
RedVerst Group: http://www.unitesk.com


----- Original Message ----- 
From: "Royne Borrud" <royne.borrud at gmail.com>
To: <antlr-interest at antlr.org>
Sent: Thursday, December 01, 2005 4:38 PM
Subject: [antlr-interest] Disregarding subrule ordering


> Hi.
> My goal is to parse a statement similar to this:
> 
> object name {
>    optionalParam1
>    param1
>    param3
>    param2
>    optionalParam3
> }
> 
> My problem is that while I do not want to enforce a specific ordering
> of the parameters, I do want to make sure that all three parameters
> occur once and only once, and that the optional parameters occur once
> or not at all. Is this possible without adding specific code to handle
> this? I'm beginning to think not... :/
> If there isn't, has anyone got any hints for how to go about this?
> 
>



More information about the antlr-interest mailing list