chengxu_syntaxtree.xml
来自「自定义简单语法类C语言编译器」· XML 代码 · 共 168 行
XML
168 行
<?xml version="1.0"?>
<root>
<tree line="1" nodetype="VarDecl" nodestring="a" vartype="int" isArray="0" />
<tree line="2" nodetype="VarDecl" nodestring="b" vartype="int" isArray="0" />
<tree line="3" nodetype="FunDecl" nodestring="fun1" rettype="int" >
<child>
<tree line="3" nodetype="Para" nodestring="a" vartype="int" isArray="0" />
<tree line="3" nodetype="Para" nodestring="b" vartype="int" isArray="0" />
</child>
<child>
<tree line="5" nodetype="AssignStm" nodestring="=" >
<child>
<tree line="5" nodetype="VarID" nodestring="a" isArray="0" />
</child>
<child>
<tree line="5" nodetype="ADD" nodestring="+" >
<child>
<tree line="5" nodetype="VarID" nodestring="a" isArray="0" />
</child>
<child>
<tree line="5" nodetype="ConstID" nodestring="5" />
</child>
</tree>
</child>
</tree>
<tree line="6" nodetype="AssignStm" nodestring="=" >
<child>
<tree line="6" nodetype="VarID" nodestring="b" isArray="0" />
</child>
<child>
<tree line="6" nodetype="ADD" nodestring="+" >
<child>
<tree line="6" nodetype="VarID" nodestring="b" isArray="0" />
</child>
<child>
<tree line="6" nodetype="ConstID" nodestring="2" />
</child>
</tree>
</child>
</tree>
<tree line="7" nodetype="IfStm" nodestring="if" >
<child>
<tree line="7" nodetype="RGT" nodestring=">" >
<child>
<tree line="7" nodetype="VarID" nodestring="a" isArray="0" />
</child>
<child>
<tree line="7" nodetype="ConstID" nodestring="8" />
</child>
</tree>
</child>
<child>
<tree line="9" nodetype="WhileStm" nodestring="while" >
<child>
<tree line="9" nodetype="RGT" nodestring=">" >
<child>
<tree line="9" nodetype="VarID" nodestring="b" isArray="0" />
</child>
<child>
<tree line="9" nodetype="ConstID" nodestring="0" />
</child>
</tree>
</child>
<child>
<tree line="10" nodetype="AssignStm" nodestring="=" >
<child>
<tree line="10" nodetype="VarID" nodestring="b" isArray="0" />
</child>
<child>
<tree line="10" nodetype="SUB" nodestring="-" >
<child>
<tree line="10" nodetype="VarID" nodestring="b" isArray="0" />
</child>
<child>
<tree line="10" nodetype="ConstID" nodestring="2" />
</child>
</tree>
</child>
</tree>
</child>
</tree>
<tree line="11" nodetype="AssignStm" nodestring="=" >
<child>
<tree line="11" nodetype="VarID" nodestring="a" isArray="0" />
</child>
<child>
<tree line="11" nodetype="ADD" nodestring="+" >
<child>
<tree line="11" nodetype="VarID" nodestring="a" isArray="0" />
</child>
<child>
<tree line="11" nodetype="VarID" nodestring="b" isArray="0" />
</child>
</tree>
</child>
</tree>
</child>
</tree>
<tree line="13" nodetype="ReturnStm" nodestring="return" >
<child>
<tree line="13" nodetype="VarID" nodestring="a" isArray="0" />
</child>
</tree>
</child>
</tree>
<tree line="15" nodetype="FunDecl" nodestring="main" rettype="int" >
<child>
<tree line="17" nodetype="VarDecl" nodestring="c" vartype="int" isArray="0" />
<tree line="18" nodetype="VarDecl" nodestring="d" vartype="int" isArray="0" />
<tree line="19" nodetype="AssignStm" nodestring="=" >
<child>
<tree line="19" nodetype="VarID" nodestring="a" isArray="0" />
</child>
<child>
<tree line="19" nodetype="ConstID" nodestring="5" />
</child>
</tree>
<tree line="20" nodetype="AssignStm" nodestring="=" >
<child>
<tree line="20" nodetype="VarID" nodestring="b" isArray="0" />
</child>
<child>
<tree line="20" nodetype="VarID" nodestring="a" isArray="0" />
</child>
</tree>
<tree line="21" nodetype="AssignStm" nodestring="=" >
<child>
<tree line="21" nodetype="VarID" nodestring="c" isArray="0" />
</child>
<child>
<tree line="21" nodetype="MUL" nodestring="*" >
<child>
<tree line="21" nodetype="VarID" nodestring="a" isArray="0" />
</child>
<child>
<tree line="21" nodetype="ADD" nodestring="+" >
<child>
<tree line="21" nodetype="VarID" nodestring="a" isArray="0" />
</child>
<child>
<tree line="21" nodetype="VarID" nodestring="b" isArray="0" />
</child>
</tree>
</child>
</tree>
</child>
</tree>
<tree line="22" nodetype="AssignStm" nodestring="=" >
<child>
<tree line="22" nodetype="VarID" nodestring="d" isArray="0" />
</child>
<child>
<tree line="22" nodetype="FunCall" nodestring="fun1" >
<child>
<tree line="22" nodetype="VarID" nodestring="a" isArray="0" />
<tree line="22" nodetype="VarID" nodestring="c" isArray="0" />
</child>
</tree>
</child>
</tree>
<tree line="23" nodetype="ReturnStm" nodestring="return" >
<child>
<tree line="23" nodetype="ConstID" nodestring="1" />
</child>
</tree>
</child>
</tree>
</root>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?