develooper Front page | perl.bootstrap | Postings from July 2000

parse Perl in Perl? (was Re: specific plan (was Re: Working Group Proposal))

From:
Bradley M. Kuhn
Date:
July 22, 2000 06:51
Subject:
parse Perl in Perl? (was Re: specific plan (was Re: Working Group Proposal))
Message ID:
20000722095129.A16567@ebb.org
John Tobey wrote:
> Ken Fox <kfox@vulpes.com> wrote:

> > Because it's a good way to get an implementation with clearly defined
> > interfaces and simple structure without a lot of code. For example, I'd
> > love to have the Perl 6 parser and resulting parse tree hackable in
> > Perl without having to dive into C. IMHO the best way to achieve that is
> > to implement the parser in Perl. If we have a Perl parser in Perl, then
> > why wouldn't we slap a back-end on it and make it a Perl compiler? (Even
> > if it's just a subset of Perl it would still be *really* useful.)
 
> Yes.  Also, if we maintain both implementations, or at least some glue
> for Perl to hook into, we might get a Perl debugger in pure Perl.

> There is no way Perl6 will be written entirely in any dialect of Perl.

I definitely agree.

However, I have to agree that I would like to see the parser written in a
subset of Perl.

At the conference, Dan suggested that it's imperative that this subset of
Perl be source-to-source translatable into C.  Even pa GCC front-end wouldn't
work, because we want it to be compatible with other compilers.

Basically, my goal in that idea is to implement the parser in a maintainable
way that allows us to easily port Perl to new architectures (such as the
JVM).  I would very much like to have a parser that I can bootstrap into
native JVM code.  ;)

-- 
Bradley M. Kuhn  -  http://www.ebb.org/bkuhn



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