Java中的Ruby解析器 [英] Ruby parser in Java

查看:76
本文介绍了Java中的Ruby解析器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做的项目是用Java和解析器源代码文件编写的. (到目前为止的Java src).现在,我也想启用解析Ruby代码. 因此,我正在寻找Java中解析Ruby源代码的解析器.

The project I'm doing is written in Java and parsers source code files. (Java src up to now). Now I'd like to enable parsing Ruby code as well. Therefore I am looking for a parser in Java that parses Ruby source code.

到目前为止,我唯一能找到的就是Ruby中的Ruby解析器(ParseTree和RubyParser ...). 我也许可以用JRuby中的Ruby解析器解析我想要的源文件,然后从那里访问我的Java东西. 但这意味着我将无法重用许多以前编写的Java代码.

The only thing I have been able to find up to now are Ruby parsers in Ruby (ParseTree and RubyParser...). I could maybe parse the source files I want with a Ruby parser in JRuby, and then access my Java stuff from there. But that would mean that I will not be able to reuse a lot of my previously written Java code.

在Java中是否有一个不错的Ruby解析器,难道我找不到它吗?还是有人看到更好的解决方案?

Is there a decent Ruby parser in Java out there and have I just not be able to find it? Or does someone see a better solution?

推荐答案

请参见 http://kenai .com/projects/jruby-parser/

这篇关于Java中的Ruby解析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆