[erlang-questions] Parsing UUIDs with Leex
Massimo Cesaro
massimo.cesaro@REDACTED
Sat Oct 12 14:39:18 CEST 2019
On Fri, Oct 11, 2019 at 6:30 PM Stanislaw Klekot <erlang.org@REDACTED>
wrote:
> On Fri, Oct 11, 2019 at 04:22:32PM +0200, Massimo Cesaro wrote:
> > Today I was trying to define a UUID data type in the DSL language using
> the
> > following definition in the leex .xlr file:
> >
> > UUID =
> >
> [0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}
> >
> > and the corresponding rule:
> > {UUID} : {token, {uuid, TokenChars, TokenLine}}.
>
> Are you sure that {8} is not treated as a macro name?
>
Not really, I'm looking into leex source.
> Also, you don't need to quote your dashes with a backslash in the
> regexp.
>
> Yup, better safe than sorry. It didn't change the outcome, though.
Best regards,
Massimo
> --
> Stanislaw Klekot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20191012/a449fe65/attachment.htm>
More information about the erlang-questions
mailing list