Custom interpreter in java
问题 Hi I want to write a program to be able to parse & execute some files The file consists of some custom commands (I want to be able to define commands and appropriate methods so when program see that command it should execute the appropriate method) It's grammar is not important for me; I just want to be able to define commands Something like a simple and small interpreter written in java. Is there any library for this purpose? Or I need to write by myself? Thanks 回答1: Java 6 (and newer) have