cardinal-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Cardinal-dev] Parsers


From: Anders Bengtsson
Subject: Re: [Cardinal-dev] Parsers
Date: 18 Nov 2002 22:08:43 +0100

Phil Tomson wrote:

> > http://jruby.sourceforge.net/
> >
> 
> I guess it's something to check out.
> 
> You say it's based on Matz's parser - did you actually take his yacc file
> and translate it somehow?  If not, how compliant is it?

It was done before my involvement in JRuby, but comparing the two syntax
files now they look very much alike. Syntax-wise we are completely 1.6
compatible as far as I know.
But the biggest challenge is probably not in the syntax itself, but in
lexical analysis, and other support code for parsing. The original lexer
is a bit hairy, something that JRuby has inherited. It is not generated,
but implemented directly. (If anyone creates a good Lex description for
Ruby, please let me know!) We have spent some time refactoring it, and
plan to keep doing that.
Then there is the issue of other parser support code, to keep track of
which local variable names are in use, etc., which is needed to build
the syntax tree.

Will you be implementing a Ruby interpreter using Parrot, or will you go
directly for byte-code generation? Right now I'm working on a JVM
byte-code compiler for JRuby, maybe I can contribute some experiences
from that to Cardinal later on.

/Anders
-- 

A n d e r s  B e n g t s s o n  |  address@hidden
Stockholm, Sweden               |

_____________________________________________________
Gratis e-mail resten av livet på www.yahoo.se/mail
Busenkelt!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]