osa1 / lexgen

A fully-featured lexer generator, implemented as a proc macro
MIT License
63 stars 7 forks source link

Support negated character sets? #32

Closed FranklinChen closed 2 years ago

FranklinChen commented 2 years ago

I noticed that negated character sets are not supported? Is there a reason?

osa1 commented 2 years ago

It will be implemented, see #24.

I'm curious about your use case, could you say a few words about why you need this feature?

FranklinChen commented 2 years ago

I use negated character sets all the time with other lexer generators; most of my important tokens involve negation. For example, "starts with & and then is followed by anything other than a number or colon or space", so that "&x_0=é(y)" is a token.

osa1 commented 2 years ago

Thanks for the example. I'm closing this as duplicate of #24.