From f9dd0c30294c8d1d8501865b7f39506cd519487a Mon Sep 17 00:00:00 2001 From: b21223327 <zakaria.bazizi@etu.univ-amu.fr> Date: Fri, 9 Feb 2024 17:37:52 +0100 Subject: [PATCH] allah o akbar --- 2024-compilation-bazizi.iml | 11 + src/Compiler.java | 3 +- src/l.cfg | 2 +- src/lParser/analysis/Analysis.java | 104 + src/lParser/analysis/AnalysisAdapter.java | 609 ++++ src/lParser/analysis/DepthFirstAdapter.java | 1439 ++++++++ .../analysis/ReversedDepthFirstAdapter.java | 1439 ++++++++ src/lParser/lexer/IPushbackReader.java | 12 + src/lParser/lexer/Lexer.java | 782 +++++ src/lParser/lexer/LexerException.java | 22 + src/lParser/lexer/lexer.dat | Bin 0 -> 3180 bytes src/lParser/main.java | 27 - src/lParser/node/AAddEquals.java | 95 + src/lParser/node/AAffectationIns.java | 224 ++ src/lParser/node/AAndExp.java | 95 + src/lParser/node/AAppelfncAppelfnc.java | 267 ++ src/lParser/node/AAppelfncE6.java | 224 ++ src/lParser/node/AAppelfncIns.java | 267 ++ src/lParser/node/ADeclafoncDecfonc.java | 353 ++ src/lParser/node/ADeclavariableDecvar.java | 138 + src/lParser/node/ADecvar.java | 267 ++ src/lParser/node/ADiviserMult.java | 181 + src/lParser/node/AE6Neg.java | 95 + src/lParser/node/AEgaleEquals.java | 181 + src/lParser/node/AEpsilon.java | 47 + src/lParser/node/AEpsilonLe.java | 95 + src/lParser/node/AEpsilonLi.java | 95 + src/lParser/node/AEpsilonLse.java | 95 + src/lParser/node/AEqualsAnd.java | 95 + src/lParser/node/AEtAnd.java | 181 + src/lParser/node/AExprLe.java | 138 + src/lParser/node/AFauxE6.java | 95 + src/lParser/node/AFoisMult.java | 181 + src/lParser/node/AIdCrochetVar.java | 224 ++ src/lParser/node/AIdVar.java | 95 + src/lParser/node/AInfEquals.java | 181 + src/lParser/node/AInstrBloc.java | 181 + src/lParser/node/ALdec.java | 95 + src/lParser/node/ALdf.java | 95 + src/lParser/node/ALireE6.java | 181 + src/lParser/node/AListeinstrLi.java | 138 + src/lParser/node/ALstdecfncLdf.java | 138 + src/lParser/node/ALstdeclacvarLdec.java | 138 + src/lParser/node/ALstexprLse.java | 181 + src/lParser/node/AMoinsAdd.java | 181 + src/lParser/node/AMultAdd.java | 95 + src/lParser/node/ANegMult.java | 95 + src/lParser/node/ANombreE6.java | 95 + src/lParser/node/ANonNeg.java | 138 + src/lParser/node/AOrExp.java | 181 + src/lParser/node/AParentheseE6.java | 181 + src/lParser/node/APlusAdd.java | 181 + src/lParser/node/AProg.java | 138 + src/lParser/node/AReturnIns.java | 181 + src/lParser/node/ASiIns.java | 224 ++ src/lParser/node/ASisinonIns.java | 310 ++ src/lParser/node/ASuitedec.java | 95 + src/lParser/node/ASuitedeclvarSuitedec.java | 181 + src/lParser/node/ATqIns.java | 224 ++ src/lParser/node/AType.java | 95 + src/lParser/node/ATypeType.java | 95 + src/lParser/node/ATypeopt.java | 95 + src/lParser/node/ATypeoptTypeopt.java | 95 + src/lParser/node/AVarE6.java | 95 + src/lParser/node/AVraiE6.java | 95 + src/lParser/node/AWriteIns.java | 267 ++ src/lParser/node/EOF.java | 33 + src/lParser/node/InvalidToken.java | 33 + src/lParser/node/Node.java | 78 + src/lParser/node/PAdd.java | 8 + src/lParser/node/PAnd.java | 8 + src/lParser/node/PAppelfnc.java | 8 + src/lParser/node/PBloc.java | 8 + src/lParser/node/PDecfonc.java | 8 + src/lParser/node/PDecvar.java | 8 + src/lParser/node/PE6.java | 8 + src/lParser/node/PEpsilon.java | 8 + src/lParser/node/PEquals.java | 8 + src/lParser/node/PExp.java | 8 + src/lParser/node/PIns.java | 8 + src/lParser/node/PLdec.java | 8 + src/lParser/node/PLdf.java | 8 + src/lParser/node/PLe.java | 8 + src/lParser/node/PLi.java | 8 + src/lParser/node/PLse.java | 8 + src/lParser/node/PMult.java | 8 + src/lParser/node/PNeg.java | 8 + src/lParser/node/PProg.java | 8 + src/lParser/node/PSuitedec.java | 8 + src/lParser/node/PType.java | 8 + src/lParser/node/PTypeopt.java | 8 + src/lParser/node/PVar.java | 8 + src/lParser/node/Start.java | 133 + src/lParser/node/Switch.java | 8 + src/lParser/node/Switchable.java | 8 + src/lParser/node/TAccoladed.java | 39 + src/lParser/node/TAccoladeg.java | 39 + src/lParser/node/TAlors.java | 39 + src/lParser/node/TBool.java | 39 + src/lParser/node/TCommentaire.java | 33 + src/lParser/node/TCrochetd.java | 39 + src/lParser/node/TCrochetg.java | 39 + src/lParser/node/TDiviser.java | 39 + src/lParser/node/TDparenthese.java | 39 + src/lParser/node/TEcrire.java | 39 + src/lParser/node/TEgale.java | 39 + src/lParser/node/TEntier.java | 39 + src/lParser/node/TEspaces.java | 33 + src/lParser/node/TEt.java | 39 + src/lParser/node/TFaire.java | 39 + src/lParser/node/TFaux.java | 39 + src/lParser/node/TFois.java | 39 + src/lParser/node/TGparenthese.java | 39 + src/lParser/node/TId.java | 33 + src/lParser/node/TInf.java | 39 + src/lParser/node/TLire.java | 39 + src/lParser/node/TMoins.java | 39 + src/lParser/node/TNombre.java | 33 + src/lParser/node/TNon.java | 39 + src/lParser/node/TOu.java | 39 + src/lParser/node/TPlus.java | 39 + src/lParser/node/TPointvirgule.java | 39 + src/lParser/node/TRetourner.java | 39 + src/lParser/node/TSi.java | 39 + src/lParser/node/TSinon.java | 39 + src/lParser/node/TTantque.java | 39 + src/lParser/node/TVirgule.java | 39 + src/lParser/node/TVrai.java | 39 + src/lParser/node/Token.java | 59 + src/lParser/parser/Parser.java | 2503 ++++++++++++++ src/lParser/parser/ParserException.java | 22 + src/lParser/parser/State.java | 17 + src/lParser/parser/TokenIndex.java | 203 ++ src/lParser/parser/parser.dat | Bin 0 -> 9162 bytes src/nasmParser/analysis/Analysis.java | 159 + src/nasmParser/analysis/AnalysisAdapter.java | 939 ++++++ .../analysis/DepthFirstAdapter.java | 2121 ++++++++++++ .../analysis/ReversedDepthFirstAdapter.java | 2121 ++++++++++++ src/nasmParser/parser/Parser.java | 2914 +++++++++++++++++ src/nasmParser/parser/ParserException.java | 22 + src/nasmParser/parser/State.java | 17 + src/nasmParser/parser/TokenIndex.java | 377 +++ src/nasmParser/parser/parser.dat | Bin 0 -> 12514 bytes src/sa/Sc2sa.java | 470 ++- test/result.txt | 878 +++++ 145 files changed, 27102 insertions(+), 303 deletions(-) create mode 100644 2024-compilation-bazizi.iml create mode 100644 src/lParser/analysis/Analysis.java create mode 100644 src/lParser/analysis/AnalysisAdapter.java create mode 100644 src/lParser/analysis/DepthFirstAdapter.java create mode 100644 src/lParser/analysis/ReversedDepthFirstAdapter.java create mode 100644 src/lParser/lexer/IPushbackReader.java create mode 100644 src/lParser/lexer/Lexer.java create mode 100644 src/lParser/lexer/LexerException.java create mode 100644 src/lParser/lexer/lexer.dat delete mode 100644 src/lParser/main.java create mode 100644 src/lParser/node/AAddEquals.java create mode 100644 src/lParser/node/AAffectationIns.java create mode 100644 src/lParser/node/AAndExp.java create mode 100644 src/lParser/node/AAppelfncAppelfnc.java create mode 100644 src/lParser/node/AAppelfncE6.java create mode 100644 src/lParser/node/AAppelfncIns.java create mode 100644 src/lParser/node/ADeclafoncDecfonc.java create mode 100644 src/lParser/node/ADeclavariableDecvar.java create mode 100644 src/lParser/node/ADecvar.java create mode 100644 src/lParser/node/ADiviserMult.java create mode 100644 src/lParser/node/AE6Neg.java create mode 100644 src/lParser/node/AEgaleEquals.java create mode 100644 src/lParser/node/AEpsilon.java create mode 100644 src/lParser/node/AEpsilonLe.java create mode 100644 src/lParser/node/AEpsilonLi.java create mode 100644 src/lParser/node/AEpsilonLse.java create mode 100644 src/lParser/node/AEqualsAnd.java create mode 100644 src/lParser/node/AEtAnd.java create mode 100644 src/lParser/node/AExprLe.java create mode 100644 src/lParser/node/AFauxE6.java create mode 100644 src/lParser/node/AFoisMult.java create mode 100644 src/lParser/node/AIdCrochetVar.java create mode 100644 src/lParser/node/AIdVar.java create mode 100644 src/lParser/node/AInfEquals.java create mode 100644 src/lParser/node/AInstrBloc.java create mode 100644 src/lParser/node/ALdec.java create mode 100644 src/lParser/node/ALdf.java create mode 100644 src/lParser/node/ALireE6.java create mode 100644 src/lParser/node/AListeinstrLi.java create mode 100644 src/lParser/node/ALstdecfncLdf.java create mode 100644 src/lParser/node/ALstdeclacvarLdec.java create mode 100644 src/lParser/node/ALstexprLse.java create mode 100644 src/lParser/node/AMoinsAdd.java create mode 100644 src/lParser/node/AMultAdd.java create mode 100644 src/lParser/node/ANegMult.java create mode 100644 src/lParser/node/ANombreE6.java create mode 100644 src/lParser/node/ANonNeg.java create mode 100644 src/lParser/node/AOrExp.java create mode 100644 src/lParser/node/AParentheseE6.java create mode 100644 src/lParser/node/APlusAdd.java create mode 100644 src/lParser/node/AProg.java create mode 100644 src/lParser/node/AReturnIns.java create mode 100644 src/lParser/node/ASiIns.java create mode 100644 src/lParser/node/ASisinonIns.java create mode 100644 src/lParser/node/ASuitedec.java create mode 100644 src/lParser/node/ASuitedeclvarSuitedec.java create mode 100644 src/lParser/node/ATqIns.java create mode 100644 src/lParser/node/AType.java create mode 100644 src/lParser/node/ATypeType.java create mode 100644 src/lParser/node/ATypeopt.java create mode 100644 src/lParser/node/ATypeoptTypeopt.java create mode 100644 src/lParser/node/AVarE6.java create mode 100644 src/lParser/node/AVraiE6.java create mode 100644 src/lParser/node/AWriteIns.java create mode 100644 src/lParser/node/EOF.java create mode 100644 src/lParser/node/InvalidToken.java create mode 100644 src/lParser/node/Node.java create mode 100644 src/lParser/node/PAdd.java create mode 100644 src/lParser/node/PAnd.java create mode 100644 src/lParser/node/PAppelfnc.java create mode 100644 src/lParser/node/PBloc.java create mode 100644 src/lParser/node/PDecfonc.java create mode 100644 src/lParser/node/PDecvar.java create mode 100644 src/lParser/node/PE6.java create mode 100644 src/lParser/node/PEpsilon.java create mode 100644 src/lParser/node/PEquals.java create mode 100644 src/lParser/node/PExp.java create mode 100644 src/lParser/node/PIns.java create mode 100644 src/lParser/node/PLdec.java create mode 100644 src/lParser/node/PLdf.java create mode 100644 src/lParser/node/PLe.java create mode 100644 src/lParser/node/PLi.java create mode 100644 src/lParser/node/PLse.java create mode 100644 src/lParser/node/PMult.java create mode 100644 src/lParser/node/PNeg.java create mode 100644 src/lParser/node/PProg.java create mode 100644 src/lParser/node/PSuitedec.java create mode 100644 src/lParser/node/PType.java create mode 100644 src/lParser/node/PTypeopt.java create mode 100644 src/lParser/node/PVar.java create mode 100644 src/lParser/node/Start.java create mode 100644 src/lParser/node/Switch.java create mode 100644 src/lParser/node/Switchable.java create mode 100644 src/lParser/node/TAccoladed.java create mode 100644 src/lParser/node/TAccoladeg.java create mode 100644 src/lParser/node/TAlors.java create mode 100644 src/lParser/node/TBool.java create mode 100644 src/lParser/node/TCommentaire.java create mode 100644 src/lParser/node/TCrochetd.java create mode 100644 src/lParser/node/TCrochetg.java create mode 100644 src/lParser/node/TDiviser.java create mode 100644 src/lParser/node/TDparenthese.java create mode 100644 src/lParser/node/TEcrire.java create mode 100644 src/lParser/node/TEgale.java create mode 100644 src/lParser/node/TEntier.java create mode 100644 src/lParser/node/TEspaces.java create mode 100644 src/lParser/node/TEt.java create mode 100644 src/lParser/node/TFaire.java create mode 100644 src/lParser/node/TFaux.java create mode 100644 src/lParser/node/TFois.java create mode 100644 src/lParser/node/TGparenthese.java create mode 100644 src/lParser/node/TId.java create mode 100644 src/lParser/node/TInf.java create mode 100644 src/lParser/node/TLire.java create mode 100644 src/lParser/node/TMoins.java create mode 100644 src/lParser/node/TNombre.java create mode 100644 src/lParser/node/TNon.java create mode 100644 src/lParser/node/TOu.java create mode 100644 src/lParser/node/TPlus.java create mode 100644 src/lParser/node/TPointvirgule.java create mode 100644 src/lParser/node/TRetourner.java create mode 100644 src/lParser/node/TSi.java create mode 100644 src/lParser/node/TSinon.java create mode 100644 src/lParser/node/TTantque.java create mode 100644 src/lParser/node/TVirgule.java create mode 100644 src/lParser/node/TVrai.java create mode 100644 src/lParser/node/Token.java create mode 100644 src/lParser/parser/Parser.java create mode 100644 src/lParser/parser/ParserException.java create mode 100644 src/lParser/parser/State.java create mode 100644 src/lParser/parser/TokenIndex.java create mode 100644 src/lParser/parser/parser.dat create mode 100644 src/nasmParser/analysis/Analysis.java create mode 100644 src/nasmParser/analysis/AnalysisAdapter.java create mode 100644 src/nasmParser/analysis/DepthFirstAdapter.java create mode 100644 src/nasmParser/analysis/ReversedDepthFirstAdapter.java create mode 100644 src/nasmParser/parser/Parser.java create mode 100644 src/nasmParser/parser/ParserException.java create mode 100644 src/nasmParser/parser/State.java create mode 100644 src/nasmParser/parser/TokenIndex.java create mode 100644 src/nasmParser/parser/parser.dat create mode 100644 test/result.txt diff --git a/2024-compilation-bazizi.iml b/2024-compilation-bazizi.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/2024-compilation-bazizi.iml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + </component> +</module> \ No newline at end of file diff --git a/src/Compiler.java b/src/Compiler.java index 39aebb8..a98d6bf 100644 --- a/src/Compiler.java +++ b/src/Compiler.java @@ -31,8 +31,9 @@ public class Compiler processCommandLine(args); System.out.println("[BUILD SC] "); buildSc(); - /* System.out.println("[BUILD SA] "); + System.out.println("[BUILD SA] "); buildSa(); + /* System.out.println("[BUILD TS] "); buildTs(); System.out.println("[TYPE CHECKING]"); diff --git a/src/l.cfg b/src/l.cfg index 43e8d58..11bfb2e 100644 --- a/src/l.cfg +++ b/src/l.cfg @@ -98,7 +98,7 @@ le = {expr} exp lse | {epsilon} epsilon ; lse = {lstexpr} virgule exp lse | {epsilon} epsilon ; var = {id} id | {id_crochet} id crochetg exp crochetd ; decvar = {declavariable} type id |type id crochetg nombre crochetd ; -type = {bool} bool | {entier} entier ; +type = {type} bool | entier ; decfonc = {declafonc} typeopt id gparenthese [firstldec]: ldec dparenthese [secondldec]: ldec bloc ; typeopt= {typeopt} type | epsilon ; ldec = {lstdeclacvar} decvar suitedec | epsilon ; diff --git a/src/lParser/analysis/Analysis.java b/src/lParser/analysis/Analysis.java new file mode 100644 index 0000000..2f313cf --- /dev/null +++ b/src/lParser/analysis/Analysis.java @@ -0,0 +1,104 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.analysis; + +import lParser.node.*; + +public interface Analysis extends Switch +{ + Object getIn(Node node); + void setIn(Node node, Object o); + Object getOut(Node node); + void setOut(Node node, Object o); + + void caseStart(Start node); + void caseAProg(AProg node); + void caseAOrExp(AOrExp node); + void caseAAndExp(AAndExp node); + void caseAEtAnd(AEtAnd node); + void caseAEqualsAnd(AEqualsAnd node); + void caseAEgaleEquals(AEgaleEquals node); + void caseAInfEquals(AInfEquals node); + void caseAAddEquals(AAddEquals node); + void caseAPlusAdd(APlusAdd node); + void caseAMoinsAdd(AMoinsAdd node); + void caseAMultAdd(AMultAdd node); + void caseAFoisMult(AFoisMult node); + void caseADiviserMult(ADiviserMult node); + void caseANegMult(ANegMult node); + void caseANonNeg(ANonNeg node); + void caseAE6Neg(AE6Neg node); + void caseAParentheseE6(AParentheseE6 node); + void caseANombreE6(ANombreE6 node); + void caseAVraiE6(AVraiE6 node); + void caseAFauxE6(AFauxE6 node); + void caseALireE6(ALireE6 node); + void caseAVarE6(AVarE6 node); + void caseAAppelfncE6(AAppelfncE6 node); + void caseAAffectationIns(AAffectationIns node); + void caseATqIns(ATqIns node); + void caseASiIns(ASiIns node); + void caseASisinonIns(ASisinonIns node); + void caseAReturnIns(AReturnIns node); + void caseAWriteIns(AWriteIns node); + void caseAAppelfncIns(AAppelfncIns node); + void caseAInstrBloc(AInstrBloc node); + void caseAListeinstrLi(AListeinstrLi node); + void caseAEpsilonLi(AEpsilonLi node); + void caseAEpsilon(AEpsilon node); + void caseAExprLe(AExprLe node); + void caseAEpsilonLe(AEpsilonLe node); + void caseALstexprLse(ALstexprLse node); + void caseAEpsilonLse(AEpsilonLse node); + void caseAIdVar(AIdVar node); + void caseAIdCrochetVar(AIdCrochetVar node); + void caseADeclavariableDecvar(ADeclavariableDecvar node); + void caseADecvar(ADecvar node); + void caseATypeType(ATypeType node); + void caseAType(AType node); + void caseADeclafoncDecfonc(ADeclafoncDecfonc node); + void caseATypeoptTypeopt(ATypeoptTypeopt node); + void caseATypeopt(ATypeopt node); + void caseALstdeclacvarLdec(ALstdeclacvarLdec node); + void caseALdec(ALdec node); + void caseASuitedeclvarSuitedec(ASuitedeclvarSuitedec node); + void caseASuitedec(ASuitedec node); + void caseALstdecfncLdf(ALstdecfncLdf node); + void caseALdf(ALdf node); + + void caseTEspaces(TEspaces node); + void caseTCommentaire(TCommentaire node); + void caseTPlus(TPlus node); + void caseTPointvirgule(TPointvirgule node); + void caseTMoins(TMoins node); + void caseTOu(TOu node); + void caseTEt(TEt node); + void caseTVirgule(TVirgule node); + void caseTEgale(TEgale node); + void caseTInf(TInf node); + void caseTFois(TFois node); + void caseTDiviser(TDiviser node); + void caseTNon(TNon node); + void caseTGparenthese(TGparenthese node); + void caseTDparenthese(TDparenthese node); + void caseTAccoladeg(TAccoladeg node); + void caseTAccoladed(TAccoladed node); + void caseTCrochetg(TCrochetg node); + void caseTCrochetd(TCrochetd node); + void caseTBool(TBool node); + void caseTEntier(TEntier node); + void caseTSi(TSi node); + void caseTAlors(TAlors node); + void caseTTantque(TTantque node); + void caseTFaire(TFaire node); + void caseTSinon(TSinon node); + void caseTRetourner(TRetourner node); + void caseTLire(TLire node); + void caseTEcrire(TEcrire node); + void caseTNombre(TNombre node); + void caseTVrai(TVrai node); + void caseTFaux(TFaux node); + void caseTId(TId node); + void caseEOF(EOF node); + void caseInvalidToken(InvalidToken node); +} diff --git a/src/lParser/analysis/AnalysisAdapter.java b/src/lParser/analysis/AnalysisAdapter.java new file mode 100644 index 0000000..80ac9c0 --- /dev/null +++ b/src/lParser/analysis/AnalysisAdapter.java @@ -0,0 +1,609 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.analysis; + +import java.util.*; +import lParser.node.*; + +public class AnalysisAdapter implements Analysis +{ + private Hashtable<Node,Object> in; + private Hashtable<Node,Object> out; + + @Override + public Object getIn(Node node) + { + if(this.in == null) + { + return null; + } + + return this.in.get(node); + } + + @Override + public void setIn(Node node, Object o) + { + if(this.in == null) + { + this.in = new Hashtable<Node,Object>(1); + } + + if(o != null) + { + this.in.put(node, o); + } + else + { + this.in.remove(node); + } + } + + @Override + public Object getOut(Node node) + { + if(this.out == null) + { + return null; + } + + return this.out.get(node); + } + + @Override + public void setOut(Node node, Object o) + { + if(this.out == null) + { + this.out = new Hashtable<Node,Object>(1); + } + + if(o != null) + { + this.out.put(node, o); + } + else + { + this.out.remove(node); + } + } + + @Override + public void caseStart(Start node) + { + defaultCase(node); + } + + @Override + public void caseAProg(AProg node) + { + defaultCase(node); + } + + @Override + public void caseAOrExp(AOrExp node) + { + defaultCase(node); + } + + @Override + public void caseAAndExp(AAndExp node) + { + defaultCase(node); + } + + @Override + public void caseAEtAnd(AEtAnd node) + { + defaultCase(node); + } + + @Override + public void caseAEqualsAnd(AEqualsAnd node) + { + defaultCase(node); + } + + @Override + public void caseAEgaleEquals(AEgaleEquals node) + { + defaultCase(node); + } + + @Override + public void caseAInfEquals(AInfEquals node) + { + defaultCase(node); + } + + @Override + public void caseAAddEquals(AAddEquals node) + { + defaultCase(node); + } + + @Override + public void caseAPlusAdd(APlusAdd node) + { + defaultCase(node); + } + + @Override + public void caseAMoinsAdd(AMoinsAdd node) + { + defaultCase(node); + } + + @Override + public void caseAMultAdd(AMultAdd node) + { + defaultCase(node); + } + + @Override + public void caseAFoisMult(AFoisMult node) + { + defaultCase(node); + } + + @Override + public void caseADiviserMult(ADiviserMult node) + { + defaultCase(node); + } + + @Override + public void caseANegMult(ANegMult node) + { + defaultCase(node); + } + + @Override + public void caseANonNeg(ANonNeg node) + { + defaultCase(node); + } + + @Override + public void caseAE6Neg(AE6Neg node) + { + defaultCase(node); + } + + @Override + public void caseAParentheseE6(AParentheseE6 node) + { + defaultCase(node); + } + + @Override + public void caseANombreE6(ANombreE6 node) + { + defaultCase(node); + } + + @Override + public void caseAVraiE6(AVraiE6 node) + { + defaultCase(node); + } + + @Override + public void caseAFauxE6(AFauxE6 node) + { + defaultCase(node); + } + + @Override + public void caseALireE6(ALireE6 node) + { + defaultCase(node); + } + + @Override + public void caseAVarE6(AVarE6 node) + { + defaultCase(node); + } + + @Override + public void caseAAppelfncE6(AAppelfncE6 node) + { + defaultCase(node); + } + + @Override + public void caseAAffectationIns(AAffectationIns node) + { + defaultCase(node); + } + + @Override + public void caseATqIns(ATqIns node) + { + defaultCase(node); + } + + @Override + public void caseASiIns(ASiIns node) + { + defaultCase(node); + } + + @Override + public void caseASisinonIns(ASisinonIns node) + { + defaultCase(node); + } + + @Override + public void caseAReturnIns(AReturnIns node) + { + defaultCase(node); + } + + @Override + public void caseAWriteIns(AWriteIns node) + { + defaultCase(node); + } + + @Override + public void caseAAppelfncIns(AAppelfncIns node) + { + defaultCase(node); + } + + @Override + public void caseAInstrBloc(AInstrBloc node) + { + defaultCase(node); + } + + @Override + public void caseAListeinstrLi(AListeinstrLi node) + { + defaultCase(node); + } + + @Override + public void caseAEpsilonLi(AEpsilonLi node) + { + defaultCase(node); + } + + @Override + public void caseAEpsilon(AEpsilon node) + { + defaultCase(node); + } + + @Override + public void caseAExprLe(AExprLe node) + { + defaultCase(node); + } + + @Override + public void caseAEpsilonLe(AEpsilonLe node) + { + defaultCase(node); + } + + @Override + public void caseALstexprLse(ALstexprLse node) + { + defaultCase(node); + } + + @Override + public void caseAEpsilonLse(AEpsilonLse node) + { + defaultCase(node); + } + + @Override + public void caseAIdVar(AIdVar node) + { + defaultCase(node); + } + + @Override + public void caseAIdCrochetVar(AIdCrochetVar node) + { + defaultCase(node); + } + + @Override + public void caseADeclavariableDecvar(ADeclavariableDecvar node) + { + defaultCase(node); + } + + @Override + public void caseADecvar(ADecvar node) + { + defaultCase(node); + } + + @Override + public void caseATypeType(ATypeType node) + { + defaultCase(node); + } + + @Override + public void caseAType(AType node) + { + defaultCase(node); + } + + @Override + public void caseADeclafoncDecfonc(ADeclafoncDecfonc node) + { + defaultCase(node); + } + + @Override + public void caseATypeoptTypeopt(ATypeoptTypeopt node) + { + defaultCase(node); + } + + @Override + public void caseATypeopt(ATypeopt node) + { + defaultCase(node); + } + + @Override + public void caseALstdeclacvarLdec(ALstdeclacvarLdec node) + { + defaultCase(node); + } + + @Override + public void caseALdec(ALdec node) + { + defaultCase(node); + } + + @Override + public void caseASuitedeclvarSuitedec(ASuitedeclvarSuitedec node) + { + defaultCase(node); + } + + @Override + public void caseASuitedec(ASuitedec node) + { + defaultCase(node); + } + + @Override + public void caseALstdecfncLdf(ALstdecfncLdf node) + { + defaultCase(node); + } + + @Override + public void caseALdf(ALdf node) + { + defaultCase(node); + } + + @Override + public void caseTEspaces(TEspaces node) + { + defaultCase(node); + } + + @Override + public void caseTCommentaire(TCommentaire node) + { + defaultCase(node); + } + + @Override + public void caseTPlus(TPlus node) + { + defaultCase(node); + } + + @Override + public void caseTPointvirgule(TPointvirgule node) + { + defaultCase(node); + } + + @Override + public void caseTMoins(TMoins node) + { + defaultCase(node); + } + + @Override + public void caseTOu(TOu node) + { + defaultCase(node); + } + + @Override + public void caseTEt(TEt node) + { + defaultCase(node); + } + + @Override + public void caseTVirgule(TVirgule node) + { + defaultCase(node); + } + + @Override + public void caseTEgale(TEgale node) + { + defaultCase(node); + } + + @Override + public void caseTInf(TInf node) + { + defaultCase(node); + } + + @Override + public void caseTFois(TFois node) + { + defaultCase(node); + } + + @Override + public void caseTDiviser(TDiviser node) + { + defaultCase(node); + } + + @Override + public void caseTNon(TNon node) + { + defaultCase(node); + } + + @Override + public void caseTGparenthese(TGparenthese node) + { + defaultCase(node); + } + + @Override + public void caseTDparenthese(TDparenthese node) + { + defaultCase(node); + } + + @Override + public void caseTAccoladeg(TAccoladeg node) + { + defaultCase(node); + } + + @Override + public void caseTAccoladed(TAccoladed node) + { + defaultCase(node); + } + + @Override + public void caseTCrochetg(TCrochetg node) + { + defaultCase(node); + } + + @Override + public void caseTCrochetd(TCrochetd node) + { + defaultCase(node); + } + + @Override + public void caseTBool(TBool node) + { + defaultCase(node); + } + + @Override + public void caseTEntier(TEntier node) + { + defaultCase(node); + } + + @Override + public void caseTSi(TSi node) + { + defaultCase(node); + } + + @Override + public void caseTAlors(TAlors node) + { + defaultCase(node); + } + + @Override + public void caseTTantque(TTantque node) + { + defaultCase(node); + } + + @Override + public void caseTFaire(TFaire node) + { + defaultCase(node); + } + + @Override + public void caseTSinon(TSinon node) + { + defaultCase(node); + } + + @Override + public void caseTRetourner(TRetourner node) + { + defaultCase(node); + } + + @Override + public void caseTLire(TLire node) + { + defaultCase(node); + } + + @Override + public void caseTEcrire(TEcrire node) + { + defaultCase(node); + } + + @Override + public void caseTNombre(TNombre node) + { + defaultCase(node); + } + + @Override + public void caseTVrai(TVrai node) + { + defaultCase(node); + } + + @Override + public void caseTFaux(TFaux node) + { + defaultCase(node); + } + + @Override + public void caseTId(TId node) + { + defaultCase(node); + } + + @Override + public void caseEOF(EOF node) + { + defaultCase(node); + } + + @Override + public void caseInvalidToken(InvalidToken node) + { + defaultCase(node); + } + + public void defaultCase(@SuppressWarnings("unused") Node node) + { + // do nothing + } +} diff --git a/src/lParser/analysis/DepthFirstAdapter.java b/src/lParser/analysis/DepthFirstAdapter.java new file mode 100644 index 0000000..d9885ca --- /dev/null +++ b/src/lParser/analysis/DepthFirstAdapter.java @@ -0,0 +1,1439 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.analysis; + +import java.util.*; +import lParser.node.*; + +public class DepthFirstAdapter extends AnalysisAdapter +{ + 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.getPProg().apply(this); + node.getEOF().apply(this); + outStart(node); + } + + public void inAProg(AProg node) + { + defaultIn(node); + } + + public void outAProg(AProg node) + { + defaultOut(node); + } + + @Override + public void caseAProg(AProg node) + { + inAProg(node); + if(node.getLdec() != null) + { + node.getLdec().apply(this); + } + if(node.getLdf() != null) + { + node.getLdf().apply(this); + } + outAProg(node); + } + + public void inAOrExp(AOrExp node) + { + defaultIn(node); + } + + public void outAOrExp(AOrExp node) + { + defaultOut(node); + } + + @Override + public void caseAOrExp(AOrExp node) + { + inAOrExp(node); + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getOu() != null) + { + node.getOu().apply(this); + } + if(node.getAnd() != null) + { + node.getAnd().apply(this); + } + outAOrExp(node); + } + + public void inAAndExp(AAndExp node) + { + defaultIn(node); + } + + public void outAAndExp(AAndExp node) + { + defaultOut(node); + } + + @Override + public void caseAAndExp(AAndExp node) + { + inAAndExp(node); + if(node.getAnd() != null) + { + node.getAnd().apply(this); + } + outAAndExp(node); + } + + public void inAEtAnd(AEtAnd node) + { + defaultIn(node); + } + + public void outAEtAnd(AEtAnd node) + { + defaultOut(node); + } + + @Override + public void caseAEtAnd(AEtAnd node) + { + inAEtAnd(node); + if(node.getAnd() != null) + { + node.getAnd().apply(this); + } + if(node.getEt() != null) + { + node.getEt().apply(this); + } + if(node.getEquals() != null) + { + node.getEquals().apply(this); + } + outAEtAnd(node); + } + + public void inAEqualsAnd(AEqualsAnd node) + { + defaultIn(node); + } + + public void outAEqualsAnd(AEqualsAnd node) + { + defaultOut(node); + } + + @Override + public void caseAEqualsAnd(AEqualsAnd node) + { + inAEqualsAnd(node); + if(node.getEquals() != null) + { + node.getEquals().apply(this); + } + outAEqualsAnd(node); + } + + public void inAEgaleEquals(AEgaleEquals node) + { + defaultIn(node); + } + + public void outAEgaleEquals(AEgaleEquals node) + { + defaultOut(node); + } + + @Override + public void caseAEgaleEquals(AEgaleEquals node) + { + inAEgaleEquals(node); + if(node.getEquals() != null) + { + node.getEquals().apply(this); + } + if(node.getEgale() != null) + { + node.getEgale().apply(this); + } + if(node.getAdd() != null) + { + node.getAdd().apply(this); + } + outAEgaleEquals(node); + } + + public void inAInfEquals(AInfEquals node) + { + defaultIn(node); + } + + public void outAInfEquals(AInfEquals node) + { + defaultOut(node); + } + + @Override + public void caseAInfEquals(AInfEquals node) + { + inAInfEquals(node); + if(node.getEquals() != null) + { + node.getEquals().apply(this); + } + if(node.getInf() != null) + { + node.getInf().apply(this); + } + if(node.getAdd() != null) + { + node.getAdd().apply(this); + } + outAInfEquals(node); + } + + public void inAAddEquals(AAddEquals node) + { + defaultIn(node); + } + + public void outAAddEquals(AAddEquals node) + { + defaultOut(node); + } + + @Override + public void caseAAddEquals(AAddEquals node) + { + inAAddEquals(node); + if(node.getAdd() != null) + { + node.getAdd().apply(this); + } + outAAddEquals(node); + } + + public void inAPlusAdd(APlusAdd node) + { + defaultIn(node); + } + + public void outAPlusAdd(APlusAdd node) + { + defaultOut(node); + } + + @Override + public void caseAPlusAdd(APlusAdd node) + { + inAPlusAdd(node); + if(node.getAdd() != null) + { + node.getAdd().apply(this); + } + if(node.getPlus() != null) + { + node.getPlus().apply(this); + } + if(node.getMult() != null) + { + node.getMult().apply(this); + } + outAPlusAdd(node); + } + + public void inAMoinsAdd(AMoinsAdd node) + { + defaultIn(node); + } + + public void outAMoinsAdd(AMoinsAdd node) + { + defaultOut(node); + } + + @Override + public void caseAMoinsAdd(AMoinsAdd node) + { + inAMoinsAdd(node); + if(node.getAdd() != null) + { + node.getAdd().apply(this); + } + if(node.getMoins() != null) + { + node.getMoins().apply(this); + } + if(node.getMult() != null) + { + node.getMult().apply(this); + } + outAMoinsAdd(node); + } + + public void inAMultAdd(AMultAdd node) + { + defaultIn(node); + } + + public void outAMultAdd(AMultAdd node) + { + defaultOut(node); + } + + @Override + public void caseAMultAdd(AMultAdd node) + { + inAMultAdd(node); + if(node.getMult() != null) + { + node.getMult().apply(this); + } + outAMultAdd(node); + } + + public void inAFoisMult(AFoisMult node) + { + defaultIn(node); + } + + public void outAFoisMult(AFoisMult node) + { + defaultOut(node); + } + + @Override + public void caseAFoisMult(AFoisMult node) + { + inAFoisMult(node); + if(node.getMult() != null) + { + node.getMult().apply(this); + } + if(node.getFois() != null) + { + node.getFois().apply(this); + } + if(node.getNeg() != null) + { + node.getNeg().apply(this); + } + outAFoisMult(node); + } + + public void inADiviserMult(ADiviserMult node) + { + defaultIn(node); + } + + public void outADiviserMult(ADiviserMult node) + { + defaultOut(node); + } + + @Override + public void caseADiviserMult(ADiviserMult node) + { + inADiviserMult(node); + if(node.getMult() != null) + { + node.getMult().apply(this); + } + if(node.getDiviser() != null) + { + node.getDiviser().apply(this); + } + if(node.getNeg() != null) + { + node.getNeg().apply(this); + } + outADiviserMult(node); + } + + public void inANegMult(ANegMult node) + { + defaultIn(node); + } + + public void outANegMult(ANegMult node) + { + defaultOut(node); + } + + @Override + public void caseANegMult(ANegMult node) + { + inANegMult(node); + if(node.getNeg() != null) + { + node.getNeg().apply(this); + } + outANegMult(node); + } + + public void inANonNeg(ANonNeg node) + { + defaultIn(node); + } + + public void outANonNeg(ANonNeg node) + { + defaultOut(node); + } + + @Override + public void caseANonNeg(ANonNeg node) + { + inANonNeg(node); + if(node.getNon() != null) + { + node.getNon().apply(this); + } + if(node.getNeg() != null) + { + node.getNeg().apply(this); + } + outANonNeg(node); + } + + public void inAE6Neg(AE6Neg node) + { + defaultIn(node); + } + + public void outAE6Neg(AE6Neg node) + { + defaultOut(node); + } + + @Override + public void caseAE6Neg(AE6Neg node) + { + inAE6Neg(node); + if(node.getE6() != null) + { + node.getE6().apply(this); + } + outAE6Neg(node); + } + + public void inAParentheseE6(AParentheseE6 node) + { + defaultIn(node); + } + + public void outAParentheseE6(AParentheseE6 node) + { + defaultOut(node); + } + + @Override + public void caseAParentheseE6(AParentheseE6 node) + { + inAParentheseE6(node); + if(node.getGparenthese() != null) + { + node.getGparenthese().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getDparenthese() != null) + { + node.getDparenthese().apply(this); + } + outAParentheseE6(node); + } + + public void inANombreE6(ANombreE6 node) + { + defaultIn(node); + } + + public void outANombreE6(ANombreE6 node) + { + defaultOut(node); + } + + @Override + public void caseANombreE6(ANombreE6 node) + { + inANombreE6(node); + if(node.getNombre() != null) + { + node.getNombre().apply(this); + } + outANombreE6(node); + } + + public void inAVraiE6(AVraiE6 node) + { + defaultIn(node); + } + + public void outAVraiE6(AVraiE6 node) + { + defaultOut(node); + } + + @Override + public void caseAVraiE6(AVraiE6 node) + { + inAVraiE6(node); + if(node.getVrai() != null) + { + node.getVrai().apply(this); + } + outAVraiE6(node); + } + + public void inAFauxE6(AFauxE6 node) + { + defaultIn(node); + } + + public void outAFauxE6(AFauxE6 node) + { + defaultOut(node); + } + + @Override + public void caseAFauxE6(AFauxE6 node) + { + inAFauxE6(node); + if(node.getFaux() != null) + { + node.getFaux().apply(this); + } + outAFauxE6(node); + } + + public void inALireE6(ALireE6 node) + { + defaultIn(node); + } + + public void outALireE6(ALireE6 node) + { + defaultOut(node); + } + + @Override + public void caseALireE6(ALireE6 node) + { + inALireE6(node); + if(node.getLire() != null) + { + node.getLire().apply(this); + } + if(node.getGparenthese() != null) + { + node.getGparenthese().apply(this); + } + if(node.getDparenthese() != null) + { + node.getDparenthese().apply(this); + } + outALireE6(node); + } + + public void inAVarE6(AVarE6 node) + { + defaultIn(node); + } + + public void outAVarE6(AVarE6 node) + { + defaultOut(node); + } + + @Override + public void caseAVarE6(AVarE6 node) + { + inAVarE6(node); + if(node.getVar() != null) + { + node.getVar().apply(this); + } + outAVarE6(node); + } + + public void inAAppelfncE6(AAppelfncE6 node) + { + defaultIn(node); + } + + public void outAAppelfncE6(AAppelfncE6 node) + { + defaultOut(node); + } + + @Override + public void caseAAppelfncE6(AAppelfncE6 node) + { + inAAppelfncE6(node); + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getGparenthese() != null) + { + node.getGparenthese().apply(this); + } + if(node.getLe() != null) + { + node.getLe().apply(this); + } + if(node.getDparenthese() != null) + { + node.getDparenthese().apply(this); + } + outAAppelfncE6(node); + } + + public void inAAffectationIns(AAffectationIns node) + { + defaultIn(node); + } + + public void outAAffectationIns(AAffectationIns node) + { + defaultOut(node); + } + + @Override + public void caseAAffectationIns(AAffectationIns node) + { + inAAffectationIns(node); + if(node.getVar() != null) + { + node.getVar().apply(this); + } + if(node.getEgale() != null) + { + node.getEgale().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getPointvirgule() != null) + { + node.getPointvirgule().apply(this); + } + outAAffectationIns(node); + } + + public void inATqIns(ATqIns node) + { + defaultIn(node); + } + + public void outATqIns(ATqIns node) + { + defaultOut(node); + } + + @Override + public void caseATqIns(ATqIns node) + { + inATqIns(node); + if(node.getTantque() != null) + { + node.getTantque().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getFaire() != null) + { + node.getFaire().apply(this); + } + if(node.getBloc() != null) + { + node.getBloc().apply(this); + } + outATqIns(node); + } + + public void inASiIns(ASiIns node) + { + defaultIn(node); + } + + public void outASiIns(ASiIns node) + { + defaultOut(node); + } + + @Override + public void caseASiIns(ASiIns node) + { + inASiIns(node); + if(node.getSi() != null) + { + node.getSi().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getAlors() != null) + { + node.getAlors().apply(this); + } + if(node.getBloc() != null) + { + node.getBloc().apply(this); + } + outASiIns(node); + } + + public void inASisinonIns(ASisinonIns node) + { + defaultIn(node); + } + + public void outASisinonIns(ASisinonIns node) + { + defaultOut(node); + } + + @Override + public void caseASisinonIns(ASisinonIns node) + { + inASisinonIns(node); + if(node.getSi() != null) + { + node.getSi().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getAlors() != null) + { + node.getAlors().apply(this); + } + if(node.getAlor() != null) + { + node.getAlor().apply(this); + } + if(node.getSinon() != null) + { + node.getSinon().apply(this); + } + if(node.getSino() != null) + { + node.getSino().apply(this); + } + outASisinonIns(node); + } + + public void inAReturnIns(AReturnIns node) + { + defaultIn(node); + } + + public void outAReturnIns(AReturnIns node) + { + defaultOut(node); + } + + @Override + public void caseAReturnIns(AReturnIns node) + { + inAReturnIns(node); + if(node.getRetourner() != null) + { + node.getRetourner().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getPointvirgule() != null) + { + node.getPointvirgule().apply(this); + } + outAReturnIns(node); + } + + public void inAWriteIns(AWriteIns node) + { + defaultIn(node); + } + + public void outAWriteIns(AWriteIns node) + { + defaultOut(node); + } + + @Override + public void caseAWriteIns(AWriteIns node) + { + inAWriteIns(node); + if(node.getEcrire() != null) + { + node.getEcrire().apply(this); + } + if(node.getGparenthese() != null) + { + node.getGparenthese().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getDparenthese() != null) + { + node.getDparenthese().apply(this); + } + if(node.getPointvirgule() != null) + { + node.getPointvirgule().apply(this); + } + outAWriteIns(node); + } + + public void inAAppelfncIns(AAppelfncIns node) + { + defaultIn(node); + } + + public void outAAppelfncIns(AAppelfncIns node) + { + defaultOut(node); + } + + @Override + public void caseAAppelfncIns(AAppelfncIns node) + { + inAAppelfncIns(node); + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getGparenthese() != null) + { + node.getGparenthese().apply(this); + } + if(node.getLe() != null) + { + node.getLe().apply(this); + } + if(node.getDparenthese() != null) + { + node.getDparenthese().apply(this); + } + if(node.getPointvirgule() != null) + { + node.getPointvirgule().apply(this); + } + outAAppelfncIns(node); + } + + public void inAInstrBloc(AInstrBloc node) + { + defaultIn(node); + } + + public void outAInstrBloc(AInstrBloc node) + { + defaultOut(node); + } + + @Override + public void caseAInstrBloc(AInstrBloc node) + { + inAInstrBloc(node); + if(node.getAccoladeg() != null) + { + node.getAccoladeg().apply(this); + } + if(node.getLi() != null) + { + node.getLi().apply(this); + } + if(node.getAccoladed() != null) + { + node.getAccoladed().apply(this); + } + outAInstrBloc(node); + } + + public void inAListeinstrLi(AListeinstrLi node) + { + defaultIn(node); + } + + public void outAListeinstrLi(AListeinstrLi node) + { + defaultOut(node); + } + + @Override + public void caseAListeinstrLi(AListeinstrLi node) + { + inAListeinstrLi(node); + if(node.getIns() != null) + { + node.getIns().apply(this); + } + if(node.getLi() != null) + { + node.getLi().apply(this); + } + outAListeinstrLi(node); + } + + public void inAEpsilonLi(AEpsilonLi node) + { + defaultIn(node); + } + + public void outAEpsilonLi(AEpsilonLi node) + { + defaultOut(node); + } + + @Override + public void caseAEpsilonLi(AEpsilonLi node) + { + inAEpsilonLi(node); + if(node.getEpsilon() != null) + { + node.getEpsilon().apply(this); + } + outAEpsilonLi(node); + } + + public void inAEpsilon(AEpsilon node) + { + defaultIn(node); + } + + public void outAEpsilon(AEpsilon node) + { + defaultOut(node); + } + + @Override + public void caseAEpsilon(AEpsilon node) + { + inAEpsilon(node); + outAEpsilon(node); + } + + public void inAExprLe(AExprLe node) + { + defaultIn(node); + } + + public void outAExprLe(AExprLe node) + { + defaultOut(node); + } + + @Override + public void caseAExprLe(AExprLe node) + { + inAExprLe(node); + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getLse() != null) + { + node.getLse().apply(this); + } + outAExprLe(node); + } + + public void inAEpsilonLe(AEpsilonLe node) + { + defaultIn(node); + } + + public void outAEpsilonLe(AEpsilonLe node) + { + defaultOut(node); + } + + @Override + public void caseAEpsilonLe(AEpsilonLe node) + { + inAEpsilonLe(node); + if(node.getEpsilon() != null) + { + node.getEpsilon().apply(this); + } + outAEpsilonLe(node); + } + + public void inALstexprLse(ALstexprLse node) + { + defaultIn(node); + } + + public void outALstexprLse(ALstexprLse node) + { + defaultOut(node); + } + + @Override + public void caseALstexprLse(ALstexprLse node) + { + inALstexprLse(node); + if(node.getVirgule() != null) + { + node.getVirgule().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getLse() != null) + { + node.getLse().apply(this); + } + outALstexprLse(node); + } + + public void inAEpsilonLse(AEpsilonLse node) + { + defaultIn(node); + } + + public void outAEpsilonLse(AEpsilonLse node) + { + defaultOut(node); + } + + @Override + public void caseAEpsilonLse(AEpsilonLse node) + { + inAEpsilonLse(node); + if(node.getEpsilon() != null) + { + node.getEpsilon().apply(this); + } + outAEpsilonLse(node); + } + + public void inAIdVar(AIdVar node) + { + defaultIn(node); + } + + public void outAIdVar(AIdVar node) + { + defaultOut(node); + } + + @Override + public void caseAIdVar(AIdVar node) + { + inAIdVar(node); + if(node.getId() != null) + { + node.getId().apply(this); + } + outAIdVar(node); + } + + public void inAIdCrochetVar(AIdCrochetVar node) + { + defaultIn(node); + } + + public void outAIdCrochetVar(AIdCrochetVar node) + { + defaultOut(node); + } + + @Override + public void caseAIdCrochetVar(AIdCrochetVar node) + { + inAIdCrochetVar(node); + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getCrochetg() != null) + { + node.getCrochetg().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getCrochetd() != null) + { + node.getCrochetd().apply(this); + } + outAIdCrochetVar(node); + } + + public void inADeclavariableDecvar(ADeclavariableDecvar node) + { + defaultIn(node); + } + + public void outADeclavariableDecvar(ADeclavariableDecvar node) + { + defaultOut(node); + } + + @Override + public void caseADeclavariableDecvar(ADeclavariableDecvar node) + { + inADeclavariableDecvar(node); + if(node.getType() != null) + { + node.getType().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + outADeclavariableDecvar(node); + } + + public void inADecvar(ADecvar node) + { + defaultIn(node); + } + + public void outADecvar(ADecvar node) + { + defaultOut(node); + } + + @Override + public void caseADecvar(ADecvar node) + { + inADecvar(node); + if(node.getType() != null) + { + node.getType().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getCrochetg() != null) + { + node.getCrochetg().apply(this); + } + if(node.getNombre() != null) + { + node.getNombre().apply(this); + } + if(node.getCrochetd() != null) + { + node.getCrochetd().apply(this); + } + outADecvar(node); + } + + public void inATypeType(ATypeType node) + { + defaultIn(node); + } + + public void outATypeType(ATypeType node) + { + defaultOut(node); + } + + @Override + public void caseATypeType(ATypeType node) + { + inATypeType(node); + if(node.getBool() != null) + { + node.getBool().apply(this); + } + outATypeType(node); + } + + public void inAType(AType node) + { + defaultIn(node); + } + + public void outAType(AType node) + { + defaultOut(node); + } + + @Override + public void caseAType(AType node) + { + inAType(node); + if(node.getEntier() != null) + { + node.getEntier().apply(this); + } + outAType(node); + } + + public void inADeclafoncDecfonc(ADeclafoncDecfonc node) + { + defaultIn(node); + } + + public void outADeclafoncDecfonc(ADeclafoncDecfonc node) + { + defaultOut(node); + } + + @Override + public void caseADeclafoncDecfonc(ADeclafoncDecfonc node) + { + inADeclafoncDecfonc(node); + if(node.getTypeopt() != null) + { + node.getTypeopt().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getGparenthese() != null) + { + node.getGparenthese().apply(this); + } + if(node.getFirstldec() != null) + { + node.getFirstldec().apply(this); + } + if(node.getDparenthese() != null) + { + node.getDparenthese().apply(this); + } + if(node.getSecondldec() != null) + { + node.getSecondldec().apply(this); + } + if(node.getBloc() != null) + { + node.getBloc().apply(this); + } + outADeclafoncDecfonc(node); + } + + public void inATypeoptTypeopt(ATypeoptTypeopt node) + { + defaultIn(node); + } + + public void outATypeoptTypeopt(ATypeoptTypeopt node) + { + defaultOut(node); + } + + @Override + public void caseATypeoptTypeopt(ATypeoptTypeopt node) + { + inATypeoptTypeopt(node); + if(node.getType() != null) + { + node.getType().apply(this); + } + outATypeoptTypeopt(node); + } + + public void inATypeopt(ATypeopt node) + { + defaultIn(node); + } + + public void outATypeopt(ATypeopt node) + { + defaultOut(node); + } + + @Override + public void caseATypeopt(ATypeopt node) + { + inATypeopt(node); + if(node.getEpsilon() != null) + { + node.getEpsilon().apply(this); + } + outATypeopt(node); + } + + public void inALstdeclacvarLdec(ALstdeclacvarLdec node) + { + defaultIn(node); + } + + public void outALstdeclacvarLdec(ALstdeclacvarLdec node) + { + defaultOut(node); + } + + @Override + public void caseALstdeclacvarLdec(ALstdeclacvarLdec node) + { + inALstdeclacvarLdec(node); + if(node.getDecvar() != null) + { + node.getDecvar().apply(this); + } + if(node.getSuitedec() != null) + { + node.getSuitedec().apply(this); + } + outALstdeclacvarLdec(node); + } + + public void inALdec(ALdec node) + { + defaultIn(node); + } + + public void outALdec(ALdec node) + { + defaultOut(node); + } + + @Override + public void caseALdec(ALdec node) + { + inALdec(node); + if(node.getEpsilon() != null) + { + node.getEpsilon().apply(this); + } + outALdec(node); + } + + public void inASuitedeclvarSuitedec(ASuitedeclvarSuitedec node) + { + defaultIn(node); + } + + public void outASuitedeclvarSuitedec(ASuitedeclvarSuitedec node) + { + defaultOut(node); + } + + @Override + public void caseASuitedeclvarSuitedec(ASuitedeclvarSuitedec node) + { + inASuitedeclvarSuitedec(node); + if(node.getVirgule() != null) + { + node.getVirgule().apply(this); + } + if(node.getDecvar() != null) + { + node.getDecvar().apply(this); + } + if(node.getSuitedec() != null) + { + node.getSuitedec().apply(this); + } + outASuitedeclvarSuitedec(node); + } + + public void inASuitedec(ASuitedec node) + { + defaultIn(node); + } + + public void outASuitedec(ASuitedec node) + { + defaultOut(node); + } + + @Override + public void caseASuitedec(ASuitedec node) + { + inASuitedec(node); + if(node.getEpsilon() != null) + { + node.getEpsilon().apply(this); + } + outASuitedec(node); + } + + public void inALstdecfncLdf(ALstdecfncLdf node) + { + defaultIn(node); + } + + public void outALstdecfncLdf(ALstdecfncLdf node) + { + defaultOut(node); + } + + @Override + public void caseALstdecfncLdf(ALstdecfncLdf node) + { + inALstdecfncLdf(node); + if(node.getDecfonc() != null) + { + node.getDecfonc().apply(this); + } + if(node.getLdf() != null) + { + node.getLdf().apply(this); + } + outALstdecfncLdf(node); + } + + public void inALdf(ALdf node) + { + defaultIn(node); + } + + public void outALdf(ALdf node) + { + defaultOut(node); + } + + @Override + public void caseALdf(ALdf node) + { + inALdf(node); + if(node.getEpsilon() != null) + { + node.getEpsilon().apply(this); + } + outALdf(node); + } +} diff --git a/src/lParser/analysis/ReversedDepthFirstAdapter.java b/src/lParser/analysis/ReversedDepthFirstAdapter.java new file mode 100644 index 0000000..b41333c --- /dev/null +++ b/src/lParser/analysis/ReversedDepthFirstAdapter.java @@ -0,0 +1,1439 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.analysis; + +import java.util.*; +import lParser.node.*; + +public class ReversedDepthFirstAdapter extends AnalysisAdapter +{ + 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.getEOF().apply(this); + node.getPProg().apply(this); + outStart(node); + } + + public void inAProg(AProg node) + { + defaultIn(node); + } + + public void outAProg(AProg node) + { + defaultOut(node); + } + + @Override + public void caseAProg(AProg node) + { + inAProg(node); + if(node.getLdf() != null) + { + node.getLdf().apply(this); + } + if(node.getLdec() != null) + { + node.getLdec().apply(this); + } + outAProg(node); + } + + public void inAOrExp(AOrExp node) + { + defaultIn(node); + } + + public void outAOrExp(AOrExp node) + { + defaultOut(node); + } + + @Override + public void caseAOrExp(AOrExp node) + { + inAOrExp(node); + if(node.getAnd() != null) + { + node.getAnd().apply(this); + } + if(node.getOu() != null) + { + node.getOu().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + outAOrExp(node); + } + + public void inAAndExp(AAndExp node) + { + defaultIn(node); + } + + public void outAAndExp(AAndExp node) + { + defaultOut(node); + } + + @Override + public void caseAAndExp(AAndExp node) + { + inAAndExp(node); + if(node.getAnd() != null) + { + node.getAnd().apply(this); + } + outAAndExp(node); + } + + public void inAEtAnd(AEtAnd node) + { + defaultIn(node); + } + + public void outAEtAnd(AEtAnd node) + { + defaultOut(node); + } + + @Override + public void caseAEtAnd(AEtAnd node) + { + inAEtAnd(node); + if(node.getEquals() != null) + { + node.getEquals().apply(this); + } + if(node.getEt() != null) + { + node.getEt().apply(this); + } + if(node.getAnd() != null) + { + node.getAnd().apply(this); + } + outAEtAnd(node); + } + + public void inAEqualsAnd(AEqualsAnd node) + { + defaultIn(node); + } + + public void outAEqualsAnd(AEqualsAnd node) + { + defaultOut(node); + } + + @Override + public void caseAEqualsAnd(AEqualsAnd node) + { + inAEqualsAnd(node); + if(node.getEquals() != null) + { + node.getEquals().apply(this); + } + outAEqualsAnd(node); + } + + public void inAEgaleEquals(AEgaleEquals node) + { + defaultIn(node); + } + + public void outAEgaleEquals(AEgaleEquals node) + { + defaultOut(node); + } + + @Override + public void caseAEgaleEquals(AEgaleEquals node) + { + inAEgaleEquals(node); + if(node.getAdd() != null) + { + node.getAdd().apply(this); + } + if(node.getEgale() != null) + { + node.getEgale().apply(this); + } + if(node.getEquals() != null) + { + node.getEquals().apply(this); + } + outAEgaleEquals(node); + } + + public void inAInfEquals(AInfEquals node) + { + defaultIn(node); + } + + public void outAInfEquals(AInfEquals node) + { + defaultOut(node); + } + + @Override + public void caseAInfEquals(AInfEquals node) + { + inAInfEquals(node); + if(node.getAdd() != null) + { + node.getAdd().apply(this); + } + if(node.getInf() != null) + { + node.getInf().apply(this); + } + if(node.getEquals() != null) + { + node.getEquals().apply(this); + } + outAInfEquals(node); + } + + public void inAAddEquals(AAddEquals node) + { + defaultIn(node); + } + + public void outAAddEquals(AAddEquals node) + { + defaultOut(node); + } + + @Override + public void caseAAddEquals(AAddEquals node) + { + inAAddEquals(node); + if(node.getAdd() != null) + { + node.getAdd().apply(this); + } + outAAddEquals(node); + } + + public void inAPlusAdd(APlusAdd node) + { + defaultIn(node); + } + + public void outAPlusAdd(APlusAdd node) + { + defaultOut(node); + } + + @Override + public void caseAPlusAdd(APlusAdd node) + { + inAPlusAdd(node); + if(node.getMult() != null) + { + node.getMult().apply(this); + } + if(node.getPlus() != null) + { + node.getPlus().apply(this); + } + if(node.getAdd() != null) + { + node.getAdd().apply(this); + } + outAPlusAdd(node); + } + + public void inAMoinsAdd(AMoinsAdd node) + { + defaultIn(node); + } + + public void outAMoinsAdd(AMoinsAdd node) + { + defaultOut(node); + } + + @Override + public void caseAMoinsAdd(AMoinsAdd node) + { + inAMoinsAdd(node); + if(node.getMult() != null) + { + node.getMult().apply(this); + } + if(node.getMoins() != null) + { + node.getMoins().apply(this); + } + if(node.getAdd() != null) + { + node.getAdd().apply(this); + } + outAMoinsAdd(node); + } + + public void inAMultAdd(AMultAdd node) + { + defaultIn(node); + } + + public void outAMultAdd(AMultAdd node) + { + defaultOut(node); + } + + @Override + public void caseAMultAdd(AMultAdd node) + { + inAMultAdd(node); + if(node.getMult() != null) + { + node.getMult().apply(this); + } + outAMultAdd(node); + } + + public void inAFoisMult(AFoisMult node) + { + defaultIn(node); + } + + public void outAFoisMult(AFoisMult node) + { + defaultOut(node); + } + + @Override + public void caseAFoisMult(AFoisMult node) + { + inAFoisMult(node); + if(node.getNeg() != null) + { + node.getNeg().apply(this); + } + if(node.getFois() != null) + { + node.getFois().apply(this); + } + if(node.getMult() != null) + { + node.getMult().apply(this); + } + outAFoisMult(node); + } + + public void inADiviserMult(ADiviserMult node) + { + defaultIn(node); + } + + public void outADiviserMult(ADiviserMult node) + { + defaultOut(node); + } + + @Override + public void caseADiviserMult(ADiviserMult node) + { + inADiviserMult(node); + if(node.getNeg() != null) + { + node.getNeg().apply(this); + } + if(node.getDiviser() != null) + { + node.getDiviser().apply(this); + } + if(node.getMult() != null) + { + node.getMult().apply(this); + } + outADiviserMult(node); + } + + public void inANegMult(ANegMult node) + { + defaultIn(node); + } + + public void outANegMult(ANegMult node) + { + defaultOut(node); + } + + @Override + public void caseANegMult(ANegMult node) + { + inANegMult(node); + if(node.getNeg() != null) + { + node.getNeg().apply(this); + } + outANegMult(node); + } + + public void inANonNeg(ANonNeg node) + { + defaultIn(node); + } + + public void outANonNeg(ANonNeg node) + { + defaultOut(node); + } + + @Override + public void caseANonNeg(ANonNeg node) + { + inANonNeg(node); + if(node.getNeg() != null) + { + node.getNeg().apply(this); + } + if(node.getNon() != null) + { + node.getNon().apply(this); + } + outANonNeg(node); + } + + public void inAE6Neg(AE6Neg node) + { + defaultIn(node); + } + + public void outAE6Neg(AE6Neg node) + { + defaultOut(node); + } + + @Override + public void caseAE6Neg(AE6Neg node) + { + inAE6Neg(node); + if(node.getE6() != null) + { + node.getE6().apply(this); + } + outAE6Neg(node); + } + + public void inAParentheseE6(AParentheseE6 node) + { + defaultIn(node); + } + + public void outAParentheseE6(AParentheseE6 node) + { + defaultOut(node); + } + + @Override + public void caseAParentheseE6(AParentheseE6 node) + { + inAParentheseE6(node); + if(node.getDparenthese() != null) + { + node.getDparenthese().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getGparenthese() != null) + { + node.getGparenthese().apply(this); + } + outAParentheseE6(node); + } + + public void inANombreE6(ANombreE6 node) + { + defaultIn(node); + } + + public void outANombreE6(ANombreE6 node) + { + defaultOut(node); + } + + @Override + public void caseANombreE6(ANombreE6 node) + { + inANombreE6(node); + if(node.getNombre() != null) + { + node.getNombre().apply(this); + } + outANombreE6(node); + } + + public void inAVraiE6(AVraiE6 node) + { + defaultIn(node); + } + + public void outAVraiE6(AVraiE6 node) + { + defaultOut(node); + } + + @Override + public void caseAVraiE6(AVraiE6 node) + { + inAVraiE6(node); + if(node.getVrai() != null) + { + node.getVrai().apply(this); + } + outAVraiE6(node); + } + + public void inAFauxE6(AFauxE6 node) + { + defaultIn(node); + } + + public void outAFauxE6(AFauxE6 node) + { + defaultOut(node); + } + + @Override + public void caseAFauxE6(AFauxE6 node) + { + inAFauxE6(node); + if(node.getFaux() != null) + { + node.getFaux().apply(this); + } + outAFauxE6(node); + } + + public void inALireE6(ALireE6 node) + { + defaultIn(node); + } + + public void outALireE6(ALireE6 node) + { + defaultOut(node); + } + + @Override + public void caseALireE6(ALireE6 node) + { + inALireE6(node); + if(node.getDparenthese() != null) + { + node.getDparenthese().apply(this); + } + if(node.getGparenthese() != null) + { + node.getGparenthese().apply(this); + } + if(node.getLire() != null) + { + node.getLire().apply(this); + } + outALireE6(node); + } + + public void inAVarE6(AVarE6 node) + { + defaultIn(node); + } + + public void outAVarE6(AVarE6 node) + { + defaultOut(node); + } + + @Override + public void caseAVarE6(AVarE6 node) + { + inAVarE6(node); + if(node.getVar() != null) + { + node.getVar().apply(this); + } + outAVarE6(node); + } + + public void inAAppelfncE6(AAppelfncE6 node) + { + defaultIn(node); + } + + public void outAAppelfncE6(AAppelfncE6 node) + { + defaultOut(node); + } + + @Override + public void caseAAppelfncE6(AAppelfncE6 node) + { + inAAppelfncE6(node); + if(node.getDparenthese() != null) + { + node.getDparenthese().apply(this); + } + if(node.getLe() != null) + { + node.getLe().apply(this); + } + if(node.getGparenthese() != null) + { + node.getGparenthese().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + outAAppelfncE6(node); + } + + public void inAAffectationIns(AAffectationIns node) + { + defaultIn(node); + } + + public void outAAffectationIns(AAffectationIns node) + { + defaultOut(node); + } + + @Override + public void caseAAffectationIns(AAffectationIns node) + { + inAAffectationIns(node); + if(node.getPointvirgule() != null) + { + node.getPointvirgule().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getEgale() != null) + { + node.getEgale().apply(this); + } + if(node.getVar() != null) + { + node.getVar().apply(this); + } + outAAffectationIns(node); + } + + public void inATqIns(ATqIns node) + { + defaultIn(node); + } + + public void outATqIns(ATqIns node) + { + defaultOut(node); + } + + @Override + public void caseATqIns(ATqIns node) + { + inATqIns(node); + if(node.getBloc() != null) + { + node.getBloc().apply(this); + } + if(node.getFaire() != null) + { + node.getFaire().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getTantque() != null) + { + node.getTantque().apply(this); + } + outATqIns(node); + } + + public void inASiIns(ASiIns node) + { + defaultIn(node); + } + + public void outASiIns(ASiIns node) + { + defaultOut(node); + } + + @Override + public void caseASiIns(ASiIns node) + { + inASiIns(node); + if(node.getBloc() != null) + { + node.getBloc().apply(this); + } + if(node.getAlors() != null) + { + node.getAlors().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getSi() != null) + { + node.getSi().apply(this); + } + outASiIns(node); + } + + public void inASisinonIns(ASisinonIns node) + { + defaultIn(node); + } + + public void outASisinonIns(ASisinonIns node) + { + defaultOut(node); + } + + @Override + public void caseASisinonIns(ASisinonIns node) + { + inASisinonIns(node); + if(node.getSino() != null) + { + node.getSino().apply(this); + } + if(node.getSinon() != null) + { + node.getSinon().apply(this); + } + if(node.getAlor() != null) + { + node.getAlor().apply(this); + } + if(node.getAlors() != null) + { + node.getAlors().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getSi() != null) + { + node.getSi().apply(this); + } + outASisinonIns(node); + } + + public void inAReturnIns(AReturnIns node) + { + defaultIn(node); + } + + public void outAReturnIns(AReturnIns node) + { + defaultOut(node); + } + + @Override + public void caseAReturnIns(AReturnIns node) + { + inAReturnIns(node); + if(node.getPointvirgule() != null) + { + node.getPointvirgule().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getRetourner() != null) + { + node.getRetourner().apply(this); + } + outAReturnIns(node); + } + + public void inAWriteIns(AWriteIns node) + { + defaultIn(node); + } + + public void outAWriteIns(AWriteIns node) + { + defaultOut(node); + } + + @Override + public void caseAWriteIns(AWriteIns node) + { + inAWriteIns(node); + if(node.getPointvirgule() != null) + { + node.getPointvirgule().apply(this); + } + if(node.getDparenthese() != null) + { + node.getDparenthese().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getGparenthese() != null) + { + node.getGparenthese().apply(this); + } + if(node.getEcrire() != null) + { + node.getEcrire().apply(this); + } + outAWriteIns(node); + } + + public void inAAppelfncIns(AAppelfncIns node) + { + defaultIn(node); + } + + public void outAAppelfncIns(AAppelfncIns node) + { + defaultOut(node); + } + + @Override + public void caseAAppelfncIns(AAppelfncIns node) + { + inAAppelfncIns(node); + if(node.getPointvirgule() != null) + { + node.getPointvirgule().apply(this); + } + if(node.getDparenthese() != null) + { + node.getDparenthese().apply(this); + } + if(node.getLe() != null) + { + node.getLe().apply(this); + } + if(node.getGparenthese() != null) + { + node.getGparenthese().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + outAAppelfncIns(node); + } + + public void inAInstrBloc(AInstrBloc node) + { + defaultIn(node); + } + + public void outAInstrBloc(AInstrBloc node) + { + defaultOut(node); + } + + @Override + public void caseAInstrBloc(AInstrBloc node) + { + inAInstrBloc(node); + if(node.getAccoladed() != null) + { + node.getAccoladed().apply(this); + } + if(node.getLi() != null) + { + node.getLi().apply(this); + } + if(node.getAccoladeg() != null) + { + node.getAccoladeg().apply(this); + } + outAInstrBloc(node); + } + + public void inAListeinstrLi(AListeinstrLi node) + { + defaultIn(node); + } + + public void outAListeinstrLi(AListeinstrLi node) + { + defaultOut(node); + } + + @Override + public void caseAListeinstrLi(AListeinstrLi node) + { + inAListeinstrLi(node); + if(node.getLi() != null) + { + node.getLi().apply(this); + } + if(node.getIns() != null) + { + node.getIns().apply(this); + } + outAListeinstrLi(node); + } + + public void inAEpsilonLi(AEpsilonLi node) + { + defaultIn(node); + } + + public void outAEpsilonLi(AEpsilonLi node) + { + defaultOut(node); + } + + @Override + public void caseAEpsilonLi(AEpsilonLi node) + { + inAEpsilonLi(node); + if(node.getEpsilon() != null) + { + node.getEpsilon().apply(this); + } + outAEpsilonLi(node); + } + + public void inAEpsilon(AEpsilon node) + { + defaultIn(node); + } + + public void outAEpsilon(AEpsilon node) + { + defaultOut(node); + } + + @Override + public void caseAEpsilon(AEpsilon node) + { + inAEpsilon(node); + outAEpsilon(node); + } + + public void inAExprLe(AExprLe node) + { + defaultIn(node); + } + + public void outAExprLe(AExprLe node) + { + defaultOut(node); + } + + @Override + public void caseAExprLe(AExprLe node) + { + inAExprLe(node); + if(node.getLse() != null) + { + node.getLse().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + outAExprLe(node); + } + + public void inAEpsilonLe(AEpsilonLe node) + { + defaultIn(node); + } + + public void outAEpsilonLe(AEpsilonLe node) + { + defaultOut(node); + } + + @Override + public void caseAEpsilonLe(AEpsilonLe node) + { + inAEpsilonLe(node); + if(node.getEpsilon() != null) + { + node.getEpsilon().apply(this); + } + outAEpsilonLe(node); + } + + public void inALstexprLse(ALstexprLse node) + { + defaultIn(node); + } + + public void outALstexprLse(ALstexprLse node) + { + defaultOut(node); + } + + @Override + public void caseALstexprLse(ALstexprLse node) + { + inALstexprLse(node); + if(node.getLse() != null) + { + node.getLse().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getVirgule() != null) + { + node.getVirgule().apply(this); + } + outALstexprLse(node); + } + + public void inAEpsilonLse(AEpsilonLse node) + { + defaultIn(node); + } + + public void outAEpsilonLse(AEpsilonLse node) + { + defaultOut(node); + } + + @Override + public void caseAEpsilonLse(AEpsilonLse node) + { + inAEpsilonLse(node); + if(node.getEpsilon() != null) + { + node.getEpsilon().apply(this); + } + outAEpsilonLse(node); + } + + public void inAIdVar(AIdVar node) + { + defaultIn(node); + } + + public void outAIdVar(AIdVar node) + { + defaultOut(node); + } + + @Override + public void caseAIdVar(AIdVar node) + { + inAIdVar(node); + if(node.getId() != null) + { + node.getId().apply(this); + } + outAIdVar(node); + } + + public void inAIdCrochetVar(AIdCrochetVar node) + { + defaultIn(node); + } + + public void outAIdCrochetVar(AIdCrochetVar node) + { + defaultOut(node); + } + + @Override + public void caseAIdCrochetVar(AIdCrochetVar node) + { + inAIdCrochetVar(node); + if(node.getCrochetd() != null) + { + node.getCrochetd().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getCrochetg() != null) + { + node.getCrochetg().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + outAIdCrochetVar(node); + } + + public void inADeclavariableDecvar(ADeclavariableDecvar node) + { + defaultIn(node); + } + + public void outADeclavariableDecvar(ADeclavariableDecvar node) + { + defaultOut(node); + } + + @Override + public void caseADeclavariableDecvar(ADeclavariableDecvar node) + { + inADeclavariableDecvar(node); + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getType() != null) + { + node.getType().apply(this); + } + outADeclavariableDecvar(node); + } + + public void inADecvar(ADecvar node) + { + defaultIn(node); + } + + public void outADecvar(ADecvar node) + { + defaultOut(node); + } + + @Override + public void caseADecvar(ADecvar node) + { + inADecvar(node); + if(node.getCrochetd() != null) + { + node.getCrochetd().apply(this); + } + if(node.getNombre() != null) + { + node.getNombre().apply(this); + } + if(node.getCrochetg() != null) + { + node.getCrochetg().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getType() != null) + { + node.getType().apply(this); + } + outADecvar(node); + } + + public void inATypeType(ATypeType node) + { + defaultIn(node); + } + + public void outATypeType(ATypeType node) + { + defaultOut(node); + } + + @Override + public void caseATypeType(ATypeType node) + { + inATypeType(node); + if(node.getBool() != null) + { + node.getBool().apply(this); + } + outATypeType(node); + } + + public void inAType(AType node) + { + defaultIn(node); + } + + public void outAType(AType node) + { + defaultOut(node); + } + + @Override + public void caseAType(AType node) + { + inAType(node); + if(node.getEntier() != null) + { + node.getEntier().apply(this); + } + outAType(node); + } + + public void inADeclafoncDecfonc(ADeclafoncDecfonc node) + { + defaultIn(node); + } + + public void outADeclafoncDecfonc(ADeclafoncDecfonc node) + { + defaultOut(node); + } + + @Override + public void caseADeclafoncDecfonc(ADeclafoncDecfonc node) + { + inADeclafoncDecfonc(node); + if(node.getBloc() != null) + { + node.getBloc().apply(this); + } + if(node.getSecondldec() != null) + { + node.getSecondldec().apply(this); + } + if(node.getDparenthese() != null) + { + node.getDparenthese().apply(this); + } + if(node.getFirstldec() != null) + { + node.getFirstldec().apply(this); + } + if(node.getGparenthese() != null) + { + node.getGparenthese().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getTypeopt() != null) + { + node.getTypeopt().apply(this); + } + outADeclafoncDecfonc(node); + } + + public void inATypeoptTypeopt(ATypeoptTypeopt node) + { + defaultIn(node); + } + + public void outATypeoptTypeopt(ATypeoptTypeopt node) + { + defaultOut(node); + } + + @Override + public void caseATypeoptTypeopt(ATypeoptTypeopt node) + { + inATypeoptTypeopt(node); + if(node.getType() != null) + { + node.getType().apply(this); + } + outATypeoptTypeopt(node); + } + + public void inATypeopt(ATypeopt node) + { + defaultIn(node); + } + + public void outATypeopt(ATypeopt node) + { + defaultOut(node); + } + + @Override + public void caseATypeopt(ATypeopt node) + { + inATypeopt(node); + if(node.getEpsilon() != null) + { + node.getEpsilon().apply(this); + } + outATypeopt(node); + } + + public void inALstdeclacvarLdec(ALstdeclacvarLdec node) + { + defaultIn(node); + } + + public void outALstdeclacvarLdec(ALstdeclacvarLdec node) + { + defaultOut(node); + } + + @Override + public void caseALstdeclacvarLdec(ALstdeclacvarLdec node) + { + inALstdeclacvarLdec(node); + if(node.getSuitedec() != null) + { + node.getSuitedec().apply(this); + } + if(node.getDecvar() != null) + { + node.getDecvar().apply(this); + } + outALstdeclacvarLdec(node); + } + + public void inALdec(ALdec node) + { + defaultIn(node); + } + + public void outALdec(ALdec node) + { + defaultOut(node); + } + + @Override + public void caseALdec(ALdec node) + { + inALdec(node); + if(node.getEpsilon() != null) + { + node.getEpsilon().apply(this); + } + outALdec(node); + } + + public void inASuitedeclvarSuitedec(ASuitedeclvarSuitedec node) + { + defaultIn(node); + } + + public void outASuitedeclvarSuitedec(ASuitedeclvarSuitedec node) + { + defaultOut(node); + } + + @Override + public void caseASuitedeclvarSuitedec(ASuitedeclvarSuitedec node) + { + inASuitedeclvarSuitedec(node); + if(node.getSuitedec() != null) + { + node.getSuitedec().apply(this); + } + if(node.getDecvar() != null) + { + node.getDecvar().apply(this); + } + if(node.getVirgule() != null) + { + node.getVirgule().apply(this); + } + outASuitedeclvarSuitedec(node); + } + + public void inASuitedec(ASuitedec node) + { + defaultIn(node); + } + + public void outASuitedec(ASuitedec node) + { + defaultOut(node); + } + + @Override + public void caseASuitedec(ASuitedec node) + { + inASuitedec(node); + if(node.getEpsilon() != null) + { + node.getEpsilon().apply(this); + } + outASuitedec(node); + } + + public void inALstdecfncLdf(ALstdecfncLdf node) + { + defaultIn(node); + } + + public void outALstdecfncLdf(ALstdecfncLdf node) + { + defaultOut(node); + } + + @Override + public void caseALstdecfncLdf(ALstdecfncLdf node) + { + inALstdecfncLdf(node); + if(node.getLdf() != null) + { + node.getLdf().apply(this); + } + if(node.getDecfonc() != null) + { + node.getDecfonc().apply(this); + } + outALstdecfncLdf(node); + } + + public void inALdf(ALdf node) + { + defaultIn(node); + } + + public void outALdf(ALdf node) + { + defaultOut(node); + } + + @Override + public void caseALdf(ALdf node) + { + inALdf(node); + if(node.getEpsilon() != null) + { + node.getEpsilon().apply(this); + } + outALdf(node); + } +} diff --git a/src/lParser/lexer/IPushbackReader.java b/src/lParser/lexer/IPushbackReader.java new file mode 100644 index 0000000..e235b60 --- /dev/null +++ b/src/lParser/lexer/IPushbackReader.java @@ -0,0 +1,12 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.lexer; + +import java.io.*; + +@SuppressWarnings("serial") +public interface IPushbackReader +{ + public int read() throws IOException; + public void unread(int c) throws IOException; +} diff --git a/src/lParser/lexer/Lexer.java b/src/lParser/lexer/Lexer.java new file mode 100644 index 0000000..f399d7c --- /dev/null +++ b/src/lParser/lexer/Lexer.java @@ -0,0 +1,782 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.lexer; + +import java.io.*; +import lParser.node.*; + +@SuppressWarnings("nls") +public class Lexer +{ + protected Token token; + protected State state = State.INITIAL; + + private IPushbackReader in; + private int line; + private int pos; + private boolean cr; + private boolean eof; + private final StringBuffer text = new StringBuffer(); + + @SuppressWarnings("unused") + protected void filter() throws LexerException, IOException + { + // Do nothing + } + + public Lexer(@SuppressWarnings("hiding") final PushbackReader in) + { + this.in = new IPushbackReader() { + + private PushbackReader pushbackReader = in; + + @Override + public void unread(int c) throws IOException { + pushbackReader.unread(c); + } + + @Override + public int read() throws IOException { + return pushbackReader.read(); + } + }; + } + + public Lexer(@SuppressWarnings("hiding") IPushbackReader in) + { + this.in = in; + } + + public Token peek() throws LexerException, IOException + { + while(this.token == null) + { + this.token = getToken(); + filter(); + } + + return this.token; + } + + public Token next() throws LexerException, IOException + { + while(this.token == null) + { + this.token = getToken(); + filter(); + } + + Token result = this.token; + this.token = null; + return result; + } + + protected Token getToken() throws IOException, LexerException + { + int dfa_state = 0; + + int start_pos = this.pos; + int start_line = this.line; + + int accept_state = -1; + int accept_token = -1; + int accept_length = -1; + int accept_pos = -1; + int accept_line = -1; + + @SuppressWarnings("hiding") int[][][] gotoTable = Lexer.gotoTable[this.state.id()]; + @SuppressWarnings("hiding") int[] accept = Lexer.accept[this.state.id()]; + this.text.setLength(0); + + while(true) + { + int c = getChar(); + + if(c != -1) + { + switch(c) + { + case 10: + if(this.cr) + { + this.cr = false; + } + else + { + this.line++; + this.pos = 0; + } + break; + case 13: + this.line++; + this.pos = 0; + this.cr = true; + break; + default: + this.pos++; + this.cr = false; + break; + } + + this.text.append((char) c); + + do + { + int oldState = (dfa_state < -1) ? (-2 -dfa_state) : dfa_state; + + dfa_state = -1; + + int[][] tmp1 = gotoTable[oldState]; + int low = 0; + int high = tmp1.length - 1; + + while(low <= high) + { + // int middle = (low + high) / 2; + int middle = (low + high) >>> 1; + int[] tmp2 = tmp1[middle]; + + if(c < tmp2[0]) + { + high = middle - 1; + } + else if(c > tmp2[1]) + { + low = middle + 1; + } + else + { + dfa_state = tmp2[2]; + break; + } + } + }while(dfa_state < -1); + } + else + { + dfa_state = -1; + } + + if(dfa_state >= 0) + { + if(accept[dfa_state] != -1) + { + accept_state = dfa_state; + accept_token = accept[dfa_state]; + accept_length = this.text.length(); + accept_pos = this.pos; + accept_line = this.line; + } + } + else + { + if(accept_state != -1) + { + switch(accept_token) + { + case 0: + { + @SuppressWarnings("hiding") Token token = new0( + getText(accept_length), + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 1: + { + @SuppressWarnings("hiding") Token token = new1( + getText(accept_length), + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 2: + { + @SuppressWarnings("hiding") Token token = new2( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 3: + { + @SuppressWarnings("hiding") Token token = new3( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 4: + { + @SuppressWarnings("hiding") Token token = new4( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 5: + { + @SuppressWarnings("hiding") Token token = new5( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 6: + { + @SuppressWarnings("hiding") Token token = new6( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 7: + { + @SuppressWarnings("hiding") Token token = new7( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 8: + { + @SuppressWarnings("hiding") Token token = new8( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 9: + { + @SuppressWarnings("hiding") Token token = new9( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 10: + { + @SuppressWarnings("hiding") Token token = new10( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 11: + { + @SuppressWarnings("hiding") Token token = new11( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 12: + { + @SuppressWarnings("hiding") Token token = new12( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 13: + { + @SuppressWarnings("hiding") Token token = new13( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 14: + { + @SuppressWarnings("hiding") Token token = new14( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 15: + { + @SuppressWarnings("hiding") Token token = new15( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 16: + { + @SuppressWarnings("hiding") Token token = new16( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 17: + { + @SuppressWarnings("hiding") Token token = new17( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 18: + { + @SuppressWarnings("hiding") Token token = new18( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 19: + { + @SuppressWarnings("hiding") Token token = new19( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 20: + { + @SuppressWarnings("hiding") Token token = new20( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 21: + { + @SuppressWarnings("hiding") Token token = new21( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 22: + { + @SuppressWarnings("hiding") Token token = new22( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 23: + { + @SuppressWarnings("hiding") Token token = new23( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 24: + { + @SuppressWarnings("hiding") Token token = new24( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 25: + { + @SuppressWarnings("hiding") Token token = new25( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 26: + { + @SuppressWarnings("hiding") Token token = new26( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 27: + { + @SuppressWarnings("hiding") Token token = new27( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 28: + { + @SuppressWarnings("hiding") Token token = new28( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 29: + { + @SuppressWarnings("hiding") Token token = new29( + getText(accept_length), + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 30: + { + @SuppressWarnings("hiding") Token token = new30( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 31: + { + @SuppressWarnings("hiding") Token token = new31( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 32: + { + @SuppressWarnings("hiding") Token token = new32( + getText(accept_length), + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + } + } + else + { + if(this.text.length() > 0) + { + throw new LexerException( + new InvalidToken(this.text.substring(0, 1), start_line + 1, start_pos + 1), + "[" + (start_line + 1) + "," + (start_pos + 1) + "]" + + " Unknown token: " + this.text); + } + + @SuppressWarnings("hiding") EOF token = new EOF( + start_line + 1, + start_pos + 1); + return token; + } + } + } + } + + Token new0(@SuppressWarnings("hiding") String text, @SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TEspaces(text, line, pos); } + Token new1(@SuppressWarnings("hiding") String text, @SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TCommentaire(text, line, pos); } + Token new2(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TPlus(line, pos); } + Token new3(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TPointvirgule(line, pos); } + Token new4(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TMoins(line, pos); } + Token new5(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TOu(line, pos); } + Token new6(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TEt(line, pos); } + Token new7(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TVirgule(line, pos); } + Token new8(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TEgale(line, pos); } + Token new9(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TInf(line, pos); } + Token new10(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TFois(line, pos); } + Token new11(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TDiviser(line, pos); } + Token new12(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TNon(line, pos); } + Token new13(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TGparenthese(line, pos); } + Token new14(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TDparenthese(line, pos); } + Token new15(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TAccoladeg(line, pos); } + Token new16(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TAccoladed(line, pos); } + Token new17(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TCrochetg(line, pos); } + Token new18(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TCrochetd(line, pos); } + Token new19(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TBool(line, pos); } + Token new20(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TEntier(line, pos); } + Token new21(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSi(line, pos); } + Token new22(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TAlors(line, pos); } + Token new23(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TTantque(line, pos); } + Token new24(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TFaire(line, pos); } + Token new25(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSinon(line, pos); } + Token new26(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TRetourner(line, pos); } + Token new27(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TLire(line, pos); } + Token new28(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TEcrire(line, pos); } + Token new29(@SuppressWarnings("hiding") String text, @SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TNombre(text, line, pos); } + Token new30(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TVrai(line, pos); } + Token new31(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TFaux(line, pos); } + Token new32(@SuppressWarnings("hiding") String text, @SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TId(text, line, pos); } + + private int getChar() throws IOException + { + if(this.eof) + { + return -1; + } + + int result = this.in.read(); + + if(result == -1) + { + this.eof = true; + } + + return result; + } + + private void pushBack(int acceptLength) throws IOException + { + int length = this.text.length(); + for(int i = length - 1; i >= acceptLength; i--) + { + this.eof = false; + + this.in.unread(this.text.charAt(i)); + } + } + + protected void unread(@SuppressWarnings("hiding") Token token) throws IOException + { + @SuppressWarnings("hiding") String text = token.getText(); + int length = text.length(); + + for(int i = length - 1; i >= 0; i--) + { + this.eof = false; + + this.in.unread(text.charAt(i)); + } + + this.pos = token.getPos() - 1; + this.line = token.getLine() - 1; + } + + private String getText(int acceptLength) + { + StringBuffer s = new StringBuffer(acceptLength); + for(int i = 0; i < acceptLength; i++) + { + s.append(this.text.charAt(i)); + } + + return s.toString(); + } + + private static int[][][][] gotoTable; +/* { + { // INITIAL + {{10, 10, 1}, {13, 13, 2}, {32, 32, 3}, {33, 33, 4}, {35, 35, 5}, {36, 36, 6}, {38, 38, 7}, {40, 40, 8}, {41, 41, 9}, {42, 42, 10}, {43, 43, 11}, {44, 44, 12}, {45, 45, 13}, {47, 47, 14}, {48, 57, 15}, {59, 59, 16}, {60, 60, 17}, {61, 61, 18}, {65, 90, 6}, {91, 91, 19}, {93, 93, 20}, {95, 95, 6}, {97, 97, 21}, {98, 98, 22}, {99, 100, 6}, {101, 101, 23}, {102, 102, 24}, {103, 107, 6}, {108, 108, 25}, {109, 113, 6}, {114, 114, 26}, {115, 115, 27}, {116, 116, 28}, {117, 117, 6}, {118, 118, 29}, {119, 122, 6}, {123, 123, 30}, {124, 124, 31}, {125, 125, 32}, }, + {{10, 32, -2}, }, + {{10, 32, -2}, }, + {{10, 32, -2}, }, + {}, + {{0, 9, 33}, {10, 10, 34}, {11, 12, 33}, {13, 13, 35}, {14, 65535, 33}, }, + {{36, 36, 36}, {48, 57, 36}, {65, 90, 36}, {95, 95, 36}, {97, 122, 36}, }, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {{48, 57, 15}, }, + {}, + {}, + {}, + {}, + {}, + {{36, 95, -8}, {97, 107, 36}, {108, 108, 37}, {109, 122, 36}, }, + {{36, 95, -8}, {97, 110, 36}, {111, 111, 38}, {112, 122, 36}, }, + {{36, 95, -8}, {97, 98, 36}, {99, 99, 39}, {100, 109, 36}, {110, 110, 40}, {111, 122, 36}, }, + {{36, 95, -8}, {97, 97, 41}, {98, 122, 36}, }, + {{36, 95, -8}, {97, 104, 36}, {105, 105, 42}, {106, 122, 36}, }, + {{36, 95, -8}, {97, 100, 36}, {101, 101, 43}, {102, 122, 36}, }, + {{36, 104, -27}, {105, 105, 44}, {106, 122, 36}, }, + {{36, 95, -8}, {97, 97, 45}, {98, 122, 36}, }, + {{36, 95, -8}, {97, 113, 36}, {114, 114, 46}, {115, 122, 36}, }, + {}, + {}, + {}, + {{0, 65535, -7}, }, + {{13, 13, 47}, }, + {}, + {{36, 122, -8}, }, + {{36, 110, -24}, {111, 111, 48}, {112, 122, 36}, }, + {{36, 110, -24}, {111, 111, 49}, {112, 122, 36}, }, + {{36, 113, -31}, {114, 114, 50}, {115, 122, 36}, }, + {{36, 95, -8}, {97, 115, 36}, {116, 116, 51}, {117, 122, 36}, }, + {{36, 104, -27}, {105, 105, 52}, {106, 116, 36}, {117, 117, 53}, {118, 122, 36}, }, + {{36, 113, -31}, {114, 114, 54}, {115, 122, 36}, }, + {{36, 115, -42}, {116, 116, 55}, {117, 122, 36}, }, + {{36, 95, -8}, {97, 109, 36}, {110, 110, 56}, {111, 122, 36}, }, + {{36, 109, -46}, {110, 110, 57}, {111, 122, 36}, }, + {{36, 95, -8}, {97, 97, 58}, {98, 122, 36}, }, + {}, + {{36, 113, -31}, {114, 114, 59}, {115, 122, 36}, }, + {{36, 107, -23}, {108, 108, 60}, {109, 122, 36}, }, + {{36, 104, -27}, {105, 105, 61}, {106, 122, 36}, }, + {{36, 104, -27}, {105, 105, 62}, {106, 122, 36}, }, + {{36, 113, -31}, {114, 114, 63}, {115, 122, 36}, }, + {{36, 95, -8}, {97, 119, 36}, {120, 120, 64}, {121, 122, 36}, }, + {{36, 100, -28}, {101, 101, 65}, {102, 122, 36}, }, + {{36, 110, -24}, {111, 111, 66}, {112, 122, 36}, }, + {{36, 110, -24}, {111, 111, 67}, {112, 122, 36}, }, + {{36, 115, -42}, {116, 116, 68}, {117, 122, 36}, }, + {{36, 104, -27}, {105, 105, 69}, {106, 122, 36}, }, + {{36, 95, -8}, {97, 114, 36}, {115, 115, 70}, {116, 122, 36}, }, + {{36, 122, -8}, }, + {{36, 113, -31}, {114, 114, 71}, {115, 122, 36}, }, + {{36, 100, -28}, {101, 101, 72}, {102, 122, 36}, }, + {{36, 100, -28}, {101, 101, 73}, {102, 122, 36}, }, + {{36, 122, -8}, }, + {{36, 122, -8}, }, + {{36, 95, -8}, {97, 116, 36}, {117, 117, 74}, {118, 122, 36}, }, + {{36, 109, -46}, {110, 110, 75}, {111, 122, 36}, }, + {{36, 95, -8}, {97, 112, 36}, {113, 113, 76}, {114, 122, 36}, }, + {{36, 122, -8}, }, + {{36, 122, -8}, }, + {{36, 100, -28}, {101, 101, 77}, {102, 122, 36}, }, + {{36, 113, -31}, {114, 114, 78}, {115, 122, 36}, }, + {{36, 122, -8}, }, + {{36, 113, -31}, {114, 114, 79}, {115, 122, 36}, }, + {{36, 122, -8}, }, + {{36, 116, -68}, {117, 117, 80}, {118, 122, 36}, }, + {{36, 122, -8}, }, + {{36, 122, -8}, }, + {{36, 122, -8}, }, + {{36, 100, -28}, {101, 101, 81}, {102, 122, 36}, }, + {{36, 122, -8}, }, + } + };*/ + + private static int[][] accept; +/* { + // INITIAL + {-1, 0, 0, 0, 12, -1, 32, 6, 13, 14, 10, 2, 7, 4, 11, 29, 3, 9, 8, 17, 18, 32, 32, 32, 32, 32, 32, 32, 32, 32, 15, 5, 16, -1, 1, 1, 32, 32, 32, 32, 32, 32, 32, 32, 21, 32, 32, 1, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 19, 32, 32, 32, 31, 27, 32, 32, 32, 30, 22, 32, 32, 24, 32, 25, 32, 28, 20, 26, 32, 23, }, + + };*/ + + public static class State + { + public final static State INITIAL = new State(0); + + private int id; + + private State(@SuppressWarnings("hiding") int id) + { + this.id = id; + } + + public int id() + { + return this.id; + } + } + + static + { + try + { + DataInputStream s = new DataInputStream( + new BufferedInputStream( + Lexer.class.getResourceAsStream("lexer.dat"))); + + // read gotoTable + int length = s.readInt(); + gotoTable = new int[length][][][]; + for(int i = 0; i < gotoTable.length; i++) + { + length = s.readInt(); + gotoTable[i] = new int[length][][]; + for(int j = 0; j < gotoTable[i].length; j++) + { + length = s.readInt(); + gotoTable[i][j] = new int[length][3]; + for(int k = 0; k < gotoTable[i][j].length; k++) + { + for(int l = 0; l < 3; l++) + { + gotoTable[i][j][k][l] = s.readInt(); + } + } + } + } + + // read accept + length = s.readInt(); + accept = new int[length][]; + for(int i = 0; i < accept.length; i++) + { + length = s.readInt(); + accept[i] = new int[length]; + for(int j = 0; j < accept[i].length; j++) + { + accept[i][j] = s.readInt(); + } + } + + s.close(); + } + catch(Exception e) + { + throw new RuntimeException("The file \"lexer.dat\" is either missing or corrupted."); + } + } +} diff --git a/src/lParser/lexer/LexerException.java b/src/lParser/lexer/LexerException.java new file mode 100644 index 0000000..3ce293b --- /dev/null +++ b/src/lParser/lexer/LexerException.java @@ -0,0 +1,22 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.lexer; + +import lParser.node.*; + +@SuppressWarnings("serial") +public class LexerException extends Exception +{ + private InvalidToken invalidToken; + + public LexerException(@SuppressWarnings("hiding") InvalidToken invalidToken, String message) + { + super(message); + this.invalidToken = invalidToken; + } + + public InvalidToken getToken() + { + return this.invalidToken; + } +} diff --git a/src/lParser/lexer/lexer.dat b/src/lParser/lexer/lexer.dat new file mode 100644 index 0000000000000000000000000000000000000000..3f7ff84477e368b889a806eb3edea9e588dbd39d GIT binary patch literal 3180 zcmZQzU|?imU<hJhU{GgZVBmsckQgrm0|N*%F)%PFKru4|1A`(IvoJ6)C_^zT0|SE! z6tgifFsMN>I|BoQ1{8BJFfeFBF((59gBBEn?9^spU;trm1_lNlDCS{cV9<qPkUR7l z7#Kj9kAZ=~fPsO*l7WGNpMinF8j1xN7#M7zSdf8%!4`^z7#J8F85kI%7#J8pZi{AM zU;trZ1_p*$C>CL0V2FoekeWmW1_lroWnf@Pf?_cS28Lt?28I-<IjIZ`3?MAdz`&3O z#S#n*4CxFE4B1dMISdR8AS}tiz>v$pz)%PkFJfR|0AVQx28LoNmS$jJD1l-b1_p*w zC<eKwjDdjxgk>2R7|IzK7^<M=R5LIzfUq0`149iI%QG-A)Iu>R-av5)3S));|NsAk z#y37b0|NsCC_X_nD4sy^4N?!nN(>APpg01>4M-dmFCYv`2Yd_+|NleN21q|FJ%DIf ze1X`oxB#(XVGd%0!W-l-5F2DSJ`C~`%uG-kz@`?IK0#*1|NsC02Q)rG@d6S9#R&+j zLgNKyFE%}S&~%;8z`y{)ptM~8jRTNbp!fmN$o7EJ3`h)=UO*U>w?OFzlm<ZJATvQ2 zls7<T!t4j-FOWR4S)gzM<r|QhFm>46nE`cYCIbTl2!rxh7Lq%$=>fS3WFIIUgD@x$ zg3>a~9+-PF{{R2~6lyNWY)~FWHXEi6-QA%4OUT`zJOOe8C_jL(9yC9|+<+Xnpm=8h zrL+J4|Nn%hWl;J9VNlrsQVUW8GOr36?=ZLJ{r~^}1vCypVGc?^$nl6vogo7Q12%Pq z|NsAg2+hYJcN?L(8(VmT@;b<EuzYR|&Eqh?!txDzc$+XVFo41vqz|MYRyLSI%LSNz zm><yHW`^cAn7ZQs|NmcumN_7^&C%S0%@62l*a8}+=x)gU|Ns9b1_lODItO7;c?}A8 zbam)y#tK^A!qkD{6y{!Ze}T$=P?*Bh!qjE||Ns9bwCn}tb5OkiayPm<^l%2%8K7_` zq|Oc+AL#1P-Di&$?%2W;RGx$4w1R<w0fZeG7#J#%@-56yDgXcfe*&#@KzS8Zj$+HJ z=;_=ENBTuq=Zr%gdKz&-OCvD%p@*d_S{PyTJ1F0P{0@pk5O#y6MOe7v%FF2C?2Z=B zFgKxxnFq9<hMA8`ohO<)ba$ZhvH1;@pFn<t<y9{nc@;gMc%$VfY-WSXBaqpkvJ-@T zpyd$EU+C^b=i~CXFPgt$>d?d64=ucLnUAi|pGbWr|NsBr15Ib3@C!f-J9PU9@nQZz zPY;1;{>5fa(EtD7b`7W;f?*!07^r;(s{cXt52#%VY9oQ#%b<2IDBeJAB~Y6UWIw1a z1!@C>+NPj3DM&9N3~Jke>I4C(eIWONFd==Qb}LK`G3sGzVKk_13}b_6P@59eJ_WI1 g7}VwjwTWSTP}>*82DNoTG^h;=YFC5WxFEhb0PUipk^lez literal 0 HcmV?d00001 diff --git a/src/lParser/main.java b/src/lParser/main.java deleted file mode 100644 index 5a59f6f..0000000 --- a/src/lParser/main.java +++ /dev/null @@ -1,27 +0,0 @@ -package lParser; - -import lParser.lexer.Lexer; -import lParser.node.Start; -import lParser.parser.Parser; -import sc.Sc2Xml; - -import java.io.*; - -public class main { - public static void main(String[] args) throws FileNotFoundException { - - File fileToTest = new File("/Users/macbook/IdeaProjects/2024-compilation-bazizi/test/input/fibo.l") ; - FileInputStream inputStream = new FileInputStream(fileToTest) ; - Sc2Xml sc = new Sc2Xml("/Users/macbook/IdeaProjects/2024-compilation-bazizi/src/l.cfg"); - - - - try{ -// Création des analyseurs lexicaux et syntaxique - Parser p =new Parser(new Lexer(new PushbackReader(new InputStreamReader(inputStream), 1024))); - Start tree = p.parse(); - } - catch(Exception e){ System.out.println(e.getMessage()); - } - } -} diff --git a/src/lParser/node/AAddEquals.java b/src/lParser/node/AAddEquals.java new file mode 100644 index 0000000..38c055e --- /dev/null +++ b/src/lParser/node/AAddEquals.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAddEquals extends PEquals +{ + private PAdd _add_; + + public AAddEquals() + { + // Constructor + } + + public AAddEquals( + @SuppressWarnings("hiding") PAdd _add_) + { + // Constructor + setAdd(_add_); + + } + + @Override + public Object clone() + { + return new AAddEquals( + cloneNode(this._add_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAddEquals(this); + } + + public PAdd getAdd() + { + return this._add_; + } + + public void setAdd(PAdd node) + { + if(this._add_ != null) + { + this._add_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._add_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._add_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._add_ == child) + { + this._add_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._add_ == oldChild) + { + setAdd((PAdd) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AAffectationIns.java b/src/lParser/node/AAffectationIns.java new file mode 100644 index 0000000..aae6aef --- /dev/null +++ b/src/lParser/node/AAffectationIns.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAffectationIns extends PIns +{ + private PVar _var_; + private TEgale _egale_; + private PExp _exp_; + private TPointvirgule _pointvirgule_; + + public AAffectationIns() + { + // Constructor + } + + public AAffectationIns( + @SuppressWarnings("hiding") PVar _var_, + @SuppressWarnings("hiding") TEgale _egale_, + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") TPointvirgule _pointvirgule_) + { + // Constructor + setVar(_var_); + + setEgale(_egale_); + + setExp(_exp_); + + setPointvirgule(_pointvirgule_); + + } + + @Override + public Object clone() + { + return new AAffectationIns( + cloneNode(this._var_), + cloneNode(this._egale_), + cloneNode(this._exp_), + cloneNode(this._pointvirgule_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAffectationIns(this); + } + + public PVar getVar() + { + return this._var_; + } + + public void setVar(PVar node) + { + if(this._var_ != null) + { + this._var_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._var_ = node; + } + + public TEgale getEgale() + { + return this._egale_; + } + + public void setEgale(TEgale node) + { + if(this._egale_ != null) + { + this._egale_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._egale_ = node; + } + + public PExp getExp() + { + return this._exp_; + } + + public void setExp(PExp node) + { + if(this._exp_ != null) + { + this._exp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._exp_ = node; + } + + public TPointvirgule getPointvirgule() + { + return this._pointvirgule_; + } + + public void setPointvirgule(TPointvirgule node) + { + if(this._pointvirgule_ != null) + { + this._pointvirgule_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pointvirgule_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._var_) + + toString(this._egale_) + + toString(this._exp_) + + toString(this._pointvirgule_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._var_ == child) + { + this._var_ = null; + return; + } + + if(this._egale_ == child) + { + this._egale_ = null; + return; + } + + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._pointvirgule_ == child) + { + this._pointvirgule_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._var_ == oldChild) + { + setVar((PVar) newChild); + return; + } + + if(this._egale_ == oldChild) + { + setEgale((TEgale) newChild); + return; + } + + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._pointvirgule_ == oldChild) + { + setPointvirgule((TPointvirgule) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AAndExp.java b/src/lParser/node/AAndExp.java new file mode 100644 index 0000000..4f72317 --- /dev/null +++ b/src/lParser/node/AAndExp.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAndExp extends PExp +{ + private PAnd _and_; + + public AAndExp() + { + // Constructor + } + + public AAndExp( + @SuppressWarnings("hiding") PAnd _and_) + { + // Constructor + setAnd(_and_); + + } + + @Override + public Object clone() + { + return new AAndExp( + cloneNode(this._and_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAndExp(this); + } + + public PAnd getAnd() + { + return this._and_; + } + + public void setAnd(PAnd node) + { + if(this._and_ != null) + { + this._and_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._and_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._and_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._and_ == child) + { + this._and_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._and_ == oldChild) + { + setAnd((PAnd) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AAppelfncAppelfnc.java b/src/lParser/node/AAppelfncAppelfnc.java new file mode 100644 index 0000000..cc91e8f --- /dev/null +++ b/src/lParser/node/AAppelfncAppelfnc.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAppelfncAppelfnc extends PAppelfnc +{ + private TId _id_; + private TGparenthese _gparenthese_; + private PLe _le_; + private TDparenthese _dparenthese_; + private TPointvirgule _pointvirgule_; + + public AAppelfncAppelfnc() + { + // Constructor + } + + public AAppelfncAppelfnc( + @SuppressWarnings("hiding") TId _id_, + @SuppressWarnings("hiding") TGparenthese _gparenthese_, + @SuppressWarnings("hiding") PLe _le_, + @SuppressWarnings("hiding") TDparenthese _dparenthese_, + @SuppressWarnings("hiding") TPointvirgule _pointvirgule_) + { + // Constructor + setId(_id_); + + setGparenthese(_gparenthese_); + + setLe(_le_); + + setDparenthese(_dparenthese_); + + setPointvirgule(_pointvirgule_); + + } + + @Override + public Object clone() + { + return new AAppelfncAppelfnc( + cloneNode(this._id_), + cloneNode(this._gparenthese_), + cloneNode(this._le_), + cloneNode(this._dparenthese_), + cloneNode(this._pointvirgule_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAppelfncAppelfnc(this); + } + + public TId getId() + { + return this._id_; + } + + public void setId(TId node) + { + if(this._id_ != null) + { + this._id_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._id_ = node; + } + + public TGparenthese getGparenthese() + { + return this._gparenthese_; + } + + public void setGparenthese(TGparenthese node) + { + if(this._gparenthese_ != null) + { + this._gparenthese_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._gparenthese_ = node; + } + + public PLe getLe() + { + return this._le_; + } + + public void setLe(PLe node) + { + if(this._le_ != null) + { + this._le_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._le_ = node; + } + + public TDparenthese getDparenthese() + { + return this._dparenthese_; + } + + public void setDparenthese(TDparenthese node) + { + if(this._dparenthese_ != null) + { + this._dparenthese_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._dparenthese_ = node; + } + + public TPointvirgule getPointvirgule() + { + return this._pointvirgule_; + } + + public void setPointvirgule(TPointvirgule node) + { + if(this._pointvirgule_ != null) + { + this._pointvirgule_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pointvirgule_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._id_) + + toString(this._gparenthese_) + + toString(this._le_) + + toString(this._dparenthese_) + + toString(this._pointvirgule_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._id_ == child) + { + this._id_ = null; + return; + } + + if(this._gparenthese_ == child) + { + this._gparenthese_ = null; + return; + } + + if(this._le_ == child) + { + this._le_ = null; + return; + } + + if(this._dparenthese_ == child) + { + this._dparenthese_ = null; + return; + } + + if(this._pointvirgule_ == child) + { + this._pointvirgule_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._id_ == oldChild) + { + setId((TId) newChild); + return; + } + + if(this._gparenthese_ == oldChild) + { + setGparenthese((TGparenthese) newChild); + return; + } + + if(this._le_ == oldChild) + { + setLe((PLe) newChild); + return; + } + + if(this._dparenthese_ == oldChild) + { + setDparenthese((TDparenthese) newChild); + return; + } + + if(this._pointvirgule_ == oldChild) + { + setPointvirgule((TPointvirgule) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AAppelfncE6.java b/src/lParser/node/AAppelfncE6.java new file mode 100644 index 0000000..7ac8880 --- /dev/null +++ b/src/lParser/node/AAppelfncE6.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAppelfncE6 extends PE6 +{ + private TId _id_; + private TGparenthese _gparenthese_; + private PLe _le_; + private TDparenthese _dparenthese_; + + public AAppelfncE6() + { + // Constructor + } + + public AAppelfncE6( + @SuppressWarnings("hiding") TId _id_, + @SuppressWarnings("hiding") TGparenthese _gparenthese_, + @SuppressWarnings("hiding") PLe _le_, + @SuppressWarnings("hiding") TDparenthese _dparenthese_) + { + // Constructor + setId(_id_); + + setGparenthese(_gparenthese_); + + setLe(_le_); + + setDparenthese(_dparenthese_); + + } + + @Override + public Object clone() + { + return new AAppelfncE6( + cloneNode(this._id_), + cloneNode(this._gparenthese_), + cloneNode(this._le_), + cloneNode(this._dparenthese_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAppelfncE6(this); + } + + public TId getId() + { + return this._id_; + } + + public void setId(TId node) + { + if(this._id_ != null) + { + this._id_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._id_ = node; + } + + public TGparenthese getGparenthese() + { + return this._gparenthese_; + } + + public void setGparenthese(TGparenthese node) + { + if(this._gparenthese_ != null) + { + this._gparenthese_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._gparenthese_ = node; + } + + public PLe getLe() + { + return this._le_; + } + + public void setLe(PLe node) + { + if(this._le_ != null) + { + this._le_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._le_ = node; + } + + public TDparenthese getDparenthese() + { + return this._dparenthese_; + } + + public void setDparenthese(TDparenthese node) + { + if(this._dparenthese_ != null) + { + this._dparenthese_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._dparenthese_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._id_) + + toString(this._gparenthese_) + + toString(this._le_) + + toString(this._dparenthese_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._id_ == child) + { + this._id_ = null; + return; + } + + if(this._gparenthese_ == child) + { + this._gparenthese_ = null; + return; + } + + if(this._le_ == child) + { + this._le_ = null; + return; + } + + if(this._dparenthese_ == child) + { + this._dparenthese_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._id_ == oldChild) + { + setId((TId) newChild); + return; + } + + if(this._gparenthese_ == oldChild) + { + setGparenthese((TGparenthese) newChild); + return; + } + + if(this._le_ == oldChild) + { + setLe((PLe) newChild); + return; + } + + if(this._dparenthese_ == oldChild) + { + setDparenthese((TDparenthese) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AAppelfncIns.java b/src/lParser/node/AAppelfncIns.java new file mode 100644 index 0000000..ebb0d52 --- /dev/null +++ b/src/lParser/node/AAppelfncIns.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAppelfncIns extends PIns +{ + private TId _id_; + private TGparenthese _gparenthese_; + private PLe _le_; + private TDparenthese _dparenthese_; + private TPointvirgule _pointvirgule_; + + public AAppelfncIns() + { + // Constructor + } + + public AAppelfncIns( + @SuppressWarnings("hiding") TId _id_, + @SuppressWarnings("hiding") TGparenthese _gparenthese_, + @SuppressWarnings("hiding") PLe _le_, + @SuppressWarnings("hiding") TDparenthese _dparenthese_, + @SuppressWarnings("hiding") TPointvirgule _pointvirgule_) + { + // Constructor + setId(_id_); + + setGparenthese(_gparenthese_); + + setLe(_le_); + + setDparenthese(_dparenthese_); + + setPointvirgule(_pointvirgule_); + + } + + @Override + public Object clone() + { + return new AAppelfncIns( + cloneNode(this._id_), + cloneNode(this._gparenthese_), + cloneNode(this._le_), + cloneNode(this._dparenthese_), + cloneNode(this._pointvirgule_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAppelfncIns(this); + } + + public TId getId() + { + return this._id_; + } + + public void setId(TId node) + { + if(this._id_ != null) + { + this._id_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._id_ = node; + } + + public TGparenthese getGparenthese() + { + return this._gparenthese_; + } + + public void setGparenthese(TGparenthese node) + { + if(this._gparenthese_ != null) + { + this._gparenthese_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._gparenthese_ = node; + } + + public PLe getLe() + { + return this._le_; + } + + public void setLe(PLe node) + { + if(this._le_ != null) + { + this._le_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._le_ = node; + } + + public TDparenthese getDparenthese() + { + return this._dparenthese_; + } + + public void setDparenthese(TDparenthese node) + { + if(this._dparenthese_ != null) + { + this._dparenthese_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._dparenthese_ = node; + } + + public TPointvirgule getPointvirgule() + { + return this._pointvirgule_; + } + + public void setPointvirgule(TPointvirgule node) + { + if(this._pointvirgule_ != null) + { + this._pointvirgule_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pointvirgule_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._id_) + + toString(this._gparenthese_) + + toString(this._le_) + + toString(this._dparenthese_) + + toString(this._pointvirgule_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._id_ == child) + { + this._id_ = null; + return; + } + + if(this._gparenthese_ == child) + { + this._gparenthese_ = null; + return; + } + + if(this._le_ == child) + { + this._le_ = null; + return; + } + + if(this._dparenthese_ == child) + { + this._dparenthese_ = null; + return; + } + + if(this._pointvirgule_ == child) + { + this._pointvirgule_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._id_ == oldChild) + { + setId((TId) newChild); + return; + } + + if(this._gparenthese_ == oldChild) + { + setGparenthese((TGparenthese) newChild); + return; + } + + if(this._le_ == oldChild) + { + setLe((PLe) newChild); + return; + } + + if(this._dparenthese_ == oldChild) + { + setDparenthese((TDparenthese) newChild); + return; + } + + if(this._pointvirgule_ == oldChild) + { + setPointvirgule((TPointvirgule) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ADeclafoncDecfonc.java b/src/lParser/node/ADeclafoncDecfonc.java new file mode 100644 index 0000000..50f4db4 --- /dev/null +++ b/src/lParser/node/ADeclafoncDecfonc.java @@ -0,0 +1,353 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ADeclafoncDecfonc extends PDecfonc +{ + private PTypeopt _typeopt_; + private TId _id_; + private TGparenthese _gparenthese_; + private PLdec _firstldec_; + private TDparenthese _dparenthese_; + private PLdec _secondldec_; + private PBloc _bloc_; + + public ADeclafoncDecfonc() + { + // Constructor + } + + public ADeclafoncDecfonc( + @SuppressWarnings("hiding") PTypeopt _typeopt_, + @SuppressWarnings("hiding") TId _id_, + @SuppressWarnings("hiding") TGparenthese _gparenthese_, + @SuppressWarnings("hiding") PLdec _firstldec_, + @SuppressWarnings("hiding") TDparenthese _dparenthese_, + @SuppressWarnings("hiding") PLdec _secondldec_, + @SuppressWarnings("hiding") PBloc _bloc_) + { + // Constructor + setTypeopt(_typeopt_); + + setId(_id_); + + setGparenthese(_gparenthese_); + + setFirstldec(_firstldec_); + + setDparenthese(_dparenthese_); + + setSecondldec(_secondldec_); + + setBloc(_bloc_); + + } + + @Override + public Object clone() + { + return new ADeclafoncDecfonc( + cloneNode(this._typeopt_), + cloneNode(this._id_), + cloneNode(this._gparenthese_), + cloneNode(this._firstldec_), + cloneNode(this._dparenthese_), + cloneNode(this._secondldec_), + cloneNode(this._bloc_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseADeclafoncDecfonc(this); + } + + public PTypeopt getTypeopt() + { + return this._typeopt_; + } + + public void setTypeopt(PTypeopt node) + { + if(this._typeopt_ != null) + { + this._typeopt_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._typeopt_ = node; + } + + public TId getId() + { + return this._id_; + } + + public void setId(TId node) + { + if(this._id_ != null) + { + this._id_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._id_ = node; + } + + public TGparenthese getGparenthese() + { + return this._gparenthese_; + } + + public void setGparenthese(TGparenthese node) + { + if(this._gparenthese_ != null) + { + this._gparenthese_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._gparenthese_ = node; + } + + public PLdec getFirstldec() + { + return this._firstldec_; + } + + public void setFirstldec(PLdec node) + { + if(this._firstldec_ != null) + { + this._firstldec_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._firstldec_ = node; + } + + public TDparenthese getDparenthese() + { + return this._dparenthese_; + } + + public void setDparenthese(TDparenthese node) + { + if(this._dparenthese_ != null) + { + this._dparenthese_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._dparenthese_ = node; + } + + public PLdec getSecondldec() + { + return this._secondldec_; + } + + public void setSecondldec(PLdec node) + { + if(this._secondldec_ != null) + { + this._secondldec_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._secondldec_ = node; + } + + public PBloc getBloc() + { + return this._bloc_; + } + + public void setBloc(PBloc node) + { + if(this._bloc_ != null) + { + this._bloc_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._bloc_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._typeopt_) + + toString(this._id_) + + toString(this._gparenthese_) + + toString(this._firstldec_) + + toString(this._dparenthese_) + + toString(this._secondldec_) + + toString(this._bloc_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._typeopt_ == child) + { + this._typeopt_ = null; + return; + } + + if(this._id_ == child) + { + this._id_ = null; + return; + } + + if(this._gparenthese_ == child) + { + this._gparenthese_ = null; + return; + } + + if(this._firstldec_ == child) + { + this._firstldec_ = null; + return; + } + + if(this._dparenthese_ == child) + { + this._dparenthese_ = null; + return; + } + + if(this._secondldec_ == child) + { + this._secondldec_ = null; + return; + } + + if(this._bloc_ == child) + { + this._bloc_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._typeopt_ == oldChild) + { + setTypeopt((PTypeopt) newChild); + return; + } + + if(this._id_ == oldChild) + { + setId((TId) newChild); + return; + } + + if(this._gparenthese_ == oldChild) + { + setGparenthese((TGparenthese) newChild); + return; + } + + if(this._firstldec_ == oldChild) + { + setFirstldec((PLdec) newChild); + return; + } + + if(this._dparenthese_ == oldChild) + { + setDparenthese((TDparenthese) newChild); + return; + } + + if(this._secondldec_ == oldChild) + { + setSecondldec((PLdec) newChild); + return; + } + + if(this._bloc_ == oldChild) + { + setBloc((PBloc) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ADeclavariableDecvar.java b/src/lParser/node/ADeclavariableDecvar.java new file mode 100644 index 0000000..649c832 --- /dev/null +++ b/src/lParser/node/ADeclavariableDecvar.java @@ -0,0 +1,138 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ADeclavariableDecvar extends PDecvar +{ + private PType _type_; + private TId _id_; + + public ADeclavariableDecvar() + { + // Constructor + } + + public ADeclavariableDecvar( + @SuppressWarnings("hiding") PType _type_, + @SuppressWarnings("hiding") TId _id_) + { + // Constructor + setType(_type_); + + setId(_id_); + + } + + @Override + public Object clone() + { + return new ADeclavariableDecvar( + cloneNode(this._type_), + cloneNode(this._id_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseADeclavariableDecvar(this); + } + + public PType getType() + { + return this._type_; + } + + public void setType(PType node) + { + if(this._type_ != null) + { + this._type_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._type_ = node; + } + + public TId getId() + { + return this._id_; + } + + public void setId(TId node) + { + if(this._id_ != null) + { + this._id_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._id_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._type_) + + toString(this._id_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._type_ == child) + { + this._type_ = null; + return; + } + + if(this._id_ == child) + { + this._id_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._type_ == oldChild) + { + setType((PType) newChild); + return; + } + + if(this._id_ == oldChild) + { + setId((TId) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ADecvar.java b/src/lParser/node/ADecvar.java new file mode 100644 index 0000000..42547e6 --- /dev/null +++ b/src/lParser/node/ADecvar.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ADecvar extends PDecvar +{ + private PType _type_; + private TId _id_; + private TCrochetg _crochetg_; + private TNombre _nombre_; + private TCrochetd _crochetd_; + + public ADecvar() + { + // Constructor + } + + public ADecvar( + @SuppressWarnings("hiding") PType _type_, + @SuppressWarnings("hiding") TId _id_, + @SuppressWarnings("hiding") TCrochetg _crochetg_, + @SuppressWarnings("hiding") TNombre _nombre_, + @SuppressWarnings("hiding") TCrochetd _crochetd_) + { + // Constructor + setType(_type_); + + setId(_id_); + + setCrochetg(_crochetg_); + + setNombre(_nombre_); + + setCrochetd(_crochetd_); + + } + + @Override + public Object clone() + { + return new ADecvar( + cloneNode(this._type_), + cloneNode(this._id_), + cloneNode(this._crochetg_), + cloneNode(this._nombre_), + cloneNode(this._crochetd_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseADecvar(this); + } + + public PType getType() + { + return this._type_; + } + + public void setType(PType node) + { + if(this._type_ != null) + { + this._type_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._type_ = node; + } + + public TId getId() + { + return this._id_; + } + + public void setId(TId node) + { + if(this._id_ != null) + { + this._id_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._id_ = node; + } + + public TCrochetg getCrochetg() + { + return this._crochetg_; + } + + public void setCrochetg(TCrochetg node) + { + if(this._crochetg_ != null) + { + this._crochetg_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._crochetg_ = node; + } + + public TNombre getNombre() + { + return this._nombre_; + } + + public void setNombre(TNombre node) + { + if(this._nombre_ != null) + { + this._nombre_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._nombre_ = node; + } + + public TCrochetd getCrochetd() + { + return this._crochetd_; + } + + public void setCrochetd(TCrochetd node) + { + if(this._crochetd_ != null) + { + this._crochetd_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._crochetd_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._type_) + + toString(this._id_) + + toString(this._crochetg_) + + toString(this._nombre_) + + toString(this._crochetd_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._type_ == child) + { + this._type_ = null; + return; + } + + if(this._id_ == child) + { + this._id_ = null; + return; + } + + if(this._crochetg_ == child) + { + this._crochetg_ = null; + return; + } + + if(this._nombre_ == child) + { + this._nombre_ = null; + return; + } + + if(this._crochetd_ == child) + { + this._crochetd_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._type_ == oldChild) + { + setType((PType) newChild); + return; + } + + if(this._id_ == oldChild) + { + setId((TId) newChild); + return; + } + + if(this._crochetg_ == oldChild) + { + setCrochetg((TCrochetg) newChild); + return; + } + + if(this._nombre_ == oldChild) + { + setNombre((TNombre) newChild); + return; + } + + if(this._crochetd_ == oldChild) + { + setCrochetd((TCrochetd) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ADiviserMult.java b/src/lParser/node/ADiviserMult.java new file mode 100644 index 0000000..105c709 --- /dev/null +++ b/src/lParser/node/ADiviserMult.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ADiviserMult extends PMult +{ + private PMult _mult_; + private TDiviser _diviser_; + private PNeg _neg_; + + public ADiviserMult() + { + // Constructor + } + + public ADiviserMult( + @SuppressWarnings("hiding") PMult _mult_, + @SuppressWarnings("hiding") TDiviser _diviser_, + @SuppressWarnings("hiding") PNeg _neg_) + { + // Constructor + setMult(_mult_); + + setDiviser(_diviser_); + + setNeg(_neg_); + + } + + @Override + public Object clone() + { + return new ADiviserMult( + cloneNode(this._mult_), + cloneNode(this._diviser_), + cloneNode(this._neg_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseADiviserMult(this); + } + + public PMult getMult() + { + return this._mult_; + } + + public void setMult(PMult node) + { + if(this._mult_ != null) + { + this._mult_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._mult_ = node; + } + + public TDiviser getDiviser() + { + return this._diviser_; + } + + public void setDiviser(TDiviser node) + { + if(this._diviser_ != null) + { + this._diviser_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._diviser_ = node; + } + + public PNeg getNeg() + { + return this._neg_; + } + + public void setNeg(PNeg node) + { + if(this._neg_ != null) + { + this._neg_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._neg_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._mult_) + + toString(this._diviser_) + + toString(this._neg_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._mult_ == child) + { + this._mult_ = null; + return; + } + + if(this._diviser_ == child) + { + this._diviser_ = null; + return; + } + + if(this._neg_ == child) + { + this._neg_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._mult_ == oldChild) + { + setMult((PMult) newChild); + return; + } + + if(this._diviser_ == oldChild) + { + setDiviser((TDiviser) newChild); + return; + } + + if(this._neg_ == oldChild) + { + setNeg((PNeg) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AE6Neg.java b/src/lParser/node/AE6Neg.java new file mode 100644 index 0000000..d500ef2 --- /dev/null +++ b/src/lParser/node/AE6Neg.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AE6Neg extends PNeg +{ + private PE6 _e6_; + + public AE6Neg() + { + // Constructor + } + + public AE6Neg( + @SuppressWarnings("hiding") PE6 _e6_) + { + // Constructor + setE6(_e6_); + + } + + @Override + public Object clone() + { + return new AE6Neg( + cloneNode(this._e6_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAE6Neg(this); + } + + public PE6 getE6() + { + return this._e6_; + } + + public void setE6(PE6 node) + { + if(this._e6_ != null) + { + this._e6_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._e6_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._e6_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._e6_ == child) + { + this._e6_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._e6_ == oldChild) + { + setE6((PE6) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AEgaleEquals.java b/src/lParser/node/AEgaleEquals.java new file mode 100644 index 0000000..53ffe55 --- /dev/null +++ b/src/lParser/node/AEgaleEquals.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEgaleEquals extends PEquals +{ + private PEquals _equals_; + private TEgale _egale_; + private PAdd _add_; + + public AEgaleEquals() + { + // Constructor + } + + public AEgaleEquals( + @SuppressWarnings("hiding") PEquals _equals_, + @SuppressWarnings("hiding") TEgale _egale_, + @SuppressWarnings("hiding") PAdd _add_) + { + // Constructor + setEquals(_equals_); + + setEgale(_egale_); + + setAdd(_add_); + + } + + @Override + public Object clone() + { + return new AEgaleEquals( + cloneNode(this._equals_), + cloneNode(this._egale_), + cloneNode(this._add_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEgaleEquals(this); + } + + public PEquals getEquals() + { + return this._equals_; + } + + public void setEquals(PEquals node) + { + if(this._equals_ != null) + { + this._equals_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._equals_ = node; + } + + public TEgale getEgale() + { + return this._egale_; + } + + public void setEgale(TEgale node) + { + if(this._egale_ != null) + { + this._egale_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._egale_ = node; + } + + public PAdd getAdd() + { + return this._add_; + } + + public void setAdd(PAdd node) + { + if(this._add_ != null) + { + this._add_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._add_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._equals_) + + toString(this._egale_) + + toString(this._add_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._equals_ == child) + { + this._equals_ = null; + return; + } + + if(this._egale_ == child) + { + this._egale_ = null; + return; + } + + if(this._add_ == child) + { + this._add_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._equals_ == oldChild) + { + setEquals((PEquals) newChild); + return; + } + + if(this._egale_ == oldChild) + { + setEgale((TEgale) newChild); + return; + } + + if(this._add_ == oldChild) + { + setAdd((PAdd) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AEpsilon.java b/src/lParser/node/AEpsilon.java new file mode 100644 index 0000000..a70f750 --- /dev/null +++ b/src/lParser/node/AEpsilon.java @@ -0,0 +1,47 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEpsilon extends PEpsilon +{ + + public AEpsilon() + { + // Constructor + } + + @Override + public Object clone() + { + return new AEpsilon(); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEpsilon(this); + } + + @Override + public String toString() + { + return ""; + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AEpsilonLe.java b/src/lParser/node/AEpsilonLe.java new file mode 100644 index 0000000..7688500 --- /dev/null +++ b/src/lParser/node/AEpsilonLe.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEpsilonLe extends PLe +{ + private PEpsilon _epsilon_; + + public AEpsilonLe() + { + // Constructor + } + + public AEpsilonLe( + @SuppressWarnings("hiding") PEpsilon _epsilon_) + { + // Constructor + setEpsilon(_epsilon_); + + } + + @Override + public Object clone() + { + return new AEpsilonLe( + cloneNode(this._epsilon_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEpsilonLe(this); + } + + public PEpsilon getEpsilon() + { + return this._epsilon_; + } + + public void setEpsilon(PEpsilon node) + { + if(this._epsilon_ != null) + { + this._epsilon_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._epsilon_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._epsilon_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._epsilon_ == child) + { + this._epsilon_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._epsilon_ == oldChild) + { + setEpsilon((PEpsilon) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AEpsilonLi.java b/src/lParser/node/AEpsilonLi.java new file mode 100644 index 0000000..67ad87e --- /dev/null +++ b/src/lParser/node/AEpsilonLi.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEpsilonLi extends PLi +{ + private PEpsilon _epsilon_; + + public AEpsilonLi() + { + // Constructor + } + + public AEpsilonLi( + @SuppressWarnings("hiding") PEpsilon _epsilon_) + { + // Constructor + setEpsilon(_epsilon_); + + } + + @Override + public Object clone() + { + return new AEpsilonLi( + cloneNode(this._epsilon_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEpsilonLi(this); + } + + public PEpsilon getEpsilon() + { + return this._epsilon_; + } + + public void setEpsilon(PEpsilon node) + { + if(this._epsilon_ != null) + { + this._epsilon_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._epsilon_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._epsilon_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._epsilon_ == child) + { + this._epsilon_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._epsilon_ == oldChild) + { + setEpsilon((PEpsilon) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AEpsilonLse.java b/src/lParser/node/AEpsilonLse.java new file mode 100644 index 0000000..cd313b8 --- /dev/null +++ b/src/lParser/node/AEpsilonLse.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEpsilonLse extends PLse +{ + private PEpsilon _epsilon_; + + public AEpsilonLse() + { + // Constructor + } + + public AEpsilonLse( + @SuppressWarnings("hiding") PEpsilon _epsilon_) + { + // Constructor + setEpsilon(_epsilon_); + + } + + @Override + public Object clone() + { + return new AEpsilonLse( + cloneNode(this._epsilon_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEpsilonLse(this); + } + + public PEpsilon getEpsilon() + { + return this._epsilon_; + } + + public void setEpsilon(PEpsilon node) + { + if(this._epsilon_ != null) + { + this._epsilon_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._epsilon_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._epsilon_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._epsilon_ == child) + { + this._epsilon_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._epsilon_ == oldChild) + { + setEpsilon((PEpsilon) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AEqualsAnd.java b/src/lParser/node/AEqualsAnd.java new file mode 100644 index 0000000..42382a8 --- /dev/null +++ b/src/lParser/node/AEqualsAnd.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEqualsAnd extends PAnd +{ + private PEquals _equals_; + + public AEqualsAnd() + { + // Constructor + } + + public AEqualsAnd( + @SuppressWarnings("hiding") PEquals _equals_) + { + // Constructor + setEquals(_equals_); + + } + + @Override + public Object clone() + { + return new AEqualsAnd( + cloneNode(this._equals_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEqualsAnd(this); + } + + public PEquals getEquals() + { + return this._equals_; + } + + public void setEquals(PEquals node) + { + if(this._equals_ != null) + { + this._equals_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._equals_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._equals_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._equals_ == child) + { + this._equals_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._equals_ == oldChild) + { + setEquals((PEquals) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AEtAnd.java b/src/lParser/node/AEtAnd.java new file mode 100644 index 0000000..ecbc280 --- /dev/null +++ b/src/lParser/node/AEtAnd.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEtAnd extends PAnd +{ + private PAnd _and_; + private TEt _et_; + private PEquals _equals_; + + public AEtAnd() + { + // Constructor + } + + public AEtAnd( + @SuppressWarnings("hiding") PAnd _and_, + @SuppressWarnings("hiding") TEt _et_, + @SuppressWarnings("hiding") PEquals _equals_) + { + // Constructor + setAnd(_and_); + + setEt(_et_); + + setEquals(_equals_); + + } + + @Override + public Object clone() + { + return new AEtAnd( + cloneNode(this._and_), + cloneNode(this._et_), + cloneNode(this._equals_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEtAnd(this); + } + + public PAnd getAnd() + { + return this._and_; + } + + public void setAnd(PAnd node) + { + if(this._and_ != null) + { + this._and_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._and_ = node; + } + + public TEt getEt() + { + return this._et_; + } + + public void setEt(TEt node) + { + if(this._et_ != null) + { + this._et_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._et_ = node; + } + + public PEquals getEquals() + { + return this._equals_; + } + + public void setEquals(PEquals node) + { + if(this._equals_ != null) + { + this._equals_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._equals_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._and_) + + toString(this._et_) + + toString(this._equals_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._and_ == child) + { + this._and_ = null; + return; + } + + if(this._et_ == child) + { + this._et_ = null; + return; + } + + if(this._equals_ == child) + { + this._equals_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._and_ == oldChild) + { + setAnd((PAnd) newChild); + return; + } + + if(this._et_ == oldChild) + { + setEt((TEt) newChild); + return; + } + + if(this._equals_ == oldChild) + { + setEquals((PEquals) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AExprLe.java b/src/lParser/node/AExprLe.java new file mode 100644 index 0000000..ee696c7 --- /dev/null +++ b/src/lParser/node/AExprLe.java @@ -0,0 +1,138 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AExprLe extends PLe +{ + private PExp _exp_; + private PLse _lse_; + + public AExprLe() + { + // Constructor + } + + public AExprLe( + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") PLse _lse_) + { + // Constructor + setExp(_exp_); + + setLse(_lse_); + + } + + @Override + public Object clone() + { + return new AExprLe( + cloneNode(this._exp_), + cloneNode(this._lse_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAExprLe(this); + } + + public PExp getExp() + { + return this._exp_; + } + + public void setExp(PExp node) + { + if(this._exp_ != null) + { + this._exp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._exp_ = node; + } + + public PLse getLse() + { + return this._lse_; + } + + public void setLse(PLse node) + { + if(this._lse_ != null) + { + this._lse_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._lse_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._exp_) + + toString(this._lse_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._lse_ == child) + { + this._lse_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._lse_ == oldChild) + { + setLse((PLse) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AFauxE6.java b/src/lParser/node/AFauxE6.java new file mode 100644 index 0000000..35d6460 --- /dev/null +++ b/src/lParser/node/AFauxE6.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AFauxE6 extends PE6 +{ + private TFaux _faux_; + + public AFauxE6() + { + // Constructor + } + + public AFauxE6( + @SuppressWarnings("hiding") TFaux _faux_) + { + // Constructor + setFaux(_faux_); + + } + + @Override + public Object clone() + { + return new AFauxE6( + cloneNode(this._faux_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAFauxE6(this); + } + + public TFaux getFaux() + { + return this._faux_; + } + + public void setFaux(TFaux node) + { + if(this._faux_ != null) + { + this._faux_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._faux_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._faux_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._faux_ == child) + { + this._faux_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._faux_ == oldChild) + { + setFaux((TFaux) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AFoisMult.java b/src/lParser/node/AFoisMult.java new file mode 100644 index 0000000..5d4f09a --- /dev/null +++ b/src/lParser/node/AFoisMult.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AFoisMult extends PMult +{ + private PMult _mult_; + private TFois _fois_; + private PNeg _neg_; + + public AFoisMult() + { + // Constructor + } + + public AFoisMult( + @SuppressWarnings("hiding") PMult _mult_, + @SuppressWarnings("hiding") TFois _fois_, + @SuppressWarnings("hiding") PNeg _neg_) + { + // Constructor + setMult(_mult_); + + setFois(_fois_); + + setNeg(_neg_); + + } + + @Override + public Object clone() + { + return new AFoisMult( + cloneNode(this._mult_), + cloneNode(this._fois_), + cloneNode(this._neg_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAFoisMult(this); + } + + public PMult getMult() + { + return this._mult_; + } + + public void setMult(PMult node) + { + if(this._mult_ != null) + { + this._mult_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._mult_ = node; + } + + public TFois getFois() + { + return this._fois_; + } + + public void setFois(TFois node) + { + if(this._fois_ != null) + { + this._fois_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._fois_ = node; + } + + public PNeg getNeg() + { + return this._neg_; + } + + public void setNeg(PNeg node) + { + if(this._neg_ != null) + { + this._neg_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._neg_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._mult_) + + toString(this._fois_) + + toString(this._neg_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._mult_ == child) + { + this._mult_ = null; + return; + } + + if(this._fois_ == child) + { + this._fois_ = null; + return; + } + + if(this._neg_ == child) + { + this._neg_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._mult_ == oldChild) + { + setMult((PMult) newChild); + return; + } + + if(this._fois_ == oldChild) + { + setFois((TFois) newChild); + return; + } + + if(this._neg_ == oldChild) + { + setNeg((PNeg) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AIdCrochetVar.java b/src/lParser/node/AIdCrochetVar.java new file mode 100644 index 0000000..fab638c --- /dev/null +++ b/src/lParser/node/AIdCrochetVar.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AIdCrochetVar extends PVar +{ + private TId _id_; + private TCrochetg _crochetg_; + private PExp _exp_; + private TCrochetd _crochetd_; + + public AIdCrochetVar() + { + // Constructor + } + + public AIdCrochetVar( + @SuppressWarnings("hiding") TId _id_, + @SuppressWarnings("hiding") TCrochetg _crochetg_, + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") TCrochetd _crochetd_) + { + // Constructor + setId(_id_); + + setCrochetg(_crochetg_); + + setExp(_exp_); + + setCrochetd(_crochetd_); + + } + + @Override + public Object clone() + { + return new AIdCrochetVar( + cloneNode(this._id_), + cloneNode(this._crochetg_), + cloneNode(this._exp_), + cloneNode(this._crochetd_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAIdCrochetVar(this); + } + + public TId getId() + { + return this._id_; + } + + public void setId(TId node) + { + if(this._id_ != null) + { + this._id_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._id_ = node; + } + + public TCrochetg getCrochetg() + { + return this._crochetg_; + } + + public void setCrochetg(TCrochetg node) + { + if(this._crochetg_ != null) + { + this._crochetg_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._crochetg_ = node; + } + + public PExp getExp() + { + return this._exp_; + } + + public void setExp(PExp node) + { + if(this._exp_ != null) + { + this._exp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._exp_ = node; + } + + public TCrochetd getCrochetd() + { + return this._crochetd_; + } + + public void setCrochetd(TCrochetd node) + { + if(this._crochetd_ != null) + { + this._crochetd_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._crochetd_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._id_) + + toString(this._crochetg_) + + toString(this._exp_) + + toString(this._crochetd_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._id_ == child) + { + this._id_ = null; + return; + } + + if(this._crochetg_ == child) + { + this._crochetg_ = null; + return; + } + + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._crochetd_ == child) + { + this._crochetd_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._id_ == oldChild) + { + setId((TId) newChild); + return; + } + + if(this._crochetg_ == oldChild) + { + setCrochetg((TCrochetg) newChild); + return; + } + + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._crochetd_ == oldChild) + { + setCrochetd((TCrochetd) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AIdVar.java b/src/lParser/node/AIdVar.java new file mode 100644 index 0000000..e11672d --- /dev/null +++ b/src/lParser/node/AIdVar.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AIdVar extends PVar +{ + private TId _id_; + + public AIdVar() + { + // Constructor + } + + public AIdVar( + @SuppressWarnings("hiding") TId _id_) + { + // Constructor + setId(_id_); + + } + + @Override + public Object clone() + { + return new AIdVar( + cloneNode(this._id_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAIdVar(this); + } + + public TId getId() + { + return this._id_; + } + + public void setId(TId node) + { + if(this._id_ != null) + { + this._id_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._id_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._id_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._id_ == child) + { + this._id_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._id_ == oldChild) + { + setId((TId) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AInfEquals.java b/src/lParser/node/AInfEquals.java new file mode 100644 index 0000000..183dbdf --- /dev/null +++ b/src/lParser/node/AInfEquals.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AInfEquals extends PEquals +{ + private PEquals _equals_; + private TInf _inf_; + private PAdd _add_; + + public AInfEquals() + { + // Constructor + } + + public AInfEquals( + @SuppressWarnings("hiding") PEquals _equals_, + @SuppressWarnings("hiding") TInf _inf_, + @SuppressWarnings("hiding") PAdd _add_) + { + // Constructor + setEquals(_equals_); + + setInf(_inf_); + + setAdd(_add_); + + } + + @Override + public Object clone() + { + return new AInfEquals( + cloneNode(this._equals_), + cloneNode(this._inf_), + cloneNode(this._add_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAInfEquals(this); + } + + public PEquals getEquals() + { + return this._equals_; + } + + public void setEquals(PEquals node) + { + if(this._equals_ != null) + { + this._equals_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._equals_ = node; + } + + public TInf getInf() + { + return this._inf_; + } + + public void setInf(TInf node) + { + if(this._inf_ != null) + { + this._inf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._inf_ = node; + } + + public PAdd getAdd() + { + return this._add_; + } + + public void setAdd(PAdd node) + { + if(this._add_ != null) + { + this._add_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._add_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._equals_) + + toString(this._inf_) + + toString(this._add_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._equals_ == child) + { + this._equals_ = null; + return; + } + + if(this._inf_ == child) + { + this._inf_ = null; + return; + } + + if(this._add_ == child) + { + this._add_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._equals_ == oldChild) + { + setEquals((PEquals) newChild); + return; + } + + if(this._inf_ == oldChild) + { + setInf((TInf) newChild); + return; + } + + if(this._add_ == oldChild) + { + setAdd((PAdd) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AInstrBloc.java b/src/lParser/node/AInstrBloc.java new file mode 100644 index 0000000..fc6fe33 --- /dev/null +++ b/src/lParser/node/AInstrBloc.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AInstrBloc extends PBloc +{ + private TAccoladeg _accoladeg_; + private PLi _li_; + private TAccoladed _accoladed_; + + public AInstrBloc() + { + // Constructor + } + + public AInstrBloc( + @SuppressWarnings("hiding") TAccoladeg _accoladeg_, + @SuppressWarnings("hiding") PLi _li_, + @SuppressWarnings("hiding") TAccoladed _accoladed_) + { + // Constructor + setAccoladeg(_accoladeg_); + + setLi(_li_); + + setAccoladed(_accoladed_); + + } + + @Override + public Object clone() + { + return new AInstrBloc( + cloneNode(this._accoladeg_), + cloneNode(this._li_), + cloneNode(this._accoladed_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAInstrBloc(this); + } + + public TAccoladeg getAccoladeg() + { + return this._accoladeg_; + } + + public void setAccoladeg(TAccoladeg node) + { + if(this._accoladeg_ != null) + { + this._accoladeg_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._accoladeg_ = node; + } + + public PLi getLi() + { + return this._li_; + } + + public void setLi(PLi node) + { + if(this._li_ != null) + { + this._li_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._li_ = node; + } + + public TAccoladed getAccoladed() + { + return this._accoladed_; + } + + public void setAccoladed(TAccoladed node) + { + if(this._accoladed_ != null) + { + this._accoladed_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._accoladed_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._accoladeg_) + + toString(this._li_) + + toString(this._accoladed_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._accoladeg_ == child) + { + this._accoladeg_ = null; + return; + } + + if(this._li_ == child) + { + this._li_ = null; + return; + } + + if(this._accoladed_ == child) + { + this._accoladed_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._accoladeg_ == oldChild) + { + setAccoladeg((TAccoladeg) newChild); + return; + } + + if(this._li_ == oldChild) + { + setLi((PLi) newChild); + return; + } + + if(this._accoladed_ == oldChild) + { + setAccoladed((TAccoladed) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ALdec.java b/src/lParser/node/ALdec.java new file mode 100644 index 0000000..7f5a2a8 --- /dev/null +++ b/src/lParser/node/ALdec.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ALdec extends PLdec +{ + private PEpsilon _epsilon_; + + public ALdec() + { + // Constructor + } + + public ALdec( + @SuppressWarnings("hiding") PEpsilon _epsilon_) + { + // Constructor + setEpsilon(_epsilon_); + + } + + @Override + public Object clone() + { + return new ALdec( + cloneNode(this._epsilon_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseALdec(this); + } + + public PEpsilon getEpsilon() + { + return this._epsilon_; + } + + public void setEpsilon(PEpsilon node) + { + if(this._epsilon_ != null) + { + this._epsilon_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._epsilon_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._epsilon_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._epsilon_ == child) + { + this._epsilon_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._epsilon_ == oldChild) + { + setEpsilon((PEpsilon) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ALdf.java b/src/lParser/node/ALdf.java new file mode 100644 index 0000000..1934c31 --- /dev/null +++ b/src/lParser/node/ALdf.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ALdf extends PLdf +{ + private PEpsilon _epsilon_; + + public ALdf() + { + // Constructor + } + + public ALdf( + @SuppressWarnings("hiding") PEpsilon _epsilon_) + { + // Constructor + setEpsilon(_epsilon_); + + } + + @Override + public Object clone() + { + return new ALdf( + cloneNode(this._epsilon_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseALdf(this); + } + + public PEpsilon getEpsilon() + { + return this._epsilon_; + } + + public void setEpsilon(PEpsilon node) + { + if(this._epsilon_ != null) + { + this._epsilon_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._epsilon_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._epsilon_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._epsilon_ == child) + { + this._epsilon_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._epsilon_ == oldChild) + { + setEpsilon((PEpsilon) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ALireE6.java b/src/lParser/node/ALireE6.java new file mode 100644 index 0000000..fdf9413 --- /dev/null +++ b/src/lParser/node/ALireE6.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ALireE6 extends PE6 +{ + private TLire _lire_; + private TGparenthese _gparenthese_; + private TDparenthese _dparenthese_; + + public ALireE6() + { + // Constructor + } + + public ALireE6( + @SuppressWarnings("hiding") TLire _lire_, + @SuppressWarnings("hiding") TGparenthese _gparenthese_, + @SuppressWarnings("hiding") TDparenthese _dparenthese_) + { + // Constructor + setLire(_lire_); + + setGparenthese(_gparenthese_); + + setDparenthese(_dparenthese_); + + } + + @Override + public Object clone() + { + return new ALireE6( + cloneNode(this._lire_), + cloneNode(this._gparenthese_), + cloneNode(this._dparenthese_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseALireE6(this); + } + + public TLire getLire() + { + return this._lire_; + } + + public void setLire(TLire node) + { + if(this._lire_ != null) + { + this._lire_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._lire_ = node; + } + + public TGparenthese getGparenthese() + { + return this._gparenthese_; + } + + public void setGparenthese(TGparenthese node) + { + if(this._gparenthese_ != null) + { + this._gparenthese_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._gparenthese_ = node; + } + + public TDparenthese getDparenthese() + { + return this._dparenthese_; + } + + public void setDparenthese(TDparenthese node) + { + if(this._dparenthese_ != null) + { + this._dparenthese_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._dparenthese_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._lire_) + + toString(this._gparenthese_) + + toString(this._dparenthese_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._lire_ == child) + { + this._lire_ = null; + return; + } + + if(this._gparenthese_ == child) + { + this._gparenthese_ = null; + return; + } + + if(this._dparenthese_ == child) + { + this._dparenthese_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._lire_ == oldChild) + { + setLire((TLire) newChild); + return; + } + + if(this._gparenthese_ == oldChild) + { + setGparenthese((TGparenthese) newChild); + return; + } + + if(this._dparenthese_ == oldChild) + { + setDparenthese((TDparenthese) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AListeinstrLi.java b/src/lParser/node/AListeinstrLi.java new file mode 100644 index 0000000..5558a71 --- /dev/null +++ b/src/lParser/node/AListeinstrLi.java @@ -0,0 +1,138 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AListeinstrLi extends PLi +{ + private PIns _ins_; + private PLi _li_; + + public AListeinstrLi() + { + // Constructor + } + + public AListeinstrLi( + @SuppressWarnings("hiding") PIns _ins_, + @SuppressWarnings("hiding") PLi _li_) + { + // Constructor + setIns(_ins_); + + setLi(_li_); + + } + + @Override + public Object clone() + { + return new AListeinstrLi( + cloneNode(this._ins_), + cloneNode(this._li_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAListeinstrLi(this); + } + + public PIns getIns() + { + return this._ins_; + } + + public void setIns(PIns node) + { + if(this._ins_ != null) + { + this._ins_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ins_ = node; + } + + public PLi getLi() + { + return this._li_; + } + + public void setLi(PLi node) + { + if(this._li_ != null) + { + this._li_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._li_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._ins_) + + toString(this._li_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._ins_ == child) + { + this._ins_ = null; + return; + } + + if(this._li_ == child) + { + this._li_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._ins_ == oldChild) + { + setIns((PIns) newChild); + return; + } + + if(this._li_ == oldChild) + { + setLi((PLi) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ALstdecfncLdf.java b/src/lParser/node/ALstdecfncLdf.java new file mode 100644 index 0000000..b7b654f --- /dev/null +++ b/src/lParser/node/ALstdecfncLdf.java @@ -0,0 +1,138 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ALstdecfncLdf extends PLdf +{ + private PDecfonc _decfonc_; + private PLdf _ldf_; + + public ALstdecfncLdf() + { + // Constructor + } + + public ALstdecfncLdf( + @SuppressWarnings("hiding") PDecfonc _decfonc_, + @SuppressWarnings("hiding") PLdf _ldf_) + { + // Constructor + setDecfonc(_decfonc_); + + setLdf(_ldf_); + + } + + @Override + public Object clone() + { + return new ALstdecfncLdf( + cloneNode(this._decfonc_), + cloneNode(this._ldf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseALstdecfncLdf(this); + } + + public PDecfonc getDecfonc() + { + return this._decfonc_; + } + + public void setDecfonc(PDecfonc node) + { + if(this._decfonc_ != null) + { + this._decfonc_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._decfonc_ = node; + } + + public PLdf getLdf() + { + return this._ldf_; + } + + public void setLdf(PLdf node) + { + if(this._ldf_ != null) + { + this._ldf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ldf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._decfonc_) + + toString(this._ldf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._decfonc_ == child) + { + this._decfonc_ = null; + return; + } + + if(this._ldf_ == child) + { + this._ldf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._decfonc_ == oldChild) + { + setDecfonc((PDecfonc) newChild); + return; + } + + if(this._ldf_ == oldChild) + { + setLdf((PLdf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ALstdeclacvarLdec.java b/src/lParser/node/ALstdeclacvarLdec.java new file mode 100644 index 0000000..362a886 --- /dev/null +++ b/src/lParser/node/ALstdeclacvarLdec.java @@ -0,0 +1,138 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ALstdeclacvarLdec extends PLdec +{ + private PDecvar _decvar_; + private PSuitedec _suitedec_; + + public ALstdeclacvarLdec() + { + // Constructor + } + + public ALstdeclacvarLdec( + @SuppressWarnings("hiding") PDecvar _decvar_, + @SuppressWarnings("hiding") PSuitedec _suitedec_) + { + // Constructor + setDecvar(_decvar_); + + setSuitedec(_suitedec_); + + } + + @Override + public Object clone() + { + return new ALstdeclacvarLdec( + cloneNode(this._decvar_), + cloneNode(this._suitedec_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseALstdeclacvarLdec(this); + } + + public PDecvar getDecvar() + { + return this._decvar_; + } + + public void setDecvar(PDecvar node) + { + if(this._decvar_ != null) + { + this._decvar_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._decvar_ = node; + } + + public PSuitedec getSuitedec() + { + return this._suitedec_; + } + + public void setSuitedec(PSuitedec node) + { + if(this._suitedec_ != null) + { + this._suitedec_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._suitedec_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._decvar_) + + toString(this._suitedec_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._decvar_ == child) + { + this._decvar_ = null; + return; + } + + if(this._suitedec_ == child) + { + this._suitedec_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._decvar_ == oldChild) + { + setDecvar((PDecvar) newChild); + return; + } + + if(this._suitedec_ == oldChild) + { + setSuitedec((PSuitedec) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ALstexprLse.java b/src/lParser/node/ALstexprLse.java new file mode 100644 index 0000000..abc6e05 --- /dev/null +++ b/src/lParser/node/ALstexprLse.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ALstexprLse extends PLse +{ + private TVirgule _virgule_; + private PExp _exp_; + private PLse _lse_; + + public ALstexprLse() + { + // Constructor + } + + public ALstexprLse( + @SuppressWarnings("hiding") TVirgule _virgule_, + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") PLse _lse_) + { + // Constructor + setVirgule(_virgule_); + + setExp(_exp_); + + setLse(_lse_); + + } + + @Override + public Object clone() + { + return new ALstexprLse( + cloneNode(this._virgule_), + cloneNode(this._exp_), + cloneNode(this._lse_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseALstexprLse(this); + } + + public TVirgule getVirgule() + { + return this._virgule_; + } + + public void setVirgule(TVirgule node) + { + if(this._virgule_ != null) + { + this._virgule_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._virgule_ = node; + } + + public PExp getExp() + { + return this._exp_; + } + + public void setExp(PExp node) + { + if(this._exp_ != null) + { + this._exp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._exp_ = node; + } + + public PLse getLse() + { + return this._lse_; + } + + public void setLse(PLse node) + { + if(this._lse_ != null) + { + this._lse_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._lse_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._virgule_) + + toString(this._exp_) + + toString(this._lse_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._virgule_ == child) + { + this._virgule_ = null; + return; + } + + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._lse_ == child) + { + this._lse_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._virgule_ == oldChild) + { + setVirgule((TVirgule) newChild); + return; + } + + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._lse_ == oldChild) + { + setLse((PLse) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AMoinsAdd.java b/src/lParser/node/AMoinsAdd.java new file mode 100644 index 0000000..27e6858 --- /dev/null +++ b/src/lParser/node/AMoinsAdd.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AMoinsAdd extends PAdd +{ + private PAdd _add_; + private TMoins _moins_; + private PMult _mult_; + + public AMoinsAdd() + { + // Constructor + } + + public AMoinsAdd( + @SuppressWarnings("hiding") PAdd _add_, + @SuppressWarnings("hiding") TMoins _moins_, + @SuppressWarnings("hiding") PMult _mult_) + { + // Constructor + setAdd(_add_); + + setMoins(_moins_); + + setMult(_mult_); + + } + + @Override + public Object clone() + { + return new AMoinsAdd( + cloneNode(this._add_), + cloneNode(this._moins_), + cloneNode(this._mult_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAMoinsAdd(this); + } + + public PAdd getAdd() + { + return this._add_; + } + + public void setAdd(PAdd node) + { + if(this._add_ != null) + { + this._add_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._add_ = node; + } + + public TMoins getMoins() + { + return this._moins_; + } + + public void setMoins(TMoins node) + { + if(this._moins_ != null) + { + this._moins_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._moins_ = node; + } + + public PMult getMult() + { + return this._mult_; + } + + public void setMult(PMult node) + { + if(this._mult_ != null) + { + this._mult_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._mult_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._add_) + + toString(this._moins_) + + toString(this._mult_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._add_ == child) + { + this._add_ = null; + return; + } + + if(this._moins_ == child) + { + this._moins_ = null; + return; + } + + if(this._mult_ == child) + { + this._mult_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._add_ == oldChild) + { + setAdd((PAdd) newChild); + return; + } + + if(this._moins_ == oldChild) + { + setMoins((TMoins) newChild); + return; + } + + if(this._mult_ == oldChild) + { + setMult((PMult) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AMultAdd.java b/src/lParser/node/AMultAdd.java new file mode 100644 index 0000000..1f6e6f7 --- /dev/null +++ b/src/lParser/node/AMultAdd.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AMultAdd extends PAdd +{ + private PMult _mult_; + + public AMultAdd() + { + // Constructor + } + + public AMultAdd( + @SuppressWarnings("hiding") PMult _mult_) + { + // Constructor + setMult(_mult_); + + } + + @Override + public Object clone() + { + return new AMultAdd( + cloneNode(this._mult_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAMultAdd(this); + } + + public PMult getMult() + { + return this._mult_; + } + + public void setMult(PMult node) + { + if(this._mult_ != null) + { + this._mult_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._mult_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._mult_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._mult_ == child) + { + this._mult_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._mult_ == oldChild) + { + setMult((PMult) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ANegMult.java b/src/lParser/node/ANegMult.java new file mode 100644 index 0000000..dbcc3c2 --- /dev/null +++ b/src/lParser/node/ANegMult.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ANegMult extends PMult +{ + private PNeg _neg_; + + public ANegMult() + { + // Constructor + } + + public ANegMult( + @SuppressWarnings("hiding") PNeg _neg_) + { + // Constructor + setNeg(_neg_); + + } + + @Override + public Object clone() + { + return new ANegMult( + cloneNode(this._neg_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseANegMult(this); + } + + public PNeg getNeg() + { + return this._neg_; + } + + public void setNeg(PNeg node) + { + if(this._neg_ != null) + { + this._neg_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._neg_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._neg_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._neg_ == child) + { + this._neg_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._neg_ == oldChild) + { + setNeg((PNeg) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ANombreE6.java b/src/lParser/node/ANombreE6.java new file mode 100644 index 0000000..108a7ac --- /dev/null +++ b/src/lParser/node/ANombreE6.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ANombreE6 extends PE6 +{ + private TNombre _nombre_; + + public ANombreE6() + { + // Constructor + } + + public ANombreE6( + @SuppressWarnings("hiding") TNombre _nombre_) + { + // Constructor + setNombre(_nombre_); + + } + + @Override + public Object clone() + { + return new ANombreE6( + cloneNode(this._nombre_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseANombreE6(this); + } + + public TNombre getNombre() + { + return this._nombre_; + } + + public void setNombre(TNombre node) + { + if(this._nombre_ != null) + { + this._nombre_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._nombre_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._nombre_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._nombre_ == child) + { + this._nombre_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._nombre_ == oldChild) + { + setNombre((TNombre) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ANonNeg.java b/src/lParser/node/ANonNeg.java new file mode 100644 index 0000000..01b75ea --- /dev/null +++ b/src/lParser/node/ANonNeg.java @@ -0,0 +1,138 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ANonNeg extends PNeg +{ + private TNon _non_; + private PNeg _neg_; + + public ANonNeg() + { + // Constructor + } + + public ANonNeg( + @SuppressWarnings("hiding") TNon _non_, + @SuppressWarnings("hiding") PNeg _neg_) + { + // Constructor + setNon(_non_); + + setNeg(_neg_); + + } + + @Override + public Object clone() + { + return new ANonNeg( + cloneNode(this._non_), + cloneNode(this._neg_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseANonNeg(this); + } + + public TNon getNon() + { + return this._non_; + } + + public void setNon(TNon node) + { + if(this._non_ != null) + { + this._non_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._non_ = node; + } + + public PNeg getNeg() + { + return this._neg_; + } + + public void setNeg(PNeg node) + { + if(this._neg_ != null) + { + this._neg_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._neg_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._non_) + + toString(this._neg_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._non_ == child) + { + this._non_ = null; + return; + } + + if(this._neg_ == child) + { + this._neg_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._non_ == oldChild) + { + setNon((TNon) newChild); + return; + } + + if(this._neg_ == oldChild) + { + setNeg((PNeg) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AOrExp.java b/src/lParser/node/AOrExp.java new file mode 100644 index 0000000..a7f43aa --- /dev/null +++ b/src/lParser/node/AOrExp.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AOrExp extends PExp +{ + private PExp _exp_; + private TOu _ou_; + private PAnd _and_; + + public AOrExp() + { + // Constructor + } + + public AOrExp( + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") TOu _ou_, + @SuppressWarnings("hiding") PAnd _and_) + { + // Constructor + setExp(_exp_); + + setOu(_ou_); + + setAnd(_and_); + + } + + @Override + public Object clone() + { + return new AOrExp( + cloneNode(this._exp_), + cloneNode(this._ou_), + cloneNode(this._and_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAOrExp(this); + } + + public PExp getExp() + { + return this._exp_; + } + + public void setExp(PExp node) + { + if(this._exp_ != null) + { + this._exp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._exp_ = node; + } + + public TOu getOu() + { + return this._ou_; + } + + public void setOu(TOu node) + { + if(this._ou_ != null) + { + this._ou_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ou_ = node; + } + + public PAnd getAnd() + { + return this._and_; + } + + public void setAnd(PAnd node) + { + if(this._and_ != null) + { + this._and_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._and_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._exp_) + + toString(this._ou_) + + toString(this._and_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._ou_ == child) + { + this._ou_ = null; + return; + } + + if(this._and_ == child) + { + this._and_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._ou_ == oldChild) + { + setOu((TOu) newChild); + return; + } + + if(this._and_ == oldChild) + { + setAnd((PAnd) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AParentheseE6.java b/src/lParser/node/AParentheseE6.java new file mode 100644 index 0000000..6b7933f --- /dev/null +++ b/src/lParser/node/AParentheseE6.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AParentheseE6 extends PE6 +{ + private TGparenthese _gparenthese_; + private PExp _exp_; + private TDparenthese _dparenthese_; + + public AParentheseE6() + { + // Constructor + } + + public AParentheseE6( + @SuppressWarnings("hiding") TGparenthese _gparenthese_, + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") TDparenthese _dparenthese_) + { + // Constructor + setGparenthese(_gparenthese_); + + setExp(_exp_); + + setDparenthese(_dparenthese_); + + } + + @Override + public Object clone() + { + return new AParentheseE6( + cloneNode(this._gparenthese_), + cloneNode(this._exp_), + cloneNode(this._dparenthese_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAParentheseE6(this); + } + + public TGparenthese getGparenthese() + { + return this._gparenthese_; + } + + public void setGparenthese(TGparenthese node) + { + if(this._gparenthese_ != null) + { + this._gparenthese_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._gparenthese_ = node; + } + + public PExp getExp() + { + return this._exp_; + } + + public void setExp(PExp node) + { + if(this._exp_ != null) + { + this._exp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._exp_ = node; + } + + public TDparenthese getDparenthese() + { + return this._dparenthese_; + } + + public void setDparenthese(TDparenthese node) + { + if(this._dparenthese_ != null) + { + this._dparenthese_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._dparenthese_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._gparenthese_) + + toString(this._exp_) + + toString(this._dparenthese_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._gparenthese_ == child) + { + this._gparenthese_ = null; + return; + } + + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._dparenthese_ == child) + { + this._dparenthese_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._gparenthese_ == oldChild) + { + setGparenthese((TGparenthese) newChild); + return; + } + + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._dparenthese_ == oldChild) + { + setDparenthese((TDparenthese) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/APlusAdd.java b/src/lParser/node/APlusAdd.java new file mode 100644 index 0000000..bd1386b --- /dev/null +++ b/src/lParser/node/APlusAdd.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class APlusAdd extends PAdd +{ + private PAdd _add_; + private TPlus _plus_; + private PMult _mult_; + + public APlusAdd() + { + // Constructor + } + + public APlusAdd( + @SuppressWarnings("hiding") PAdd _add_, + @SuppressWarnings("hiding") TPlus _plus_, + @SuppressWarnings("hiding") PMult _mult_) + { + // Constructor + setAdd(_add_); + + setPlus(_plus_); + + setMult(_mult_); + + } + + @Override + public Object clone() + { + return new APlusAdd( + cloneNode(this._add_), + cloneNode(this._plus_), + cloneNode(this._mult_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAPlusAdd(this); + } + + public PAdd getAdd() + { + return this._add_; + } + + public void setAdd(PAdd node) + { + if(this._add_ != null) + { + this._add_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._add_ = node; + } + + public TPlus getPlus() + { + return this._plus_; + } + + public void setPlus(TPlus node) + { + if(this._plus_ != null) + { + this._plus_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._plus_ = node; + } + + public PMult getMult() + { + return this._mult_; + } + + public void setMult(PMult node) + { + if(this._mult_ != null) + { + this._mult_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._mult_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._add_) + + toString(this._plus_) + + toString(this._mult_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._add_ == child) + { + this._add_ = null; + return; + } + + if(this._plus_ == child) + { + this._plus_ = null; + return; + } + + if(this._mult_ == child) + { + this._mult_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._add_ == oldChild) + { + setAdd((PAdd) newChild); + return; + } + + if(this._plus_ == oldChild) + { + setPlus((TPlus) newChild); + return; + } + + if(this._mult_ == oldChild) + { + setMult((PMult) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AProg.java b/src/lParser/node/AProg.java new file mode 100644 index 0000000..dbb7559 --- /dev/null +++ b/src/lParser/node/AProg.java @@ -0,0 +1,138 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AProg extends PProg +{ + private PLdec _ldec_; + private PLdf _ldf_; + + public AProg() + { + // Constructor + } + + public AProg( + @SuppressWarnings("hiding") PLdec _ldec_, + @SuppressWarnings("hiding") PLdf _ldf_) + { + // Constructor + setLdec(_ldec_); + + setLdf(_ldf_); + + } + + @Override + public Object clone() + { + return new AProg( + cloneNode(this._ldec_), + cloneNode(this._ldf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAProg(this); + } + + public PLdec getLdec() + { + return this._ldec_; + } + + public void setLdec(PLdec node) + { + if(this._ldec_ != null) + { + this._ldec_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ldec_ = node; + } + + public PLdf getLdf() + { + return this._ldf_; + } + + public void setLdf(PLdf node) + { + if(this._ldf_ != null) + { + this._ldf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ldf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._ldec_) + + toString(this._ldf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._ldec_ == child) + { + this._ldec_ = null; + return; + } + + if(this._ldf_ == child) + { + this._ldf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._ldec_ == oldChild) + { + setLdec((PLdec) newChild); + return; + } + + if(this._ldf_ == oldChild) + { + setLdf((PLdf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AReturnIns.java b/src/lParser/node/AReturnIns.java new file mode 100644 index 0000000..db85244 --- /dev/null +++ b/src/lParser/node/AReturnIns.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AReturnIns extends PIns +{ + private TRetourner _retourner_; + private PExp _exp_; + private TPointvirgule _pointvirgule_; + + public AReturnIns() + { + // Constructor + } + + public AReturnIns( + @SuppressWarnings("hiding") TRetourner _retourner_, + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") TPointvirgule _pointvirgule_) + { + // Constructor + setRetourner(_retourner_); + + setExp(_exp_); + + setPointvirgule(_pointvirgule_); + + } + + @Override + public Object clone() + { + return new AReturnIns( + cloneNode(this._retourner_), + cloneNode(this._exp_), + cloneNode(this._pointvirgule_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAReturnIns(this); + } + + public TRetourner getRetourner() + { + return this._retourner_; + } + + public void setRetourner(TRetourner node) + { + if(this._retourner_ != null) + { + this._retourner_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._retourner_ = node; + } + + public PExp getExp() + { + return this._exp_; + } + + public void setExp(PExp node) + { + if(this._exp_ != null) + { + this._exp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._exp_ = node; + } + + public TPointvirgule getPointvirgule() + { + return this._pointvirgule_; + } + + public void setPointvirgule(TPointvirgule node) + { + if(this._pointvirgule_ != null) + { + this._pointvirgule_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pointvirgule_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._retourner_) + + toString(this._exp_) + + toString(this._pointvirgule_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._retourner_ == child) + { + this._retourner_ = null; + return; + } + + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._pointvirgule_ == child) + { + this._pointvirgule_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._retourner_ == oldChild) + { + setRetourner((TRetourner) newChild); + return; + } + + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._pointvirgule_ == oldChild) + { + setPointvirgule((TPointvirgule) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ASiIns.java b/src/lParser/node/ASiIns.java new file mode 100644 index 0000000..1d41afd --- /dev/null +++ b/src/lParser/node/ASiIns.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ASiIns extends PIns +{ + private TSi _si_; + private PExp _exp_; + private TAlors _alors_; + private PBloc _bloc_; + + public ASiIns() + { + // Constructor + } + + public ASiIns( + @SuppressWarnings("hiding") TSi _si_, + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") TAlors _alors_, + @SuppressWarnings("hiding") PBloc _bloc_) + { + // Constructor + setSi(_si_); + + setExp(_exp_); + + setAlors(_alors_); + + setBloc(_bloc_); + + } + + @Override + public Object clone() + { + return new ASiIns( + cloneNode(this._si_), + cloneNode(this._exp_), + cloneNode(this._alors_), + cloneNode(this._bloc_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseASiIns(this); + } + + public TSi getSi() + { + return this._si_; + } + + public void setSi(TSi node) + { + if(this._si_ != null) + { + this._si_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._si_ = node; + } + + public PExp getExp() + { + return this._exp_; + } + + public void setExp(PExp node) + { + if(this._exp_ != null) + { + this._exp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._exp_ = node; + } + + public TAlors getAlors() + { + return this._alors_; + } + + public void setAlors(TAlors node) + { + if(this._alors_ != null) + { + this._alors_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._alors_ = node; + } + + public PBloc getBloc() + { + return this._bloc_; + } + + public void setBloc(PBloc node) + { + if(this._bloc_ != null) + { + this._bloc_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._bloc_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._si_) + + toString(this._exp_) + + toString(this._alors_) + + toString(this._bloc_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._si_ == child) + { + this._si_ = null; + return; + } + + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._alors_ == child) + { + this._alors_ = null; + return; + } + + if(this._bloc_ == child) + { + this._bloc_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._si_ == oldChild) + { + setSi((TSi) newChild); + return; + } + + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._alors_ == oldChild) + { + setAlors((TAlors) newChild); + return; + } + + if(this._bloc_ == oldChild) + { + setBloc((PBloc) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ASisinonIns.java b/src/lParser/node/ASisinonIns.java new file mode 100644 index 0000000..83a662a --- /dev/null +++ b/src/lParser/node/ASisinonIns.java @@ -0,0 +1,310 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ASisinonIns extends PIns +{ + private TSi _si_; + private PExp _exp_; + private TAlors _alors_; + private PBloc _alor_; + private TSinon _sinon_; + private PBloc _sino_; + + public ASisinonIns() + { + // Constructor + } + + public ASisinonIns( + @SuppressWarnings("hiding") TSi _si_, + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") TAlors _alors_, + @SuppressWarnings("hiding") PBloc _alor_, + @SuppressWarnings("hiding") TSinon _sinon_, + @SuppressWarnings("hiding") PBloc _sino_) + { + // Constructor + setSi(_si_); + + setExp(_exp_); + + setAlors(_alors_); + + setAlor(_alor_); + + setSinon(_sinon_); + + setSino(_sino_); + + } + + @Override + public Object clone() + { + return new ASisinonIns( + cloneNode(this._si_), + cloneNode(this._exp_), + cloneNode(this._alors_), + cloneNode(this._alor_), + cloneNode(this._sinon_), + cloneNode(this._sino_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseASisinonIns(this); + } + + public TSi getSi() + { + return this._si_; + } + + public void setSi(TSi node) + { + if(this._si_ != null) + { + this._si_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._si_ = node; + } + + public PExp getExp() + { + return this._exp_; + } + + public void setExp(PExp node) + { + if(this._exp_ != null) + { + this._exp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._exp_ = node; + } + + public TAlors getAlors() + { + return this._alors_; + } + + public void setAlors(TAlors node) + { + if(this._alors_ != null) + { + this._alors_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._alors_ = node; + } + + public PBloc getAlor() + { + return this._alor_; + } + + public void setAlor(PBloc node) + { + if(this._alor_ != null) + { + this._alor_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._alor_ = node; + } + + public TSinon getSinon() + { + return this._sinon_; + } + + public void setSinon(TSinon node) + { + if(this._sinon_ != null) + { + this._sinon_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._sinon_ = node; + } + + public PBloc getSino() + { + return this._sino_; + } + + public void setSino(PBloc node) + { + if(this._sino_ != null) + { + this._sino_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._sino_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._si_) + + toString(this._exp_) + + toString(this._alors_) + + toString(this._alor_) + + toString(this._sinon_) + + toString(this._sino_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._si_ == child) + { + this._si_ = null; + return; + } + + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._alors_ == child) + { + this._alors_ = null; + return; + } + + if(this._alor_ == child) + { + this._alor_ = null; + return; + } + + if(this._sinon_ == child) + { + this._sinon_ = null; + return; + } + + if(this._sino_ == child) + { + this._sino_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._si_ == oldChild) + { + setSi((TSi) newChild); + return; + } + + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._alors_ == oldChild) + { + setAlors((TAlors) newChild); + return; + } + + if(this._alor_ == oldChild) + { + setAlor((PBloc) newChild); + return; + } + + if(this._sinon_ == oldChild) + { + setSinon((TSinon) newChild); + return; + } + + if(this._sino_ == oldChild) + { + setSino((PBloc) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ASuitedec.java b/src/lParser/node/ASuitedec.java new file mode 100644 index 0000000..9e91ad2 --- /dev/null +++ b/src/lParser/node/ASuitedec.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ASuitedec extends PSuitedec +{ + private PEpsilon _epsilon_; + + public ASuitedec() + { + // Constructor + } + + public ASuitedec( + @SuppressWarnings("hiding") PEpsilon _epsilon_) + { + // Constructor + setEpsilon(_epsilon_); + + } + + @Override + public Object clone() + { + return new ASuitedec( + cloneNode(this._epsilon_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseASuitedec(this); + } + + public PEpsilon getEpsilon() + { + return this._epsilon_; + } + + public void setEpsilon(PEpsilon node) + { + if(this._epsilon_ != null) + { + this._epsilon_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._epsilon_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._epsilon_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._epsilon_ == child) + { + this._epsilon_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._epsilon_ == oldChild) + { + setEpsilon((PEpsilon) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ASuitedeclvarSuitedec.java b/src/lParser/node/ASuitedeclvarSuitedec.java new file mode 100644 index 0000000..50b4e88 --- /dev/null +++ b/src/lParser/node/ASuitedeclvarSuitedec.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ASuitedeclvarSuitedec extends PSuitedec +{ + private TVirgule _virgule_; + private PDecvar _decvar_; + private PSuitedec _suitedec_; + + public ASuitedeclvarSuitedec() + { + // Constructor + } + + public ASuitedeclvarSuitedec( + @SuppressWarnings("hiding") TVirgule _virgule_, + @SuppressWarnings("hiding") PDecvar _decvar_, + @SuppressWarnings("hiding") PSuitedec _suitedec_) + { + // Constructor + setVirgule(_virgule_); + + setDecvar(_decvar_); + + setSuitedec(_suitedec_); + + } + + @Override + public Object clone() + { + return new ASuitedeclvarSuitedec( + cloneNode(this._virgule_), + cloneNode(this._decvar_), + cloneNode(this._suitedec_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseASuitedeclvarSuitedec(this); + } + + public TVirgule getVirgule() + { + return this._virgule_; + } + + public void setVirgule(TVirgule node) + { + if(this._virgule_ != null) + { + this._virgule_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._virgule_ = node; + } + + public PDecvar getDecvar() + { + return this._decvar_; + } + + public void setDecvar(PDecvar node) + { + if(this._decvar_ != null) + { + this._decvar_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._decvar_ = node; + } + + public PSuitedec getSuitedec() + { + return this._suitedec_; + } + + public void setSuitedec(PSuitedec node) + { + if(this._suitedec_ != null) + { + this._suitedec_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._suitedec_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._virgule_) + + toString(this._decvar_) + + toString(this._suitedec_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._virgule_ == child) + { + this._virgule_ = null; + return; + } + + if(this._decvar_ == child) + { + this._decvar_ = null; + return; + } + + if(this._suitedec_ == child) + { + this._suitedec_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._virgule_ == oldChild) + { + setVirgule((TVirgule) newChild); + return; + } + + if(this._decvar_ == oldChild) + { + setDecvar((PDecvar) newChild); + return; + } + + if(this._suitedec_ == oldChild) + { + setSuitedec((PSuitedec) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ATqIns.java b/src/lParser/node/ATqIns.java new file mode 100644 index 0000000..39dc30a --- /dev/null +++ b/src/lParser/node/ATqIns.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ATqIns extends PIns +{ + private TTantque _tantque_; + private PExp _exp_; + private TFaire _faire_; + private PBloc _bloc_; + + public ATqIns() + { + // Constructor + } + + public ATqIns( + @SuppressWarnings("hiding") TTantque _tantque_, + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") TFaire _faire_, + @SuppressWarnings("hiding") PBloc _bloc_) + { + // Constructor + setTantque(_tantque_); + + setExp(_exp_); + + setFaire(_faire_); + + setBloc(_bloc_); + + } + + @Override + public Object clone() + { + return new ATqIns( + cloneNode(this._tantque_), + cloneNode(this._exp_), + cloneNode(this._faire_), + cloneNode(this._bloc_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseATqIns(this); + } + + public TTantque getTantque() + { + return this._tantque_; + } + + public void setTantque(TTantque node) + { + if(this._tantque_ != null) + { + this._tantque_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._tantque_ = node; + } + + public PExp getExp() + { + return this._exp_; + } + + public void setExp(PExp node) + { + if(this._exp_ != null) + { + this._exp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._exp_ = node; + } + + public TFaire getFaire() + { + return this._faire_; + } + + public void setFaire(TFaire node) + { + if(this._faire_ != null) + { + this._faire_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._faire_ = node; + } + + public PBloc getBloc() + { + return this._bloc_; + } + + public void setBloc(PBloc node) + { + if(this._bloc_ != null) + { + this._bloc_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._bloc_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._tantque_) + + toString(this._exp_) + + toString(this._faire_) + + toString(this._bloc_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._tantque_ == child) + { + this._tantque_ = null; + return; + } + + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._faire_ == child) + { + this._faire_ = null; + return; + } + + if(this._bloc_ == child) + { + this._bloc_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._tantque_ == oldChild) + { + setTantque((TTantque) newChild); + return; + } + + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._faire_ == oldChild) + { + setFaire((TFaire) newChild); + return; + } + + if(this._bloc_ == oldChild) + { + setBloc((PBloc) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AType.java b/src/lParser/node/AType.java new file mode 100644 index 0000000..cf01247 --- /dev/null +++ b/src/lParser/node/AType.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AType extends PType +{ + private TEntier _entier_; + + public AType() + { + // Constructor + } + + public AType( + @SuppressWarnings("hiding") TEntier _entier_) + { + // Constructor + setEntier(_entier_); + + } + + @Override + public Object clone() + { + return new AType( + cloneNode(this._entier_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAType(this); + } + + public TEntier getEntier() + { + return this._entier_; + } + + public void setEntier(TEntier node) + { + if(this._entier_ != null) + { + this._entier_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._entier_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._entier_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._entier_ == child) + { + this._entier_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._entier_ == oldChild) + { + setEntier((TEntier) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ATypeType.java b/src/lParser/node/ATypeType.java new file mode 100644 index 0000000..a36a57e --- /dev/null +++ b/src/lParser/node/ATypeType.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ATypeType extends PType +{ + private TBool _bool_; + + public ATypeType() + { + // Constructor + } + + public ATypeType( + @SuppressWarnings("hiding") TBool _bool_) + { + // Constructor + setBool(_bool_); + + } + + @Override + public Object clone() + { + return new ATypeType( + cloneNode(this._bool_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseATypeType(this); + } + + public TBool getBool() + { + return this._bool_; + } + + public void setBool(TBool node) + { + if(this._bool_ != null) + { + this._bool_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._bool_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._bool_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._bool_ == child) + { + this._bool_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._bool_ == oldChild) + { + setBool((TBool) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ATypeopt.java b/src/lParser/node/ATypeopt.java new file mode 100644 index 0000000..47e948e --- /dev/null +++ b/src/lParser/node/ATypeopt.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ATypeopt extends PTypeopt +{ + private PEpsilon _epsilon_; + + public ATypeopt() + { + // Constructor + } + + public ATypeopt( + @SuppressWarnings("hiding") PEpsilon _epsilon_) + { + // Constructor + setEpsilon(_epsilon_); + + } + + @Override + public Object clone() + { + return new ATypeopt( + cloneNode(this._epsilon_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseATypeopt(this); + } + + public PEpsilon getEpsilon() + { + return this._epsilon_; + } + + public void setEpsilon(PEpsilon node) + { + if(this._epsilon_ != null) + { + this._epsilon_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._epsilon_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._epsilon_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._epsilon_ == child) + { + this._epsilon_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._epsilon_ == oldChild) + { + setEpsilon((PEpsilon) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/ATypeoptTypeopt.java b/src/lParser/node/ATypeoptTypeopt.java new file mode 100644 index 0000000..ecb5ede --- /dev/null +++ b/src/lParser/node/ATypeoptTypeopt.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class ATypeoptTypeopt extends PTypeopt +{ + private PType _type_; + + public ATypeoptTypeopt() + { + // Constructor + } + + public ATypeoptTypeopt( + @SuppressWarnings("hiding") PType _type_) + { + // Constructor + setType(_type_); + + } + + @Override + public Object clone() + { + return new ATypeoptTypeopt( + cloneNode(this._type_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseATypeoptTypeopt(this); + } + + public PType getType() + { + return this._type_; + } + + public void setType(PType node) + { + if(this._type_ != null) + { + this._type_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._type_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._type_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._type_ == child) + { + this._type_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._type_ == oldChild) + { + setType((PType) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AVarE6.java b/src/lParser/node/AVarE6.java new file mode 100644 index 0000000..8819e17 --- /dev/null +++ b/src/lParser/node/AVarE6.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AVarE6 extends PE6 +{ + private PVar _var_; + + public AVarE6() + { + // Constructor + } + + public AVarE6( + @SuppressWarnings("hiding") PVar _var_) + { + // Constructor + setVar(_var_); + + } + + @Override + public Object clone() + { + return new AVarE6( + cloneNode(this._var_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAVarE6(this); + } + + public PVar getVar() + { + return this._var_; + } + + public void setVar(PVar node) + { + if(this._var_ != null) + { + this._var_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._var_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._var_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._var_ == child) + { + this._var_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._var_ == oldChild) + { + setVar((PVar) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AVraiE6.java b/src/lParser/node/AVraiE6.java new file mode 100644 index 0000000..9f5ef8b --- /dev/null +++ b/src/lParser/node/AVraiE6.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AVraiE6 extends PE6 +{ + private TVrai _vrai_; + + public AVraiE6() + { + // Constructor + } + + public AVraiE6( + @SuppressWarnings("hiding") TVrai _vrai_) + { + // Constructor + setVrai(_vrai_); + + } + + @Override + public Object clone() + { + return new AVraiE6( + cloneNode(this._vrai_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAVraiE6(this); + } + + public TVrai getVrai() + { + return this._vrai_; + } + + public void setVrai(TVrai node) + { + if(this._vrai_ != null) + { + this._vrai_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._vrai_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._vrai_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._vrai_ == child) + { + this._vrai_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._vrai_ == oldChild) + { + setVrai((TVrai) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/AWriteIns.java b/src/lParser/node/AWriteIns.java new file mode 100644 index 0000000..f5b118c --- /dev/null +++ b/src/lParser/node/AWriteIns.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class AWriteIns extends PIns +{ + private TEcrire _ecrire_; + private TGparenthese _gparenthese_; + private PExp _exp_; + private TDparenthese _dparenthese_; + private TPointvirgule _pointvirgule_; + + public AWriteIns() + { + // Constructor + } + + public AWriteIns( + @SuppressWarnings("hiding") TEcrire _ecrire_, + @SuppressWarnings("hiding") TGparenthese _gparenthese_, + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") TDparenthese _dparenthese_, + @SuppressWarnings("hiding") TPointvirgule _pointvirgule_) + { + // Constructor + setEcrire(_ecrire_); + + setGparenthese(_gparenthese_); + + setExp(_exp_); + + setDparenthese(_dparenthese_); + + setPointvirgule(_pointvirgule_); + + } + + @Override + public Object clone() + { + return new AWriteIns( + cloneNode(this._ecrire_), + cloneNode(this._gparenthese_), + cloneNode(this._exp_), + cloneNode(this._dparenthese_), + cloneNode(this._pointvirgule_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAWriteIns(this); + } + + public TEcrire getEcrire() + { + return this._ecrire_; + } + + public void setEcrire(TEcrire node) + { + if(this._ecrire_ != null) + { + this._ecrire_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ecrire_ = node; + } + + public TGparenthese getGparenthese() + { + return this._gparenthese_; + } + + public void setGparenthese(TGparenthese node) + { + if(this._gparenthese_ != null) + { + this._gparenthese_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._gparenthese_ = node; + } + + public PExp getExp() + { + return this._exp_; + } + + public void setExp(PExp node) + { + if(this._exp_ != null) + { + this._exp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._exp_ = node; + } + + public TDparenthese getDparenthese() + { + return this._dparenthese_; + } + + public void setDparenthese(TDparenthese node) + { + if(this._dparenthese_ != null) + { + this._dparenthese_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._dparenthese_ = node; + } + + public TPointvirgule getPointvirgule() + { + return this._pointvirgule_; + } + + public void setPointvirgule(TPointvirgule node) + { + if(this._pointvirgule_ != null) + { + this._pointvirgule_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pointvirgule_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._ecrire_) + + toString(this._gparenthese_) + + toString(this._exp_) + + toString(this._dparenthese_) + + toString(this._pointvirgule_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._ecrire_ == child) + { + this._ecrire_ = null; + return; + } + + if(this._gparenthese_ == child) + { + this._gparenthese_ = null; + return; + } + + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._dparenthese_ == child) + { + this._dparenthese_ = null; + return; + } + + if(this._pointvirgule_ == child) + { + this._pointvirgule_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._ecrire_ == oldChild) + { + setEcrire((TEcrire) newChild); + return; + } + + if(this._gparenthese_ == oldChild) + { + setGparenthese((TGparenthese) newChild); + return; + } + + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._dparenthese_ == oldChild) + { + setDparenthese((TDparenthese) newChild); + return; + } + + if(this._pointvirgule_ == oldChild) + { + setPointvirgule((TPointvirgule) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/node/EOF.java b/src/lParser/node/EOF.java new file mode 100644 index 0000000..a035284 --- /dev/null +++ b/src/lParser/node/EOF.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class EOF extends Token +{ + public EOF() + { + setText(""); + } + + public EOF(int line, int pos) + { + setText(""); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new EOF(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseEOF(this); + } +} diff --git a/src/lParser/node/InvalidToken.java b/src/lParser/node/InvalidToken.java new file mode 100644 index 0000000..16b539d --- /dev/null +++ b/src/lParser/node/InvalidToken.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class InvalidToken extends Token +{ + public InvalidToken(String text) + { + setText(text); + } + + public InvalidToken(String text, int line, int pos) + { + setText(text); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new InvalidToken(getText(), getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseInvalidToken(this); + } +} diff --git a/src/lParser/node/Node.java b/src/lParser/node/Node.java new file mode 100644 index 0000000..330718c --- /dev/null +++ b/src/lParser/node/Node.java @@ -0,0 +1,78 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import java.util.*; + +@SuppressWarnings("nls") +public abstract class Node implements Switchable, Cloneable +{ + private Node parent; + + @Override + public abstract Object clone(); + + public Node parent() + { + return this.parent; + } + + void parent(@SuppressWarnings("hiding") Node parent) + { + this.parent = parent; + } + + abstract void removeChild(Node child); + abstract void replaceChild(Node oldChild, Node newChild); + + public void replaceBy(Node node) + { + this.parent.replaceChild(this, node); + } + + protected String toString(Node node) + { + if(node != null) + { + return node.toString(); + } + + return ""; + } + + protected String toString(List<?> list) + { + StringBuffer s = new StringBuffer(); + + for(Iterator<?> i = list.iterator(); i.hasNext();) + { + s.append(i.next()); + } + + return s.toString(); + } + + @SuppressWarnings("unchecked") + protected <T extends Node> T cloneNode(T node) + { + if(node != null) + { + return (T) node.clone(); + } + + return null; + } + + @SuppressWarnings("unchecked") + protected <T extends Node> List<T> cloneList(List<T> list) + { + List<T> clone = new LinkedList<T>(); + + for(T n : list) + { + clone.add((T) n.clone()); + } + + return clone; + } +} diff --git a/src/lParser/node/PAdd.java b/src/lParser/node/PAdd.java new file mode 100644 index 0000000..26e4c0f --- /dev/null +++ b/src/lParser/node/PAdd.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PAdd extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PAnd.java b/src/lParser/node/PAnd.java new file mode 100644 index 0000000..3fac60c --- /dev/null +++ b/src/lParser/node/PAnd.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PAnd extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PAppelfnc.java b/src/lParser/node/PAppelfnc.java new file mode 100644 index 0000000..db41de0 --- /dev/null +++ b/src/lParser/node/PAppelfnc.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PAppelfnc extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PBloc.java b/src/lParser/node/PBloc.java new file mode 100644 index 0000000..44258bf --- /dev/null +++ b/src/lParser/node/PBloc.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PBloc extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PDecfonc.java b/src/lParser/node/PDecfonc.java new file mode 100644 index 0000000..60e0253 --- /dev/null +++ b/src/lParser/node/PDecfonc.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PDecfonc extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PDecvar.java b/src/lParser/node/PDecvar.java new file mode 100644 index 0000000..5aaec6b --- /dev/null +++ b/src/lParser/node/PDecvar.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PDecvar extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PE6.java b/src/lParser/node/PE6.java new file mode 100644 index 0000000..882b0ae --- /dev/null +++ b/src/lParser/node/PE6.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PE6 extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PEpsilon.java b/src/lParser/node/PEpsilon.java new file mode 100644 index 0000000..e71211c --- /dev/null +++ b/src/lParser/node/PEpsilon.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PEpsilon extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PEquals.java b/src/lParser/node/PEquals.java new file mode 100644 index 0000000..b56b5c1 --- /dev/null +++ b/src/lParser/node/PEquals.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PEquals extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PExp.java b/src/lParser/node/PExp.java new file mode 100644 index 0000000..eed09ef --- /dev/null +++ b/src/lParser/node/PExp.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PExp extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PIns.java b/src/lParser/node/PIns.java new file mode 100644 index 0000000..fb5acb1 --- /dev/null +++ b/src/lParser/node/PIns.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PIns extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PLdec.java b/src/lParser/node/PLdec.java new file mode 100644 index 0000000..0cf3ca8 --- /dev/null +++ b/src/lParser/node/PLdec.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PLdec extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PLdf.java b/src/lParser/node/PLdf.java new file mode 100644 index 0000000..f31fe61 --- /dev/null +++ b/src/lParser/node/PLdf.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PLdf extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PLe.java b/src/lParser/node/PLe.java new file mode 100644 index 0000000..0fed8af --- /dev/null +++ b/src/lParser/node/PLe.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PLe extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PLi.java b/src/lParser/node/PLi.java new file mode 100644 index 0000000..89fe1a4 --- /dev/null +++ b/src/lParser/node/PLi.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PLi extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PLse.java b/src/lParser/node/PLse.java new file mode 100644 index 0000000..1be4b5b --- /dev/null +++ b/src/lParser/node/PLse.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PLse extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PMult.java b/src/lParser/node/PMult.java new file mode 100644 index 0000000..3f06e60 --- /dev/null +++ b/src/lParser/node/PMult.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PMult extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PNeg.java b/src/lParser/node/PNeg.java new file mode 100644 index 0000000..a57a292 --- /dev/null +++ b/src/lParser/node/PNeg.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PNeg extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PProg.java b/src/lParser/node/PProg.java new file mode 100644 index 0000000..6c8e2bf --- /dev/null +++ b/src/lParser/node/PProg.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PProg extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PSuitedec.java b/src/lParser/node/PSuitedec.java new file mode 100644 index 0000000..dadfdad --- /dev/null +++ b/src/lParser/node/PSuitedec.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PSuitedec extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PType.java b/src/lParser/node/PType.java new file mode 100644 index 0000000..8b998ea --- /dev/null +++ b/src/lParser/node/PType.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PType extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PTypeopt.java b/src/lParser/node/PTypeopt.java new file mode 100644 index 0000000..cf73bdf --- /dev/null +++ b/src/lParser/node/PTypeopt.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PTypeopt extends Node +{ + // Empty body +} diff --git a/src/lParser/node/PVar.java b/src/lParser/node/PVar.java new file mode 100644 index 0000000..2520c98 --- /dev/null +++ b/src/lParser/node/PVar.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public abstract class PVar extends Node +{ + // Empty body +} diff --git a/src/lParser/node/Start.java b/src/lParser/node/Start.java new file mode 100644 index 0000000..c796717 --- /dev/null +++ b/src/lParser/node/Start.java @@ -0,0 +1,133 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class Start extends Node +{ + private PProg _pProg_; + private EOF _eof_; + + public Start() + { + // Empty body + } + + public Start( + @SuppressWarnings("hiding") PProg _pProg_, + @SuppressWarnings("hiding") EOF _eof_) + { + setPProg(_pProg_); + setEOF(_eof_); + } + + @Override + public Object clone() + { + return new Start( + cloneNode(this._pProg_), + cloneNode(this._eof_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseStart(this); + } + + public PProg getPProg() + { + return this._pProg_; + } + + public void setPProg(PProg node) + { + if(this._pProg_ != null) + { + this._pProg_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pProg_ = node; + } + + public EOF getEOF() + { + return this._eof_; + } + + public void setEOF(EOF node) + { + if(this._eof_ != null) + { + this._eof_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._eof_ = node; + } + + @Override + void removeChild(Node child) + { + if(this._pProg_ == child) + { + this._pProg_ = null; + return; + } + + if(this._eof_ == child) + { + this._eof_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(Node oldChild, Node newChild) + { + if(this._pProg_ == oldChild) + { + setPProg((PProg) newChild); + return; + } + + if(this._eof_ == oldChild) + { + setEOF((EOF) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + public String toString() + { + return "" + + toString(this._pProg_) + + toString(this._eof_); + } +} diff --git a/src/lParser/node/Switch.java b/src/lParser/node/Switch.java new file mode 100644 index 0000000..d8541aa --- /dev/null +++ b/src/lParser/node/Switch.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public interface Switch +{ + // Empty body +} diff --git a/src/lParser/node/Switchable.java b/src/lParser/node/Switchable.java new file mode 100644 index 0000000..7d63181 --- /dev/null +++ b/src/lParser/node/Switchable.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +public interface Switchable +{ + void apply(Switch sw); +} diff --git a/src/lParser/node/TAccoladed.java b/src/lParser/node/TAccoladed.java new file mode 100644 index 0000000..961a6e4 --- /dev/null +++ b/src/lParser/node/TAccoladed.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TAccoladed extends Token +{ + public TAccoladed() + { + super.setText("}"); + } + + public TAccoladed(int line, int pos) + { + super.setText("}"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TAccoladed(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTAccoladed(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TAccoladed text."); + } +} diff --git a/src/lParser/node/TAccoladeg.java b/src/lParser/node/TAccoladeg.java new file mode 100644 index 0000000..77b3d15 --- /dev/null +++ b/src/lParser/node/TAccoladeg.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TAccoladeg extends Token +{ + public TAccoladeg() + { + super.setText("{"); + } + + public TAccoladeg(int line, int pos) + { + super.setText("{"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TAccoladeg(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTAccoladeg(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TAccoladeg text."); + } +} diff --git a/src/lParser/node/TAlors.java b/src/lParser/node/TAlors.java new file mode 100644 index 0000000..4428ffc --- /dev/null +++ b/src/lParser/node/TAlors.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TAlors extends Token +{ + public TAlors() + { + super.setText("alors"); + } + + public TAlors(int line, int pos) + { + super.setText("alors"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TAlors(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTAlors(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TAlors text."); + } +} diff --git a/src/lParser/node/TBool.java b/src/lParser/node/TBool.java new file mode 100644 index 0000000..3f5f88b --- /dev/null +++ b/src/lParser/node/TBool.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TBool extends Token +{ + public TBool() + { + super.setText("bool"); + } + + public TBool(int line, int pos) + { + super.setText("bool"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TBool(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTBool(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TBool text."); + } +} diff --git a/src/lParser/node/TCommentaire.java b/src/lParser/node/TCommentaire.java new file mode 100644 index 0000000..a78c245 --- /dev/null +++ b/src/lParser/node/TCommentaire.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TCommentaire extends Token +{ + public TCommentaire(String text) + { + setText(text); + } + + public TCommentaire(String text, int line, int pos) + { + setText(text); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TCommentaire(getText(), getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTCommentaire(this); + } +} diff --git a/src/lParser/node/TCrochetd.java b/src/lParser/node/TCrochetd.java new file mode 100644 index 0000000..a32bffd --- /dev/null +++ b/src/lParser/node/TCrochetd.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TCrochetd extends Token +{ + public TCrochetd() + { + super.setText("]"); + } + + public TCrochetd(int line, int pos) + { + super.setText("]"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TCrochetd(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTCrochetd(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TCrochetd text."); + } +} diff --git a/src/lParser/node/TCrochetg.java b/src/lParser/node/TCrochetg.java new file mode 100644 index 0000000..da68141 --- /dev/null +++ b/src/lParser/node/TCrochetg.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TCrochetg extends Token +{ + public TCrochetg() + { + super.setText("["); + } + + public TCrochetg(int line, int pos) + { + super.setText("["); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TCrochetg(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTCrochetg(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TCrochetg text."); + } +} diff --git a/src/lParser/node/TDiviser.java b/src/lParser/node/TDiviser.java new file mode 100644 index 0000000..cd5321f --- /dev/null +++ b/src/lParser/node/TDiviser.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TDiviser extends Token +{ + public TDiviser() + { + super.setText("/"); + } + + public TDiviser(int line, int pos) + { + super.setText("/"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TDiviser(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTDiviser(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TDiviser text."); + } +} diff --git a/src/lParser/node/TDparenthese.java b/src/lParser/node/TDparenthese.java new file mode 100644 index 0000000..096c936 --- /dev/null +++ b/src/lParser/node/TDparenthese.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TDparenthese extends Token +{ + public TDparenthese() + { + super.setText(")"); + } + + public TDparenthese(int line, int pos) + { + super.setText(")"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TDparenthese(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTDparenthese(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TDparenthese text."); + } +} diff --git a/src/lParser/node/TEcrire.java b/src/lParser/node/TEcrire.java new file mode 100644 index 0000000..6e1d523 --- /dev/null +++ b/src/lParser/node/TEcrire.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TEcrire extends Token +{ + public TEcrire() + { + super.setText("ecrire"); + } + + public TEcrire(int line, int pos) + { + super.setText("ecrire"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TEcrire(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTEcrire(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TEcrire text."); + } +} diff --git a/src/lParser/node/TEgale.java b/src/lParser/node/TEgale.java new file mode 100644 index 0000000..defbd0c --- /dev/null +++ b/src/lParser/node/TEgale.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TEgale extends Token +{ + public TEgale() + { + super.setText("="); + } + + public TEgale(int line, int pos) + { + super.setText("="); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TEgale(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTEgale(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TEgale text."); + } +} diff --git a/src/lParser/node/TEntier.java b/src/lParser/node/TEntier.java new file mode 100644 index 0000000..d21a0f9 --- /dev/null +++ b/src/lParser/node/TEntier.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TEntier extends Token +{ + public TEntier() + { + super.setText("entier"); + } + + public TEntier(int line, int pos) + { + super.setText("entier"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TEntier(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTEntier(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TEntier text."); + } +} diff --git a/src/lParser/node/TEspaces.java b/src/lParser/node/TEspaces.java new file mode 100644 index 0000000..d1e9886 --- /dev/null +++ b/src/lParser/node/TEspaces.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TEspaces extends Token +{ + public TEspaces(String text) + { + setText(text); + } + + public TEspaces(String text, int line, int pos) + { + setText(text); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TEspaces(getText(), getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTEspaces(this); + } +} diff --git a/src/lParser/node/TEt.java b/src/lParser/node/TEt.java new file mode 100644 index 0000000..6b7b501 --- /dev/null +++ b/src/lParser/node/TEt.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TEt extends Token +{ + public TEt() + { + super.setText("&"); + } + + public TEt(int line, int pos) + { + super.setText("&"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TEt(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTEt(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TEt text."); + } +} diff --git a/src/lParser/node/TFaire.java b/src/lParser/node/TFaire.java new file mode 100644 index 0000000..38b1da4 --- /dev/null +++ b/src/lParser/node/TFaire.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TFaire extends Token +{ + public TFaire() + { + super.setText("faire"); + } + + public TFaire(int line, int pos) + { + super.setText("faire"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TFaire(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTFaire(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TFaire text."); + } +} diff --git a/src/lParser/node/TFaux.java b/src/lParser/node/TFaux.java new file mode 100644 index 0000000..01fc05e --- /dev/null +++ b/src/lParser/node/TFaux.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TFaux extends Token +{ + public TFaux() + { + super.setText("faux"); + } + + public TFaux(int line, int pos) + { + super.setText("faux"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TFaux(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTFaux(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TFaux text."); + } +} diff --git a/src/lParser/node/TFois.java b/src/lParser/node/TFois.java new file mode 100644 index 0000000..c8d8bbc --- /dev/null +++ b/src/lParser/node/TFois.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TFois extends Token +{ + public TFois() + { + super.setText("*"); + } + + public TFois(int line, int pos) + { + super.setText("*"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TFois(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTFois(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TFois text."); + } +} diff --git a/src/lParser/node/TGparenthese.java b/src/lParser/node/TGparenthese.java new file mode 100644 index 0000000..880c3ff --- /dev/null +++ b/src/lParser/node/TGparenthese.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TGparenthese extends Token +{ + public TGparenthese() + { + super.setText("("); + } + + public TGparenthese(int line, int pos) + { + super.setText("("); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TGparenthese(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTGparenthese(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TGparenthese text."); + } +} diff --git a/src/lParser/node/TId.java b/src/lParser/node/TId.java new file mode 100644 index 0000000..ca5488a --- /dev/null +++ b/src/lParser/node/TId.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TId extends Token +{ + public TId(String text) + { + setText(text); + } + + public TId(String text, int line, int pos) + { + setText(text); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TId(getText(), getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTId(this); + } +} diff --git a/src/lParser/node/TInf.java b/src/lParser/node/TInf.java new file mode 100644 index 0000000..7214173 --- /dev/null +++ b/src/lParser/node/TInf.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TInf extends Token +{ + public TInf() + { + super.setText("<"); + } + + public TInf(int line, int pos) + { + super.setText("<"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TInf(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTInf(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TInf text."); + } +} diff --git a/src/lParser/node/TLire.java b/src/lParser/node/TLire.java new file mode 100644 index 0000000..b582be4 --- /dev/null +++ b/src/lParser/node/TLire.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TLire extends Token +{ + public TLire() + { + super.setText("lire"); + } + + public TLire(int line, int pos) + { + super.setText("lire"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TLire(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTLire(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TLire text."); + } +} diff --git a/src/lParser/node/TMoins.java b/src/lParser/node/TMoins.java new file mode 100644 index 0000000..937ca3e --- /dev/null +++ b/src/lParser/node/TMoins.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TMoins extends Token +{ + public TMoins() + { + super.setText("-"); + } + + public TMoins(int line, int pos) + { + super.setText("-"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TMoins(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTMoins(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TMoins text."); + } +} diff --git a/src/lParser/node/TNombre.java b/src/lParser/node/TNombre.java new file mode 100644 index 0000000..423fb65 --- /dev/null +++ b/src/lParser/node/TNombre.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TNombre extends Token +{ + public TNombre(String text) + { + setText(text); + } + + public TNombre(String text, int line, int pos) + { + setText(text); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TNombre(getText(), getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTNombre(this); + } +} diff --git a/src/lParser/node/TNon.java b/src/lParser/node/TNon.java new file mode 100644 index 0000000..c9b8c8c --- /dev/null +++ b/src/lParser/node/TNon.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TNon extends Token +{ + public TNon() + { + super.setText("!"); + } + + public TNon(int line, int pos) + { + super.setText("!"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TNon(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTNon(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TNon text."); + } +} diff --git a/src/lParser/node/TOu.java b/src/lParser/node/TOu.java new file mode 100644 index 0000000..030e911 --- /dev/null +++ b/src/lParser/node/TOu.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TOu extends Token +{ + public TOu() + { + super.setText("|"); + } + + public TOu(int line, int pos) + { + super.setText("|"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TOu(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTOu(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TOu text."); + } +} diff --git a/src/lParser/node/TPlus.java b/src/lParser/node/TPlus.java new file mode 100644 index 0000000..088ee9d --- /dev/null +++ b/src/lParser/node/TPlus.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TPlus extends Token +{ + public TPlus() + { + super.setText("+"); + } + + public TPlus(int line, int pos) + { + super.setText("+"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TPlus(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTPlus(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TPlus text."); + } +} diff --git a/src/lParser/node/TPointvirgule.java b/src/lParser/node/TPointvirgule.java new file mode 100644 index 0000000..27989dd --- /dev/null +++ b/src/lParser/node/TPointvirgule.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TPointvirgule extends Token +{ + public TPointvirgule() + { + super.setText(";"); + } + + public TPointvirgule(int line, int pos) + { + super.setText(";"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TPointvirgule(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTPointvirgule(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TPointvirgule text."); + } +} diff --git a/src/lParser/node/TRetourner.java b/src/lParser/node/TRetourner.java new file mode 100644 index 0000000..8ddcbce --- /dev/null +++ b/src/lParser/node/TRetourner.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TRetourner extends Token +{ + public TRetourner() + { + super.setText("retour"); + } + + public TRetourner(int line, int pos) + { + super.setText("retour"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TRetourner(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTRetourner(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TRetourner text."); + } +} diff --git a/src/lParser/node/TSi.java b/src/lParser/node/TSi.java new file mode 100644 index 0000000..e6430af --- /dev/null +++ b/src/lParser/node/TSi.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSi extends Token +{ + public TSi() + { + super.setText("si"); + } + + public TSi(int line, int pos) + { + super.setText("si"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSi(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSi(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSi text."); + } +} diff --git a/src/lParser/node/TSinon.java b/src/lParser/node/TSinon.java new file mode 100644 index 0000000..4f035ab --- /dev/null +++ b/src/lParser/node/TSinon.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSinon extends Token +{ + public TSinon() + { + super.setText("sinon"); + } + + public TSinon(int line, int pos) + { + super.setText("sinon"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSinon(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSinon(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSinon text."); + } +} diff --git a/src/lParser/node/TTantque.java b/src/lParser/node/TTantque.java new file mode 100644 index 0000000..b8b92be --- /dev/null +++ b/src/lParser/node/TTantque.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TTantque extends Token +{ + public TTantque() + { + super.setText("tantque"); + } + + public TTantque(int line, int pos) + { + super.setText("tantque"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TTantque(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTTantque(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TTantque text."); + } +} diff --git a/src/lParser/node/TVirgule.java b/src/lParser/node/TVirgule.java new file mode 100644 index 0000000..d72c9d5 --- /dev/null +++ b/src/lParser/node/TVirgule.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TVirgule extends Token +{ + public TVirgule() + { + super.setText(","); + } + + public TVirgule(int line, int pos) + { + super.setText(","); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TVirgule(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTVirgule(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TVirgule text."); + } +} diff --git a/src/lParser/node/TVrai.java b/src/lParser/node/TVrai.java new file mode 100644 index 0000000..51103c3 --- /dev/null +++ b/src/lParser/node/TVrai.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +import lParser.analysis.*; + +@SuppressWarnings("nls") +public final class TVrai extends Token +{ + public TVrai() + { + super.setText("vrai"); + } + + public TVrai(int line, int pos) + { + super.setText("vrai"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TVrai(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTVrai(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TVrai text."); + } +} diff --git a/src/lParser/node/Token.java b/src/lParser/node/Token.java new file mode 100644 index 0000000..c18729b --- /dev/null +++ b/src/lParser/node/Token.java @@ -0,0 +1,59 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.node; + +@SuppressWarnings("nls") +public abstract class Token extends Node +{ + private String text; + private int line; + private int pos; + + public String getText() + { + return this.text; + } + + public void setText(@SuppressWarnings("hiding") String text) + { + this.text = text; + } + + public int getLine() + { + return this.line; + } + + public void setLine(@SuppressWarnings("hiding") int line) + { + this.line = line; + } + + public int getPos() + { + return this.pos; + } + + public void setPos(@SuppressWarnings("hiding") int pos) + { + this.pos = pos; + } + + @Override + public String toString() + { + return this.text + " "; + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + throw new RuntimeException("Not a child."); + } +} diff --git a/src/lParser/parser/Parser.java b/src/lParser/parser/Parser.java new file mode 100644 index 0000000..88d8ac5 --- /dev/null +++ b/src/lParser/parser/Parser.java @@ -0,0 +1,2503 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.parser; + +import lParser.lexer.*; +import lParser.node.*; +import lParser.analysis.*; +import java.util.*; + +import java.io.DataInputStream; +import java.io.BufferedInputStream; +import java.io.IOException; + +@SuppressWarnings("nls") +public class Parser +{ + public final Analysis ignoredTokens = new AnalysisAdapter(); + + protected ArrayList<Object> nodeList; + + private final Lexer lexer; + private final ListIterator<Object> stack = new LinkedList<Object>().listIterator(); + private int last_pos; + private int last_line; + private Token last_token; + private final TokenIndex converter = new TokenIndex(); + private final int[] action = new int[2]; + + private final static int SHIFT = 0; + private final static int REDUCE = 1; + private final static int ACCEPT = 2; + private final static int ERROR = 3; + + public Parser(@SuppressWarnings("hiding") Lexer lexer) + { + this.lexer = lexer; + } + + @SuppressWarnings({"unchecked","unused"}) + private void push(int numstate, ArrayList<Object> listNode) throws ParserException, LexerException, IOException + { + this.nodeList = listNode; + + if(!this.stack.hasNext()) + { + this.stack.add(new State(numstate, this.nodeList)); + return; + } + + State s = (State) this.stack.next(); + s.state = numstate; + s.nodes = this.nodeList; + } + + private int goTo(int index) + { + int state = state(); + int low = 1; + int high = gotoTable[index].length - 1; + int value = gotoTable[index][0][1]; + + while(low <= high) + { + // int middle = (low + high) / 2; + int middle = (low + high) >>> 1; + + if(state < gotoTable[index][middle][0]) + { + high = middle - 1; + } + else if(state > gotoTable[index][middle][0]) + { + low = middle + 1; + } + else + { + value = gotoTable[index][middle][1]; + break; + } + } + + return value; + } + + private int state() + { + State s = (State) this.stack.previous(); + this.stack.next(); + return s.state; + } + + private ArrayList<Object> pop() + { + return ((State) this.stack.previous()).nodes; + } + + private int index(Switchable token) + { + this.converter.index = -1; + token.apply(this.converter); + return this.converter.index; + } + + @SuppressWarnings("unchecked") + public Start parse() throws ParserException, LexerException, IOException + { + push(0, null); + List<Node> ign = null; + while(true) + { + while(index(this.lexer.peek()) == -1) + { + if(ign == null) + { + ign = new LinkedList<Node>(); + } + + ign.add(this.lexer.next()); + } + + if(ign != null) + { + this.ignoredTokens.setIn(this.lexer.peek(), ign); + ign = null; + } + + this.last_pos = this.lexer.peek().getPos(); + this.last_line = this.lexer.peek().getLine(); + this.last_token = this.lexer.peek(); + + int index = index(this.lexer.peek()); + this.action[0] = Parser.actionTable[state()][0][1]; + this.action[1] = Parser.actionTable[state()][0][2]; + + int low = 1; + int high = Parser.actionTable[state()].length - 1; + + while(low <= high) + { + int middle = (low + high) / 2; + + if(index < Parser.actionTable[state()][middle][0]) + { + high = middle - 1; + } + else if(index > Parser.actionTable[state()][middle][0]) + { + low = middle + 1; + } + else + { + this.action[0] = Parser.actionTable[state()][middle][1]; + this.action[1] = Parser.actionTable[state()][middle][2]; + break; + } + } + + switch(this.action[0]) + { + case SHIFT: + { + ArrayList<Object> list = new ArrayList<Object>(); + list.add(this.lexer.next()); + push(this.action[1], list); + } + break; + case REDUCE: + { + int reduction = this.action[1]; + if(reduction < 500) reduce_0(reduction); + } + break; + case ACCEPT: + { + EOF node2 = (EOF) this.lexer.next(); + PProg node1 = (PProg) pop().get(0); + Start node = new Start(node1, node2); + return node; + } + case ERROR: + throw new ParserException(this.last_token, + "[" + this.last_line + "," + this.last_pos + "] " + + Parser.errorMessages[Parser.errors[this.action[1]]]); + } + } + } + + private void reduce_0(int reduction) throws IOException, LexerException, ParserException + { + switch(reduction) + { + case 0: /* reduce ALstdeclacvar1Prog */ + { + ArrayList<Object> list = new0(); + push(goTo(0), list); + } + break; + case 1: /* reduce A11Prog */ + { + ArrayList<Object> list = new1(); + push(goTo(0), list); + } + break; + case 2: /* reduce AOrExp */ + { + ArrayList<Object> list = new2(); + push(goTo(1), list); + } + break; + case 3: /* reduce AAndExp */ + { + ArrayList<Object> list = new3(); + push(goTo(1), list); + } + break; + case 4: /* reduce AEtAnd */ + { + ArrayList<Object> list = new4(); + push(goTo(2), list); + } + break; + case 5: /* reduce AEqualsAnd */ + { + ArrayList<Object> list = new5(); + push(goTo(2), list); + } + break; + case 6: /* reduce AEgaleEquals */ + { + ArrayList<Object> list = new6(); + push(goTo(3), list); + } + break; + case 7: /* reduce AInfEquals */ + { + ArrayList<Object> list = new7(); + push(goTo(3), list); + } + break; + case 8: /* reduce AAddEquals */ + { + ArrayList<Object> list = new8(); + push(goTo(3), list); + } + break; + case 9: /* reduce APlusAdd */ + { + ArrayList<Object> list = new9(); + push(goTo(4), list); + } + break; + case 10: /* reduce AMoinsAdd */ + { + ArrayList<Object> list = new10(); + push(goTo(4), list); + } + break; + case 11: /* reduce AMultAdd */ + { + ArrayList<Object> list = new11(); + push(goTo(4), list); + } + break; + case 12: /* reduce AFoisMult */ + { + ArrayList<Object> list = new12(); + push(goTo(5), list); + } + break; + case 13: /* reduce ADiviserMult */ + { + ArrayList<Object> list = new13(); + push(goTo(5), list); + } + break; + case 14: /* reduce ANegMult */ + { + ArrayList<Object> list = new14(); + push(goTo(5), list); + } + break; + case 15: /* reduce ANonNeg */ + { + ArrayList<Object> list = new15(); + push(goTo(6), list); + } + break; + case 16: /* reduce AE6Neg */ + { + ArrayList<Object> list = new16(); + push(goTo(6), list); + } + break; + case 17: /* reduce AParentheseE6 */ + { + ArrayList<Object> list = new17(); + push(goTo(7), list); + } + break; + case 18: /* reduce ANombreE6 */ + { + ArrayList<Object> list = new18(); + push(goTo(7), list); + } + break; + case 19: /* reduce AVraiE6 */ + { + ArrayList<Object> list = new19(); + push(goTo(7), list); + } + break; + case 20: /* reduce AFauxE6 */ + { + ArrayList<Object> list = new20(); + push(goTo(7), list); + } + break; + case 21: /* reduce ALireE6 */ + { + ArrayList<Object> list = new21(); + push(goTo(7), list); + } + break; + case 22: /* reduce AVarE6 */ + { + ArrayList<Object> list = new22(); + push(goTo(7), list); + } + break; + case 23: /* reduce AAppelfncE6 */ + { + ArrayList<Object> list = new23(); + push(goTo(7), list); + } + break; + case 24: /* reduce AAffectationIns */ + { + ArrayList<Object> list = new24(); + push(goTo(8), list); + } + break; + case 25: /* reduce ATqIns */ + { + ArrayList<Object> list = new25(); + push(goTo(8), list); + } + break; + case 26: /* reduce ASiIns */ + { + ArrayList<Object> list = new26(); + push(goTo(8), list); + } + break; + case 27: /* reduce ASisinonIns */ + { + ArrayList<Object> list = new27(); + push(goTo(8), list); + } + break; + case 28: /* reduce AReturnIns */ + { + ArrayList<Object> list = new28(); + push(goTo(8), list); + } + break; + case 29: /* reduce AWriteIns */ + { + ArrayList<Object> list = new29(); + push(goTo(8), list); + } + break; + case 30: /* reduce AAppelfncIns */ + { + ArrayList<Object> list = new30(); + push(goTo(8), list); + } + break; + case 31: /* reduce AInstrBloc */ + { + ArrayList<Object> list = new31(); + push(goTo(9), list); + } + break; + case 32: /* reduce AListeinstrLi */ + { + ArrayList<Object> list = new32(); + push(goTo(10), list); + } + break; + case 33: /* reduce AEpsilon$1Li */ + { + ArrayList<Object> list = new33(); + push(goTo(10), list); + } + break; + case 34: /* reduce AExprLe */ + { + ArrayList<Object> list = new34(); + push(goTo(11), list); + } + break; + case 35: /* reduce AEpsilon$1Le */ + { + ArrayList<Object> list = new35(); + push(goTo(11), list); + } + break; + case 36: /* reduce ALstexprLse */ + { + ArrayList<Object> list = new36(); + push(goTo(12), list); + } + break; + case 37: /* reduce AEpsilon$1Lse */ + { + ArrayList<Object> list = new37(); + push(goTo(12), list); + } + break; + case 38: /* reduce AIdVar */ + { + ArrayList<Object> list = new38(); + push(goTo(13), list); + } + break; + case 39: /* reduce AIdCrochetVar */ + { + ArrayList<Object> list = new39(); + push(goTo(13), list); + } + break; + case 40: /* reduce ADeclavariableDecvar */ + { + ArrayList<Object> list = new40(); + push(goTo(14), list); + } + break; + case 41: /* reduce ADecvar */ + { + ArrayList<Object> list = new41(); + push(goTo(14), list); + } + break; + case 42: /* reduce ATypeType */ + { + ArrayList<Object> list = new42(); + push(goTo(15), list); + } + break; + case 43: /* reduce AType */ + { + ArrayList<Object> list = new43(); + push(goTo(15), list); + } + break; + case 44: /* reduce ADeclafonc$Lstdeclacvar1$Lstdeclacvar2$Typeopt1Decfonc */ + { + ArrayList<Object> list = new44(); + push(goTo(16), list); + } + break; + case 45: /* reduce ADeclafonc$Lstdeclacvar1$Lstdeclacvar2$11Decfonc */ + { + ArrayList<Object> list = new45(); + push(goTo(16), list); + } + break; + case 46: /* reduce ADeclafonc$Lstdeclacvar1$12$Typeopt1Decfonc */ + { + ArrayList<Object> list = new46(); + push(goTo(16), list); + } + break; + case 47: /* reduce ADeclafonc$Lstdeclacvar1$12$11Decfonc */ + { + ArrayList<Object> list = new47(); + push(goTo(16), list); + } + break; + case 48: /* reduce ADeclafonc$11$Lstdeclacvar2$Typeopt1Decfonc */ + { + ArrayList<Object> list = new48(); + push(goTo(16), list); + } + break; + case 49: /* reduce ADeclafonc$11$Lstdeclacvar2$11Decfonc */ + { + ArrayList<Object> list = new49(); + push(goTo(16), list); + } + break; + case 50: /* reduce ADeclafonc$11$12$Typeopt1Decfonc */ + { + ArrayList<Object> list = new50(); + push(goTo(16), list); + } + break; + case 51: /* reduce ADeclafonc$11$12$11Decfonc */ + { + ArrayList<Object> list = new51(); + push(goTo(16), list); + } + break; + case 52: /* reduce ASuitedeclvarSuitedec */ + { + ArrayList<Object> list = new52(); + push(goTo(17), list); + } + break; + case 53: /* reduce A1Suitedec */ + { + ArrayList<Object> list = new53(); + push(goTo(17), list); + } + break; + case 54: /* reduce ALstdecfncLdf */ + { + ArrayList<Object> list = new54(); + push(goTo(18), list); + } + break; + case 55: /* reduce A1Ldf */ + { + ArrayList<Object> list = new55(); + push(goTo(18), list); + } + break; + } + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new0() /* reduce ALstdeclacvar1Prog */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PProg pprogNode1; + { + // Block + PLdec pldecNode2; + PLdf pldfNode5; + { + // Block + PDecvar pdecvarNode3; + PSuitedec psuitedecNode4; + pdecvarNode3 = (PDecvar)nodeArrayList1.get(0); + psuitedecNode4 = (PSuitedec)nodeArrayList2.get(0); + + pldecNode2 = new ALstdeclacvarLdec(pdecvarNode3, psuitedecNode4); + } + pldfNode5 = (PLdf)nodeArrayList3.get(0); + + pprogNode1 = new AProg(pldecNode2, pldfNode5); + } + nodeList.add(pprogNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new1() /* reduce A11Prog */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PProg pprogNode1; + { + // Block + PLdec pldecNode2; + PLdf pldfNode4; + { + // Block + PEpsilon pepsilonNode3; + { + // Block + + pepsilonNode3 = new AEpsilon(); + } + + pldecNode2 = new ALdec(pepsilonNode3); + } + pldfNode4 = (PLdf)nodeArrayList1.get(0); + + pprogNode1 = new AProg(pldecNode2, pldfNode4); + } + nodeList.add(pprogNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new2() /* reduce AOrExp */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PExp pexpNode1; + { + // Block + PExp pexpNode2; + TOu touNode3; + PAnd pandNode4; + pexpNode2 = (PExp)nodeArrayList1.get(0); + touNode3 = (TOu)nodeArrayList2.get(0); + pandNode4 = (PAnd)nodeArrayList3.get(0); + + pexpNode1 = new AOrExp(pexpNode2, touNode3, pandNode4); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new3() /* reduce AAndExp */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PExp pexpNode1; + { + // Block + PAnd pandNode2; + pandNode2 = (PAnd)nodeArrayList1.get(0); + + pexpNode1 = new AAndExp(pandNode2); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new4() /* reduce AEtAnd */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PAnd pandNode1; + { + // Block + PAnd pandNode2; + TEt tetNode3; + PEquals pequalsNode4; + pandNode2 = (PAnd)nodeArrayList1.get(0); + tetNode3 = (TEt)nodeArrayList2.get(0); + pequalsNode4 = (PEquals)nodeArrayList3.get(0); + + pandNode1 = new AEtAnd(pandNode2, tetNode3, pequalsNode4); + } + nodeList.add(pandNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new5() /* reduce AEqualsAnd */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PAnd pandNode1; + { + // Block + PEquals pequalsNode2; + pequalsNode2 = (PEquals)nodeArrayList1.get(0); + + pandNode1 = new AEqualsAnd(pequalsNode2); + } + nodeList.add(pandNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new6() /* reduce AEgaleEquals */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PEquals pequalsNode1; + { + // Block + PEquals pequalsNode2; + TEgale tegaleNode3; + PAdd paddNode4; + pequalsNode2 = (PEquals)nodeArrayList1.get(0); + tegaleNode3 = (TEgale)nodeArrayList2.get(0); + paddNode4 = (PAdd)nodeArrayList3.get(0); + + pequalsNode1 = new AEgaleEquals(pequalsNode2, tegaleNode3, paddNode4); + } + nodeList.add(pequalsNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new7() /* reduce AInfEquals */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PEquals pequalsNode1; + { + // Block + PEquals pequalsNode2; + TInf tinfNode3; + PAdd paddNode4; + pequalsNode2 = (PEquals)nodeArrayList1.get(0); + tinfNode3 = (TInf)nodeArrayList2.get(0); + paddNode4 = (PAdd)nodeArrayList3.get(0); + + pequalsNode1 = new AInfEquals(pequalsNode2, tinfNode3, paddNode4); + } + nodeList.add(pequalsNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new8() /* reduce AAddEquals */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PEquals pequalsNode1; + { + // Block + PAdd paddNode2; + paddNode2 = (PAdd)nodeArrayList1.get(0); + + pequalsNode1 = new AAddEquals(paddNode2); + } + nodeList.add(pequalsNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new9() /* reduce APlusAdd */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PAdd paddNode1; + { + // Block + PAdd paddNode2; + TPlus tplusNode3; + PMult pmultNode4; + paddNode2 = (PAdd)nodeArrayList1.get(0); + tplusNode3 = (TPlus)nodeArrayList2.get(0); + pmultNode4 = (PMult)nodeArrayList3.get(0); + + paddNode1 = new APlusAdd(paddNode2, tplusNode3, pmultNode4); + } + nodeList.add(paddNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new10() /* reduce AMoinsAdd */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PAdd paddNode1; + { + // Block + PAdd paddNode2; + TMoins tmoinsNode3; + PMult pmultNode4; + paddNode2 = (PAdd)nodeArrayList1.get(0); + tmoinsNode3 = (TMoins)nodeArrayList2.get(0); + pmultNode4 = (PMult)nodeArrayList3.get(0); + + paddNode1 = new AMoinsAdd(paddNode2, tmoinsNode3, pmultNode4); + } + nodeList.add(paddNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new11() /* reduce AMultAdd */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PAdd paddNode1; + { + // Block + PMult pmultNode2; + pmultNode2 = (PMult)nodeArrayList1.get(0); + + paddNode1 = new AMultAdd(pmultNode2); + } + nodeList.add(paddNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new12() /* reduce AFoisMult */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PMult pmultNode1; + { + // Block + PMult pmultNode2; + TFois tfoisNode3; + PNeg pnegNode4; + pmultNode2 = (PMult)nodeArrayList1.get(0); + tfoisNode3 = (TFois)nodeArrayList2.get(0); + pnegNode4 = (PNeg)nodeArrayList3.get(0); + + pmultNode1 = new AFoisMult(pmultNode2, tfoisNode3, pnegNode4); + } + nodeList.add(pmultNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new13() /* reduce ADiviserMult */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PMult pmultNode1; + { + // Block + PMult pmultNode2; + TDiviser tdiviserNode3; + PNeg pnegNode4; + pmultNode2 = (PMult)nodeArrayList1.get(0); + tdiviserNode3 = (TDiviser)nodeArrayList2.get(0); + pnegNode4 = (PNeg)nodeArrayList3.get(0); + + pmultNode1 = new ADiviserMult(pmultNode2, tdiviserNode3, pnegNode4); + } + nodeList.add(pmultNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new14() /* reduce ANegMult */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PMult pmultNode1; + { + // Block + PNeg pnegNode2; + pnegNode2 = (PNeg)nodeArrayList1.get(0); + + pmultNode1 = new ANegMult(pnegNode2); + } + nodeList.add(pmultNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new15() /* reduce ANonNeg */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PNeg pnegNode1; + { + // Block + TNon tnonNode2; + PNeg pnegNode3; + tnonNode2 = (TNon)nodeArrayList1.get(0); + pnegNode3 = (PNeg)nodeArrayList2.get(0); + + pnegNode1 = new ANonNeg(tnonNode2, pnegNode3); + } + nodeList.add(pnegNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new16() /* reduce AE6Neg */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PNeg pnegNode1; + { + // Block + PE6 pe6Node2; + pe6Node2 = (PE6)nodeArrayList1.get(0); + + pnegNode1 = new AE6Neg(pe6Node2); + } + nodeList.add(pnegNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new17() /* reduce AParentheseE6 */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PE6 pe6Node1; + { + // Block + TGparenthese tgparentheseNode2; + PExp pexpNode3; + TDparenthese tdparentheseNode4; + tgparentheseNode2 = (TGparenthese)nodeArrayList1.get(0); + pexpNode3 = (PExp)nodeArrayList2.get(0); + tdparentheseNode4 = (TDparenthese)nodeArrayList3.get(0); + + pe6Node1 = new AParentheseE6(tgparentheseNode2, pexpNode3, tdparentheseNode4); + } + nodeList.add(pe6Node1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new18() /* reduce ANombreE6 */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PE6 pe6Node1; + { + // Block + TNombre tnombreNode2; + tnombreNode2 = (TNombre)nodeArrayList1.get(0); + + pe6Node1 = new ANombreE6(tnombreNode2); + } + nodeList.add(pe6Node1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new19() /* reduce AVraiE6 */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PE6 pe6Node1; + { + // Block + TVrai tvraiNode2; + tvraiNode2 = (TVrai)nodeArrayList1.get(0); + + pe6Node1 = new AVraiE6(tvraiNode2); + } + nodeList.add(pe6Node1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new20() /* reduce AFauxE6 */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PE6 pe6Node1; + { + // Block + TFaux tfauxNode2; + tfauxNode2 = (TFaux)nodeArrayList1.get(0); + + pe6Node1 = new AFauxE6(tfauxNode2); + } + nodeList.add(pe6Node1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new21() /* reduce ALireE6 */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PE6 pe6Node1; + { + // Block + TLire tlireNode2; + TGparenthese tgparentheseNode3; + TDparenthese tdparentheseNode4; + tlireNode2 = (TLire)nodeArrayList1.get(0); + tgparentheseNode3 = (TGparenthese)nodeArrayList2.get(0); + tdparentheseNode4 = (TDparenthese)nodeArrayList3.get(0); + + pe6Node1 = new ALireE6(tlireNode2, tgparentheseNode3, tdparentheseNode4); + } + nodeList.add(pe6Node1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new22() /* reduce AVarE6 */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PE6 pe6Node1; + { + // Block + PVar pvarNode2; + pvarNode2 = (PVar)nodeArrayList1.get(0); + + pe6Node1 = new AVarE6(pvarNode2); + } + nodeList.add(pe6Node1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new23() /* reduce AAppelfncE6 */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PE6 pe6Node1; + { + // Block + TId tidNode2; + TGparenthese tgparentheseNode3; + PLe pleNode4; + TDparenthese tdparentheseNode5; + tidNode2 = (TId)nodeArrayList1.get(0); + tgparentheseNode3 = (TGparenthese)nodeArrayList2.get(0); + pleNode4 = (PLe)nodeArrayList3.get(0); + tdparentheseNode5 = (TDparenthese)nodeArrayList4.get(0); + + pe6Node1 = new AAppelfncE6(tidNode2, tgparentheseNode3, pleNode4, tdparentheseNode5); + } + nodeList.add(pe6Node1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new24() /* reduce AAffectationIns */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PIns pinsNode1; + { + // Block + PVar pvarNode2; + TEgale tegaleNode3; + PExp pexpNode4; + TPointvirgule tpointvirguleNode5; + pvarNode2 = (PVar)nodeArrayList1.get(0); + tegaleNode3 = (TEgale)nodeArrayList2.get(0); + pexpNode4 = (PExp)nodeArrayList3.get(0); + tpointvirguleNode5 = (TPointvirgule)nodeArrayList4.get(0); + + pinsNode1 = new AAffectationIns(pvarNode2, tegaleNode3, pexpNode4, tpointvirguleNode5); + } + nodeList.add(pinsNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new25() /* reduce ATqIns */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PIns pinsNode1; + { + // Block + TTantque ttantqueNode2; + PExp pexpNode3; + TFaire tfaireNode4; + PBloc pblocNode5; + ttantqueNode2 = (TTantque)nodeArrayList1.get(0); + pexpNode3 = (PExp)nodeArrayList2.get(0); + tfaireNode4 = (TFaire)nodeArrayList3.get(0); + pblocNode5 = (PBloc)nodeArrayList4.get(0); + + pinsNode1 = new ATqIns(ttantqueNode2, pexpNode3, tfaireNode4, pblocNode5); + } + nodeList.add(pinsNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new26() /* reduce ASiIns */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PIns pinsNode1; + { + // Block + TSi tsiNode2; + PExp pexpNode3; + TAlors talorsNode4; + PBloc pblocNode5; + tsiNode2 = (TSi)nodeArrayList1.get(0); + pexpNode3 = (PExp)nodeArrayList2.get(0); + talorsNode4 = (TAlors)nodeArrayList3.get(0); + pblocNode5 = (PBloc)nodeArrayList4.get(0); + + pinsNode1 = new ASiIns(tsiNode2, pexpNode3, talorsNode4, pblocNode5); + } + nodeList.add(pinsNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new27() /* reduce ASisinonIns */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList6 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PIns pinsNode1; + { + // Block + TSi tsiNode2; + PExp pexpNode3; + TAlors talorsNode4; + PBloc pblocNode5; + TSinon tsinonNode6; + PBloc pblocNode7; + tsiNode2 = (TSi)nodeArrayList1.get(0); + pexpNode3 = (PExp)nodeArrayList2.get(0); + talorsNode4 = (TAlors)nodeArrayList3.get(0); + pblocNode5 = (PBloc)nodeArrayList4.get(0); + tsinonNode6 = (TSinon)nodeArrayList5.get(0); + pblocNode7 = (PBloc)nodeArrayList6.get(0); + + pinsNode1 = new ASisinonIns(tsiNode2, pexpNode3, talorsNode4, pblocNode5, tsinonNode6, pblocNode7); + } + nodeList.add(pinsNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new28() /* reduce AReturnIns */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PIns pinsNode1; + { + // Block + TRetourner tretournerNode2; + PExp pexpNode3; + TPointvirgule tpointvirguleNode4; + tretournerNode2 = (TRetourner)nodeArrayList1.get(0); + pexpNode3 = (PExp)nodeArrayList2.get(0); + tpointvirguleNode4 = (TPointvirgule)nodeArrayList3.get(0); + + pinsNode1 = new AReturnIns(tretournerNode2, pexpNode3, tpointvirguleNode4); + } + nodeList.add(pinsNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new29() /* reduce AWriteIns */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PIns pinsNode1; + { + // Block + TEcrire tecrireNode2; + TGparenthese tgparentheseNode3; + PExp pexpNode4; + TDparenthese tdparentheseNode5; + TPointvirgule tpointvirguleNode6; + tecrireNode2 = (TEcrire)nodeArrayList1.get(0); + tgparentheseNode3 = (TGparenthese)nodeArrayList2.get(0); + pexpNode4 = (PExp)nodeArrayList3.get(0); + tdparentheseNode5 = (TDparenthese)nodeArrayList4.get(0); + tpointvirguleNode6 = (TPointvirgule)nodeArrayList5.get(0); + + pinsNode1 = new AWriteIns(tecrireNode2, tgparentheseNode3, pexpNode4, tdparentheseNode5, tpointvirguleNode6); + } + nodeList.add(pinsNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new30() /* reduce AAppelfncIns */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PIns pinsNode1; + { + // Block + TId tidNode2; + TGparenthese tgparentheseNode3; + PLe pleNode4; + TDparenthese tdparentheseNode5; + TPointvirgule tpointvirguleNode6; + tidNode2 = (TId)nodeArrayList1.get(0); + tgparentheseNode3 = (TGparenthese)nodeArrayList2.get(0); + pleNode4 = (PLe)nodeArrayList3.get(0); + tdparentheseNode5 = (TDparenthese)nodeArrayList4.get(0); + tpointvirguleNode6 = (TPointvirgule)nodeArrayList5.get(0); + + pinsNode1 = new AAppelfncIns(tidNode2, tgparentheseNode3, pleNode4, tdparentheseNode5, tpointvirguleNode6); + } + nodeList.add(pinsNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new31() /* reduce AInstrBloc */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PBloc pblocNode1; + { + // Block + TAccoladeg taccoladegNode2; + PLi pliNode3; + TAccoladed taccoladedNode4; + taccoladegNode2 = (TAccoladeg)nodeArrayList1.get(0); + pliNode3 = (PLi)nodeArrayList2.get(0); + taccoladedNode4 = (TAccoladed)nodeArrayList3.get(0); + + pblocNode1 = new AInstrBloc(taccoladegNode2, pliNode3, taccoladedNode4); + } + nodeList.add(pblocNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new32() /* reduce AListeinstrLi */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PLi pliNode1; + { + // Block + PIns pinsNode2; + PLi pliNode3; + pinsNode2 = (PIns)nodeArrayList1.get(0); + pliNode3 = (PLi)nodeArrayList2.get(0); + + pliNode1 = new AListeinstrLi(pinsNode2, pliNode3); + } + nodeList.add(pliNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new33() /* reduce AEpsilon$1Li */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + PLi pliNode1; + { + // Block + PEpsilon pepsilonNode2; + { + // Block + + pepsilonNode2 = new AEpsilon(); + } + + pliNode1 = new AEpsilonLi(pepsilonNode2); + } + nodeList.add(pliNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new34() /* reduce AExprLe */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PLe pleNode1; + { + // Block + PExp pexpNode2; + PLse plseNode3; + pexpNode2 = (PExp)nodeArrayList1.get(0); + plseNode3 = (PLse)nodeArrayList2.get(0); + + pleNode1 = new AExprLe(pexpNode2, plseNode3); + } + nodeList.add(pleNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new35() /* reduce AEpsilon$1Le */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + PLe pleNode1; + { + // Block + PEpsilon pepsilonNode2; + { + // Block + + pepsilonNode2 = new AEpsilon(); + } + + pleNode1 = new AEpsilonLe(pepsilonNode2); + } + nodeList.add(pleNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new36() /* reduce ALstexprLse */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PLse plseNode1; + { + // Block + TVirgule tvirguleNode2; + PExp pexpNode3; + PLse plseNode4; + tvirguleNode2 = (TVirgule)nodeArrayList1.get(0); + pexpNode3 = (PExp)nodeArrayList2.get(0); + plseNode4 = (PLse)nodeArrayList3.get(0); + + plseNode1 = new ALstexprLse(tvirguleNode2, pexpNode3, plseNode4); + } + nodeList.add(plseNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new37() /* reduce AEpsilon$1Lse */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + PLse plseNode1; + { + // Block + PEpsilon pepsilonNode2; + { + // Block + + pepsilonNode2 = new AEpsilon(); + } + + plseNode1 = new AEpsilonLse(pepsilonNode2); + } + nodeList.add(plseNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new38() /* reduce AIdVar */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PVar pvarNode1; + { + // Block + TId tidNode2; + tidNode2 = (TId)nodeArrayList1.get(0); + + pvarNode1 = new AIdVar(tidNode2); + } + nodeList.add(pvarNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new39() /* reduce AIdCrochetVar */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PVar pvarNode1; + { + // Block + TId tidNode2; + TCrochetg tcrochetgNode3; + PExp pexpNode4; + TCrochetd tcrochetdNode5; + tidNode2 = (TId)nodeArrayList1.get(0); + tcrochetgNode3 = (TCrochetg)nodeArrayList2.get(0); + pexpNode4 = (PExp)nodeArrayList3.get(0); + tcrochetdNode5 = (TCrochetd)nodeArrayList4.get(0); + + pvarNode1 = new AIdCrochetVar(tidNode2, tcrochetgNode3, pexpNode4, tcrochetdNode5); + } + nodeList.add(pvarNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new40() /* reduce ADeclavariableDecvar */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PDecvar pdecvarNode1; + { + // Block + PType ptypeNode2; + TId tidNode3; + ptypeNode2 = (PType)nodeArrayList1.get(0); + tidNode3 = (TId)nodeArrayList2.get(0); + + pdecvarNode1 = new ADeclavariableDecvar(ptypeNode2, tidNode3); + } + nodeList.add(pdecvarNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new41() /* reduce ADecvar */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PDecvar pdecvarNode1; + { + // Block + PType ptypeNode2; + TId tidNode3; + TCrochetg tcrochetgNode4; + TNombre tnombreNode5; + TCrochetd tcrochetdNode6; + ptypeNode2 = (PType)nodeArrayList1.get(0); + tidNode3 = (TId)nodeArrayList2.get(0); + tcrochetgNode4 = (TCrochetg)nodeArrayList3.get(0); + tnombreNode5 = (TNombre)nodeArrayList4.get(0); + tcrochetdNode6 = (TCrochetd)nodeArrayList5.get(0); + + pdecvarNode1 = new ADecvar(ptypeNode2, tidNode3, tcrochetgNode4, tnombreNode5, tcrochetdNode6); + } + nodeList.add(pdecvarNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new42() /* reduce ATypeType */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PType ptypeNode1; + { + // Block + TBool tboolNode2; + tboolNode2 = (TBool)nodeArrayList1.get(0); + + ptypeNode1 = new ATypeType(tboolNode2); + } + nodeList.add(ptypeNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new43() /* reduce AType */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PType ptypeNode1; + { + // Block + TEntier tentierNode2; + tentierNode2 = (TEntier)nodeArrayList1.get(0); + + ptypeNode1 = new AType(tentierNode2); + } + nodeList.add(ptypeNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new44() /* reduce ADeclafonc$Lstdeclacvar1$Lstdeclacvar2$Typeopt1Decfonc */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList9 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList8 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList7 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList6 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PDecfonc pdecfoncNode1; + { + // Block + PTypeopt ptypeoptNode2; + TId tidNode4; + TGparenthese tgparentheseNode5; + PLdec pldecNode6; + TDparenthese tdparentheseNode9; + PLdec pldecNode10; + PBloc pblocNode13; + { + // Block + PType ptypeNode3; + ptypeNode3 = (PType)nodeArrayList1.get(0); + + ptypeoptNode2 = new ATypeoptTypeopt(ptypeNode3); + } + tidNode4 = (TId)nodeArrayList2.get(0); + tgparentheseNode5 = (TGparenthese)nodeArrayList3.get(0); + { + // Block + PDecvar pdecvarNode7; + PSuitedec psuitedecNode8; + pdecvarNode7 = (PDecvar)nodeArrayList4.get(0); + psuitedecNode8 = (PSuitedec)nodeArrayList5.get(0); + + pldecNode6 = new ALstdeclacvarLdec(pdecvarNode7, psuitedecNode8); + } + tdparentheseNode9 = (TDparenthese)nodeArrayList6.get(0); + { + // Block + PDecvar pdecvarNode11; + PSuitedec psuitedecNode12; + pdecvarNode11 = (PDecvar)nodeArrayList7.get(0); + psuitedecNode12 = (PSuitedec)nodeArrayList8.get(0); + + pldecNode10 = new ALstdeclacvarLdec(pdecvarNode11, psuitedecNode12); + } + pblocNode13 = (PBloc)nodeArrayList9.get(0); + + pdecfoncNode1 = new ADeclafoncDecfonc(ptypeoptNode2, tidNode4, tgparentheseNode5, pldecNode6, tdparentheseNode9, pldecNode10, pblocNode13); + } + nodeList.add(pdecfoncNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new45() /* reduce ADeclafonc$Lstdeclacvar1$Lstdeclacvar2$11Decfonc */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList8 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList7 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList6 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PDecfonc pdecfoncNode1; + { + // Block + PTypeopt ptypeoptNode2; + TId tidNode4; + TGparenthese tgparentheseNode5; + PLdec pldecNode6; + TDparenthese tdparentheseNode9; + PLdec pldecNode10; + PBloc pblocNode13; + { + // Block + PEpsilon pepsilonNode3; + { + // Block + + pepsilonNode3 = new AEpsilon(); + } + + ptypeoptNode2 = new ATypeopt(pepsilonNode3); + } + tidNode4 = (TId)nodeArrayList1.get(0); + tgparentheseNode5 = (TGparenthese)nodeArrayList2.get(0); + { + // Block + PDecvar pdecvarNode7; + PSuitedec psuitedecNode8; + pdecvarNode7 = (PDecvar)nodeArrayList3.get(0); + psuitedecNode8 = (PSuitedec)nodeArrayList4.get(0); + + pldecNode6 = new ALstdeclacvarLdec(pdecvarNode7, psuitedecNode8); + } + tdparentheseNode9 = (TDparenthese)nodeArrayList5.get(0); + { + // Block + PDecvar pdecvarNode11; + PSuitedec psuitedecNode12; + pdecvarNode11 = (PDecvar)nodeArrayList6.get(0); + psuitedecNode12 = (PSuitedec)nodeArrayList7.get(0); + + pldecNode10 = new ALstdeclacvarLdec(pdecvarNode11, psuitedecNode12); + } + pblocNode13 = (PBloc)nodeArrayList8.get(0); + + pdecfoncNode1 = new ADeclafoncDecfonc(ptypeoptNode2, tidNode4, tgparentheseNode5, pldecNode6, tdparentheseNode9, pldecNode10, pblocNode13); + } + nodeList.add(pdecfoncNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new46() /* reduce ADeclafonc$Lstdeclacvar1$12$Typeopt1Decfonc */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList7 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList6 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PDecfonc pdecfoncNode1; + { + // Block + PTypeopt ptypeoptNode2; + TId tidNode4; + TGparenthese tgparentheseNode5; + PLdec pldecNode6; + TDparenthese tdparentheseNode9; + PLdec pldecNode10; + PBloc pblocNode12; + { + // Block + PType ptypeNode3; + ptypeNode3 = (PType)nodeArrayList1.get(0); + + ptypeoptNode2 = new ATypeoptTypeopt(ptypeNode3); + } + tidNode4 = (TId)nodeArrayList2.get(0); + tgparentheseNode5 = (TGparenthese)nodeArrayList3.get(0); + { + // Block + PDecvar pdecvarNode7; + PSuitedec psuitedecNode8; + pdecvarNode7 = (PDecvar)nodeArrayList4.get(0); + psuitedecNode8 = (PSuitedec)nodeArrayList5.get(0); + + pldecNode6 = new ALstdeclacvarLdec(pdecvarNode7, psuitedecNode8); + } + tdparentheseNode9 = (TDparenthese)nodeArrayList6.get(0); + { + // Block + PEpsilon pepsilonNode11; + { + // Block + + pepsilonNode11 = new AEpsilon(); + } + + pldecNode10 = new ALdec(pepsilonNode11); + } + pblocNode12 = (PBloc)nodeArrayList7.get(0); + + pdecfoncNode1 = new ADeclafoncDecfonc(ptypeoptNode2, tidNode4, tgparentheseNode5, pldecNode6, tdparentheseNode9, pldecNode10, pblocNode12); + } + nodeList.add(pdecfoncNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new47() /* reduce ADeclafonc$Lstdeclacvar1$12$11Decfonc */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList6 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PDecfonc pdecfoncNode1; + { + // Block + PTypeopt ptypeoptNode2; + TId tidNode4; + TGparenthese tgparentheseNode5; + PLdec pldecNode6; + TDparenthese tdparentheseNode9; + PLdec pldecNode10; + PBloc pblocNode12; + { + // Block + PEpsilon pepsilonNode3; + { + // Block + + pepsilonNode3 = new AEpsilon(); + } + + ptypeoptNode2 = new ATypeopt(pepsilonNode3); + } + tidNode4 = (TId)nodeArrayList1.get(0); + tgparentheseNode5 = (TGparenthese)nodeArrayList2.get(0); + { + // Block + PDecvar pdecvarNode7; + PSuitedec psuitedecNode8; + pdecvarNode7 = (PDecvar)nodeArrayList3.get(0); + psuitedecNode8 = (PSuitedec)nodeArrayList4.get(0); + + pldecNode6 = new ALstdeclacvarLdec(pdecvarNode7, psuitedecNode8); + } + tdparentheseNode9 = (TDparenthese)nodeArrayList5.get(0); + { + // Block + PEpsilon pepsilonNode11; + { + // Block + + pepsilonNode11 = new AEpsilon(); + } + + pldecNode10 = new ALdec(pepsilonNode11); + } + pblocNode12 = (PBloc)nodeArrayList6.get(0); + + pdecfoncNode1 = new ADeclafoncDecfonc(ptypeoptNode2, tidNode4, tgparentheseNode5, pldecNode6, tdparentheseNode9, pldecNode10, pblocNode12); + } + nodeList.add(pdecfoncNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new48() /* reduce ADeclafonc$11$Lstdeclacvar2$Typeopt1Decfonc */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList7 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList6 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PDecfonc pdecfoncNode1; + { + // Block + PTypeopt ptypeoptNode2; + TId tidNode4; + TGparenthese tgparentheseNode5; + PLdec pldecNode6; + TDparenthese tdparentheseNode8; + PLdec pldecNode9; + PBloc pblocNode12; + { + // Block + PType ptypeNode3; + ptypeNode3 = (PType)nodeArrayList1.get(0); + + ptypeoptNode2 = new ATypeoptTypeopt(ptypeNode3); + } + tidNode4 = (TId)nodeArrayList2.get(0); + tgparentheseNode5 = (TGparenthese)nodeArrayList3.get(0); + { + // Block + PEpsilon pepsilonNode7; + { + // Block + + pepsilonNode7 = new AEpsilon(); + } + + pldecNode6 = new ALdec(pepsilonNode7); + } + tdparentheseNode8 = (TDparenthese)nodeArrayList4.get(0); + { + // Block + PDecvar pdecvarNode10; + PSuitedec psuitedecNode11; + pdecvarNode10 = (PDecvar)nodeArrayList5.get(0); + psuitedecNode11 = (PSuitedec)nodeArrayList6.get(0); + + pldecNode9 = new ALstdeclacvarLdec(pdecvarNode10, psuitedecNode11); + } + pblocNode12 = (PBloc)nodeArrayList7.get(0); + + pdecfoncNode1 = new ADeclafoncDecfonc(ptypeoptNode2, tidNode4, tgparentheseNode5, pldecNode6, tdparentheseNode8, pldecNode9, pblocNode12); + } + nodeList.add(pdecfoncNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new49() /* reduce ADeclafonc$11$Lstdeclacvar2$11Decfonc */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList6 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PDecfonc pdecfoncNode1; + { + // Block + PTypeopt ptypeoptNode2; + TId tidNode4; + TGparenthese tgparentheseNode5; + PLdec pldecNode6; + TDparenthese tdparentheseNode8; + PLdec pldecNode9; + PBloc pblocNode12; + { + // Block + PEpsilon pepsilonNode3; + { + // Block + + pepsilonNode3 = new AEpsilon(); + } + + ptypeoptNode2 = new ATypeopt(pepsilonNode3); + } + tidNode4 = (TId)nodeArrayList1.get(0); + tgparentheseNode5 = (TGparenthese)nodeArrayList2.get(0); + { + // Block + PEpsilon pepsilonNode7; + { + // Block + + pepsilonNode7 = new AEpsilon(); + } + + pldecNode6 = new ALdec(pepsilonNode7); + } + tdparentheseNode8 = (TDparenthese)nodeArrayList3.get(0); + { + // Block + PDecvar pdecvarNode10; + PSuitedec psuitedecNode11; + pdecvarNode10 = (PDecvar)nodeArrayList4.get(0); + psuitedecNode11 = (PSuitedec)nodeArrayList5.get(0); + + pldecNode9 = new ALstdeclacvarLdec(pdecvarNode10, psuitedecNode11); + } + pblocNode12 = (PBloc)nodeArrayList6.get(0); + + pdecfoncNode1 = new ADeclafoncDecfonc(ptypeoptNode2, tidNode4, tgparentheseNode5, pldecNode6, tdparentheseNode8, pldecNode9, pblocNode12); + } + nodeList.add(pdecfoncNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new50() /* reduce ADeclafonc$11$12$Typeopt1Decfonc */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PDecfonc pdecfoncNode1; + { + // Block + PTypeopt ptypeoptNode2; + TId tidNode4; + TGparenthese tgparentheseNode5; + PLdec pldecNode6; + TDparenthese tdparentheseNode8; + PLdec pldecNode9; + PBloc pblocNode11; + { + // Block + PType ptypeNode3; + ptypeNode3 = (PType)nodeArrayList1.get(0); + + ptypeoptNode2 = new ATypeoptTypeopt(ptypeNode3); + } + tidNode4 = (TId)nodeArrayList2.get(0); + tgparentheseNode5 = (TGparenthese)nodeArrayList3.get(0); + { + // Block + PEpsilon pepsilonNode7; + { + // Block + + pepsilonNode7 = new AEpsilon(); + } + + pldecNode6 = new ALdec(pepsilonNode7); + } + tdparentheseNode8 = (TDparenthese)nodeArrayList4.get(0); + { + // Block + PEpsilon pepsilonNode10; + { + // Block + + pepsilonNode10 = new AEpsilon(); + } + + pldecNode9 = new ALdec(pepsilonNode10); + } + pblocNode11 = (PBloc)nodeArrayList5.get(0); + + pdecfoncNode1 = new ADeclafoncDecfonc(ptypeoptNode2, tidNode4, tgparentheseNode5, pldecNode6, tdparentheseNode8, pldecNode9, pblocNode11); + } + nodeList.add(pdecfoncNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new51() /* reduce ADeclafonc$11$12$11Decfonc */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PDecfonc pdecfoncNode1; + { + // Block + PTypeopt ptypeoptNode2; + TId tidNode4; + TGparenthese tgparentheseNode5; + PLdec pldecNode6; + TDparenthese tdparentheseNode8; + PLdec pldecNode9; + PBloc pblocNode11; + { + // Block + PEpsilon pepsilonNode3; + { + // Block + + pepsilonNode3 = new AEpsilon(); + } + + ptypeoptNode2 = new ATypeopt(pepsilonNode3); + } + tidNode4 = (TId)nodeArrayList1.get(0); + tgparentheseNode5 = (TGparenthese)nodeArrayList2.get(0); + { + // Block + PEpsilon pepsilonNode7; + { + // Block + + pepsilonNode7 = new AEpsilon(); + } + + pldecNode6 = new ALdec(pepsilonNode7); + } + tdparentheseNode8 = (TDparenthese)nodeArrayList3.get(0); + { + // Block + PEpsilon pepsilonNode10; + { + // Block + + pepsilonNode10 = new AEpsilon(); + } + + pldecNode9 = new ALdec(pepsilonNode10); + } + pblocNode11 = (PBloc)nodeArrayList4.get(0); + + pdecfoncNode1 = new ADeclafoncDecfonc(ptypeoptNode2, tidNode4, tgparentheseNode5, pldecNode6, tdparentheseNode8, pldecNode9, pblocNode11); + } + nodeList.add(pdecfoncNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new52() /* reduce ASuitedeclvarSuitedec */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PSuitedec psuitedecNode1; + { + // Block + TVirgule tvirguleNode2; + PDecvar pdecvarNode3; + PSuitedec psuitedecNode4; + tvirguleNode2 = (TVirgule)nodeArrayList1.get(0); + pdecvarNode3 = (PDecvar)nodeArrayList2.get(0); + psuitedecNode4 = (PSuitedec)nodeArrayList3.get(0); + + psuitedecNode1 = new ASuitedeclvarSuitedec(tvirguleNode2, pdecvarNode3, psuitedecNode4); + } + nodeList.add(psuitedecNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new53() /* reduce A1Suitedec */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + PSuitedec psuitedecNode1; + { + // Block + PEpsilon pepsilonNode2; + { + // Block + + pepsilonNode2 = new AEpsilon(); + } + + psuitedecNode1 = new ASuitedec(pepsilonNode2); + } + nodeList.add(psuitedecNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new54() /* reduce ALstdecfncLdf */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PLdf pldfNode1; + { + // Block + PDecfonc pdecfoncNode2; + PLdf pldfNode3; + pdecfoncNode2 = (PDecfonc)nodeArrayList1.get(0); + pldfNode3 = (PLdf)nodeArrayList2.get(0); + + pldfNode1 = new ALstdecfncLdf(pdecfoncNode2, pldfNode3); + } + nodeList.add(pldfNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new55() /* reduce A1Ldf */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + PLdf pldfNode1; + { + // Block + PEpsilon pepsilonNode2; + { + // Block + + pepsilonNode2 = new AEpsilon(); + } + + pldfNode1 = new ALdf(pepsilonNode2); + } + nodeList.add(pldfNode1); + return nodeList; + } + + + + private static int[][][] actionTable; +/* { + {{-1, REDUCE, 55}, {17, SHIFT, 1}, {18, SHIFT, 2}, {30, SHIFT, 3}, }, + {{-1, REDUCE, 42}, }, + {{-1, REDUCE, 43}, }, + {{-1, ERROR, 3}, {11, SHIFT, 9}, }, + {{-1, ERROR, 4}, {31, ACCEPT, -1}, }, + {{-1, REDUCE, 53}, {5, SHIFT, 10}, }, + {{-1, ERROR, 6}, {30, SHIFT, 12}, }, + {{-1, REDUCE, 55}, {17, SHIFT, 1}, {18, SHIFT, 2}, {30, SHIFT, 3}, }, + {{-1, REDUCE, 1}, }, + {{-1, ERROR, 9}, {12, SHIFT, 15}, {17, SHIFT, 1}, {18, SHIFT, 2}, }, + {{-1, ERROR, 10}, {17, SHIFT, 1}, {18, SHIFT, 2}, }, + {{-1, REDUCE, 55}, {17, SHIFT, 1}, {18, SHIFT, 2}, {30, SHIFT, 3}, }, + {{-1, REDUCE, 40}, {11, SHIFT, 20}, {15, SHIFT, 21}, }, + {{-1, ERROR, 13}, {30, SHIFT, 22}, }, + {{-1, REDUCE, 54}, }, + {{-1, ERROR, 15}, {13, SHIFT, 23}, {17, SHIFT, 1}, {18, SHIFT, 2}, }, + {{-1, REDUCE, 53}, {5, SHIFT, 10}, }, + {{-1, ERROR, 17}, {30, SHIFT, 27}, }, + {{-1, REDUCE, 53}, {5, SHIFT, 10}, }, + {{-1, REDUCE, 0}, }, + {{-1, ERROR, 20}, {12, SHIFT, 29}, {17, SHIFT, 1}, {18, SHIFT, 2}, }, + {{-1, ERROR, 21}, {27, SHIFT, 31}, }, + {{-1, ERROR, 22}, {11, SHIFT, 20}, }, + {{-1, REDUCE, 33}, {19, SHIFT, 32}, {21, SHIFT, 33}, {24, SHIFT, 34}, {26, SHIFT, 35}, {30, SHIFT, 36}, }, + {{-1, REDUCE, 51}, }, + {{-1, REDUCE, 53}, {5, SHIFT, 10}, }, + {{-1, ERROR, 26}, {12, SHIFT, 41}, }, + {{-1, REDUCE, 40}, {15, SHIFT, 21}, }, + {{-1, REDUCE, 52}, }, + {{-1, ERROR, 29}, {13, SHIFT, 23}, {17, SHIFT, 1}, {18, SHIFT, 2}, }, + {{-1, REDUCE, 53}, {5, SHIFT, 10}, }, + {{-1, ERROR, 31}, {16, SHIFT, 45}, }, + {{-1, ERROR, 32}, {10, SHIFT, 46}, {11, SHIFT, 47}, {25, SHIFT, 48}, {27, SHIFT, 49}, {28, SHIFT, 50}, {29, SHIFT, 51}, {30, SHIFT, 52}, }, + {{-1, ERROR, 33}, {10, SHIFT, 46}, {11, SHIFT, 47}, {25, SHIFT, 48}, {27, SHIFT, 49}, {28, SHIFT, 50}, {29, SHIFT, 51}, {30, SHIFT, 52}, }, + {{-1, ERROR, 34}, {10, SHIFT, 46}, {11, SHIFT, 47}, {25, SHIFT, 48}, {27, SHIFT, 49}, {28, SHIFT, 50}, {29, SHIFT, 51}, {30, SHIFT, 52}, }, + {{-1, ERROR, 35}, {11, SHIFT, 63}, }, + {{-1, REDUCE, 38}, {11, SHIFT, 64}, {15, SHIFT, 65}, }, + {{-1, REDUCE, 33}, {19, SHIFT, 32}, {21, SHIFT, 33}, {24, SHIFT, 34}, {26, SHIFT, 35}, {30, SHIFT, 36}, }, + {{-1, ERROR, 38}, {14, SHIFT, 67}, }, + {{-1, ERROR, 39}, {6, SHIFT, 68}, }, + {{-1, ERROR, 40}, {13, SHIFT, 23}, }, + {{-1, ERROR, 41}, {13, SHIFT, 23}, {17, SHIFT, 1}, {18, SHIFT, 2}, }, + {{-1, REDUCE, 50}, }, + {{-1, REDUCE, 53}, {5, SHIFT, 10}, }, + {{-1, ERROR, 44}, {12, SHIFT, 73}, }, + {{-1, REDUCE, 41}, }, + {{-1, ERROR, 46}, {10, SHIFT, 46}, {11, SHIFT, 47}, {25, SHIFT, 48}, {27, SHIFT, 49}, {28, SHIFT, 50}, {29, SHIFT, 51}, {30, SHIFT, 52}, }, + {{-1, ERROR, 47}, {10, SHIFT, 46}, {11, SHIFT, 47}, {25, SHIFT, 48}, {27, SHIFT, 49}, {28, SHIFT, 50}, {29, SHIFT, 51}, {30, SHIFT, 52}, }, + {{-1, ERROR, 48}, {11, SHIFT, 76}, }, + {{-1, REDUCE, 18}, }, + {{-1, REDUCE, 19}, }, + {{-1, REDUCE, 20}, }, + {{-1, REDUCE, 38}, {11, SHIFT, 77}, {15, SHIFT, 65}, }, + {{-1, ERROR, 53}, {3, SHIFT, 78}, {20, SHIFT, 79}, }, + {{-1, REDUCE, 3}, {4, SHIFT, 80}, }, + {{-1, REDUCE, 5}, {6, SHIFT, 81}, {7, SHIFT, 82}, }, + {{-1, REDUCE, 8}, {0, SHIFT, 83}, {2, SHIFT, 84}, }, + {{-1, REDUCE, 11}, {8, SHIFT, 85}, {9, SHIFT, 86}, }, + {{-1, REDUCE, 14}, }, + {{-1, REDUCE, 16}, }, + {{-1, REDUCE, 22}, }, + {{-1, ERROR, 61}, {3, SHIFT, 78}, {22, SHIFT, 87}, }, + {{-1, ERROR, 62}, {1, SHIFT, 88}, {3, SHIFT, 78}, }, + {{-1, ERROR, 63}, {10, SHIFT, 46}, {11, SHIFT, 47}, {25, SHIFT, 48}, {27, SHIFT, 49}, {28, SHIFT, 50}, {29, SHIFT, 51}, {30, SHIFT, 52}, }, + {{-1, REDUCE, 35}, {10, SHIFT, 46}, {11, SHIFT, 47}, {25, SHIFT, 48}, {27, SHIFT, 49}, {28, SHIFT, 50}, {29, SHIFT, 51}, {30, SHIFT, 52}, }, + {{-1, ERROR, 65}, {10, SHIFT, 46}, {11, SHIFT, 47}, {25, SHIFT, 48}, {27, SHIFT, 49}, {28, SHIFT, 50}, {29, SHIFT, 51}, {30, SHIFT, 52}, }, + {{-1, REDUCE, 32}, }, + {{-1, REDUCE, 31}, }, + {{-1, ERROR, 68}, {10, SHIFT, 46}, {11, SHIFT, 47}, {25, SHIFT, 48}, {27, SHIFT, 49}, {28, SHIFT, 50}, {29, SHIFT, 51}, {30, SHIFT, 52}, }, + {{-1, REDUCE, 49}, }, + {{-1, REDUCE, 47}, }, + {{-1, REDUCE, 53}, {5, SHIFT, 10}, }, + {{-1, ERROR, 72}, {13, SHIFT, 23}, }, + {{-1, ERROR, 73}, {13, SHIFT, 23}, {17, SHIFT, 1}, {18, SHIFT, 2}, }, + {{-1, REDUCE, 15}, }, + {{-1, ERROR, 75}, {3, SHIFT, 78}, {12, SHIFT, 98}, }, + {{-1, ERROR, 76}, {12, SHIFT, 99}, }, + {{-1, REDUCE, 35}, {10, SHIFT, 46}, {11, SHIFT, 47}, {25, SHIFT, 48}, {27, SHIFT, 49}, {28, SHIFT, 50}, {29, SHIFT, 51}, {30, SHIFT, 52}, }, + {{-1, ERROR, 78}, {10, SHIFT, 46}, {11, SHIFT, 47}, {25, SHIFT, 48}, {27, SHIFT, 49}, {28, SHIFT, 50}, {29, SHIFT, 51}, {30, SHIFT, 52}, }, + {{-1, ERROR, 79}, {13, SHIFT, 23}, }, + {{-1, ERROR, 80}, {10, SHIFT, 46}, {11, SHIFT, 47}, {25, SHIFT, 48}, {27, SHIFT, 49}, {28, SHIFT, 50}, {29, SHIFT, 51}, {30, SHIFT, 52}, }, + {{-1, ERROR, 81}, {10, SHIFT, 46}, {11, SHIFT, 47}, {25, SHIFT, 48}, {27, SHIFT, 49}, {28, SHIFT, 50}, {29, SHIFT, 51}, {30, SHIFT, 52}, }, + {{-1, ERROR, 82}, {10, SHIFT, 46}, {11, SHIFT, 47}, {25, SHIFT, 48}, {27, SHIFT, 49}, {28, SHIFT, 50}, {29, SHIFT, 51}, {30, SHIFT, 52}, }, + {{-1, ERROR, 83}, {10, SHIFT, 46}, {11, SHIFT, 47}, {25, SHIFT, 48}, {27, SHIFT, 49}, {28, SHIFT, 50}, {29, SHIFT, 51}, {30, SHIFT, 52}, }, + {{-1, ERROR, 84}, {10, SHIFT, 46}, {11, SHIFT, 47}, {25, SHIFT, 48}, {27, SHIFT, 49}, {28, SHIFT, 50}, {29, SHIFT, 51}, {30, SHIFT, 52}, }, + {{-1, ERROR, 85}, {10, SHIFT, 46}, {11, SHIFT, 47}, {25, SHIFT, 48}, {27, SHIFT, 49}, {28, SHIFT, 50}, {29, SHIFT, 51}, {30, SHIFT, 52}, }, + {{-1, ERROR, 86}, {10, SHIFT, 46}, {11, SHIFT, 47}, {25, SHIFT, 48}, {27, SHIFT, 49}, {28, SHIFT, 50}, {29, SHIFT, 51}, {30, SHIFT, 52}, }, + {{-1, ERROR, 87}, {13, SHIFT, 23}, }, + {{-1, REDUCE, 28}, }, + {{-1, ERROR, 89}, {3, SHIFT, 78}, {12, SHIFT, 111}, }, + {{-1, REDUCE, 37}, {3, SHIFT, 78}, {5, SHIFT, 112}, }, + {{-1, ERROR, 91}, {12, SHIFT, 114}, }, + {{-1, ERROR, 92}, {3, SHIFT, 78}, {16, SHIFT, 115}, }, + {{-1, ERROR, 93}, {1, SHIFT, 116}, {3, SHIFT, 78}, }, + {{-1, ERROR, 94}, {13, SHIFT, 23}, }, + {{-1, REDUCE, 48}, }, + {{-1, REDUCE, 46}, }, + {{-1, REDUCE, 53}, {5, SHIFT, 10}, }, + {{-1, REDUCE, 17}, }, + {{-1, REDUCE, 21}, }, + {{-1, ERROR, 100}, {12, SHIFT, 119}, }, + {{-1, REDUCE, 2}, {4, SHIFT, 80}, }, + {{-1, REDUCE, 26}, {23, SHIFT, 120}, }, + {{-1, REDUCE, 4}, {6, SHIFT, 81}, {7, SHIFT, 82}, }, + {{-1, REDUCE, 6}, {0, SHIFT, 83}, {2, SHIFT, 84}, }, + {{-1, REDUCE, 7}, {0, SHIFT, 83}, {2, SHIFT, 84}, }, + {{-1, REDUCE, 9}, {8, SHIFT, 85}, {9, SHIFT, 86}, }, + {{-1, REDUCE, 10}, {8, SHIFT, 85}, {9, SHIFT, 86}, }, + {{-1, REDUCE, 12}, }, + {{-1, REDUCE, 13}, }, + {{-1, REDUCE, 25}, }, + {{-1, ERROR, 111}, {1, SHIFT, 121}, }, + {{-1, ERROR, 112}, {10, SHIFT, 46}, {11, SHIFT, 47}, {25, SHIFT, 48}, {27, SHIFT, 49}, {28, SHIFT, 50}, {29, SHIFT, 51}, {30, SHIFT, 52}, }, + {{-1, REDUCE, 34}, }, + {{-1, ERROR, 114}, {1, SHIFT, 123}, }, + {{-1, REDUCE, 39}, }, + {{-1, REDUCE, 24}, }, + {{-1, REDUCE, 45}, }, + {{-1, ERROR, 118}, {13, SHIFT, 23}, }, + {{-1, REDUCE, 23}, }, + {{-1, ERROR, 120}, {13, SHIFT, 23}, }, + {{-1, REDUCE, 29}, }, + {{-1, REDUCE, 37}, {3, SHIFT, 78}, {5, SHIFT, 112}, }, + {{-1, REDUCE, 30}, }, + {{-1, REDUCE, 44}, }, + {{-1, REDUCE, 27}, }, + {{-1, REDUCE, 36}, }, + };*/ + private static int[][][] gotoTable; +/* { + {{-1, 4}, }, + {{-1, 90}, {32, 53}, {33, 61}, {34, 62}, {47, 75}, {63, 89}, {65, 92}, {68, 93}, {112, 122}, }, + {{-1, 54}, {78, 101}, }, + {{-1, 55}, {80, 103}, }, + {{-1, 56}, {81, 104}, {82, 105}, }, + {{-1, 57}, {83, 106}, {84, 107}, }, + {{-1, 58}, {46, 74}, {85, 108}, {86, 109}, }, + {{-1, 59}, }, + {{-1, 37}, }, + {{-1, 24}, {29, 42}, {40, 69}, {41, 70}, {72, 95}, {73, 96}, {79, 102}, {87, 110}, {94, 117}, {118, 124}, {120, 125}, }, + {{-1, 38}, {37, 66}, }, + {{-1, 91}, {77, 100}, }, + {{-1, 113}, {122, 126}, }, + {{-1, 60}, {23, 39}, {37, 39}, }, + {{-1, 5}, {9, 16}, {10, 18}, {15, 25}, {20, 30}, {29, 43}, {41, 71}, {73, 97}, }, + {{-1, 17}, {0, 6}, {7, 13}, {11, 13}, }, + {{-1, 7}, }, + {{-1, 11}, {16, 26}, {18, 28}, {25, 40}, {30, 44}, {43, 72}, {71, 94}, {97, 118}, }, + {{-1, 8}, {7, 14}, {11, 19}, }, + };*/ + private static String[] errorMessages; +/* { + "expecting: 'bool', 'entier', id, EOF", + "expecting: id", + "expecting: '('", + "expecting: EOF", + "expecting: ',', 'bool', 'entier', id, EOF", + "expecting: ')', 'bool', 'entier'", + "expecting: 'bool', 'entier'", + "expecting: ',', '(', '[', 'bool', 'entier', id, EOF", + "expecting: '{', 'bool', 'entier'", + "expecting: ',', ')'", + "expecting: ',', ')', '{', 'bool', 'entier', id, EOF", + "expecting: nombre", + "expecting: '}', 'si', 'tantque', 'retour', 'ecrire', id", + "expecting: ',', '{'", + "expecting: ')'", + "expecting: ',', ')', '{', '[', 'bool', 'entier', id, EOF", + "expecting: ')', '{', 'bool', 'entier', id, EOF", + "expecting: ']'", + "expecting: '!', '(', 'lire', nombre, 'vrai', 'faux', id", + "expecting: '=', '(', '['", + "expecting: '}'", + "expecting: '='", + "expecting: '{'", + "expecting: '+', ';', '-', '|', '&', ',', '=', '<', '*', '/', ')', ']', 'alors', 'faire'", + "expecting: '+', ';', '-', '|', '&', ',', '=', '<', '*', '/', '(', ')', '[', ']', 'alors', 'faire'", + "expecting: '|', 'alors'", + "expecting: ';', '|', '&', ',', ')', ']', 'alors', 'faire'", + "expecting: ';', '|', '&', ',', '=', '<', ')', ']', 'alors', 'faire'", + "expecting: '+', ';', '-', '|', '&', ',', '=', '<', ')', ']', 'alors', 'faire'", + "expecting: '|', 'faire'", + "expecting: ';', '|'", + "expecting: '!', '(', ')', 'lire', nombre, 'vrai', 'faux', id", + "expecting: '}', 'bool', 'entier', 'si', 'tantque', 'sinon', 'retour', 'ecrire', id, EOF", + "expecting: '|', ')'", + "expecting: '|', ',', ')'", + "expecting: '|', ']'", + "expecting: '}', 'si', 'tantque', 'sinon', 'retour', 'ecrire', id", + "expecting: ';'", + };*/ + private static int[] errors; +/* { + 0, 1, 1, 2, 3, 4, 1, 0, 3, 5, 6, 0, 7, 1, 3, 8, 9, 1, 10, 3, 5, 11, 2, 12, 0, 13, 14, 15, 16, 8, 9, 17, 18, 18, 18, 2, 19, 12, 20, 21, 22, 8, 0, 13, 14, 10, 18, 18, 2, 23, 23, 23, 24, 25, 26, 27, 28, 23, 23, 23, 23, 29, 30, 18, 31, 18, 20, 32, 18, 0, 0, 13, 22, 8, 23, 33, 14, 31, 18, 22, 18, 18, 18, 18, 18, 18, 18, 22, 12, 33, 34, 14, 35, 30, 22, 0, 0, 13, 23, 23, 14, 26, 36, 27, 28, 28, 23, 23, 23, 23, 12, 37, 18, 14, 37, 23, 12, 0, 22, 23, 22, 12, 34, 12, 0, 12, 14, + };*/ + + static + { + try + { + DataInputStream s = new DataInputStream( + new BufferedInputStream( + Parser.class.getResourceAsStream("parser.dat"))); + + // read actionTable + int length = s.readInt(); + Parser.actionTable = new int[length][][]; + for(int i = 0; i < Parser.actionTable.length; i++) + { + length = s.readInt(); + Parser.actionTable[i] = new int[length][3]; + for(int j = 0; j < Parser.actionTable[i].length; j++) + { + for(int k = 0; k < 3; k++) + { + Parser.actionTable[i][j][k] = s.readInt(); + } + } + } + + // read gotoTable + length = s.readInt(); + gotoTable = new int[length][][]; + for(int i = 0; i < gotoTable.length; i++) + { + length = s.readInt(); + gotoTable[i] = new int[length][2]; + for(int j = 0; j < gotoTable[i].length; j++) + { + for(int k = 0; k < 2; k++) + { + gotoTable[i][j][k] = s.readInt(); + } + } + } + + // read errorMessages + length = s.readInt(); + errorMessages = new String[length]; + for(int i = 0; i < errorMessages.length; i++) + { + length = s.readInt(); + StringBuffer buffer = new StringBuffer(); + + for(int j = 0; j < length; j++) + { + buffer.append(s.readChar()); + } + errorMessages[i] = buffer.toString(); + } + + // read errors + length = s.readInt(); + errors = new int[length]; + for(int i = 0; i < errors.length; i++) + { + errors[i] = s.readInt(); + } + + s.close(); + } + catch(Exception e) + { + throw new RuntimeException("The file \"parser.dat\" is either missing or corrupted."); + } + } +} diff --git a/src/lParser/parser/ParserException.java b/src/lParser/parser/ParserException.java new file mode 100644 index 0000000..0d6e58c --- /dev/null +++ b/src/lParser/parser/ParserException.java @@ -0,0 +1,22 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.parser; + +import lParser.node.*; + +@SuppressWarnings("serial") +public class ParserException extends Exception +{ + private Token token; + + public ParserException(@SuppressWarnings("hiding") Token token, String message) + { + super(message); + this.token = token; + } + + public Token getToken() + { + return this.token; + } +} diff --git a/src/lParser/parser/State.java b/src/lParser/parser/State.java new file mode 100644 index 0000000..9c0faec --- /dev/null +++ b/src/lParser/parser/State.java @@ -0,0 +1,17 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.parser; + +import java.util.ArrayList; + +final class State +{ + int state; + ArrayList<Object> nodes; + + State(@SuppressWarnings("hiding") int state, @SuppressWarnings("hiding") ArrayList<Object> nodes) + { + this.state = state; + this.nodes = nodes; + } +} diff --git a/src/lParser/parser/TokenIndex.java b/src/lParser/parser/TokenIndex.java new file mode 100644 index 0000000..e11fb83 --- /dev/null +++ b/src/lParser/parser/TokenIndex.java @@ -0,0 +1,203 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package lParser.parser; + +import lParser.node.*; +import lParser.analysis.*; + +class TokenIndex extends AnalysisAdapter +{ + int index; + + @Override + public void caseTPlus(@SuppressWarnings("unused") TPlus node) + { + this.index = 0; + } + + @Override + public void caseTPointvirgule(@SuppressWarnings("unused") TPointvirgule node) + { + this.index = 1; + } + + @Override + public void caseTMoins(@SuppressWarnings("unused") TMoins node) + { + this.index = 2; + } + + @Override + public void caseTOu(@SuppressWarnings("unused") TOu node) + { + this.index = 3; + } + + @Override + public void caseTEt(@SuppressWarnings("unused") TEt node) + { + this.index = 4; + } + + @Override + public void caseTVirgule(@SuppressWarnings("unused") TVirgule node) + { + this.index = 5; + } + + @Override + public void caseTEgale(@SuppressWarnings("unused") TEgale node) + { + this.index = 6; + } + + @Override + public void caseTInf(@SuppressWarnings("unused") TInf node) + { + this.index = 7; + } + + @Override + public void caseTFois(@SuppressWarnings("unused") TFois node) + { + this.index = 8; + } + + @Override + public void caseTDiviser(@SuppressWarnings("unused") TDiviser node) + { + this.index = 9; + } + + @Override + public void caseTNon(@SuppressWarnings("unused") TNon node) + { + this.index = 10; + } + + @Override + public void caseTGparenthese(@SuppressWarnings("unused") TGparenthese node) + { + this.index = 11; + } + + @Override + public void caseTDparenthese(@SuppressWarnings("unused") TDparenthese node) + { + this.index = 12; + } + + @Override + public void caseTAccoladeg(@SuppressWarnings("unused") TAccoladeg node) + { + this.index = 13; + } + + @Override + public void caseTAccoladed(@SuppressWarnings("unused") TAccoladed node) + { + this.index = 14; + } + + @Override + public void caseTCrochetg(@SuppressWarnings("unused") TCrochetg node) + { + this.index = 15; + } + + @Override + public void caseTCrochetd(@SuppressWarnings("unused") TCrochetd node) + { + this.index = 16; + } + + @Override + public void caseTBool(@SuppressWarnings("unused") TBool node) + { + this.index = 17; + } + + @Override + public void caseTEntier(@SuppressWarnings("unused") TEntier node) + { + this.index = 18; + } + + @Override + public void caseTSi(@SuppressWarnings("unused") TSi node) + { + this.index = 19; + } + + @Override + public void caseTAlors(@SuppressWarnings("unused") TAlors node) + { + this.index = 20; + } + + @Override + public void caseTTantque(@SuppressWarnings("unused") TTantque node) + { + this.index = 21; + } + + @Override + public void caseTFaire(@SuppressWarnings("unused") TFaire node) + { + this.index = 22; + } + + @Override + public void caseTSinon(@SuppressWarnings("unused") TSinon node) + { + this.index = 23; + } + + @Override + public void caseTRetourner(@SuppressWarnings("unused") TRetourner node) + { + this.index = 24; + } + + @Override + public void caseTLire(@SuppressWarnings("unused") TLire node) + { + this.index = 25; + } + + @Override + public void caseTEcrire(@SuppressWarnings("unused") TEcrire node) + { + this.index = 26; + } + + @Override + public void caseTNombre(@SuppressWarnings("unused") TNombre node) + { + this.index = 27; + } + + @Override + public void caseTVrai(@SuppressWarnings("unused") TVrai node) + { + this.index = 28; + } + + @Override + public void caseTFaux(@SuppressWarnings("unused") TFaux node) + { + this.index = 29; + } + + @Override + public void caseTId(@SuppressWarnings("unused") TId node) + { + this.index = 30; + } + + @Override + public void caseEOF(@SuppressWarnings("unused") EOF node) + { + this.index = 31; + } +} diff --git a/src/lParser/parser/parser.dat b/src/lParser/parser/parser.dat new file mode 100644 index 0000000000000000000000000000000000000000..9dbabdb8133515e879ff42809b35f9ed019ff33c GIT binary patch literal 9162 zcmZQzV5nzcU|{+G|Nnmm1_nk31_pBm1_nU}2mtYgAWQ}(1_lN>D4Q9i7D<m58ef}% zfq@As4^j)l+)%xoXmTtJ3=Hx}VlaImyG<Dw7+9hDxRBI<%wt1x4-Xam0J0Aj4j}VE z?gW_&vYsDLm@p&x6XZr*VFxoCWDl`n3^N;~M}vWZ0TzZL3=9k)H-X$HiWV-sNZ}%e z7B6N<;RNy{$PAErkU8Rb{77t^fcy?iBhpCj0=XYOE*YWW29g8W4+|fVyFmVfg}p2h z?gHrng#*Y=kXgv-2_y#!2jsA0L$X_ufq_97q=|unL4kpR0b~w{3lf(AF&G#alo%Ko zq@ZkNr0`Wi3twXbeujl3$W0*gV1Cp@(+7%cP~3p51i1$}tW4125EMStj6+b^34knS zU|`T?U|`^Yh84)opzr~uagekgQhL;9U|^602{JG+7%(s}z~aG>fq_8=DsIHUzyNY9 zhzklQSULgu2iXo#xYODWP<+zD4&?X+r4v}1vu9vnK+el*NMYxIl$RYD7#OITHj&)} zvXc)K_zVmT&PeGE6tC(ad!ceJXmX&mh@8HV^C>9ZBFlmDKgbwRo<^=Wkkc<H9l+cL zQionHz~n&g(qUj=faMWSw7dqg8#(jzV66xj|?I;Vvl$bJUpA6UBaLGv>xOp(J9 zRBj>jLFFc{bmohe&S2_5;S7oc5DkhuKL!Q{kU1c>KT=u%#T7^msJ;ft1)!yAP(2N* zlR<KU3=9nHAO-^iLlBxe4yZVY3I>@EVlXf;grKPdg#k=$C<6lns6GZM4MPhPP?|;# z15nw8%m<bI$bPj2*#k0&fq?<!SCBl28x9gjD(mb(_JAZ97#Jcza!@u%4|19S<!xG| z378$Aa0itow6p^hub{Gr7Iq-V1*rZ&=7Z`Qm_I>o0F^zob_1wRLUscvPs8#bD6Bzw z0hE?O(G7A7Ob+Be4+aJX<nj)=ECiKL$a2J#g`hefIc<8Qr88LBmjucuNNE#PF2LlH zk?LrW`{|KZKzRTZHlQ#9mAjz43Sxu8l9F}+a#(}P9^~*uPA8zUhZgoD+W{)WXl)0m zY^1dvpfZ-$c7V!mTH67t188jrsBWQ!9mwe#RL>x%Yvi&B)K*3=4<d1t2l*gzXn6q2 z^Qs^|C<8+4G+6mnfL3lqBekcBKzg8NfXcQQ5Fg15P(2Fb7K6l*)WsszizOgAkRqtP z$o`B&D=U%x32NgY^Fd_@OfSek=w&dnT2Q%)%m?+4V0uCRNI~*rIg<ZD=7PpBklQaX zeIPkde+<+I26?9f<S(e7L2@8H#I$W-YCvXy@*T)N5F3;~VDSnv57ssU$>CE6YV+V~ z10kCSO0&4sA%_*H&Oqja(jhV*RCdF{1QeE_bOv%S$eoo)^$bW3l(s<jg5*H)N3A*l z**&0s8nSypX%^<5YEU{viX%`T23aqt?~cp|^<|OGD#MdLLFoWlEhs&J!V2V9kQ}nP zpgt{fT;R)#$ofG2Ut~V0uY=47^`VjZps@zz_C6?0azgzd1s%Hp<r`4{8PvuFg&n93 z3#yYr?Fvvk6;z&p+IgV74r*(G@-iqMtB~>uXp9I{zo#OJfyS#qb#6LRzOZ0mU;x#T z8PGO<CX$>b0|NsnU1vet_1Q>c7FG-l450Ml#lXM-D${cq7#Kk1ZZ1-MS|hPR;mHm4 zCn!!q;SCyZ1ocZ@85kHq{XjPc1_n^uES`aZ0n`plU|?VXwI9+L7#Kk1Z5{&y1E@SI zWnf?c#d{3{0|O{dYmxj2>K}vbazYXVm6xD?6R1pqrH4WW1_n@g)gk%UhJk?rlrBJN z5M&03hP5R?WicopgUVA-egXC2K<z$IUIX>BK<NPFC(xKF$S>|tKO`cB8K}$yr9Dvj z0xCN|X%Up)Kr}3kfW%>Tg5*H<fyy+HeV}>;WFIKZK=y&s8pu9Sn1SpAg$>9)P}soI zGN?QOnF;D&fy@J?Jx~~_Fr+e6FcdJPG9)vUFk~|1F{CqCF(@#oGbAzOGvqVmFsL)= zfcdEmd0-W(3`J0}OokM&oGXJr11QdTahL^C$H2gcLsp$Zg8>x6xa47`YvR<e19cBM zZdSl)swR=9g2u<l3quA5W1O}l`~(UeNDM?1=^~J7P?&>gSm@#QXEl+gg2q*G`4iz< zP^b~-FOW)*3)LBjbpc2<y1xW*gkT;+K0_`;5<?LKsN^%pp-P>h7Vi6EhD<oSgdq`} z+6x&<8B*b*AhSvs@)=6uIY1qpZ;BW)!S+CM3dn`Tg%!x(`0@oPgcuksaJn5e)Ip(x z9F~-%7CoGHg4~2|6X_)duDq_!5DP8~aL1P-JT?&dA_pb>kz*d>(lUl3hD4;;O=C!8 zC}pUCngoe237kH*g{p&;QxFqDVT&*3K&c9!JjhIZ@{p7fj?+!ra5q`QS-Nmm4V<M0 zXCcxG$Zm))Y~Zq5aF#xtg@|cToIrFWGUPDiGZZlt!&QO85|;WI7!n86#fTJvaC<b| zrNsL}9H%c3A&VRm3=Ebybs*vgp%+`MAY4qmJDn-E6<b;$$0fcvT|(`YN{;J@iBHsY zER54XsPW0bV1rX7wvr0rdTNwe;W+IEl|PUiOSo)SXCPejfmDFX)jW7^BEBvJxdYY; z!5yxM+yM$B1_s>aF+wGxOoQkl#&l5bVqkC}BIH1RhSccl4A|QPAQj|>3ck`Gl*S+{ zIY7MxP!Ab|L8A|#o;s+f2;zg}KzvY-1k{rN@j)$okQ_)H)Zz#AR6u-CPX#0fQVVMR zgUkYr9)R?KdL5u%0jL)P>Se(6fqE&R-UbYV^niK|Abp^o4rrtXG}{7Fk8BReE@VBR zo)ip&dVHXs3#cap>Jfu_GB7z94eC9CdNm+3Kr;#;8e|`6wgJQj*#*KNcf;%l=>_$a zLH>a00m*^X<H8_$kY7OhK)q{_UeIVe$Zn7v$PN$&*#j~kgh6URZU^<=VeZG~2avg- io+HR^kRA{lq#q;>G81Gzh!3JcVj%lLG)N9a^8o-8a9+>= literal 0 HcmV?d00001 diff --git a/src/nasmParser/analysis/Analysis.java b/src/nasmParser/analysis/Analysis.java new file mode 100644 index 0000000..95c54f8 --- /dev/null +++ b/src/nasmParser/analysis/Analysis.java @@ -0,0 +1,159 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.analysis; + +import nasmParser.node.*; + +public interface Analysis extends Switch +{ + Object getIn(Node node); + void setIn(Node node, Object o); + Object getOut(Node node); + void setOut(Node node, Object o); + + void caseStart(Start node); + void caseAProg(AProg node); + void caseARecLinclude(ARecLinclude node); + void caseAEmptyLinclude(AEmptyLinclude node); + void caseAInclude(AInclude node); + void caseASimpleFilename(ASimpleFilename node); + void caseAComplexFilename(AComplexFilename node); + void caseANonemptySecdata(ANonemptySecdata node); + void caseAEmptySecdata(AEmptySecdata node); + void caseARecLconst(ARecLconst node); + void caseAEmptyLconst(AEmptyLconst node); + void caseADbConst(ADbConst node); + void caseADwConst(ADwConst node); + void caseADdConst(ADdConst node); + void caseADqConst(ADqConst node); + void caseADtConst(ADtConst node); + void caseANonemptySecbss(ANonemptySecbss node); + void caseAEmptySecbss(AEmptySecbss node); + void caseARecLvar(ARecLvar node); + void caseAEmptyLvar(AEmptyLvar node); + void caseAResbVar(AResbVar node); + void caseAReswVar(AReswVar node); + void caseAResdVar(AResdVar node); + void caseAResqVar(AResqVar node); + void caseARestVar(ARestVar node); + void caseASectext(ASectext node); + void caseARecLglobal(ARecLglobal node); + void caseAEmptyLglobal(AEmptyLglobal node); + void caseARecLinst(ARecLinst node); + void caseALastLinst(ALastLinst node); + void caseAMovInst(AMovInst node); + void caseAPushInst(APushInst node); + void caseAPopInst(APopInst node); + void caseAAddInst(AAddInst node); + void caseASubInst(ASubInst node); + void caseAImulInst(AImulInst node); + void caseAIdivInst(AIdivInst node); + void caseAAndInst(AAndInst node); + void caseAOrInst(AOrInst node); + void caseAXorInst(AXorInst node); + void caseANotInst(ANotInst node); + void caseACmpInst(ACmpInst node); + void caseAJmpInst(AJmpInst node); + void caseAJeInst(AJeInst node); + void caseAJneInst(AJneInst node); + void caseAJgInst(AJgInst node); + void caseAJgeInst(AJgeInst node); + void caseAJlInst(AJlInst node); + void caseACallInst(ACallInst node); + void caseARetInst(ARetInst node); + void caseAInterInst(AInterInst node); + void caseAAddressAcr(AAddressAcr node); + void caseANumconstAcr(ANumconstAcr node); + void caseARegisterAcr(ARegisterAcr node); + void caseAAddressAr(AAddressAr node); + void caseARegisterAr(ARegisterAr node); + void caseAAddress(AAddress node); + void caseAByteOpsizeof(AByteOpsizeof node); + void caseAWordOpsizeof(AWordOpsizeof node); + void caseADwordOpsizeof(ADwordOpsizeof node); + void caseAEmptyOpsizeof(AEmptyOpsizeof node); + void caseAPlusExp(APlusExp node); + void caseAMinusExp(AMinusExp node); + void caseANextExp(ANextExp node); + void caseATimesExp1(ATimesExp1 node); + void caseANextExp1(ANextExp1 node); + void caseALabelExp2(ALabelExp2 node); + void caseANumconstExp2(ANumconstExp2 node); + void caseARegisterExp2(ARegisterExp2 node); + void caseANumconst(ANumconst node); + void caseATempRegister(ATempRegister node); + void caseAEaxRegister(AEaxRegister node); + void caseAEbxRegister(AEbxRegister node); + void caseAEcxRegister(AEcxRegister node); + void caseAEdxRegister(AEdxRegister node); + void caseAEbpRegister(AEbpRegister node); + void caseAEspRegister(AEspRegister node); + void caseALabelOplabel(ALabelOplabel node); + void caseAEmptyOplabel(AEmptyOplabel node); + void caseALabel(ALabel node); + + void caseTSpaces(TSpaces node); + void caseTComment(TComment node); + void caseTPlus(TPlus node); + void caseTMinus(TMinus node); + void caseTTimes(TTimes node); + void caseTBrackopen(TBrackopen node); + void caseTBrackclose(TBrackclose node); + void caseTSemicol(TSemicol node); + void caseTComma(TComma node); + void caseTQuote(TQuote node); + void caseTDot(TDot node); + void caseTPercentage(TPercentage node); + void caseTByte(TByte node); + void caseTWord(TWord node); + void caseTDword(TDword node); + void caseTPrefixRegister(TPrefixRegister node); + void caseTInc(TInc node); + void caseTSection(TSection node); + void caseTData(TData node); + void caseTDefinebyte(TDefinebyte node); + void caseTDefineword(TDefineword node); + void caseTDefinedoubleword(TDefinedoubleword node); + void caseTDefinequadword(TDefinequadword node); + void caseTDefinetenbytes(TDefinetenbytes node); + void caseTBss(TBss node); + void caseTReservebyte(TReservebyte node); + void caseTReserveword(TReserveword node); + void caseTReservedoubleword(TReservedoubleword node); + void caseTReservequadword(TReservequadword node); + void caseTReservetenbytes(TReservetenbytes node); + void caseTText(TText node); + void caseTGlobal(TGlobal node); + void caseTMov(TMov node); + void caseTPush(TPush node); + void caseTPop(TPop node); + void caseTAdd(TAdd node); + void caseTSub(TSub node); + void caseTImul(TImul node); + void caseTIdiv(TIdiv node); + void caseTAnd(TAnd node); + void caseTOr(TOr node); + void caseTXor(TXor node); + void caseTNot(TNot node); + void caseTCmp(TCmp node); + void caseTJmp(TJmp node); + void caseTJe(TJe node); + void caseTJne(TJne node); + void caseTJg(TJg node); + void caseTJge(TJge node); + void caseTJl(TJl node); + void caseTJle(TJle node); + void caseTCall(TCall node); + void caseTRet(TRet node); + void caseTInt(TInt node); + void caseTEax(TEax node); + void caseTEbx(TEbx node); + void caseTEcx(TEcx node); + void caseTEdx(TEdx node); + void caseTEbp(TEbp node); + void caseTEsp(TEsp node); + void caseTNumber(TNumber node); + void caseTId(TId node); + void caseEOF(EOF node); + void caseInvalidToken(InvalidToken node); +} diff --git a/src/nasmParser/analysis/AnalysisAdapter.java b/src/nasmParser/analysis/AnalysisAdapter.java new file mode 100644 index 0000000..480ce54 --- /dev/null +++ b/src/nasmParser/analysis/AnalysisAdapter.java @@ -0,0 +1,939 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.analysis; + +import java.util.*; +import nasmParser.node.*; + +public class AnalysisAdapter implements Analysis +{ + private Hashtable<Node,Object> in; + private Hashtable<Node,Object> out; + + @Override + public Object getIn(Node node) + { + if(this.in == null) + { + return null; + } + + return this.in.get(node); + } + + @Override + public void setIn(Node node, Object o) + { + if(this.in == null) + { + this.in = new Hashtable<Node,Object>(1); + } + + if(o != null) + { + this.in.put(node, o); + } + else + { + this.in.remove(node); + } + } + + @Override + public Object getOut(Node node) + { + if(this.out == null) + { + return null; + } + + return this.out.get(node); + } + + @Override + public void setOut(Node node, Object o) + { + if(this.out == null) + { + this.out = new Hashtable<Node,Object>(1); + } + + if(o != null) + { + this.out.put(node, o); + } + else + { + this.out.remove(node); + } + } + + @Override + public void caseStart(Start node) + { + defaultCase(node); + } + + @Override + public void caseAProg(AProg node) + { + defaultCase(node); + } + + @Override + public void caseARecLinclude(ARecLinclude node) + { + defaultCase(node); + } + + @Override + public void caseAEmptyLinclude(AEmptyLinclude node) + { + defaultCase(node); + } + + @Override + public void caseAInclude(AInclude node) + { + defaultCase(node); + } + + @Override + public void caseASimpleFilename(ASimpleFilename node) + { + defaultCase(node); + } + + @Override + public void caseAComplexFilename(AComplexFilename node) + { + defaultCase(node); + } + + @Override + public void caseANonemptySecdata(ANonemptySecdata node) + { + defaultCase(node); + } + + @Override + public void caseAEmptySecdata(AEmptySecdata node) + { + defaultCase(node); + } + + @Override + public void caseARecLconst(ARecLconst node) + { + defaultCase(node); + } + + @Override + public void caseAEmptyLconst(AEmptyLconst node) + { + defaultCase(node); + } + + @Override + public void caseADbConst(ADbConst node) + { + defaultCase(node); + } + + @Override + public void caseADwConst(ADwConst node) + { + defaultCase(node); + } + + @Override + public void caseADdConst(ADdConst node) + { + defaultCase(node); + } + + @Override + public void caseADqConst(ADqConst node) + { + defaultCase(node); + } + + @Override + public void caseADtConst(ADtConst node) + { + defaultCase(node); + } + + @Override + public void caseANonemptySecbss(ANonemptySecbss node) + { + defaultCase(node); + } + + @Override + public void caseAEmptySecbss(AEmptySecbss node) + { + defaultCase(node); + } + + @Override + public void caseARecLvar(ARecLvar node) + { + defaultCase(node); + } + + @Override + public void caseAEmptyLvar(AEmptyLvar node) + { + defaultCase(node); + } + + @Override + public void caseAResbVar(AResbVar node) + { + defaultCase(node); + } + + @Override + public void caseAReswVar(AReswVar node) + { + defaultCase(node); + } + + @Override + public void caseAResdVar(AResdVar node) + { + defaultCase(node); + } + + @Override + public void caseAResqVar(AResqVar node) + { + defaultCase(node); + } + + @Override + public void caseARestVar(ARestVar node) + { + defaultCase(node); + } + + @Override + public void caseASectext(ASectext node) + { + defaultCase(node); + } + + @Override + public void caseARecLglobal(ARecLglobal node) + { + defaultCase(node); + } + + @Override + public void caseAEmptyLglobal(AEmptyLglobal node) + { + defaultCase(node); + } + + @Override + public void caseARecLinst(ARecLinst node) + { + defaultCase(node); + } + + @Override + public void caseALastLinst(ALastLinst node) + { + defaultCase(node); + } + + @Override + public void caseAMovInst(AMovInst node) + { + defaultCase(node); + } + + @Override + public void caseAPushInst(APushInst node) + { + defaultCase(node); + } + + @Override + public void caseAPopInst(APopInst node) + { + defaultCase(node); + } + + @Override + public void caseAAddInst(AAddInst node) + { + defaultCase(node); + } + + @Override + public void caseASubInst(ASubInst node) + { + defaultCase(node); + } + + @Override + public void caseAImulInst(AImulInst node) + { + defaultCase(node); + } + + @Override + public void caseAIdivInst(AIdivInst node) + { + defaultCase(node); + } + + @Override + public void caseAAndInst(AAndInst node) + { + defaultCase(node); + } + + @Override + public void caseAOrInst(AOrInst node) + { + defaultCase(node); + } + + @Override + public void caseAXorInst(AXorInst node) + { + defaultCase(node); + } + + @Override + public void caseANotInst(ANotInst node) + { + defaultCase(node); + } + + @Override + public void caseACmpInst(ACmpInst node) + { + defaultCase(node); + } + + @Override + public void caseAJmpInst(AJmpInst node) + { + defaultCase(node); + } + + @Override + public void caseAJeInst(AJeInst node) + { + defaultCase(node); + } + + @Override + public void caseAJneInst(AJneInst node) + { + defaultCase(node); + } + + @Override + public void caseAJgInst(AJgInst node) + { + defaultCase(node); + } + + @Override + public void caseAJgeInst(AJgeInst node) + { + defaultCase(node); + } + + @Override + public void caseAJlInst(AJlInst node) + { + defaultCase(node); + } + + @Override + public void caseACallInst(ACallInst node) + { + defaultCase(node); + } + + @Override + public void caseARetInst(ARetInst node) + { + defaultCase(node); + } + + @Override + public void caseAInterInst(AInterInst node) + { + defaultCase(node); + } + + @Override + public void caseAAddressAcr(AAddressAcr node) + { + defaultCase(node); + } + + @Override + public void caseANumconstAcr(ANumconstAcr node) + { + defaultCase(node); + } + + @Override + public void caseARegisterAcr(ARegisterAcr node) + { + defaultCase(node); + } + + @Override + public void caseAAddressAr(AAddressAr node) + { + defaultCase(node); + } + + @Override + public void caseARegisterAr(ARegisterAr node) + { + defaultCase(node); + } + + @Override + public void caseAAddress(AAddress node) + { + defaultCase(node); + } + + @Override + public void caseAByteOpsizeof(AByteOpsizeof node) + { + defaultCase(node); + } + + @Override + public void caseAWordOpsizeof(AWordOpsizeof node) + { + defaultCase(node); + } + + @Override + public void caseADwordOpsizeof(ADwordOpsizeof node) + { + defaultCase(node); + } + + @Override + public void caseAEmptyOpsizeof(AEmptyOpsizeof node) + { + defaultCase(node); + } + + @Override + public void caseAPlusExp(APlusExp node) + { + defaultCase(node); + } + + @Override + public void caseAMinusExp(AMinusExp node) + { + defaultCase(node); + } + + @Override + public void caseANextExp(ANextExp node) + { + defaultCase(node); + } + + @Override + public void caseATimesExp1(ATimesExp1 node) + { + defaultCase(node); + } + + @Override + public void caseANextExp1(ANextExp1 node) + { + defaultCase(node); + } + + @Override + public void caseALabelExp2(ALabelExp2 node) + { + defaultCase(node); + } + + @Override + public void caseANumconstExp2(ANumconstExp2 node) + { + defaultCase(node); + } + + @Override + public void caseARegisterExp2(ARegisterExp2 node) + { + defaultCase(node); + } + + @Override + public void caseANumconst(ANumconst node) + { + defaultCase(node); + } + + @Override + public void caseATempRegister(ATempRegister node) + { + defaultCase(node); + } + + @Override + public void caseAEaxRegister(AEaxRegister node) + { + defaultCase(node); + } + + @Override + public void caseAEbxRegister(AEbxRegister node) + { + defaultCase(node); + } + + @Override + public void caseAEcxRegister(AEcxRegister node) + { + defaultCase(node); + } + + @Override + public void caseAEdxRegister(AEdxRegister node) + { + defaultCase(node); + } + + @Override + public void caseAEbpRegister(AEbpRegister node) + { + defaultCase(node); + } + + @Override + public void caseAEspRegister(AEspRegister node) + { + defaultCase(node); + } + + @Override + public void caseALabelOplabel(ALabelOplabel node) + { + defaultCase(node); + } + + @Override + public void caseAEmptyOplabel(AEmptyOplabel node) + { + defaultCase(node); + } + + @Override + public void caseALabel(ALabel node) + { + defaultCase(node); + } + + @Override + public void caseTSpaces(TSpaces node) + { + defaultCase(node); + } + + @Override + public void caseTComment(TComment node) + { + defaultCase(node); + } + + @Override + public void caseTPlus(TPlus node) + { + defaultCase(node); + } + + @Override + public void caseTMinus(TMinus node) + { + defaultCase(node); + } + + @Override + public void caseTTimes(TTimes node) + { + defaultCase(node); + } + + @Override + public void caseTBrackopen(TBrackopen node) + { + defaultCase(node); + } + + @Override + public void caseTBrackclose(TBrackclose node) + { + defaultCase(node); + } + + @Override + public void caseTSemicol(TSemicol node) + { + defaultCase(node); + } + + @Override + public void caseTComma(TComma node) + { + defaultCase(node); + } + + @Override + public void caseTQuote(TQuote node) + { + defaultCase(node); + } + + @Override + public void caseTDot(TDot node) + { + defaultCase(node); + } + + @Override + public void caseTPercentage(TPercentage node) + { + defaultCase(node); + } + + @Override + public void caseTByte(TByte node) + { + defaultCase(node); + } + + @Override + public void caseTWord(TWord node) + { + defaultCase(node); + } + + @Override + public void caseTDword(TDword node) + { + defaultCase(node); + } + + @Override + public void caseTPrefixRegister(TPrefixRegister node) + { + defaultCase(node); + } + + @Override + public void caseTInc(TInc node) + { + defaultCase(node); + } + + @Override + public void caseTSection(TSection node) + { + defaultCase(node); + } + + @Override + public void caseTData(TData node) + { + defaultCase(node); + } + + @Override + public void caseTDefinebyte(TDefinebyte node) + { + defaultCase(node); + } + + @Override + public void caseTDefineword(TDefineword node) + { + defaultCase(node); + } + + @Override + public void caseTDefinedoubleword(TDefinedoubleword node) + { + defaultCase(node); + } + + @Override + public void caseTDefinequadword(TDefinequadword node) + { + defaultCase(node); + } + + @Override + public void caseTDefinetenbytes(TDefinetenbytes node) + { + defaultCase(node); + } + + @Override + public void caseTBss(TBss node) + { + defaultCase(node); + } + + @Override + public void caseTReservebyte(TReservebyte node) + { + defaultCase(node); + } + + @Override + public void caseTReserveword(TReserveword node) + { + defaultCase(node); + } + + @Override + public void caseTReservedoubleword(TReservedoubleword node) + { + defaultCase(node); + } + + @Override + public void caseTReservequadword(TReservequadword node) + { + defaultCase(node); + } + + @Override + public void caseTReservetenbytes(TReservetenbytes node) + { + defaultCase(node); + } + + @Override + public void caseTText(TText node) + { + defaultCase(node); + } + + @Override + public void caseTGlobal(TGlobal node) + { + defaultCase(node); + } + + @Override + public void caseTMov(TMov node) + { + defaultCase(node); + } + + @Override + public void caseTPush(TPush node) + { + defaultCase(node); + } + + @Override + public void caseTPop(TPop node) + { + defaultCase(node); + } + + @Override + public void caseTAdd(TAdd node) + { + defaultCase(node); + } + + @Override + public void caseTSub(TSub node) + { + defaultCase(node); + } + + @Override + public void caseTImul(TImul node) + { + defaultCase(node); + } + + @Override + public void caseTIdiv(TIdiv node) + { + defaultCase(node); + } + + @Override + public void caseTAnd(TAnd node) + { + defaultCase(node); + } + + @Override + public void caseTOr(TOr node) + { + defaultCase(node); + } + + @Override + public void caseTXor(TXor node) + { + defaultCase(node); + } + + @Override + public void caseTNot(TNot node) + { + defaultCase(node); + } + + @Override + public void caseTCmp(TCmp node) + { + defaultCase(node); + } + + @Override + public void caseTJmp(TJmp node) + { + defaultCase(node); + } + + @Override + public void caseTJe(TJe node) + { + defaultCase(node); + } + + @Override + public void caseTJne(TJne node) + { + defaultCase(node); + } + + @Override + public void caseTJg(TJg node) + { + defaultCase(node); + } + + @Override + public void caseTJge(TJge node) + { + defaultCase(node); + } + + @Override + public void caseTJl(TJl node) + { + defaultCase(node); + } + + @Override + public void caseTJle(TJle node) + { + defaultCase(node); + } + + @Override + public void caseTCall(TCall node) + { + defaultCase(node); + } + + @Override + public void caseTRet(TRet node) + { + defaultCase(node); + } + + @Override + public void caseTInt(TInt node) + { + defaultCase(node); + } + + @Override + public void caseTEax(TEax node) + { + defaultCase(node); + } + + @Override + public void caseTEbx(TEbx node) + { + defaultCase(node); + } + + @Override + public void caseTEcx(TEcx node) + { + defaultCase(node); + } + + @Override + public void caseTEdx(TEdx node) + { + defaultCase(node); + } + + @Override + public void caseTEbp(TEbp node) + { + defaultCase(node); + } + + @Override + public void caseTEsp(TEsp node) + { + defaultCase(node); + } + + @Override + public void caseTNumber(TNumber node) + { + defaultCase(node); + } + + @Override + public void caseTId(TId node) + { + defaultCase(node); + } + + @Override + public void caseEOF(EOF node) + { + defaultCase(node); + } + + @Override + public void caseInvalidToken(InvalidToken node) + { + defaultCase(node); + } + + public void defaultCase(@SuppressWarnings("unused") Node node) + { + // do nothing + } +} diff --git a/src/nasmParser/analysis/DepthFirstAdapter.java b/src/nasmParser/analysis/DepthFirstAdapter.java new file mode 100644 index 0000000..2d46825 --- /dev/null +++ b/src/nasmParser/analysis/DepthFirstAdapter.java @@ -0,0 +1,2121 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.analysis; + +import java.util.*; +import nasmParser.node.*; + +public class DepthFirstAdapter extends AnalysisAdapter +{ + 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.getPProg().apply(this); + node.getEOF().apply(this); + outStart(node); + } + + public void inAProg(AProg node) + { + defaultIn(node); + } + + public void outAProg(AProg node) + { + defaultOut(node); + } + + @Override + public void caseAProg(AProg node) + { + inAProg(node); + if(node.getLinclude() != null) + { + node.getLinclude().apply(this); + } + if(node.getSecdata() != null) + { + node.getSecdata().apply(this); + } + if(node.getSecbss() != null) + { + node.getSecbss().apply(this); + } + if(node.getSectext() != null) + { + node.getSectext().apply(this); + } + outAProg(node); + } + + public void inARecLinclude(ARecLinclude node) + { + defaultIn(node); + } + + public void outARecLinclude(ARecLinclude node) + { + defaultOut(node); + } + + @Override + public void caseARecLinclude(ARecLinclude node) + { + inARecLinclude(node); + if(node.getInclude() != null) + { + node.getInclude().apply(this); + } + if(node.getLinclude() != null) + { + node.getLinclude().apply(this); + } + outARecLinclude(node); + } + + public void inAEmptyLinclude(AEmptyLinclude node) + { + defaultIn(node); + } + + public void outAEmptyLinclude(AEmptyLinclude node) + { + defaultOut(node); + } + + @Override + public void caseAEmptyLinclude(AEmptyLinclude node) + { + inAEmptyLinclude(node); + outAEmptyLinclude(node); + } + + public void inAInclude(AInclude node) + { + defaultIn(node); + } + + public void outAInclude(AInclude node) + { + defaultOut(node); + } + + @Override + public void caseAInclude(AInclude node) + { + inAInclude(node); + if(node.getPercentage() != null) + { + node.getPercentage().apply(this); + } + if(node.getInc() != null) + { + node.getInc().apply(this); + } + if(node.getOpen() != null) + { + node.getOpen().apply(this); + } + if(node.getFilename() != null) + { + node.getFilename().apply(this); + } + if(node.getClose() != null) + { + node.getClose().apply(this); + } + outAInclude(node); + } + + public void inASimpleFilename(ASimpleFilename node) + { + defaultIn(node); + } + + public void outASimpleFilename(ASimpleFilename node) + { + defaultOut(node); + } + + @Override + public void caseASimpleFilename(ASimpleFilename node) + { + inASimpleFilename(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outASimpleFilename(node); + } + + public void inAComplexFilename(AComplexFilename node) + { + defaultIn(node); + } + + public void outAComplexFilename(AComplexFilename node) + { + defaultOut(node); + } + + @Override + public void caseAComplexFilename(AComplexFilename node) + { + inAComplexFilename(node); + if(node.getPrefix() != null) + { + node.getPrefix().apply(this); + } + if(node.getDot() != null) + { + node.getDot().apply(this); + } + if(node.getSuffix() != null) + { + node.getSuffix().apply(this); + } + outAComplexFilename(node); + } + + public void inANonemptySecdata(ANonemptySecdata node) + { + defaultIn(node); + } + + public void outANonemptySecdata(ANonemptySecdata node) + { + defaultOut(node); + } + + @Override + public void caseANonemptySecdata(ANonemptySecdata node) + { + inANonemptySecdata(node); + if(node.getSection() != null) + { + node.getSection().apply(this); + } + if(node.getData() != null) + { + node.getData().apply(this); + } + if(node.getLconst() != null) + { + node.getLconst().apply(this); + } + outANonemptySecdata(node); + } + + public void inAEmptySecdata(AEmptySecdata node) + { + defaultIn(node); + } + + public void outAEmptySecdata(AEmptySecdata node) + { + defaultOut(node); + } + + @Override + public void caseAEmptySecdata(AEmptySecdata node) + { + inAEmptySecdata(node); + outAEmptySecdata(node); + } + + public void inARecLconst(ARecLconst node) + { + defaultIn(node); + } + + public void outARecLconst(ARecLconst node) + { + defaultOut(node); + } + + @Override + public void caseARecLconst(ARecLconst node) + { + inARecLconst(node); + if(node.getConst() != null) + { + node.getConst().apply(this); + } + if(node.getLconst() != null) + { + node.getLconst().apply(this); + } + outARecLconst(node); + } + + public void inAEmptyLconst(AEmptyLconst node) + { + defaultIn(node); + } + + public void outAEmptyLconst(AEmptyLconst node) + { + defaultOut(node); + } + + @Override + public void caseAEmptyLconst(AEmptyLconst node) + { + inAEmptyLconst(node); + outAEmptyLconst(node); + } + + public void inADbConst(ADbConst node) + { + defaultIn(node); + } + + public void outADbConst(ADbConst node) + { + defaultOut(node); + } + + @Override + public void caseADbConst(ADbConst node) + { + inADbConst(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getDefinebyte() != null) + { + node.getDefinebyte().apply(this); + } + if(node.getNumconst() != null) + { + node.getNumconst().apply(this); + } + outADbConst(node); + } + + public void inADwConst(ADwConst node) + { + defaultIn(node); + } + + public void outADwConst(ADwConst node) + { + defaultOut(node); + } + + @Override + public void caseADwConst(ADwConst node) + { + inADwConst(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getDefineword() != null) + { + node.getDefineword().apply(this); + } + if(node.getNumconst() != null) + { + node.getNumconst().apply(this); + } + outADwConst(node); + } + + public void inADdConst(ADdConst node) + { + defaultIn(node); + } + + public void outADdConst(ADdConst node) + { + defaultOut(node); + } + + @Override + public void caseADdConst(ADdConst node) + { + inADdConst(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getDefinedoubleword() != null) + { + node.getDefinedoubleword().apply(this); + } + if(node.getNumconst() != null) + { + node.getNumconst().apply(this); + } + outADdConst(node); + } + + public void inADqConst(ADqConst node) + { + defaultIn(node); + } + + public void outADqConst(ADqConst node) + { + defaultOut(node); + } + + @Override + public void caseADqConst(ADqConst node) + { + inADqConst(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getDefinequadword() != null) + { + node.getDefinequadword().apply(this); + } + if(node.getNumconst() != null) + { + node.getNumconst().apply(this); + } + outADqConst(node); + } + + public void inADtConst(ADtConst node) + { + defaultIn(node); + } + + public void outADtConst(ADtConst node) + { + defaultOut(node); + } + + @Override + public void caseADtConst(ADtConst node) + { + inADtConst(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getDefinetenbytes() != null) + { + node.getDefinetenbytes().apply(this); + } + if(node.getNumconst() != null) + { + node.getNumconst().apply(this); + } + outADtConst(node); + } + + public void inANonemptySecbss(ANonemptySecbss node) + { + defaultIn(node); + } + + public void outANonemptySecbss(ANonemptySecbss node) + { + defaultOut(node); + } + + @Override + public void caseANonemptySecbss(ANonemptySecbss node) + { + inANonemptySecbss(node); + if(node.getSection() != null) + { + node.getSection().apply(this); + } + if(node.getBss() != null) + { + node.getBss().apply(this); + } + if(node.getLvar() != null) + { + node.getLvar().apply(this); + } + outANonemptySecbss(node); + } + + public void inAEmptySecbss(AEmptySecbss node) + { + defaultIn(node); + } + + public void outAEmptySecbss(AEmptySecbss node) + { + defaultOut(node); + } + + @Override + public void caseAEmptySecbss(AEmptySecbss node) + { + inAEmptySecbss(node); + outAEmptySecbss(node); + } + + public void inARecLvar(ARecLvar node) + { + defaultIn(node); + } + + public void outARecLvar(ARecLvar node) + { + defaultOut(node); + } + + @Override + public void caseARecLvar(ARecLvar node) + { + inARecLvar(node); + if(node.getVar() != null) + { + node.getVar().apply(this); + } + if(node.getLvar() != null) + { + node.getLvar().apply(this); + } + outARecLvar(node); + } + + public void inAEmptyLvar(AEmptyLvar node) + { + defaultIn(node); + } + + public void outAEmptyLvar(AEmptyLvar node) + { + defaultOut(node); + } + + @Override + public void caseAEmptyLvar(AEmptyLvar node) + { + inAEmptyLvar(node); + outAEmptyLvar(node); + } + + public void inAResbVar(AResbVar node) + { + defaultIn(node); + } + + public void outAResbVar(AResbVar node) + { + defaultOut(node); + } + + @Override + public void caseAResbVar(AResbVar node) + { + inAResbVar(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getSemicol() != null) + { + node.getSemicol().apply(this); + } + if(node.getReservebyte() != null) + { + node.getReservebyte().apply(this); + } + if(node.getNumber() != null) + { + node.getNumber().apply(this); + } + outAResbVar(node); + } + + public void inAReswVar(AReswVar node) + { + defaultIn(node); + } + + public void outAReswVar(AReswVar node) + { + defaultOut(node); + } + + @Override + public void caseAReswVar(AReswVar node) + { + inAReswVar(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getSemicol() != null) + { + node.getSemicol().apply(this); + } + if(node.getReserveword() != null) + { + node.getReserveword().apply(this); + } + if(node.getNumber() != null) + { + node.getNumber().apply(this); + } + outAReswVar(node); + } + + public void inAResdVar(AResdVar node) + { + defaultIn(node); + } + + public void outAResdVar(AResdVar node) + { + defaultOut(node); + } + + @Override + public void caseAResdVar(AResdVar node) + { + inAResdVar(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getSemicol() != null) + { + node.getSemicol().apply(this); + } + if(node.getReservedoubleword() != null) + { + node.getReservedoubleword().apply(this); + } + if(node.getNumber() != null) + { + node.getNumber().apply(this); + } + outAResdVar(node); + } + + public void inAResqVar(AResqVar node) + { + defaultIn(node); + } + + public void outAResqVar(AResqVar node) + { + defaultOut(node); + } + + @Override + public void caseAResqVar(AResqVar node) + { + inAResqVar(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getSemicol() != null) + { + node.getSemicol().apply(this); + } + if(node.getReservequadword() != null) + { + node.getReservequadword().apply(this); + } + if(node.getNumber() != null) + { + node.getNumber().apply(this); + } + outAResqVar(node); + } + + public void inARestVar(ARestVar node) + { + defaultIn(node); + } + + public void outARestVar(ARestVar node) + { + defaultOut(node); + } + + @Override + public void caseARestVar(ARestVar node) + { + inARestVar(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getSemicol() != null) + { + node.getSemicol().apply(this); + } + if(node.getReservetenbytes() != null) + { + node.getReservetenbytes().apply(this); + } + if(node.getNumber() != null) + { + node.getNumber().apply(this); + } + outARestVar(node); + } + + public void inASectext(ASectext node) + { + defaultIn(node); + } + + public void outASectext(ASectext node) + { + defaultOut(node); + } + + @Override + public void caseASectext(ASectext node) + { + inASectext(node); + if(node.getSection() != null) + { + node.getSection().apply(this); + } + if(node.getText() != null) + { + node.getText().apply(this); + } + if(node.getLglobal() != null) + { + node.getLglobal().apply(this); + } + if(node.getLinst() != null) + { + node.getLinst().apply(this); + } + outASectext(node); + } + + public void inARecLglobal(ARecLglobal node) + { + defaultIn(node); + } + + public void outARecLglobal(ARecLglobal node) + { + defaultOut(node); + } + + @Override + public void caseARecLglobal(ARecLglobal node) + { + inARecLglobal(node); + if(node.getGlobal() != null) + { + node.getGlobal().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getLglobal() != null) + { + node.getLglobal().apply(this); + } + outARecLglobal(node); + } + + public void inAEmptyLglobal(AEmptyLglobal node) + { + defaultIn(node); + } + + public void outAEmptyLglobal(AEmptyLglobal node) + { + defaultOut(node); + } + + @Override + public void caseAEmptyLglobal(AEmptyLglobal node) + { + inAEmptyLglobal(node); + outAEmptyLglobal(node); + } + + public void inARecLinst(ARecLinst node) + { + defaultIn(node); + } + + public void outARecLinst(ARecLinst node) + { + defaultOut(node); + } + + @Override + public void caseARecLinst(ARecLinst node) + { + inARecLinst(node); + if(node.getInst() != null) + { + node.getInst().apply(this); + } + if(node.getLinst() != null) + { + node.getLinst().apply(this); + } + outARecLinst(node); + } + + public void inALastLinst(ALastLinst node) + { + defaultIn(node); + } + + public void outALastLinst(ALastLinst node) + { + defaultOut(node); + } + + @Override + public void caseALastLinst(ALastLinst node) + { + inALastLinst(node); + if(node.getInst() != null) + { + node.getInst().apply(this); + } + outALastLinst(node); + } + + public void inAMovInst(AMovInst node) + { + defaultIn(node); + } + + public void outAMovInst(AMovInst node) + { + defaultOut(node); + } + + @Override + public void caseAMovInst(AMovInst node) + { + inAMovInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getMov() != null) + { + node.getMov().apply(this); + } + if(node.getAr() != null) + { + node.getAr().apply(this); + } + if(node.getComma() != null) + { + node.getComma().apply(this); + } + if(node.getAcr() != null) + { + node.getAcr().apply(this); + } + outAMovInst(node); + } + + public void inAPushInst(APushInst node) + { + defaultIn(node); + } + + public void outAPushInst(APushInst node) + { + defaultOut(node); + } + + @Override + public void caseAPushInst(APushInst node) + { + inAPushInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getPush() != null) + { + node.getPush().apply(this); + } + if(node.getAcr() != null) + { + node.getAcr().apply(this); + } + outAPushInst(node); + } + + public void inAPopInst(APopInst node) + { + defaultIn(node); + } + + public void outAPopInst(APopInst node) + { + defaultOut(node); + } + + @Override + public void caseAPopInst(APopInst node) + { + inAPopInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getPop() != null) + { + node.getPop().apply(this); + } + if(node.getAr() != null) + { + node.getAr().apply(this); + } + outAPopInst(node); + } + + public void inAAddInst(AAddInst node) + { + defaultIn(node); + } + + public void outAAddInst(AAddInst node) + { + defaultOut(node); + } + + @Override + public void caseAAddInst(AAddInst node) + { + inAAddInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getAdd() != null) + { + node.getAdd().apply(this); + } + if(node.getAr() != null) + { + node.getAr().apply(this); + } + if(node.getComma() != null) + { + node.getComma().apply(this); + } + if(node.getAcr() != null) + { + node.getAcr().apply(this); + } + outAAddInst(node); + } + + public void inASubInst(ASubInst node) + { + defaultIn(node); + } + + public void outASubInst(ASubInst node) + { + defaultOut(node); + } + + @Override + public void caseASubInst(ASubInst node) + { + inASubInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getSub() != null) + { + node.getSub().apply(this); + } + if(node.getAr() != null) + { + node.getAr().apply(this); + } + if(node.getComma() != null) + { + node.getComma().apply(this); + } + if(node.getAcr() != null) + { + node.getAcr().apply(this); + } + outASubInst(node); + } + + public void inAImulInst(AImulInst node) + { + defaultIn(node); + } + + public void outAImulInst(AImulInst node) + { + defaultOut(node); + } + + @Override + public void caseAImulInst(AImulInst node) + { + inAImulInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getImul() != null) + { + node.getImul().apply(this); + } + if(node.getAr() != null) + { + node.getAr().apply(this); + } + if(node.getComma() != null) + { + node.getComma().apply(this); + } + if(node.getAcr() != null) + { + node.getAcr().apply(this); + } + outAImulInst(node); + } + + public void inAIdivInst(AIdivInst node) + { + defaultIn(node); + } + + public void outAIdivInst(AIdivInst node) + { + defaultOut(node); + } + + @Override + public void caseAIdivInst(AIdivInst node) + { + inAIdivInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getIdiv() != null) + { + node.getIdiv().apply(this); + } + if(node.getAr() != null) + { + node.getAr().apply(this); + } + outAIdivInst(node); + } + + public void inAAndInst(AAndInst node) + { + defaultIn(node); + } + + public void outAAndInst(AAndInst node) + { + defaultOut(node); + } + + @Override + public void caseAAndInst(AAndInst node) + { + inAAndInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getAnd() != null) + { + node.getAnd().apply(this); + } + if(node.getAr() != null) + { + node.getAr().apply(this); + } + if(node.getComma() != null) + { + node.getComma().apply(this); + } + if(node.getAcr() != null) + { + node.getAcr().apply(this); + } + outAAndInst(node); + } + + public void inAOrInst(AOrInst node) + { + defaultIn(node); + } + + public void outAOrInst(AOrInst node) + { + defaultOut(node); + } + + @Override + public void caseAOrInst(AOrInst node) + { + inAOrInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getOr() != null) + { + node.getOr().apply(this); + } + if(node.getAr() != null) + { + node.getAr().apply(this); + } + if(node.getComma() != null) + { + node.getComma().apply(this); + } + if(node.getAcr() != null) + { + node.getAcr().apply(this); + } + outAOrInst(node); + } + + public void inAXorInst(AXorInst node) + { + defaultIn(node); + } + + public void outAXorInst(AXorInst node) + { + defaultOut(node); + } + + @Override + public void caseAXorInst(AXorInst node) + { + inAXorInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getXor() != null) + { + node.getXor().apply(this); + } + if(node.getAr() != null) + { + node.getAr().apply(this); + } + if(node.getComma() != null) + { + node.getComma().apply(this); + } + if(node.getAcr() != null) + { + node.getAcr().apply(this); + } + outAXorInst(node); + } + + public void inANotInst(ANotInst node) + { + defaultIn(node); + } + + public void outANotInst(ANotInst node) + { + defaultOut(node); + } + + @Override + public void caseANotInst(ANotInst node) + { + inANotInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getNot() != null) + { + node.getNot().apply(this); + } + if(node.getAr() != null) + { + node.getAr().apply(this); + } + outANotInst(node); + } + + public void inACmpInst(ACmpInst node) + { + defaultIn(node); + } + + public void outACmpInst(ACmpInst node) + { + defaultOut(node); + } + + @Override + public void caseACmpInst(ACmpInst node) + { + inACmpInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getCmp() != null) + { + node.getCmp().apply(this); + } + if(node.getAr() != null) + { + node.getAr().apply(this); + } + if(node.getComma() != null) + { + node.getComma().apply(this); + } + if(node.getAcr() != null) + { + node.getAcr().apply(this); + } + outACmpInst(node); + } + + public void inAJmpInst(AJmpInst node) + { + defaultIn(node); + } + + public void outAJmpInst(AJmpInst node) + { + defaultOut(node); + } + + @Override + public void caseAJmpInst(AJmpInst node) + { + inAJmpInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getJmp() != null) + { + node.getJmp().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outAJmpInst(node); + } + + public void inAJeInst(AJeInst node) + { + defaultIn(node); + } + + public void outAJeInst(AJeInst node) + { + defaultOut(node); + } + + @Override + public void caseAJeInst(AJeInst node) + { + inAJeInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getJe() != null) + { + node.getJe().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outAJeInst(node); + } + + public void inAJneInst(AJneInst node) + { + defaultIn(node); + } + + public void outAJneInst(AJneInst node) + { + defaultOut(node); + } + + @Override + public void caseAJneInst(AJneInst node) + { + inAJneInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getJne() != null) + { + node.getJne().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outAJneInst(node); + } + + public void inAJgInst(AJgInst node) + { + defaultIn(node); + } + + public void outAJgInst(AJgInst node) + { + defaultOut(node); + } + + @Override + public void caseAJgInst(AJgInst node) + { + inAJgInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getJg() != null) + { + node.getJg().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outAJgInst(node); + } + + public void inAJgeInst(AJgeInst node) + { + defaultIn(node); + } + + public void outAJgeInst(AJgeInst node) + { + defaultOut(node); + } + + @Override + public void caseAJgeInst(AJgeInst node) + { + inAJgeInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getJge() != null) + { + node.getJge().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outAJgeInst(node); + } + + public void inAJlInst(AJlInst node) + { + defaultIn(node); + } + + public void outAJlInst(AJlInst node) + { + defaultOut(node); + } + + @Override + public void caseAJlInst(AJlInst node) + { + inAJlInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getJl() != null) + { + node.getJl().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outAJlInst(node); + } + + public void inACallInst(ACallInst node) + { + defaultIn(node); + } + + public void outACallInst(ACallInst node) + { + defaultOut(node); + } + + @Override + public void caseACallInst(ACallInst node) + { + inACallInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getCall() != null) + { + node.getCall().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outACallInst(node); + } + + public void inARetInst(ARetInst node) + { + defaultIn(node); + } + + public void outARetInst(ARetInst node) + { + defaultOut(node); + } + + @Override + public void caseARetInst(ARetInst node) + { + inARetInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getRet() != null) + { + node.getRet().apply(this); + } + outARetInst(node); + } + + public void inAInterInst(AInterInst node) + { + defaultIn(node); + } + + public void outAInterInst(AInterInst node) + { + defaultOut(node); + } + + @Override + public void caseAInterInst(AInterInst node) + { + inAInterInst(node); + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + if(node.getInt() != null) + { + node.getInt().apply(this); + } + outAInterInst(node); + } + + public void inAAddressAcr(AAddressAcr node) + { + defaultIn(node); + } + + public void outAAddressAcr(AAddressAcr node) + { + defaultOut(node); + } + + @Override + public void caseAAddressAcr(AAddressAcr node) + { + inAAddressAcr(node); + if(node.getAddress() != null) + { + node.getAddress().apply(this); + } + outAAddressAcr(node); + } + + public void inANumconstAcr(ANumconstAcr node) + { + defaultIn(node); + } + + public void outANumconstAcr(ANumconstAcr node) + { + defaultOut(node); + } + + @Override + public void caseANumconstAcr(ANumconstAcr node) + { + inANumconstAcr(node); + if(node.getNumconst() != null) + { + node.getNumconst().apply(this); + } + outANumconstAcr(node); + } + + public void inARegisterAcr(ARegisterAcr node) + { + defaultIn(node); + } + + public void outARegisterAcr(ARegisterAcr node) + { + defaultOut(node); + } + + @Override + public void caseARegisterAcr(ARegisterAcr node) + { + inARegisterAcr(node); + if(node.getRegister() != null) + { + node.getRegister().apply(this); + } + outARegisterAcr(node); + } + + public void inAAddressAr(AAddressAr node) + { + defaultIn(node); + } + + public void outAAddressAr(AAddressAr node) + { + defaultOut(node); + } + + @Override + public void caseAAddressAr(AAddressAr node) + { + inAAddressAr(node); + if(node.getAddress() != null) + { + node.getAddress().apply(this); + } + outAAddressAr(node); + } + + public void inARegisterAr(ARegisterAr node) + { + defaultIn(node); + } + + public void outARegisterAr(ARegisterAr node) + { + defaultOut(node); + } + + @Override + public void caseARegisterAr(ARegisterAr node) + { + inARegisterAr(node); + if(node.getRegister() != null) + { + node.getRegister().apply(this); + } + outARegisterAr(node); + } + + public void inAAddress(AAddress node) + { + defaultIn(node); + } + + public void outAAddress(AAddress node) + { + defaultOut(node); + } + + @Override + public void caseAAddress(AAddress node) + { + inAAddress(node); + if(node.getOpsizeof() != null) + { + node.getOpsizeof().apply(this); + } + if(node.getBrackopen() != null) + { + node.getBrackopen().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getBrackclose() != null) + { + node.getBrackclose().apply(this); + } + outAAddress(node); + } + + public void inAByteOpsizeof(AByteOpsizeof node) + { + defaultIn(node); + } + + public void outAByteOpsizeof(AByteOpsizeof node) + { + defaultOut(node); + } + + @Override + public void caseAByteOpsizeof(AByteOpsizeof node) + { + inAByteOpsizeof(node); + if(node.getByte() != null) + { + node.getByte().apply(this); + } + outAByteOpsizeof(node); + } + + public void inAWordOpsizeof(AWordOpsizeof node) + { + defaultIn(node); + } + + public void outAWordOpsizeof(AWordOpsizeof node) + { + defaultOut(node); + } + + @Override + public void caseAWordOpsizeof(AWordOpsizeof node) + { + inAWordOpsizeof(node); + if(node.getWord() != null) + { + node.getWord().apply(this); + } + outAWordOpsizeof(node); + } + + public void inADwordOpsizeof(ADwordOpsizeof node) + { + defaultIn(node); + } + + public void outADwordOpsizeof(ADwordOpsizeof node) + { + defaultOut(node); + } + + @Override + public void caseADwordOpsizeof(ADwordOpsizeof node) + { + inADwordOpsizeof(node); + if(node.getDword() != null) + { + node.getDword().apply(this); + } + outADwordOpsizeof(node); + } + + public void inAEmptyOpsizeof(AEmptyOpsizeof node) + { + defaultIn(node); + } + + public void outAEmptyOpsizeof(AEmptyOpsizeof node) + { + defaultOut(node); + } + + @Override + public void caseAEmptyOpsizeof(AEmptyOpsizeof node) + { + inAEmptyOpsizeof(node); + outAEmptyOpsizeof(node); + } + + public void inAPlusExp(APlusExp node) + { + defaultIn(node); + } + + public void outAPlusExp(APlusExp node) + { + defaultOut(node); + } + + @Override + public void caseAPlusExp(APlusExp node) + { + inAPlusExp(node); + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getPlus() != null) + { + node.getPlus().apply(this); + } + if(node.getExp1() != null) + { + node.getExp1().apply(this); + } + outAPlusExp(node); + } + + public void inAMinusExp(AMinusExp node) + { + defaultIn(node); + } + + public void outAMinusExp(AMinusExp node) + { + defaultOut(node); + } + + @Override + public void caseAMinusExp(AMinusExp node) + { + inAMinusExp(node); + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getMinus() != null) + { + node.getMinus().apply(this); + } + if(node.getExp1() != null) + { + node.getExp1().apply(this); + } + outAMinusExp(node); + } + + public void inANextExp(ANextExp node) + { + defaultIn(node); + } + + public void outANextExp(ANextExp node) + { + defaultOut(node); + } + + @Override + public void caseANextExp(ANextExp node) + { + inANextExp(node); + if(node.getExp1() != null) + { + node.getExp1().apply(this); + } + outANextExp(node); + } + + public void inATimesExp1(ATimesExp1 node) + { + defaultIn(node); + } + + public void outATimesExp1(ATimesExp1 node) + { + defaultOut(node); + } + + @Override + public void caseATimesExp1(ATimesExp1 node) + { + inATimesExp1(node); + if(node.getExp1() != null) + { + node.getExp1().apply(this); + } + if(node.getTimes() != null) + { + node.getTimes().apply(this); + } + if(node.getExp2() != null) + { + node.getExp2().apply(this); + } + outATimesExp1(node); + } + + public void inANextExp1(ANextExp1 node) + { + defaultIn(node); + } + + public void outANextExp1(ANextExp1 node) + { + defaultOut(node); + } + + @Override + public void caseANextExp1(ANextExp1 node) + { + inANextExp1(node); + if(node.getExp2() != null) + { + node.getExp2().apply(this); + } + outANextExp1(node); + } + + public void inALabelExp2(ALabelExp2 node) + { + defaultIn(node); + } + + public void outALabelExp2(ALabelExp2 node) + { + defaultOut(node); + } + + @Override + public void caseALabelExp2(ALabelExp2 node) + { + inALabelExp2(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outALabelExp2(node); + } + + public void inANumconstExp2(ANumconstExp2 node) + { + defaultIn(node); + } + + public void outANumconstExp2(ANumconstExp2 node) + { + defaultOut(node); + } + + @Override + public void caseANumconstExp2(ANumconstExp2 node) + { + inANumconstExp2(node); + if(node.getNumconst() != null) + { + node.getNumconst().apply(this); + } + outANumconstExp2(node); + } + + public void inARegisterExp2(ARegisterExp2 node) + { + defaultIn(node); + } + + public void outARegisterExp2(ARegisterExp2 node) + { + defaultOut(node); + } + + @Override + public void caseARegisterExp2(ARegisterExp2 node) + { + inARegisterExp2(node); + if(node.getRegister() != null) + { + node.getRegister().apply(this); + } + outARegisterExp2(node); + } + + public void inANumconst(ANumconst node) + { + defaultIn(node); + } + + public void outANumconst(ANumconst node) + { + defaultOut(node); + } + + @Override + public void caseANumconst(ANumconst node) + { + inANumconst(node); + if(node.getNumber() != null) + { + node.getNumber().apply(this); + } + outANumconst(node); + } + + public void inATempRegister(ATempRegister node) + { + defaultIn(node); + } + + public void outATempRegister(ATempRegister node) + { + defaultOut(node); + } + + @Override + public void caseATempRegister(ATempRegister node) + { + inATempRegister(node); + if(node.getPrefixRegister() != null) + { + node.getPrefixRegister().apply(this); + } + if(node.getNumber() != null) + { + node.getNumber().apply(this); + } + outATempRegister(node); + } + + public void inAEaxRegister(AEaxRegister node) + { + defaultIn(node); + } + + public void outAEaxRegister(AEaxRegister node) + { + defaultOut(node); + } + + @Override + public void caseAEaxRegister(AEaxRegister node) + { + inAEaxRegister(node); + if(node.getEax() != null) + { + node.getEax().apply(this); + } + outAEaxRegister(node); + } + + public void inAEbxRegister(AEbxRegister node) + { + defaultIn(node); + } + + public void outAEbxRegister(AEbxRegister node) + { + defaultOut(node); + } + + @Override + public void caseAEbxRegister(AEbxRegister node) + { + inAEbxRegister(node); + if(node.getEbx() != null) + { + node.getEbx().apply(this); + } + outAEbxRegister(node); + } + + public void inAEcxRegister(AEcxRegister node) + { + defaultIn(node); + } + + public void outAEcxRegister(AEcxRegister node) + { + defaultOut(node); + } + + @Override + public void caseAEcxRegister(AEcxRegister node) + { + inAEcxRegister(node); + if(node.getEcx() != null) + { + node.getEcx().apply(this); + } + outAEcxRegister(node); + } + + public void inAEdxRegister(AEdxRegister node) + { + defaultIn(node); + } + + public void outAEdxRegister(AEdxRegister node) + { + defaultOut(node); + } + + @Override + public void caseAEdxRegister(AEdxRegister node) + { + inAEdxRegister(node); + if(node.getEdx() != null) + { + node.getEdx().apply(this); + } + outAEdxRegister(node); + } + + public void inAEbpRegister(AEbpRegister node) + { + defaultIn(node); + } + + public void outAEbpRegister(AEbpRegister node) + { + defaultOut(node); + } + + @Override + public void caseAEbpRegister(AEbpRegister node) + { + inAEbpRegister(node); + if(node.getEbp() != null) + { + node.getEbp().apply(this); + } + outAEbpRegister(node); + } + + public void inAEspRegister(AEspRegister node) + { + defaultIn(node); + } + + public void outAEspRegister(AEspRegister node) + { + defaultOut(node); + } + + @Override + public void caseAEspRegister(AEspRegister node) + { + inAEspRegister(node); + if(node.getEsp() != null) + { + node.getEsp().apply(this); + } + outAEspRegister(node); + } + + public void inALabelOplabel(ALabelOplabel node) + { + defaultIn(node); + } + + public void outALabelOplabel(ALabelOplabel node) + { + defaultOut(node); + } + + @Override + public void caseALabelOplabel(ALabelOplabel node) + { + inALabelOplabel(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getSemicol() != null) + { + node.getSemicol().apply(this); + } + outALabelOplabel(node); + } + + public void inAEmptyOplabel(AEmptyOplabel node) + { + defaultIn(node); + } + + public void outAEmptyOplabel(AEmptyOplabel node) + { + defaultOut(node); + } + + @Override + public void caseAEmptyOplabel(AEmptyOplabel node) + { + inAEmptyOplabel(node); + outAEmptyOplabel(node); + } + + public void inALabel(ALabel node) + { + defaultIn(node); + } + + public void outALabel(ALabel node) + { + defaultOut(node); + } + + @Override + public void caseALabel(ALabel node) + { + inALabel(node); + if(node.getId() != null) + { + node.getId().apply(this); + } + outALabel(node); + } +} diff --git a/src/nasmParser/analysis/ReversedDepthFirstAdapter.java b/src/nasmParser/analysis/ReversedDepthFirstAdapter.java new file mode 100644 index 0000000..4cf597a --- /dev/null +++ b/src/nasmParser/analysis/ReversedDepthFirstAdapter.java @@ -0,0 +1,2121 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.analysis; + +import java.util.*; +import nasmParser.node.*; + +public class ReversedDepthFirstAdapter extends AnalysisAdapter +{ + 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.getEOF().apply(this); + node.getPProg().apply(this); + outStart(node); + } + + public void inAProg(AProg node) + { + defaultIn(node); + } + + public void outAProg(AProg node) + { + defaultOut(node); + } + + @Override + public void caseAProg(AProg node) + { + inAProg(node); + if(node.getSectext() != null) + { + node.getSectext().apply(this); + } + if(node.getSecbss() != null) + { + node.getSecbss().apply(this); + } + if(node.getSecdata() != null) + { + node.getSecdata().apply(this); + } + if(node.getLinclude() != null) + { + node.getLinclude().apply(this); + } + outAProg(node); + } + + public void inARecLinclude(ARecLinclude node) + { + defaultIn(node); + } + + public void outARecLinclude(ARecLinclude node) + { + defaultOut(node); + } + + @Override + public void caseARecLinclude(ARecLinclude node) + { + inARecLinclude(node); + if(node.getLinclude() != null) + { + node.getLinclude().apply(this); + } + if(node.getInclude() != null) + { + node.getInclude().apply(this); + } + outARecLinclude(node); + } + + public void inAEmptyLinclude(AEmptyLinclude node) + { + defaultIn(node); + } + + public void outAEmptyLinclude(AEmptyLinclude node) + { + defaultOut(node); + } + + @Override + public void caseAEmptyLinclude(AEmptyLinclude node) + { + inAEmptyLinclude(node); + outAEmptyLinclude(node); + } + + public void inAInclude(AInclude node) + { + defaultIn(node); + } + + public void outAInclude(AInclude node) + { + defaultOut(node); + } + + @Override + public void caseAInclude(AInclude node) + { + inAInclude(node); + if(node.getClose() != null) + { + node.getClose().apply(this); + } + if(node.getFilename() != null) + { + node.getFilename().apply(this); + } + if(node.getOpen() != null) + { + node.getOpen().apply(this); + } + if(node.getInc() != null) + { + node.getInc().apply(this); + } + if(node.getPercentage() != null) + { + node.getPercentage().apply(this); + } + outAInclude(node); + } + + public void inASimpleFilename(ASimpleFilename node) + { + defaultIn(node); + } + + public void outASimpleFilename(ASimpleFilename node) + { + defaultOut(node); + } + + @Override + public void caseASimpleFilename(ASimpleFilename node) + { + inASimpleFilename(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outASimpleFilename(node); + } + + public void inAComplexFilename(AComplexFilename node) + { + defaultIn(node); + } + + public void outAComplexFilename(AComplexFilename node) + { + defaultOut(node); + } + + @Override + public void caseAComplexFilename(AComplexFilename node) + { + inAComplexFilename(node); + if(node.getSuffix() != null) + { + node.getSuffix().apply(this); + } + if(node.getDot() != null) + { + node.getDot().apply(this); + } + if(node.getPrefix() != null) + { + node.getPrefix().apply(this); + } + outAComplexFilename(node); + } + + public void inANonemptySecdata(ANonemptySecdata node) + { + defaultIn(node); + } + + public void outANonemptySecdata(ANonemptySecdata node) + { + defaultOut(node); + } + + @Override + public void caseANonemptySecdata(ANonemptySecdata node) + { + inANonemptySecdata(node); + if(node.getLconst() != null) + { + node.getLconst().apply(this); + } + if(node.getData() != null) + { + node.getData().apply(this); + } + if(node.getSection() != null) + { + node.getSection().apply(this); + } + outANonemptySecdata(node); + } + + public void inAEmptySecdata(AEmptySecdata node) + { + defaultIn(node); + } + + public void outAEmptySecdata(AEmptySecdata node) + { + defaultOut(node); + } + + @Override + public void caseAEmptySecdata(AEmptySecdata node) + { + inAEmptySecdata(node); + outAEmptySecdata(node); + } + + public void inARecLconst(ARecLconst node) + { + defaultIn(node); + } + + public void outARecLconst(ARecLconst node) + { + defaultOut(node); + } + + @Override + public void caseARecLconst(ARecLconst node) + { + inARecLconst(node); + if(node.getLconst() != null) + { + node.getLconst().apply(this); + } + if(node.getConst() != null) + { + node.getConst().apply(this); + } + outARecLconst(node); + } + + public void inAEmptyLconst(AEmptyLconst node) + { + defaultIn(node); + } + + public void outAEmptyLconst(AEmptyLconst node) + { + defaultOut(node); + } + + @Override + public void caseAEmptyLconst(AEmptyLconst node) + { + inAEmptyLconst(node); + outAEmptyLconst(node); + } + + public void inADbConst(ADbConst node) + { + defaultIn(node); + } + + public void outADbConst(ADbConst node) + { + defaultOut(node); + } + + @Override + public void caseADbConst(ADbConst node) + { + inADbConst(node); + if(node.getNumconst() != null) + { + node.getNumconst().apply(this); + } + if(node.getDefinebyte() != null) + { + node.getDefinebyte().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outADbConst(node); + } + + public void inADwConst(ADwConst node) + { + defaultIn(node); + } + + public void outADwConst(ADwConst node) + { + defaultOut(node); + } + + @Override + public void caseADwConst(ADwConst node) + { + inADwConst(node); + if(node.getNumconst() != null) + { + node.getNumconst().apply(this); + } + if(node.getDefineword() != null) + { + node.getDefineword().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outADwConst(node); + } + + public void inADdConst(ADdConst node) + { + defaultIn(node); + } + + public void outADdConst(ADdConst node) + { + defaultOut(node); + } + + @Override + public void caseADdConst(ADdConst node) + { + inADdConst(node); + if(node.getNumconst() != null) + { + node.getNumconst().apply(this); + } + if(node.getDefinedoubleword() != null) + { + node.getDefinedoubleword().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outADdConst(node); + } + + public void inADqConst(ADqConst node) + { + defaultIn(node); + } + + public void outADqConst(ADqConst node) + { + defaultOut(node); + } + + @Override + public void caseADqConst(ADqConst node) + { + inADqConst(node); + if(node.getNumconst() != null) + { + node.getNumconst().apply(this); + } + if(node.getDefinequadword() != null) + { + node.getDefinequadword().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outADqConst(node); + } + + public void inADtConst(ADtConst node) + { + defaultIn(node); + } + + public void outADtConst(ADtConst node) + { + defaultOut(node); + } + + @Override + public void caseADtConst(ADtConst node) + { + inADtConst(node); + if(node.getNumconst() != null) + { + node.getNumconst().apply(this); + } + if(node.getDefinetenbytes() != null) + { + node.getDefinetenbytes().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outADtConst(node); + } + + public void inANonemptySecbss(ANonemptySecbss node) + { + defaultIn(node); + } + + public void outANonemptySecbss(ANonemptySecbss node) + { + defaultOut(node); + } + + @Override + public void caseANonemptySecbss(ANonemptySecbss node) + { + inANonemptySecbss(node); + if(node.getLvar() != null) + { + node.getLvar().apply(this); + } + if(node.getBss() != null) + { + node.getBss().apply(this); + } + if(node.getSection() != null) + { + node.getSection().apply(this); + } + outANonemptySecbss(node); + } + + public void inAEmptySecbss(AEmptySecbss node) + { + defaultIn(node); + } + + public void outAEmptySecbss(AEmptySecbss node) + { + defaultOut(node); + } + + @Override + public void caseAEmptySecbss(AEmptySecbss node) + { + inAEmptySecbss(node); + outAEmptySecbss(node); + } + + public void inARecLvar(ARecLvar node) + { + defaultIn(node); + } + + public void outARecLvar(ARecLvar node) + { + defaultOut(node); + } + + @Override + public void caseARecLvar(ARecLvar node) + { + inARecLvar(node); + if(node.getLvar() != null) + { + node.getLvar().apply(this); + } + if(node.getVar() != null) + { + node.getVar().apply(this); + } + outARecLvar(node); + } + + public void inAEmptyLvar(AEmptyLvar node) + { + defaultIn(node); + } + + public void outAEmptyLvar(AEmptyLvar node) + { + defaultOut(node); + } + + @Override + public void caseAEmptyLvar(AEmptyLvar node) + { + inAEmptyLvar(node); + outAEmptyLvar(node); + } + + public void inAResbVar(AResbVar node) + { + defaultIn(node); + } + + public void outAResbVar(AResbVar node) + { + defaultOut(node); + } + + @Override + public void caseAResbVar(AResbVar node) + { + inAResbVar(node); + if(node.getNumber() != null) + { + node.getNumber().apply(this); + } + if(node.getReservebyte() != null) + { + node.getReservebyte().apply(this); + } + if(node.getSemicol() != null) + { + node.getSemicol().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outAResbVar(node); + } + + public void inAReswVar(AReswVar node) + { + defaultIn(node); + } + + public void outAReswVar(AReswVar node) + { + defaultOut(node); + } + + @Override + public void caseAReswVar(AReswVar node) + { + inAReswVar(node); + if(node.getNumber() != null) + { + node.getNumber().apply(this); + } + if(node.getReserveword() != null) + { + node.getReserveword().apply(this); + } + if(node.getSemicol() != null) + { + node.getSemicol().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outAReswVar(node); + } + + public void inAResdVar(AResdVar node) + { + defaultIn(node); + } + + public void outAResdVar(AResdVar node) + { + defaultOut(node); + } + + @Override + public void caseAResdVar(AResdVar node) + { + inAResdVar(node); + if(node.getNumber() != null) + { + node.getNumber().apply(this); + } + if(node.getReservedoubleword() != null) + { + node.getReservedoubleword().apply(this); + } + if(node.getSemicol() != null) + { + node.getSemicol().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outAResdVar(node); + } + + public void inAResqVar(AResqVar node) + { + defaultIn(node); + } + + public void outAResqVar(AResqVar node) + { + defaultOut(node); + } + + @Override + public void caseAResqVar(AResqVar node) + { + inAResqVar(node); + if(node.getNumber() != null) + { + node.getNumber().apply(this); + } + if(node.getReservequadword() != null) + { + node.getReservequadword().apply(this); + } + if(node.getSemicol() != null) + { + node.getSemicol().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outAResqVar(node); + } + + public void inARestVar(ARestVar node) + { + defaultIn(node); + } + + public void outARestVar(ARestVar node) + { + defaultOut(node); + } + + @Override + public void caseARestVar(ARestVar node) + { + inARestVar(node); + if(node.getNumber() != null) + { + node.getNumber().apply(this); + } + if(node.getReservetenbytes() != null) + { + node.getReservetenbytes().apply(this); + } + if(node.getSemicol() != null) + { + node.getSemicol().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outARestVar(node); + } + + public void inASectext(ASectext node) + { + defaultIn(node); + } + + public void outASectext(ASectext node) + { + defaultOut(node); + } + + @Override + public void caseASectext(ASectext node) + { + inASectext(node); + if(node.getLinst() != null) + { + node.getLinst().apply(this); + } + if(node.getLglobal() != null) + { + node.getLglobal().apply(this); + } + if(node.getText() != null) + { + node.getText().apply(this); + } + if(node.getSection() != null) + { + node.getSection().apply(this); + } + outASectext(node); + } + + public void inARecLglobal(ARecLglobal node) + { + defaultIn(node); + } + + public void outARecLglobal(ARecLglobal node) + { + defaultOut(node); + } + + @Override + public void caseARecLglobal(ARecLglobal node) + { + inARecLglobal(node); + if(node.getLglobal() != null) + { + node.getLglobal().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getGlobal() != null) + { + node.getGlobal().apply(this); + } + outARecLglobal(node); + } + + public void inAEmptyLglobal(AEmptyLglobal node) + { + defaultIn(node); + } + + public void outAEmptyLglobal(AEmptyLglobal node) + { + defaultOut(node); + } + + @Override + public void caseAEmptyLglobal(AEmptyLglobal node) + { + inAEmptyLglobal(node); + outAEmptyLglobal(node); + } + + public void inARecLinst(ARecLinst node) + { + defaultIn(node); + } + + public void outARecLinst(ARecLinst node) + { + defaultOut(node); + } + + @Override + public void caseARecLinst(ARecLinst node) + { + inARecLinst(node); + if(node.getLinst() != null) + { + node.getLinst().apply(this); + } + if(node.getInst() != null) + { + node.getInst().apply(this); + } + outARecLinst(node); + } + + public void inALastLinst(ALastLinst node) + { + defaultIn(node); + } + + public void outALastLinst(ALastLinst node) + { + defaultOut(node); + } + + @Override + public void caseALastLinst(ALastLinst node) + { + inALastLinst(node); + if(node.getInst() != null) + { + node.getInst().apply(this); + } + outALastLinst(node); + } + + public void inAMovInst(AMovInst node) + { + defaultIn(node); + } + + public void outAMovInst(AMovInst node) + { + defaultOut(node); + } + + @Override + public void caseAMovInst(AMovInst node) + { + inAMovInst(node); + if(node.getAcr() != null) + { + node.getAcr().apply(this); + } + if(node.getComma() != null) + { + node.getComma().apply(this); + } + if(node.getAr() != null) + { + node.getAr().apply(this); + } + if(node.getMov() != null) + { + node.getMov().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outAMovInst(node); + } + + public void inAPushInst(APushInst node) + { + defaultIn(node); + } + + public void outAPushInst(APushInst node) + { + defaultOut(node); + } + + @Override + public void caseAPushInst(APushInst node) + { + inAPushInst(node); + if(node.getAcr() != null) + { + node.getAcr().apply(this); + } + if(node.getPush() != null) + { + node.getPush().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outAPushInst(node); + } + + public void inAPopInst(APopInst node) + { + defaultIn(node); + } + + public void outAPopInst(APopInst node) + { + defaultOut(node); + } + + @Override + public void caseAPopInst(APopInst node) + { + inAPopInst(node); + if(node.getAr() != null) + { + node.getAr().apply(this); + } + if(node.getPop() != null) + { + node.getPop().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outAPopInst(node); + } + + public void inAAddInst(AAddInst node) + { + defaultIn(node); + } + + public void outAAddInst(AAddInst node) + { + defaultOut(node); + } + + @Override + public void caseAAddInst(AAddInst node) + { + inAAddInst(node); + if(node.getAcr() != null) + { + node.getAcr().apply(this); + } + if(node.getComma() != null) + { + node.getComma().apply(this); + } + if(node.getAr() != null) + { + node.getAr().apply(this); + } + if(node.getAdd() != null) + { + node.getAdd().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outAAddInst(node); + } + + public void inASubInst(ASubInst node) + { + defaultIn(node); + } + + public void outASubInst(ASubInst node) + { + defaultOut(node); + } + + @Override + public void caseASubInst(ASubInst node) + { + inASubInst(node); + if(node.getAcr() != null) + { + node.getAcr().apply(this); + } + if(node.getComma() != null) + { + node.getComma().apply(this); + } + if(node.getAr() != null) + { + node.getAr().apply(this); + } + if(node.getSub() != null) + { + node.getSub().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outASubInst(node); + } + + public void inAImulInst(AImulInst node) + { + defaultIn(node); + } + + public void outAImulInst(AImulInst node) + { + defaultOut(node); + } + + @Override + public void caseAImulInst(AImulInst node) + { + inAImulInst(node); + if(node.getAcr() != null) + { + node.getAcr().apply(this); + } + if(node.getComma() != null) + { + node.getComma().apply(this); + } + if(node.getAr() != null) + { + node.getAr().apply(this); + } + if(node.getImul() != null) + { + node.getImul().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outAImulInst(node); + } + + public void inAIdivInst(AIdivInst node) + { + defaultIn(node); + } + + public void outAIdivInst(AIdivInst node) + { + defaultOut(node); + } + + @Override + public void caseAIdivInst(AIdivInst node) + { + inAIdivInst(node); + if(node.getAr() != null) + { + node.getAr().apply(this); + } + if(node.getIdiv() != null) + { + node.getIdiv().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outAIdivInst(node); + } + + public void inAAndInst(AAndInst node) + { + defaultIn(node); + } + + public void outAAndInst(AAndInst node) + { + defaultOut(node); + } + + @Override + public void caseAAndInst(AAndInst node) + { + inAAndInst(node); + if(node.getAcr() != null) + { + node.getAcr().apply(this); + } + if(node.getComma() != null) + { + node.getComma().apply(this); + } + if(node.getAr() != null) + { + node.getAr().apply(this); + } + if(node.getAnd() != null) + { + node.getAnd().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outAAndInst(node); + } + + public void inAOrInst(AOrInst node) + { + defaultIn(node); + } + + public void outAOrInst(AOrInst node) + { + defaultOut(node); + } + + @Override + public void caseAOrInst(AOrInst node) + { + inAOrInst(node); + if(node.getAcr() != null) + { + node.getAcr().apply(this); + } + if(node.getComma() != null) + { + node.getComma().apply(this); + } + if(node.getAr() != null) + { + node.getAr().apply(this); + } + if(node.getOr() != null) + { + node.getOr().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outAOrInst(node); + } + + public void inAXorInst(AXorInst node) + { + defaultIn(node); + } + + public void outAXorInst(AXorInst node) + { + defaultOut(node); + } + + @Override + public void caseAXorInst(AXorInst node) + { + inAXorInst(node); + if(node.getAcr() != null) + { + node.getAcr().apply(this); + } + if(node.getComma() != null) + { + node.getComma().apply(this); + } + if(node.getAr() != null) + { + node.getAr().apply(this); + } + if(node.getXor() != null) + { + node.getXor().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outAXorInst(node); + } + + public void inANotInst(ANotInst node) + { + defaultIn(node); + } + + public void outANotInst(ANotInst node) + { + defaultOut(node); + } + + @Override + public void caseANotInst(ANotInst node) + { + inANotInst(node); + if(node.getAr() != null) + { + node.getAr().apply(this); + } + if(node.getNot() != null) + { + node.getNot().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outANotInst(node); + } + + public void inACmpInst(ACmpInst node) + { + defaultIn(node); + } + + public void outACmpInst(ACmpInst node) + { + defaultOut(node); + } + + @Override + public void caseACmpInst(ACmpInst node) + { + inACmpInst(node); + if(node.getAcr() != null) + { + node.getAcr().apply(this); + } + if(node.getComma() != null) + { + node.getComma().apply(this); + } + if(node.getAr() != null) + { + node.getAr().apply(this); + } + if(node.getCmp() != null) + { + node.getCmp().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outACmpInst(node); + } + + public void inAJmpInst(AJmpInst node) + { + defaultIn(node); + } + + public void outAJmpInst(AJmpInst node) + { + defaultOut(node); + } + + @Override + public void caseAJmpInst(AJmpInst node) + { + inAJmpInst(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getJmp() != null) + { + node.getJmp().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outAJmpInst(node); + } + + public void inAJeInst(AJeInst node) + { + defaultIn(node); + } + + public void outAJeInst(AJeInst node) + { + defaultOut(node); + } + + @Override + public void caseAJeInst(AJeInst node) + { + inAJeInst(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getJe() != null) + { + node.getJe().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outAJeInst(node); + } + + public void inAJneInst(AJneInst node) + { + defaultIn(node); + } + + public void outAJneInst(AJneInst node) + { + defaultOut(node); + } + + @Override + public void caseAJneInst(AJneInst node) + { + inAJneInst(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getJne() != null) + { + node.getJne().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outAJneInst(node); + } + + public void inAJgInst(AJgInst node) + { + defaultIn(node); + } + + public void outAJgInst(AJgInst node) + { + defaultOut(node); + } + + @Override + public void caseAJgInst(AJgInst node) + { + inAJgInst(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getJg() != null) + { + node.getJg().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outAJgInst(node); + } + + public void inAJgeInst(AJgeInst node) + { + defaultIn(node); + } + + public void outAJgeInst(AJgeInst node) + { + defaultOut(node); + } + + @Override + public void caseAJgeInst(AJgeInst node) + { + inAJgeInst(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getJge() != null) + { + node.getJge().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outAJgeInst(node); + } + + public void inAJlInst(AJlInst node) + { + defaultIn(node); + } + + public void outAJlInst(AJlInst node) + { + defaultOut(node); + } + + @Override + public void caseAJlInst(AJlInst node) + { + inAJlInst(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getJl() != null) + { + node.getJl().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outAJlInst(node); + } + + public void inACallInst(ACallInst node) + { + defaultIn(node); + } + + public void outACallInst(ACallInst node) + { + defaultOut(node); + } + + @Override + public void caseACallInst(ACallInst node) + { + inACallInst(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + if(node.getCall() != null) + { + node.getCall().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outACallInst(node); + } + + public void inARetInst(ARetInst node) + { + defaultIn(node); + } + + public void outARetInst(ARetInst node) + { + defaultOut(node); + } + + @Override + public void caseARetInst(ARetInst node) + { + inARetInst(node); + if(node.getRet() != null) + { + node.getRet().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outARetInst(node); + } + + public void inAInterInst(AInterInst node) + { + defaultIn(node); + } + + public void outAInterInst(AInterInst node) + { + defaultOut(node); + } + + @Override + public void caseAInterInst(AInterInst node) + { + inAInterInst(node); + if(node.getInt() != null) + { + node.getInt().apply(this); + } + if(node.getOplabel() != null) + { + node.getOplabel().apply(this); + } + outAInterInst(node); + } + + public void inAAddressAcr(AAddressAcr node) + { + defaultIn(node); + } + + public void outAAddressAcr(AAddressAcr node) + { + defaultOut(node); + } + + @Override + public void caseAAddressAcr(AAddressAcr node) + { + inAAddressAcr(node); + if(node.getAddress() != null) + { + node.getAddress().apply(this); + } + outAAddressAcr(node); + } + + public void inANumconstAcr(ANumconstAcr node) + { + defaultIn(node); + } + + public void outANumconstAcr(ANumconstAcr node) + { + defaultOut(node); + } + + @Override + public void caseANumconstAcr(ANumconstAcr node) + { + inANumconstAcr(node); + if(node.getNumconst() != null) + { + node.getNumconst().apply(this); + } + outANumconstAcr(node); + } + + public void inARegisterAcr(ARegisterAcr node) + { + defaultIn(node); + } + + public void outARegisterAcr(ARegisterAcr node) + { + defaultOut(node); + } + + @Override + public void caseARegisterAcr(ARegisterAcr node) + { + inARegisterAcr(node); + if(node.getRegister() != null) + { + node.getRegister().apply(this); + } + outARegisterAcr(node); + } + + public void inAAddressAr(AAddressAr node) + { + defaultIn(node); + } + + public void outAAddressAr(AAddressAr node) + { + defaultOut(node); + } + + @Override + public void caseAAddressAr(AAddressAr node) + { + inAAddressAr(node); + if(node.getAddress() != null) + { + node.getAddress().apply(this); + } + outAAddressAr(node); + } + + public void inARegisterAr(ARegisterAr node) + { + defaultIn(node); + } + + public void outARegisterAr(ARegisterAr node) + { + defaultOut(node); + } + + @Override + public void caseARegisterAr(ARegisterAr node) + { + inARegisterAr(node); + if(node.getRegister() != null) + { + node.getRegister().apply(this); + } + outARegisterAr(node); + } + + public void inAAddress(AAddress node) + { + defaultIn(node); + } + + public void outAAddress(AAddress node) + { + defaultOut(node); + } + + @Override + public void caseAAddress(AAddress node) + { + inAAddress(node); + if(node.getBrackclose() != null) + { + node.getBrackclose().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getBrackopen() != null) + { + node.getBrackopen().apply(this); + } + if(node.getOpsizeof() != null) + { + node.getOpsizeof().apply(this); + } + outAAddress(node); + } + + public void inAByteOpsizeof(AByteOpsizeof node) + { + defaultIn(node); + } + + public void outAByteOpsizeof(AByteOpsizeof node) + { + defaultOut(node); + } + + @Override + public void caseAByteOpsizeof(AByteOpsizeof node) + { + inAByteOpsizeof(node); + if(node.getByte() != null) + { + node.getByte().apply(this); + } + outAByteOpsizeof(node); + } + + public void inAWordOpsizeof(AWordOpsizeof node) + { + defaultIn(node); + } + + public void outAWordOpsizeof(AWordOpsizeof node) + { + defaultOut(node); + } + + @Override + public void caseAWordOpsizeof(AWordOpsizeof node) + { + inAWordOpsizeof(node); + if(node.getWord() != null) + { + node.getWord().apply(this); + } + outAWordOpsizeof(node); + } + + public void inADwordOpsizeof(ADwordOpsizeof node) + { + defaultIn(node); + } + + public void outADwordOpsizeof(ADwordOpsizeof node) + { + defaultOut(node); + } + + @Override + public void caseADwordOpsizeof(ADwordOpsizeof node) + { + inADwordOpsizeof(node); + if(node.getDword() != null) + { + node.getDword().apply(this); + } + outADwordOpsizeof(node); + } + + public void inAEmptyOpsizeof(AEmptyOpsizeof node) + { + defaultIn(node); + } + + public void outAEmptyOpsizeof(AEmptyOpsizeof node) + { + defaultOut(node); + } + + @Override + public void caseAEmptyOpsizeof(AEmptyOpsizeof node) + { + inAEmptyOpsizeof(node); + outAEmptyOpsizeof(node); + } + + public void inAPlusExp(APlusExp node) + { + defaultIn(node); + } + + public void outAPlusExp(APlusExp node) + { + defaultOut(node); + } + + @Override + public void caseAPlusExp(APlusExp node) + { + inAPlusExp(node); + if(node.getExp1() != null) + { + node.getExp1().apply(this); + } + if(node.getPlus() != null) + { + node.getPlus().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + outAPlusExp(node); + } + + public void inAMinusExp(AMinusExp node) + { + defaultIn(node); + } + + public void outAMinusExp(AMinusExp node) + { + defaultOut(node); + } + + @Override + public void caseAMinusExp(AMinusExp node) + { + inAMinusExp(node); + if(node.getExp1() != null) + { + node.getExp1().apply(this); + } + if(node.getMinus() != null) + { + node.getMinus().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + outAMinusExp(node); + } + + public void inANextExp(ANextExp node) + { + defaultIn(node); + } + + public void outANextExp(ANextExp node) + { + defaultOut(node); + } + + @Override + public void caseANextExp(ANextExp node) + { + inANextExp(node); + if(node.getExp1() != null) + { + node.getExp1().apply(this); + } + outANextExp(node); + } + + public void inATimesExp1(ATimesExp1 node) + { + defaultIn(node); + } + + public void outATimesExp1(ATimesExp1 node) + { + defaultOut(node); + } + + @Override + public void caseATimesExp1(ATimesExp1 node) + { + inATimesExp1(node); + if(node.getExp2() != null) + { + node.getExp2().apply(this); + } + if(node.getTimes() != null) + { + node.getTimes().apply(this); + } + if(node.getExp1() != null) + { + node.getExp1().apply(this); + } + outATimesExp1(node); + } + + public void inANextExp1(ANextExp1 node) + { + defaultIn(node); + } + + public void outANextExp1(ANextExp1 node) + { + defaultOut(node); + } + + @Override + public void caseANextExp1(ANextExp1 node) + { + inANextExp1(node); + if(node.getExp2() != null) + { + node.getExp2().apply(this); + } + outANextExp1(node); + } + + public void inALabelExp2(ALabelExp2 node) + { + defaultIn(node); + } + + public void outALabelExp2(ALabelExp2 node) + { + defaultOut(node); + } + + @Override + public void caseALabelExp2(ALabelExp2 node) + { + inALabelExp2(node); + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outALabelExp2(node); + } + + public void inANumconstExp2(ANumconstExp2 node) + { + defaultIn(node); + } + + public void outANumconstExp2(ANumconstExp2 node) + { + defaultOut(node); + } + + @Override + public void caseANumconstExp2(ANumconstExp2 node) + { + inANumconstExp2(node); + if(node.getNumconst() != null) + { + node.getNumconst().apply(this); + } + outANumconstExp2(node); + } + + public void inARegisterExp2(ARegisterExp2 node) + { + defaultIn(node); + } + + public void outARegisterExp2(ARegisterExp2 node) + { + defaultOut(node); + } + + @Override + public void caseARegisterExp2(ARegisterExp2 node) + { + inARegisterExp2(node); + if(node.getRegister() != null) + { + node.getRegister().apply(this); + } + outARegisterExp2(node); + } + + public void inANumconst(ANumconst node) + { + defaultIn(node); + } + + public void outANumconst(ANumconst node) + { + defaultOut(node); + } + + @Override + public void caseANumconst(ANumconst node) + { + inANumconst(node); + if(node.getNumber() != null) + { + node.getNumber().apply(this); + } + outANumconst(node); + } + + public void inATempRegister(ATempRegister node) + { + defaultIn(node); + } + + public void outATempRegister(ATempRegister node) + { + defaultOut(node); + } + + @Override + public void caseATempRegister(ATempRegister node) + { + inATempRegister(node); + if(node.getNumber() != null) + { + node.getNumber().apply(this); + } + if(node.getPrefixRegister() != null) + { + node.getPrefixRegister().apply(this); + } + outATempRegister(node); + } + + public void inAEaxRegister(AEaxRegister node) + { + defaultIn(node); + } + + public void outAEaxRegister(AEaxRegister node) + { + defaultOut(node); + } + + @Override + public void caseAEaxRegister(AEaxRegister node) + { + inAEaxRegister(node); + if(node.getEax() != null) + { + node.getEax().apply(this); + } + outAEaxRegister(node); + } + + public void inAEbxRegister(AEbxRegister node) + { + defaultIn(node); + } + + public void outAEbxRegister(AEbxRegister node) + { + defaultOut(node); + } + + @Override + public void caseAEbxRegister(AEbxRegister node) + { + inAEbxRegister(node); + if(node.getEbx() != null) + { + node.getEbx().apply(this); + } + outAEbxRegister(node); + } + + public void inAEcxRegister(AEcxRegister node) + { + defaultIn(node); + } + + public void outAEcxRegister(AEcxRegister node) + { + defaultOut(node); + } + + @Override + public void caseAEcxRegister(AEcxRegister node) + { + inAEcxRegister(node); + if(node.getEcx() != null) + { + node.getEcx().apply(this); + } + outAEcxRegister(node); + } + + public void inAEdxRegister(AEdxRegister node) + { + defaultIn(node); + } + + public void outAEdxRegister(AEdxRegister node) + { + defaultOut(node); + } + + @Override + public void caseAEdxRegister(AEdxRegister node) + { + inAEdxRegister(node); + if(node.getEdx() != null) + { + node.getEdx().apply(this); + } + outAEdxRegister(node); + } + + public void inAEbpRegister(AEbpRegister node) + { + defaultIn(node); + } + + public void outAEbpRegister(AEbpRegister node) + { + defaultOut(node); + } + + @Override + public void caseAEbpRegister(AEbpRegister node) + { + inAEbpRegister(node); + if(node.getEbp() != null) + { + node.getEbp().apply(this); + } + outAEbpRegister(node); + } + + public void inAEspRegister(AEspRegister node) + { + defaultIn(node); + } + + public void outAEspRegister(AEspRegister node) + { + defaultOut(node); + } + + @Override + public void caseAEspRegister(AEspRegister node) + { + inAEspRegister(node); + if(node.getEsp() != null) + { + node.getEsp().apply(this); + } + outAEspRegister(node); + } + + public void inALabelOplabel(ALabelOplabel node) + { + defaultIn(node); + } + + public void outALabelOplabel(ALabelOplabel node) + { + defaultOut(node); + } + + @Override + public void caseALabelOplabel(ALabelOplabel node) + { + inALabelOplabel(node); + if(node.getSemicol() != null) + { + node.getSemicol().apply(this); + } + if(node.getLabel() != null) + { + node.getLabel().apply(this); + } + outALabelOplabel(node); + } + + public void inAEmptyOplabel(AEmptyOplabel node) + { + defaultIn(node); + } + + public void outAEmptyOplabel(AEmptyOplabel node) + { + defaultOut(node); + } + + @Override + public void caseAEmptyOplabel(AEmptyOplabel node) + { + inAEmptyOplabel(node); + outAEmptyOplabel(node); + } + + public void inALabel(ALabel node) + { + defaultIn(node); + } + + public void outALabel(ALabel node) + { + defaultOut(node); + } + + @Override + public void caseALabel(ALabel node) + { + inALabel(node); + if(node.getId() != null) + { + node.getId().apply(this); + } + outALabel(node); + } +} diff --git a/src/nasmParser/parser/Parser.java b/src/nasmParser/parser/Parser.java new file mode 100644 index 0000000..dc03a91 --- /dev/null +++ b/src/nasmParser/parser/Parser.java @@ -0,0 +1,2914 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.parser; + +import nasmParser.lexer.*; +import nasmParser.node.*; +import nasmParser.analysis.*; +import java.util.*; + +import java.io.DataInputStream; +import java.io.BufferedInputStream; +import java.io.IOException; + +@SuppressWarnings("nls") +public class Parser +{ + public final Analysis ignoredTokens = new AnalysisAdapter(); + + protected ArrayList<Object> nodeList; + + private final Lexer lexer; + private final ListIterator<Object> stack = new LinkedList<Object>().listIterator(); + private int last_pos; + private int last_line; + private Token last_token; + private final TokenIndex converter = new TokenIndex(); + private final int[] action = new int[2]; + + private final static int SHIFT = 0; + private final static int REDUCE = 1; + private final static int ACCEPT = 2; + private final static int ERROR = 3; + + public Parser(@SuppressWarnings("hiding") Lexer lexer) + { + this.lexer = lexer; + } + + @SuppressWarnings({"unchecked","unused"}) + private void push(int numstate, ArrayList<Object> listNode) throws ParserException, LexerException, IOException + { + this.nodeList = listNode; + + if(!this.stack.hasNext()) + { + this.stack.add(new State(numstate, this.nodeList)); + return; + } + + State s = (State) this.stack.next(); + s.state = numstate; + s.nodes = this.nodeList; + } + + private int goTo(int index) + { + int state = state(); + int low = 1; + int high = gotoTable[index].length - 1; + int value = gotoTable[index][0][1]; + + while(low <= high) + { + // int middle = (low + high) / 2; + int middle = (low + high) >>> 1; + + if(state < gotoTable[index][middle][0]) + { + high = middle - 1; + } + else if(state > gotoTable[index][middle][0]) + { + low = middle + 1; + } + else + { + value = gotoTable[index][middle][1]; + break; + } + } + + return value; + } + + private int state() + { + State s = (State) this.stack.previous(); + this.stack.next(); + return s.state; + } + + private ArrayList<Object> pop() + { + return ((State) this.stack.previous()).nodes; + } + + private int index(Switchable token) + { + this.converter.index = -1; + token.apply(this.converter); + return this.converter.index; + } + + @SuppressWarnings("unchecked") + public Start parse() throws ParserException, LexerException, IOException + { + push(0, null); + List<Node> ign = null; + while(true) + { + while(index(this.lexer.peek()) == -1) + { + if(ign == null) + { + ign = new LinkedList<Node>(); + } + + ign.add(this.lexer.next()); + } + + if(ign != null) + { + this.ignoredTokens.setIn(this.lexer.peek(), ign); + ign = null; + } + + this.last_pos = this.lexer.peek().getPos(); + this.last_line = this.lexer.peek().getLine(); + this.last_token = this.lexer.peek(); + + int index = index(this.lexer.peek()); + this.action[0] = Parser.actionTable[state()][0][1]; + this.action[1] = Parser.actionTable[state()][0][2]; + + int low = 1; + int high = Parser.actionTable[state()].length - 1; + + while(low <= high) + { + int middle = (low + high) / 2; + + if(index < Parser.actionTable[state()][middle][0]) + { + high = middle - 1; + } + else if(index > Parser.actionTable[state()][middle][0]) + { + low = middle + 1; + } + else + { + this.action[0] = Parser.actionTable[state()][middle][1]; + this.action[1] = Parser.actionTable[state()][middle][2]; + break; + } + } + + switch(this.action[0]) + { + case SHIFT: + { + ArrayList<Object> list = new ArrayList<Object>(); + list.add(this.lexer.next()); + push(this.action[1], list); + } + break; + case REDUCE: + { + int reduction = this.action[1]; + if(reduction < 500) reduce_0(reduction); + } + break; + case ACCEPT: + { + EOF node2 = (EOF) this.lexer.next(); + PProg node1 = (PProg) pop().get(0); + Start node = new Start(node1, node2); + return node; + } + case ERROR: + throw new ParserException(this.last_token, + "[" + this.last_line + "," + this.last_pos + "] " + + Parser.errorMessages[Parser.errors[this.action[1]]]); + } + } + } + + private void reduce_0(int reduction) throws IOException, LexerException, ParserException + { + switch(reduction) + { + case 0: /* reduce ANonempty1$Nonempty1Prog */ + { + ArrayList<Object> list = new0(); + push(goTo(0), list); + } + break; + case 1: /* reduce ANonempty1$Empty1Prog */ + { + ArrayList<Object> list = new1(); + push(goTo(0), list); + } + break; + case 2: /* reduce AEmpty1$Nonempty1Prog */ + { + ArrayList<Object> list = new2(); + push(goTo(0), list); + } + break; + case 3: /* reduce AEmpty1$Empty1Prog */ + { + ArrayList<Object> list = new3(); + push(goTo(0), list); + } + break; + case 4: /* reduce ARecLinclude */ + { + ArrayList<Object> list = new4(); + push(goTo(1), list); + } + break; + case 5: /* reduce AEmptyLinclude */ + { + ArrayList<Object> list = new5(); + push(goTo(1), list); + } + break; + case 6: /* reduce AInclude */ + { + ArrayList<Object> list = new6(); + push(goTo(2), list); + } + break; + case 7: /* reduce ASimpleFilename */ + { + ArrayList<Object> list = new7(); + push(goTo(3), list); + } + break; + case 8: /* reduce AComplexFilename */ + { + ArrayList<Object> list = new8(); + push(goTo(3), list); + } + break; + case 9: /* reduce ARecLconst */ + { + ArrayList<Object> list = new9(); + push(goTo(4), list); + } + break; + case 10: /* reduce AEmptyLconst */ + { + ArrayList<Object> list = new10(); + push(goTo(4), list); + } + break; + case 11: /* reduce ADbConst */ + { + ArrayList<Object> list = new11(); + push(goTo(5), list); + } + break; + case 12: /* reduce ADwConst */ + { + ArrayList<Object> list = new12(); + push(goTo(5), list); + } + break; + case 13: /* reduce ADdConst */ + { + ArrayList<Object> list = new13(); + push(goTo(5), list); + } + break; + case 14: /* reduce ADqConst */ + { + ArrayList<Object> list = new14(); + push(goTo(5), list); + } + break; + case 15: /* reduce ADtConst */ + { + ArrayList<Object> list = new15(); + push(goTo(5), list); + } + break; + case 16: /* reduce ARecLvar */ + { + ArrayList<Object> list = new16(); + push(goTo(6), list); + } + break; + case 17: /* reduce AEmptyLvar */ + { + ArrayList<Object> list = new17(); + push(goTo(6), list); + } + break; + case 18: /* reduce AResbVar */ + { + ArrayList<Object> list = new18(); + push(goTo(7), list); + } + break; + case 19: /* reduce AReswVar */ + { + ArrayList<Object> list = new19(); + push(goTo(7), list); + } + break; + case 20: /* reduce AResdVar */ + { + ArrayList<Object> list = new20(); + push(goTo(7), list); + } + break; + case 21: /* reduce AResqVar */ + { + ArrayList<Object> list = new21(); + push(goTo(7), list); + } + break; + case 22: /* reduce ARestVar */ + { + ArrayList<Object> list = new22(); + push(goTo(7), list); + } + break; + case 23: /* reduce ASectext */ + { + ArrayList<Object> list = new23(); + push(goTo(8), list); + } + break; + case 24: /* reduce ARecLglobal */ + { + ArrayList<Object> list = new24(); + push(goTo(9), list); + } + break; + case 25: /* reduce AEmptyLglobal */ + { + ArrayList<Object> list = new25(); + push(goTo(9), list); + } + break; + case 26: /* reduce ARecLinst */ + { + ArrayList<Object> list = new26(); + push(goTo(10), list); + } + break; + case 27: /* reduce ALastLinst */ + { + ArrayList<Object> list = new27(); + push(goTo(10), list); + } + break; + case 28: /* reduce AMovInst */ + { + ArrayList<Object> list = new28(); + push(goTo(11), list); + } + break; + case 29: /* reduce APushInst */ + { + ArrayList<Object> list = new29(); + push(goTo(11), list); + } + break; + case 30: /* reduce APopInst */ + { + ArrayList<Object> list = new30(); + push(goTo(11), list); + } + break; + case 31: /* reduce AAddInst */ + { + ArrayList<Object> list = new31(); + push(goTo(11), list); + } + break; + case 32: /* reduce ASubInst */ + { + ArrayList<Object> list = new32(); + push(goTo(11), list); + } + break; + case 33: /* reduce AImulInst */ + { + ArrayList<Object> list = new33(); + push(goTo(11), list); + } + break; + case 34: /* reduce AIdivInst */ + { + ArrayList<Object> list = new34(); + push(goTo(11), list); + } + break; + case 35: /* reduce AAndInst */ + { + ArrayList<Object> list = new35(); + push(goTo(11), list); + } + break; + case 36: /* reduce AOrInst */ + { + ArrayList<Object> list = new36(); + push(goTo(11), list); + } + break; + case 37: /* reduce AXorInst */ + { + ArrayList<Object> list = new37(); + push(goTo(11), list); + } + break; + case 38: /* reduce ANotInst */ + { + ArrayList<Object> list = new38(); + push(goTo(11), list); + } + break; + case 39: /* reduce ACmpInst */ + { + ArrayList<Object> list = new39(); + push(goTo(11), list); + } + break; + case 40: /* reduce AJmpInst */ + { + ArrayList<Object> list = new40(); + push(goTo(11), list); + } + break; + case 41: /* reduce AJeInst */ + { + ArrayList<Object> list = new41(); + push(goTo(11), list); + } + break; + case 42: /* reduce AJneInst */ + { + ArrayList<Object> list = new42(); + push(goTo(11), list); + } + break; + case 43: /* reduce AJgInst */ + { + ArrayList<Object> list = new43(); + push(goTo(11), list); + } + break; + case 44: /* reduce AJgeInst */ + { + ArrayList<Object> list = new44(); + push(goTo(11), list); + } + break; + case 45: /* reduce AJlInst */ + { + ArrayList<Object> list = new45(); + push(goTo(11), list); + } + break; + case 46: /* reduce ACallInst */ + { + ArrayList<Object> list = new46(); + push(goTo(11), list); + } + break; + case 47: /* reduce ARetInst */ + { + ArrayList<Object> list = new47(); + push(goTo(11), list); + } + break; + case 48: /* reduce AInterInst */ + { + ArrayList<Object> list = new48(); + push(goTo(11), list); + } + break; + case 49: /* reduce AAddressAcr */ + { + ArrayList<Object> list = new49(); + push(goTo(12), list); + } + break; + case 50: /* reduce ANumconstAcr */ + { + ArrayList<Object> list = new50(); + push(goTo(12), list); + } + break; + case 51: /* reduce ARegisterAcr */ + { + ArrayList<Object> list = new51(); + push(goTo(12), list); + } + break; + case 52: /* reduce AAddressAr */ + { + ArrayList<Object> list = new52(); + push(goTo(13), list); + } + break; + case 53: /* reduce ARegisterAr */ + { + ArrayList<Object> list = new53(); + push(goTo(13), list); + } + break; + case 54: /* reduce AAddress */ + { + ArrayList<Object> list = new54(); + push(goTo(14), list); + } + break; + case 55: /* reduce AByteOpsizeof */ + { + ArrayList<Object> list = new55(); + push(goTo(15), list); + } + break; + case 56: /* reduce AWordOpsizeof */ + { + ArrayList<Object> list = new56(); + push(goTo(15), list); + } + break; + case 57: /* reduce ADwordOpsizeof */ + { + ArrayList<Object> list = new57(); + push(goTo(15), list); + } + break; + case 58: /* reduce AEmptyOpsizeof */ + { + ArrayList<Object> list = new58(); + push(goTo(15), list); + } + break; + case 59: /* reduce APlusExp */ + { + ArrayList<Object> list = new59(); + push(goTo(16), list); + } + break; + case 60: /* reduce AMinusExp */ + { + ArrayList<Object> list = new60(); + push(goTo(16), list); + } + break; + case 61: /* reduce ANextExp */ + { + ArrayList<Object> list = new61(); + push(goTo(16), list); + } + break; + case 62: /* reduce ATimesExp1 */ + { + ArrayList<Object> list = new62(); + push(goTo(17), list); + } + break; + case 63: /* reduce ANextExp1 */ + { + ArrayList<Object> list = new63(); + push(goTo(17), list); + } + break; + case 64: /* reduce ALabelExp2 */ + { + ArrayList<Object> list = new64(); + push(goTo(18), list); + } + break; + case 65: /* reduce ANumconstExp2 */ + { + ArrayList<Object> list = new65(); + push(goTo(18), list); + } + break; + case 66: /* reduce ARegisterExp2 */ + { + ArrayList<Object> list = new66(); + push(goTo(18), list); + } + break; + case 67: /* reduce ANumconst */ + { + ArrayList<Object> list = new67(); + push(goTo(19), list); + } + break; + case 68: /* reduce ATempRegister */ + { + ArrayList<Object> list = new68(); + push(goTo(20), list); + } + break; + case 69: /* reduce AEaxRegister */ + { + ArrayList<Object> list = new69(); + push(goTo(20), list); + } + break; + case 70: /* reduce AEbxRegister */ + { + ArrayList<Object> list = new70(); + push(goTo(20), list); + } + break; + case 71: /* reduce AEcxRegister */ + { + ArrayList<Object> list = new71(); + push(goTo(20), list); + } + break; + case 72: /* reduce AEdxRegister */ + { + ArrayList<Object> list = new72(); + push(goTo(20), list); + } + break; + case 73: /* reduce AEbpRegister */ + { + ArrayList<Object> list = new73(); + push(goTo(20), list); + } + break; + case 74: /* reduce AEspRegister */ + { + ArrayList<Object> list = new74(); + push(goTo(20), list); + } + break; + case 75: /* reduce ALabelOplabel */ + { + ArrayList<Object> list = new75(); + push(goTo(21), list); + } + break; + case 76: /* reduce AEmptyOplabel */ + { + ArrayList<Object> list = new76(); + push(goTo(21), list); + } + break; + case 77: /* reduce ALabel */ + { + ArrayList<Object> list = new77(); + push(goTo(22), list); + } + break; + } + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new0() /* reduce ANonempty1$Nonempty1Prog */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList8 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList7 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList6 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PProg pprogNode1; + { + // Block + PLinclude plincludeNode2; + PSecdata psecdataNode3; + PSecbss psecbssNode7; + PSectext psectextNode11; + plincludeNode2 = (PLinclude)nodeArrayList1.get(0); + { + // Block + TSection tsectionNode4; + TData tdataNode5; + PLconst plconstNode6; + tsectionNode4 = (TSection)nodeArrayList2.get(0); + tdataNode5 = (TData)nodeArrayList3.get(0); + plconstNode6 = (PLconst)nodeArrayList4.get(0); + + psecdataNode3 = new ANonemptySecdata(tsectionNode4, tdataNode5, plconstNode6); + } + { + // Block + TSection tsectionNode8; + TBss tbssNode9; + PLvar plvarNode10; + tsectionNode8 = (TSection)nodeArrayList5.get(0); + tbssNode9 = (TBss)nodeArrayList6.get(0); + plvarNode10 = (PLvar)nodeArrayList7.get(0); + + psecbssNode7 = new ANonemptySecbss(tsectionNode8, tbssNode9, plvarNode10); + } + psectextNode11 = (PSectext)nodeArrayList8.get(0); + + pprogNode1 = new AProg(plincludeNode2, psecdataNode3, psecbssNode7, psectextNode11); + } + nodeList.add(pprogNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new1() /* reduce ANonempty1$Empty1Prog */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PProg pprogNode1; + { + // Block + PLinclude plincludeNode2; + PSecdata psecdataNode3; + PSecbss psecbssNode7; + PSectext psectextNode8; + plincludeNode2 = (PLinclude)nodeArrayList1.get(0); + { + // Block + TSection tsectionNode4; + TData tdataNode5; + PLconst plconstNode6; + tsectionNode4 = (TSection)nodeArrayList2.get(0); + tdataNode5 = (TData)nodeArrayList3.get(0); + plconstNode6 = (PLconst)nodeArrayList4.get(0); + + psecdataNode3 = new ANonemptySecdata(tsectionNode4, tdataNode5, plconstNode6); + } + { + // Block + + psecbssNode7 = new AEmptySecbss(); + } + psectextNode8 = (PSectext)nodeArrayList5.get(0); + + pprogNode1 = new AProg(plincludeNode2, psecdataNode3, psecbssNode7, psectextNode8); + } + nodeList.add(pprogNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new2() /* reduce AEmpty1$Nonempty1Prog */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PProg pprogNode1; + { + // Block + PLinclude plincludeNode2; + PSecdata psecdataNode3; + PSecbss psecbssNode4; + PSectext psectextNode8; + plincludeNode2 = (PLinclude)nodeArrayList1.get(0); + { + // Block + + psecdataNode3 = new AEmptySecdata(); + } + { + // Block + TSection tsectionNode5; + TBss tbssNode6; + PLvar plvarNode7; + tsectionNode5 = (TSection)nodeArrayList2.get(0); + tbssNode6 = (TBss)nodeArrayList3.get(0); + plvarNode7 = (PLvar)nodeArrayList4.get(0); + + psecbssNode4 = new ANonemptySecbss(tsectionNode5, tbssNode6, plvarNode7); + } + psectextNode8 = (PSectext)nodeArrayList5.get(0); + + pprogNode1 = new AProg(plincludeNode2, psecdataNode3, psecbssNode4, psectextNode8); + } + nodeList.add(pprogNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new3() /* reduce AEmpty1$Empty1Prog */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PProg pprogNode1; + { + // Block + PLinclude plincludeNode2; + PSecdata psecdataNode3; + PSecbss psecbssNode4; + PSectext psectextNode5; + plincludeNode2 = (PLinclude)nodeArrayList1.get(0); + { + // Block + + psecdataNode3 = new AEmptySecdata(); + } + { + // Block + + psecbssNode4 = new AEmptySecbss(); + } + psectextNode5 = (PSectext)nodeArrayList2.get(0); + + pprogNode1 = new AProg(plincludeNode2, psecdataNode3, psecbssNode4, psectextNode5); + } + nodeList.add(pprogNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new4() /* reduce ARecLinclude */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PLinclude plincludeNode1; + { + // Block + PInclude pincludeNode2; + PLinclude plincludeNode3; + pincludeNode2 = (PInclude)nodeArrayList1.get(0); + plincludeNode3 = (PLinclude)nodeArrayList2.get(0); + + plincludeNode1 = new ARecLinclude(pincludeNode2, plincludeNode3); + } + nodeList.add(plincludeNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new5() /* reduce AEmptyLinclude */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + PLinclude plincludeNode1; + { + // Block + + plincludeNode1 = new AEmptyLinclude(); + } + nodeList.add(plincludeNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new6() /* reduce AInclude */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInclude pincludeNode1; + { + // Block + TPercentage tpercentageNode2; + TInc tincNode3; + TQuote tquoteNode4; + PFilename pfilenameNode5; + TQuote tquoteNode6; + tpercentageNode2 = (TPercentage)nodeArrayList1.get(0); + tincNode3 = (TInc)nodeArrayList2.get(0); + tquoteNode4 = (TQuote)nodeArrayList3.get(0); + pfilenameNode5 = (PFilename)nodeArrayList4.get(0); + tquoteNode6 = (TQuote)nodeArrayList5.get(0); + + pincludeNode1 = new AInclude(tpercentageNode2, tincNode3, tquoteNode4, pfilenameNode5, tquoteNode6); + } + nodeList.add(pincludeNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new7() /* reduce ASimpleFilename */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PFilename pfilenameNode1; + { + // Block + PLabel plabelNode2; + plabelNode2 = (PLabel)nodeArrayList1.get(0); + + pfilenameNode1 = new ASimpleFilename(plabelNode2); + } + nodeList.add(pfilenameNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new8() /* reduce AComplexFilename */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PFilename pfilenameNode1; + { + // Block + PLabel plabelNode2; + TDot tdotNode3; + PLabel plabelNode4; + plabelNode2 = (PLabel)nodeArrayList1.get(0); + tdotNode3 = (TDot)nodeArrayList2.get(0); + plabelNode4 = (PLabel)nodeArrayList3.get(0); + + pfilenameNode1 = new AComplexFilename(plabelNode2, tdotNode3, plabelNode4); + } + nodeList.add(pfilenameNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new9() /* reduce ARecLconst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PLconst plconstNode1; + { + // Block + PConst pconstNode2; + PLconst plconstNode3; + pconstNode2 = (PConst)nodeArrayList1.get(0); + plconstNode3 = (PLconst)nodeArrayList2.get(0); + + plconstNode1 = new ARecLconst(pconstNode2, plconstNode3); + } + nodeList.add(plconstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new10() /* reduce AEmptyLconst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + PLconst plconstNode1; + { + // Block + + plconstNode1 = new AEmptyLconst(); + } + nodeList.add(plconstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new11() /* reduce ADbConst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PConst pconstNode1; + { + // Block + PLabel plabelNode2; + TDefinebyte tdefinebyteNode3; + PNumconst pnumconstNode4; + plabelNode2 = (PLabel)nodeArrayList1.get(0); + tdefinebyteNode3 = (TDefinebyte)nodeArrayList2.get(0); + pnumconstNode4 = (PNumconst)nodeArrayList3.get(0); + + pconstNode1 = new ADbConst(plabelNode2, tdefinebyteNode3, pnumconstNode4); + } + nodeList.add(pconstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new12() /* reduce ADwConst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PConst pconstNode1; + { + // Block + PLabel plabelNode2; + TDefineword tdefinewordNode3; + PNumconst pnumconstNode4; + plabelNode2 = (PLabel)nodeArrayList1.get(0); + tdefinewordNode3 = (TDefineword)nodeArrayList2.get(0); + pnumconstNode4 = (PNumconst)nodeArrayList3.get(0); + + pconstNode1 = new ADwConst(plabelNode2, tdefinewordNode3, pnumconstNode4); + } + nodeList.add(pconstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new13() /* reduce ADdConst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PConst pconstNode1; + { + // Block + PLabel plabelNode2; + TDefinedoubleword tdefinedoublewordNode3; + PNumconst pnumconstNode4; + plabelNode2 = (PLabel)nodeArrayList1.get(0); + tdefinedoublewordNode3 = (TDefinedoubleword)nodeArrayList2.get(0); + pnumconstNode4 = (PNumconst)nodeArrayList3.get(0); + + pconstNode1 = new ADdConst(plabelNode2, tdefinedoublewordNode3, pnumconstNode4); + } + nodeList.add(pconstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new14() /* reduce ADqConst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PConst pconstNode1; + { + // Block + PLabel plabelNode2; + TDefinequadword tdefinequadwordNode3; + PNumconst pnumconstNode4; + plabelNode2 = (PLabel)nodeArrayList1.get(0); + tdefinequadwordNode3 = (TDefinequadword)nodeArrayList2.get(0); + pnumconstNode4 = (PNumconst)nodeArrayList3.get(0); + + pconstNode1 = new ADqConst(plabelNode2, tdefinequadwordNode3, pnumconstNode4); + } + nodeList.add(pconstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new15() /* reduce ADtConst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PConst pconstNode1; + { + // Block + PLabel plabelNode2; + TDefinetenbytes tdefinetenbytesNode3; + PNumconst pnumconstNode4; + plabelNode2 = (PLabel)nodeArrayList1.get(0); + tdefinetenbytesNode3 = (TDefinetenbytes)nodeArrayList2.get(0); + pnumconstNode4 = (PNumconst)nodeArrayList3.get(0); + + pconstNode1 = new ADtConst(plabelNode2, tdefinetenbytesNode3, pnumconstNode4); + } + nodeList.add(pconstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new16() /* reduce ARecLvar */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PLvar plvarNode1; + { + // Block + PVar pvarNode2; + PLvar plvarNode3; + pvarNode2 = (PVar)nodeArrayList1.get(0); + plvarNode3 = (PLvar)nodeArrayList2.get(0); + + plvarNode1 = new ARecLvar(pvarNode2, plvarNode3); + } + nodeList.add(plvarNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new17() /* reduce AEmptyLvar */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + PLvar plvarNode1; + { + // Block + + plvarNode1 = new AEmptyLvar(); + } + nodeList.add(plvarNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new18() /* reduce AResbVar */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PVar pvarNode1; + { + // Block + PLabel plabelNode2; + TSemicol tsemicolNode3; + TReservebyte treservebyteNode4; + TNumber tnumberNode5; + plabelNode2 = (PLabel)nodeArrayList1.get(0); + tsemicolNode3 = (TSemicol)nodeArrayList2.get(0); + treservebyteNode4 = (TReservebyte)nodeArrayList3.get(0); + tnumberNode5 = (TNumber)nodeArrayList4.get(0); + + pvarNode1 = new AResbVar(plabelNode2, tsemicolNode3, treservebyteNode4, tnumberNode5); + } + nodeList.add(pvarNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new19() /* reduce AReswVar */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PVar pvarNode1; + { + // Block + PLabel plabelNode2; + TSemicol tsemicolNode3; + TReserveword treservewordNode4; + TNumber tnumberNode5; + plabelNode2 = (PLabel)nodeArrayList1.get(0); + tsemicolNode3 = (TSemicol)nodeArrayList2.get(0); + treservewordNode4 = (TReserveword)nodeArrayList3.get(0); + tnumberNode5 = (TNumber)nodeArrayList4.get(0); + + pvarNode1 = new AReswVar(plabelNode2, tsemicolNode3, treservewordNode4, tnumberNode5); + } + nodeList.add(pvarNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new20() /* reduce AResdVar */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PVar pvarNode1; + { + // Block + PLabel plabelNode2; + TSemicol tsemicolNode3; + TReservedoubleword treservedoublewordNode4; + TNumber tnumberNode5; + plabelNode2 = (PLabel)nodeArrayList1.get(0); + tsemicolNode3 = (TSemicol)nodeArrayList2.get(0); + treservedoublewordNode4 = (TReservedoubleword)nodeArrayList3.get(0); + tnumberNode5 = (TNumber)nodeArrayList4.get(0); + + pvarNode1 = new AResdVar(plabelNode2, tsemicolNode3, treservedoublewordNode4, tnumberNode5); + } + nodeList.add(pvarNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new21() /* reduce AResqVar */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PVar pvarNode1; + { + // Block + PLabel plabelNode2; + TSemicol tsemicolNode3; + TReservequadword treservequadwordNode4; + TNumber tnumberNode5; + plabelNode2 = (PLabel)nodeArrayList1.get(0); + tsemicolNode3 = (TSemicol)nodeArrayList2.get(0); + treservequadwordNode4 = (TReservequadword)nodeArrayList3.get(0); + tnumberNode5 = (TNumber)nodeArrayList4.get(0); + + pvarNode1 = new AResqVar(plabelNode2, tsemicolNode3, treservequadwordNode4, tnumberNode5); + } + nodeList.add(pvarNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new22() /* reduce ARestVar */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PVar pvarNode1; + { + // Block + PLabel plabelNode2; + TSemicol tsemicolNode3; + TReservetenbytes treservetenbytesNode4; + TNumber tnumberNode5; + plabelNode2 = (PLabel)nodeArrayList1.get(0); + tsemicolNode3 = (TSemicol)nodeArrayList2.get(0); + treservetenbytesNode4 = (TReservetenbytes)nodeArrayList3.get(0); + tnumberNode5 = (TNumber)nodeArrayList4.get(0); + + pvarNode1 = new ARestVar(plabelNode2, tsemicolNode3, treservetenbytesNode4, tnumberNode5); + } + nodeList.add(pvarNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new23() /* reduce ASectext */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PSectext psectextNode1; + { + // Block + TSection tsectionNode2; + TText ttextNode3; + PLglobal plglobalNode4; + PLinst plinstNode5; + tsectionNode2 = (TSection)nodeArrayList1.get(0); + ttextNode3 = (TText)nodeArrayList2.get(0); + plglobalNode4 = (PLglobal)nodeArrayList3.get(0); + plinstNode5 = (PLinst)nodeArrayList4.get(0); + + psectextNode1 = new ASectext(tsectionNode2, ttextNode3, plglobalNode4, plinstNode5); + } + nodeList.add(psectextNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new24() /* reduce ARecLglobal */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PLglobal plglobalNode1; + { + // Block + TGlobal tglobalNode2; + PLabel plabelNode3; + PLglobal plglobalNode4; + tglobalNode2 = (TGlobal)nodeArrayList1.get(0); + plabelNode3 = (PLabel)nodeArrayList2.get(0); + plglobalNode4 = (PLglobal)nodeArrayList3.get(0); + + plglobalNode1 = new ARecLglobal(tglobalNode2, plabelNode3, plglobalNode4); + } + nodeList.add(plglobalNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new25() /* reduce AEmptyLglobal */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + PLglobal plglobalNode1; + { + // Block + + plglobalNode1 = new AEmptyLglobal(); + } + nodeList.add(plglobalNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new26() /* reduce ARecLinst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PLinst plinstNode1; + { + // Block + PInst pinstNode2; + PLinst plinstNode3; + pinstNode2 = (PInst)nodeArrayList1.get(0); + plinstNode3 = (PLinst)nodeArrayList2.get(0); + + plinstNode1 = new ARecLinst(pinstNode2, plinstNode3); + } + nodeList.add(plinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new27() /* reduce ALastLinst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PLinst plinstNode1; + { + // Block + PInst pinstNode2; + pinstNode2 = (PInst)nodeArrayList1.get(0); + + plinstNode1 = new ALastLinst(pinstNode2); + } + nodeList.add(plinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new28() /* reduce AMovInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TMov tmovNode3; + PAr parNode4; + TComma tcommaNode5; + PAcr pacrNode6; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + tmovNode3 = (TMov)nodeArrayList2.get(0); + parNode4 = (PAr)nodeArrayList3.get(0); + tcommaNode5 = (TComma)nodeArrayList4.get(0); + pacrNode6 = (PAcr)nodeArrayList5.get(0); + + pinstNode1 = new AMovInst(poplabelNode2, tmovNode3, parNode4, tcommaNode5, pacrNode6); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new29() /* reduce APushInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TPush tpushNode3; + PAcr pacrNode4; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + tpushNode3 = (TPush)nodeArrayList2.get(0); + pacrNode4 = (PAcr)nodeArrayList3.get(0); + + pinstNode1 = new APushInst(poplabelNode2, tpushNode3, pacrNode4); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new30() /* reduce APopInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TPop tpopNode3; + PAr parNode4; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + tpopNode3 = (TPop)nodeArrayList2.get(0); + parNode4 = (PAr)nodeArrayList3.get(0); + + pinstNode1 = new APopInst(poplabelNode2, tpopNode3, parNode4); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new31() /* reduce AAddInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TAdd taddNode3; + PAr parNode4; + TComma tcommaNode5; + PAcr pacrNode6; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + taddNode3 = (TAdd)nodeArrayList2.get(0); + parNode4 = (PAr)nodeArrayList3.get(0); + tcommaNode5 = (TComma)nodeArrayList4.get(0); + pacrNode6 = (PAcr)nodeArrayList5.get(0); + + pinstNode1 = new AAddInst(poplabelNode2, taddNode3, parNode4, tcommaNode5, pacrNode6); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new32() /* reduce ASubInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TSub tsubNode3; + PAr parNode4; + TComma tcommaNode5; + PAcr pacrNode6; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + tsubNode3 = (TSub)nodeArrayList2.get(0); + parNode4 = (PAr)nodeArrayList3.get(0); + tcommaNode5 = (TComma)nodeArrayList4.get(0); + pacrNode6 = (PAcr)nodeArrayList5.get(0); + + pinstNode1 = new ASubInst(poplabelNode2, tsubNode3, parNode4, tcommaNode5, pacrNode6); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new33() /* reduce AImulInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TImul timulNode3; + PAr parNode4; + TComma tcommaNode5; + PAcr pacrNode6; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + timulNode3 = (TImul)nodeArrayList2.get(0); + parNode4 = (PAr)nodeArrayList3.get(0); + tcommaNode5 = (TComma)nodeArrayList4.get(0); + pacrNode6 = (PAcr)nodeArrayList5.get(0); + + pinstNode1 = new AImulInst(poplabelNode2, timulNode3, parNode4, tcommaNode5, pacrNode6); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new34() /* reduce AIdivInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TIdiv tidivNode3; + PAr parNode4; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + tidivNode3 = (TIdiv)nodeArrayList2.get(0); + parNode4 = (PAr)nodeArrayList3.get(0); + + pinstNode1 = new AIdivInst(poplabelNode2, tidivNode3, parNode4); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new35() /* reduce AAndInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TAnd tandNode3; + PAr parNode4; + TComma tcommaNode5; + PAcr pacrNode6; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + tandNode3 = (TAnd)nodeArrayList2.get(0); + parNode4 = (PAr)nodeArrayList3.get(0); + tcommaNode5 = (TComma)nodeArrayList4.get(0); + pacrNode6 = (PAcr)nodeArrayList5.get(0); + + pinstNode1 = new AAndInst(poplabelNode2, tandNode3, parNode4, tcommaNode5, pacrNode6); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new36() /* reduce AOrInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TOr torNode3; + PAr parNode4; + TComma tcommaNode5; + PAcr pacrNode6; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + torNode3 = (TOr)nodeArrayList2.get(0); + parNode4 = (PAr)nodeArrayList3.get(0); + tcommaNode5 = (TComma)nodeArrayList4.get(0); + pacrNode6 = (PAcr)nodeArrayList5.get(0); + + pinstNode1 = new AOrInst(poplabelNode2, torNode3, parNode4, tcommaNode5, pacrNode6); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new37() /* reduce AXorInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TXor txorNode3; + PAr parNode4; + TComma tcommaNode5; + PAcr pacrNode6; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + txorNode3 = (TXor)nodeArrayList2.get(0); + parNode4 = (PAr)nodeArrayList3.get(0); + tcommaNode5 = (TComma)nodeArrayList4.get(0); + pacrNode6 = (PAcr)nodeArrayList5.get(0); + + pinstNode1 = new AXorInst(poplabelNode2, txorNode3, parNode4, tcommaNode5, pacrNode6); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new38() /* reduce ANotInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TNot tnotNode3; + PAr parNode4; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + tnotNode3 = (TNot)nodeArrayList2.get(0); + parNode4 = (PAr)nodeArrayList3.get(0); + + pinstNode1 = new ANotInst(poplabelNode2, tnotNode3, parNode4); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new39() /* reduce ACmpInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList5 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TCmp tcmpNode3; + PAr parNode4; + TComma tcommaNode5; + PAcr pacrNode6; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + tcmpNode3 = (TCmp)nodeArrayList2.get(0); + parNode4 = (PAr)nodeArrayList3.get(0); + tcommaNode5 = (TComma)nodeArrayList4.get(0); + pacrNode6 = (PAcr)nodeArrayList5.get(0); + + pinstNode1 = new ACmpInst(poplabelNode2, tcmpNode3, parNode4, tcommaNode5, pacrNode6); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new40() /* reduce AJmpInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TJmp tjmpNode3; + PLabel plabelNode4; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + tjmpNode3 = (TJmp)nodeArrayList2.get(0); + plabelNode4 = (PLabel)nodeArrayList3.get(0); + + pinstNode1 = new AJmpInst(poplabelNode2, tjmpNode3, plabelNode4); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new41() /* reduce AJeInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TJe tjeNode3; + PLabel plabelNode4; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + tjeNode3 = (TJe)nodeArrayList2.get(0); + plabelNode4 = (PLabel)nodeArrayList3.get(0); + + pinstNode1 = new AJeInst(poplabelNode2, tjeNode3, plabelNode4); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new42() /* reduce AJneInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TJne tjneNode3; + PLabel plabelNode4; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + tjneNode3 = (TJne)nodeArrayList2.get(0); + plabelNode4 = (PLabel)nodeArrayList3.get(0); + + pinstNode1 = new AJneInst(poplabelNode2, tjneNode3, plabelNode4); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new43() /* reduce AJgInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TJg tjgNode3; + PLabel plabelNode4; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + tjgNode3 = (TJg)nodeArrayList2.get(0); + plabelNode4 = (PLabel)nodeArrayList3.get(0); + + pinstNode1 = new AJgInst(poplabelNode2, tjgNode3, plabelNode4); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new44() /* reduce AJgeInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TJge tjgeNode3; + PLabel plabelNode4; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + tjgeNode3 = (TJge)nodeArrayList2.get(0); + plabelNode4 = (PLabel)nodeArrayList3.get(0); + + pinstNode1 = new AJgeInst(poplabelNode2, tjgeNode3, plabelNode4); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new45() /* reduce AJlInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TJl tjlNode3; + PLabel plabelNode4; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + tjlNode3 = (TJl)nodeArrayList2.get(0); + plabelNode4 = (PLabel)nodeArrayList3.get(0); + + pinstNode1 = new AJlInst(poplabelNode2, tjlNode3, plabelNode4); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new46() /* reduce ACallInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TCall tcallNode3; + PLabel plabelNode4; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + tcallNode3 = (TCall)nodeArrayList2.get(0); + plabelNode4 = (PLabel)nodeArrayList3.get(0); + + pinstNode1 = new ACallInst(poplabelNode2, tcallNode3, plabelNode4); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new47() /* reduce ARetInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TRet tretNode3; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + tretNode3 = (TRet)nodeArrayList2.get(0); + + pinstNode1 = new ARetInst(poplabelNode2, tretNode3); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new48() /* reduce AInterInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + POplabel poplabelNode2; + TInt tintNode3; + poplabelNode2 = (POplabel)nodeArrayList1.get(0); + tintNode3 = (TInt)nodeArrayList2.get(0); + + pinstNode1 = new AInterInst(poplabelNode2, tintNode3); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new49() /* reduce AAddressAcr */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PAcr pacrNode1; + { + // Block + PAddress paddressNode2; + paddressNode2 = (PAddress)nodeArrayList1.get(0); + + pacrNode1 = new AAddressAcr(paddressNode2); + } + nodeList.add(pacrNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new50() /* reduce ANumconstAcr */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PAcr pacrNode1; + { + // Block + PNumconst pnumconstNode2; + pnumconstNode2 = (PNumconst)nodeArrayList1.get(0); + + pacrNode1 = new ANumconstAcr(pnumconstNode2); + } + nodeList.add(pacrNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new51() /* reduce ARegisterAcr */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PAcr pacrNode1; + { + // Block + PRegister pregisterNode2; + pregisterNode2 = (PRegister)nodeArrayList1.get(0); + + pacrNode1 = new ARegisterAcr(pregisterNode2); + } + nodeList.add(pacrNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new52() /* reduce AAddressAr */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PAr parNode1; + { + // Block + PAddress paddressNode2; + paddressNode2 = (PAddress)nodeArrayList1.get(0); + + parNode1 = new AAddressAr(paddressNode2); + } + nodeList.add(parNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new53() /* reduce ARegisterAr */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PAr parNode1; + { + // Block + PRegister pregisterNode2; + pregisterNode2 = (PRegister)nodeArrayList1.get(0); + + parNode1 = new ARegisterAr(pregisterNode2); + } + nodeList.add(parNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new54() /* reduce AAddress */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList4 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PAddress paddressNode1; + { + // Block + POpsizeof popsizeofNode2; + TBrackopen tbrackopenNode3; + PExp pexpNode4; + TBrackclose tbrackcloseNode5; + popsizeofNode2 = (POpsizeof)nodeArrayList1.get(0); + tbrackopenNode3 = (TBrackopen)nodeArrayList2.get(0); + pexpNode4 = (PExp)nodeArrayList3.get(0); + tbrackcloseNode5 = (TBrackclose)nodeArrayList4.get(0); + + paddressNode1 = new AAddress(popsizeofNode2, tbrackopenNode3, pexpNode4, tbrackcloseNode5); + } + nodeList.add(paddressNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new55() /* reduce AByteOpsizeof */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + POpsizeof popsizeofNode1; + { + // Block + TByte tbyteNode2; + tbyteNode2 = (TByte)nodeArrayList1.get(0); + + popsizeofNode1 = new AByteOpsizeof(tbyteNode2); + } + nodeList.add(popsizeofNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new56() /* reduce AWordOpsizeof */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + POpsizeof popsizeofNode1; + { + // Block + TWord twordNode2; + twordNode2 = (TWord)nodeArrayList1.get(0); + + popsizeofNode1 = new AWordOpsizeof(twordNode2); + } + nodeList.add(popsizeofNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new57() /* reduce ADwordOpsizeof */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + POpsizeof popsizeofNode1; + { + // Block + TDword tdwordNode2; + tdwordNode2 = (TDword)nodeArrayList1.get(0); + + popsizeofNode1 = new ADwordOpsizeof(tdwordNode2); + } + nodeList.add(popsizeofNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new58() /* reduce AEmptyOpsizeof */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + POpsizeof popsizeofNode1; + { + // Block + + popsizeofNode1 = new AEmptyOpsizeof(); + } + nodeList.add(popsizeofNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new59() /* reduce APlusExp */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PExp pexpNode1; + { + // Block + PExp pexpNode2; + TPlus tplusNode3; + PExp1 pexp1Node4; + pexpNode2 = (PExp)nodeArrayList1.get(0); + tplusNode3 = (TPlus)nodeArrayList2.get(0); + pexp1Node4 = (PExp1)nodeArrayList3.get(0); + + pexpNode1 = new APlusExp(pexpNode2, tplusNode3, pexp1Node4); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new60() /* reduce AMinusExp */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PExp pexpNode1; + { + // Block + PExp pexpNode2; + TMinus tminusNode3; + PExp1 pexp1Node4; + pexpNode2 = (PExp)nodeArrayList1.get(0); + tminusNode3 = (TMinus)nodeArrayList2.get(0); + pexp1Node4 = (PExp1)nodeArrayList3.get(0); + + pexpNode1 = new AMinusExp(pexpNode2, tminusNode3, pexp1Node4); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new61() /* reduce ANextExp */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PExp pexpNode1; + { + // Block + PExp1 pexp1Node2; + pexp1Node2 = (PExp1)nodeArrayList1.get(0); + + pexpNode1 = new ANextExp(pexp1Node2); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new62() /* reduce ATimesExp1 */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList3 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PExp1 pexp1Node1; + { + // Block + PExp1 pexp1Node2; + TTimes ttimesNode3; + PExp2 pexp2Node4; + pexp1Node2 = (PExp1)nodeArrayList1.get(0); + ttimesNode3 = (TTimes)nodeArrayList2.get(0); + pexp2Node4 = (PExp2)nodeArrayList3.get(0); + + pexp1Node1 = new ATimesExp1(pexp1Node2, ttimesNode3, pexp2Node4); + } + nodeList.add(pexp1Node1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new63() /* reduce ANextExp1 */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PExp1 pexp1Node1; + { + // Block + PExp2 pexp2Node2; + pexp2Node2 = (PExp2)nodeArrayList1.get(0); + + pexp1Node1 = new ANextExp1(pexp2Node2); + } + nodeList.add(pexp1Node1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new64() /* reduce ALabelExp2 */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PExp2 pexp2Node1; + { + // Block + PLabel plabelNode2; + plabelNode2 = (PLabel)nodeArrayList1.get(0); + + pexp2Node1 = new ALabelExp2(plabelNode2); + } + nodeList.add(pexp2Node1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new65() /* reduce ANumconstExp2 */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PExp2 pexp2Node1; + { + // Block + PNumconst pnumconstNode2; + pnumconstNode2 = (PNumconst)nodeArrayList1.get(0); + + pexp2Node1 = new ANumconstExp2(pnumconstNode2); + } + nodeList.add(pexp2Node1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new66() /* reduce ARegisterExp2 */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PExp2 pexp2Node1; + { + // Block + PRegister pregisterNode2; + pregisterNode2 = (PRegister)nodeArrayList1.get(0); + + pexp2Node1 = new ARegisterExp2(pregisterNode2); + } + nodeList.add(pexp2Node1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new67() /* reduce ANumconst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PNumconst pnumconstNode1; + { + // Block + TNumber tnumberNode2; + tnumberNode2 = (TNumber)nodeArrayList1.get(0); + + pnumconstNode1 = new ANumconst(tnumberNode2); + } + nodeList.add(pnumconstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new68() /* reduce ATempRegister */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PRegister pregisterNode1; + { + // Block + TPrefixRegister tprefixregisterNode2; + TNumber tnumberNode3; + tprefixregisterNode2 = (TPrefixRegister)nodeArrayList1.get(0); + tnumberNode3 = (TNumber)nodeArrayList2.get(0); + + pregisterNode1 = new ATempRegister(tprefixregisterNode2, tnumberNode3); + } + nodeList.add(pregisterNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new69() /* reduce AEaxRegister */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PRegister pregisterNode1; + { + // Block + TEax teaxNode2; + teaxNode2 = (TEax)nodeArrayList1.get(0); + + pregisterNode1 = new AEaxRegister(teaxNode2); + } + nodeList.add(pregisterNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new70() /* reduce AEbxRegister */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PRegister pregisterNode1; + { + // Block + TEbx tebxNode2; + tebxNode2 = (TEbx)nodeArrayList1.get(0); + + pregisterNode1 = new AEbxRegister(tebxNode2); + } + nodeList.add(pregisterNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new71() /* reduce AEcxRegister */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PRegister pregisterNode1; + { + // Block + TEcx tecxNode2; + tecxNode2 = (TEcx)nodeArrayList1.get(0); + + pregisterNode1 = new AEcxRegister(tecxNode2); + } + nodeList.add(pregisterNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new72() /* reduce AEdxRegister */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PRegister pregisterNode1; + { + // Block + TEdx tedxNode2; + tedxNode2 = (TEdx)nodeArrayList1.get(0); + + pregisterNode1 = new AEdxRegister(tedxNode2); + } + nodeList.add(pregisterNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new73() /* reduce AEbpRegister */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PRegister pregisterNode1; + { + // Block + TEbp tebpNode2; + tebpNode2 = (TEbp)nodeArrayList1.get(0); + + pregisterNode1 = new AEbpRegister(tebpNode2); + } + nodeList.add(pregisterNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new74() /* reduce AEspRegister */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PRegister pregisterNode1; + { + // Block + TEsp tespNode2; + tespNode2 = (TEsp)nodeArrayList1.get(0); + + pregisterNode1 = new AEspRegister(tespNode2); + } + nodeList.add(pregisterNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new75() /* reduce ALabelOplabel */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + POplabel poplabelNode1; + { + // Block + PLabel plabelNode2; + TSemicol tsemicolNode3; + plabelNode2 = (PLabel)nodeArrayList1.get(0); + tsemicolNode3 = (TSemicol)nodeArrayList2.get(0); + + poplabelNode1 = new ALabelOplabel(plabelNode2, tsemicolNode3); + } + nodeList.add(poplabelNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new76() /* reduce AEmptyOplabel */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + POplabel poplabelNode1; + { + // Block + + poplabelNode1 = new AEmptyOplabel(); + } + nodeList.add(poplabelNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new77() /* reduce ALabel */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PLabel plabelNode1; + { + // Block + TId tidNode2; + tidNode2 = (TId)nodeArrayList1.get(0); + + plabelNode1 = new ALabel(tidNode2); + } + nodeList.add(plabelNode1); + return nodeList; + } + + + + private static int[][][] actionTable; +/* { + {{-1, REDUCE, 5}, {9, SHIFT, 1}, }, + {{-1, ERROR, 1}, {14, SHIFT, 5}, }, + {{-1, ERROR, 2}, {60, ACCEPT, -1}, }, + {{-1, ERROR, 3}, {15, SHIFT, 6}, }, + {{-1, REDUCE, 5}, {9, SHIFT, 1}, }, + {{-1, ERROR, 5}, {7, SHIFT, 9}, }, + {{-1, ERROR, 6}, {16, SHIFT, 10}, {22, SHIFT, 11}, {28, SHIFT, 12}, }, + {{-1, REDUCE, 3}, }, + {{-1, REDUCE, 4}, }, + {{-1, ERROR, 9}, {59, SHIFT, 13}, }, + {{-1, REDUCE, 10}, {59, SHIFT, 13}, }, + {{-1, REDUCE, 17}, {59, SHIFT, 13}, }, + {{-1, REDUCE, 25}, {29, SHIFT, 22}, }, + {{-1, REDUCE, 77}, }, + {{-1, ERROR, 14}, {7, SHIFT, 24}, }, + {{-1, REDUCE, 7}, {8, SHIFT, 25}, }, + {{-1, ERROR, 16}, {15, SHIFT, 26}, }, + {{-1, REDUCE, 10}, {59, SHIFT, 13}, }, + {{-1, ERROR, 18}, {17, SHIFT, 29}, {18, SHIFT, 30}, {19, SHIFT, 31}, {20, SHIFT, 32}, {21, SHIFT, 33}, }, + {{-1, ERROR, 19}, {15, SHIFT, 34}, }, + {{-1, REDUCE, 17}, {59, SHIFT, 13}, }, + {{-1, ERROR, 21}, {5, SHIFT, 37}, }, + {{-1, ERROR, 22}, {59, SHIFT, 13}, }, + {{-1, REDUCE, 76}, {59, SHIFT, 13}, }, + {{-1, REDUCE, 6}, }, + {{-1, ERROR, 25}, {59, SHIFT, 13}, }, + {{-1, ERROR, 26}, {22, SHIFT, 44}, {28, SHIFT, 12}, }, + {{-1, REDUCE, 1}, }, + {{-1, REDUCE, 9}, }, + {{-1, ERROR, 29}, {58, SHIFT, 45}, }, + {{-1, ERROR, 30}, {58, SHIFT, 45}, }, + {{-1, ERROR, 31}, {58, SHIFT, 45}, }, + {{-1, ERROR, 32}, {58, SHIFT, 45}, }, + {{-1, ERROR, 33}, {58, SHIFT, 45}, }, + {{-1, ERROR, 34}, {28, SHIFT, 12}, }, + {{-1, REDUCE, 2}, }, + {{-1, REDUCE, 16}, }, + {{-1, ERROR, 37}, {23, SHIFT, 51}, {24, SHIFT, 52}, {25, SHIFT, 53}, {26, SHIFT, 54}, {27, SHIFT, 55}, }, + {{-1, REDUCE, 25}, {29, SHIFT, 22}, }, + {{-1, REDUCE, 23}, }, + {{-1, REDUCE, 76}, {59, SHIFT, 13}, {60, REDUCE, 27}, }, + {{-1, ERROR, 41}, {30, SHIFT, 58}, {31, SHIFT, 59}, {32, SHIFT, 60}, {33, SHIFT, 61}, {34, SHIFT, 62}, {35, SHIFT, 63}, {36, SHIFT, 64}, {37, SHIFT, 65}, {38, SHIFT, 66}, {39, SHIFT, 67}, {40, SHIFT, 68}, {41, SHIFT, 69}, {42, SHIFT, 70}, {43, SHIFT, 71}, {44, SHIFT, 72}, {45, SHIFT, 73}, {46, SHIFT, 74}, {47, SHIFT, 75}, {49, SHIFT, 76}, {50, SHIFT, 77}, {51, SHIFT, 78}, }, + {{-1, ERROR, 42}, {5, SHIFT, 79}, }, + {{-1, REDUCE, 8}, }, + {{-1, REDUCE, 17}, {59, SHIFT, 13}, }, + {{-1, REDUCE, 67}, }, + {{-1, REDUCE, 11}, }, + {{-1, REDUCE, 12}, }, + {{-1, REDUCE, 13}, }, + {{-1, REDUCE, 14}, }, + {{-1, REDUCE, 15}, }, + {{-1, ERROR, 51}, {58, SHIFT, 81}, }, + {{-1, ERROR, 52}, {58, SHIFT, 82}, }, + {{-1, ERROR, 53}, {58, SHIFT, 83}, }, + {{-1, ERROR, 54}, {58, SHIFT, 84}, }, + {{-1, ERROR, 55}, {58, SHIFT, 85}, }, + {{-1, REDUCE, 24}, }, + {{-1, REDUCE, 26}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, {58, SHIFT, 45}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, }, + {{-1, ERROR, 70}, {59, SHIFT, 13}, }, + {{-1, ERROR, 71}, {59, SHIFT, 13}, }, + {{-1, ERROR, 72}, {59, SHIFT, 13}, }, + {{-1, ERROR, 73}, {59, SHIFT, 13}, }, + {{-1, ERROR, 74}, {59, SHIFT, 13}, }, + {{-1, ERROR, 75}, {59, SHIFT, 13}, }, + {{-1, ERROR, 76}, {59, SHIFT, 13}, }, + {{-1, REDUCE, 47}, }, + {{-1, REDUCE, 48}, }, + {{-1, REDUCE, 75}, }, + {{-1, ERROR, 80}, {15, SHIFT, 34}, }, + {{-1, REDUCE, 18}, }, + {{-1, REDUCE, 19}, }, + {{-1, REDUCE, 20}, }, + {{-1, REDUCE, 21}, }, + {{-1, REDUCE, 22}, }, + {{-1, REDUCE, 55}, }, + {{-1, REDUCE, 56}, }, + {{-1, REDUCE, 57}, }, + {{-1, ERROR, 89}, {58, SHIFT, 122}, }, + {{-1, REDUCE, 69}, }, + {{-1, REDUCE, 70}, }, + {{-1, REDUCE, 71}, }, + {{-1, REDUCE, 72}, }, + {{-1, REDUCE, 73}, }, + {{-1, REDUCE, 74}, }, + {{-1, ERROR, 96}, {6, SHIFT, 123}, }, + {{-1, REDUCE, 52}, }, + {{-1, ERROR, 98}, {3, SHIFT, 124}, }, + {{-1, REDUCE, 53}, }, + {{-1, REDUCE, 29}, }, + {{-1, REDUCE, 49}, }, + {{-1, REDUCE, 50}, }, + {{-1, REDUCE, 51}, }, + {{-1, REDUCE, 30}, }, + {{-1, ERROR, 105}, {6, SHIFT, 125}, }, + {{-1, ERROR, 106}, {6, SHIFT, 126}, }, + {{-1, ERROR, 107}, {6, SHIFT, 127}, }, + {{-1, REDUCE, 34}, }, + {{-1, ERROR, 109}, {6, SHIFT, 128}, }, + {{-1, ERROR, 110}, {6, SHIFT, 129}, }, + {{-1, ERROR, 111}, {6, SHIFT, 130}, }, + {{-1, REDUCE, 38}, }, + {{-1, ERROR, 113}, {6, SHIFT, 131}, }, + {{-1, REDUCE, 40}, }, + {{-1, REDUCE, 41}, }, + {{-1, REDUCE, 42}, }, + {{-1, REDUCE, 43}, }, + {{-1, REDUCE, 44}, }, + {{-1, REDUCE, 45}, }, + {{-1, REDUCE, 46}, }, + {{-1, REDUCE, 0}, }, + {{-1, REDUCE, 68}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, {58, SHIFT, 45}, }, + {{-1, ERROR, 124}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, {58, SHIFT, 45}, {59, SHIFT, 13}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, {58, SHIFT, 45}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, {58, SHIFT, 45}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, {58, SHIFT, 45}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, {58, SHIFT, 45}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, {58, SHIFT, 45}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, {58, SHIFT, 45}, }, + {{-1, REDUCE, 58}, {10, SHIFT, 86}, {11, SHIFT, 87}, {12, SHIFT, 88}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, {58, SHIFT, 45}, }, + {{-1, REDUCE, 28}, }, + {{-1, ERROR, 133}, {0, SHIFT, 146}, {1, SHIFT, 147}, {4, SHIFT, 148}, }, + {{-1, REDUCE, 61}, {2, SHIFT, 149}, }, + {{-1, REDUCE, 63}, }, + {{-1, REDUCE, 65}, }, + {{-1, REDUCE, 66}, }, + {{-1, REDUCE, 64}, }, + {{-1, REDUCE, 31}, }, + {{-1, REDUCE, 32}, }, + {{-1, REDUCE, 33}, }, + {{-1, REDUCE, 35}, }, + {{-1, REDUCE, 36}, }, + {{-1, REDUCE, 37}, }, + {{-1, REDUCE, 39}, }, + {{-1, ERROR, 146}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, {58, SHIFT, 45}, {59, SHIFT, 13}, }, + {{-1, ERROR, 147}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, {58, SHIFT, 45}, {59, SHIFT, 13}, }, + {{-1, REDUCE, 54}, }, + {{-1, ERROR, 149}, {13, SHIFT, 89}, {52, SHIFT, 90}, {53, SHIFT, 91}, {54, SHIFT, 92}, {55, SHIFT, 93}, {56, SHIFT, 94}, {57, SHIFT, 95}, {58, SHIFT, 45}, {59, SHIFT, 13}, }, + {{-1, REDUCE, 59}, {2, SHIFT, 149}, }, + {{-1, REDUCE, 60}, {2, SHIFT, 149}, }, + {{-1, REDUCE, 62}, }, + };*/ + private static int[][][] gotoTable; +/* { + {{-1, 2}, }, + {{-1, 3}, {4, 8}, }, + {{-1, 4}, }, + {{-1, 14}, }, + {{-1, 16}, {17, 28}, }, + {{-1, 17}, }, + {{-1, 19}, {20, 36}, {44, 80}, }, + {{-1, 20}, }, + {{-1, 7}, {16, 27}, {19, 35}, {80, 121}, }, + {{-1, 23}, {38, 56}, }, + {{-1, 39}, {40, 57}, }, + {{-1, 40}, }, + {{-1, 100}, {123, 132}, {125, 139}, {126, 140}, {127, 141}, {128, 142}, {129, 143}, {130, 144}, {131, 145}, }, + {{-1, 96}, {60, 104}, {61, 105}, {62, 106}, {63, 107}, {64, 108}, {65, 109}, {66, 110}, {67, 111}, {68, 112}, {69, 113}, }, + {{-1, 97}, {59, 101}, {123, 101}, {125, 101}, {126, 101}, {127, 101}, {128, 101}, {129, 101}, {130, 101}, {131, 101}, }, + {{-1, 98}, }, + {{-1, 133}, }, + {{-1, 134}, {146, 150}, {147, 151}, }, + {{-1, 135}, {149, 152}, }, + {{-1, 102}, {29, 46}, {30, 47}, {31, 48}, {32, 49}, {33, 50}, {124, 136}, {146, 136}, {147, 136}, {149, 136}, }, + {{-1, 99}, {59, 103}, {123, 103}, {124, 137}, {125, 103}, {126, 103}, {127, 103}, {128, 103}, {129, 103}, {130, 103}, {131, 103}, {146, 137}, {147, 137}, {149, 137}, }, + {{-1, 41}, }, + {{-1, 138}, {9, 15}, {10, 18}, {11, 21}, {17, 18}, {20, 21}, {22, 38}, {23, 42}, {25, 43}, {40, 42}, {44, 21}, {70, 114}, {71, 115}, {72, 116}, {73, 117}, {74, 118}, {75, 119}, {76, 120}, }, + };*/ + private static String[] errorMessages; +/* { + "expecting: '%', 'section'", + "expecting: 'include'", + "expecting: EOF", + "expecting: 'section'", + "expecting: '''", + "expecting: '.data', '.bss', '.text'", + "expecting: id", + "expecting: 'section', id", + "expecting: 'global', 'mov', 'push', 'pop', 'add', 'sub', 'imul', 'idiv', 'and', 'or', 'xor', 'not', 'cmp', 'jmp', 'je', 'jne', 'jg', 'jge', 'jl', 'call', 'ret', 'int 0x80', id", + "expecting: '+', '-', '*', ']', ':', ''', '.', 'db', 'dw', 'dd', 'dq', 'dt', 'global', 'mov', 'push', 'pop', 'add', 'sub', 'imul', 'idiv', 'and', 'or', 'xor', 'not', 'cmp', 'jmp', 'je', 'jne', 'jg', 'jge', 'jl', 'call', 'ret', 'int 0x80', id, EOF", + "expecting: ''', '.'", + "expecting: 'db', 'dw', 'dd', 'dq', 'dt'", + "expecting: ':'", + "expecting: 'mov', 'push', 'pop', 'add', 'sub', 'imul', 'idiv', 'and', 'or', 'xor', 'not', 'cmp', 'jmp', 'je', 'jne', 'jg', 'jge', 'jl', 'call', 'ret', 'int 0x80', id", + "expecting: '.bss', '.text'", + "expecting: number", + "expecting: '.text'", + "expecting: 'resb', 'resw', 'resd', 'resq', 'rest'", + "expecting: 'mov', 'push', 'pop', 'add', 'sub', 'imul', 'idiv', 'and', 'or', 'xor', 'not', 'cmp', 'jmp', 'je', 'jne', 'jg', 'jge', 'jl', 'call', 'ret', 'int 0x80', id, EOF", + "expecting: 'mov', 'push', 'pop', 'add', 'sub', 'imul', 'idiv', 'and', 'or', 'xor', 'not', 'cmp', 'jmp', 'je', 'jne', 'jg', 'jge', 'jl', 'call', 'ret', 'int 0x80'", + "expecting: '+', '-', '*', ']', 'section', 'mov', 'push', 'pop', 'add', 'sub', 'imul', 'idiv', 'and', 'or', 'xor', 'not', 'cmp', 'jmp', 'je', 'jne', 'jg', 'jge', 'jl', 'call', 'ret', 'int 0x80', id, EOF", + "expecting: '[', 'byte', 'word', 'dword', '@', 'eax', 'ebx', 'ecx', 'edx', 'ebp', 'esp'", + "expecting: '[', 'byte', 'word', 'dword', '@', 'eax', 'ebx', 'ecx', 'edx', 'ebp', 'esp', number", + "expecting: '['", + "expecting: '+', '-', '*', ']', ',', 'mov', 'push', 'pop', 'add', 'sub', 'imul', 'idiv', 'and', 'or', 'xor', 'not', 'cmp', 'jmp', 'je', 'jne', 'jg', 'jge', 'jl', 'call', 'ret', 'int 0x80', id, EOF", + "expecting: ','", + "expecting: ',', 'mov', 'push', 'pop', 'add', 'sub', 'imul', 'idiv', 'and', 'or', 'xor', 'not', 'cmp', 'jmp', 'je', 'jne', 'jg', 'jge', 'jl', 'call', 'ret', 'int 0x80', id, EOF", + "expecting: '@', 'eax', 'ebx', 'ecx', 'edx', 'ebp', 'esp', number, id", + "expecting: '+', '-', ']'", + "expecting: '+', '-', '*', ']'", + };*/ + private static int[] errors; +/* { + 0, 1, 2, 3, 0, 4, 5, 2, 3, 6, 7, 7, 8, 9, 4, 10, 3, 7, 11, 3, 7, 12, 6, 13, 0, 6, 14, 2, 3, 15, 15, 15, 15, 15, 16, 2, 3, 17, 8, 2, 18, 19, 12, 4, 7, 20, 7, 7, 7, 7, 7, 15, 15, 15, 15, 15, 13, 2, 21, 22, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 6, 6, 6, 6, 6, 6, 6, 18, 18, 19, 3, 7, 7, 7, 7, 7, 23, 23, 23, 15, 24, 24, 24, 24, 24, 24, 25, 26, 23, 26, 18, 18, 18, 18, 18, 25, 25, 25, 18, 25, 25, 25, 18, 25, 18, 18, 18, 18, 18, 18, 18, 2, 24, 22, 27, 22, 22, 22, 22, 22, 22, 22, 18, 28, 29, 29, 29, 29, 29, 18, 18, 18, 18, 18, 18, 18, 27, 27, 26, 27, 29, 29, 29, + };*/ + + static + { + try + { + DataInputStream s = new DataInputStream( + new BufferedInputStream( + Parser.class.getResourceAsStream("parser.dat"))); + + // read actionTable + int length = s.readInt(); + Parser.actionTable = new int[length][][]; + for(int i = 0; i < Parser.actionTable.length; i++) + { + length = s.readInt(); + Parser.actionTable[i] = new int[length][3]; + for(int j = 0; j < Parser.actionTable[i].length; j++) + { + for(int k = 0; k < 3; k++) + { + Parser.actionTable[i][j][k] = s.readInt(); + } + } + } + + // read gotoTable + length = s.readInt(); + gotoTable = new int[length][][]; + for(int i = 0; i < gotoTable.length; i++) + { + length = s.readInt(); + gotoTable[i] = new int[length][2]; + for(int j = 0; j < gotoTable[i].length; j++) + { + for(int k = 0; k < 2; k++) + { + gotoTable[i][j][k] = s.readInt(); + } + } + } + + // read errorMessages + length = s.readInt(); + errorMessages = new String[length]; + for(int i = 0; i < errorMessages.length; i++) + { + length = s.readInt(); + StringBuffer buffer = new StringBuffer(); + + for(int j = 0; j < length; j++) + { + buffer.append(s.readChar()); + } + errorMessages[i] = buffer.toString(); + } + + // read errors + length = s.readInt(); + errors = new int[length]; + for(int i = 0; i < errors.length; i++) + { + errors[i] = s.readInt(); + } + + s.close(); + } + catch(Exception e) + { + throw new RuntimeException("The file \"parser.dat\" is either missing or corrupted."); + } + } +} diff --git a/src/nasmParser/parser/ParserException.java b/src/nasmParser/parser/ParserException.java new file mode 100644 index 0000000..0dd37ab --- /dev/null +++ b/src/nasmParser/parser/ParserException.java @@ -0,0 +1,22 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.parser; + +import nasmParser.node.*; + +@SuppressWarnings("serial") +public class ParserException extends Exception +{ + private Token token; + + public ParserException(@SuppressWarnings("hiding") Token token, String message) + { + super(message); + this.token = token; + } + + public Token getToken() + { + return this.token; + } +} diff --git a/src/nasmParser/parser/State.java b/src/nasmParser/parser/State.java new file mode 100644 index 0000000..5922201 --- /dev/null +++ b/src/nasmParser/parser/State.java @@ -0,0 +1,17 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.parser; + +import java.util.ArrayList; + +final class State +{ + int state; + ArrayList<Object> nodes; + + State(@SuppressWarnings("hiding") int state, @SuppressWarnings("hiding") ArrayList<Object> nodes) + { + this.state = state; + this.nodes = nodes; + } +} diff --git a/src/nasmParser/parser/TokenIndex.java b/src/nasmParser/parser/TokenIndex.java new file mode 100644 index 0000000..54d92fd --- /dev/null +++ b/src/nasmParser/parser/TokenIndex.java @@ -0,0 +1,377 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.parser; + +import nasmParser.node.*; +import nasmParser.analysis.*; + +class TokenIndex extends AnalysisAdapter +{ + int index; + + @Override + public void caseTPlus(@SuppressWarnings("unused") TPlus node) + { + this.index = 0; + } + + @Override + public void caseTMinus(@SuppressWarnings("unused") TMinus node) + { + this.index = 1; + } + + @Override + public void caseTTimes(@SuppressWarnings("unused") TTimes node) + { + this.index = 2; + } + + @Override + public void caseTBrackopen(@SuppressWarnings("unused") TBrackopen node) + { + this.index = 3; + } + + @Override + public void caseTBrackclose(@SuppressWarnings("unused") TBrackclose node) + { + this.index = 4; + } + + @Override + public void caseTSemicol(@SuppressWarnings("unused") TSemicol node) + { + this.index = 5; + } + + @Override + public void caseTComma(@SuppressWarnings("unused") TComma node) + { + this.index = 6; + } + + @Override + public void caseTQuote(@SuppressWarnings("unused") TQuote node) + { + this.index = 7; + } + + @Override + public void caseTDot(@SuppressWarnings("unused") TDot node) + { + this.index = 8; + } + + @Override + public void caseTPercentage(@SuppressWarnings("unused") TPercentage node) + { + this.index = 9; + } + + @Override + public void caseTByte(@SuppressWarnings("unused") TByte node) + { + this.index = 10; + } + + @Override + public void caseTWord(@SuppressWarnings("unused") TWord node) + { + this.index = 11; + } + + @Override + public void caseTDword(@SuppressWarnings("unused") TDword node) + { + this.index = 12; + } + + @Override + public void caseTPrefixRegister(@SuppressWarnings("unused") TPrefixRegister node) + { + this.index = 13; + } + + @Override + public void caseTInc(@SuppressWarnings("unused") TInc node) + { + this.index = 14; + } + + @Override + public void caseTSection(@SuppressWarnings("unused") TSection node) + { + this.index = 15; + } + + @Override + public void caseTData(@SuppressWarnings("unused") TData node) + { + this.index = 16; + } + + @Override + public void caseTDefinebyte(@SuppressWarnings("unused") TDefinebyte node) + { + this.index = 17; + } + + @Override + public void caseTDefineword(@SuppressWarnings("unused") TDefineword node) + { + this.index = 18; + } + + @Override + public void caseTDefinedoubleword(@SuppressWarnings("unused") TDefinedoubleword node) + { + this.index = 19; + } + + @Override + public void caseTDefinequadword(@SuppressWarnings("unused") TDefinequadword node) + { + this.index = 20; + } + + @Override + public void caseTDefinetenbytes(@SuppressWarnings("unused") TDefinetenbytes node) + { + this.index = 21; + } + + @Override + public void caseTBss(@SuppressWarnings("unused") TBss node) + { + this.index = 22; + } + + @Override + public void caseTReservebyte(@SuppressWarnings("unused") TReservebyte node) + { + this.index = 23; + } + + @Override + public void caseTReserveword(@SuppressWarnings("unused") TReserveword node) + { + this.index = 24; + } + + @Override + public void caseTReservedoubleword(@SuppressWarnings("unused") TReservedoubleword node) + { + this.index = 25; + } + + @Override + public void caseTReservequadword(@SuppressWarnings("unused") TReservequadword node) + { + this.index = 26; + } + + @Override + public void caseTReservetenbytes(@SuppressWarnings("unused") TReservetenbytes node) + { + this.index = 27; + } + + @Override + public void caseTText(@SuppressWarnings("unused") TText node) + { + this.index = 28; + } + + @Override + public void caseTGlobal(@SuppressWarnings("unused") TGlobal node) + { + this.index = 29; + } + + @Override + public void caseTMov(@SuppressWarnings("unused") TMov node) + { + this.index = 30; + } + + @Override + public void caseTPush(@SuppressWarnings("unused") TPush node) + { + this.index = 31; + } + + @Override + public void caseTPop(@SuppressWarnings("unused") TPop node) + { + this.index = 32; + } + + @Override + public void caseTAdd(@SuppressWarnings("unused") TAdd node) + { + this.index = 33; + } + + @Override + public void caseTSub(@SuppressWarnings("unused") TSub node) + { + this.index = 34; + } + + @Override + public void caseTImul(@SuppressWarnings("unused") TImul node) + { + this.index = 35; + } + + @Override + public void caseTIdiv(@SuppressWarnings("unused") TIdiv node) + { + this.index = 36; + } + + @Override + public void caseTAnd(@SuppressWarnings("unused") TAnd node) + { + this.index = 37; + } + + @Override + public void caseTOr(@SuppressWarnings("unused") TOr node) + { + this.index = 38; + } + + @Override + public void caseTXor(@SuppressWarnings("unused") TXor node) + { + this.index = 39; + } + + @Override + public void caseTNot(@SuppressWarnings("unused") TNot node) + { + this.index = 40; + } + + @Override + public void caseTCmp(@SuppressWarnings("unused") TCmp node) + { + this.index = 41; + } + + @Override + public void caseTJmp(@SuppressWarnings("unused") TJmp node) + { + this.index = 42; + } + + @Override + public void caseTJe(@SuppressWarnings("unused") TJe node) + { + this.index = 43; + } + + @Override + public void caseTJne(@SuppressWarnings("unused") TJne node) + { + this.index = 44; + } + + @Override + public void caseTJg(@SuppressWarnings("unused") TJg node) + { + this.index = 45; + } + + @Override + public void caseTJge(@SuppressWarnings("unused") TJge node) + { + this.index = 46; + } + + @Override + public void caseTJl(@SuppressWarnings("unused") TJl node) + { + this.index = 47; + } + + @Override + public void caseTJle(@SuppressWarnings("unused") TJle node) + { + this.index = 48; + } + + @Override + public void caseTCall(@SuppressWarnings("unused") TCall node) + { + this.index = 49; + } + + @Override + public void caseTRet(@SuppressWarnings("unused") TRet node) + { + this.index = 50; + } + + @Override + public void caseTInt(@SuppressWarnings("unused") TInt node) + { + this.index = 51; + } + + @Override + public void caseTEax(@SuppressWarnings("unused") TEax node) + { + this.index = 52; + } + + @Override + public void caseTEbx(@SuppressWarnings("unused") TEbx node) + { + this.index = 53; + } + + @Override + public void caseTEcx(@SuppressWarnings("unused") TEcx node) + { + this.index = 54; + } + + @Override + public void caseTEdx(@SuppressWarnings("unused") TEdx node) + { + this.index = 55; + } + + @Override + public void caseTEbp(@SuppressWarnings("unused") TEbp node) + { + this.index = 56; + } + + @Override + public void caseTEsp(@SuppressWarnings("unused") TEsp node) + { + this.index = 57; + } + + @Override + public void caseTNumber(@SuppressWarnings("unused") TNumber node) + { + this.index = 58; + } + + @Override + public void caseTId(@SuppressWarnings("unused") TId node) + { + this.index = 59; + } + + @Override + public void caseEOF(@SuppressWarnings("unused") EOF node) + { + this.index = 60; + } +} diff --git a/src/nasmParser/parser/parser.dat b/src/nasmParser/parser/parser.dat new file mode 100644 index 0000000000000000000000000000000000000000..3ab32b337e1cd1ceb35e904e14a20705b3cee6b7 GIT binary patch literal 12514 zcmZQzV3^6kz`*qX|Ns9C3=E763=FIc3=EtM5CG!C<d~uId=M$HI%GK}1_lNjB(sp^ zKzjM1`q+@vfXv5dA4rZJst@EQ7N|Qx=7G!+fXZ<(FffQg+1v~a3^GtQ56I0>Js`V4 z`WTV;EJ$tv$${*!hU(=-k^|`l*?~(=kb!{#mz*R61A{EoOpqIq?e|5p17traY+?SD zK#~L54-)5qngcQuIebCk01IC!G=1pqW`p`4WS<ZN0|UtIAY(yp1o1&^IR*v>VGx6X zfkB>ufk6byR$yRY5QVZ8k?aAP1yT=lgA$S)$n79Iu!RpuAILmVJcEo?MbZb71BDkh zeIPS^(83%!TtR6AIeb9jg=`KpQW${33uF(-ejPk%2V^I*9iX&=YzHX(tU!h^Ffiz% z`2!T5xa2_Li%Sj^-nisI;g3rW6#lsK04Sd#`va7AkkbSx4#c7UFlJz20Hs3^*MxzA z0ThlPwkZPx11Q`;Y%>N125At3fq}ss$={&x0;vau3rHFi#>n=9?104sNG*DNg31z* zILK@<r1;WgU|;}+C&)~Y|3TpgVuRur6kZ@UNG~XSKx|tE1_n@gfY^2n3=GO31_J|w zJp%)S3Y6`@z`y|VH;C)Vz`&peVlXf;I599Vs6*M#3=9k!P__#L0|Uq%Ag(I|1A`Wb z!N9=a#=yX!4Q0DCFff496Nu{pO%outCj$e69*Dufz~IHez@QIhdowUF7(&^gurPwM zL1hFe9za|_r0@mh50JgEyyK5n)`7|jSo#EoBYGZ0jth|Akoll86q%1+j)KZYWO-1z zh0F()12DTm?gY6X6jvZW1fux?l&)ZML1=QIbOw_PMw0`jJD6Munj9z{!sJ5H!UdF` zk=+VP$K25L1qvsSK2Vtna%&g^0|O{5K<sb^1_n?#fY=cX3=E(!0I?$(7#Ki)0I{PO z7#Kiq2C<_V7#Kiq1hHeFc>~0bWnf^i05KRC7~&Wh7%ZXec#!#n#2uh8067a(jt!Qu z8FdG0S{V(G(eS`mmW-y4!I?gg>qSs|0n}~*m9?Py1X&K$e!wLMYER&j1GO)3$${D% zxa2_X4_tDf_6V{Za{UQvzaaAs(CS-|xyb$sU|?VXwGTjk2DQtO^@92z$b3+r0+|o$ zhamGoeFtPddK(ke4nUR%)w{@iP~D5{Hc(v-tNW_Z`~hm`A?pRj9WoyjU&wq=93k^T z@q)|;#Ran62@DJjpneM|T&mIR2DLAc)h018Fo4=sAhk7UYC-J}WP3pEZ)85Gjfu<$ zwKI|Vptc$^AJo=HwmTEaowaD~t}G<EIyAX#B)NJtH-pjvvK_fdY8%kZ$wQKBM3c)$ zl50Y<1JtHRwxbY9Z8Mr$P&*$v3_xvtWIm|fjm!tN`H}gcc0V#7)Q&>tgWCVdd{8_h z^FjR!o<Z0a<bt{hl=eXB4pe4=+z!e&pfn0%Q`!cG<v&oEA(uIWF+4`ygu5?;9FL>n zG#XCSEEkZ=O3*kL^0;s-s1SnUNuY8a%AU-?zyKQW1#zb!)f=EbKWK~yG%f~`n+nnc zE$2XTpm8E(`#|GE$b8Tk5i%b%mW0d)jZY!-L1R?Ne9$-*G9NTPh0F(yQ6cj|<5b9e z(D)Q`xeW3%J<DZeyFp=0PrH%B0W{Wv>=sZw($g)lwgo87fa)#e^n@%28k<CxL-qq` zd=fM+3KIjVgXsm;xuEn58rOr#gZMBuXbcXf7Br>{8t((;4VXNL4;ya<wW~pGX;9h% zwN*fEa+o@hI4nPb<{Us~fyQ7#dO&Ftq_z?%|A5>JYFmNY)-d})X%f_i0=2JU=7RW~ z(0rA`z`y`%<F+s`Fo4>S-3$y2p!Q-90|Nu7ZP?4ezyNCZ^)WCofZBNd3=9mQ_S^&p z1_n@DZ6at~4r&&t-3$uT3<d@UP(B8=PeI`bYKwyME~woJ%9A+^3=E*W3u;?}@+_zw z2^#kVwHZO}tpWxH22dLx)GmajqeSQ&Ln_q0AR6Re5DjuKhz7YAM1$N5qCxHj(IEGN zXpnnBG%OrIZFd+OR93;_q>X`r0hD*AF)%QI^3impFm7jHU;w4(84L^zFt?>a=aoQh zNl+Ud)DHudHK6_%sEh%%^Fd_`sC^G=t93xl2hkw&K{Uur5X}b-%Vem3)1m$a(ICB@ z(0BszLH-8OAb*2skiS7R$lo9u<ZloS@;8VE`3a;SWG9FQ*$JXyVE}4d3qkGgg3djH z`iGz~SWtfuH2w<e=Yi5Mh!0AiAU>$C2TFIK^apB>gXS7Q?Ql>!1MxxW8l(=?Pb*?z zU;y>ciWwLfK>e~31_lODf2<Tb24BX&zyRu}mNPIgfcm->&^ZQ4hE#?Mh609EhGd2k zhD?S$hI9ri1_cIn22}=i1|2Y~7%rR7kO!VE5W%SnWI{4S4nrwJ3PUPbEgufGt_=R* z*#z8XVcLt!EOiDD1kHTl@{Jxt3PU182}2^>S9%Od48;t^Nc<A8OH076<^{70;68_i zOC|#-XG`FaRcAnVGbjWhde-CAlg^OCkk63BkjRh&cTFxsK0_ItSHMupP|T2l#Ls6a zfb$X=QW#R;ykdq@h9o#IlOdO(6v<qWTQZSMPGrbK(womv1lL)?fXvHd$Y&^l%Ox}9 zBH5pX#skGW$lvM=SqypLQ~=|p!%fIyNJo)D_&gaL4hVh`Ln@NZp!8M3puk|jP{Clq zU;s4_<SPb-uQ)?k8>&v7K^M-_g0o`bEGsw*l%622)`N?sAcboRLphQ-BJ@)j3X#MS zAvPMvSxBjn+&Bis2&~)?#u?kFaR-{;#8oPg7o!XexXU3>3SwYbiqmbQ`5IQM5TCE5 zaE2!SGF%XczC4CfhFpduhExVntto^<l{$kS19FXEh*KTNC&fr*1B8z#A0T{083ExV z$_WS`R8}xBtiox_Xv!fq<sg?93rE8h+?J!H6lP#Ji8B<5tznDdEh<P`5)?=345MkA zlC&L$GghMEZIL8~N^ofgv!@)~x<iynp!N)?y@wESfa^_VNMxu$;w7Q*l2LdmD7+-3 zR$?kcF_;Hh6N0Ng9*ph<rBKuw19$BYaz6vZVVv<nY%bA(hxTaBfTdVaEeWb4LGhsu z?x|w$2Y}>ZZA9EL1qxvX2HbrzkUYqw(Xxs3o){?HU@_o=GcVApd;!^xoL@nFNdFLb zuN_;y1oa9*>zZ+uRoL{P_9-DN&p{*Zpb=BhNGE876T}CNYJyfZ!o)zc;-Ha85C)BY zf>z#w)PP2aKzcyppiv?i8?;Ifqz5+o3u1#uN1?OkpwT6C3>xKx*#{bF0@(xNgGQV{ zBcC8ML3V=d0*yd{XmpHjCWsGm1IQfENEB$q3PclwL2kx{L2d$Jkh@@hMt2KnR1Ahe z?f|WN#D+nmW}p?2AhjSGWG*@esexgT9E=U3VSEsc3xoU*vK!=o&`2_f#)Uy<fJUuB Vs}|5PNDdbUnG3=oKY(bsUI4W5DNg_Z literal 0 HcmV?d00001 diff --git a/src/sa/Sc2sa.java b/src/sa/Sc2sa.java index 100f4fc..9bce3d5 100644 --- a/src/sa/Sc2sa.java +++ b/src/sa/Sc2sa.java @@ -11,36 +11,20 @@ public class Sc2sa extends DepthFirstAdapter public void defaultIn(@SuppressWarnings("unused") Node node) { - //System.out.println("<" + node.getClass().getSimpleName() + ">"); + System.out.println("<" + node.getClass().getSimpleName() + ">"); } public void defaultOut(@SuppressWarnings("unused") Node node) { - //System.out.println("</" + node.getClass().getSimpleName() + ">"); + System.out.println("</" + node.getClass().getSimpleName() + ">"); } - + public SaProg getRoot() { - return this.saRoot; + return this.saRoot; } - // exp3 = {plus} exp3 plus exp4 - /* @Override - public void caseAPlusExp3(APlusExp3 node) - { - SaExp op1 = null; - SaExp op2 = null; - inAPlusExp3(node); - node.getExp3().apply(this); - op1 = (SaExp) this.returnValue; - node.getExp4().apply(this); - op2 = (SaExp) this.returnValue; - this.returnValue = new SaExpAdd(op1, op2); - outAPlusExp3(node); - }*/ - - public void caseStart(Start node) { inStart(node); @@ -63,14 +47,16 @@ public class Sc2sa extends DepthFirstAdapter public void caseAProg(AProg node) { inAProg(node); - if(node.getLdec() != null) - { - node.getLdec().apply(this); - } - if(node.getLdf() != null) - { - node.getLdf().apply(this); - } + SaLDecVar op1 = null ; + SaLDecFonc op2 = null ; + + node.getLdec().apply(this); + op1 = (SaLDecVar) this.returnValue ; + node.getLdf().apply(this); + op2=(SaLDecFonc) this.returnValue; + + this.returnValue = new SaProg(op1,op2); + this.saRoot = (SaProg) this.returnValue; outAProg(node); } @@ -88,18 +74,15 @@ public class Sc2sa extends DepthFirstAdapter public void caseAOrExp(AOrExp node) { inAOrExp(node); - if(node.getExp() != null) - { - node.getExp().apply(this); - } - if(node.getOu() != null) - { - node.getOu().apply(this); - } - if(node.getAnd() != null) - { - node.getAnd().apply(this); - } + SaExp op1 = null; + SaExp op2 = null; + + node.getExp().apply(this); + op1 = (SaExp) this.returnValue; + node.getAnd().apply(this); + op2 = (SaExp) this.returnValue; + + this.returnValue = new SaExpOr(op1,op2); outAOrExp(node); } @@ -117,10 +100,7 @@ public class Sc2sa extends DepthFirstAdapter public void caseAAndExp(AAndExp node) { inAAndExp(node); - if(node.getAnd() != null) - { - node.getAnd().apply(this); - } + node.getAnd().apply(this); outAAndExp(node); } @@ -138,18 +118,14 @@ public class Sc2sa extends DepthFirstAdapter public void caseAEtAnd(AEtAnd node) { inAEtAnd(node); - if(node.getAnd() != null) - { - node.getAnd().apply(this); - } - if(node.getEt() != null) - { - node.getEt().apply(this); - } - if(node.getEquals() != null) - { - node.getEquals().apply(this); - } + SaExp op1 = null ; + node.getAnd().apply(this); + op1 = (SaExp) this.returnValue; + SaExp op2 = null ; + node.getEquals().apply(this); + op2 = (SaExp) this.returnValue; + + this.returnValue = new SaExpAnd(op1,op2); outAEtAnd(node); } @@ -167,10 +143,7 @@ public class Sc2sa extends DepthFirstAdapter public void caseAEqualsAnd(AEqualsAnd node) { inAEqualsAnd(node); - if(node.getEquals() != null) - { - node.getEquals().apply(this); - } + node.getEquals().apply(this); outAEqualsAnd(node); } @@ -188,18 +161,14 @@ public class Sc2sa extends DepthFirstAdapter public void caseAEgaleEquals(AEgaleEquals node) { inAEgaleEquals(node); - if(node.getEquals() != null) - { - node.getEquals().apply(this); - } - if(node.getEgale() != null) - { - node.getEgale().apply(this); - } - if(node.getAdd() != null) - { - node.getAdd().apply(this); - } + SaExp op1 = null ; + node.getEquals().apply(this); + op1 = (SaExp) this.returnValue; + SaExp op2 = null ; + node.getAdd().apply(this); + op2 = (SaExp) this.returnValue; + + this.returnValue = new SaExpEqual(op1,op2); outAEgaleEquals(node); } @@ -217,18 +186,16 @@ public class Sc2sa extends DepthFirstAdapter public void caseAInfEquals(AInfEquals node) { inAInfEquals(node); - if(node.getEquals() != null) - { - node.getEquals().apply(this); - } - if(node.getInf() != null) - { - node.getInf().apply(this); - } - if(node.getAdd() != null) - { - node.getAdd().apply(this); - } + + SaExp op1 =null ; + SaExp op2 =null ; + + node.getEquals().apply(this); + op1 = (SaExp) this.returnValue ; + node.getAdd().apply(this); + op2 = (SaExp) this.returnValue ; + + returnValue = new SaExpInf(op1,op2) ; outAInfEquals(node); } @@ -246,10 +213,7 @@ public class Sc2sa extends DepthFirstAdapter public void caseAAddEquals(AAddEquals node) { inAAddEquals(node); - if(node.getAdd() != null) - { - node.getAdd().apply(this); - } + node.getAdd().apply(this); outAAddEquals(node); } @@ -290,7 +254,7 @@ public class Sc2sa extends DepthFirstAdapter @Override public void caseAMoinsAdd(AMoinsAdd node) { - + inAMoinsAdd(node); SaExp op1 = null ; SaExp op2 = null ; @@ -299,7 +263,7 @@ public class Sc2sa extends DepthFirstAdapter node.getMult().apply(this); op2=(SaExp) this.returnValue ; this.returnValue = new SaExpSub(op1,op2); - + outAMoinsAdd(node); } public void inAMultAdd(AMultAdd node) @@ -316,10 +280,7 @@ public class Sc2sa extends DepthFirstAdapter public void caseAMultAdd(AMultAdd node) { inAMultAdd(node); - if(node.getMult() != null) - { - node.getMult().apply(this); - } + node.getMult().apply(this); outAMultAdd(node); } @@ -336,6 +297,7 @@ public class Sc2sa extends DepthFirstAdapter @Override public void caseAFoisMult(AFoisMult node) { + inAFoisMult(node); SaExp op1 = null ; SaExp op2 = null ; @@ -344,11 +306,7 @@ public class Sc2sa extends DepthFirstAdapter node.getNeg().apply(this); op2=(SaExp) this.returnValue; this.returnValue = new SaExpMult(op1,op2); - } - - public void inADiviserMult(ADiviserMult node) - { - defaultIn(node); + outAFoisMult(node); } public void outADiviserMult(ADiviserMult node) @@ -357,16 +315,16 @@ public class Sc2sa extends DepthFirstAdapter } @Override - public void caseADiviserMult(ADiviserMult node) - { - SaExp op1 = null ; - SaExp op2 = null ; + public void caseADiviserMult(ADiviserMult node) { + SaExp op1 = null; + SaExp op2 = null; node.getMult().apply(this); - op1=(SaExp) this.returnValue; + op1 = (SaExp) this.returnValue; node.getNeg().apply(this); - op2=(SaExp) this.returnValue; - this.returnValue = new SaExpDiv(op1,op2); + op2 = (SaExp) this.returnValue; + this.returnValue = new SaExpDiv(op1, op2); + outADiviserMult(node); } public void inANegMult(ANegMult node) @@ -383,10 +341,7 @@ public class Sc2sa extends DepthFirstAdapter public void caseANegMult(ANegMult node) { inANegMult(node); - if(node.getNeg() != null) - { - node.getNeg().apply(this); - } + node.getNeg().apply(this); outANegMult(node); } @@ -400,10 +355,10 @@ public class Sc2sa extends DepthFirstAdapter defaultOut(node); } - // TODO: 26/01/2024 voir tout les SaExpADD - @Override + public void caseANonNeg(ANonNeg node) { + inANonNeg(node); SaExp op1 = null ; node.getNeg().apply(this); op1 = (SaExp) this.returnValue; @@ -424,10 +379,7 @@ public class Sc2sa extends DepthFirstAdapter public void caseAE6Neg(AE6Neg node) { inAE6Neg(node); - if(node.getE6() != null) - { - node.getE6().apply(this); - } + node.getE6().apply(this); outAE6Neg(node); } @@ -444,9 +396,10 @@ public class Sc2sa extends DepthFirstAdapter @Override - public void caseAParentheseE6(AParentheseE6 node) - { + public void caseAParentheseE6(AParentheseE6 node) { + inAParentheseE6(node); node.getExp().apply(this); + outAParentheseE6(node); } public void inANombreE6(ANombreE6 node) @@ -462,6 +415,7 @@ public class Sc2sa extends DepthFirstAdapter @Override public void caseANombreE6(ANombreE6 node) { + inANombreE6(node); int entier =0; inANombreE6 (node); entier = Integer.parseInt (node.getNombre () .getText ()) ; @@ -485,7 +439,7 @@ public class Sc2sa extends DepthFirstAdapter { inAVraiE6(node); this.returnValue = new SaExpVrai(); - + outAVraiE6(node); } @@ -504,11 +458,7 @@ public class Sc2sa extends DepthFirstAdapter { inAFauxE6(node); this.returnValue = new SaExpFaux(); - } - - public void inALireE6(ALireE6 node) - { - defaultIn(node); + outAFauxE6(node); } public void outALireE6(ALireE6 node) @@ -519,21 +469,10 @@ public class Sc2sa extends DepthFirstAdapter @Override public void caseALireE6(ALireE6 node) { - inALireE6(node); - if(node.getLire() != null) - { - node.getLire().apply(this); - } - if(node.getGparenthese() != null) - { - node.getGparenthese().apply(this); - } - if(node.getDparenthese() != null) - { - node.getDparenthese().apply(this); - } - outALireE6(node); - } + inALireE6(node); + this.returnValue = new SaExpLire(); + outALireE6(node); + } public void inAVarE6(AVarE6 node) { @@ -548,10 +487,12 @@ public class Sc2sa extends DepthFirstAdapter @Override public void caseAVarE6(AVarE6 node) { + inAVarE6(node); SaVar op1 = null ; node.getVar().apply(this); op1 = (SaVar) this.returnValue ; returnValue = new SaExpVar(op1) ; + outAVarE6(node); } public void inAAppelfncE6(AAppelfncE6 node) @@ -568,22 +509,12 @@ public class Sc2sa extends DepthFirstAdapter public void caseAAppelfncE6(AAppelfncE6 node) { inAAppelfncE6(node); - if(node.getId() != null) - { - node.getId().apply(this); - } - if(node.getGparenthese() != null) - { - node.getGparenthese().apply(this); - } - if(node.getLe() != null) - { - node.getLe().apply(this); - } - if(node.getDparenthese() != null) - { - node.getDparenthese().apply(this); - } + String op1 = null; + SaLExp op2 = null; + op1 = node.getId().getText(); + node.getLe().apply(this); + op2 = (SaLExp) this.returnValue; + this.returnValue = new SaExpAppel(new SaAppel(op1, op2)); outAAppelfncE6(node); } @@ -600,18 +531,15 @@ public class Sc2sa extends DepthFirstAdapter @Override public void caseAAffectationIns(AAffectationIns node) { - SaVar op2 =null ; - SaExp op1 =null ; - node.getExp().apply(this); - op1 = (SaExp) this.returnValue; + inAAffectationIns(node); + SaVar op1 =null ; + SaExp op2 =null ; node.getVar().apply(this); - op2 = (SaVar) this.returnValue ; - returnValue = new SaInstAffect(op2,op1); - } - - public void inATqIns(ATqIns node) - { - defaultIn(node); + op1 = (SaVar) this.returnValue; + node.getExp().apply(this); + op2 = (SaExp) this.returnValue ; + returnValue = new SaInstAffect(op1,op2); + outAAffectationIns(node); } public void outATqIns(ATqIns node) @@ -622,6 +550,7 @@ public class Sc2sa extends DepthFirstAdapter @Override public void caseATqIns(ATqIns node) { + inATqIns(node); SaExp op1 = null ; SaInst op2 = null ; node.getExp().apply(this); @@ -629,31 +558,24 @@ public class Sc2sa extends DepthFirstAdapter node.getBloc().apply(this); op2 = (SaInst) this.returnValue ; this.returnValue = new SaInstTantQue(op1,op2); - } - - public void inASiIns(ASiIns node) - { - defaultIn(node); - } - - public void outASiIns(ASiIns node) - { - defaultOut(node); + outATqIns(node); } @Override public void caseASiIns(ASiIns node) { + inASiIns(node); SaExp op1 = null ; SaInst op2 = null ; - SaInst op3 = null ; + node.getExp().apply(this); op1 = (SaExp) this.returnValue ; node.getBloc().apply(this); op2 = (SaInst) this.returnValue ; - this.returnValue = new SaInstSi(op1,op2,op3); + this.returnValue = new SaInstSi(op1,op2,null); + outASiIns(node); } public void inASisinonIns(ASisinonIns node) @@ -669,6 +591,7 @@ public class Sc2sa extends DepthFirstAdapter @Override public void caseASisinonIns(ASisinonIns node) { + inASisinonIns(node); SaExp op1 = null ; SaInst op2 = null ; SaInst op3 = null ; @@ -681,6 +604,8 @@ public class Sc2sa extends DepthFirstAdapter op3 = (SaInst) this.returnValue; this.returnValue = new SaInstSi(op1,op2,op3); + outASisinonIns(node); + } public void inAReturnIns(AReturnIns node) @@ -696,10 +621,13 @@ public class Sc2sa extends DepthFirstAdapter @Override public void caseAReturnIns(AReturnIns node) { + inAReturnIns(node); SaExp op1 = null ; node.getRetourner().apply(this); op1 = (SaExp) this.returnValue ; returnValue = new SaInstRetour(op1); + outAReturnIns(node); + } public void inAWriteIns(AWriteIns node) @@ -715,10 +643,13 @@ public class Sc2sa extends DepthFirstAdapter @Override public void caseAWriteIns(AWriteIns node) { + inAWriteIns(node); SaExp op1 = null ; - node.getEcrire().apply(this); + node.getExp().apply(this); op1 = (SaExp) this.returnValue ; returnValue = new SaInstEcriture(op1); + outAWriteIns(node); + } public void inAAppelfncIns(AAppelfncIns node) @@ -734,12 +665,14 @@ public class Sc2sa extends DepthFirstAdapter @Override public void caseAAppelfncIns(AAppelfncIns node) { - SaLExp op1 = null ; - if (node.getLe() != null) { - node.getLe().apply(this); - op1 = (SaLExp) returnValue; - } - new SaAppel(node.getId().getText(),op1); + inAAppelfncIns(node); + String op1 = null; + SaLExp op2 = null; + op1 = node.getId().getText(); + node.getLe().apply(this); + op2 = (SaLExp) this.returnValue; + this.returnValue = new SaAppel(op1, op2); + outAAppelfncIns(node); } public void inAInstrBloc(AInstrBloc node) @@ -756,18 +689,10 @@ public class Sc2sa extends DepthFirstAdapter public void caseAInstrBloc(AInstrBloc node) { inAInstrBloc(node); - if(node.getAccoladeg() != null) - { - node.getAccoladeg().apply(this); - } - if(node.getLi() != null) - { - node.getLi().apply(this); - } - if(node.getAccoladed() != null) - { - node.getAccoladed().apply(this); - } + SaLInst op1 = null ; + node.getLi().apply(this); + op1 = (SaLInst) this.returnValue ; + returnValue = new SaInstBloc(op1); outAInstrBloc(node); } @@ -785,14 +710,15 @@ public class Sc2sa extends DepthFirstAdapter public void caseAListeinstrLi(AListeinstrLi node) { inAListeinstrLi(node); - if(node.getIns() != null) - { - node.getIns().apply(this); - } - if(node.getLi() != null) - { - node.getLi().apply(this); - } + SaInst op1 = null ; + SaLInst op2 = null ; + + node.getIns().apply(this); + op1 = (SaInst) this.returnValue; + node.getLi().apply(this); + op2 = (SaLInst) this.returnValue; + + returnValue = new SaLInst(op1,op2); outAListeinstrLi(node); } @@ -810,10 +736,8 @@ public class Sc2sa extends DepthFirstAdapter public void caseAEpsilonLi(AEpsilonLi node) { inAEpsilonLi(node); - if(node.getEpsilon() != null) - { - node.getEpsilon().apply(this); - } + node.getEpsilon().apply(this); + this.returnValue = null ; outAEpsilonLi(node); } @@ -848,20 +772,15 @@ public class Sc2sa extends DepthFirstAdapter public void caseAExprLe(AExprLe node) { inAExprLe(node); - if(node.getExp() != null) - { - node.getExp().apply(this); - } - if(node.getLse() != null) - { - node.getLse().apply(this); - } - outAExprLe(node); - } + SaExp op1 = null ; + SaLExp op2 = null ; - public void inAEpsilonLe(AEpsilonLe node) - { - defaultIn(node); + node.getExp().apply(this); + op1 = (SaExp) this.returnValue ; + node.getLse().apply(this); + op2 = (SaLExp) this.returnValue; + returnValue =new SaLExp(op1,op2); + outAExprLe(node); } public void outAEpsilonLe(AEpsilonLe node) @@ -894,18 +813,15 @@ public class Sc2sa extends DepthFirstAdapter public void caseALstexprLse(ALstexprLse node) { inALstexprLse(node); - if(node.getVirgule() != null) - { - node.getVirgule().apply(this); - } - if(node.getExp() != null) - { - node.getExp().apply(this); - } - if(node.getLse() != null) - { - node.getLse().apply(this); - } + SaExp op1 = null ; + SaLExp op2 = null ; + + node.getExp().apply(this); + op1 = (SaExp) this.returnValue ; + node.getLse().apply(this); + op2 = (SaLExp) this.returnValue; + + returnValue =new SaLExp(op1,op2); outALstexprLse(node); } @@ -923,10 +839,7 @@ public class Sc2sa extends DepthFirstAdapter public void caseAEpsilonLse(AEpsilonLse node) { inAEpsilonLse(node); - if(node.getEpsilon() != null) - { - node.getEpsilon().apply(this); - } + node.getEpsilon().apply(this); outAEpsilonLse(node); } @@ -943,10 +856,12 @@ public class Sc2sa extends DepthFirstAdapter @Override public void caseAIdVar(AIdVar node) { - SaVar op1 = null ; - node.getId().apply(this); - op1 = (SaVar) this.returnValue; - returnValue = new SaExpVar(op1) ; + inAIdVar(node); + SaVar op1 = null ; + node.getId().apply(this); + op1 = (SaVar) this.returnValue; + returnValue = new SaExpVar(op1) ; + outAIdVar(node); } public void inAIdCrochetVar(AIdCrochetVar node) @@ -980,15 +895,17 @@ public class Sc2sa extends DepthFirstAdapter public void caseADeclavariableDecvar(ADeclavariableDecvar node) { //decvar = {declavariable} type id |type id crochetg nombre crochetd ; - + inADeclavariableDecvar(node); Type type = null; node.getType().apply(this); type = this.returnType; returnValue = new SaDecVarSimple(node.getId().getText(),type); + outADeclavariableDecvar(node); } + public void inADecvar(ADecvar node) { defaultIn(node); @@ -1000,14 +917,14 @@ public class Sc2sa extends DepthFirstAdapter } @Override - public void caseADecvar(ADecvar node) - { + public void caseADecvar(ADecvar node) { //decvar = {declavariable} type id |type id crochetg nombre crochetd ; - + inADecvar(node); Type type = null; node.getType().apply(this); type = this.returnType; - returnValue = new SaDecTab(node.getId().getText(),type,Integer.parseInt(node.getNombre().getText())); + returnValue = new SaDecTab(node.getId().getText(), type, Integer.parseInt(node.getNombre().getText())); + outADecvar(node); } public void inATypeType(ATypeType node) @@ -1023,10 +940,7 @@ public class Sc2sa extends DepthFirstAdapter public void caseATypeType(ATypeType node) { inATypeType(node); - if(node.getBool() != null) - { - node.getBool().apply(this); - } + this.returnType = Type.BOOL; outATypeType(node); } @@ -1043,10 +957,7 @@ public class Sc2sa extends DepthFirstAdapter public void caseAType(AType node) { inAType(node); - if(node.getEntier() != null) - { - node.getEntier().apply(this); - } + this.returnType = Type.ENTIER; outAType(node); } @@ -1061,9 +972,23 @@ public class Sc2sa extends DepthFirstAdapter } @Override - public void caseADeclafoncDecfonc(ADeclafoncDecfonc node) - { - new SaDecFonc() + public void caseADeclafoncDecfonc(ADeclafoncDecfonc node) { + SaLDecVar op1 = null; + SaLDecVar op2 = null; + SaInst op3 = null; + Type type = null; + + + node.getTypeopt().apply(this); + type = this.returnType; + node.getFirstldec().apply(this); + op1 = (SaLDecVar) this.returnValue; + node.getSecondldec().apply(this); + op2 = (SaLDecVar) this.returnValue; + node.getBloc().apply(this); + op3 = (SaInst) this.returnValue; + + returnValue = new SaDecFonc(node.getId().getText(),type,op1,op2,op3); } public void inATypeoptTypeopt(ATypeoptTypeopt node) @@ -1116,9 +1041,9 @@ public class Sc2sa extends DepthFirstAdapter } @Override - public void caseALstdeclacvarLdec(ALstdeclacvarLdec node) - { + public void caseALstdeclacvarLdec(ALstdeclacvarLdec node) { //ldec = {lstdeclacvar} decvar suitedec | epsilon ; + inALstdeclacvarLdec(node); SaDecVar op1 = null; SaLDecVar op2 = null; @@ -1126,7 +1051,8 @@ public class Sc2sa extends DepthFirstAdapter op1 = (SaDecVar) this.returnValue; node.getSuitedec().apply(this); op2 = (SaLDecVar) this.returnValue; - returnValue = new SaLDecVar(op1,op2); + returnValue = new SaLDecVar(op1, op2); + outALstdeclacvarLdec(node); } @@ -1144,10 +1070,7 @@ public class Sc2sa extends DepthFirstAdapter public void caseALdec(ALdec node) { inALdec(node); - if(node.getEpsilon() != null) - { - node.getEpsilon().apply(this); - } + node.getEpsilon().apply(this); outALdec(node); } @@ -1166,6 +1089,7 @@ public class Sc2sa extends DepthFirstAdapter { //suitedec = {suitedeclvar} virgule decvar suitedec |epsilon ; //ldec = {lstdeclacvar} decvar suitedec | epsilon ; + inASuitedeclvarSuitedec(node); SaDecVar op1 = null; SaLDecVar op2 = null; @@ -1175,6 +1099,8 @@ public class Sc2sa extends DepthFirstAdapter node.getSuitedec().apply(this); op2 = (SaLDecVar) this.returnValue; returnValue = new SaLDecVar(op1,op2); + outASuitedeclvarSuitedec(node); + } public void inASuitedec(ASuitedec node) @@ -1212,6 +1138,8 @@ public class Sc2sa extends DepthFirstAdapter public void caseALstdecfncLdf(ALstdecfncLdf node) {; //ldf = {lstdecfnc} decfonc ldf | epsilon + inALstdecfncLdf(node); + SaDecFonc op1 = null; SaLDecFonc op2 = null; @@ -1220,6 +1148,8 @@ public class Sc2sa extends DepthFirstAdapter node.getLdf().apply(this); op2 = (SaLDecFonc) this.returnValue; returnValue = new SaLDecFonc(op1,op2); + outALstdecfncLdf(node); + } public void inALdf(ALdf node) @@ -1235,15 +1165,7 @@ public class Sc2sa extends DepthFirstAdapter @Override public void caseALdf(ALdf node) { - inALdf(node); - if(node.getEpsilon() != null) - { - node.getEpsilon().apply(this); - } - outALdf(node); + this.returnValue=null ; } } - - - diff --git a/test/result.txt b/test/result.txt new file mode 100644 index 0000000..f75fcdf --- /dev/null +++ b/test/result.txt @@ -0,0 +1,878 @@ +Évaluation de 5 : +80/80 correct (100.00%) + add1.l CORRECT + add2.l CORRECT + affect1.l CORRECT + affect2.l CORRECT + affect3.l CORRECT + and1.l CORRECT + and2.l CORRECT + and3.l CORRECT + and4.l CORRECT + and5.l CORRECT + appel-param1.l CORRECT + appel-param2.l CORRECT + appel-param3.l CORRECT + appel-retour1.l CORRECT + appel1.l CORRECT + appel2.l CORRECT + appel3.l CORRECT + div1.l CORRECT + div2.l CORRECT + div3.l CORRECT + div4.l CORRECT + ecrire1.l CORRECT + ecrire2.l CORRECT + egal1.l CORRECT + egal2.l CORRECT + egal3.l CORRECT + fibo.l CORRECT + inf1.l CORRECT + inf2.l CORRECT + inf3.l CORRECT + mult1.l CORRECT + mult2.l CORRECT + mult3.l CORRECT + not1.l CORRECT + not2.l CORRECT + not3.l CORRECT + or1.l CORRECT + or2.l CORRECT + or3.l CORRECT + or4.l CORRECT + or5.l CORRECT + parenth1.l CORRECT + parenth2.l CORRECT + prio34-1.l CORRECT + prio34-2.l CORRECT + prio34-3.l CORRECT + prio34-4.l CORRECT + prio45-1.l CORRECT + prio45-2.l CORRECT + prio45-3.l CORRECT + prio45-4.l CORRECT + prio56-1.l CORRECT + prio56-2.l CORRECT + prio67-1.l CORRECT + prio67-2.l CORRECT + rec1.l CORRECT + si1.l CORRECT + si2.l CORRECT + si3.l CORRECT + si4.l CORRECT + si5.l CORRECT + sub1.l CORRECT + sub2.l CORRECT + sub3.l CORRECT + tab1.l CORRECT + tab2.l CORRECT + tab3.l CORRECT + tab4.l CORRECT + tantque1.l CORRECT + tantque2.l CORRECT + tri.l CORRECT + varglob1.l CORRECT + varglob2.l CORRECT + varglob3.l CORRECT + varglob4.l CORRECT + varloc1.l CORRECT + varloc2.l CORRECT + varloc3.l CORRECT + varloc4.l CORRECT + varloc5.l CORRECT +Évaluation de Diff de sa : +0/80 correct ( 0.00%) + add1.sa INCORRECT + add2.sa INCORRECT + affect1.sa INCORRECT + affect2.sa INCORRECT + affect3.sa INCORRECT + and1.sa INCORRECT + and2.sa INCORRECT + and3.sa INCORRECT + and4.sa INCORRECT + and5.sa INCORRECT + appel-param1.sa INCORRECT + appel-param2.sa INCORRECT + appel-param3.sa INCORRECT + appel-retour1.sa INCORRECT + appel1.sa INCORRECT + appel2.sa INCORRECT + appel3.sa INCORRECT + div1.sa INCORRECT + div2.sa INCORRECT + div3.sa INCORRECT + div4.sa INCORRECT + ecrire1.sa INCORRECT + ecrire2.sa INCORRECT + egal1.sa INCORRECT + egal2.sa INCORRECT + egal3.sa INCORRECT + fibo.sa INCORRECT + inf1.sa INCORRECT + inf2.sa INCORRECT + inf3.sa INCORRECT + mult1.sa INCORRECT + mult2.sa INCORRECT + mult3.sa INCORRECT + not1.sa INCORRECT + not2.sa INCORRECT + not3.sa INCORRECT + or1.sa INCORRECT + or2.sa INCORRECT + or3.sa INCORRECT + or4.sa INCORRECT + or5.sa INCORRECT + parenth1.sa INCORRECT + parenth2.sa INCORRECT + prio34-1.sa INCORRECT + prio34-2.sa INCORRECT + prio34-3.sa INCORRECT + prio34-4.sa INCORRECT + prio45-1.sa INCORRECT + prio45-2.sa INCORRECT + prio45-3.sa INCORRECT + prio45-4.sa INCORRECT + prio56-1.sa INCORRECT + prio56-2.sa INCORRECT + prio67-1.sa INCORRECT + prio67-2.sa INCORRECT + rec1.sa INCORRECT + si1.sa INCORRECT + si2.sa INCORRECT + si3.sa INCORRECT + si4.sa INCORRECT + si5.sa INCORRECT + sub1.sa INCORRECT + sub2.sa INCORRECT + sub3.sa INCORRECT + tab1.sa INCORRECT + tab2.sa INCORRECT + tab3.sa INCORRECT + tab4.sa INCORRECT + tantque1.sa INCORRECT + tantque2.sa INCORRECT + tri.sa INCORRECT + varglob1.sa INCORRECT + varglob2.sa INCORRECT + varglob3.sa INCORRECT + varglob4.sa INCORRECT + varloc1.sa INCORRECT + varloc2.sa INCORRECT + varloc3.sa INCORRECT + varloc4.sa INCORRECT + varloc5.sa INCORRECT +Évaluation de Diff de ts : +0/80 correct ( 0.00%) +Évaluation de Execution de sa : +0/80 correct ( 0.00%) + add1.saout INCORRECT + add2.saout INCORRECT + affect1.saout INCORRECT + affect2.saout INCORRECT + affect3.saout INCORRECT + and1.saout INCORRECT + and2.saout INCORRECT + and3.saout INCORRECT + and4.saout INCORRECT + and5.saout INCORRECT + appel-param1.saout INCORRECT + appel-param2.saout INCORRECT + appel-param3.saout INCORRECT + appel-retour1.saout INCORRECT + appel1.saout INCORRECT + appel2.saout INCORRECT + appel3.saout INCORRECT + div1.saout INCORRECT + div2.saout INCORRECT + div3.saout INCORRECT + div4.saout INCORRECT + ecrire1.saout INCORRECT + ecrire2.saout INCORRECT + egal1.saout INCORRECT + egal2.saout INCORRECT + egal3.saout INCORRECT + fibo.saout INCORRECT + inf1.saout INCORRECT + inf2.saout INCORRECT + inf3.saout INCORRECT + mult1.saout INCORRECT + mult2.saout INCORRECT + mult3.saout INCORRECT + not1.saout INCORRECT + not2.saout INCORRECT + not3.saout INCORRECT + or1.saout INCORRECT + or2.saout INCORRECT + or3.saout INCORRECT + or4.saout INCORRECT + or5.saout INCORRECT + parenth1.saout INCORRECT + parenth2.saout INCORRECT + prio34-1.saout INCORRECT + prio34-2.saout INCORRECT + prio34-3.saout INCORRECT + prio34-4.saout INCORRECT + prio45-1.saout INCORRECT + prio45-2.saout INCORRECT + prio45-3.saout INCORRECT + prio45-4.saout INCORRECT + prio56-1.saout INCORRECT + prio56-2.saout INCORRECT + prio67-1.saout INCORRECT + prio67-2.saout INCORRECT + rec1.saout INCORRECT + si1.saout INCORRECT + si2.saout INCORRECT + si3.saout INCORRECT + si4.saout INCORRECT + si5.saout INCORRECT + sub1.saout INCORRECT + sub2.saout INCORRECT + sub3.saout INCORRECT + tab1.saout INCORRECT + tab2.saout INCORRECT + tab3.saout INCORRECT + tab4.saout INCORRECT + tantque1.saout INCORRECT + tantque2.saout INCORRECT + tri.saout INCORRECT + varglob1.saout INCORRECT + varglob2.saout INCORRECT + varglob3.saout INCORRECT + varglob4.saout INCORRECT + varloc1.saout INCORRECT + varloc2.saout INCORRECT + varloc3.saout INCORRECT + varloc4.saout INCORRECT + varloc5.saout INCORRECT +Évaluation de Diff de c3a : +0/80 correct ( 0.00%) +Évaluation de Execution du c3a : +0/80 correct ( 0.00%) +Évaluation de Diff de pre-nasm : +0/80 correct ( 0.00%) +Évaluation de Execution du pre-nasm : +0/80 correct ( 0.00%) +Évaluation de Diff de nasm : +0/80 correct ( 0.00%) +Évaluation de Execution du nasm : +0/80 correct ( 0.00%) +Évaluation de Execution du binaire : +0/80 correct ( 0.00%) +Évaluation de ERR_TS : +0/7 correct ( 0.00%) + double_dec1.l INCORRECT + double_dec2.l INCORRECT + double_dec3.l INCORRECT + double_dec4.l INCORRECT + fct_inconnue1.l INCORRECT + mauvais_nb_arg1.l INCORRECT + var_inconnue1.l INCORRECT +Évaluation de ERR_TYPE : +0/45 correct ( 0.00%) + add1.l INCORRECT + add2.l INCORRECT + add3.l INCORRECT + add4.l INCORRECT + affect1.l INCORRECT + affect2.l INCORRECT + affect3.l INCORRECT + affect4.l INCORRECT + and1.l INCORRECT + and2.l INCORRECT + and3.l INCORRECT + and4.l INCORRECT + appel1.l INCORRECT + appel2.l INCORRECT + appel3.l INCORRECT + appel4.l INCORRECT + div1.l INCORRECT + div2.l INCORRECT + div3.l INCORRECT + div4.l INCORRECT + egal1.l INCORRECT + egal2.l INCORRECT + egal3.l INCORRECT + inf1.l INCORRECT + inf2.l INCORRECT + inf3.l INCORRECT + inf4.l INCORRECT + mult1.l INCORRECT + mult2.l INCORRECT + mult3.l INCORRECT + mult4.l INCORRECT + not1.l INCORRECT + or1.l INCORRECT + or2.l INCORRECT + or3.l INCORRECT + or4.l INCORRECT + retour1.l INCORRECT + retour2.l INCORRECT + retour3.l INCORRECT + si1.l INCORRECT + sub1.l INCORRECT + sub2.l INCORRECT + sub3.l INCORRECT + sub4.l INCORRECT + tantque1.l INCORRECT +------------------------------EVALUATION ERRORS------------------------------ +ERROR evaluateSa for input add1.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input add2.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input affect1.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input affect2.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input affect3.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input and1.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input and2.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input and3.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input and4.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input and5.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input appel-param1.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input appel-param2.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input appel-param3.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input appel-retour1.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input appel1.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input appel2.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input appel3.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input div1.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input div2.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input div3.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input div4.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input ecrire1.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input ecrire2.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input egal1.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input egal2.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input egal3.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input fibo.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input inf1.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input inf2.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input inf3.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input mult1.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input mult2.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input mult3.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input not1.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input not2.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input not3.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input or1.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input or2.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input or3.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input or4.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input or5.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input parenth1.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input parenth2.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input prio34-1.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input prio34-2.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input prio34-3.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input prio34-4.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input prio45-1.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input prio45-2.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input prio45-3.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input prio45-4.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input prio56-1.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input prio56-2.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input prio67-1.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input prio67-2.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input rec1.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input si1.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input si2.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input si3.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input si4.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input si5.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input sub1.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input sub2.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input sub3.l : 'syntax error +saParser.parser.ParserException: [1,42] expecting: 'entier', 'bool', 'nul' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input tab1.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input tab2.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input tab3.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input tab4.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input tantque1.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input tantque2.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input tri.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input varglob1.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input varglob2.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input varglob3.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input varglob4.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input varloc1.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input varloc2.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input varloc3.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input varloc4.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' + +ERROR evaluateSa for input varloc5.l : 'syntax error +saParser.parser.ParserException: [1,1] expecting: '(' + at saParser.parser.Parser.parse(Parser.java:190) + at sa.LoadSa.<init>(LoadSa.java:32) + at SaVM.main(SaVM.java:27) +' -- GitLab