Re: Perl's parser and lexer will likely be in Perl (was Re: RFC 334 (v1) I'm {STILL} trying to understand this...)

2000-10-17 Thread Adam Turoff
On Tue, Oct 17, 2000 at 08:57:43PM -0400, Dan Sugalski wrote: > On Tue, 17 Oct 2000, Adam Turoff wrote: > > Dammit, I'm not finding the message in the thread, but someone casually > > mentioned writing the important bits of parsing Perl in Perl5, generating > > bytecode, and starting Perl6 by writ

Re: Perl's parser and lexer will likely be in Perl (was Re: RFC 334(v1) I'm {STILL} trying to understand this...)

2000-10-17 Thread Dan Sugalski
On Tue, 17 Oct 2000, Adam Turoff wrote: > On Tue, Oct 17, 2000 at 07:18:54PM -0400, Bradley M. Kuhn wrote: > > Adam Turoff wrote: > > > to write the Perl tokenizer in a Perl[56] regex, which is more easily > > > parsable in C. All of a sudden, toke.c is replaced by toke.re, which > > > would be

Re: Perl's parser and lexer will likely be in Perl (was Re: RFC 334 (v1) I'm {STILL} trying to understand this...)

2000-10-17 Thread Adam Turoff
On Tue, Oct 17, 2000 at 07:18:54PM -0400, Bradley M. Kuhn wrote: > Adam Turoff wrote: > > to write the Perl tokenizer in a Perl[56] regex, which is more easily > > parsable in C. All of a sudden, toke.c is replaced by toke.re, which > > would be much more legible to this community (which is more

Re: Perl's parser and lexer will likely be in Perl (was Re: RFC 334 (v1) I'm {STILL} trying to understand this...)

2000-10-17 Thread Bradley M. Kuhn
Adam Turoff wrote: > to write the Perl tokenizer in a Perl[56] regex, which is more easily > parsable in C. All of a sudden, toke.c is replaced by toke.re, which > would be much more legible to this community (which is more of a strike > against toke.c instead of a benefit of some toke.re). La

Re: Larry's ALS talk

2000-10-17 Thread Jeff Okamoto
For just a split second, I thought Larry was talking about amyotrophic lateral sclerosis, commonly known as "Lou Gehrig's disease" in America and "motor neuron disease" in Great Britain. Dr. Stephen Hawking of Cambridge is certainly among the most famous sufferers of this disease. Okay Larry, fo

Re: A tentative list of vtable functions

2000-10-17 Thread Ken Fox
David Mitchell wrote: > Jarkko Hietaniemi wrote: > > Assume I want > > > > $a = 2 + 3i; > > > > to work... > > Which I what I suggest we abandon attempts to make the parser do intellignet > decisons on numeric liternal, and instead just grab all the characters > that appear to make up thye

Re: A tentative list of vtable functions

2000-10-17 Thread Dan Sugalski
At 01:34 PM 10/17/00 -0400, Ken Fox wrote: >I think the general idea is that the advantages of C++ don't move us >far enough out of our comfortable local minimum to make it worthwhile. Yup, that pretty much covers it. C++ also has an awful lot of stuff in it that, while interesting, is too likel

Re: Perl's parser and lexer will likely be in Perl (was Re: RFC 334 (v1) I'm {STILL} trying to understand this...)

2000-10-17 Thread Simon Cozens
On Tue, Oct 17, 2000 at 01:18:39PM -0400, Ken Fox wrote: > Those are hard to understand because so much extra work has to be done to > compensate for lack of top-down state when doing a bottom-up match. I haven't found this to be true. > Since Perl is much more difficult than C++ to parse... Pe

Re: A tentative list of vtable functions

2000-10-17 Thread Ken Fox
"ye, wei" wrote: > One C++ problem I just found out is memory management. It seems > that it's impossible to 'new' an object from an specified memory block. > So it's impossible to put free'd objects in memory pool and re-allocate > them next time. Stuff like that isn't the problem with using C+

Re: Perl's parser and lexer will likely be in Perl (was Re: RFC 334 (v1) I'm {STILL} trying to understand this...)

2000-10-17 Thread Nicholas Clark
On Tue, Oct 17, 2000 at 01:18:39PM -0400, Ken Fox wrote: > The other down-side is that we'd be doing a whole lot of custom work designed > just for parsing Perl instead of creating something more general and powerful > that can be used for other problems as well. For example, I'd imagine the PDL >

Re: Perl's parser and lexer will likely be in Perl (was Re: RFC 334 (v1) I'm {STILL} trying to understand this...)

2000-10-17 Thread Ken Fox
Simon Cozens wrote: > To be perfectly honest, my preferred solution would be to have the tokenizer, > lexer and parser as a single, hand-crafted LR(k) monstrosity. Those are hard to understand because so much extra work has to be done to compensate for lack of top-down state when doing a bottom-u

Re: Perl's parser and lexer will likely be in Perl (was Re: RFC 334 (v1) I'm {STILL} trying to understand this...)

2000-10-17 Thread Dan Sugalski
At 06:53 PM 10/17/00 +1100, Jeremy Howard wrote: >In terms of bootstrapping, however, we either need to: > - Write the Perl subset in C (or some other portable language), or > - Use Perl 5 as the 'Perl subset', and distribute that with Perl 6. > >The 2nd of these options seems unlikely to be pra

Re: Perl's parser and lexer will likely be in Perl (was Re: RFC 334 (v1) I'm {STILL} trying to understand this...)

2000-10-17 Thread Dan Sugalski
At 10:22 AM 10/17/00 -0400, John Porter wrote: >Simon Cozens wrote: > > > > Currently, the tokeniser and the lexer are a combined entity. > >Yes, in the vast majority of languages; so people get used to thinking >that it has to be this way. I'd just as soon we thought a bit differently. I'm not s

Re: Perl's parser and lexer will likely be in Perl (was Re: RFC 334 (v1) I'm {STILL} trying to understand this...)

2000-10-17 Thread Ken Fox
Simon Cozens wrote: > It's time to drag out my quote of the week: > > Recursive-descent, or predictive, parsing ONLY works on grammars > where the first terminal symbol of each subexpression provides > enough information to choose which production to use. Recursive-descent parsers ar

Re: Perl's parser and lexer will likely be in Perl (was Re: RFC 334 (v1) I'm {STILL} trying to understand this...)

2000-10-17 Thread David L. Nicol
Simon Cozens wrote: > This would have to take account of the fact that Perl's tokeniser is > aware of what's going on in the rest of perl. Consider > > print foo; > > What should the tokeniser return for "foo"? Is it a bareword? Is it a > subroutine call? Is it a class? Is it - heaven forbi

Re: Perl's parser and lexer will likely be in Perl (was Re: RFC 334 (v1) I'm {STILL} trying to understand this...)

2000-10-17 Thread John Porter
Simon Cozens wrote: > > Currently, the tokeniser and the lexer are a combined entity. Yes, in the vast majority of languages; so people get used to thinking that it has to be this way. > my preferred solution would be to have the tokenizer, > lexer and parser as a single, hand-crafted LR(k) m

Re: Perl's parser and lexer will likely be in Perl (was Re: RFC 334 (v1) I'm {STILL} trying to understand this...)

2000-10-17 Thread Simon Cozens
On Tue, Oct 17, 2000 at 11:22:02AM +0100, Nicholas Clark wrote: > [Seriously, I was under the impression that the perl tokenizer was > influenced by the state of the lexer] Currently, the tokeniser and the lexer are a combined entity. It doesn't have to be this way, though. At least, I don't thin

Re: Perl's parser and lexer will likely be in Perl (was Re: RFC 334 (v1) I'm {STILL} trying to understand this...)

2000-10-17 Thread Nicholas Clark
On Tue, Oct 17, 2000 at 11:00:35AM +0100, Simon Cozens wrote: > On Tue, Oct 17, 2000 at 10:37:24AM +0100, Simon Cozens wrote: > > What should the tokeniser return for "foo"? > > Uh, tokenizer != lexer. Insert coffee. Yes, writing a tokeniser in a regexp > should be very doable. To allow the lex

Re: Perl's parser and lexer will likely be in Perl (was Re: RFC 334 (v1) I'm {STILL} trying to understand this...)

2000-10-17 Thread Simon Cozens
On Tue, Oct 17, 2000 at 10:37:24AM +0100, Simon Cozens wrote: > What should the tokeniser return for "foo"? Uh, tokenizer != lexer. Insert coffee. Yes, writing a tokeniser in a regexp should be very doable. -- Building translators is good clean fun. -- T. Cheatham

Re: Perl's parser and lexer will likely be in Perl (was Re: RFC 334 (v1) I'm {STILL} trying to understand this...)

2000-10-17 Thread Simon Cozens
On Tue, Oct 17, 2000 at 03:56:20AM -0400, Adam Turoff wrote: > > We could learn quite a bit by looking through the code from > > Parse::RecDescent, switch.pm, and friends. Damian's done a lot of parsing > > (including parsing Perl) with Perl, so this would be a good place to start. It's time to d

Re: Perl's parser and lexer will likely be in Perl (was Re: RFC 334 (v1) I'm {STILL} trying to understand this...)

2000-10-17 Thread Adam Turoff
On Tue, Oct 17, 2000 at 06:53:47PM +1100, Jeremy Howard wrote: > Leon Brocard wrote: > > Hmmm, I wonder what kind of subset would be necessary - surely the > > most useful constructs are also the most complicated... > > We could learn quite a bit by looking through the code from > Parse::RecDescen

Re: Perl's parser and lexer will likely be in Perl (was Re: RFC 334 (v1) I'm {STILL} trying to understand this...)

2000-10-17 Thread Jeremy Howard
Leon Brocard wrote: > Bradley M. Kuhn sent the following bits through the ether: > > > It should be noted that in Larry's speech on Friday, he said that he wanted > > to write the Lexer and Parser for Perl in some subset of Perl. :) > > Is there a writeup somewhere for those who couldn't attend?