[antlr-interest] ignoring the rest of the file other than the rules defined

Bart Kiers bkiers at gmail.com
Tue Aug 23 02:38:56 PDT 2011


Could you post your grammar(s) and actual input?
Example input containing .... is not really helpful.

Regards,

Bart.


On Mon, Aug 22, 2011 at 1:27 PM, Swathi V <swathiv at zinniasystems.com> wrote:

> Would be thankful if anyone helps me out.
>
> Problem :
>
> I have a huge file with certain categories and  properties in those.
> Ex:
> CATEGORY1(XYZ) {
>
> PROPERTY1 : .....
> PROPERTY2 : ....
>
> }
>
> CATEGORY2(XYZ) {
>
> PROPERTY3 : .....
> PROPERTY4 : ....
>
> }
> ......
>
>
>
>
> What i need to do is ...
> i need only few categories and in that only few properties. for the rest i
> gotta ignore in the file.
> i have written
> 1. lexer
> 2. parser
>  and AST creation for it here
> 3. to invoke the same.
>
>
> i have also used
>  options { filter = true; }
>
> but i'm able to get the required thing.
> Can anyone help me out please... with an example for the above?
>
>
>
> Thank You..
>
>
>
>
>
> --
> Regards,
> Swathi.V.
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>


More information about the antlr-interest mailing list