在Linux上运行holyc源代码

secularize的Python项目详细描述


#holyc for linux
在Linux上运行holyc secularly

[![构建状态](http://ec2-54-162-194-49.compute-1.amazonaws.com/job/holyc for linux/job/master/badge/icon)](http://ec2-54-162-194-49.compute-1.amazonaws.com/job/holyc for linux/job/master/)
[![PYPI版本](https://badge.fury.io/py/secularize.svg)](https://badge.fury.io/py/secularize)


如果你用这个,你会死的。或者更糟的是,您当前的操作系统将被templeos替换。我只在“3.7-dev”上做过这个测试。


*s=3;

u0测试(i16 a,u8 b,f64 c){
print(“hello”);



>print(“nothinhing”);





>print(“s%s%s”,“你好”,“世界”);
i64 b=2.000;
````





>examples/test.c`
``````c ````c
>voidtest(简称a,无符号字符b,双c,双c)




<}

double pest(char d)
{
printf(“无”);
}


int main()
{
double*s=3;
printf(“%s%s”,“hello”,“world”);
long b=2.0;
}
`````

为此,请编写要转换为的c文件,然后运行“secularize dump ast name of file.c”。这将很好地将ast打印到json。


``sh
$cat examples/math.c
int main()
{
long a=3;
>long b=2;





$secularize dump ast examples/math.c
{
{
{{
“coord”:null,
“ext”:[
>{
{
{
{

nodetype”:“funcdef”,
>
“coord”:“示例/math.c:1:5”,
“decl”:{
“u nodetype”:“decl”、
“name”:“main”、
“quals”:[]、
“storage”:[]、
“funcspec”:[]、
“coord”:“examples/math.c:1:5”、
“type”:{
“u nodetype”:“funcdecl”、
“coord”:“examples/math.c:1:5”、
“type”:{
“节点类型”:“typedecl”、
“declname”:“main”、
“quals”:[]、
“coord”:“示例/math.c:1:5”、
“type”:{
“节点类型”:“identifierType”、
“names”:[
“int”
]、
“coord”:“示例/math.c:1:1”
}
},
“args”:null
},
“init”:null,
“bitsize”:null
},
“body”:{
“u nodetype”:“compound”,
“coord”:“examples/math.c:2:1”,
“block-items”:[
{
“u nodetype”:“decl”,
“name”:“a”,
“quals”:[],
“storage”:[],
“funcspec”:[],
“coord”:“examples/math.c:3:8”,
“type”:{
“u nodetype”:“typedecl”,
“declname”:“a”,
“quals”:[],
“coord”:“examples/math.c:3:8”,
“type”:{
“\u nodeType”:“identifierType”,
“names”:[
“long”
],
“coord”:“examples/math.c:3:3”
}
},
“init”:{
“\u nodeType”:“constant”,
“type”:“int”,
“value”:“3”,
“coord”:“examples/math.c:3:12”
},
“bitsize”:null
},
{
“\u nodetype”:“decl”,
“name”:“b”,
“quals”:[],
“storage”:[],
“funcspec”:[],
“coord”:“示例/数学C:4:8”,
“type”:{
“unodetype”:“typedecl”、
“declname”:“b”、
“quals”:[]、
“coord”:“examples/math.c:4:8”、
“type”:{
“unodetype”:“identifierType”、
“names”:[
“long”
]、
“coord”:“examples/math.c:4:3”
}
},
“init”:{
“unodetype”:“constant”,
“type”:“int”,
“value”:“2”,
“coord”:“examples/math.c:4:12”
},
“bitsize”:null
}
]
},
“param-decls”:null
}
]
}


````

处理它。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Android中Twitter共享的java xAuth身份验证?   带有@XmlAnyAttribute和方法的java Bug?(使用JAXB-RI)   安卓 ArrayAdapter导致java。lang.NullPointerException   java如何使用JExel从现有excel文件中删除工作表   java树映射随机停止正确返回值   使用switch和scanner类java使用用户选择   java JCalendar多天选择   Java文件zip正在创建损坏的文件   Ajax调用中的java未定义错误   java处理JSON更改信息的最佳方法   java JNI不适用于AppKit线程   java在运行时为JTable的特定行设置背景色   java如何在for循环中添加按钮?   java在getclass()方法之后强制转换对象