Merge: nitcc open class
authorJean Privat <jean@pryen.org>
Thu, 10 Mar 2016 04:55:52 +0000 (23:55 -0500)
committerJean Privat <jean@pryen.org>
Thu, 10 Mar 2016 04:55:52 +0000 (23:55 -0500)
Accept open classes in regular expression in nitcc.

I thought that the feature was already here, since it is in SableCC4 and already handled by the current nitcc engine.

For information, this allows to indicate an open range of accepted characters.

~~~
a = 'A'...; // `a` can match "A", "B" or "䕫" and a lot other character
~~~

It is basically equivalent to

~~~
a = Any - (#0 .. '@');
~~~

It is also used by the grammar to extends the range of possible literals and enable language description with phoenician keyword and complex emoji-based regular expressions.

Pull-Request: #1979
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>


Trivial merge