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

Swathi V swathiv at zinniasystems.com
Mon Aug 22 04:27:27 PDT 2011


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.


More information about the antlr-interest mailing list