[antlr-interest] How to work with ANTLRNoCaseFilestream (case insensitivity) + ANTLWorks
Johannes Luber
jaluber at gmx.de
Sat Oct 11 14:51:07 PDT 2008
brainstorm schrieb:
> Hi ! First post on this mailing list :)
>
> I'm working in a DSL (for educational purposes) and I don't know how
> to archieve token case insensitivity while working with antlrworks
> 1.2.1. I don't want to kludge the grammar with lower & uppercase token
> definitions like:
>
> 'INT' | 'int' | 'InT' ...
>
> I taken the the advice from "How do I get case insensitivity?"[1] wiki
> resource, but my problem is about integrating this solution to
> antlrworks without having to build a custom antlrworks or antlr-3.1.1
> jar myself.
>
> The problem is that, when debugging, ANTLworks generates a
> __Test__.java file using:
>
> CLLexer lex = new CLLexer(new ANTLRFileStream("input0"));
>
> As the default filestream for testcases... but I want antlrworks to
> use the extended NoCaseFilestream class... what is the cleanest method
> to do it ?
>
> Thanks in advance !
The only other way I know is to change in the preferences the option
that you are going to be asked if ANTLRworks recompiles the code before
debugging. Then you can manually edit __Test__.java without losing your
changes - or better make a copy which you can use to overwrite the test
class, once you did regenerate the files.
Johannes
>
> [1] http://www.antlr.org/wiki/pages/viewpage.action?pageId=1782
>
> 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