How about converting your input to all lowercase (or uppercase) before feeding it into the lexer?

Stephan

By on 6/26/2008 3:48 AM ()

Stephan, thanks for your suggestion it seems that my alerts are not working...
That is how I have it implemented rigth now, however that means that if I have a string "Hello" it will be treated the same as "hello". I want the lexer to recognize the tokens independently of the casing without having to normalize the whole input. No magic swithces available?
Thanks,

Martín

By on 7/7/2008 8:24 PM ()

None of the email notifications work, which is a pitty.

I don't think there's command line switch, but you could just use a pattern like "[kK][eE][yY][wW][oO][rR][dD]" instead of "keyword" in the lexer. That's a bit cumbersome to type but should do the trick.

Stephan

By on 7/8/2008 4:43 AM ()

Thanks for the suggestion it seems that flex has a -i switch that solves that. Too bad it wasn't implemented in fslex. Also .Net regular expressions have the (?i) flag to ignore case but this isn't working either. In the end I will implement what you said. Thanks a lot for your help.

By on 7/8/2008 11:47 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper