-2

I know about CUP or javaCC or some other parser generators,

but I want to add the ability to understand a simple language to my project, without the need to configure a complex tool as CUP.

The language is something a little too complicated to be parsed with regular expressions, since I want to use operators:

|| && ( ) [ ]
4

2 回答 2

0

JRE 带有嵌入的 javascript 引擎。请参阅http://docs.oracle.com/javase/7/docs/api/javax/script/ScriptEngine.html

这里也有教程-> http://docs.oracle.com/javase/7/docs/technotes/guides/scripting/programmer_guide/

于 2013-11-05T10:42:17.123 回答
0

该功能是由一个名为PyParse的库为 Python 提供的。可能该库可以使用 Jython 进行集成。

于 2020-03-02T13:04:55.620 回答