[PATCH] adding custom options in radv protocol, strict ipv6 regex

Maria Matejka maria.matejka at nic.cz
Mon Jun 12 15:32:20 CEST 2023


We can simply change the lexer state externally from the parser as soon as the hex( prefix is seen, and provide the result directly from the lexer. 

This way, we can allow all the syntaxes like hex(de-ad-be-ef), hex(de:ad:be:ef), hex(de ad be ef) or even hex(dea:db-eef) just by ignoring nonalnum characters altogether.

Here I'd strongly prefer nicer user experience over setting the syntax to best fit our needs. I don't think any user really cares about the lexer/parser difference.

Maria

On 12 June 2023 15:07:16 CEST, Ondrej Zajicek <santiago at crfreenet.org> wrote:
>On Mon, Jun 12, 2023 at 02:40:42PM +0200, Maria Matejka via Bird-users wrote:
>> Hello!
>> 
>> I think using hex() and base64() with adding these two tokens to the
>> "kw_sym:" non-terminal. This way, no current config should break.
>
>I would prefer hex:XX:YY:... to hex(XX:YY:...) to emphasize it is lexer
>and not parser thing and avoid special cases.
>
>-- 
>Elen sila lumenn' omentielvo
>
>Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
>OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
>"To err is human -- to blame it on a computer is even more so."

-- 
Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20230612/da2cb6a1/attachment.htm>


More information about the Bird-users mailing list