develooper Front page | perl.perl6.internals.api.parser | Postings from December 2000

Re: Now, to try again...

Thread Previous | Thread Next
From:
Simon Cozens
Date:
December 18, 2000 02:53
Subject:
Re: Now, to try again...
Message ID:
20001217170654.D13904@deep-dark-truthful-mirror.perlhacker.org
Damn this is annoying. Is it perl.org that's dropping mail or me?

----- Forwarded message from Simon Cozens <simon@cozens.net> -----
On Sat, Dec 16, 2000 at 08:09:23PM +0000, David Grove wrote:
> Thinking of just the parser as a single entity seems to me to be headed into
> trouble unless we can define in advance what type of role these dialects
> will play in the language, and at what point they merge into a single entity
> and how.

I can understand each word in this sentence, but put together they don't
appear to make much sense.

I think you're getting needlessly hung up on this idea of "dialects", whatever
you seem to believe they are. We're not parsing dialects, we're parsing
*COMPLETELY DIFFERENT THINGS*. 

Python is not a dialect of Perl. 

There are a number of ways we could do this. We could allow the user to use
source filters to turn Python into Perl, which is what happens currently, with
some success. We could allow the user to write their own parser and turn
Python into an op tree, which allows much greater flexibility. Or, we could
allow the user to override parts of the parser's operation, allowing for ease
of modification. Or all three.

> (or worse, multiple "parser/lexer/tokenizer single-entity parts"...
> meaning redundant duplication of extra effort over and over again
> repeatedly).

Huh? I'm just thinking of a system of callbacks. You can overload operators in
Perl, and while this is slightly confusing, it isn't earth-shattering. Now,
I'm hoping that you'll be able to overload parser operations in Perl 6.

----- End forwarded message -----
-- 
>Almost any animal is capable learning a stimulus/response association,
>given enough repetition.
Experimental observation suggests that this isn't true if double-clicking
is involved. - Lionel, Malcolm Ray, asr.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About