From: Hendrik Boom <hendrik@topoi.pooq.com>
To: libre-riscv-dev@lists.libre-riscv.org
Subject: Re: [libre-riscv-dev] parser precedence, code review / checking needed
Date: Fri, 3 Apr 2020 16:41:18 -0400
Message-ID: <20200403204118.mdnwdquouremxeid@topoi.pooq.com> (raw)
In-Reply-To: <CAC2bXD6FrkbjMvBWxWn=2F0cjtzHuOWJUtk2Cs_fOu1MYe8Xcw@mail.gmail.com>
On Fri, Apr 03, 2020 at 11:22:56AM -0700, Jacob Lifshay wrote:
> On Fri, Apr 3, 2020, 08:20 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
> wrote:
...
> > +in_range <- (x | y) & (a | b)
> > +in_range <- (x + y) - (a + b)
> > +"""
> >
>
> since there are parenthesis, precedence between &, |, +, and - doesn't
> actually matter here, so it's not a good example. Traditionally + and -
> have the same precedence whereas & has higher precedence than | so a & b |
> c parses as (a & b) | c.
Presumably because the early logicians treated 'and' as being a multiplication
and 'or' as being an addition.
-- hendrik
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
prev parent reply index
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-03 15:19 Luke Kenneth Casson Leighton
2020-04-03 18:22 ` Jacob Lifshay
2020-04-03 18:49 ` Luke Kenneth Casson Leighton
2020-04-03 20:08 ` Jacob Lifshay
2020-04-03 21:44 ` Luke Kenneth Casson Leighton
2020-04-03 20:41 ` Hendrik Boom [this message]
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=20200403204118.mdnwdquouremxeid@topoi.pooq.com \
--to=hendrik@topoi.pooq.com \
--cc=libre-riscv-dev@lists.libre-riscv.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
Libre RISC-V Mailing list Archives (accessible via public-inbox)
Archives are clonable: git clone --mirror https://inbox.libre-soc.org/libre-riscv-dev
Example config snippet for mirrors
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git