开发者

Is there a parser combinator as awesome as the Scala one for Java?

I read the tutorial on parser co开发者_如何转开发mbinators for Scala, and I was wondering if there's something as "magical" for Java. The best thing I could find was JParsec.


JParsec seems to do the trick, but I cannot comment on its quality. Java has no operator overloading, which is the syntactic part of the "magic" in parser combinators.

You could also use Scala to implement parsers, then call them from Java. But then the benefit over a code generator such as JavaCC isn't as great.


I've come to enjoy jParsec, even if it isn't as hot as, say, the Newspeak parser combinator. We've shot an aweseome video tutorial on how to use JParsec.


Javacc, grammatica by percederberg.. Any one of these can be used.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜