On Thu, May 11, 2006 at 01:55:37PM -0700, Allison Randal wrote:
: Oh, and since we're calling them "regexes", I suggest calling them
: "regular expressions" too, since both "regex(p)" and "regular
: expression" have taken on the popular meaning of "pattern matching". If
: we're going to be anti-
Oh, and since we're calling them "regexes", I suggest calling them
"regular expressions" too, since both "regex(p)" and "regular
expression" have taken on the popular meaning of "pattern matching". If
we're going to be anti-pedantic, let's be consistently anti-pedantic. :)
Allison
On Thu, May 11, 2006 at 12:19:21PM -0700, Allison Randal wrote:
> Jonathan Scott Duff wrote:
> >On Wed, May 10, 2006 at 05:58:57PM -0700, Allison Randal wrote:
> >>rule:
> >>- Has :ratchet and :skip turned on by default
> >>
> >>- May only be used inside a grammar
> >
> >Should that be
> >
> >- Mu
Patrick R. Michaud wrote:
Whitespace in regexes and rules is metasyntactic, in that it is
not matched literally. Effectively what the :w (or :words or
:skip) option does it to change the metasyntactic meaning of
any whitespace found in the regex. Or, another way of thinking
of it -- as S05
Jonathan Scott Duff wrote:
On Wed, May 10, 2006 at 05:58:57PM -0700, Allison Randal wrote:
rule:
- Has :ratchet and :skip turned on by default
- May only be used inside a grammar
Should that be
- Must be declared as part of a grammar or role
???
It is:
- The 'rule' keyword may only be
Patrick R. Michaud wrote:
On Thu, May 11, 2006 at 08:57:53PM +0800, Audrey Tang wrote:
Patrick R. Michaud wrote:
- is a single character of obligatory whitespace
Hmm, it's literal ' ' (that is, \x20), not "whitespace" in general,
right? For "obligatory whitespace" we have \s.
Oops, you're
Damian Conway wrote:
skip:
- We keep :words as shorthand for :skip(//)
- And :skip is shorthand for :skip(//)
...where defaults to , but is distinct from it (i.e. it can
be redefined independently).
It also has the benefit that developers redefining can call
as one of the alternates i
Ruud H.G. van Tol wrote:
> Are all or some of the following equivalent to ?
>
> U+00A0 No-Break Space
> U+202F Narow No-Break Space
> U+FEFF Zero Width No-Break Space
> U+2060 Word Joiner
No. A05 makes it explicit is just \x20, and S05 also says that it
matches one "space char", wh
Audrey Tang wrote:
> Patrick R. Michaud wrote:
>> - is a single character of obligatory whitespace
>
> Hmm, it's literal ' ' (that is, \x20), not "whitespace" in
> general, right? For "obligatory whitespace" we have \s.
Are all or some of the following equivalent to ?
U+00A0 No-Break Space
> >Including :skip(//). Yes, agreed, it's a huge
> >improvement. I'd be more comfortable if the default rule to use for
> >skipping was named instead of . (On IRC was also
> >proposed, but the connection between :skip and is more
> >immediately obvious.)
> Yes, I like too. I too keep mistakel
On Thu, May 11, 2006 at 08:57:53PM +0800, Audrey Tang wrote:
> Patrick R. Michaud wrote:
> >> - is a single character of obligatory whitespace
>
> Hmm, it's literal ' ' (that is, \x20), not "whitespace" in general,
> right? For "obligatory whitespace" we have \s.
Oops, you're correct, I forgot
On Wed, May 10, 2006 at 05:58:57PM -0700, Allison Randal wrote:
> rule:
> - Has :ratchet and :skip turned on by default
>
> - May only be used inside a grammar
Should that be
- Must be declared as part of a grammar or role
???
The verb "used" doesn't make much sense to me there. I use a rule
Patrick R. Michaud wrote:
>> - is a single character of obligatory whitespace
Hmm, it's literal ' ' (that is, \x20), not "whitespace" in general,
right? For "obligatory whitespace" we have \s.
> This one has bugged me since the day I first saw it implemented
> in PGE. We _already_ have \s, , a
[EMAIL PROTECTED] schreef:
> James Mastros:
>> Can I suggest we keep match meaning thing you get when you run a
>> thingy against a string, and make "matcher" be the thingy that gets
>> run?
>
> Speaking of the word "match", what I'd really like is to keep it
> meaning stuff that matches. Unfortu
On 2006-May-10 at 1:38, James Mastros wrote:
>Can I suggest we keep match meaning thing you get when you run a thingy
>against a string, and make "matcher" be the thingy that gets run?
Speaking of the word "match", what I'd really like is to keep it meaning stuff
that matches. Unfortunately it a
Allison admirably summarized:
rule:
regex:
token:
skip:
- We keep :words as shorthand for :skip(//)
- And :skip is shorthand for :skip(//)
...where defaults to , but is distinct from it (i.e. it can be
redefined independently).
- To change skipping behavior: a) override in your gra
On Wed, May 10, 2006 at 05:58:57PM -0700, Allison Randal wrote:
> To summarize a phone call today, the more intelligent defaults we add to
> differently named rule keywords the more comfortable I am with having
> different names. So, here's what we have so far (posted both as an FYI
> and to con
To summarize a phone call today, the more intelligent defaults we add to
differently named rule keywords the more comfortable I am with having
different names. So, here's what we have so far (posted both as an FYI
and to confirm that we have the coherent solution I think we have):
rule:
- Has
> "AR" == Allison Randal <[EMAIL PROTECTED]> writes:
AR> Including :skip(//). Yes, agreed, it's a huge
AR> improvement. I'd be more comfortable if the default rule to use
AR> for skipping was named instead of . (On IRC was
AR> also proposed, but the connection between :skip and is
Larry wrote:
So anyway, I think "token" is sufficiently close to what we want
it to mean that we can force it to mean that, and it's sufficiently
orphaned that few people are going to complain about impressing it
into forced labor.
I'm perfectly fine with that. To quote myself out of context:
On Wed, May 10, 2006 at 11:25:26AM +1000, Damian Conway wrote:
: True. "Token" is the wrong word for another reason: a token is a
: segments component of the input stream, *not* a rule for matching
: segmented components of the input stream. The correct term for that is
: "terminal". So a suitable
On Wed, May 10, 2006 at 06:07:54PM +1000, Damian Conway wrote:
>
> >Including :skip(//). Yes, agreed, it's a huge
> >improvement. I'd be more comfortable if the default rule to
> >use for skipping was named instead of .
> >(On IRC was also proposed, but the connection between
> >:skip and is
Damian Conway schreef:
> grammar Perl6 is skip(/[+ | \# | \# \N]+/) {
> ...
> }
I think that first "+" is superfluous.
Doubly so if already stands for the run of all consecutive
word-separators.
--
Groet, Ruud
Allison Randal schreef:
> Damian:
>> "Match" is a better word for what comes back from
>> a regex match (what we currently refer to as a Capture, which is
>> okay too).
>
> I agree there. I still prefer 'rule'.
Maybe matex (mat-ex) for "matching expression" and, within that,
capex/captex (cap-ex/
On Wed, 10 May 2006, Damian Conway wrote:
> Allison wrote:
>
> I've never met anyone who *voluntarily* added
> the 'p'. ;-)
You've spent too much time in the U.S. ;)
> > and the fact that everyone knows 'regex(p)'
> > means "regular expression" no matter how may times we say it doesn't.
>
> Su
Allison wrote:
I've never met anyone who *voluntarily* added
the 'p'. ;-)
You've spent too much time in the U.S. ;)
And Australia. I don't know where the silent 'p' comes from but it sure ain't
the New World.
Picking names that mean what they say is important in Perl. It's why we have
'
Damian Conway skribis 2006-05-10 18:07 (+1000):
> > More than that, the current 'rule' and 'regex' can both be used inside
> > and outside a grammar. If we were to take the 'sub'/'method' pattern, then
> > 'rule' should never be allowed outside a grammar,
> I entirely agree.
I don't. While disallo
Allison Randal wrote:
> More importantly, whitespace skipping isn't a very significant option in
> grammars in general, so creating two keywords that distinguish between
> skipping and no skipping is linguistically infelicitous. It's like
> creating two different words for "shirts with horizontal s
Allison wrote:
I'm comfortable with the semantic distinction between 'rule' as "thingy
inside a grammar" and 'regex' as "thingy outside a grammar". But, I
think we can find a better name than 'regex'. The problem is both the
'regex' vs. 'regexp' battle,
Is that really an issue? I've never met
On Tue, May 09, 2006 at 04:51:17PM -0700, Allison Randal wrote:
> I'm comfortable with the semantic distinction between 'rule' as "thingy
> inside a grammar" and 'regex' as "thingy outside a grammar". But, I
> think we can find a better name than 'regex'.
[...]
> Maybe 'match' is a better keywo
On Apr 20, 2006, at 1:32 PM, Damian Conway wrote:
KeywordImplicit adverbsBehaviour
regex (none) Ignores whitespace, backtracks
token :ratchetIgnores whitespace, no backtracking
rule :ratchet :words Skips whitespace, no back
31 matches
Mail list logo