lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> OK, fair enough. I may look into tweaking the parser to accept != as
> well as ~= for my own use, though that depends on whether I can wrap
> my brain around the parser.

It's the lexer that needs to be hacked and it's pretty easy;
just add this in function llex near to "case '~'":

      case '!': {
        if (check_next1(ls, '=')) return TK_NE;
        else return '!';