On Wed, 2004-09-15 at 12:47, Larry Wall wrote:
> Grammar roles?
It seems sensible, having said "Here's a better method of type checking
and code re-use" and "Here's a generalization of pattern matching to
make it more like programming".
Not doing it would be like making closures that can't write
Herbert Snorrason writes:
> I know that, you know that ... but the synopses never actually say it.
> It's evident from context, but it's never said explicitly. I would
> *think* that should be in the "Operator renaming" section of S3, and
> presume this is an oversight?
Okay, it ought to be there
I know that, you know that ... but the synopses never actually say it.
It's evident from context, but it's never said explicitly. I would
*think* that should be in the "Operator renaming" section of S3, and
presume this is an oversight?
--
Schwäche zeigen heißt verlieren;
härte heißt regieren.
-
John Siracusa <[EMAIL PROTECTED]> wrote:
> > An interpolated array:
> >
> > / @cmds /
> >
> > is matched as if it were an alternation of its elements:
> >
> > / [ @cmds[0] | @cmds[1] | @cmds[2] | ... ] /
> >
> > As with a scalar variable, each one is matched as a literal.
>
> Like this? (
> An interpolated array:
>
> / @cmds /
>
> is matched as if it were an alternation of its elements:
>
> / [ @cmds[0] | @cmds[1] | @cmds[2] | ... ] /
>
> As with a scalar variable, each one is matched as a literal.
Like this? (Assuming single quotes don't interpolate @foo[...])
@a
Grammar roles?
Larry
Dave Whipp writes:
> grammar Letter {
> rule greet :w { $to:=(\S+?) , $$}
> rule greet_word { [Hi|Hey|Yo] }
> ...
> }
>
> grammar FormalLetter is Letter {
> rule greet_word{ Dear }
> ...
> }
>
> Will the :w do the right thing here?
In the new S5 revision, :w changed from sta
I was rereading S5, and the example of grammatical inheritance caught my
eye:
grammar Letter {
rule greet :w { [Hi|Hey|Yo] $to:=(\S+?) , $$}
...
}
grammar FormalLetter is Letter {
rule greet :w { Dear $to:=(\S+?) , $$}
...
}
My first reaction was that we need a bit more factoring