freeride-devel
[Top][All Lists]
Advanced

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

Re: [FR-devel] Source parser changes


From: Laurent Julliard
Subject: Re: [FR-devel] Source parser changes
Date: Wed, 02 Jul 2003 22:28:04 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030529

Richard Kilmer wrote:
All,

I have been quite worried for some time regarding the source parser (ripper) that we were using. Specifically, it was built off of a 2 year old Ruby parser, and it has problems running under 1.8 on some platforms. Since there is no Ruby parser that we can use, I wrote a basic parser that creates the source parser tree by simply using the indent levels of lines...and matches on

class <name>

module <name>

def <name>

It uses regex's and is quite fast. As an optimization, I do a SHA1 hash of the parsed data and if it has not changed it returns the prior parse tree. To test it load a couple of the big ruby files (like databus.rb, etc) and open the source parser and flip back and forth between files. I added files to the rubyide_tools_fox_source_browser and rubyide_tools_source_parser plugins and change the plugin.yaml files to point to these...so it is possible to go back to the old ripper-based parser by simply changing these files.

If a couple of folks could use this and let me know how it works for you it would be great.

-rich

I have upgraded my cvs working copy. Seems to work fine so far. One of the BIG advantage of this new parser written in Ruby is that it removes the dependency on the sole platform dependent library that we were using (ripper.so) and has been the cause of 99.99% of the installation problems

Good job!

Laurent
--
Laurent JULLIARD
http://www.moldus.org/~laurent





reply via email to

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