develooper Front page | perl.perl6.users | Postings from May 2021

how to form rules for commutative triads?

Thread Next
From:
rir
Date:
May 29, 2021 22:57
Subject:
how to form rules for commutative triads?
Message ID:
20210529225731.orin3zzqogade4sb@localhost

Given:
    rule cmp_expression {
        | <str_const> <cmp_op> <identifier>
        | <num_const> <cmp_op> <identifier>
        | ...
    }

What is a good, concise way to express that all the alternatives are
commutative?

I imagine that generally this is a useless question, which is
avoided by:

rule cmp_expression {
   <value_expression> <cmp_op> <value_expression>
}

but here many tokens under value_expression exist but are not well
defined, nor known by me.

rir

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About