Macro sparql
Source macro_rules! sparql {
(SELECT DISTINCT $(?$c:ident)+ WHERE {$($rest:tt)*}) => { ... };
(SELECT $(?$c:ident)* WHERE {$($rest:tt)*}) => { ... };
(@PAT {$($first:tt)*} UNION $($rest:tt)*) => { ... };
(@PAT {$($rest:tt)*}) => { ... };
(@PAT $($rest:tt)*) => { ... };
(@TRIP {$($trips:tt)*} {$($binds:tt)*} ?$v:ident $path:ident:$pred:ident ?$v2:ident . $($rest:tt)*) => { ... };
(@TRIP {$($trips:tt)*} {$($binds:tt)*} ?$v:ident $path:ident:$pred:ident $p2:ident:$t:ident . $($rest:tt)*) => { ... };
(@TRIP {$($trips:tt)*} {$($binds:tt)*} $node:ident $path:ident:$pred:ident ?$v2:ident . $($rest:tt)*) => { ... };
(@TRIP {$($trips:tt)*} {$($binds:tt)*} ?$v:ident $path:ident:$pred:ident $node:ident . $($rest:tt)*) => { ... };
(@TRIP {$($trips:tt)*} {$($binds:tt)*} BIND($name:literal as ?$v:ident) $($rest:tt)*) => { ... };
(@TRIP {} {}) => { ... };
(@TRIP { $(($e:expr))+ } {}) => { ... };
(@TRIP {$( ($e:expr) )+} {($name:literal,$v:ident) $($rest:tt)*}) => { ... };
}