[英]How to use Java to parse Clojure grammar and visualize it
I need to parse Clojure code (not really long) inside Java and build a tree with tokens. 我需要在Java内部解析Clojure代码(不是很长),并用令牌构建一棵树。 is there a possibility to use standard Clojure lib for that? 是否有可能为此使用标准Clojure库? What is the easiest way to display these data visually? 直观显示这些数据的最简单方法是什么?
Use clojure.lang.RT
to require clojure.edn
and use clojure.edn/read
to get a Clojure data structure from a source string or file without evaluating it. 使用clojure.lang.RT
要求clojure.edn
并使用clojure.edn/read
从源字符串或文件获取Clojure数据结构,而不对其求值。 A guide to using clojure.lang.RT from Java . Java使用clojure.lang.RT的指南 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.