JAVACC装配

JAVACC安装
JAVACC:Java Compiler Compiler 是一个用JAVA开发的最受欢迎的语法分析生成器。这个分析生成器工具可以读取上下文无关且有着特殊意义的语法并把它转换成可以识别且匹配该语法的JAVA程序。它还提供JJTree等工具来帮助我们建立语法树。JavaCC plug-in:一个用于辅助JavaCC应用程序开发的Eclipse插件.
1.如下两种方式来安装JAVACC
注意eclipse的版本一定要在3.5以上
a) use this site as an update site in Eclipse :
add http://eclipse-javacc.sourceforge.net/ to your software update sites and follow the instructions.
b) you can download from the JavaCC Eclipse Plug-in site on Sourceforge the (zipped) update site file,
save it under a local directory, add this directory as a local update site and follow the instructions.
2. 在eclipse中新建一个java project
3. 右键点src目录新建other  ,找到Javacc Template File 新建.比如 test.jj
4. 右键点test.jj 选中Compile with JavaCC
   此时控制台会输出编译信息
相关网站:
   http://eclipse-javacc.sourceforge.net/
   http://www.cs.lmu.edu/~ray/notes/javacc/