softdevteam / grmtools

Rust grammar tool libraries and binaries
Other
517 stars 31 forks source link

Define lexemes in terms of other lexemes #465

Open bendrissou opened 5 months ago

bendrissou commented 5 months ago

Hi,

It's not clear to me from the documentation whether it's possible to define lexemes in terms of other lexemes.

E.g.

[0-9] "DIGIT"
[a-zA-Z] "LETTER"
{LETTER}({LETTER}|{DIGIT})* "ID"

Is this Lex feature supported by grmtools?

Thank you.

ltratt commented 5 months ago

It's not supported. I would not object to a PR which added it!