softdevteam / grmtools

Rust grammar tool libraries and binaries
Other
494 stars 32 forks source link

Define lexemes in terms of other lexemes #465

Open bendrissou opened 2 weeks ago

bendrissou commented 2 weeks 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 2 weeks ago

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