Re: S5: grammar compositions

2004-09-15 Thread chromatic
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

Re: [S3, S4, S5]: =~ becomes ~~

2004-09-15 Thread Luke Palmer
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

[S3, S4, S5]: =~ becomes ~~

2004-09-15 Thread Herbert Snorrason
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. -

Re: S5: array interpolation

2004-09-15 Thread Brent 'Dax' Royal-Gordon
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? (

S5: array interpolation

2004-09-15 Thread John Siracusa
> 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

Re: S5: grammar compositions

2004-09-15 Thread Larry Wall
Grammar roles? Larry

Re: S5: grammar compositions

2004-09-15 Thread Luke Palmer
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

S5: grammar compositions

2004-09-15 Thread Dave Whipp
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