Skip to content

An open source cross-platform programming language focused on efficiency.

Notifications You must be signed in to change notification settings

kulics-works/feel-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

简介

Feel-Javacript,基于Feel极简风格的语法,使用 antlr 实现一个 javascript 版本的语法编译器。

导航

get starting

1、安装 antlr4 (Mac oSX 版本)

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

2、安装 antlr4ts

npm install antlr4ts --save
npm install antlr4ts-cli --save-dev

3、修改配置文件 package.json,填写如下内容

"scripts": {
  "antlr": "antlr4ts -visitor src/compiler/Xsjs.g4 -o src/compiler/generate -Xexact-output-dir",
}

4、运行

npm run watch
npm run start

参考

antlr4 编译选项

typescript 编译选项

About

An open source cross-platform programming language focused on efficiency.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published