First public release of grammar engine

2004-11-19 Thread Patrick R. Michaud
I've just committed the first draft of a Perl 6 grammar engine to the parrot repository (in compilers/p6ge). What you'll find there is still at a somewhat early stage of development, I'm releasing it now so that people can begin commenting and suggesting improvements to the framework. The next bi

[PATCH] for languages/perl6/perl6 --tree

2004-11-19 Thread Gerd Pokorra
Hello, by executing the command "perl6 --tree" there is to seen the following error message: [EMAIL PROTECTED] perl6]$ perl ./perl6 --tree -e 'print "alf"'; Can't call method "tree" on an undefined value at ./perl6 line 418. [EMAIL PROTECTED] perl6]$ The problem is that the function $par

Re: Exceptions, sub cleanup, and scope exit

2004-11-19 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: > The 'invoke the current return continuation' op apparently got lost > in the blowup. That needs to go in. Its in and named C since yesterday "return with current continuation". > I'd like pushing exception handlers to remain simple -- the current > syste

Re: Exceptions, sub cleanup, and scope exit

2004-11-19 Thread Leopold Toetsch
Tim Bunce <[EMAIL PROTECTED]> wrote: > I guess the HLL compiler needs to ensure that for every push the > control flow will always pass through a matching pop. Not necessarily. The handler is pushed onto the control stack. During a context change (e.g. from a subroutine return), the previous cont

Re: Exceptions, sub cleanup, and scope exit

2004-11-19 Thread Miroslav Silovic
Dan Sugalski wrote: It's also important for people writing these things to take into account the possibility that their exit actions may potentially be triggered multiple times, courtesy of the joys of continuations. Hmm, the first thing to take into the account is that return continuations can

Re: Exceptions, sub cleanup, and scope exit

2004-11-19 Thread Leopold Toetsch
Miroslav Silovic <[EMAIL PROTECTED]> wrote: > Hmm, the first thing to take into the account is that return > continuations can be promoted to the fully blown continuations. Yes. But an exception handler is not a RetContinuation object. It's an Exception_Handler object (also derived from Continuat

Re: Exceptions, sub cleanup, and scope exit

2004-11-19 Thread Dan Sugalski
At 10:03 AM +0100 11/19/04, Miroslav Silovic wrote: Dan Sugalski wrote: It's also important for people writing these things to take into account the possibility that their exit actions may potentially be triggered multiple times, courtesy of the joys of continuations. Hmm, the first thing to tak

Re: First public release of grammar engine

2004-11-19 Thread William Coleda
Patrick R. Michaud wrote: P6GE assumes that it is part of the parrot distribution in the F directory. Simply type C in this directory to build the F shared library it needs. oolong:~/research/parrot/compilers/p6ge coke$ make cc -I ../../include -c -o p6ge_parse.o p6ge_parse.c p6ge_parse.c:2

Re: Exceptions, sub cleanup, and scope exit

2004-11-19 Thread Dan Sugalski
At 10:58 PM + 11/18/04, Tim Bunce wrote: On Thu, Nov 18, 2004 at 11:37:54AM -0800, chromatic wrote: On Thu, 2004-11-18 at 13:36 -0500, Dan Sugalski wrote: > I'd like pushing exception handlers to remain simple -- the current > system is almost OK. What I'd like it to change to is: > >

Re: First public release of grammar engine

2004-11-19 Thread Patrick R. Michaud
On Fri, Nov 19, 2004 at 07:52:57AM -0500, William Coleda wrote: > oolong:~/research/parrot/compilers/p6ge coke$ make > cc -I ../../include -c -o p6ge_parse.o p6ge_parse.c > p6ge_parse.c:23:20: malloc.h: No such file or directory Oops. Should've been stdlib.h instead. Fixed, thanks. > make: **

Re: Threads, events, Win32, etc.

2004-11-19 Thread Gabe Schaffer
> [ long win32 proposal ] > > I've to read through that some more times. OK; let me know if you have any questions on how the Win32 stuff works. I tried to explain things that are unlike POSIX, but of course it makes sense to me. > Do you alread have ideas for a common API, or where to split the

Re: First public release of grammar engine

2004-11-19 Thread Dan Sugalski
At 7:00 AM -0700 11/19/04, Patrick R. Michaud wrote: On Fri, Nov 19, 2004 at 07:52:57AM -0500, William Coleda wrote: oolong:~/research/parrot/compilers/p6ge coke$ make cc -I ../../include -c -o p6ge_parse.o p6ge_parse.c p6ge_parse.c:23:20: malloc.h: No such file or directory Oops. Should've b

Re: COND macros (was: Threads, events, Win32, etc.)

2004-11-19 Thread Gabe Schaffer
On Wed, 17 Nov 2004 16:30:04 +0100, Leopold Toetsch <[EMAIL PROTECTED]> wrote: > Gabe Schaffer <[EMAIL PROTECTED]> wrote: > The problem is a different one: the COND_INIT macro just passes a > condition location, the mutex is created in a second step, which isn't > needed for windows. OTOH a mutex a

Re: Exceptions, sub cleanup, and scope exit

2004-11-19 Thread Miroslav Silovic
Dan Sugalski wrote: Hmm, the first thing to take into the account is that return continuations can be promoted to the fully blown continuations. This should affect the handlers in the same way - so exception handlers could have become arbitrary invokable objects at the point when the exception

Re: COND macros (was: Threads, events, Win32, etc.)

2004-11-19 Thread Dan Sugalski
At 8:42 AM -0500 11/19/04, Gabe Schaffer wrote: On Wed, 17 Nov 2004 16:30:04 +0100, Leopold Toetsch <[EMAIL PROTECTED]> wrote: Gabe Schaffer <[EMAIL PROTECTED]> wrote: The problem is a different one: the COND_INIT macro just passes a condition location, the mutex is created in a second step, whi

Re: First public release of grammar engine

2004-11-19 Thread Patrick R. Michaud
On Fri, Nov 19, 2004 at 09:05:31AM -0500, Dan Sugalski wrote: > At 7:00 AM -0700 11/19/04, Patrick R. Michaud wrote: > >One of the areas where we can definitely use assistance is > >in porting and testing p6ge in operating environments different > >from the ones I have available to me--currently I'

Re: First public release of grammar engine

2004-11-19 Thread Dan Sugalski
At 7:26 AM -0700 11/19/04, Patrick R. Michaud wrote: On Fri, Nov 19, 2004 at 09:05:31AM -0500, Dan Sugalski wrote: At 7:00 AM -0700 11/19/04, Patrick R. Michaud wrote: >One of the areas where we can definitely use assistance is >in porting and testing p6ge in operating environments different >f

Getting the grammar engine in (or a small task for the interested)

2004-11-19 Thread Dan Sugalski
Folks, Since the grammar engine that Patrick's working on is going to be part of the base parrot kit (given the number of languages that have perl 5 compatible regex implementations, we might as well make it so the *real* perl 5, and perl 6, regex engine's there to be used in their parrot incar

Re: COND macros

2004-11-19 Thread Leopold Toetsch
Gabe Schaffer wrote: On Wed, 17 Nov 2004 16:30:04 +0100, Leopold Toetsch <[EMAIL PROTECTED]> wrote: Gabe Schaffer <[EMAIL PROTECTED]> wrote: The problem is a different one: the COND_INIT macro just passes a condition location, the mutex is created in a second step, which isn't needed for windows. O

Re: First public release of grammar engine

2004-11-19 Thread Matthew Walton
William Coleda wrote: Patrick R. Michaud wrote: P6GE assumes that it is part of the parrot distribution in the F directory. Simply type C in this directory to build the F shared library it needs. cc -shared -fpic p6ge_parse.o p6ge_gen.o p6ge_parsep5.o -o p6ge.so cc: unrecognized option `-shar

Re: First public release of grammar engine

2004-11-19 Thread Leopold Toetsch
William Coleda <[EMAIL PROTECTED]> wrote: > Patrick R. Michaud wrote: >> >> P6GE assumes that it is part of the parrot distribution in the >> F directory. Simply type C in this directory >> to build the F shared library it needs. > oolong:~/research/parrot/compilers/p6ge coke$ make > cc -I ../

Re: First public release of grammar engine

2004-11-19 Thread Patrick R. Michaud
On Fri, Nov 19, 2004 at 02:54:20PM +0100, Leopold Toetsch wrote: > > Well, p6ge should eventually use Parrot's config info and the Makefile > ought to be a generated one. s/eventually use/be using/# :-) Dan's moved the item to p6i, so hopefully someone there will either make the changes for

Re: First public release of grammar engine

2004-11-19 Thread Patrick R. Michaud
On Fri, Nov 19, 2004 at 07:03:45AM -0800, Will Coleda wrote: > This would be a good idea. pmc's fix for the malloc.h issue gets the error > below. > > All the CC flags (and file extensions, and path separator) > should be pulled from config. > > Also, missing a "clean" target. > > (Sorry if it

[perl #32507] [TODO] ResizableIntegerArray missing vtables (e.g., pop)

2004-11-19 Thread via RT
# New Ticket Created by Patrick R. Michaud # Please include the string: [perl #32507] # in the subject line of all future correspondence about this issue. # http://rt.perl.org:80/rt3/Ticket/Display.html?id=32507 > In P6GE, there's an array (gr_cap) that is used to store group captures as an a

[perl #32508] [TODO] P6GE - Convert PerlArray in gr_cap to ResizableIntegerArray

2004-11-19 Thread via RT
# New Ticket Created by Patrick R. Michaud # Please include the string: [perl #32508] # in the subject line of all future correspondence about this issue. # http://rt.perl.org:80/rt3/Ticket/Display.html?id=32508 > P6GE currently uses a PerlArray for holding an array of captures; Leo suggests

Re: First public release of grammar engine

2004-11-19 Thread Will Coleda
This would be a good idea. pmc's fix for the malloc.h issue gets the error below. All the CC flags (and file extensions, and path separator) should be pulled from config. Also, missing a "clean" target. (Sorry if it sounds like I'm complaining, I just want to try this out! =-) cc -I ../../incl

Re: Getting the grammar engine in (or a small task for the interested)

2004-11-19 Thread Andy Dougherty
On Fri, 19 Nov 2004, Dan Sugalski wrote: > So, if someone'd like to take a shot at thumping the template > makefile bits to add in compilers/p6ge to the basic build, that'd be > great. Grovelling over the code in there to scrub out portability > issues would also be good. I'll take a look at this

Re: Getting the grammar engine in (or a small task for the interested)

2004-11-19 Thread Dan Sugalski
At 10:58 AM -0500 11/19/04, Andy Dougherty wrote: On Fri, 19 Nov 2004, Dan Sugalski wrote: So, if someone'd like to take a shot at thumping the template makefile bits to add in compilers/p6ge to the basic build, that'd be great. Grovelling over the code in there to scrub out portability issues

[PATCH] Re: Getting the grammar engine in (or a small task for the interested)

2004-11-19 Thread Andy Dougherty
On Fri, 19 Nov 2004, Andy Dougherty wrote: > On Fri, 19 Nov 2004, Dan Sugalski wrote: > > > So, if someone'd like to take a shot at thumping the template > > makefile bits to add in compilers/p6ge to the basic build, that'd be > > great. Grovelling over the code in there to scrub out portability >

Re: [perl #32280] [PATCH] Detects presence of perldoc at configuration time

2004-11-19 Thread James deBoer
Sorry for the delay, but here is a revised patch to detect perldoc. - If Perldoc is detected, no warning messages will be printed and things will work as before - If Perldoc is not detected - Configure.pl will print a message saying that the docs will not be built - docs/ will not be buil

return value of s///

2004-11-19 Thread Nicholas Clark
Synopsis 5 has a section on the return value from matches: http://www.wall.org/~larry/syn/S05.html#return_values_from_matches However, it has nothing on the return values of substitutions. In perl 6 will these always return a match object? Or will it be as perl 5 and return the number of substit

Fwd: Re: [PATCH] Re: Getting the grammar engine in (or a small task for the interested)

2004-11-19 Thread Patrick R. Michaud
Just a quick note to perl6-compilers that I've just committed a patch (timely submitted by Andy Dougherty) that should enable p6ge to compile under OSX and a few other environments a bit more cleanly. More details to come soon. Pm - Forwarded message from "Patrick R. Michaud" <[EMAIL PROT

[perl #32514] Cannot Build Parrot on Linux PPC (nonvolatile registers)

2004-11-19 Thread via RT
# New Ticket Created by chromatic # Please include the string: [perl #32514] # in the subject line of all future correspondence about this issue. # http://rt.perl.org:80/rt3/Ticket/Display.html?id=32514 > --- osname= linux osvers= 2.4.24-benh0 arch= powerpc-linux cc= gcc 3.2.3 20030422

Re: First public release of grammar engine

2004-11-19 Thread Nicholas Clark
On Thu, Nov 18, 2004 at 04:01:54PM -0700, Patrick R. Michaud wrote: > I've just committed the first draft of a Perl 6 grammar engine to > the parrot repository (in compilers/p6ge). What you'll find there > is still at a somewhat early stage of development, I'm releasing it > now so that people can

Re: return value of s///

2004-11-19 Thread Larry Wall
On Fri, Nov 19, 2004 at 10:20:23PM +, Nicholas Clark wrote: : In perl 6 will these always return a match object? Or will it be as perl 5 : and return the number of substitutions (or the empty string if none) Yes, and yes. The match object returns the number of substitutions in a numeric conte

Re: First public release of grammar engine

2004-11-19 Thread Patrick R. Michaud
On Sat, Nov 20, 2004 at 12:18:17AM +, Nicholas Clark wrote: > $ ../../parrot demo.pir > input /pattern, string to match, + to continue match, ? to print pir, > / > Unrecognized character at offset 1 (found '') > Segmentation fault > > Is this a known limitation? [Done after Andy's patch went

Re: silent effects of opcodes

2004-11-19 Thread Bill Coffman
On Thu, 18 Nov 2004 08:13:02 +0100, Leopold Toetsch <[EMAIL PROTECTED]> wrote: > Bill Coffman <[EMAIL PROTECTED]> wrote: > > ps: I'm making progress on grokking the cfg and register renaming > > stuff. Will let you know. > > This needs an SSA graph of the data flow? Static Single-Assignment (I h

Re: silent effects of opcodes

2004-11-19 Thread Dan Sugalski
At 5:36 PM -0800 11/19/04, Bill Coffman wrote: Another thing I'd like to do, is throw in is a randomizer, to change the way the allocator assigns registers. Considering all the cruft that was uncovered when the algorithm was changed, it might be a good idea to have a debug feature that selects reg

[ANNOUNCE] Test::Simple 0.50

2004-11-19 Thread Michael G Schwern
http://www.pobox.com/~schwern/src/Test-Simple-0.50.tar.gz or a CPAN near you. Not much in this release, just fixing the little Windows testing bug. Also dumped Aegis. Stiched the Aegis era revisions back into the older CVS history, converted the whole thing to Subversion and I'm now using SVK. O