Hello,
We have the following lexical regex pattern for numbers (int and reals):
(these patterns and look-ahead we are using from the samples)
{Digit}* \. {Digit}+ ([Ee] [\+\-]? {Digit}+)?
{Digit}+ [Ee] [\+\-]? {Digit}+
{Digit}+
When we use the following look-ahead pattern:
{NonWord}|\z
And trying to get tokens with the following code:
graphic 2a
We never get a number token, just a "default" token.
We get the following tokens (ignoring whitespace)
GraphicToken = "graphic"
Default = "2"
Identifier="a"
However, if we remove the look-ahead, we get the following tokens, which seems correct:
GraphicToken = "graphic"
Number = "2"
Identifier="a"
Is this working as intended? What is the look-ahead actually doing?