Closed ythri closed 3 years ago
Hi, yes there is a feature for this use case that works exactly like you mentioned:
FUNCTION -> ~'function';
would work all right. You can see an example in action here.
Perfect, that's exactly what I need. Thanks for the answer and for hime :)
Hey, I wanted to test Hime to write a small parser. However, the language I need to parse is case insensitive: Variable names e.g. do not depend on casing (var, VAR and vAr all refer to the same variable), and same for keywords.
Currently, the way I write my terminals is like this:
While this should work (I haven't tested my grammar yet), it looks of course ugly. Maybe Hime could introduce a new special syntax for case insensitive keywords? Something like
i'function'
or similar might work. I assume this would not only clean up my grammar, but could potentially help for other parsers as well. If Hime provides this functionality already, then my apologies, but I couldn't find anything in the reference.