Page 13 tells use about Clet decls. But it also says that the topic must
be a regex. Whilst it explains that this isn't really a problem, I'm not
sure that it justifies it. So perhaps someone can clarify why this
(hypothetical) code in not a reasonable generalization:
Because Perl code
You have Ino idea how often that would have been useful. It's a great
exception safety mechanism... like C++'s resource aquisition is
initialization thingy, but without having to write a class for every
variable.
Have you already forgotten KEEP and UNDO (that we introduced in A4/E4):
David Whipp wrote:
First, a slight clarification: if I say:
m:w/ %foo := [ (\w+) = (\w+) [ , (\w+) ]* ] /
does this give me a hash of arrays? (i.e. is the rhs of a hash processed as
a scalar context)
That's an error. The grouping bound to a hypothetical hash has to have
either
Rich Morin wrote:
I'd like to be able to use REs to generate lists of strings. For
example, it might be nice to create a loop such as:
for $i (sort(p:p5|[0-9A-F]{2}|)) { # p operator for production?
and have $i walk from '00' through 'FF'. Or whatever.
You mean:
$ch =
For the record, you will hear no disagreement from me. I recognize that
this is a HARD problem. Nonetheless, I think it's an important one, and
solving it (even imperfectly, by only supporting well-defined platforms)
would be a major coup.
--Josh
At 23:31 on 06/05/2002 BST, Nicholas Clark
At 6:10 PM +1000 6/6/02, Damian Conway wrote:
Rich sez:
But make Damian use es, rather than egs for the
eigenstate (is :-) operator.
s/is/it/, above (blush). That is, the superposition _could_ be in
any of several states, but the eigenstate tells us what it really is.
No,
On 6/6/02 2:43 AM, Damian Conway wrote:
rule wordlist { (\w+) [ , (\w+) ]* }
No semicolon at the end of that line? I've already forgotten the new
rules for that type of thing... :)
-John
On Thu, Jun 06, 2002 at 10:38:39AM -0400, John Siracusa wrote:
On 6/6/02 2:43 AM, Damian Conway wrote:
rule wordlist { (\w+) [ , (\w+) ]* }
No semicolon at the end of that line? I've already forgotten the new
rules for that type of thing... :)
No, because rules are basically methods,
#Preliminary Perl6::Regex
# This does not have any actions, but otherwise I think is correct.
# Let me know if it's right or not.
use 6;
grammar Perl6::Regex {
rule metachar { [{(\[\])}:*+?\\|]}
rule ws { [[\h\v]|\#\N*]*}
rule atom
At 11:31 AM 06-06-2002 -0700, Brent Dax wrote:
#Preliminary Perl6::Regex
# This does not have any actions, but otherwise I think is correct.
# Let me know if it's right or not.
I'm not a regex guru, but...
use 6;
grammar Perl6::Regex {
rule metachar { [{(\[\])}:*+?\\|]
On Thu, 6 Jun 2002, Buddha Buck wrote:
At 11:31 AM 06-06-2002 -0700, Brent Dax wrote:
I had gotten the impression that a literal string separated by whitespace
was an atom, so
rule foofoobar { foo 1,2 bar }
would match 'foobar' or 'foofoobar'. If so, I think !metachar needs to
be
Whew! I've carefully (well, I tried to be careful :-) read through
Apocalypse 5 twice now and it still makes my head hurt (but in a good
way). What follows is some notes that I jotted down and am tired of
looking at. Please correct any misconceptions and feel free to add
where I've omitted.
Allison Randal [EMAIL PROTECTED] writes:
On Thu, Jun 06, 2002 at 10:38:39AM -0400, John Siracusa wrote:
On 6/6/02 2:43 AM, Damian Conway wrote:
rule wordlist { (\w+) [ , (\w+) ]* }
No semicolon at the end of that line? I've already forgotten the new
rules for that type of thing... :)
On Thu, Jun 06, 2002 at 08:21:25PM +0100, Piers Cawley wrote:
Allison Randal [EMAIL PROTECTED] writes:
No, because rules are basically methods, just like grammars are
basically classes. You would only need a semi-colon if you were defining
an anonymous Crule (similar to an anonymous
Larry discounted RFC261 in A5, but I think there's some good in it. The
biggest problem is not that it's hard to do in Perl6, but that 80-90% of
it is ALREADY done in Perl5! Once you peel away that portion of the RFC,
you get to Perl5's limitations and what Perl6 might do to support these
Brent Dax wrote:
grammar Perl6::Regex {
rule metachar { [{(\[\])}:*+?\\|]}
rule ws { [[\h\v]|\#\N*]*}
Or just:
rule ws { [\s|\#\N*]* }
rule atom { ws (!metachar | \\ . | group) ws }
On Fri, 7 Jun 2002, Damian Conway wrote:
Brent Dax wrote:
grammar Perl6::Regex {
rule metachar { [{(\[\])}:*+?\\|]}
rule ws { [[\h\v]|\#\N*]*}
Or just:
rule ws { [\s|\#\N*]* }
Just as
Well, A5 definitely has my head spinning. The new features seem amazingly
powerful...it almost feels like we're going to have two equally powerful,
equally complex languages living side-by-side: one of them is called
Perl and the other one is called Regexes. Although they may talk to
one
18 matches
Mail list logo