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?
Hmmm,
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 drag
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 lexer to
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 think
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)
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 are
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 sure we
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
"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++.
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...
Perl
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 likely
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,
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).
Larry
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 of a
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 writing
15 matches
Mail list logo