Macro fungi_lang::fgi_index
[−]
[src]
macro_rules! fgi_index { { fromast $ast:expr } => { ... }; { ^ $ast:expr } => { ... }; { ($($i:tt)+) } => { ... }; { {$($nmtm:tt)+} } => { ... }; { @! } => { ... }; { 0 } => { ... }; { $x:tt * $y:tt } => { ... }; { $x:tt % $y:tt } => { ... }; { $x:tt % $y:tt $($more:tt)+ } => { ... }; { $x:tt U $y:tt } => { ... }; { $x:tt U $y:tt $($more:tt)+ } => { ... }; { () } => { ... }; { ($i:tt,$j:tt) } => { ... }; { prj1 $($i:tt)+ } => { ... }; { prj2 $($i:tt)+ } => { ... }; { # $a:ident : $sort:tt . $($body:tt)+ } => { ... }; { {$($i:tt)+} $par:tt } => { ... }; { {$($i:tt)+} $par:tt $($pars:tt)+ } => { ... }; { [$($m:tt)+] $($par:tt)+ } => { ... }; { ($($i:tt)+) ^ * $($j:tt)+ } => { ... }; { ($($i:tt)+) $($par:tt)+ } => { ... }; { $var:ident } => { ... }; { $($any:tt)* } => { ... }; }
Parser for Index Terms
i,j,X,Y ::=
fromast ast (inject ast nodes)
@! (write scope function, lifted to name sets)
(i) (parens)
{N} (singleton name set)
0 (empty set)
X % Y ... (separating union extended - left to right)
X U Y ... (union extended - left to right)
X * Y (pair-wise name combination of two sets)
() (unit)
(i,j) (pairing)
prj1 i (projection)
prj2 i (projection)
#a:g.i (abstraction)
{i} j ... (curried application)
[M] j (mapping)
(i) j (flatmapping)
(i)^* j (iterated flatmapping)
a (variable)