Whitespace not being read in xrl file

When trying to get the tokens from the xrl file, the white space seemed to be ignored. As a definition I wrote that

Whitespace = [\s/]+

Is there another way of writing whitespoace for xrl file please ?

Do you have a link to a repo that exhibits the problem? Although the / would seem an unusual whitespace character the definition seems ok. What does the rule that uses it look like?

Here’s an extract from one of my projects:

Definitions.
Whitespace              = [\s\n\t]

Rules.
{Whitespace}+           : skip_token.

This defines Whitespace to be either a literal space or a literal slash.

Also, how do you use the rule? What do you try to tokenize, what tokens do you get from it, and which would you expect? How do the remaining relevant of rules and definitions look like?

Ok then thanks a lot. It is the same structure just instead of writing \s, I wrote \s/. Thanks again.

No, [\s/] and [\s] are not the same. The latter is only for literal spaces (not tabs or newlines, ASCII 32 only), while the former adds the slash (/) as “Whitespace”.

Thanks a lot.