[pypy-dev] Parsing in PyPy (and runicode)

Leonardo Santagada santagada at gmail.com
Thu Feb 26 19:29:15 CET 2009


On Feb 26, 2009, at 2:40 PM, Carl Friedrich Bolz wrote:

> Hi Leonardo,
>
> Leonardo Santagada wrote:
>> I remember some time ago people on #pypy were talking about redoing
>> the parser for python because it was not good enough or something.
>> Also the parser generator that cfbolz wrote doesn't support unicode
>> and was not suited for automatic-semicolon-insertion.
>>
>> I think it would be good for a javascript parser that supports  
>> unicode
>> because the specs call for it and maybe it would be good to python  
>> too
>> (don't know about prolog/smalltalk though). What would be better, to
>> have a parser generator that supports unicode or just everyone write
>> their own recursive descendant parser by hand?
>
> Are you sure that we shouldn't rather try to steal one of the existing
> JS parsers? If license really is a problem, maybe we could ask the
> authors whether they would be fine with relicensing under MIT.


All the ones that come from narcissus are actually just licensed by  
Mozilla, so we should talk to them. But I don't know if it is complete  
and without bugs (I think there was one with narcissus but I don't  
remember what was it) so maybe we should use one used by a functioning  
js interpreters like Rhino of JavascriptCore (Squirrelfish Extreme or  
whatever its name is now). Both uses an incompatible license, and I  
think it is on purpose... so I don't know how to deal with this.

The V8 parser is BSD so I think it is compatible, but it will be some  
work to convert it from c++ to rpython (http://code.google.com/p/v8/source/browse/trunk/src/parser.cc 
  )

My final answer would be, "I don't know, what do you guys think?".

--
Leonardo Santagada
santagada at gmail.com






More information about the Pypy-dev mailing list