[erlang-questions] Parsing UUIDs with Leex

Stanislaw Klekot erlang.org@REDACTED
Fri Oct 11 18:30:48 CEST 2019

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?

Also, you don't need to quote your dashes with a backslash in the

Stanislaw Klekot

More information about the erlang-questions mailing list