[erlang-questions] Parsing UUIDs with Leex
Håkan Huss
huss01@REDACTED
Sat Oct 12 17:27:45 CEST 2019
Den lör 12 okt. 2019 14:39Massimo Cesaro <massimo.cesaro@REDACTED> skrev:
>
> 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.
>
Looking at the Leex docs for the supported regexes it seems that the {n}
construct isn't supported.
/Håkan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20191012/6a27b02f/attachment.htm>
More information about the erlang-questions
mailing list