[erlang-questions] Parsing UUIDs with Leex

Massimo Cesaro massimo.cesaro@REDACTED
Sun Oct 13 19:22:15 CEST 2019


Right, although if you read the leex.erl source code it seems that it
could.
Whatever. I'll stick to UUIDs as strings.

Thank you all.

Massimo

On Sat, Oct 12, 2019 at 5:27 PM Håkan Huss <huss01@REDACTED> wrote:

> 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/20191013/3d967028/attachment.htm>


More information about the erlang-questions mailing list