<html><head></head><body><div dir="auto">Well, we haven't agreed yet. We're gonna meet tomorrow so there may be a discussion about this in person and then we'll come with some agreement.<br><br>Anyway, thank you for all the input!<br>Maria <br></div><br><br><div class="gmail_quote"><div dir="auto">On 12 June 2023 17:55:34 CEST, Alexander Zubkov <green@qrator.net> wrote:</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail"><div dir="auto">Some additional ideas for decorating binary strings so that they do<br>not resemble other statements:<br>@hex(...)<br>bin:hex(...)<br><br>BTW, if we put a string literal inside the brackets, we can mimic a<br>function call without dirty lexer/parser hacks:<br>hex("...")<br><br>Or maybe you have already agreed on something?<br><br><br>On Mon, Jun 12, 2023 at 4:02 PM Ondrej Zajicek <santiago@crfreenet.org> wrote:<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"><div dir="auto"><br> On Mon, Jun 12, 2023 at 03:32:20PM +0200, Maria Matejka wrote:<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><div dir="auto"> 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.<br><br> 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.<br><br> Here I'd strongly prefer nicer user experience over setting the syntax to best fit our needs.<br></div></blockquote><div dir="auto"><br> Which would lead to syntax that is extremely confusing (i.e. hard to<br> intuitively grasp the right mental model just from meeting examples),<br> so i think hex(...) variant is also worse from user experience point.<br> As a user, i always hated unexpected special cases in syntax, even if<br> they might be expedient in some cases.<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><div dir="auto">I don't think any user really cares about the lexer/parser difference.<br></div></blockquote><div dir="auto"><br> People came with some preconceptions based on knowledge of syntax of<br> other programming / configuration (and also regular) languages, so they<br> have (either explicit or intuitive) concept of elementary / compound<br> statement. If there is someting that looks like existing compound<br> statement, but is in fact something completely different, it is<br> confusing.<br><br> --<br> Elen sila lumenn' omentielvo<br><br> Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org)<br> OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)<br> "To err is human -- to blame it on a computer is even more so."<br></div></blockquote></pre></blockquote></div><div dir="auto"><div class='k9mail-signature'>-- <br>Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.</div></div></body></html>