Jexpr-rank
Ranks of expressions.
This is a tagged union type, introduced by fty::deftagsum.
Member Tags → Types
- :expression → jexpr-rank-expression
- :assignment → jexpr-rank-assignment
- :conditional → jexpr-rank-conditional
- :conditional-or → jexpr-rank-conditional-or
- :conditional-and → jexpr-rank-conditional-and
- :inclusive-or → jexpr-rank-inclusive-or
- :exclusive-or → jexpr-rank-exclusive-or
- :and → jexpr-rank-and
- :equality → jexpr-rank-equality
- :relational → jexpr-rank-relational
- :shift → jexpr-rank-shift
- :additive → jexpr-rank-additive
- :multiplicative → jexpr-rank-multiplicative
- :unary → jexpr-rank-unary
- :postfix → jexpr-rank-postfix
- :primary → jexpr-rank-primary
See here for motivation.
The rank :expression corresponds to the nonterminal expression.
The rank :primary corresponds to the nonterminal primary.
Each of the other ranks, :<rank>, corresponds to
the nonterminal <rank>-expression.
We omit a rank for lambda-expression,
because our abstract syntax does not capture lambda expressions
(but even if it did, we would omit a rank for them
for the same reason why we omit the ranks described in the next sentence).
We omit ranks for
assignment,
pre-increment-expression,
pre-decrement-expression,
unary-expression-not-plus-minus,
cast-expression, and
primary-no-new-array
because we do not need them:
we could imagine expanding their definitions
in the definientia where they appear,
for our pretty-printing purposes.
We stop at primary expressions:
we do not need ranks for
literal, class-instance-creation-expression, etc.,
because those do not have any (sub)rules
with single-nonterminal definientia for expressions.
Subtopics
- Jexpr-rank-fix
- Fixing function for jexpr-rank structures.
- Jexpr-rank-case
- Case macro for the different kinds of jexpr-rank structures.
- Jexpr-rankp
- Recognizer for jexpr-rank structures.
- Jexpr-rank-equiv
- Basic equivalence relation for jexpr-rank structures.
- Jexpr-rank-kind
- Get the kind (tag) of a jexpr-rank structure.
- Jexpr-rank-unary
- Jexpr-rank-shift
- Jexpr-rank-relational
- Jexpr-rank-primary
- Jexpr-rank-postfix
- Jexpr-rank-multiplicative
- Jexpr-rank-inclusive-or
- Jexpr-rank-expression
- Jexpr-rank-exclusive-or
- Jexpr-rank-equality
- Jexpr-rank-conditional-or
- Jexpr-rank-conditional-and
- Jexpr-rank-conditional
- Jexpr-rank-assignment
- Jexpr-rank-and
- Jexpr-rank-additive