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)
commit466ded0339a7d7ca18db093a21400ad5893c1075
tree3b26f6b04d9b684c17c4539cd1c77e5505e6cd06
parent2af08a24c2bb6aa342027b3543c67fb0b5c961ed
parent5c28c455a36d888d8b8a31f6ea0e094950ab52eb
Merge: nitcc open class

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>