grammaranalyzer.java

来自「Grammatica is a C# and Java parser gener」· Java 代码 · 共 1,243 行 · 第 1/3 页

JAVA
1,243
字号
    }    /**     * Called when entering a parse tree node.     *      * @param node           the node being entered     *      * @throws ParseException if the node analysis discovered errors     */    protected void enterHeaderPart(Production node)        throws ParseException {    }    /**     * Called when exiting a parse tree node.     *      * @param node           the node being exited     *      * @return the node to add to the parse tree, or     *         null if no parse tree should be created     *      * @throws ParseException if the node analysis discovered errors     */    protected Node exitHeaderPart(Production node)        throws ParseException {        return node;    }    /**     * Called when adding a child to a parse tree node.     *      * @param node           the parent node     * @param child          the child node, or null     *      * @throws ParseException if the node analysis discovered errors     */    protected void childHeaderPart(Production node, Node child)        throws ParseException {        node.addChild(child);    }    /**     * Called when entering a parse tree node.     *      * @param node           the node being entered     *      * @throws ParseException if the node analysis discovered errors     */    protected void enterHeaderDeclaration(Production node)        throws ParseException {    }    /**     * Called when exiting a parse tree node.     *      * @param node           the node being exited     *      * @return the node to add to the parse tree, or     *         null if no parse tree should be created     *      * @throws ParseException if the node analysis discovered errors     */    protected Node exitHeaderDeclaration(Production node)        throws ParseException {        return node;    }    /**     * Called when adding a child to a parse tree node.     *      * @param node           the parent node     * @param child          the child node, or null     *      * @throws ParseException if the node analysis discovered errors     */    protected void childHeaderDeclaration(Production node, Node child)        throws ParseException {        node.addChild(child);    }    /**     * Called when entering a parse tree node.     *      * @param node           the node being entered     *      * @throws ParseException if the node analysis discovered errors     */    protected void enterTokenPart(Production node)        throws ParseException {    }    /**     * Called when exiting a parse tree node.     *      * @param node           the node being exited     *      * @return the node to add to the parse tree, or     *         null if no parse tree should be created     *      * @throws ParseException if the node analysis discovered errors     */    protected Node exitTokenPart(Production node)        throws ParseException {        return node;    }    /**     * Called when adding a child to a parse tree node.     *      * @param node           the parent node     * @param child          the child node, or null     *      * @throws ParseException if the node analysis discovered errors     */    protected void childTokenPart(Production node, Node child)        throws ParseException {        node.addChild(child);    }    /**     * Called when entering a parse tree node.     *      * @param node           the node being entered     *      * @throws ParseException if the node analysis discovered errors     */    protected void enterTokenDeclaration(Production node)        throws ParseException {    }    /**     * Called when exiting a parse tree node.     *      * @param node           the node being exited     *      * @return the node to add to the parse tree, or     *         null if no parse tree should be created     *      * @throws ParseException if the node analysis discovered errors     */    protected Node exitTokenDeclaration(Production node)        throws ParseException {        return node;    }    /**     * Called when adding a child to a parse tree node.     *      * @param node           the parent node     * @param child          the child node, or null     *      * @throws ParseException if the node analysis discovered errors     */    protected void childTokenDeclaration(Production node, Node child)        throws ParseException {        node.addChild(child);    }    /**     * Called when entering a parse tree node.     *      * @param node           the node being entered     *      * @throws ParseException if the node analysis discovered errors     */    protected void enterTokenValue(Production node)        throws ParseException {    }    /**     * Called when exiting a parse tree node.     *      * @param node           the node being exited     *      * @return the node to add to the parse tree, or     *         null if no parse tree should be created     *      * @throws ParseException if the node analysis discovered errors     */    protected Node exitTokenValue(Production node)        throws ParseException {        return node;    }    /**     * Called when adding a child to a parse tree node.     *      * @param node           the parent node     * @param child          the child node, or null     *      * @throws ParseException if the node analysis discovered errors     */    protected void childTokenValue(Production node, Node child)        throws ParseException {        node.addChild(child);    }    /**     * Called when entering a parse tree node.     *      * @param node           the node being entered     *      * @throws ParseException if the node analysis discovered errors     */    protected void enterTokenHandling(Production node)        throws ParseException {    }    /**     * Called when exiting a parse tree node.     *      * @param node           the node being exited     *      * @return the node to add to the parse tree, or     *         null if no parse tree should be created     *      * @throws ParseException if the node analysis discovered errors     */    protected Node exitTokenHandling(Production node)        throws ParseException {        return node;    }    /**     * Called when adding a child to a parse tree node.     *      * @param node           the parent node     * @param child          the child node, or null     *      * @throws ParseException if the node analysis discovered errors     */    protected void childTokenHandling(Production node, Node child)        throws ParseException {        node.addChild(child);    }    /**     * Called when entering a parse tree node.     *      * @param node           the node being entered     *      * @throws ParseException if the node analysis discovered errors     */    protected void enterProductionPart(Production node)        throws ParseException {    }    /**     * Called when exiting a parse tree node.     *      * @param node           the node being exited     *      * @return the node to add to the parse tree, or     *         null if no parse tree should be created     *      * @throws ParseException if the node analysis discovered errors     */    protected Node exitProductionPart(Production node)        throws ParseException {        return node;    }    /**     * Called when adding a child to a parse tree node.     *      * @param node           the parent node     * @param child          the child node, or null     *      * @throws ParseException if the node analysis discovered errors     */    protected void childProductionPart(Production node, Node child)        throws ParseException {        node.addChild(child);    }    /**     * Called when entering a parse tree node.     *      * @param node           the node being entered     *      * @throws ParseException if the node analysis discovered errors     */    protected void enterProductionDeclaration(Production node)        throws ParseException {    }    /**     * Called when exiting a parse tree node.     *      * @param node           the node being exited     *      * @return the node to add to the parse tree, or     *         null if no parse tree should be created     *      * @throws ParseException if the node analysis discovered errors     */    protected Node exitProductionDeclaration(Production node)        throws ParseException {        return node;    }    /**     * Called when adding a child to a parse tree node.     *      * @param node           the parent node     * @param child          the child node, or null     *      * @throws ParseException if the node analysis discovered errors     */    protected void childProductionDeclaration(Production node, Node child)        throws ParseException {        node.addChild(child);    }    /**     * Called when entering a parse tree node.     *      * @param node           the node being entered     *      * @throws ParseException if the node analysis discovered errors     */    protected void enterProduction(Production node)        throws ParseException {    }    /**     * Called when exiting a parse tree node.     *      * @param node           the node being exited     *      * @return the node to add to the parse tree, or     *         null if no parse tree should be created     *      * @throws ParseException if the node analysis discovered errors     */    protected Node exitProduction(Production node)        throws ParseException {        return node;    }    /**     * Called when adding a child to a parse tree node.     *      * @param node           the parent node     * @param child          the child node, or null     *      * @throws ParseException if the node analysis discovered errors     */    protected void childProduction(Production node, Node child)        throws ParseException {        node.addChild(child);    }    /**     * Called when entering a parse tree node.     *      * @param node           the node being entered     *      * @throws ParseException if the node analysis discovered errors     */    protected void enterProductionAtom(Production node)        throws ParseException {    }    /**     * Called when exiting a parse tree node.     *      * @param node           the node being exited     *      * @return the node to add to the parse tree, or     *         null if no parse tree should be created     *      * @throws ParseException if the node analysis discovered errors     */    protected Node exitProductionAtom(Production node)        throws ParseException {        return node;    }    /**     * Called when adding a child to a parse tree node.     *      * @param node           the parent node     * @param child          the child node, or null     *      * @throws ParseException if the node analysis discovered errors     */    protected void childProductionAtom(Production node, Node child)        throws ParseException {        node.addChild(child);    }}

⌨️ 快捷键说明

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