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

📄 example05_syntaxtree.xml

📁 这是一个用java语言编写的小型C语言的语法分析器。
💻 XML
📖 第 1 页 / 共 2 页
字号:
<?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>
            <tree line="9" nodetype="FunDecl" nodestring="getData" rettype="int" modifier="public" isVirtual="1">
                <child>
                    <tree line="11" nodetype="AssignStm" nodestring="=">
                        <child>
                            <tree line="11" nodetype="ThisStm" nodestring="this">
                                <child>
                                    <tree line="11" nodetype="VarID" nodestring="data" />
                                </child>
                            </tree>
                        </child>
                        <child>
                            <tree line="11" nodetype="SUB" nodestring="-">
                                <child>
                                    <tree line="11" nodetype="ThisStm" nodestring="this">
                                        <child>
                                            <tree line="11" nodetype="VarID" nodestring="data" />
                                        </child>
                                    </tree>
                                </child>
                                <child>
                                    <tree line="11" nodetype="ConstID" nodestring="1" />
                                </child>
                            </tree>
                        </child>
                    </tree>
                    <tree line="12" nodetype="ReturnStm" nodestring="return">
                        <child>
                            <tree line="12" nodetype="ThisStm" nodestring="this">
                                <child>
                                    <tree line="12" nodetype="VarID" nodestring="data" />
                                </child>
                            </tree>
                        </child>
                    </tree>
                </child>
            </tree>
            <tree line="14" nodetype="FunDecl" nodestring="setData" rettype="void" modifier="public" isVirtual="1">
                <child>
                    <tree line="14" nodetype="Para" nodestring="d" vartype="int" isArray="0" />
                </child>
                <child>
                    <tree line="16" nodetype="AssignStm" nodestring="=">
                        <child>
                            <tree line="16" nodetype="ThisStm" nodestring="this">
                                <child>
                                    <tree line="16" nodetype="VarID" nodestring="data" />
                                </child>
                            </tree>
                        </child>
                        <child>
                            <tree line="16" nodetype="VarID" nodestring="d" isArray="0" />
                        </child>
                    </tree>
                </child>
            </tree>
        </child>
    </tree>
    <tree line="19" nodetype="ClassDecl" nodestring="ChildError">
        <child>
            <tree line="19" nodetype="BaseClsID" nodestring="MyError" modifier="public" />
        </child>
        <child>
            <tree line="21" nodetype="VarDecl" nodestring="childdata" vartype="int" modifier="private" isArray="0" />
            <tree line="22" nodetype="FunDecl" nodestring="ChildError" rettype="void" modifier="constructor">
                <child>
                    <tree line="22" nodetype="Para" nodestring="a" vartype="int" isArray="0" />
                    <tree line="22" nodetype="Para" nodestring="b" vartype="int" isArray="0" />
                </child>
                <child>
                    <tree line="24" nodetype="AssignStm" nodestring="=">
                        <child>
                            <tree line="24" nodetype="VarID" nodestring="data" isArray="0" />
                        </child>
                        <child>
                            <tree line="24" nodetype="VarID" nodestring="a" isArray="0" />
                        </child>
                    </tree>
                    <tree line="25" nodetype="AssignStm" nodestring="=">
                        <child>
                            <tree line="25" nodetype="VarID" nodestring="childdata" isArray="0" />
                        </child>
                        <child>
                            <tree line="25" nodetype="VarID" nodestring="b" isArray="0" />
                        </child>
                    </tree>
                </child>
            </tree>
            <tree line="27" nodetype="FunDecl" nodestring="getData" rettype="int" modifier="public">
                <child>
                    <tree line="29" nodetype="AssignStm" nodestring="=">
                        <child>
                            <tree line="29" nodetype="VarID" nodestring="data" isArray="0" />
                        </child>
                        <child>
                            <tree line="29" nodetype="ADD" nodestring="+">
                                <child>
                                    <tree line="29" nodetype="VarID" nodestring="data" isArray="0" />
                                </child>
                                <child>
                                    <tree line="29" nodetype="ThisStm" nodestring="this">
                                        <child>
                                            <tree line="29" nodetype="VarID" nodestring="childdata" />
                                        </child>
                                    </tree>
                                </child>
                            </tree>
                        </child>
                    </tree>
                    <tree line="30" nodetype="ReturnStm" nodestring="return">
                        <child>
                            <tree line="30" nodetype="VarID" nodestring="data" isArray="0" />
                        </child>
                    </tree>
                </child>
            </tree>
            <tree line="32" nodetype="FunDecl" nodestring="getChilddata" rettype="int" modifier="public">
                <child>
                    <tree line="34" nodetype="ReturnStm" nodestring="return">
                        <child>
                            <tree line="34" nodetype="ThisStm" nodestring="this">
                                <child>
                                    <tree line="34" nodetype="VarID" nodestring="childdata" />
                                </child>
                            </tree>
                        </child>
                    </tree>
                </child>
            </tree>
            <tree line="36" nodetype="FunDecl" nodestring="setData" rettype="int" modifier="public">
                <child>
                    <tree line="36" nodetype="Para" nodestring="d" vartype="int" isArray="0" />
                </child>
                <child>
                    <tree line="38" nodetype="AssignStm" nodestring="=">
                        <child>
                            <tree line="38" nodetype="ThisStm" nodestring="this">
                                <child>
                                    <tree line="38" nodetype="VarID" nodestring="childdata" />
                                </child>
                            </tree>
                        </child>
                        <child>
                            <tree line="38" nodetype="VarID" nodestring="d" isArray="0" />
                        </child>
                    </tree>
                </child>
            </tree>
        </child>
    </tree>
    <tree line="42" nodetype="FunDecl" nodestring="f" rettype="void">
        <child>
            <tree line="43" nodetype="VarDecl" nodestring="d" vartype="int" modifier="" isArray="0" />
            <tree line="44" nodetype="VarDecl" nodestring="me" vartype="MyError" modifier="" isArray="0">
                <child>
                    <tree line="44" nodetype="ConstID" nodestring="0" />
                </child>
            </tree>
            <tree line="45" nodetype="AssignStm" nodestring="=">
                <child>
                    <tree line="45" nodetype="VarID" nodestring="d" isArray="0" />
                </child>
                <child>
                    <tree line="45" nodetype="ObjectVar" nodestring="me">
                        <child>
                            <tree line="45" nodetype="FunCall" nodestring="getData" />
                        </child>
                    </tree>
                </child>
            </tree>
            <tree line="46" nodetype="IfElseStm" nodestring="if">
                <child>
                    <tree line="46" nodetype="RGT" nodestring="&gt;">

⌨️ 快捷键说明

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