Re: $^a, $^b, and friends

2002-04-06 Thread Rafael Garcia-Suarez
Larry Wall wrote in perl.perl6.language : Such a grammar switching routine could operate either over a lexical scope or over the rest of the file. The only restriction is that one module not clobber the grammar of a different module. Basically, we're trying to make the opposite mistake

Re: $^a, $^b, and friends

2002-04-06 Thread Dan Sugalski
At 2:34 PM -0700 4/5/02, Luke Palmer wrote: You can do anything you like if you mess with the parser. Changing the rules for recognizing an identifier would be trivial. Does this refer to messing with the parser... compile time (that is, when Perl compiles, not when Perl is compiled)? Or

Re: $^a, $^b, and friends

2002-04-06 Thread Larry Wall
Rafael Garcia-Suarez writes: : Larry Wall wrote in perl.perl6.language : : : Such a grammar switching routine could operate either over a lexical : scope or over the rest of the file. The only restriction is that : one module not clobber the grammar of a different module. : : Basically,

Re: $^a, $^b, and friends

2002-04-06 Thread Piers Cawley
Larry Wall [EMAIL PROTECTED] writes: Rafael Garcia-Suarez writes: : Larry Wall wrote in perl.perl6.language : : : Such a grammar switching routine could operate either over a lexical : scope or over the rest of the file. The only restriction is that : one module not clobber the

Re: $^a, $^b, and friends

2002-04-06 Thread Larry Wall
Piers Cawley writes: : In a use.perl post not far away I sketched out something like the following: : : module foo is Mixin { : : sub category($category, block) { : block.abstract_syntax_tree.walk_with - $node { : when AST::Method { :

Re: $^a, $^b, and friends

2002-04-06 Thread Rafael Garcia-Suarez
Dan Sugalski wrote in perl.perl6.language : Don't forget, we already change parsing rules at compile time. Perl's got three (maybe four) different sets of rules as it is: *) Normal perl *) Regexes *) Double-quoted strings *) Single-quoted strings Adding another, or

Re: $^a, $^b, and friends

2002-04-06 Thread Rafael Garcia-Suarez
Larry Wall wrote : It's not clear that the lexer is a separate entity any more. Lexers were originally invented as a way of abstracting out part of the grammar so that it could be done in a separate pass, and to simplify the grammar for the poor overworked parser. Indeed. Another benefit

Re: $^a, $^b, and friends

2002-04-05 Thread Luke Palmer
Just some thoughts in case you assumed people would only us Perl for good. $_='opcpez/xsjuft/qzax/,kvtu/gps/hppe!' ;szaxfsmyb-z,/!a-y !-print;

Re: $^a, $^b, and friends

2002-04-05 Thread Dan Sugalski
At 4:22 PM -0800 4/4/02, Larry Wall wrote: Dan Sugalski writes: : At 3:11 PM -0800 4/3/02, Larry Wall wrote: : Piers Cawley writes: : : Jonathan Scott Duff [EMAIL PROTECTED] writes: : : : : On Wed, Apr 03, 2002 at 11:27:10AM -0800, Larry Wall wrote: : : They are assumed to be declared in

Re: $^a, $^b, and friends

2002-04-05 Thread Larry Wall
Dan Sugalski writes: : Strict, but doesn't really matter. Nobody sane will use anything other : than $^a and $^b. : : Well Are we allowing non-latin characters in identifiers? There : may be potential interesting ramifications with those. Kanji : specifically, though I don't have details

Re: $^a, $^b, and friends

2002-04-05 Thread Piers Cawley
Larry Wall [EMAIL PROTECTED] writes: Dan Sugalski writes: : Strict, but doesn't really matter. Nobody sane will use anything other : than $^a and $^b. : : Well Are we allowing non-latin characters in identifiers? There : may be potential interesting ramifications with those. Kanji

Re: $^a, $^b, and friends

2002-04-05 Thread Larry Wall
Piers Cawley writes: : Larry Wall [EMAIL PROTECTED] writes: : : Dan Sugalski writes: : : Strict, but doesn't really matter. Nobody sane will use anything other : : than $^a and $^b. : : : : Well Are we allowing non-latin characters in identifiers? There : : may be potential

Re: $^a, $^b, and friends

2002-04-05 Thread Piers Cawley
Larry Wall [EMAIL PROTECTED] writes: Piers Cawley writes: : Larry Wall [EMAIL PROTECTED] writes: : : Dan Sugalski writes: : : Strict, but doesn't really matter. Nobody sane will use anything other : : than $^a and $^b. : : : : Well Are we allowing non-latin characters in

Re: $^a, $^b, and friends

2002-04-05 Thread Damian Conway
Larry wrote: Yes, you can use anything with the letter or number property in identifiers, plus you can use ideographs. As it happens, the Kanji for one and two come in the right order, but don't try to extend that to three. Of course, exactly the same thing is true for the English

Re: $^a, $^b, and friends

2002-04-05 Thread Luke Palmer
You can do anything you like if you mess with the parser. Changing the rules for recognizing an identifier would be trivial. Does this refer to messing with the parser... compile time (that is, when Perl compiles, not when Perl is compiled)? Or are you actually talking about screwing with

Re: $^a, $^b, and friends

2002-04-05 Thread Larry Wall
Luke Palmer writes: : You can do anything you like if you mess with the parser. Changing : the rules for recognizing an identifier would be trivial. : : Does this refer to messing with the parser... compile time (that is, when : Perl compiles, not when Perl is compiled)? Or are you actually

Re: $^a, $^b, and friends

2002-04-04 Thread Dan Sugalski
At 3:11 PM -0800 4/3/02, Larry Wall wrote: Piers Cawley writes: : Jonathan Scott Duff [EMAIL PROTECTED] writes: : : On Wed, Apr 03, 2002 at 11:27:10AM -0800, Larry Wall wrote: : They are assumed to be declared in alphabetical order. Whoa! you say, : that could get confusing. It surely can.

Re: $^a, $^b, and friends

2002-04-04 Thread Larry Wall
Dan Sugalski writes: : At 3:11 PM -0800 4/3/02, Larry Wall wrote: : Piers Cawley writes: : : Jonathan Scott Duff [EMAIL PROTECTED] writes: : : : : On Wed, Apr 03, 2002 at 11:27:10AM -0800, Larry Wall wrote: : : They are assumed to be declared in alphabetical order. Whoa! you say, : : that

Re: $^a, $^b, and friends

2002-04-03 Thread Jonathan Scott Duff
On Wed, Apr 03, 2002 at 12:41:13PM -0500, John Siracusa wrote: Reading EX4 and seeing those place-holder variables made me wonder what happens when someone (probably Damian ;) wants to use more than 26 of them. Do the place-holder names scale up as if they're being automagically incremented?

Re: $^a, $^b, and friends

2002-04-03 Thread Jonathan Scott Duff
On Wed, Apr 03, 2002 at 12:41:13PM -0500, John Siracusa wrote: Reading EX4 and seeing those place-holder variables made me wonder what happens when someone (probably Damian ;) wants to use more than 26 of them. Do the place-holder names scale up as if they're being automagically incremented?

Re: $^a, $^b, and friends

2002-04-03 Thread Luke Palmer
On Wed, Apr 03, 2002 at 12:41:13PM -0500, John Siracusa wrote: Reading EX4 and seeing those place-holder variables made me wonder what Where is EX4? It's not at perl.org... so... ??

Re: $^a, $^b, and friends

2002-04-03 Thread Jonathan Scott Duff
On Wed, Apr 03, 2002 at 12:19:13PM -0700, Luke Palmer wrote: On Wed, Apr 03, 2002 at 12:41:13PM -0500, John Siracusa wrote: Reading EX4 and seeing those place-holder variables made me wonder what Where is EX4? It's not at perl.org... so... ?? Well, it's linked to from use.perl.org and

Re: $^a, $^b, and friends

2002-04-03 Thread Jonathan Scott Duff
On Wed, Apr 03, 2002 at 11:27:10AM -0800, Larry Wall wrote: They are assumed to be declared in alphabetical order. Whoa! you say, that could get confusing. It surely can. But if you're doing something complicated enough that alphabetical order would be confusing, don't use this shorthand.

Re: $^a, $^b, and friends

2002-04-03 Thread Larry Wall
Piers Cawley writes: : Jonathan Scott Duff [EMAIL PROTECTED] writes: : : On Wed, Apr 03, 2002 at 11:27:10AM -0800, Larry Wall wrote: : They are assumed to be declared in alphabetical order. Whoa! you say, : that could get confusing. It surely can. But if you're doing : something

Re: $^a, $^b, and friends

2002-04-03 Thread Damian Conway
Jonathan Scott Duff wrote: On Wed, Apr 03, 2002 at 12:41:13PM -0500, John Siracusa wrote: Reading EX4 and seeing those place-holder variables made me wonder what happens when someone (probably Damian ;) wants to use more than 26 of them. Do the place-holder names scale up as if they're

Re: $^a, $^b, and friends

2002-04-03 Thread Damian Conway
Piers Cawley wrote: Jonathan Scott Duff [EMAIL PROTECTED] writes: On Wed, Apr 03, 2002 at 11:27:10AM -0800, Larry Wall wrote: They are assumed to be declared in alphabetical order. Whoa! you say, that could get confusing. It surely can. But if you're doing something complicated