From: ori@eigenstate.org
To: 9front@9front.org
Subject: Re: [9front] Patch to fix test(1) expression parsing
Date: Sat, 01 Aug 2020 21:51:35 -0700 [thread overview]
Message-ID: <ADD0D28E5495374CF0053F697B0C9582@eigenstate.org> (raw)
In-Reply-To: <8155F03D042A477BCB2881C5C2FD20E1@musolino.id.au>
>> This comment seems outdated -- we can use the nice idea and
>> error out appropriately now.
>
> Yeah, I did this in an updated patch I sent in a subsequent email.
Oops. Had the old email open.
looking at it again, I'm wondering if we can split the unary and
binary ops up, and then instead of adding
if(EQ(a, '-?')) {
b = nxtarg(0);
return(eval && ...);
}
we could do:
/* special case ops */
if(EQ(a, "special))
...
/* common case binary ops */
b = nxtarg(0);
if(!eval)
return 0;
if(EQ(a, "-?")
return(...)
if(eq(a, "-!")
return(...)
It looks like there'd only be a few special cases that
don't fit.
next prev parent reply other threads:[~2020-08-02 4:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-01 16:14 Alex Musolino
2020-08-01 16:38 ` [9front] " Alex Musolino
2020-08-02 4:35 ` ori
2020-08-02 4:39 ` Alex Musolino
2020-08-02 4:51 ` ori [this message]
2020-08-03 13:45 ` Alex Musolino
2020-10-31 14:10 ` cinap_lenrek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ADD0D28E5495374CF0053F697B0C9582@eigenstate.org \
--to=ori@eigenstate.org \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).