[antlr-interest] Need help with simple grammar
Florian Weimer
fw at deneb.enyo.de
Fri Apr 20 12:51:10 PDT 2007
* Johannes Luber:
> tokens {
> GET='get';
> PUT='put';
> target
> : FILE
> ;
>
> You still have to change the target rule to allow arbitrary filenames
> and include predicates which filter the invalid sentences out (supposing
> all your examples were entirely inclusive).
By the way, is there an easy way to accept any non-empty,
non-whitespace string for FILE, including "get", "put", etc.?
More information about the antlr-interest
mailing list