是否可以将树(数据结构)传递给Clojure并对其进行处理? [英] is it possible to pass a tree (data structure) to clojure and work on it?

查看:76
本文介绍了是否可以将树(数据结构)传递给Clojure并对其进行处理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

树结构,然后使用该数据结构对其进行处理.这棵树是由ANTLR解析代码后形成的.

tree structure build by from java code passed to clojure REPL and then using that data structure work on it. this tree is formed by ANTLR after parsing the code.

推荐答案

您可以在项目中包含生成树的java类,并从REPL调用它以获取对象.然后Clojure那个对象到您的内心满足:)

you could include the java class that produces the tree in your project and call it from the REPL to get an Object. then Clojure that Object to your hearts content :)

您唯一需要做出的真正决定就是控制Clojure中的start,然后调用java或其他方式.我个人觉得从Clojure开始更容易,因为我觉得与Leavening一起工作比与Maven合作更愉快.

The only real decision you need to make is should control start in Clojure which then calls java or the other way around. I personally find it easier to start in Clojure because I find leiningen more pleasant to work with than maven.

这篇关于是否可以将树(数据结构)传递给Clojure并对其进行处理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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