[][src]Macro parze::rule

macro_rules! rule {
    ( ( $($inner:tt)* ) ) => { ... };
    ( { $($inner:tt)* } ) => { ... };
    ( [ $inner:tt ] ) => { ... };
    ( @AS_EXPR $x:tt $($tail:tt)* ) => { ... };
    ( $x:literal $($tail:tt)* ) => { ... };
    ( $x:ident $($tail:tt)* ) => { ... };
    ( $a:tt -> $b:tt $($tail:tt)* ) => { ... };
    ( $a:tt => $b:tt $($tail:tt)* ) => { ... };
    ( $a:tt . $method:ident ( $($args:tt)* ) $($tail:tt)* ) => { ... };
    ( $a:tt -& $b:tt $($tail:tt)* ) => { ... };
    ( $a:tt &- $b:tt $($tail:tt)* ) => { ... };
    ( $a:tt & $b:tt $($tail:tt)* ) => { ... };
    ( $a:tt *= $b:tt $($tail:tt)* ) => { ... };
    ( $a:tt * $($tail:tt)* ) => { ... };
    ( $a:tt + $($tail:tt)* ) => { ... };
    ( $a:tt ? $($tail:tt)* ) => { ... };
    ( $a:tt | $($b:tt)* ) => { ... };
    ( | $($a:tt)* ) => { ... };
    ( & $($a:tt)* ) => { ... };
    ( $x:tt ) => { ... };
    ( $($tail:tt)* ) => { ... };
}

A macro to define parser rules.

Operators

Note that | has a lower precedence than all other operators

SyntaxNameDescription
x & ythenEquivalent to x.then(y)
x | yorEquivalent to x.or(y)
x *anyEquivalent to x.repeat(..)
x +at least oneEquivalent to x.repeat(1..)
x ?optionalEquivalent to x.or_not()
x -& ydelimiter forEquivalent to x.delimiter_for(y)
x &- ydelimited byEquivalent to x.delimited_by(y)
x *= NrepeatEquivalent to x.repeat(N)
x -> YtoEquivalent to x.to(y)
x => FmapEquivalent to x.map(F)
[ X ]all ofEquivalent to all_of(X)
{ X }exprConsiders X to be a Rust expression