Hi All,
What is the best way to rewrite an empty input?
I mean if my input is "" (empty string) how can I rewrite to "*" ?
The desired behaviour is to search everything (*) if the input is empty.
I thought about upgrading my top rule to be:
query
: (andExpression+ -> andExpression) EOF
| (SPACE*) EOF -> STAR
;
Where STAR and SPACE are defined as:
STAR : '*';
SPACE : (' ' | '\t' | '\f')+ {$channel=HIDDEN;};
With this set of rules the output of tree in its text form is "STAR" while I
was expecting "*"
What am I doing wrong?
Thanks
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.