⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 example04_syntaxtree.xml

📁 这是一个用java语言编写的小型C语言的语法分析器。
💻 XML
字号:
<?xml version="1.0"?>
<root>
    <tree line="3" nodetype="ClassDecl" nodestring="MyError">
        <child>
            <tree line="4" nodetype="VarDecl" nodestring="data" vartype="int" modifier="private" isArray="0" />
            <tree line="5" nodetype="FunDecl" nodestring="MyError" rettype="void" modifier="constructor">
                <child>
                    <tree line="5" nodetype="Para" nodestring="msg" vartype="int" isArray="0" />
                </child>
                <child>
                    <tree line="7" nodetype="AssignStm" nodestring="=">
                        <child>
                            <tree line="7" nodetype="VarID" nodestring="data" isArray="0" />
                        </child>
                        <child>
                            <tree line="7" nodetype="VarID" nodestring="msg" isArray="0" />
                        </child>
                    </tree>
                </child>
            </tree>
        </child>
    </tree>
    <tree line="11" nodetype="ClassDecl" nodestring="ChildError">
        <child>
            <tree line="11" nodetype="BaseClsID" nodestring="MyError" modifier="public" />
        </child>
        <child>
            <tree line="13" nodetype="VarDecl" nodestring="childdata" vartype="int" modifier="private" isArray="0" />
            <tree line="14" nodetype="FunDecl" nodestring="ChildError" rettype="void" modifier="constructor">
                <child>
                    <tree line="14" nodetype="Para" nodestring="a" vartype="int" isArray="0" />
                    <tree line="14" nodetype="Para" nodestring="b" vartype="int" isArray="0" />
                </child>
                <child>
                    <tree line="16" nodetype="AssignStm" nodestring="=">
                        <child>
                            <tree line="16" nodetype="VarID" nodestring="data" isArray="0" />
                        </child>
                        <child>
                            <tree line="16" nodetype="VarID" nodestring="a" isArray="0" />
                        </child>
                    </tree>
                    <tree line="17" nodetype="AssignStm" nodestring="=">
                        <child>
                            <tree line="17" nodetype="VarID" nodestring="childdata" isArray="0" />
                        </child>
                        <child>
                            <tree line="17" nodetype="VarID" nodestring="b" isArray="0" />
                        </child>
                    </tree>
                </child>
            </tree>
        </child>
    </tree>
    <tree line="21" nodetype="FunDecl" nodestring="f" rettype="void">
        <child>
            <tree line="22" nodetype="ThrowStm" nodestring="throw">
                <child>
                    <tree line="22" nodetype="VarID" nodestring="ChildError">
                        <child>
                            <tree line="22" nodetype="ConstID" nodestring="0" />
                            <tree line="22" nodetype="ConstID" nodestring="1" />
                        </child>
                    </tree>
                </child>
            </tree>
        </child>
    </tree>
    <tree line="25" nodetype="FunDecl" nodestring="main" rettype="void">
        <child>
            <tree line="26" nodetype="TryStm" nodestring="try">
                <child>
                    <tree line="27" nodetype="FunCall" nodestring="f" />
                </child>
                <child>
                    <tree line="29" nodetype="CatchStm" nodestring="catch">
                        <child>
                            <tree line="29" nodetype="Para" nodestring="e" vartype="MyError" isArray="0" />
                        </child>
                        <child>
                            <tree line="31" nodetype="AssignStm" nodestring="=">
                                <child>
                                    <tree line="31" nodetype="ObjectVar" nodestring="e">
                                        <child>
                                            <tree line="31" nodetype="VarID" nodestring="data" isArray="0" />
                                        </child>
                                    </tree>
                                </child>
                                <child>
                                    <tree line="31" nodetype="ConstID" nodestring="0" />
                                </child>
                            </tree>
                        </child>
                    </tree>
                </child>
            </tree>
        </child>
    </tree>
</root>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -