I am having difficulty translating some lex into nearley, specifically the range operator.
Let's assume I need either 1 through 3 digits. In lex I'd have:
[0-9]{1,3}
The closest I can think of in nearley is
digit (digit digit:?):?
But that's not really practical for things such as
[0-9]{1,9}
I am having difficulty translating some lex into nearley, specifically the range operator. Let's assume I need either 1 through 3 digits. In lex I'd have:
[0-9]{1,3}
The closest I can think of in nearley is
digit (digit digit:?):?
But that's not really practical for things such as [0-9]{1,9}
Any ideas?