librelist archives

« back to archive

Case insensitive keywords

Case insensitive keywords

From:
Nathan Stults
Date:
2010-11-09 @ 17:21
Hello,

 

Awesome project! I know everyone always enters a mailing list like that,
but it really is a very exciting tool. 

 

Anyway, I am working on a very simple javascript DSL for evaluating
rules, and I would like it to be case insensitive. I have used PG's that
have a flag that can turn off case sensitivity, and ones that require
definitions like this

 

[Aa][Nn][Dd]       { return '&&'; }

 

Is that the best way to accomplish this in JISON, or is there some kind
of flag I could use to improve the readability.

 

Thanks,

 

Nathan Stults

 

Re: [jison] Case insensitive keywords

From:
Zachary Carter
Date:
2010-11-10 @ 00:45
On Tue, Nov 9, 2010 at 12:21 PM, Nathan Stults
<Nathan_Stults@hsihealth.com>wrote:

> Hello,
>
>
>
> Awesome project! I know everyone always enters a mailing list like that,
> but it really is a very exciting tool.
>
>
>
Thanks, I appreciate it. :)


> Anyway, I am working on a very simple javascript DSL for evaluating rules,
> and I would like it to be case insensitive. I have used PG’s that have a
> flag that can turn off case sensitivity, and ones that require definitions
> like this
>
>
>
> [Aa][Nn][Dd]       { return ‘&&’; }
>
>
>
> Is that the best way to accomplish this in JISON, or is there some kind of
> flag I could use to improve the readability.
>
>
>
> Thanks,
>
>
>
> Nathan Stults
>

There currently is no case insensitivity switch, so the latter method will
have to do for now.

-- 
Zach Carter