arithmeticanalyzer.java
来自「Grammatica is a C# and Java parser gener」· Java 代码 · 共 610 行 · 第 1/2 页
JAVA
610 行
* @param node the node being entered * * @throws ParseException if the node analysis discovered errors */ protected void enterRightParen(Token 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 exitRightParen(Token node) throws ParseException { return node; } /** * Called when entering a parse tree node. * * @param node the node being entered * * @throws ParseException if the node analysis discovered errors */ protected void enterNumber(Token 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 exitNumber(Token node) throws ParseException { return node; } /** * Called when entering a parse tree node. * * @param node the node being entered * * @throws ParseException if the node analysis discovered errors */ protected void enterIdentifier(Token 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 exitIdentifier(Token node) throws ParseException { return node; } /** * Called when entering a parse tree node. * * @param node the node being entered * * @throws ParseException if the node analysis discovered errors */ protected void enterExpression(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 exitExpression(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 childExpression(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 enterExpressionRest(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 exitExpressionRest(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 childExpressionRest(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 enterTerm(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 exitTerm(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 childTerm(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 enterTermRest(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 exitTermRest(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 childTermRest(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 enterFactor(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 exitFactor(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 childFactor(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 enterAtom(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 exitAtom(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 childAtom(Production node, Node child) throws ParseException { node.addChild(child); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?