X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.basicexpression%2Fsrc%2Forg%2Fsimantics%2Fbasicexpression%2Fanalysis%2FDepthFirstAdapter.java;h=6eb4b0bc9f59b0ad9df3049a96ba222686c95350;hp=75b8c0e402c5440a4d753a1eac086fc2fcc1ce5f;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.basicexpression/src/org/simantics/basicexpression/analysis/DepthFirstAdapter.java b/bundles/org.simantics.basicexpression/src/org/simantics/basicexpression/analysis/DepthFirstAdapter.java index 75b8c0e40..6eb4b0bc9 100644 --- a/bundles/org.simantics.basicexpression/src/org/simantics/basicexpression/analysis/DepthFirstAdapter.java +++ b/bundles/org.simantics.basicexpression/src/org/simantics/basicexpression/analysis/DepthFirstAdapter.java @@ -1,583 +1,583 @@ -/* This file was generated by SableCC (http://www.sablecc.org/). */ - -package org.simantics.basicexpression.analysis; - -import java.util.*; -import org.simantics.basicexpression.node.*; - -public class DepthFirstAdapter extends AnalysisAdapter -{ - - protected Throwable exception; - - public void except(Throwable exception) { - this.exception = exception; - } - - public void inStart(Start node) - { - defaultIn(node); - } - - public void outStart(Start node) - { - defaultOut(node); - } - - public void defaultIn(@SuppressWarnings("unused") Node node) - { - // Do nothing - } - - public void defaultOut(@SuppressWarnings("unused") Node node) - { - // Do nothing - } - - @Override - public void caseStart(Start node) - { - inStart(node); - node.getPExpression().apply(this); - node.getEOF().apply(this); - outStart(node); - } - - public void inAMultExpression(AMultExpression node) - { - defaultIn(node); - } - - public void outAMultExpression(AMultExpression node) - { - defaultOut(node); - } - - @Override - public void caseAMultExpression(AMultExpression node) - { - inAMultExpression(node); - if(node.getMultiplicative() != null) - { - node.getMultiplicative().apply(this); - } - outAMultExpression(node); - } - - public void inAPlusExpression(APlusExpression node) - { - defaultIn(node); - } - - public void outAPlusExpression(APlusExpression node) - { - defaultOut(node); - } - - @Override - public void caseAPlusExpression(APlusExpression node) - { - inAPlusExpression(node); - if(node.getLeft() != null) - { - node.getLeft().apply(this); - } - if(node.getPlus() != null) - { - node.getPlus().apply(this); - } - if(node.getRight() != null) - { - node.getRight().apply(this); - } - outAPlusExpression(node); - } - - public void inAMinusExpression(AMinusExpression node) - { - defaultIn(node); - } - - public void outAMinusExpression(AMinusExpression node) - { - defaultOut(node); - } - - @Override - public void caseAMinusExpression(AMinusExpression node) - { - inAMinusExpression(node); - if(node.getExpression() != null) - { - node.getExpression().apply(this); - } - if(node.getMinus() != null) - { - node.getMinus().apply(this); - } - if(node.getMultiplicative() != null) - { - node.getMultiplicative().apply(this); - } - outAMinusExpression(node); - } - - public void inAUnaryMultiplicative(AUnaryMultiplicative node) - { - defaultIn(node); - } - - public void outAUnaryMultiplicative(AUnaryMultiplicative node) - { - defaultOut(node); - } - - @Override - public void caseAUnaryMultiplicative(AUnaryMultiplicative node) - { - inAUnaryMultiplicative(node); - if(node.getUnary() != null) - { - node.getUnary().apply(this); - } - outAUnaryMultiplicative(node); - } - - public void inAMultMultiplicative(AMultMultiplicative node) - { - defaultIn(node); - } - - public void outAMultMultiplicative(AMultMultiplicative node) - { - defaultOut(node); - } - - @Override - public void caseAMultMultiplicative(AMultMultiplicative node) - { - inAMultMultiplicative(node); - if(node.getLeft() != null) - { - node.getLeft().apply(this); - } - if(node.getMult() != null) - { - node.getMult().apply(this); - } - if(node.getRight() != null) - { - node.getRight().apply(this); - } - outAMultMultiplicative(node); - } - - public void inADivMultiplicative(ADivMultiplicative node) - { - defaultIn(node); - } - - public void outADivMultiplicative(ADivMultiplicative node) - { - defaultOut(node); - } - - @Override - public void caseADivMultiplicative(ADivMultiplicative node) - { - inADivMultiplicative(node); - if(node.getLeft() != null) - { - node.getLeft().apply(this); - } - if(node.getDiv() != null) - { - node.getDiv().apply(this); - } - if(node.getRight() != null) - { - node.getRight().apply(this); - } - outADivMultiplicative(node); - } - - public void inAPrimaryUnary(APrimaryUnary node) - { - defaultIn(node); - } - - public void outAPrimaryUnary(APrimaryUnary node) - { - defaultOut(node); - } - - @Override - public void caseAPrimaryUnary(APrimaryUnary node) - { - inAPrimaryUnary(node); - if(node.getPrimary() != null) - { - node.getPrimary().apply(this); - } - outAPrimaryUnary(node); - } - - public void inAUnaryplusUnary(AUnaryplusUnary node) - { - defaultIn(node); - } - - public void outAUnaryplusUnary(AUnaryplusUnary node) - { - defaultOut(node); - } - - @Override - public void caseAUnaryplusUnary(AUnaryplusUnary node) - { - inAUnaryplusUnary(node); - if(node.getPlus() != null) - { - node.getPlus().apply(this); - } - if(node.getUnary() != null) - { - node.getUnary().apply(this); - } - outAUnaryplusUnary(node); - } - - public void inAUnaryminusUnary(AUnaryminusUnary node) - { - defaultIn(node); - } - - public void outAUnaryminusUnary(AUnaryminusUnary node) - { - defaultOut(node); - } - - @Override - public void caseAUnaryminusUnary(AUnaryminusUnary node) - { - inAUnaryminusUnary(node); - if(node.getMinus() != null) - { - node.getMinus().apply(this); - } - if(node.getUnary() != null) - { - node.getUnary().apply(this); - } - outAUnaryminusUnary(node); - } - - public void inASingleArgList(ASingleArgList node) - { - defaultIn(node); - } - - public void outASingleArgList(ASingleArgList node) - { - defaultOut(node); - } - - @Override - public void caseASingleArgList(ASingleArgList node) - { - inASingleArgList(node); - if(node.getExpression() != null) - { - node.getExpression().apply(this); - } - outASingleArgList(node); - } - - public void inASequenceArgList(ASequenceArgList node) - { - defaultIn(node); - } - - public void outASequenceArgList(ASequenceArgList node) - { - defaultOut(node); - } - - @Override - public void caseASequenceArgList(ASequenceArgList node) - { - inASequenceArgList(node); - if(node.getArgList() != null) - { - node.getArgList().apply(this); - } - if(node.getComma() != null) - { - node.getComma().apply(this); - } - if(node.getExpression() != null) - { - node.getExpression().apply(this); - } - outASequenceArgList(node); - } - - public void inAValuePrimary(AValuePrimary node) - { - defaultIn(node); - } - - public void outAValuePrimary(AValuePrimary node) - { - defaultOut(node); - } - - @Override - public void caseAValuePrimary(AValuePrimary node) - { - inAValuePrimary(node); - if(node.getValue() != null) - { - node.getValue().apply(this); - } - outAValuePrimary(node); - } - - public void inAVariablePrimary(AVariablePrimary node) - { - defaultIn(node); - } - - public void outAVariablePrimary(AVariablePrimary node) - { - defaultOut(node); - } - - @Override - public void caseAVariablePrimary(AVariablePrimary node) - { - inAVariablePrimary(node); - if(node.getVariable() != null) - { - node.getVariable().apply(this); - } - outAVariablePrimary(node); - } - - public void inAFunctionPrimary(AFunctionPrimary node) - { - defaultIn(node); - } - - public void outAFunctionPrimary(AFunctionPrimary node) - { - defaultOut(node); - } - - @Override - public void caseAFunctionPrimary(AFunctionPrimary node) - { - inAFunctionPrimary(node); - if(node.getFunc() != null) - { - node.getFunc().apply(this); - } - if(node.getArgList() != null) - { - node.getArgList().apply(this); - } - if(node.getRPar() != null) - { - node.getRPar().apply(this); - } - outAFunctionPrimary(node); - } - - public void inASingleRange(ASingleRange node) - { - defaultIn(node); - } - - public void outASingleRange(ASingleRange node) - { - defaultOut(node); - } - - @Override - public void caseASingleRange(ASingleRange node) - { - inASingleRange(node); - if(node.getCell() != null) - { - node.getCell().apply(this); - } - outASingleRange(node); - } - - public void inAMultiRange(AMultiRange node) - { - defaultIn(node); - } - - public void outAMultiRange(AMultiRange node) - { - defaultOut(node); - } - - @Override - public void caseAMultiRange(AMultiRange node) - { - inAMultiRange(node); - if(node.getLeft() != null) - { - node.getLeft().apply(this); - } - if(node.getColon() != null) - { - node.getColon().apply(this); - } - if(node.getRight() != null) - { - node.getRight().apply(this); - } - outAMultiRange(node); - } - - public void inARviValue(ARviValue node) - { - defaultIn(node); - } - - public void outARviValue(ARviValue node) - { - defaultOut(node); - } - - @Override - public void caseARviValue(ARviValue node) - { - inARviValue(node); - if(node.getRvi() != null) - { - node.getRvi().apply(this); - } - outARviValue(node); - } - - public void inAStringValue(AStringValue node) - { - defaultIn(node); - } - - public void outAStringValue(AStringValue node) - { - defaultOut(node); - } - - @Override - public void caseAStringValue(AStringValue node) - { - inAStringValue(node); - if(node.getString() != null) - { - node.getString().apply(this); - } - outAStringValue(node); - } - - public void inAConstantValue(AConstantValue node) - { - defaultIn(node); - } - - public void outAConstantValue(AConstantValue node) - { - defaultOut(node); - } - - @Override - public void caseAConstantValue(AConstantValue node) - { - inAConstantValue(node); - if(node.getNumber() != null) - { - node.getNumber().apply(this); - } - outAConstantValue(node); - } - - public void inARangeValue(ARangeValue node) - { - defaultIn(node); - } - - public void outARangeValue(ARangeValue node) - { - defaultOut(node); - } - - @Override - public void caseARangeValue(ARangeValue node) - { - inARangeValue(node); - if(node.getRange() != null) - { - node.getRange().apply(this); - } - outARangeValue(node); - } - - public void inAAddressValue(AAddressValue node) - { - defaultIn(node); - } - - public void outAAddressValue(AAddressValue node) - { - defaultOut(node); - } - - @Override - public void caseAAddressValue(AAddressValue node) - { - inAAddressValue(node); - if(node.getAmpersand() != null) - { - node.getAmpersand().apply(this); - } - if(node.getRange() != null) - { - node.getRange().apply(this); - } - outAAddressValue(node); - } - - public void inAExprValue(AExprValue node) - { - defaultIn(node); - } - - public void outAExprValue(AExprValue node) - { - defaultOut(node); - } - - @Override - public void caseAExprValue(AExprValue node) - { - inAExprValue(node); - if(node.getLPar() != null) - { - node.getLPar().apply(this); - } - if(node.getExpression() != null) - { - node.getExpression().apply(this); - } - if(node.getRPar() != null) - { - node.getRPar().apply(this); - } - outAExprValue(node); - } -} +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package org.simantics.basicexpression.analysis; + +import java.util.*; +import org.simantics.basicexpression.node.*; + +public class DepthFirstAdapter extends AnalysisAdapter +{ + + protected Throwable exception; + + public void except(Throwable exception) { + this.exception = exception; + } + + public void inStart(Start node) + { + defaultIn(node); + } + + public void outStart(Start node) + { + defaultOut(node); + } + + public void defaultIn(@SuppressWarnings("unused") Node node) + { + // Do nothing + } + + public void defaultOut(@SuppressWarnings("unused") Node node) + { + // Do nothing + } + + @Override + public void caseStart(Start node) + { + inStart(node); + node.getPExpression().apply(this); + node.getEOF().apply(this); + outStart(node); + } + + public void inAMultExpression(AMultExpression node) + { + defaultIn(node); + } + + public void outAMultExpression(AMultExpression node) + { + defaultOut(node); + } + + @Override + public void caseAMultExpression(AMultExpression node) + { + inAMultExpression(node); + if(node.getMultiplicative() != null) + { + node.getMultiplicative().apply(this); + } + outAMultExpression(node); + } + + public void inAPlusExpression(APlusExpression node) + { + defaultIn(node); + } + + public void outAPlusExpression(APlusExpression node) + { + defaultOut(node); + } + + @Override + public void caseAPlusExpression(APlusExpression node) + { + inAPlusExpression(node); + if(node.getLeft() != null) + { + node.getLeft().apply(this); + } + if(node.getPlus() != null) + { + node.getPlus().apply(this); + } + if(node.getRight() != null) + { + node.getRight().apply(this); + } + outAPlusExpression(node); + } + + public void inAMinusExpression(AMinusExpression node) + { + defaultIn(node); + } + + public void outAMinusExpression(AMinusExpression node) + { + defaultOut(node); + } + + @Override + public void caseAMinusExpression(AMinusExpression node) + { + inAMinusExpression(node); + if(node.getExpression() != null) + { + node.getExpression().apply(this); + } + if(node.getMinus() != null) + { + node.getMinus().apply(this); + } + if(node.getMultiplicative() != null) + { + node.getMultiplicative().apply(this); + } + outAMinusExpression(node); + } + + public void inAUnaryMultiplicative(AUnaryMultiplicative node) + { + defaultIn(node); + } + + public void outAUnaryMultiplicative(AUnaryMultiplicative node) + { + defaultOut(node); + } + + @Override + public void caseAUnaryMultiplicative(AUnaryMultiplicative node) + { + inAUnaryMultiplicative(node); + if(node.getUnary() != null) + { + node.getUnary().apply(this); + } + outAUnaryMultiplicative(node); + } + + public void inAMultMultiplicative(AMultMultiplicative node) + { + defaultIn(node); + } + + public void outAMultMultiplicative(AMultMultiplicative node) + { + defaultOut(node); + } + + @Override + public void caseAMultMultiplicative(AMultMultiplicative node) + { + inAMultMultiplicative(node); + if(node.getLeft() != null) + { + node.getLeft().apply(this); + } + if(node.getMult() != null) + { + node.getMult().apply(this); + } + if(node.getRight() != null) + { + node.getRight().apply(this); + } + outAMultMultiplicative(node); + } + + public void inADivMultiplicative(ADivMultiplicative node) + { + defaultIn(node); + } + + public void outADivMultiplicative(ADivMultiplicative node) + { + defaultOut(node); + } + + @Override + public void caseADivMultiplicative(ADivMultiplicative node) + { + inADivMultiplicative(node); + if(node.getLeft() != null) + { + node.getLeft().apply(this); + } + if(node.getDiv() != null) + { + node.getDiv().apply(this); + } + if(node.getRight() != null) + { + node.getRight().apply(this); + } + outADivMultiplicative(node); + } + + public void inAPrimaryUnary(APrimaryUnary node) + { + defaultIn(node); + } + + public void outAPrimaryUnary(APrimaryUnary node) + { + defaultOut(node); + } + + @Override + public void caseAPrimaryUnary(APrimaryUnary node) + { + inAPrimaryUnary(node); + if(node.getPrimary() != null) + { + node.getPrimary().apply(this); + } + outAPrimaryUnary(node); + } + + public void inAUnaryplusUnary(AUnaryplusUnary node) + { + defaultIn(node); + } + + public void outAUnaryplusUnary(AUnaryplusUnary node) + { + defaultOut(node); + } + + @Override + public void caseAUnaryplusUnary(AUnaryplusUnary node) + { + inAUnaryplusUnary(node); + if(node.getPlus() != null) + { + node.getPlus().apply(this); + } + if(node.getUnary() != null) + { + node.getUnary().apply(this); + } + outAUnaryplusUnary(node); + } + + public void inAUnaryminusUnary(AUnaryminusUnary node) + { + defaultIn(node); + } + + public void outAUnaryminusUnary(AUnaryminusUnary node) + { + defaultOut(node); + } + + @Override + public void caseAUnaryminusUnary(AUnaryminusUnary node) + { + inAUnaryminusUnary(node); + if(node.getMinus() != null) + { + node.getMinus().apply(this); + } + if(node.getUnary() != null) + { + node.getUnary().apply(this); + } + outAUnaryminusUnary(node); + } + + public void inASingleArgList(ASingleArgList node) + { + defaultIn(node); + } + + public void outASingleArgList(ASingleArgList node) + { + defaultOut(node); + } + + @Override + public void caseASingleArgList(ASingleArgList node) + { + inASingleArgList(node); + if(node.getExpression() != null) + { + node.getExpression().apply(this); + } + outASingleArgList(node); + } + + public void inASequenceArgList(ASequenceArgList node) + { + defaultIn(node); + } + + public void outASequenceArgList(ASequenceArgList node) + { + defaultOut(node); + } + + @Override + public void caseASequenceArgList(ASequenceArgList node) + { + inASequenceArgList(node); + if(node.getArgList() != null) + { + node.getArgList().apply(this); + } + if(node.getComma() != null) + { + node.getComma().apply(this); + } + if(node.getExpression() != null) + { + node.getExpression().apply(this); + } + outASequenceArgList(node); + } + + public void inAValuePrimary(AValuePrimary node) + { + defaultIn(node); + } + + public void outAValuePrimary(AValuePrimary node) + { + defaultOut(node); + } + + @Override + public void caseAValuePrimary(AValuePrimary node) + { + inAValuePrimary(node); + if(node.getValue() != null) + { + node.getValue().apply(this); + } + outAValuePrimary(node); + } + + public void inAVariablePrimary(AVariablePrimary node) + { + defaultIn(node); + } + + public void outAVariablePrimary(AVariablePrimary node) + { + defaultOut(node); + } + + @Override + public void caseAVariablePrimary(AVariablePrimary node) + { + inAVariablePrimary(node); + if(node.getVariable() != null) + { + node.getVariable().apply(this); + } + outAVariablePrimary(node); + } + + public void inAFunctionPrimary(AFunctionPrimary node) + { + defaultIn(node); + } + + public void outAFunctionPrimary(AFunctionPrimary node) + { + defaultOut(node); + } + + @Override + public void caseAFunctionPrimary(AFunctionPrimary node) + { + inAFunctionPrimary(node); + if(node.getFunc() != null) + { + node.getFunc().apply(this); + } + if(node.getArgList() != null) + { + node.getArgList().apply(this); + } + if(node.getRPar() != null) + { + node.getRPar().apply(this); + } + outAFunctionPrimary(node); + } + + public void inASingleRange(ASingleRange node) + { + defaultIn(node); + } + + public void outASingleRange(ASingleRange node) + { + defaultOut(node); + } + + @Override + public void caseASingleRange(ASingleRange node) + { + inASingleRange(node); + if(node.getCell() != null) + { + node.getCell().apply(this); + } + outASingleRange(node); + } + + public void inAMultiRange(AMultiRange node) + { + defaultIn(node); + } + + public void outAMultiRange(AMultiRange node) + { + defaultOut(node); + } + + @Override + public void caseAMultiRange(AMultiRange node) + { + inAMultiRange(node); + if(node.getLeft() != null) + { + node.getLeft().apply(this); + } + if(node.getColon() != null) + { + node.getColon().apply(this); + } + if(node.getRight() != null) + { + node.getRight().apply(this); + } + outAMultiRange(node); + } + + public void inARviValue(ARviValue node) + { + defaultIn(node); + } + + public void outARviValue(ARviValue node) + { + defaultOut(node); + } + + @Override + public void caseARviValue(ARviValue node) + { + inARviValue(node); + if(node.getRvi() != null) + { + node.getRvi().apply(this); + } + outARviValue(node); + } + + public void inAStringValue(AStringValue node) + { + defaultIn(node); + } + + public void outAStringValue(AStringValue node) + { + defaultOut(node); + } + + @Override + public void caseAStringValue(AStringValue node) + { + inAStringValue(node); + if(node.getString() != null) + { + node.getString().apply(this); + } + outAStringValue(node); + } + + public void inAConstantValue(AConstantValue node) + { + defaultIn(node); + } + + public void outAConstantValue(AConstantValue node) + { + defaultOut(node); + } + + @Override + public void caseAConstantValue(AConstantValue node) + { + inAConstantValue(node); + if(node.getNumber() != null) + { + node.getNumber().apply(this); + } + outAConstantValue(node); + } + + public void inARangeValue(ARangeValue node) + { + defaultIn(node); + } + + public void outARangeValue(ARangeValue node) + { + defaultOut(node); + } + + @Override + public void caseARangeValue(ARangeValue node) + { + inARangeValue(node); + if(node.getRange() != null) + { + node.getRange().apply(this); + } + outARangeValue(node); + } + + public void inAAddressValue(AAddressValue node) + { + defaultIn(node); + } + + public void outAAddressValue(AAddressValue node) + { + defaultOut(node); + } + + @Override + public void caseAAddressValue(AAddressValue node) + { + inAAddressValue(node); + if(node.getAmpersand() != null) + { + node.getAmpersand().apply(this); + } + if(node.getRange() != null) + { + node.getRange().apply(this); + } + outAAddressValue(node); + } + + public void inAExprValue(AExprValue node) + { + defaultIn(node); + } + + public void outAExprValue(AExprValue node) + { + defaultOut(node); + } + + @Override + public void caseAExprValue(AExprValue node) + { + inAExprValue(node); + if(node.getLPar() != null) + { + node.getLPar().apply(this); + } + if(node.getExpression() != null) + { + node.getExpression().apply(this); + } + if(node.getRPar() != null) + { + node.getRPar().apply(this); + } + outAExprValue(node); + } +}