本编程语言取得了当事人的授权.
关于LICENSE(许可协议_):
基于SATA开源,需要您在遵守MIT协议的基础上, star本项目,并发送邮件给作者(发啥都行
才能使用或修改源代码.
如果您仅仅使用二进制文件而不关心源代码,则不需要遵守上述规则.
暂时不支持Linux, 另外, 二进制文件名由JCP.exe
换为了jvc.exe
原因是,我们已经开发出了JLC(对于JCP来说,JLC更加高级,但也十分不稳定,JLC主要基于LLVM)的alpha版本
JLC推出公开版时将会叫做jvac.exe
,
JCM(编译器后端是手打的虚拟机嘤嘤嘤)将会叫做jcm.exe
最终版本的Jvav编译器是JRC(Jvav Rust Compiler), 由rust编写,叫做jvavc.exe
.
如果您想获得更好的开发体验(关键字高亮,快捷键自动编译等,自动补全正在开发)
可以在VSCode中搜索插件Jvavscode
,安装此插件后安装主程序即可ctrl+f5编译运行 (请注意重启VSCode)
如果您需要手动下载资源文件(一般情况下程序会自动下载,如果出现bug请联系我们) 请前往http://airk.gitee.io/jvavresourcecdn/
如果您并不关心源代码,只想使用Jvav编译程序, 请前往Jvav安装程序:https://gitee.com/Doxfer/jvav_auxiliary/tree/master/
$ g++ Jvav.cpp JVMplus.cpp -o jvc
或
$ clang++ Jvav.cpp JVMplus.cpp -o jvc
将本目录加入环境变量,在cmd中输入jvc init
点击编译后的可执行文件即可,或在cmd中输入jvc
同时,您也可以在cmd中直接使用jvc -c {源文件名}.jvav
在cmd中输入
jvc init
Jvav>settings -std 11 quit
严格模式默认关闭,开启会报变量未使用等错误 所有warning将在严格模式下变为error. 关闭严格模式如下.如需开启则将false改为true
Jvav>settings -strict=false quit
不会生成可执行文件,但会有正常的程序运行(输入 输出等)
$ Jvav> compile demo-cn.jvav
将会生成{executeFileName}.exe可执行文件
$ Jvav> jvins demo-cn.jvav {executeFileName}
P1. Failed to create folder .....
表示创建文件夹失败,很可能是您的C盘下面有重复目录,
解决方案是:
在C盘下面新建Jvav
文件夹,并在Jvav文件夹下新建resource
和lib
文件夹,在resource
文件夹下放入您在http://airk.gitee.io/jvavresourcecdn/identifier.res下载的identifier.res文件
P2. The identifier file is missing, please check if the identity.res file is in good condition.installing identifier library for your device.Your device has already had identifier library.Please re-execute the compile command. 表示您在编译前没有执行jvc init命令,在这个情况下,JCP将为您自动初始化,再次编译即可 解决方案是: 再次编译
P3. Compiler error or there is no g++ compiler environment! 可能是您的文件有语法错误,或您的设备中没有g++环境,在cmd中输入g++ -v,如果显示的是
'g++' is not recognized as an internal or external command, operable program or batch file.
那么请安装g++环境(事实上,如果您在 https://gitee.com/Doxfer/jvav_auxiliary/tree/master/ 中安装这个程序,将会为您自动添加g++环境)
P4. your os is linux. 你的操作系统为linux发行版(包括Deepin也是Linux发行版),目前暂不支持
以下内容不保证最新,请酌情阅读.
目录下的demo-cn.jvav
是一个关于Jvav语法的演示文档
JvavBegin
iNt mAiN(){ //iNt 为 整型变量
cHaR ch = 'r'; //cHaR 为 字面量(字符)
iNt n;
input n; //使用input 变量/字符串/字符/重载了">>"运算符的类对象 进行程序输入
output n magic 10; //output 变量/字符串/字符/重载了"<<"运算符的类对象 进行程序输出,
//并使用magic代替*(包括指针/解引用运算符和乘法的*都可以使用magic运算符)
goBack ZERO; //使用goBack 代替 return
//并使用0-10的任意数字的英文单词大写代表0-10,如 ZERO ONE TWO等
//除此之外,您可以使用if/else的大写字母IF/ELSE来进行条件控制
//像使用while那样使用Loop,像使用for那样使用ConLoop
}
JvavEnd
这是一个简单的JCP with jvins的demo 乱码问题正在修复
---------------------------------------------
| Jvav Program Ver.2 Pre0 |
| By Dr.ZhangHaoYang Programmer 30266 |
| The author of the JCP & Jvins: Amiriox |
| Enter'help'to get help!
|
| Online push updates are now supported! |
| Compile vav source ile are now supported! |
--------------------------------------------
Jvav>compile demo-cn.jvav
demo-cn.cpp: In function \'int main()\':
demo-cn.cpp:55:10: error: unused variable \'ch\' [-Werror=unused-variable]
cHaR ch = \'r\'; //cHaR 涓?瀛?1;31mm^~
cc1plus.exe: all warnings being treated as errors
deleting *.cpp
Compiler error or there is no g++
compiler environment!
Jvav>settings
tips: Warning: You are changing your settings
Please enter the Settings you want to change,
enter quit to quit:
-std
Input 11 or 14 or 17 for jvav standard version: 11
The standard has been set to 11
-strict=false
Strict Mode already been closed.
quit
Jvav>compile demo-cn.jvav
450
4500
3请按任意键继续. . .
Compile successfully.
Jvav>jvins demo-cn.jvav testins
Your execute file has been generated.
Compile successfully.
Jvav>exit
D:\CppProjects\DevelopingProjects\Public.MyJCP\JvavCompilePlatform>testins.exe
4502
45020
3请按任意键继续. . .
D:\CppProjects\DevelopingProjects\Public.MyJCP\JvavCompilePlatform>