In the latter case, I find myself thinking about expanding on
"infix:<>" to allow for a list of tokens, much like "circumfix:<>"
does:
infix:<?? ::> ($condition, $true, $false) #< $condition ?? $true :: $false >
...and I'm wondering if something like this could be done in the
former case as well:
statement_control:<if else> ($condition, &true, &false?) #< if
$condition { ... } else { ... } >
Although this wouldn't cleanly handle an "if ... elsif ... elsif ...
else ..." statement.
--
Jonathan "Dataweaver" Lang
Please see http://svn.pugscode.org/pugs/src/perl6/Perl-6.0.0-STD.pm for
the current definitions of those syntactic constructs. The point of
doing grammars the way we're doing is to allow you to derive from this
grammar and override the rules as you see fit. Macros and user-defined
are just convenient ways to define bits of grammar without actually
adding or modifying any rules, at least not overtly.
Larry
s/user-defined/user-defined operators/
Larry