/** * 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 * * @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 * * @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 * * @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 * * @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 * * @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 * * @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 * * @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 * * @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 * * @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 * * @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); }}
java编译器语法分析源码,grammaranalyzer.java 源代码在线查看 - Grammatica是一个C#和Java的语法分析程序生成器(编译器的编译器)。它可以用LL(k)语法创建可读...
最新推荐文章于 2024-03-14 11:45:27 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)