PDB_next no longer executes opcodes by himself, now is done in the
debugger runloop. Closing ticket.
From: "Marcelo Serra Castilhos" <mhelix@terra.com.br>
X-Virus-Check-By: mailtest2.pair.com
X-Spam-Check-By: mailtest2.pair.com
X-Spam-Status: No, hits=-9.6 required=4.0
tests=BAYES_00,DATE_IN_PAST_12_24,RCVD_IN_DNSWL_HI autolearn=ham
version=3.002005
X-Spam-Flag: NO
X-Spam-Level:
X-Spam-Filtered: 052f96e22adcb440ba93d277d4a1272f
Mailing-List: contact perl6-all-help@perl.org; run by ezmlm
Precedence: bulk
List-Post: <mailto:perl6-all@perl.org>
List-Help: <mailto:perl6-all-help@perl.org>
List-Unsubscribe: <mailto:perl6-all-unsubscribe@perl.org>
List-Subscribe: <mailto:perl6-all-subscribe@perl.org>
List-Id: <perl6-all.perl.org>
Delivered-To: mailing list perl6-all@perl.org
Delivered-To: perl6-all-poster@perl.org
X-Mailing-List: contact perl6-compiler-help@perl.org; run by ezmlm
X-Mailing-List-Name: perl6-compiler
List-Id: <perl6-compiler.perl.org>
Delivered-To: mailing list perl6-compiler@perl.org
Delivered-To: moderator for perl6-compiler@perl.org
Delivered-To: perl6-compiler@perl.org
X-Terra-Karma: 0%
X-Terra-Hash: 79be94639064a0cc2589e11c514afa7b
Received-SPF: pass (quebec.hst.terra.com.br: domain of terra.com.br designates
200.176.10.31 as permitted sender) client-ip=200.176.10.31;
envelope-from=mhelix@terra.com.br; helo=multidominios;
Date: Thu, 28 Aug 2008 12:27:42 -0300
Message-Id: <K6BHM6$732881925E9B92BA38AD2B2FAAE0384B@multidominios>
Subject: [PGE][BUG][PATCH] Apostrophes in optables are compiled to broken pir
MIME-Version: 1.0
X-Sensitivity: 3
Content-Type: multipart/mixed;
boundary="_=__=_XaM3_.1219937262.2A.590076.42.8837.52.42.007.786204022"
To: "perl6-compiler" <perl6-compiler@perl.org>
X-XaM3-API-Version: 5.0(R1)
X-SenderIP: 200.180.162.237
X-Old-Spam-Check-By: la.mx.develooper.com
X-Old-Spam-Status: No, hits=-2.6 required=8.0
tests=BAYES_00,SPF_PASS
--_=__=_XaM3_.1219937262.2A.590076.42.8837.52.42.007.786204022
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
While writing something like a LISP reader I found this bug. To replicate=
it this is enough:
proto prefix:<'> is looser('term:') { ... }
The problem is that the ' in the name of the operators aren't escaped.
The patch I attached uses library/Data/Escape.pbc to escape the names. Th=
e only modified file is
runtime/parrot/library/PGE/Perl6Grammar.pir
--_=__=_XaM3_.1219937262.2A.590076.42.8837.52.42.007.786204022
Content-Type: text/x-diff;
name="=?iso-8859-1?Q?quote=5Fbug.patch?="
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="=?iso-8859-1?Q?quote=5Fbug.patch?="
Index: runtime/parrot/library/PGE/Perl6Grammar.pir=0A=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A--- runtime/parrot/library/PGE/Perl6Gram=
mar.pir (revision 30618)=0A+++ runtime/parrot/library/PGE/Perl6Grammar.pi=
r (working copy)=0A@@ -73,7 +73,8 @@=0A load_bytecode
'PGE/Text.pbc'=0A=
load_bytecode 'PGE/Util.pbc'=0A load_bytecode 'PCT/HLLCompiler.p=
bc'=0A-=0A+ load_bytecode 'library/Data/Escape.pbc'=0A+ =0A .local=
pmc p6regex=0A p6regex =3D compreg 'PGE::Perl6Regex'=0A =0A@@ -339,6=
+340,9 @@=0A $P0 =3D nstable[namespace]=0A optable =3D $P0['opta=
ble']=0A =0A+ ## Escape function=0A+ .local pmc esc=0A+ esc =3D =
find_global "Data::Escape", "String"=0A ## build the list of traits=
=0A .local pmc iter=0A .local string traitlist=0A@@ -366,8 +370,1=
0 @@=0A goto trait_sub=0A trait_arg:=0A if trait =3D=3D 'parsed=
' goto trait_sub=0A- arg =3D concat "'", arg=0A- arg =3D concat arg=
, "'"=0A+ ## Escape the arg=0A+ arg =3D esc (arg)=0A+ arg =3D co=
ncat '"', arg=0A+ arg =3D concat arg, '"'=0A goto trait_arg_done=0A=
trait_sub:=0A optable.emit(" $P0 =3D get_hll_global ['%0'=
], '%1'", namespace, arg)=0A@@ -382,7 +388,10 @@=0A concat traitlist,=
arg=0A goto trait_loop=0A trait_end:=0A- optable.emit(" =
optable.newtok('%0'%1)", name, traitlist)=0A+ ## Escape the name=0A+=
$P0 =3D find_global "Data::Escape", "String"=0A+ name =3D $P0(name=
, '"')=0A+ optable.emit(" optable.newtok(\"%0\"%1)", name, tr=
aitlist)=0A .return ()=0A .end=0A =0A
--_=__=_XaM3_.1219937262.2A.590076.42.8837.52.42.007.786204022--
From: "Carl Mäsak" (via RT) <perl6-bugs-followup@perl.org>
X-Virus-Check-By: mailtest2.pair.com
X-Spam-Check-By: mailtest2.pair.com
X-Spam-Status: No, hits=-9.6 required=4.0
tests=BAYES_00,DATE_IN_PAST_12_24,RCVD_IN_DNSWL_HI autolearn=ham
version=3.002005
X-Spam-Flag: NO
X-Spam-Level:
X-Spam-Filtered: 052f96e22adcb440ba93d277d4a1272f
Mailing-List: contact perl6-all-help@perl.org; run by ezmlm
Precedence: bulk
List-Post: <mailto:perl6-all@perl.org>
List-Help: <mailto:perl6-all-help@perl.org>
List-Unsubscribe: <mailto:perl6-all-unsubscribe@perl.org>
List-Subscribe: <mailto:perl6-all-subscribe@perl.org>
List-Id: <perl6-all.perl.org>
Delivered-To: mailing list perl6-all@perl.org
Delivered-To: perl6-all-poster@perl.org
X-Mailing-List: contact perl6-compiler-help@perl.org; run by ezmlm
X-Mailing-List-Name: perl6-compiler
List-Id: <perl6-compiler.perl.org>
Delivered-To: mailing list perl6-compiler@perl.org
Delivered-To: moderator for perl6-compiler@perl.org
Delivered-To: perl6-compiler@perl.org
Resent-Date: Thu, 28 Aug 2008 08:32:43 -0700
Resent-From: rt-cmasak=gmail.com@netlabs.develooper.com
Resent-Message-Id: <200808281532.m7SFWhvR008721@x17.develooper.com>
X-Authentication-Warning: x17.develooper.com: rt set sender to
rt-cmasak=gmail.com@rt.perl.org using -f
X-RT-NewTicket: yes
To: bugs-bitbucket@netlabs.develooper.com
Resent-To: perl6-compiler@perl.org
Mail-Followup-To: perl6-compiler@perl.org
Reply-To: perl6-compiler@perl.org
Date: Thu, 28 Aug 2008 08:32:41 -0700
Subject: [perl #58424] Named regex, token and rule don't work outside of a
grammar
In-Reply-To: <16d769b70808280832g7c79effciaddd3dcecf96da53@mail.gmail.com>
References: <RT-Ticket-58424@perl.org>
<16d769b70808280832g7c79effciaddd3dcecf96da53@mail.gmail.com>
Message-ID: <rt-3.6.HEAD-29759-1219937561-1085.58424-82-0@perl.org>
X-RT-Loop-Prevention: perl
RT-Ticket: perl #58424
Managed-by: RT 3.6.HEAD (http://www.bestpractical.com/rt/)
RT-Originator: cmasak@gmail.com
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Old-Spam-Check-By: la.mx.develooper.com
X-Old-Spam-Status: No, hits=-3.6 required=8.0
tests=BAYES_00,RCVD_IN_DNSWL_LOW
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #58424]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58424 >
r30590:
$ ./perl6 -e 'regex a { b }; "b" ~~ a'
too few arguments passed (0) - 2 params expected
[...]
I've also added tests for this in t/spec/S05-metasyntax/regex.t.
(S05 is not entirely clear as to whether this should actually work.
IMHO, there's noreason for it not to. Storing anonymous regexes in
scalar variables already works.)
$ ./perl6 -e 'my $a = regex { b }; say "b" ~~ $a'
b
|