Luke Palmer wrote:
> I know you heavyweights are working out how to specify the return value
> from a rule or a capture.
Larry says if the hypothetical variable $0 is assigned to, that assigned
value becomes the (only) return value of the rule. It's an elegant solution
to the problem.
> > Now
Dan Sugalski:
# At 2:00 PM -0500 6/15/02, Jonathan Scott Duff wrote:
# >With all this new syntax, I can't wait until there's a perl6
# I can try
# >it out against rather than just perl6-language.
#
# Well, then, time to pitch in! :)
#
# Seriously, Parrot's at a state where a not inconsiderable
> Now, could you just do
>
> rule leftop ($leftop, $op) {
> <$leftop> [$op <$leftop>]*
> }
>
> rule leftop ($leftop, $op, $rightop) {
> <$leftop> [$op <$rightop>]*
> }
I should hope that rules can take multiple arguments. Here's something
that made me wonde
On Sat, Jun 15, 2002 at 04:50:20PM +0200, Marcel Gruenauer wrote:
> On Sat, Jun 15, 2002 at 09:08:31AM -0500, Jonathan Scott Duff wrote:
>
> > At the very least you should be able to do this:
> >
> > rule leftop($leftop,$op;$rightop) {
> > $other := { (defined $rightop) ?? $rightop :
On Sat, Jun 15, 2002 at 09:08:31AM -0500, Jonathan Scott Duff wrote:
> At the very least you should be able to do this:
>
> rule leftop($leftop,$op;$rightop) {
> $other := { (defined $rightop) ?? $rightop :: $leftop }
> <$leftop> [$op <$other>]*
> }
Or maybe
On Sat, Jun 15, 2002 at 03:19:34PM +0200, Marcel Gruenauer wrote:
> Now, could you just do
>
> rule leftop ($leftop, $op) {
> <$leftop> [$op <$leftop>]*
> }
>
> rule leftop ($leftop, $op, $rightop) {
> <$leftop> [$op <$rightop>]*
> }
At the very least you sho
Now that it seems that Parse::RecDescent and, ultimately,
Parse::FastDescent, will be subsumed into the Perl 6 regex/grammar system,
I've been thinking about how to implement P::RD directives such as
, and ; or features such as tracing.
I've really only thought about , but am not sure if those t