t/compilers/pge/p6regex/01-regex.t test 118 needs ICU?

2006-07-23 Thread Bob Rogers
   After building Parrot without ICU, 01-regex.t test 118 fails as
follows:

t/compilers/pge/p6regex/01-regex.
# Failed test (t/compilers/pge/p6regex/01-regex.t at line 59)
#  got: 'no ICU lib loaded
# current instr.: 'parrot;PGE::Grammar;_regex_corou' pc 118 (EVAL_1:51)
# called from Sub 'parrot;PGE::Grammar;_regex' pc 20 (EVAL_1:8)
# called from Sub '_PGE_Test' pc 34 
(/usr/src/parrot/t/compilers/pge/p6regex/01-regex_118.pir:18)
# '
# expected: 'matched'
# './parrot  --gc-debug  
/usr/src/parrot/t/compilers/pge/p6regex/01-regex_118.pir' failed with exit 
code 1
# Looks like you failed 1 test of 494.

The attached patch seems to take care of this.  Is this a reasonable way
to do it?

-- Bob Rogers
   http://rgrjr.dyndns.org/

Index: t/compilers/pge/p6regex/01-regex.t
===
--- t/compilers/pge/p6regex/01-regex.t  (revision 13443)
+++ t/compilers/pge/p6regex/01-regex.t  (working copy)
@@ -7,6 +7,7 @@
 use Test::More;
 use Parrot::Test tests = 494;
 use Parrot::Test::PGE;
+use Parrot::Config;
 
 =head1 NAME
 
@@ -54,7 +55,16 @@
 $target =~ s/\\x(..)/chr(hex($1))/eg;
 
 my @todo = ();
-if ($description =~ m{TODO:}) { @todo = ('todo' = $description); }
+if ($description =~ m{TODO:}) {
+   @todo = ('todo' = $description);
+}
+elsif ($description =~ m{ICU:} 
+   ! $PConfig{has_icu}) {
+  SKIP: {
+ skip(no $description, 1);
+   }
+   next;
+}
 
 if ($result =~ m{^/(.*)/$}) {
 p6rule_like($target, $pattern, qr/$1/, $description, @todo);
Index: t/compilers/pge/p6regex/regex_tests
===
--- t/compilers/pge/p6regex/regex_tests (revision 13443)
+++ t/compilers/pge/p6regex/regex_tests (working copy)
@@ -118,7 +118,7 @@
 ^ \v+ $\u000a\u000b\u000c\u000d\u0085  y   0-255 
vertical whitespace (\v)
 ^ \h+ $\u000a\u000b\u000c\u000d\u0085  n   0-255 
horizontal whitespace (\h)
 ^ \v+ $\u0009\u0020\u00a0  n   0-255 vertical 
whitespace (\v)
-^ \s+ $
\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2008\u2009\u200a\u202f\u205f\u3000\u000a\u000b\u000c\u000d\u0085
y   unicode whitespace (\s)
+^ \s+ $
\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2008\u2009\u200a\u202f\u205f\u3000\u000a\u000b\u000c\u000d\u0085
y   ICU: unicode whitespace (\s)
 ^ \h+ $
\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2008\u2009\u200a\u202f\u205f\u3000
  y   unicode whitespace (\h)
 ^ \v+ $\u000a\u000b\u000c\u000d\u0085  y   unicode 
whitespace (\v)
 ^ \h+ $\u000a\u000b\u000c\u000d\u0085  n   unicode 
whitespace (\h)


Re: PDD 23 Exceptions - ready for implementation

2006-07-23 Thread Bob Rogers
   From: Allison Randal [EMAIL PROTECTED]
   Date: Sat, 22 Jul 2006 17:34:45 -0700

   Bob Rogers wrote:

Two weeks ago I started writing something I had been thinking about for
a year now, tentatively called Continuations, Coroutines, And All That:
An informal introduction to creating advanced control structures in
Parrot.  It is still mostly an outline, though -- it's hard to write a
tutorial about features for which the spec is in flux.  ;-}

   Aye, there's a balance between design moving too quickly (so the system 
   is perceived as unstable) and design moving too slowly (so the system 
   is perceived as dead). Somewhere in the middle is the sweet spot.

Reminds me of the following .sig quote seen on the cmucl-imp list:

 # There is this special biologist word we use for 'stable'.
 # It is 'dead'. -- Jack Cohen

Hooray for instability!

   For a little while here design is going to be moving a little faster,
   to fill in a few gaps and clear up a few lingering questions. Then
   it'll settle back out to a slow, steady pace.

No problem.

   The best thing you can do is just write the tutorial, or at least
   write up notes on what you plan to include.  Reading through it will
   likely help us see pieces that don't work as well as they should, and
   then we can update the spec and the tutorial together.

   Allison

Indeed, it's been driving some of the questions I've been asking lately.

   And, just so folks can see where I'm trying to go, here's the current
version:

http://rgrjr.dyndns.org/perl/continuations.html

I intend to populate it with working examples, all of which should
eventually go into examples/.

-- Bob


Another patch for S02

2006-07-23 Thread Agent Zhang

Hi, all~

Another patch for S02 is given below. (And more patches for S03, S04,
... are coming soon.)

Reading Synopses is fun, but finding typos is not so enjoyable. :P

Cheers,
Agent


Index: D:/projects/Perl6-Syn/S02.pod

===

--- D:/projects/Perl6-Syn/S02.pod   (revision 10373)

+++ D:/projects/Perl6-Syn/S02.pod   (working copy)

@@ -523,7 +523,7 @@

CStr in question can provide an abstract CBuf interface somehow.
Coercion to CBuf should generally invalidate the CStr interface.
As a generic type CBuf may be instantiated as (or bound to) any
-of Cbuf8, Cbuf16, or Cbuf32 (or to any type that provide the
+of Cbuf8, Cbuf16, or Cbuf32 (or to any type that provides the
appropriate CBuf interface), but when used to create a buffer CBuf
defaults to Cbuf8.

@@ -1033,7 +1033,7 @@

Any lexical declared with the Cis context trait is by default
 considered readonly outside the current lexical scope.  You may add
Cis rw to allow called routines to modify your value.  C$_,
-C$! and C$/ are Crw by default.  In any event, your lexical
+C$!, and C$/ are Crw by default.  In any event, your lexical
scope can always access the variable as if it were an ordinary Cmy;
the restriction on writing applies only to called subroutines.

@@ -1759,7 +1759,7 @@

 (You are still free to predeclare subroutines explicitly, of course.)
 The postdeclaration may be in any lexical or package scope that
could have made the declaration visible to the provisional call had the
-declaration occurred before rather than after than the provisional
+declaration occurred before rather than after the provisional
call.

 This fixup is done only for provisional calls.  If there
@@ -2167,7 +2167,7 @@

infix:+   $x + $y
postfix:++$x++
circumfix:[ ] [ @x ]
-postcircumfix:[ ] $x[$y] or $x .[$y]
+postcircumfix:[ ] $x[$y] or $x.[$y]
regex_metachar:,  /,/
regex_backslash:w /\w/ and /\W/
regex_assertion:* /*stuff/


Patch for S03

2006-07-23 Thread Agent Zhang

Hello, everyone~

Here's my patch for S03.

Cheers,
Agent


Index: D:/projects/Perl6-Syn/S03.pod

===

--- D:/projects/Perl6-Syn/S03.pod   (revision 10373)

+++ D:/projects/Perl6-Syn/S03.pod   (working copy)

@@ -170,7 +170,7 @@

SIMPLE OP
SIMPLE OP SIMPLE

-where COP is includes any standard scalar operators in the five
+where COP includes any standard scalar operators in the five
precedence levels autoincrement, exponentiation, symbolic unary,
multiplicative, and additive; but these are limited to standard
operators that are known to return numbers, strings, or booleans.
@@ -383,7 +383,7 @@

Two values are never equivalent unless they are of exactly the same type.  By
contrast, Ceq always coerces to string, while C== always coerces to
numeric.  In fact, C$a eq $b really means C~$a === ~$b and C$a == $b
-means C+$a === +$b.
+means C+$a === +$b.

Note also that, while string hashes use Ceq semantics by default,
object hashes use C=== semantics.
@@ -442,7 +442,7 @@

really wanted to assign a stringified value.)  A negated smart match is
spelled C!~~.

-=item * Unary C. calls its single argument (which must a postfix operator)
+=item * Unary C. calls its single argument (which must be a
postfix operator)
on C$_.  (It's not really a unary operator, so we put it in quotes.)

=item * The C.. range operator has variants with C^ on either
@@ -475,7 +475,7 @@

supports the COrdered role.

0..*# 0 .. +Inf
-'a'..* # 'a' .. 'z...
+'a'..* # 'a' .. 'z...'
*..0# -Inf .. 0
*..*# -Inf .. +Inf, really Ordered
1.2.3..*# Any version higher than 1.2.3.
@@ -569,7 +569,7 @@

Any .method   method truth*match if $_.method
Any Regex pattern matchmatch if $_ ~~ /$x/
Any subst substitution match*  match if $_ ~~ subst
-Any boolean   simple expression truth* match if true given $_
+Any boolean   simple expression truth* match if $x given $_
Any undef undefinedmatch unless defined $_
Any Whatever  default  match anything
Any Any   run-time dispatchmatch if infix:~~($_, $x)
@@ -807,7 +807,7 @@

my @a = (5,6);
[*] @a;   # 5 * 6 = 30

-As with the all metaoperators, space is not allowed inside.  The whole
+As with all other metaoperators, space is not allowed inside.  The whole
thing parses as a single token.

A reduction operator has the same precedence as a list operator.  In fact,
@@ -894,7 +894,7 @@


[[;] 1,2,3]   # equivalent to [1;2;3]

-Builtin reduce operators return the following identity operations:
+Builtin reduce operators return the following identity values:

[**]()  # 1 (arguably nonsensical)
[*]()   # 1
@@ -1070,7 +1070,7 @@


=head1 Binding

-A new form of assignment is present in Perl 6, called binding, used in
+A new form of assignment is present in Perl 6, called binding, used in
place of typeglob assignment.  It is performed with the C:= operator.
Instead of replacing the value in a container like normal assignment, it
replaces the container itself.  For instance:
@@ -1079,7 +1079,7 @@

my $y := $x;
$y = 'Perl Hacker';

-After this, both C$x and C$y contain the string Perl Hacker, since
+After this, both C$x and C$y contain the string Perl Hacker, since
they are really just two different names for the same variable.

There is another variant, spelled C::=, that does the same thing at
@@ -1184,7 +1184,7 @@


=head1 Argument List Interpolating

-Perl 5 forced interpolation of a functions argument list by use of
+Perl 5 forced interpolation of a function's argument list by use of
the C prefix.  That option is no longer available in Perl 6, so
instead the C[,] reduction operator serves as an
interpolator, by casting its operands to CCapture objects
@@ -1229,7 +1229,7 @@

@$bar = 1,2,3;
$bar[] = 1,2,3;

-Some lvalues can be rather lengthy, so that second form can help keep
+Some lvalues can be rather lengthy, so that the second form can help keep
the arrayness of the lvalue close to the assignment operator:

$foo.bar.baz.bletch.whatever.attr[] = 1,2,3;
@@ -1255,7 +1255,7 @@


To interpolate a function's return value, you must say:

-push [,] func()
+push [,] func();

Within the argument list of a C[,], function return values are
automatically exploded into their various parts, as if you'd said:
@@ -1346,7 +1346,7 @@

print Name: $name;   Zip code: $zip\n;
}

-Czip has an infix synonym, the Unicode operator C¥, and its the ASCII
+Czip has an infix synonym, the Unicode operator C¥, and its ASCII
equivalent CY.

To read arrays in parallel like Czip but just sequence the values


[perl #39913] [BUG] TGE - Can't use } in the transform definitions.

2006-07-23 Thread via RT
# New Ticket Created by  Will Coleda 
# Please include the string:  [perl #39913]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39913 


The TGE grammar doesn't deal with embedded }'s:

Valid grammars:

transform a (b) {
  # do nothing
}

transform a (b) {
  # do nothing {
}

Invalid:

transform a (b) {
  # do nothing}
}

transform a (b) {
  # do {nothing}
}

--
Will Coke Coleda
[EMAIL PROTECTED]




Flex Debugging

2006-07-23 Thread Vishal Soni

Hi,

Can some one help me with Flex debugging?

Previously if I recall correctly the adding %option debug in imcc.l use 
to spit out debug information to the console. This does not seem to work 
now.


Am I doing something wrong?

-Vishal


[perl #39914] [PATCH] Fix Path Quoting in file.t Test

2006-07-23 Thread via RT
# New Ticket Created by  Ron Blaschke 
# Please include the string:  [perl #39914]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39914 


Problem: Most of the t/pmc/file.t tests fail because of the Slashing
Madness; Win32 likes backslashed paths, which don't work well with
interpolated strings.

Failed Test  Stat Wstat Total Fail  Failed  List of Failed
---
t\pmc\file.t5  1280 75  71.43%  1-2 5-7
2 subtests skipped.
Failed 1/1 test scripts, 0.00% okay. 5/7 subtests failed, 28.57% okay.


Solution: Attached patch replaces all double quoted filenames with
single quoted, bringing the test down to a single failure (File exists
during rename).

t\pmc\fileok 1/7
t\pmc\fileNOK 6# Failed test (t\pmc\file.t at line 212)
#  got: 'File exists
# current instr.: 'main' pc 33 (D:\src\Parrot\trunk\t\pmc\file_6.pir:11)
# '
# expected: 'ok
# ok
# '
# '.\parrot.exe -b --gc-debug  D:\src\Parrot\trunk\t\pmc\file_6.pir'
failed with exit code 1
# Looks like you failed 1 test of 7.
t\pmc\filedubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 6
Failed 1/7 tests, 85.71% okay (less 2 skipped tests: 4 okay, 57.14%)
Failed Test  Stat Wstat Total Fail  Failed  List of Failed
---
t\pmc\file.t1   256 71  14.29%  6
2 subtests skipped.
Failed 1/1 test scripts, 0.00% okay. 1/7 subtests failed, 85.71% okay.


Changed Files:
t/pmc/file.t

Ron

Index: t/pmc/file.t
===
--- t/pmc/file.t(revision 13432)
+++ t/pmc/file.t(working copy)
@@ -49,7 +49,7 @@
 .sub main :main
 \$P1 = new .File
 
-\$S1 = $xpto
+\$S1 = '$xpto'
 \$I1 = \$P1.is_dir(\$S1)
 
 if \$I1 goto ok1
@@ -81,7 +81,7 @@
 .sub main :main
 \$P1 = new .File
 
-\$S1 = $xpto
+\$S1 = '$xpto'
 \$I1 = \$P1.is_file(\$S1)
 \$I1 = !\$I1
 
@@ -91,7 +91,7 @@
 ok1:
 print ok 1\\n
 
-\$S1 = $otpx
+\$S1 = '$otpx'
 \$I1 = \$P1.is_file(\$S1)
 
 if \$I1 goto ok2
@@ -119,7 +119,7 @@
 .sub main :main
 \$P1 = new .File
 
-\$S1 = $lotpx
+\$S1 = '$lotpx'
 \$I1 = \$P1.is_link(\$S1)
 
 if \$I1 goto ok1
@@ -127,7 +127,7 @@
 ok1:
 print ok 1\\n
 
-\$S1 = $otpx
+\$S1 = '$otpx'
 \$I1 = \$P1.is_link(\$S1)
 \$I1 = !\$I1
 if \$I1 goto ok2
@@ -154,7 +154,7 @@
 .sub main :main
 \$P1 = new .File
 
-\$S1 = $xptol
+\$S1 = '$xptol'
 \$I1 = \$P1.is_link(\$S1)
 
 if \$I1 goto ok1
@@ -162,7 +162,7 @@
 ok1:
 print ok 1\\n
 
-\$S1 = $xpto
+\$S1 = '$xpto'
 \$I1 = \$P1.is_link(\$S1)
 \$I1 = !\$I1
 if \$I1 goto ok2
@@ -181,8 +181,8 @@
 # test copy
 pir_output_is(CODE, OUT, Test copy for files);
 .sub main :main
-   \$S1 = $otpx
-   \$S2 = $otpxcopy
+   \$S1 = '$otpx'
+   \$S2 = '$otpxcopy'
 
\$P1 = new .File
\$P2 = new .OS
@@ -211,8 +211,8 @@
 # test rename
 pir_output_is(CODE, OUT, Test rename for files);
 .sub main :main
-   \$S1 = $otpx
-   \$S2 = $otpxcopy
+   \$S1 = '$otpx'
+   \$S2 = '$otpxcopy'
 
\$P1 = new .File
\$P2 = new .OS



[svn:perl6-synopsis] r10380 - doc/trunk/design/syn

2006-07-23 Thread audreyt
Author: audreyt
Date: Sun Jul 23 09:53:58 2006
New Revision: 10380

Modified:
   doc/trunk/design/syn/S02.pod

Log:
* S02: Typo fixes from Agent Zhang.

Modified: doc/trunk/design/syn/S02.pod
==
--- doc/trunk/design/syn/S02.pod(original)
+++ doc/trunk/design/syn/S02.podSun Jul 23 09:53:58 2006
@@ -523,7 +523,7 @@
 CStr in question can provide an abstract CBuf interface somehow.
 Coercion to CBuf should generally invalidate the CStr interface.
 As a generic type CBuf may be instantiated as (or bound to) any
-of Cbuf8, Cbuf16, or Cbuf32 (or to any type that provide the
+of Cbuf8, Cbuf16, or Cbuf32 (or to any type that provides the
 appropriate CBuf interface), but when used to create a buffer CBuf
 defaults to Cbuf8.
 
@@ -1033,7 +1033,7 @@
 Any lexical declared with the Cis context trait is by default
 considered readonly outside the current lexical scope.  You may add
 Cis rw to allow called routines to modify your value.  C$_,
-C$! and C$/ are Crw by default.  In any event, your lexical
+C$!, and C$/ are Crw by default.  In any event, your lexical
 scope can always access the variable as if it were an ordinary Cmy;
 the restriction on writing applies only to called subroutines.
 
@@ -1759,7 +1759,7 @@
 (You are still free to predeclare subroutines explicitly, of course.)
 The postdeclaration may be in any lexical or package scope that
 could have made the declaration visible to the provisional call had the
-declaration occurred before rather than after than the provisional
+declaration occurred before rather than after the provisional
 call.
 
 This fixup is done only for provisional calls.  If there
@@ -2167,7 +2167,7 @@
 infix:+   $x + $y
 postfix:++$x++
 circumfix:[ ] [ @x ]
-postcircumfix:[ ] $x[$y] or $x .[$y]
+postcircumfix:[ ] $x[$y] or $x.[$y]
 regex_metachar:,  /,/
 regex_backslash:w /\w/ and /\W/
 regex_assertion:* /*stuff/


[svn:perl6-synopsis] r10381 - doc/trunk/design/syn

2006-07-23 Thread audreyt
Author: audreyt
Date: Sun Jul 23 10:24:56 2006
New Revision: 10381

Modified:
   doc/trunk/design/syn/S03.pod

Log:
* S03: Apply Agent Zhang's patch as well as some more typo fixes.

Modified: doc/trunk/design/syn/S03.pod
==
--- doc/trunk/design/syn/S03.pod(original)
+++ doc/trunk/design/syn/S03.podSun Jul 23 10:24:56 2006
@@ -170,7 +170,7 @@
 SIMPLE OP
 SIMPLE OP SIMPLE
 
-where COP is includes any standard scalar operators in the five
+where COP includes any standard scalar operators in the five
 precedence levels autoincrement, exponentiation, symbolic unary,
 multiplicative, and additive; but these are limited to standard
 operators that are known to return numbers, strings, or booleans.
@@ -383,7 +383,7 @@
 Two values are never equivalent unless they are of exactly the same type.  By
 contrast, Ceq always coerces to string, while C== always coerces to
 numeric.  In fact, C$a eq $b really means C~$a === ~$b and C$a == $b
-means C+$a === +$b.
+means C+$a === +$b.
 
 Note also that, while string hashes use Ceq semantics by default,
 object hashes use C=== semantics.
@@ -442,8 +442,9 @@
 really wanted to assign a stringified value.)  A negated smart match is
 spelled C!~~.
 
-=item * Unary C. calls its single argument (which must a postfix operator)
-on C$_.  (It's not really a unary operator, so we put it in quotes.)
+=item * Unary C. calls its single argument (which must be a postfix
+operator) on C$_.  (It's not really a unary operator, so we put it in
+quotes.)
 
 =item * The C.. range operator has variants with C^ on either
 end to indicate exclusion of that endpoint from the range.  It always
@@ -475,7 +476,7 @@
 supports the COrdered role.
 
 0..*   # 0 .. +Inf
-'a'..* # 'a' .. 'z...
+'a'..* # 'a' .. 'z...'
 *..0   # -Inf .. 0
 *..*   # -Inf .. +Inf, really Ordered
 1.2.3..*   # Any version higher than 1.2.3.
@@ -569,7 +570,7 @@
 Any .method   method truth*match if $_.method
 Any Regex pattern matchmatch if $_ ~~ /$x/
 Any subst substitution match*  match if $_ ~~ subst
-Any boolean   simple expression truth* match if true given $_
+Any boolean   simple expression truth* match if $x.true given $_
 Any undef undefinedmatch unless defined $_
 Any Whatever  default  match anything
 Any Any   run-time dispatchmatch if infix:~~($_, $x)
@@ -894,7 +895,7 @@
 
 [[;] 1,2,3]   # equivalent to [1;2;3]
 
-Builtin reduce operators return the following identity operations:
+Builtin reduce operators return the following identity values:
 
 [**]()  # 1 (arguably nonsensical)
 [*]()   # 1
@@ -933,11 +934,11 @@
 [gt]()  # Bool::True(also for 1 arg)
 [ge]()  # Bool::True(also for 1 arg)
 [=:=]() # Bool::True(also for 1 arg)
-[!=:=]()# Bool::False(also for 1 arg)
+[!=:=]()# Bool::False   (also for 1 arg)
 [===]() # Bool::True(also for 1 arg)
-[!===]()# Bool::False(also for 1 arg)
+[!===]()# Bool::False   (also for 1 arg)
 [eqv]() # Bool::True(also for 1 arg)
-[!eqv]()# Bool::False(also for 1 arg)
+[!eqv]()# Bool::False   (also for 1 arg)
 []()  # Bool::True
 [||]()  # Bool::False
 [^^]()  # Bool::False
@@ -1079,8 +1080,8 @@
 my $y := $x;
 $y = 'Perl Hacker';
 
-After this, both C$x and C$y contain the string Perl Hacker, since
-they are really just two different names for the same variable.
+After this, both C$x and C$y contain the string CPerl Hacker,
+since they are really just two different names for the same variable.
 
 There is another variant, spelled C::=, that does the same thing at
 compile time.
@@ -1131,7 +1132,7 @@
 my :($b, $c);  # okay
 sub foo :($a,$b) {...} # okay
 
-The C -  pointy sub token also introduces a signature, but
+The C -  pointy block token also introduces a signature, but
 in this case you must omit both the colon and the parens.  For instance,
 if you're defining the loop variable of a loop block:
 
@@ -1184,7 +1185,7 @@
 
 =head1 Argument List Interpolating
 
-Perl 5 forced interpolation of a functions argument list by use of
+Perl 5 forced interpolation of a function's argument list by use of
 the C prefix.  That option is no longer available in Perl 6, so
 instead the C[,] reduction operator serves as an
 interpolator, by casting its operands to CCapture objects
@@ -1229,8 +1230,8 @@
 @$bar = 1,2,3;
 $bar[] = 1,2,3;
 
-Some lvalues can be rather lengthy, so that second form can help keep
-the arrayness of the lvalue close to the assignment operator:
+For long lvalue expressions, the second form can keep the arrayness
+of the lvalue close 

Re: Patch for S03

2006-07-23 Thread Audrey Tang


在 2006/7/23 上午 7:33 時,Agent Zhang 寫到:


Hello, everyone~
Here's my patch for S03.


Thanks, applied (and the previous one on S02 too)!

Audrey

PGP.sig
Description: This is a digitally signed message part


Re: t/compilers/pge/p6regex/01-regex.t test 118 needs ICU?

2006-07-23 Thread Patrick R. Michaud
On Sat, Jul 22, 2006 at 08:54:36PM -0400, Bob Rogers wrote:
Content-Description: message body text
After building Parrot without ICU, 01-regex.t test 118 fails as
 follows:
   t/compilers/pge/p6regex/01-regex.
   # Failed test (t/compilers/pge/p6regex/01-regex.t at line 59)
   #  got: 'no ICU lib loaded
 The attached patch seems to take care of this.  Is this a reasonable way
 to do it?

Looks perfect.  Applied (r13457), thanks.

Pm


Re: Flex Debugging

2006-07-23 Thread Leopold Toetsch
Am Sonntag, 23. Juli 2006 18:09 schrieb Vishal Soni:
 Hi,

 Can some one help me with Flex debugging?

 Previously if I recall correctly the adding %option debug in imcc.l use
 to spit out debug information to the console. This does not seem to work
 now.

$ info flex 
sayeth:

`-d, --debug, `%option debug''
 makes the generated scanner run in debug mode.  Whenever a
 pattern is recognized and the global variable `yy_flex_debug' is
 non-zero (which is the default), the scanner will write to
 `stderr' a line of the form:

i.e. differently to previous versions, `yy_flex_debug' also needs turning on,
which could probably done along with turning on 'yydebug' with the -y 
commandline switch. While above states that `yy_flex_debug' would be turned 
on by default, a 'find ... grep' shows no indications for that.

*But* trying that [1], it seems that it's just not working.

 -Vishal

leo

[1] the patch w/o func proto
Index: src/dynoplibs/myops.ops
===
--- src/dynoplibs/myops.ops	(Revision 13449)
+++ src/dynoplibs/myops.ops	(Arbeitskopie)
@@ -101,6 +101,23 @@
 goto NEXT();
 }
 
+=item Bif_else(in INT, labelconst INT, labelconst INT)
+
+Opcode to test multiple lables. Branch to 1st label on true $1, else to 2nd.
+
+=cut
+
+op if_else(in INT, labelconst INT, labelconst INT) {
+if ($1) {
+	goto OFFSET($2);
+}
+else {
+	goto OFFSET($3);
+}
+  goto NEXT();  /* unused */
+}
+
+
 =back
 
 =cut
Index: compilers/imcc/imclexer.c
===
--- compilers/imcc/imclexer.c	(Revision 13449)
+++ compilers/imcc/imclexer.c	(Arbeitskopie)
@@ -14,16 +14,32 @@
 #define FLEX_BETA
 #endif
 
+/* %if-c++-only */
+/* %endif */
+
+/* %if-c-only */
+
+/* %endif */
+
+/* %if-c-only */
+
+/* %endif */
+
 /* First, we deal with  platform-specific or compiler-specific issues. */
 
 /* begin standard C headers. */
+/* %if-c-only */
 #include stdio.h
 #include string.h
 #include errno.h
 #include stdlib.h
+/* %endif */
 
+/* %if-tables-serialization */
+/* %endif */
 /* end standard C headers. */
 
+/* %if-c-or-c++ */
 /* flex integer type definitions */
 
 #ifndef FLEXINT_H
@@ -87,6 +103,11 @@
 
 #endif /* ! FLEXINT_H */
 
+/* %endif */
+
+/* %if-c++-only */
+/* %endif */
+
 #ifdef __cplusplus
 
 /* The const storage-class-modifier is valid. */
@@ -107,16 +128,24 @@
 #define yyconst
 #endif
 
+/* %not-for-header */
+
 /* Returned upon end-of-file. */
 #define YY_NULL 0
+/* %ok-for-header */
 
+/* %not-for-header */
+
 /* Promotes a possibly negative, possibly signed char to an unsigned
  * integer for use as an array index.  If the signed char is negative,
  * we want to instead treat it as an 8-bit unsigned char, hence the
  * double cast.
  */
 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+/* %ok-for-header */
 
+/* %if-reentrant */
+
 /* An opaque pointer. */
 #ifndef YY_TYPEDEF_YY_SCANNER_T
 #define YY_TYPEDEF_YY_SCANNER_T
@@ -135,7 +164,11 @@
 #define yy_flex_debug yyg-yy_flex_debug_r
 
 int yylex_init (yyscan_t* scanner);
+/* %endif */
 
+/* %if-not-reentrant */
+/* %endif */
+
 /* Enter a start condition.  This macro really ought to take a parameter,
  * but we do it the disgusting crufty way forced on us by the ()-less
  * definition of BEGIN.
@@ -171,6 +204,14 @@
 typedef struct yy_buffer_state *YY_BUFFER_STATE;
 #endif
 
+/* %if-not-reentrant */
+/* %endif */
+
+/* %if-c-only */
+/* %if-not-reentrant */
+/* %endif */
+/* %endif */
+
 #define EOB_ACT_CONTINUE_SCAN 0
 #define EOB_ACT_END_OF_FILE 1
 #define EOB_ACT_LAST_MATCH 2
@@ -207,8 +248,13 @@
 #define YY_STRUCT_YY_BUFFER_STATE
 struct yy_buffer_state
 	{
+/* %if-c-only */
 	FILE *yy_input_file;
+/* %endif */
 
+/* %if-c++-only */
+/* %endif */
+
 	char *yy_ch_buf;		/* input buffer */
 	char *yy_buf_pos;		/* current position in input buffer */
 
@@ -268,6 +314,15 @@
 	};
 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
 
+/* %if-c-only Standard (non-C++) definition */
+/* %not-for-header */
+
+/* %if-not-reentrant */
+/* %endif */
+/* %ok-for-header */
+
+/* %endif */
+
 /* We provide macros for accessing buffer states in case in the
  * future we want to put the buffer states in a more general
  * scanner state.
@@ -283,6 +338,15 @@
  */
 #define YY_CURRENT_BUFFER_LVALUE yyg-yy_buffer_stack[yyg-yy_buffer_stack_top]
 
+/* %if-c-only Standard (non-C++) definition */
+
+/* %if-not-reentrant */
+/* %not-for-header */
+
+/* %ok-for-header */
+
+/* %endif */
+
 void yyrestart (FILE *input_file ,yyscan_t yyscanner );
 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
@@ -301,6 +365,8 @@
 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
 
+/* %endif */
+
 void *yyalloc (yy_size_t ,yyscan_t yyscanner );
 void *yyrealloc 

The Perl 6 summary for the month of April 2006

2006-07-23 Thread Ann Barcomb


 Perl 6 Compiler

  synopses http://xrl.us/pb64

Sean Sieger asked if synopses were publically available. Jonathan Scott
Duff and Will Coleda responded with information on read-only access to the
archives.

  first barest-bones Relation implementation committed http://xrl.us/pb65

Darren Duncan announced that he has begun to implement a Perl 6 Relations
class, and described some of the features of the class.

  [svn:parrot] r12294 - trunk/languages/perl6/lib http://xrl.us/pb66

Nick Clark commented on this revision, which was not the final form of the
patch. He also had a question on POD and whitespace, which Patrick R.
Michaud answered.

  Infix macro := reparsing the LHS? http://xrl.us/pb67

Audrey Tang asked for details on the infix macro where she felt that
specifications did not clear up how it would be used in practice. Larry
Wall obliged with a clarification, and, following a conversation on IRC,
posted more information.

  Pugs build error OS X http://xrl.us/pb68

Will Coleda reported a problem with building r10048. Darren Duncan
suggested trying r10054, which did not have the same problem for him.

  error building pugs: Could not find module `Data.ByteString'
  http://xrl.us/pb69

Dave Whipp reported a problem with installing pugs r10142, but then updated
to r10166, which solved the issue..

 Perl 6 Language

  'temp $x;' with no assignment http://xrl.us/pb7a

Yuval Kogman offered his opinion on how temp should react with an earlier
my declaration in an outside scope. Several people responded.

  [svn:perl6-synopsis] r8504 - doc/trunk/design/syn http://xrl.us/pb7b

Audrey Tang submitted a patch relating to the S06 document. Nick Clark
asked why unint autoboxes when int does not. Amos Robinson suggested an
alternate interpretation of the text, which turned out to be correct.

  replacement of $ http://xrl.us/pb7c

In early April, Larry suggested replacing $ with the Euro symbol. Darren
Duncan pointed out that $ is used in several countries, and not just in the
US and proposed using the gold standard of 'Au' to prefix variable names.
The thread continued with further April Fool's day silliness, ending with
Yuval Kogman noting that if Larry had participated in the keysigning party
at OSDC this joke wouldn't have been possible.

  [svn:perl6-synopsis] r8532 - doc/trunk/design/syn http://xrl.us/pb7d

Audrey Tang submitted a patch to fix capitalization. Uri Guttman picked an
even smaller nit, and then they discussed having a docathon at
YAPC::NA::Chicago.

  curly-quotes http://xrl.us/pb7e

Jonathan Lang wrote to propose having ` quotes in both single and double
variations to be used with ' and , which would allow them to match the way
parentheses and brackets do. Larry Wall pointed out some of the
difficulties in using characters outside of Latin-1 Unicode.

  Context and coercion http://xrl.us/pb7f

Joshua Choi asked what the conceptual difference is between context and
type coercion. According to Larry Wall, there's no difference. Larry then
helped defined coercion.

  Do junctions support determining interesections of lists http://xrl.us/pb7g

Joshua Gatcomb wrote to the list with additional questions on junctions,
following up from his post of the previous year. Larry Wall answered that
Sets have replaced Junctions for the use described.

  Set Theory (Was: Do junctions support determining interesections of lists)
  http://xrl.us/pb7h

Jonathan Lang asked if Perl6 Sets will include set negation or a universal
set. Larry Wall noted that some existing functions sort of consider this
question, although not for Sets defined by rule. Discussion continued, with
others joining in.

  [svn:perl6-synopsis] r8569 - doc/trunk/design/syn http://xrl.us/pb7i

Following another patch post, Rutger Vos asked if the purpose of the list
was to receive subversion logging messages. Jonathan Scott Duff added his
opinion that patches were a part of the language design.

  [svn:perl6-synopsis] r8573 - doc/trunk/design/syn http://xrl.us/pb7j

Revision r8573 introduced some changes that TSa questioned and Juerd
disliked. Damian Conway explained the reason the changes were needed, and
several people offered alternatives.

  $a.foo() moved? http://xrl.us/pb7k

Matt Fowles noted that there had been a change and asked when it happened,
noting that he preferred the previous style. Larry Wall replied that it had
changed at the last hackathon but was still being debated. Some of the
debate spilled in to the thread.

  On signatured code attributes of a class http://xrl.us/pb7m

Joshua Choi asked if it was possible to use a particular syntax, and noted
that #perl6 is quite active. He requested that someone summarize the
channel.

  [svn:perl6-synopsis] r8609 - doc/trunk/design/syn http://xrl.us/pb7n