神刀安全网

ANTLR (ANother Tool for Language Recognition)

OS X
$ cd /usr/local/lib $ sudo curl -O http://www.antlr.org/download/antlr-4.5.3-complete.jar $ export CLASSPATH=".:/usr/local/lib/antlr-4.5.3-complete.jar:$CLASSPATH" $ alias antlr4='java -jar /usr/local/lib/antlr-4.5.3-complete.jar' $ alias grun='java org.antlr.v4.gui.TestRig'

LINUX
$ cd /usr/local/lib $ wget http://www.antlr.org/download/antlr-4.5.3-complete.jar $ export CLASSPATH=".:/usr/local/lib/antlr-4.5.3-complete.jar:$CLASSPATH" $ alias antlr4='java -jar /usr/local/lib/antlr-4.5.3-complete.jar' $ alias grun='java org.antlr.v4.gui.TestRig'

Windows
  1. Download http://antlr.org/download/antlr-4.5.3-complete.jar .
  2. Add antlr4-complete.jar to CLASSPATH, either:
    • Permanently: Using System Properties dialog > Environment variables > Create or append to CLASSPATH variable
    • Temporarily, at command line:
      SET CLASSPATH=.;C:/Javalib/antlr4-complete.jar;%CLASSPATH%
  3. Create batch commands for ANTLR Tool, TestRig in dir in PATH
    antlr4.bat: java org.antlr.v4.Tool %*  grun.bat:   java org.antlr.v4.gui.TestRig %*

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » ANTLR (ANother Tool for Language Recognition)

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址