Wilson Bilkovich wrote:
> On 12/2/06, Hanan Mneimneh <[EMAIL PROTECTED]> wrote:
>> Hello
>>
>> I need to generate a state machine for a web application developed using
>> ruby on rails. For this purpose, I need to dynamically parse the controller
>> which is a ruby class. Is there a decent parser to parse ruby code????????
>>
> 
> You can use the ParseTree or sydparse gems for this.

If you'd like something that works on JRuby as well, parsetree is 
probably a good choice; there's a clone of parsetree in development for 
JRuby.

However you should keep in mind that basing logic in your application 
directly on the structure of the AST is unlikely to be portable forever. 
The AST is bound to change.

-- 
Charles Oliver Nutter, JRuby Core Developer
Blogging on Ruby and Java @ headius.blogspot.com
Help spec out Ruby today! @ www.headius.com/rubyspec
[EMAIL PROTECTED] -- [EMAIL PROTECTED]
_______________________________________________
Rubygrammar-grammarians mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rubygrammar-grammarians

Reply via email to