From f5f94809bece32d19b4d1d08fa357724a7a82ef9 Mon Sep 17 00:00:00 2001 From: b21223327 <zakaria.bazizi@etu.univ-amu.fr> Date: Fri, 23 Feb 2024 16:35:39 +0100 Subject: [PATCH] going --- .idea/.gitignore | 8 + .idea/libraries/sablecc.xml | 9 + .idea/misc.xml | 6 + .idea/modules.xml | 8 + .idea/vcs.xml | 6 + .../2024-compilation-bazizi/.gitignore | 4 + .../2024-compilation-bazizi/Makefile | 52 + .../2024-compilation-bazizi/c3a.cfg | 113 + .../c3aParser/lexer/lexer.dat | Bin 0 -> 2536 bytes .../c3aParser/parser/parser.dat | Bin 0 -> 8098 bytes out/production/2024-compilation-bazizi/l.cfg | 104 + .../lParser/lexer/lexer.dat | Bin 0 -> 3180 bytes .../lParser/parser/parser.dat | Bin 0 -> 9162 bytes .../2024-compilation-bazizi/nasm.cfg | 210 ++ .../nasmParser/lexer/lexer.dat | Bin 0 -> 5580 bytes .../nasmParser/parser/parser.dat | Bin 0 -> 12514 bytes out/production/2024-compilation-bazizi/sa.cfg | 127 + .../saParser/lexer/lexer.dat | Bin 0 -> 8476 bytes .../saParser/parser/parser.dat | Bin 0 -> 7678 bytes src/c3aParser/analysis/Analysis.java | 100 + src/c3aParser/analysis/AnalysisAdapter.java | 585 ++++ src/c3aParser/analysis/DepthFirstAdapter.java | 1500 +++++++++ .../analysis/ReversedDepthFirstAdapter.java | 1500 +++++++++ src/c3aParser/lexer/IPushbackReader.java | 12 + src/c3aParser/lexer/Lexer.java | 711 ++++ src/c3aParser/lexer/LexerException.java | 22 + src/c3aParser/lexer/lexer.dat | Bin 0 -> 2536 bytes src/c3aParser/node/AAdd.java | 310 ++ src/c3aParser/node/AAddInst.java | 95 + src/c3aParser/node/AAffInst.java | 95 + src/c3aParser/node/AAffect.java | 224 ++ src/c3aParser/node/AArg.java | 181 + src/c3aParser/node/AArgInst.java | 95 + src/c3aParser/node/ABegin.java | 138 + src/c3aParser/node/ABeginInst.java | 95 + src/c3aParser/node/ACCtv.java | 95 + src/c3aParser/node/AConstante.java | 95 + src/c3aParser/node/ACteEtiqop.java | 95 + src/c3aParser/node/ADiv.java | 310 ++ src/c3aParser/node/ADivInst.java | 95 + src/c3aParser/node/AEnd.java | 138 + src/c3aParser/node/AEndInst.java | 95 + src/c3aParser/node/AFcall.java | 267 ++ src/c3aParser/node/AFcallInst.java | 95 + src/c3aParser/node/AFinalListeinst.java | 95 + src/c3aParser/node/AIread.java | 224 ++ src/c3aParser/node/AIreadInst.java | 95 + src/c3aParser/node/AIstop.java | 181 + src/c3aParser/node/AIwrite.java | 181 + src/c3aParser/node/AIwriteInst.java | 95 + src/c3aParser/node/AJminfegInst.java | 95 + src/c3aParser/node/AJmp.java | 181 + src/c3aParser/node/AJmpInst.java | 95 + src/c3aParser/node/AJmpeg.java | 353 ++ src/c3aParser/node/AJmpegInst.java | 95 + src/c3aParser/node/AJmpinf.java | 353 ++ src/c3aParser/node/AJmpinfInst.java | 95 + src/c3aParser/node/AJmpinfeg.java | 353 ++ src/c3aParser/node/AJmpneg.java | 353 ++ src/c3aParser/node/AJmpnegInst.java | 95 + src/c3aParser/node/AJmpsup.java | 353 ++ src/c3aParser/node/AJmpsupInst.java | 95 + src/c3aParser/node/AJmpsupeg.java | 353 ++ src/c3aParser/node/AJmpsupegInst.java | 95 + src/c3aParser/node/AMul.java | 310 ++ src/c3aParser/node/AMulInst.java | 95 + src/c3aParser/node/AProg.java | 95 + src/c3aParser/node/ARecursifListeinst.java | 138 + src/c3aParser/node/AReturn.java | 181 + src/c3aParser/node/AReturnInst.java | 95 + src/c3aParser/node/AScalaireVariable.java | 95 + src/c3aParser/node/AStopInst.java | 95 + src/c3aParser/node/ASub.java | 310 ++ src/c3aParser/node/ASubInst.java | 95 + src/c3aParser/node/ATCtv.java | 95 + src/c3aParser/node/ATTv.java | 95 + src/c3aParser/node/ATabVariable.java | 224 ++ src/c3aParser/node/ATemporaire.java | 138 + src/c3aParser/node/AVCtv.java | 95 + src/c3aParser/node/AVTv.java | 95 + src/c3aParser/node/AVideEtiqop.java | 47 + src/c3aParser/node/EOF.java | 33 + src/c3aParser/node/InvalidToken.java | 33 + src/c3aParser/node/Node.java | 78 + src/c3aParser/node/PAdd.java | 8 + src/c3aParser/node/PAffect.java | 8 + src/c3aParser/node/PArg.java | 8 + src/c3aParser/node/PBegin.java | 8 + src/c3aParser/node/PConstante.java | 8 + src/c3aParser/node/PCtv.java | 8 + src/c3aParser/node/PDiv.java | 8 + src/c3aParser/node/PEnd.java | 8 + src/c3aParser/node/PEtiqop.java | 8 + src/c3aParser/node/PFcall.java | 8 + src/c3aParser/node/PInst.java | 8 + src/c3aParser/node/PIread.java | 8 + src/c3aParser/node/PIstop.java | 8 + src/c3aParser/node/PIwrite.java | 8 + src/c3aParser/node/PJmp.java | 8 + src/c3aParser/node/PJmpeg.java | 8 + src/c3aParser/node/PJmpinf.java | 8 + src/c3aParser/node/PJmpinfeg.java | 8 + src/c3aParser/node/PJmpneg.java | 8 + src/c3aParser/node/PJmpsup.java | 8 + src/c3aParser/node/PJmpsupeg.java | 8 + src/c3aParser/node/PListeinst.java | 8 + src/c3aParser/node/PMul.java | 8 + src/c3aParser/node/PProg.java | 8 + src/c3aParser/node/PReturn.java | 8 + src/c3aParser/node/PSub.java | 8 + src/c3aParser/node/PTemporaire.java | 8 + src/c3aParser/node/PTv.java | 8 + src/c3aParser/node/PVariable.java | 8 + src/c3aParser/node/Start.java | 133 + src/c3aParser/node/Switch.java | 8 + src/c3aParser/node/Switchable.java | 8 + src/c3aParser/node/TAff.java | 39 + src/c3aParser/node/TCall.java | 39 + src/c3aParser/node/TCf.java | 39 + src/c3aParser/node/TCo.java | 39 + src/c3aParser/node/TCommentaire.java | 33 + src/c3aParser/node/TDivise.java | 39 + src/c3aParser/node/TEq.java | 39 + src/c3aParser/node/TEspaces.java | 33 + src/c3aParser/node/TFbegin.java | 39 + src/c3aParser/node/TFend.java | 39 + src/c3aParser/node/TFois.java | 39 + src/c3aParser/node/TGoto.java | 39 + src/c3aParser/node/TIdentif.java | 33 + src/c3aParser/node/TIf.java | 39 + src/c3aParser/node/TInf.java | 39 + src/c3aParser/node/TInfeq.java | 39 + src/c3aParser/node/TMoins.java | 39 + src/c3aParser/node/TNombre.java | 33 + src/c3aParser/node/TNoteq.java | 39 + src/c3aParser/node/TParam.java | 39 + src/c3aParser/node/TPlus.java | 39 + src/c3aParser/node/TPrefixeTemp.java | 39 + src/c3aParser/node/TRead.java | 39 + src/c3aParser/node/TRet.java | 39 + src/c3aParser/node/TStop.java | 39 + src/c3aParser/node/TSup.java | 39 + src/c3aParser/node/TSupeq.java | 39 + src/c3aParser/node/TWrite.java | 39 + src/c3aParser/node/Token.java | 59 + src/c3aParser/parser/Parser.java | 2965 +++++++++++++++++ src/c3aParser/parser/ParserException.java | 22 + src/c3aParser/parser/State.java | 17 + src/c3aParser/parser/TokenIndex.java | 173 + src/c3aParser/parser/parser.dat | Bin 0 -> 8098 bytes src/nasmParser/lexer/IPushbackReader.java | 12 + src/nasmParser/lexer/Lexer.java | 1164 +++++++ src/nasmParser/lexer/LexerException.java | 22 + src/nasmParser/lexer/lexer.dat | Bin 0 -> 5580 bytes src/nasmParser/node/AAddInst.java | 267 ++ src/nasmParser/node/AAddress.java | 224 ++ src/nasmParser/node/AAddressAcr.java | 95 + src/nasmParser/node/AAddressAr.java | 95 + src/nasmParser/node/AAndInst.java | 267 ++ src/nasmParser/node/AByteOpsizeof.java | 95 + src/nasmParser/node/ACallInst.java | 181 + src/nasmParser/node/ACmpInst.java | 267 ++ src/nasmParser/node/AComplexFilename.java | 181 + src/nasmParser/node/ADbConst.java | 181 + src/nasmParser/node/ADdConst.java | 181 + src/nasmParser/node/ADqConst.java | 181 + src/nasmParser/node/ADtConst.java | 181 + src/nasmParser/node/ADwConst.java | 181 + src/nasmParser/node/ADwordOpsizeof.java | 95 + src/nasmParser/node/AEaxRegister.java | 95 + src/nasmParser/node/AEbpRegister.java | 95 + src/nasmParser/node/AEbxRegister.java | 95 + src/nasmParser/node/AEcxRegister.java | 95 + src/nasmParser/node/AEdxRegister.java | 95 + src/nasmParser/node/AEmptyLconst.java | 47 + src/nasmParser/node/AEmptyLglobal.java | 47 + src/nasmParser/node/AEmptyLinclude.java | 47 + src/nasmParser/node/AEmptyLvar.java | 47 + src/nasmParser/node/AEmptyOplabel.java | 47 + src/nasmParser/node/AEmptyOpsizeof.java | 47 + src/nasmParser/node/AEmptySecbss.java | 47 + src/nasmParser/node/AEmptySecdata.java | 47 + src/nasmParser/node/AEspRegister.java | 95 + src/nasmParser/node/AIdivInst.java | 181 + src/nasmParser/node/AImulInst.java | 267 ++ src/nasmParser/node/AInclude.java | 267 ++ src/nasmParser/node/AInterInst.java | 138 + src/nasmParser/node/AJeInst.java | 181 + src/nasmParser/node/AJgInst.java | 181 + src/nasmParser/node/AJgeInst.java | 181 + src/nasmParser/node/AJlInst.java | 181 + src/nasmParser/node/AJmpInst.java | 181 + src/nasmParser/node/AJneInst.java | 181 + src/nasmParser/node/ALabel.java | 95 + src/nasmParser/node/ALabelExp2.java | 95 + src/nasmParser/node/ALabelOplabel.java | 138 + src/nasmParser/node/ALastLinst.java | 95 + src/nasmParser/node/AMinusExp.java | 181 + src/nasmParser/node/AMovInst.java | 267 ++ src/nasmParser/node/ANextExp.java | 95 + src/nasmParser/node/ANextExp1.java | 95 + src/nasmParser/node/ANonemptySecbss.java | 181 + src/nasmParser/node/ANonemptySecdata.java | 181 + src/nasmParser/node/ANotInst.java | 181 + src/nasmParser/node/ANumconst.java | 95 + src/nasmParser/node/ANumconstAcr.java | 95 + src/nasmParser/node/ANumconstExp2.java | 95 + src/nasmParser/node/AOrInst.java | 267 ++ src/nasmParser/node/APlusExp.java | 181 + src/nasmParser/node/APopInst.java | 181 + src/nasmParser/node/AProg.java | 224 ++ src/nasmParser/node/APushInst.java | 181 + src/nasmParser/node/ARecLconst.java | 138 + src/nasmParser/node/ARecLglobal.java | 181 + src/nasmParser/node/ARecLinclude.java | 138 + src/nasmParser/node/ARecLinst.java | 138 + src/nasmParser/node/ARecLvar.java | 138 + src/nasmParser/node/ARegisterAcr.java | 95 + src/nasmParser/node/ARegisterAr.java | 95 + src/nasmParser/node/ARegisterExp2.java | 95 + src/nasmParser/node/AResbVar.java | 224 ++ src/nasmParser/node/AResdVar.java | 224 ++ src/nasmParser/node/AResqVar.java | 224 ++ src/nasmParser/node/ARestVar.java | 224 ++ src/nasmParser/node/AReswVar.java | 224 ++ src/nasmParser/node/ARetInst.java | 138 + src/nasmParser/node/ASectext.java | 224 ++ src/nasmParser/node/ASimpleFilename.java | 95 + src/nasmParser/node/ASubInst.java | 267 ++ src/nasmParser/node/ATempRegister.java | 138 + src/nasmParser/node/ATimesExp1.java | 181 + src/nasmParser/node/AWordOpsizeof.java | 95 + src/nasmParser/node/AXorInst.java | 267 ++ src/nasmParser/node/EOF.java | 33 + src/nasmParser/node/InvalidToken.java | 33 + src/nasmParser/node/Node.java | 78 + src/nasmParser/node/PAcr.java | 8 + src/nasmParser/node/PAddress.java | 8 + src/nasmParser/node/PAr.java | 8 + src/nasmParser/node/PConst.java | 8 + src/nasmParser/node/PExp.java | 8 + src/nasmParser/node/PExp1.java | 8 + src/nasmParser/node/PExp2.java | 8 + src/nasmParser/node/PFilename.java | 8 + src/nasmParser/node/PInclude.java | 8 + src/nasmParser/node/PInst.java | 8 + src/nasmParser/node/PLabel.java | 8 + src/nasmParser/node/PLconst.java | 8 + src/nasmParser/node/PLglobal.java | 8 + src/nasmParser/node/PLinclude.java | 8 + src/nasmParser/node/PLinst.java | 8 + src/nasmParser/node/PLvar.java | 8 + src/nasmParser/node/PNumconst.java | 8 + src/nasmParser/node/POplabel.java | 8 + src/nasmParser/node/POpsizeof.java | 8 + src/nasmParser/node/PProg.java | 8 + src/nasmParser/node/PRegister.java | 8 + src/nasmParser/node/PSecbss.java | 8 + src/nasmParser/node/PSecdata.java | 8 + src/nasmParser/node/PSectext.java | 8 + src/nasmParser/node/PVar.java | 8 + src/nasmParser/node/Start.java | 133 + src/nasmParser/node/Switch.java | 8 + src/nasmParser/node/Switchable.java | 8 + src/nasmParser/node/TAdd.java | 39 + src/nasmParser/node/TAnd.java | 39 + src/nasmParser/node/TBrackclose.java | 39 + src/nasmParser/node/TBrackopen.java | 39 + src/nasmParser/node/TBss.java | 39 + src/nasmParser/node/TByte.java | 39 + src/nasmParser/node/TCall.java | 39 + src/nasmParser/node/TCmp.java | 39 + src/nasmParser/node/TComma.java | 39 + src/nasmParser/node/TComment.java | 33 + src/nasmParser/node/TData.java | 39 + src/nasmParser/node/TDefinebyte.java | 39 + src/nasmParser/node/TDefinedoubleword.java | 39 + src/nasmParser/node/TDefinequadword.java | 39 + src/nasmParser/node/TDefinetenbytes.java | 39 + src/nasmParser/node/TDefineword.java | 39 + src/nasmParser/node/TDot.java | 39 + src/nasmParser/node/TDword.java | 39 + src/nasmParser/node/TEax.java | 39 + src/nasmParser/node/TEbp.java | 39 + src/nasmParser/node/TEbx.java | 39 + src/nasmParser/node/TEcx.java | 39 + src/nasmParser/node/TEdx.java | 39 + src/nasmParser/node/TEsp.java | 39 + src/nasmParser/node/TGlobal.java | 39 + src/nasmParser/node/TId.java | 33 + src/nasmParser/node/TIdiv.java | 39 + src/nasmParser/node/TImul.java | 39 + src/nasmParser/node/TInc.java | 39 + src/nasmParser/node/TInt.java | 39 + src/nasmParser/node/TJe.java | 39 + src/nasmParser/node/TJg.java | 39 + src/nasmParser/node/TJge.java | 39 + src/nasmParser/node/TJl.java | 39 + src/nasmParser/node/TJle.java | 39 + src/nasmParser/node/TJmp.java | 39 + src/nasmParser/node/TJne.java | 39 + src/nasmParser/node/TMinus.java | 39 + src/nasmParser/node/TMov.java | 39 + src/nasmParser/node/TNot.java | 39 + src/nasmParser/node/TNumber.java | 33 + src/nasmParser/node/TOr.java | 39 + src/nasmParser/node/TPercentage.java | 39 + src/nasmParser/node/TPlus.java | 39 + src/nasmParser/node/TPop.java | 39 + src/nasmParser/node/TPrefixRegister.java | 39 + src/nasmParser/node/TPush.java | 39 + src/nasmParser/node/TQuote.java | 39 + src/nasmParser/node/TReservebyte.java | 39 + src/nasmParser/node/TReservedoubleword.java | 39 + src/nasmParser/node/TReservequadword.java | 39 + src/nasmParser/node/TReservetenbytes.java | 39 + src/nasmParser/node/TReserveword.java | 39 + src/nasmParser/node/TRet.java | 39 + src/nasmParser/node/TSection.java | 39 + src/nasmParser/node/TSemicol.java | 39 + src/nasmParser/node/TSpaces.java | 33 + src/nasmParser/node/TSub.java | 39 + src/nasmParser/node/TText.java | 39 + src/nasmParser/node/TTimes.java | 39 + src/nasmParser/node/TWord.java | 39 + src/nasmParser/node/TXor.java | 39 + src/nasmParser/node/Token.java | 59 + src/saParser/analysis/Analysis.java | 105 + src/saParser/analysis/AnalysisAdapter.java | 615 ++++ src/saParser/analysis/DepthFirstAdapter.java | 1359 ++++++++ .../analysis/ReversedDepthFirstAdapter.java | 1359 ++++++++ src/saParser/lexer/IPushbackReader.java | 12 + src/saParser/lexer/Lexer.java | 1035 ++++++ src/saParser/lexer/LexerException.java | 22 + src/saParser/lexer/lexer.dat | Bin 0 -> 8476 bytes src/saParser/node/AAddExp.java | 267 ++ src/saParser/node/AAffectInst.java | 267 ++ src/saParser/node/AAndExp.java | 267 ++ src/saParser/node/AAppel.java | 267 ++ src/saParser/node/AAppelExp.java | 224 ++ src/saParser/node/AAppelInst.java | 95 + src/saParser/node/ABlocInst.java | 224 ++ src/saParser/node/ABoolType.java | 95 + src/saParser/node/ADecfonc.java | 396 +++ src/saParser/node/ADivExp.java | 267 ++ src/saParser/node/AEcritureInst.java | 224 ++ src/saParser/node/AEntierType.java | 95 + src/saParser/node/AEqualExp.java | 267 ++ src/saParser/node/AFauxExp.java | 95 + src/saParser/node/AFinLdecfonc.java | 95 + src/saParser/node/AFinLdecvar.java | 95 + src/saParser/node/AFinLexp.java | 95 + src/saParser/node/AFinLinst.java | 95 + src/saParser/node/AIndiceeVar.java | 267 ++ src/saParser/node/AInfExp.java | 267 ++ src/saParser/node/AIntExp.java | 95 + src/saParser/node/ALireExp.java | 95 + src/saParser/node/AMultExp.java | 267 ++ src/saParser/node/ANotExp.java | 224 ++ src/saParser/node/ANullType.java | 95 + src/saParser/node/AOrExp.java | 267 ++ src/saParser/node/AProg.java | 267 ++ src/saParser/node/ARecLdecfonc.java | 267 ++ src/saParser/node/ARecLdecvar.java | 267 ++ src/saParser/node/ARecLexp.java | 267 ++ src/saParser/node/ARecLinst.java | 267 ++ src/saParser/node/ARetourInst.java | 224 ++ src/saParser/node/ASi2Inst.java | 310 ++ src/saParser/node/ASiInst.java | 310 ++ src/saParser/node/ASimpleDecvar.java | 267 ++ src/saParser/node/ASimpleVar.java | 224 ++ src/saParser/node/ASubExp.java | 267 ++ src/saParser/node/ATabDecvar.java | 310 ++ src/saParser/node/ATantqueInst.java | 267 ++ src/saParser/node/AVarExp.java | 224 ++ src/saParser/node/AVraiExp.java | 95 + src/saParser/node/EOF.java | 33 + src/saParser/node/InvalidToken.java | 33 + src/saParser/node/Node.java | 78 + src/saParser/node/PAppel.java | 8 + src/saParser/node/PDecfonc.java | 8 + src/saParser/node/PDecvar.java | 8 + src/saParser/node/PExp.java | 8 + src/saParser/node/PInst.java | 8 + src/saParser/node/PLdecfonc.java | 8 + src/saParser/node/PLdecvar.java | 8 + src/saParser/node/PLexp.java | 8 + src/saParser/node/PLinst.java | 8 + src/saParser/node/PProg.java | 8 + src/saParser/node/PType.java | 8 + src/saParser/node/PVar.java | 8 + src/saParser/node/Start.java | 133 + src/saParser/node/Switch.java | 8 + src/saParser/node/Switchable.java | 8 + src/saParser/node/TBool.java | 39 + src/saParser/node/TCommentaire.java | 33 + src/saParser/node/TEntier.java | 39 + src/saParser/node/TEspaces.java | 33 + src/saParser/node/TFaux.java | 39 + src/saParser/node/TId.java | 33 + src/saParser/node/TInteger.java | 33 + src/saParser/node/TLire.java | 39 + src/saParser/node/TNul.java | 39 + src/saParser/node/TNull.java | 39 + src/saParser/node/TPf.java | 39 + src/saParser/node/TPo.java | 39 + src/saParser/node/TSaappel.java | 39 + src/saParser/node/TSadecfonc.java | 39 + src/saParser/node/TSadectab.java | 39 + src/saParser/node/TSadecvar.java | 39 + src/saParser/node/TSadecvarsimple.java | 39 + src/saParser/node/TSaexpadd.java | 39 + src/saParser/node/TSaexpand.java | 39 + src/saParser/node/TSaexpappel.java | 39 + src/saParser/node/TSaexpdiv.java | 39 + src/saParser/node/TSaexpequal.java | 39 + src/saParser/node/TSaexpfaux.java | 39 + src/saParser/node/TSaexpinf.java | 39 + src/saParser/node/TSaexpint.java | 39 + src/saParser/node/TSaexplire.java | 39 + src/saParser/node/TSaexpmult.java | 39 + src/saParser/node/TSaexpnot.java | 39 + src/saParser/node/TSaexpor.java | 39 + src/saParser/node/TSaexpsub.java | 39 + src/saParser/node/TSaexpvar.java | 39 + src/saParser/node/TSaexpvrai.java | 39 + src/saParser/node/TSainstaffect.java | 39 + src/saParser/node/TSainstbloc.java | 39 + src/saParser/node/TSainstecriture.java | 39 + src/saParser/node/TSainstretour.java | 39 + src/saParser/node/TSainstsi.java | 39 + src/saParser/node/TSainsttantque.java | 39 + src/saParser/node/TSaldecfonc.java | 39 + src/saParser/node/TSaldecvar.java | 39 + src/saParser/node/TSalexp.java | 39 + src/saParser/node/TSalinst.java | 39 + src/saParser/node/TSaprog.java | 39 + src/saParser/node/TSavarindicee.java | 39 + src/saParser/node/TSavarsimple.java | 39 + src/saParser/node/TVrai.java | 39 + src/saParser/node/Token.java | 59 + src/saParser/parser/Parser.java | 1873 +++++++++++ src/saParser/parser/ParserException.java | 22 + src/saParser/parser/State.java | 17 + src/saParser/parser/TokenIndex.java | 281 ++ src/saParser/parser/parser.dat | Bin 0 -> 7678 bytes 446 files changed, 52482 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/libraries/sablecc.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 out/production/2024-compilation-bazizi/.gitignore create mode 100644 out/production/2024-compilation-bazizi/Makefile create mode 100644 out/production/2024-compilation-bazizi/c3a.cfg create mode 100644 out/production/2024-compilation-bazizi/c3aParser/lexer/lexer.dat create mode 100644 out/production/2024-compilation-bazizi/c3aParser/parser/parser.dat create mode 100644 out/production/2024-compilation-bazizi/l.cfg create mode 100644 out/production/2024-compilation-bazizi/lParser/lexer/lexer.dat create mode 100644 out/production/2024-compilation-bazizi/lParser/parser/parser.dat create mode 100644 out/production/2024-compilation-bazizi/nasm.cfg create mode 100644 out/production/2024-compilation-bazizi/nasmParser/lexer/lexer.dat create mode 100644 out/production/2024-compilation-bazizi/nasmParser/parser/parser.dat create mode 100644 out/production/2024-compilation-bazizi/sa.cfg create mode 100644 out/production/2024-compilation-bazizi/saParser/lexer/lexer.dat create mode 100644 out/production/2024-compilation-bazizi/saParser/parser/parser.dat create mode 100644 src/c3aParser/analysis/Analysis.java create mode 100644 src/c3aParser/analysis/AnalysisAdapter.java create mode 100644 src/c3aParser/analysis/DepthFirstAdapter.java create mode 100644 src/c3aParser/analysis/ReversedDepthFirstAdapter.java create mode 100644 src/c3aParser/lexer/IPushbackReader.java create mode 100644 src/c3aParser/lexer/Lexer.java create mode 100644 src/c3aParser/lexer/LexerException.java create mode 100644 src/c3aParser/lexer/lexer.dat create mode 100644 src/c3aParser/node/AAdd.java create mode 100644 src/c3aParser/node/AAddInst.java create mode 100644 src/c3aParser/node/AAffInst.java create mode 100644 src/c3aParser/node/AAffect.java create mode 100644 src/c3aParser/node/AArg.java create mode 100644 src/c3aParser/node/AArgInst.java create mode 100644 src/c3aParser/node/ABegin.java create mode 100644 src/c3aParser/node/ABeginInst.java create mode 100644 src/c3aParser/node/ACCtv.java create mode 100644 src/c3aParser/node/AConstante.java create mode 100644 src/c3aParser/node/ACteEtiqop.java create mode 100644 src/c3aParser/node/ADiv.java create mode 100644 src/c3aParser/node/ADivInst.java create mode 100644 src/c3aParser/node/AEnd.java create mode 100644 src/c3aParser/node/AEndInst.java create mode 100644 src/c3aParser/node/AFcall.java create mode 100644 src/c3aParser/node/AFcallInst.java create mode 100644 src/c3aParser/node/AFinalListeinst.java create mode 100644 src/c3aParser/node/AIread.java create mode 100644 src/c3aParser/node/AIreadInst.java create mode 100644 src/c3aParser/node/AIstop.java create mode 100644 src/c3aParser/node/AIwrite.java create mode 100644 src/c3aParser/node/AIwriteInst.java create mode 100644 src/c3aParser/node/AJminfegInst.java create mode 100644 src/c3aParser/node/AJmp.java create mode 100644 src/c3aParser/node/AJmpInst.java create mode 100644 src/c3aParser/node/AJmpeg.java create mode 100644 src/c3aParser/node/AJmpegInst.java create mode 100644 src/c3aParser/node/AJmpinf.java create mode 100644 src/c3aParser/node/AJmpinfInst.java create mode 100644 src/c3aParser/node/AJmpinfeg.java create mode 100644 src/c3aParser/node/AJmpneg.java create mode 100644 src/c3aParser/node/AJmpnegInst.java create mode 100644 src/c3aParser/node/AJmpsup.java create mode 100644 src/c3aParser/node/AJmpsupInst.java create mode 100644 src/c3aParser/node/AJmpsupeg.java create mode 100644 src/c3aParser/node/AJmpsupegInst.java create mode 100644 src/c3aParser/node/AMul.java create mode 100644 src/c3aParser/node/AMulInst.java create mode 100644 src/c3aParser/node/AProg.java create mode 100644 src/c3aParser/node/ARecursifListeinst.java create mode 100644 src/c3aParser/node/AReturn.java create mode 100644 src/c3aParser/node/AReturnInst.java create mode 100644 src/c3aParser/node/AScalaireVariable.java create mode 100644 src/c3aParser/node/AStopInst.java create mode 100644 src/c3aParser/node/ASub.java create mode 100644 src/c3aParser/node/ASubInst.java create mode 100644 src/c3aParser/node/ATCtv.java create mode 100644 src/c3aParser/node/ATTv.java create mode 100644 src/c3aParser/node/ATabVariable.java create mode 100644 src/c3aParser/node/ATemporaire.java create mode 100644 src/c3aParser/node/AVCtv.java create mode 100644 src/c3aParser/node/AVTv.java create mode 100644 src/c3aParser/node/AVideEtiqop.java create mode 100644 src/c3aParser/node/EOF.java create mode 100644 src/c3aParser/node/InvalidToken.java create mode 100644 src/c3aParser/node/Node.java create mode 100644 src/c3aParser/node/PAdd.java create mode 100644 src/c3aParser/node/PAffect.java create mode 100644 src/c3aParser/node/PArg.java create mode 100644 src/c3aParser/node/PBegin.java create mode 100644 src/c3aParser/node/PConstante.java create mode 100644 src/c3aParser/node/PCtv.java create mode 100644 src/c3aParser/node/PDiv.java create mode 100644 src/c3aParser/node/PEnd.java create mode 100644 src/c3aParser/node/PEtiqop.java create mode 100644 src/c3aParser/node/PFcall.java create mode 100644 src/c3aParser/node/PInst.java create mode 100644 src/c3aParser/node/PIread.java create mode 100644 src/c3aParser/node/PIstop.java create mode 100644 src/c3aParser/node/PIwrite.java create mode 100644 src/c3aParser/node/PJmp.java create mode 100644 src/c3aParser/node/PJmpeg.java create mode 100644 src/c3aParser/node/PJmpinf.java create mode 100644 src/c3aParser/node/PJmpinfeg.java create mode 100644 src/c3aParser/node/PJmpneg.java create mode 100644 src/c3aParser/node/PJmpsup.java create mode 100644 src/c3aParser/node/PJmpsupeg.java create mode 100644 src/c3aParser/node/PListeinst.java create mode 100644 src/c3aParser/node/PMul.java create mode 100644 src/c3aParser/node/PProg.java create mode 100644 src/c3aParser/node/PReturn.java create mode 100644 src/c3aParser/node/PSub.java create mode 100644 src/c3aParser/node/PTemporaire.java create mode 100644 src/c3aParser/node/PTv.java create mode 100644 src/c3aParser/node/PVariable.java create mode 100644 src/c3aParser/node/Start.java create mode 100644 src/c3aParser/node/Switch.java create mode 100644 src/c3aParser/node/Switchable.java create mode 100644 src/c3aParser/node/TAff.java create mode 100644 src/c3aParser/node/TCall.java create mode 100644 src/c3aParser/node/TCf.java create mode 100644 src/c3aParser/node/TCo.java create mode 100644 src/c3aParser/node/TCommentaire.java create mode 100644 src/c3aParser/node/TDivise.java create mode 100644 src/c3aParser/node/TEq.java create mode 100644 src/c3aParser/node/TEspaces.java create mode 100644 src/c3aParser/node/TFbegin.java create mode 100644 src/c3aParser/node/TFend.java create mode 100644 src/c3aParser/node/TFois.java create mode 100644 src/c3aParser/node/TGoto.java create mode 100644 src/c3aParser/node/TIdentif.java create mode 100644 src/c3aParser/node/TIf.java create mode 100644 src/c3aParser/node/TInf.java create mode 100644 src/c3aParser/node/TInfeq.java create mode 100644 src/c3aParser/node/TMoins.java create mode 100644 src/c3aParser/node/TNombre.java create mode 100644 src/c3aParser/node/TNoteq.java create mode 100644 src/c3aParser/node/TParam.java create mode 100644 src/c3aParser/node/TPlus.java create mode 100644 src/c3aParser/node/TPrefixeTemp.java create mode 100644 src/c3aParser/node/TRead.java create mode 100644 src/c3aParser/node/TRet.java create mode 100644 src/c3aParser/node/TStop.java create mode 100644 src/c3aParser/node/TSup.java create mode 100644 src/c3aParser/node/TSupeq.java create mode 100644 src/c3aParser/node/TWrite.java create mode 100644 src/c3aParser/node/Token.java create mode 100644 src/c3aParser/parser/Parser.java create mode 100644 src/c3aParser/parser/ParserException.java create mode 100644 src/c3aParser/parser/State.java create mode 100644 src/c3aParser/parser/TokenIndex.java create mode 100644 src/c3aParser/parser/parser.dat create mode 100644 src/nasmParser/lexer/IPushbackReader.java create mode 100644 src/nasmParser/lexer/Lexer.java create mode 100644 src/nasmParser/lexer/LexerException.java create mode 100644 src/nasmParser/lexer/lexer.dat create mode 100644 src/nasmParser/node/AAddInst.java create mode 100644 src/nasmParser/node/AAddress.java create mode 100644 src/nasmParser/node/AAddressAcr.java create mode 100644 src/nasmParser/node/AAddressAr.java create mode 100644 src/nasmParser/node/AAndInst.java create mode 100644 src/nasmParser/node/AByteOpsizeof.java create mode 100644 src/nasmParser/node/ACallInst.java create mode 100644 src/nasmParser/node/ACmpInst.java create mode 100644 src/nasmParser/node/AComplexFilename.java create mode 100644 src/nasmParser/node/ADbConst.java create mode 100644 src/nasmParser/node/ADdConst.java create mode 100644 src/nasmParser/node/ADqConst.java create mode 100644 src/nasmParser/node/ADtConst.java create mode 100644 src/nasmParser/node/ADwConst.java create mode 100644 src/nasmParser/node/ADwordOpsizeof.java create mode 100644 src/nasmParser/node/AEaxRegister.java create mode 100644 src/nasmParser/node/AEbpRegister.java create mode 100644 src/nasmParser/node/AEbxRegister.java create mode 100644 src/nasmParser/node/AEcxRegister.java create mode 100644 src/nasmParser/node/AEdxRegister.java create mode 100644 src/nasmParser/node/AEmptyLconst.java create mode 100644 src/nasmParser/node/AEmptyLglobal.java create mode 100644 src/nasmParser/node/AEmptyLinclude.java create mode 100644 src/nasmParser/node/AEmptyLvar.java create mode 100644 src/nasmParser/node/AEmptyOplabel.java create mode 100644 src/nasmParser/node/AEmptyOpsizeof.java create mode 100644 src/nasmParser/node/AEmptySecbss.java create mode 100644 src/nasmParser/node/AEmptySecdata.java create mode 100644 src/nasmParser/node/AEspRegister.java create mode 100644 src/nasmParser/node/AIdivInst.java create mode 100644 src/nasmParser/node/AImulInst.java create mode 100644 src/nasmParser/node/AInclude.java create mode 100644 src/nasmParser/node/AInterInst.java create mode 100644 src/nasmParser/node/AJeInst.java create mode 100644 src/nasmParser/node/AJgInst.java create mode 100644 src/nasmParser/node/AJgeInst.java create mode 100644 src/nasmParser/node/AJlInst.java create mode 100644 src/nasmParser/node/AJmpInst.java create mode 100644 src/nasmParser/node/AJneInst.java create mode 100644 src/nasmParser/node/ALabel.java create mode 100644 src/nasmParser/node/ALabelExp2.java create mode 100644 src/nasmParser/node/ALabelOplabel.java create mode 100644 src/nasmParser/node/ALastLinst.java create mode 100644 src/nasmParser/node/AMinusExp.java create mode 100644 src/nasmParser/node/AMovInst.java create mode 100644 src/nasmParser/node/ANextExp.java create mode 100644 src/nasmParser/node/ANextExp1.java create mode 100644 src/nasmParser/node/ANonemptySecbss.java create mode 100644 src/nasmParser/node/ANonemptySecdata.java create mode 100644 src/nasmParser/node/ANotInst.java create mode 100644 src/nasmParser/node/ANumconst.java create mode 100644 src/nasmParser/node/ANumconstAcr.java create mode 100644 src/nasmParser/node/ANumconstExp2.java create mode 100644 src/nasmParser/node/AOrInst.java create mode 100644 src/nasmParser/node/APlusExp.java create mode 100644 src/nasmParser/node/APopInst.java create mode 100644 src/nasmParser/node/AProg.java create mode 100644 src/nasmParser/node/APushInst.java create mode 100644 src/nasmParser/node/ARecLconst.java create mode 100644 src/nasmParser/node/ARecLglobal.java create mode 100644 src/nasmParser/node/ARecLinclude.java create mode 100644 src/nasmParser/node/ARecLinst.java create mode 100644 src/nasmParser/node/ARecLvar.java create mode 100644 src/nasmParser/node/ARegisterAcr.java create mode 100644 src/nasmParser/node/ARegisterAr.java create mode 100644 src/nasmParser/node/ARegisterExp2.java create mode 100644 src/nasmParser/node/AResbVar.java create mode 100644 src/nasmParser/node/AResdVar.java create mode 100644 src/nasmParser/node/AResqVar.java create mode 100644 src/nasmParser/node/ARestVar.java create mode 100644 src/nasmParser/node/AReswVar.java create mode 100644 src/nasmParser/node/ARetInst.java create mode 100644 src/nasmParser/node/ASectext.java create mode 100644 src/nasmParser/node/ASimpleFilename.java create mode 100644 src/nasmParser/node/ASubInst.java create mode 100644 src/nasmParser/node/ATempRegister.java create mode 100644 src/nasmParser/node/ATimesExp1.java create mode 100644 src/nasmParser/node/AWordOpsizeof.java create mode 100644 src/nasmParser/node/AXorInst.java create mode 100644 src/nasmParser/node/EOF.java create mode 100644 src/nasmParser/node/InvalidToken.java create mode 100644 src/nasmParser/node/Node.java create mode 100644 src/nasmParser/node/PAcr.java create mode 100644 src/nasmParser/node/PAddress.java create mode 100644 src/nasmParser/node/PAr.java create mode 100644 src/nasmParser/node/PConst.java create mode 100644 src/nasmParser/node/PExp.java create mode 100644 src/nasmParser/node/PExp1.java create mode 100644 src/nasmParser/node/PExp2.java create mode 100644 src/nasmParser/node/PFilename.java create mode 100644 src/nasmParser/node/PInclude.java create mode 100644 src/nasmParser/node/PInst.java create mode 100644 src/nasmParser/node/PLabel.java create mode 100644 src/nasmParser/node/PLconst.java create mode 100644 src/nasmParser/node/PLglobal.java create mode 100644 src/nasmParser/node/PLinclude.java create mode 100644 src/nasmParser/node/PLinst.java create mode 100644 src/nasmParser/node/PLvar.java create mode 100644 src/nasmParser/node/PNumconst.java create mode 100644 src/nasmParser/node/POplabel.java create mode 100644 src/nasmParser/node/POpsizeof.java create mode 100644 src/nasmParser/node/PProg.java create mode 100644 src/nasmParser/node/PRegister.java create mode 100644 src/nasmParser/node/PSecbss.java create mode 100644 src/nasmParser/node/PSecdata.java create mode 100644 src/nasmParser/node/PSectext.java create mode 100644 src/nasmParser/node/PVar.java create mode 100644 src/nasmParser/node/Start.java create mode 100644 src/nasmParser/node/Switch.java create mode 100644 src/nasmParser/node/Switchable.java create mode 100644 src/nasmParser/node/TAdd.java create mode 100644 src/nasmParser/node/TAnd.java create mode 100644 src/nasmParser/node/TBrackclose.java create mode 100644 src/nasmParser/node/TBrackopen.java create mode 100644 src/nasmParser/node/TBss.java create mode 100644 src/nasmParser/node/TByte.java create mode 100644 src/nasmParser/node/TCall.java create mode 100644 src/nasmParser/node/TCmp.java create mode 100644 src/nasmParser/node/TComma.java create mode 100644 src/nasmParser/node/TComment.java create mode 100644 src/nasmParser/node/TData.java create mode 100644 src/nasmParser/node/TDefinebyte.java create mode 100644 src/nasmParser/node/TDefinedoubleword.java create mode 100644 src/nasmParser/node/TDefinequadword.java create mode 100644 src/nasmParser/node/TDefinetenbytes.java create mode 100644 src/nasmParser/node/TDefineword.java create mode 100644 src/nasmParser/node/TDot.java create mode 100644 src/nasmParser/node/TDword.java create mode 100644 src/nasmParser/node/TEax.java create mode 100644 src/nasmParser/node/TEbp.java create mode 100644 src/nasmParser/node/TEbx.java create mode 100644 src/nasmParser/node/TEcx.java create mode 100644 src/nasmParser/node/TEdx.java create mode 100644 src/nasmParser/node/TEsp.java create mode 100644 src/nasmParser/node/TGlobal.java create mode 100644 src/nasmParser/node/TId.java create mode 100644 src/nasmParser/node/TIdiv.java create mode 100644 src/nasmParser/node/TImul.java create mode 100644 src/nasmParser/node/TInc.java create mode 100644 src/nasmParser/node/TInt.java create mode 100644 src/nasmParser/node/TJe.java create mode 100644 src/nasmParser/node/TJg.java create mode 100644 src/nasmParser/node/TJge.java create mode 100644 src/nasmParser/node/TJl.java create mode 100644 src/nasmParser/node/TJle.java create mode 100644 src/nasmParser/node/TJmp.java create mode 100644 src/nasmParser/node/TJne.java create mode 100644 src/nasmParser/node/TMinus.java create mode 100644 src/nasmParser/node/TMov.java create mode 100644 src/nasmParser/node/TNot.java create mode 100644 src/nasmParser/node/TNumber.java create mode 100644 src/nasmParser/node/TOr.java create mode 100644 src/nasmParser/node/TPercentage.java create mode 100644 src/nasmParser/node/TPlus.java create mode 100644 src/nasmParser/node/TPop.java create mode 100644 src/nasmParser/node/TPrefixRegister.java create mode 100644 src/nasmParser/node/TPush.java create mode 100644 src/nasmParser/node/TQuote.java create mode 100644 src/nasmParser/node/TReservebyte.java create mode 100644 src/nasmParser/node/TReservedoubleword.java create mode 100644 src/nasmParser/node/TReservequadword.java create mode 100644 src/nasmParser/node/TReservetenbytes.java create mode 100644 src/nasmParser/node/TReserveword.java create mode 100644 src/nasmParser/node/TRet.java create mode 100644 src/nasmParser/node/TSection.java create mode 100644 src/nasmParser/node/TSemicol.java create mode 100644 src/nasmParser/node/TSpaces.java create mode 100644 src/nasmParser/node/TSub.java create mode 100644 src/nasmParser/node/TText.java create mode 100644 src/nasmParser/node/TTimes.java create mode 100644 src/nasmParser/node/TWord.java create mode 100644 src/nasmParser/node/TXor.java create mode 100644 src/nasmParser/node/Token.java create mode 100644 src/saParser/analysis/Analysis.java create mode 100644 src/saParser/analysis/AnalysisAdapter.java create mode 100644 src/saParser/analysis/DepthFirstAdapter.java create mode 100644 src/saParser/analysis/ReversedDepthFirstAdapter.java create mode 100644 src/saParser/lexer/IPushbackReader.java create mode 100644 src/saParser/lexer/Lexer.java create mode 100644 src/saParser/lexer/LexerException.java create mode 100644 src/saParser/lexer/lexer.dat create mode 100644 src/saParser/node/AAddExp.java create mode 100644 src/saParser/node/AAffectInst.java create mode 100644 src/saParser/node/AAndExp.java create mode 100644 src/saParser/node/AAppel.java create mode 100644 src/saParser/node/AAppelExp.java create mode 100644 src/saParser/node/AAppelInst.java create mode 100644 src/saParser/node/ABlocInst.java create mode 100644 src/saParser/node/ABoolType.java create mode 100644 src/saParser/node/ADecfonc.java create mode 100644 src/saParser/node/ADivExp.java create mode 100644 src/saParser/node/AEcritureInst.java create mode 100644 src/saParser/node/AEntierType.java create mode 100644 src/saParser/node/AEqualExp.java create mode 100644 src/saParser/node/AFauxExp.java create mode 100644 src/saParser/node/AFinLdecfonc.java create mode 100644 src/saParser/node/AFinLdecvar.java create mode 100644 src/saParser/node/AFinLexp.java create mode 100644 src/saParser/node/AFinLinst.java create mode 100644 src/saParser/node/AIndiceeVar.java create mode 100644 src/saParser/node/AInfExp.java create mode 100644 src/saParser/node/AIntExp.java create mode 100644 src/saParser/node/ALireExp.java create mode 100644 src/saParser/node/AMultExp.java create mode 100644 src/saParser/node/ANotExp.java create mode 100644 src/saParser/node/ANullType.java create mode 100644 src/saParser/node/AOrExp.java create mode 100644 src/saParser/node/AProg.java create mode 100644 src/saParser/node/ARecLdecfonc.java create mode 100644 src/saParser/node/ARecLdecvar.java create mode 100644 src/saParser/node/ARecLexp.java create mode 100644 src/saParser/node/ARecLinst.java create mode 100644 src/saParser/node/ARetourInst.java create mode 100644 src/saParser/node/ASi2Inst.java create mode 100644 src/saParser/node/ASiInst.java create mode 100644 src/saParser/node/ASimpleDecvar.java create mode 100644 src/saParser/node/ASimpleVar.java create mode 100644 src/saParser/node/ASubExp.java create mode 100644 src/saParser/node/ATabDecvar.java create mode 100644 src/saParser/node/ATantqueInst.java create mode 100644 src/saParser/node/AVarExp.java create mode 100644 src/saParser/node/AVraiExp.java create mode 100644 src/saParser/node/EOF.java create mode 100644 src/saParser/node/InvalidToken.java create mode 100644 src/saParser/node/Node.java create mode 100644 src/saParser/node/PAppel.java create mode 100644 src/saParser/node/PDecfonc.java create mode 100644 src/saParser/node/PDecvar.java create mode 100644 src/saParser/node/PExp.java create mode 100644 src/saParser/node/PInst.java create mode 100644 src/saParser/node/PLdecfonc.java create mode 100644 src/saParser/node/PLdecvar.java create mode 100644 src/saParser/node/PLexp.java create mode 100644 src/saParser/node/PLinst.java create mode 100644 src/saParser/node/PProg.java create mode 100644 src/saParser/node/PType.java create mode 100644 src/saParser/node/PVar.java create mode 100644 src/saParser/node/Start.java create mode 100644 src/saParser/node/Switch.java create mode 100644 src/saParser/node/Switchable.java create mode 100644 src/saParser/node/TBool.java create mode 100644 src/saParser/node/TCommentaire.java create mode 100644 src/saParser/node/TEntier.java create mode 100644 src/saParser/node/TEspaces.java create mode 100644 src/saParser/node/TFaux.java create mode 100644 src/saParser/node/TId.java create mode 100644 src/saParser/node/TInteger.java create mode 100644 src/saParser/node/TLire.java create mode 100644 src/saParser/node/TNul.java create mode 100644 src/saParser/node/TNull.java create mode 100644 src/saParser/node/TPf.java create mode 100644 src/saParser/node/TPo.java create mode 100644 src/saParser/node/TSaappel.java create mode 100644 src/saParser/node/TSadecfonc.java create mode 100644 src/saParser/node/TSadectab.java create mode 100644 src/saParser/node/TSadecvar.java create mode 100644 src/saParser/node/TSadecvarsimple.java create mode 100644 src/saParser/node/TSaexpadd.java create mode 100644 src/saParser/node/TSaexpand.java create mode 100644 src/saParser/node/TSaexpappel.java create mode 100644 src/saParser/node/TSaexpdiv.java create mode 100644 src/saParser/node/TSaexpequal.java create mode 100644 src/saParser/node/TSaexpfaux.java create mode 100644 src/saParser/node/TSaexpinf.java create mode 100644 src/saParser/node/TSaexpint.java create mode 100644 src/saParser/node/TSaexplire.java create mode 100644 src/saParser/node/TSaexpmult.java create mode 100644 src/saParser/node/TSaexpnot.java create mode 100644 src/saParser/node/TSaexpor.java create mode 100644 src/saParser/node/TSaexpsub.java create mode 100644 src/saParser/node/TSaexpvar.java create mode 100644 src/saParser/node/TSaexpvrai.java create mode 100644 src/saParser/node/TSainstaffect.java create mode 100644 src/saParser/node/TSainstbloc.java create mode 100644 src/saParser/node/TSainstecriture.java create mode 100644 src/saParser/node/TSainstretour.java create mode 100644 src/saParser/node/TSainstsi.java create mode 100644 src/saParser/node/TSainsttantque.java create mode 100644 src/saParser/node/TSaldecfonc.java create mode 100644 src/saParser/node/TSaldecvar.java create mode 100644 src/saParser/node/TSalexp.java create mode 100644 src/saParser/node/TSalinst.java create mode 100644 src/saParser/node/TSaprog.java create mode 100644 src/saParser/node/TSavarindicee.java create mode 100644 src/saParser/node/TSavarsimple.java create mode 100644 src/saParser/node/TVrai.java create mode 100644 src/saParser/node/Token.java create mode 100644 src/saParser/parser/Parser.java create mode 100644 src/saParser/parser/ParserException.java create mode 100644 src/saParser/parser/State.java create mode 100644 src/saParser/parser/TokenIndex.java create mode 100644 src/saParser/parser/parser.dat diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/libraries/sablecc.xml b/.idea/libraries/sablecc.xml new file mode 100644 index 0000000..74b6284 --- /dev/null +++ b/.idea/libraries/sablecc.xml @@ -0,0 +1,9 @@ +<component name="libraryTable"> + <library name="sablecc"> + <CLASSES> + <root url="jar://$PROJECT_DIR$/sablecc/sablecc.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> +</component> \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..dbb096c --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectRootManager" version="2" project-jdk-name="20" project-jdk-type="JavaSDK"> + <output url="file://$PROJECT_DIR$/out" /> + </component> +</project> \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..22c43dd --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectModuleManager"> + <modules> + <module fileurl="file://$PROJECT_DIR$/2024-compilation-bazizi.iml" filepath="$PROJECT_DIR$/2024-compilation-bazizi.iml" /> + </modules> + </component> +</project> \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="VcsDirectoryMappings"> + <mapping directory="" vcs="Git" /> + </component> +</project> \ No newline at end of file diff --git a/out/production/2024-compilation-bazizi/.gitignore b/out/production/2024-compilation-bazizi/.gitignore new file mode 100644 index 0000000..871caa1 --- /dev/null +++ b/out/production/2024-compilation-bazizi/.gitignore @@ -0,0 +1,4 @@ +*\.class +*/*\.class +*/*/*\.class +*~ \ No newline at end of file diff --git a/out/production/2024-compilation-bazizi/Makefile b/out/production/2024-compilation-bazizi/Makefile new file mode 100644 index 0000000..b64a54c --- /dev/null +++ b/out/production/2024-compilation-bazizi/Makefile @@ -0,0 +1,52 @@ +all: Compiler C3aVM NasmVM SaVM + +SaVM: SaVM.java saParser + javac SaVM.java + +NasmVM.jar : NasmVM + jar cmf NasmVM.mf NasmVM.jar NasmVM.class nasm + +C3aVM: C3aVM.java c3aParser + javac C3aVM.java + +NasmVM: NasmVM.java nasmParser + javac NasmVM.java + +Compiler.jar : Compiler + jar cmf Compiler.mf Compiler.jar *.class sc sa ts nasm util c3a fg ig lParser + +Compiler: Compiler.java lParser + javac Compiler.java + +lParser: l.cfg + java -jar ../sablecc/sablecc.jar l.cfg + +saParser: sa.cfg + java -jar ../sablecc/sablecc.jar sa.cfg + +c3aParser: c3a.cfg + java -jar ../sablecc/sablecc.jar c3a.cfg + +nasmParser: nasm.cfg + java -jar ../sablecc/sablecc.jar nasm.cfg + +ualParser: ual.cfg + java -jar ../sablecc/sablecc.jar ual.cfg + +clean: + -rm *.class + -rm sc/*.class + -rm sa/*.class + -rm c3a/*.class + -rm ts/*.class + -rm nasm/*.class + -rm fg/*.class + -rm ig/*.class + -rm util/intset/*.class + -rm util/graph/*.class + -rm util/*.class + -rm -r lParser + -rm -r saParser + -rm -r c3aParser + -rm -r nasmParser + diff --git a/out/production/2024-compilation-bazizi/c3a.cfg b/out/production/2024-compilation-bazizi/c3a.cfg new file mode 100644 index 0000000..0737c8b --- /dev/null +++ b/out/production/2024-compilation-bazizi/c3a.cfg @@ -0,0 +1,113 @@ +Package c3aParser; + +Helpers + +lettre = [['a' .. 'z'] + ['A' .. 'Z']]; +chiffre = ['0' .. '9']; +alpha = [lettre + ['_' + '$']]; +alphanum = [lettre + chiffre]; + +Tokens + +espaces = (' ' | 13 | 10 | 9)+; +commentaire= '#' [[0 .. 0xffff] - [10 + 13]]* (10 | 13 | 10 13); + + +co = '['; +cf = ']'; +call = 'call'; +stop = 'stop'; +fbegin = 'fbegin'; +fend = 'fend'; +aff = '='; +noteq = '!='; +inf = '<'; +infeq = '<='; +sup = '>'; +supeq = '>='; +eq = '=='; +goto = 'goto'; +param = 'param'; +ret = 'ret'; +if = 'if'; +moins = '-'; +plus = '+'; +fois = '*'; +divise = '/'; +write = 'write'; +read = 'read'; +nombre = chiffre+; +prefixe_temp = '@'; +identif = alpha alphanum*; + + +Ignored Tokens + +espaces, commentaire; + +Productions + +prog = listeinst; + +listeinst = {recursif} inst listeinst | + {final} inst + ; + +inst = {add} add | + {sub} sub | + {mul} mul | + {div} div | + {aff} affect | + {jmp} jmp | + {jmpeg} jmpeg | + {jmpneg} jmpneg | + {jmpinf} jmpinf | + {jminfeg} jmpinfeg | + {jmpsup} jmpsup | + {jmpsupeg} jmpsupeg | + {fcall} fcall | + {iwrite} iwrite | + {iread} iread | + {arg} arg | + {return} return | + {begin} begin | + {end} end | + {stop} istop + ; + +add = etiqop [result]:tv aff [op1]:ctv plus [op2]:ctv; +sub = etiqop [result]:tv aff [op1]:ctv moins [op2]:ctv; +mul = etiqop [result]:tv aff [op1]:ctv fois [op2]:ctv; +div = etiqop [result]:tv aff [op1]:ctv divise [op2]:ctv; +affect = etiqop [result]:tv aff [op1]:ctv; +jmpeg = etiqop if [op1]:ctv eq [op2]:ctv goto [result]:constante; +jmpneg = etiqop if [op1]:ctv noteq [op2]:ctv goto [result]:constante; +jmpinf = etiqop if [op1]:ctv inf [op2]:ctv goto [result]:constante; +jmpinfeg = etiqop if [op1]:ctv infeq [op2]:ctv goto [result]:constante; +jmpsup = etiqop if [op1]:ctv sup [op2]:ctv goto [result]:constante; +jmpsupeg = etiqop if [op1]:ctv supeq [op2]:ctv goto [result]:constante; +jmp = etiqop goto [result]:constante; +begin = identif fbegin; +end = etiqop fend; +fcall = etiqop [result]:tv aff call identif; +iwrite = etiqop write ctv; +iread = etiqop [result]:tv aff read; +arg = etiqop param ctv; +return = etiqop ret ctv; +istop = etiqop stop ctv; + + +ctv = {c} constante | {t} temporaire | {v} variable; +tv = {t} temporaire | {v} variable; + +constante = nombre; + +temporaire = prefixe_temp nombre; + +variable = {scalaire} identif | + {tab} identif co ctv cf + ; + +etiqop = {cte} nombre | + {vide} + ; diff --git a/out/production/2024-compilation-bazizi/c3aParser/lexer/lexer.dat b/out/production/2024-compilation-bazizi/c3aParser/lexer/lexer.dat new file mode 100644 index 0000000000000000000000000000000000000000..80616e928dc0d74feac209ffd3cac8d7344265f5 GIT binary patch literal 2536 zcmZQzU|?imU~pn!U{GdYVBmyekQf&O0|N*%F)%RjLNPM~1A_t-voJ6)C_*tSR6ocJ zHU<U;6)0wBU|`UKVh#od25l$?*`v$AzyQJ^JM<YC7(ketfq}t*fq}u2fq{XCfq}sW zib3|<GB7ZJFdqX0gB=v}GcYhXK(PP=1A`+2149%80|Ut3Xa)ub5Ef)$V2FicAqED9 zcqj&`Nn~JPNP?<QW?*0dVPOUah7<+{hE%9{8Uq6Z2#YW<Fr-7VC<6mS1{8zL$z)() z0AVo(28JvK28Mj7-U0>&1`rl!U|=YOVvzbG1_lNYmSA9DD28H51_p)_1_p*QsNQl0 z1_lt8VqjpXU|?XVf{KIU1{8h@|NsC02aP{c`JiwFVQB^i22k8FK;vBo8t0%mk!4_D z0L2F=9zf!tH~?We1_lN`28RFt85kHq;-EAEi!*toH~_Ih;R|v%hz+s>8H4-*(+9Ex z#0R+vgh6QxnGZ^5$b2PagBTbXU~Y)||NsAY1_lO@y&w!qkD&O4xdD_mL3X061Gx{R z4unBz7nBY_X#gY+N(UgU3QY$vvq0$|-K;zY1_qEGQ2c|i8Z`d#=>eGy(gR9kAgm5e zV=z6q{H6g-yD)Xw+=K21O(OgNN{=A-fYKregYs`FH2s0ZvDpJk+aNhmng(G|J_nft za~mkSK=H=_N;m)i|Nj9^x1jU{!a5)YP%%)LRzc$tDh#Hu*_#aw?;HjO1`r07C%H&& zg@s+p|NsA=LGv^yy!D6(2aq`+KY`*DghAyKC{AI1f|*_X|NsA|(7X!@FOd6@!wckZ zkQmHQFnxvp|NnmiEeAkhW(X|@VCIAJB}gB7S~Y^kJ1BfX?gQBg!o~~?49NDv?8*E8 z|Nl#9nFMmb2@z=$RJMW429;?bYzi&cU~U6N2+aKK|NsBrhK4^V4$K%B7(ihMQ;RL$ zK<ON0KCC=7hnA)I^nmgtNDnAYgRliOK4E%b?m_o2s4fAO!RYGH!_^8JuITEL|NsAg z9$F`W?6pR-7d?Kl`4<%KAh(0u0m7hq4U}il?LtpWpt2A-PSNdx`8nhN|Nobvbr2}N zK=mW29)g*Vt`D7$&CQ^=1i2X$mmqA<z`y{?2gI5Qa~pcz1J&1{_=lMTQ<wYy|Nom% zJ3#h;>T*!H!PKF<nHav)|Nr263Y1>q7$gS53=9mQ`VUl>gX(rry$`CtLG>`G{sXmF zK=l%+{spyxK<)&o$A>wg=7QV?!XUMvIuz7q0hMzgJ~9TiN09j-HcTIgjgCQW8JHL- c&OmHXdx9V87f^cwRBnL8K^W8~0<}HZ0BTG`4gdfE literal 0 HcmV?d00001 diff --git a/out/production/2024-compilation-bazizi/c3aParser/parser/parser.dat b/out/production/2024-compilation-bazizi/c3aParser/parser/parser.dat new file mode 100644 index 0000000000000000000000000000000000000000..ad501e5a0e8ff588785c34dca865cbef609f41d4 GIT binary patch literal 8098 zcmZQzVCZ9DVBr4$|Nnmm1_ovZ2!PRy3=9mc5FrL81_lORC>tct2W7J`Ffi~#*&ww7 zP&OL_1A{1(&CbBUAP!}7FfcGkK-ruO3=EP`HWvc}0}GNnKz76QsN&G0#=yY92-O2p zZ^*#Fzy#%k+z7(RW+0mnayPOZHaCIHN7e)KAE|mk;XtY$<nY4hcP=Eqg2EN#Ur=xw zAjKOfOknY5#K6D+i#KDWcr#&OV1UJ&DN?+d;R$!-a0bOA%#RkJbOd!5C{A2K4uWD! zP#i<qR%mg>&A`AQg(QX?uOKb3Gzu~klonxr1@S@g0#XAKhxrvG5A!Q1uBnwqk=+Hd z1DOx92bm9Y7cw7|7LfU%ct+-f!V#Gd$`i<ZP#7WedC<~7$nVJVApaxtL1_e;FM_5Y zlwXnML1Bi>2c;2Yz95=@AvC@)8ea@4enDZU#K6D+3KLM=*`TR)MB_W5@tu*(0;K`; zbcXCsTQt3PXncD#z5^Ox4~-8>$H?YeGcYi)L(@FSUm*3MxCQwOWH%_>L2Qt{pg0Dx zL3V=T7sLkH2Z~z|8{}_Lyn@*1eg@@D<njoV&tdrvUpay7R*)X#ybCH5kj+3gA5=yl z%MnvXg31z7^?>|Esvc0;M2sF}znUYZH&3)Ubpe%4NO1^?V`9ul4qJURGePN+4arPU z8V8k8pt$vBU|;~{2N2r_seZ&4kH~QYN>{|V4_OZ={gJ8%luk+214_@N>H(#DQuToH z2Qhk(;|LT7$b4P2I0MyR$nv0i3OR4PgYr5k(ij*RLKqkrV0k-~fq?;*x5F417+`rj z9Mryos*hk`V1VWANHlvv`35<yfYK){twbTEm1rW<3Ua#l0@($1Lo8Cc2`Z~V=@8Zi zivy{HrdLqf1?3l3B)$Rz0|Thc2N@O5z`y`1??LPY1_lODSr1|-GB7ZJ>J<<>3C%7) zq&8$Snw&q9Tnd_80FqoPnp_}~TpF5O5RzOvnp`lFTn1X+2gNHf=?Xb-f#RQ3J)m?# zsvb~!B2^D4-I1yXls<{kgPhJl=@gch^3l=~sJuo_OY%r*sQ@W06(XgjBBZobjAou2 z8Xr_wA;$+OeG=n-WIdpCOsXDGdM8y6C|?kx2RUp(`2|@IvK%PC;F1I77hH0n{DMmk zlwWYkf$|G3xlE*dRfm@6vXJEJ(d4p`<QmZAa**U2(d2TG<eJdr@{r`3(b5a3-GdzW zpfrf=Ct}(<ptMS=9#EPlRSzib6Qc*Y-U9Wdkoh40AoFF=!b1*?uY$%0^@Wl3YoN(% zq49Ol_@K5va+(FD4P-wd%Yo7cE;&%zz$FJt8@S{^X#<xWC~Y9iA^Q_lo+0x=>X7-; zX#SK%<13@_LG3$a{px7)nrM7&G`=DO0|Rp0f%*-wumiO%Kz%?^e*|U+h!0~U_Xm;t zcF6rYQ2h>5531i`Y*76UV}t5<7#q3I2x`y5#F4`ZIqe~bCvqA^4o77FA%`b&8U@uK zFuOqQ5*Qm4K8nyb3n*+seR5D*1og#1Z9Pzb6V^Wiwbw!YAy8iuRDXc_kf3%LsBQuE zNkDBqP`%~Bz`y|N4}jWHp!TCL0|Nu7{S9i*fZEicwhO483~Hx<+P<JR38*~_YJY&* zsGzn6s67`0Z8L((NKktLR33ub0HCrDRIh`|IZ#~<D$_vqFR1(i)ng?L3=E*Usg!|% z0aV|VF)%QI>X32<1_n^M)xyBQ04j@G85kHq<x3j_0|ThcXh$j!LHQ5VRt2@`_@Utg z%EO>GASjK2%0o~e2vpBhFfcHH>Xb?b1_n_5QN_T(0IDmh85kHq^+F8;0|TfIsAXVa z0OjKj1_lODp6z5{U;yRME(Qh$P+sh2U|;~{yB-Dx22dXBMQUe((mAM&2+AKIcY$b7 zS_RRtav4;nfYgA>B9Iyo4N?Q5LFqJ%A(f$mp@1QkA(^3sA(J7GA)UdBL4iS?p_rkB zA)lduL7hPd%ui!TWyoVlf%DTD^1&)#@&ycu3`Goy47qR>MGUD7C2(FQLmHf2&QQdV z$xy<O3Khv?$Y;o9NMZo#fY{~$mC0mC0ox058z}tbak!Uw6QXgLFgSe-3Jq5Ve+E!~ z62#$hWWO^o_~B4RU;n8y;EF+6obHQ;#<@B}8bcC8DnmLrJ;KtLEd!`5;=`dE7Dl+_ z)fpiAr{U1A&JYW?olweG1e*nl8FdC5xGozcQ9HP(9g?Um5}T6TqYF1(8_v>#v-IIC za&sBTXRz>GfHS-hu|<5yf#LvUx;n#13PWw2VMtjhFfh!<Y4T{CfYKRi?Ew;jrE7hh zA(zaM$dJR31J6aEIw=ue?;)49AoFmSbGS<)P~3n<ez4cPsBUIp$j9kYLgmy@DPwTe zYw8RLA3$bVK`j~3s2XTg57g=cv5_&Tr3w-UwNyc^R1gNKr8Wl5Ou#UxRRtQg1la*% z!!U>s!=RB&5F6xH5Dju8h>eUv=7D-5ATf{{klR7M5fC362B|^DFgrkcKrK8_PX#0o v>ZO2sC)hAHb3tOrdO>ainFA6>#vngn!`SQriD5GXBt{IzW)Db=7`;pY7xPiZ literal 0 HcmV?d00001 diff --git a/out/production/2024-compilation-bazizi/l.cfg b/out/production/2024-compilation-bazizi/l.cfg new file mode 100644 index 0000000..e4eabb7 --- /dev/null +++ b/out/production/2024-compilation-bazizi/l.cfg @@ -0,0 +1,104 @@ +Package lParser; + +Helpers + +lettre = [['a' .. 'z'] + ['A' .. 'Z']]; +chiffre = ['0' .. '9']; +alpha = [lettre + ['_' + '$']]; +alphanum = [lettre + chiffre]; + +Tokens + +espaces = (' ' | 13 | 10)+; +commentaire= '#' [[0 .. 0xffff] - [10 + 13]]* (10 | 13 | 10 13); +plus = '+'; +pointvirgule = ';' ; +moins = '-'; +ou = '|' ; +et = '&' ; +virgule = ',' ; +egale = '=' ; +inf = '<' ; +fois = '*' ; +diviser = '/' ; +non ='!' ; +gparenthese = '(' ; +dparenthese = ')' ; +accoladeg = '{' ; +accoladed = '}' ; +crochetg = '[' ; +crochetd = ']' ; +bool = 'bool' ; +entier = 'entier' ; +si = 'si' ; +alors = 'alors' ; +tantque = 'tantque' ; +faire = 'faire' ; +sinon = 'sinon' ; +retourner = 'retour' ; +lire ='lire'; +ecrire = 'ecrire' ; +nombre = chiffre+; +vrai = 'vrai' ; +faux = 'faux' ; +id = alpha[alpha+chiffre]* ; + + + +Ignored Tokens + +espaces, commentaire; + +Productions + +prog = ldec ldf ; + +exp = + {or} exp ou and | {and} and ; + +and = + {et} and et equals | {equals} equals ; + +equals = + {egale} equals egale add | {inf} equals inf add | {add} add ; + +add = + {plus} add plus mult | {moins} add moins mult | {mult} mult ; + +mult = + {fois} mult fois neg | {diviser} mult diviser neg | {neg} neg ; + +neg = + {non} non neg | {e6} e6 ; + +e6 = + {parenthese} gparenthese exp dparenthese + | {nombre} nombre + | {vrai} vrai + | {faux} faux + | {lire} lire gparenthese dparenthese + |{var} var + | {appelfnc} id gparenthese le dparenthese; + +ins = + {affectation} var egale exp pointvirgule + |{tq} tantque exp faire bloc + |{si} si exp alors bloc + |{sisinon} si exp alors [alor]:bloc sinon [sino]:bloc + |{return} retourner exp pointvirgule + |{write} ecrire gparenthese exp dparenthese pointvirgule + |{appelfnc} id gparenthese le dparenthese pointvirgule ; + +bloc = {instr} accoladeg li accoladed; +li = {listeinstr} ins li | {epsilon} epsilon ; +epsilon = ; +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 = {type} bool | entier ; +decfonc = {declafonc} typeopt id gparenthese [firstldec]: ldec dparenthese [secondldec]: ldec bloc ; +typeopt= {typeopt} type | epsilon ; +ldec = {lstdeclacvar} decvar suitedec | epsilon ; +suitedec = {suitedeclvar} virgule decvar suitedec |epsilon ; +ldf = {lstdecfnc} decfonc ldf | epsilon ; diff --git a/out/production/2024-compilation-bazizi/lParser/lexer/lexer.dat b/out/production/2024-compilation-bazizi/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/out/production/2024-compilation-bazizi/lParser/parser/parser.dat b/out/production/2024-compilation-bazizi/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/out/production/2024-compilation-bazizi/nasm.cfg b/out/production/2024-compilation-bazizi/nasm.cfg new file mode 100644 index 0000000..cbc3812 --- /dev/null +++ b/out/production/2024-compilation-bazizi/nasm.cfg @@ -0,0 +1,210 @@ +Package nasmParser; + +Helpers + +letter = [['a' .. 'z'] + ['A' .. 'Z']]; +digit = ['0' .. '9']; +alpha = [letter + ['_' + '$']]; +alphanum = [letter + digit]; + +Tokens + +spaces = (' ' | 13 | 10 | 9)+; +comment= ';' [[0 .. 0xffff] - [10 + 13]]* (10 | 13 | 10 13); + +plus = '+'; +minus = '-'; +times = '*'; +brackopen = '['; +brackclose = ']'; +semicol = ':'; +comma = ','; +quote = '''; +dot = '.'; +percentage = '%'; +byte = 'byte'; +word = 'word'; +dword = 'dword'; +prefix_register = '@'; + +inc = 'include'; +section = 'section'; + +data = '.data'; +definebyte = 'db'; +defineword = 'dw'; +definedoubleword = 'dd'; +definequadword = 'dq'; +definetenbytes = 'dt'; + +bss = '.bss'; +reservebyte = 'resb'; +reserveword = 'resw'; +reservedoubleword = 'resd'; +reservequadword = 'resq'; +reservetenbytes = 'rest'; + +text = '.text'; + +global = 'global'; + +mov = 'mov'; +push = 'push'; +pop = 'pop'; +add = 'add'; +sub = 'sub'; +imul = 'imul'; +idiv = 'idiv'; +and = 'and'; +or = 'or'; +xor = 'xor'; +not = 'not'; +cmp = 'cmp'; +jmp = 'jmp'; +je = 'je'; +jne = 'jne'; +jg = 'jg'; +jge = 'jge'; +jl = 'jl'; +jle = 'jle'; +call = 'call'; +ret = 'ret'; +int = 'int 0x80'; + +eax = 'eax'; +ebx = 'ebx'; +ecx = 'ecx'; +edx = 'edx'; +ebp = 'ebp'; +esp = 'esp'; + +number = digit+; + +id = alpha alphanum*; + +Ignored Tokens + +spaces, comment; + +Productions + +prog = linclude secdata secbss sectext; + +linclude = {rec} include linclude + | {empty}; + +include = percentage inc [open]: quote filename [close]: quote ; + +filename = {simple} label + | {complex} [prefix]: label dot [suffix]: label + ; + +secdata = {nonempty} section data lconst + | {empty} + ; + +lconst = {rec} const lconst + | {empty} ; + +const = {db} label definebyte numconst + | {dw} label defineword numconst + | {dd} label definedoubleword numconst + | {dq} label definequadword numconst + | {dt} label definetenbytes numconst + ; + +secbss = {nonempty} section bss lvar + | {empty} + ; + +lvar = {rec} var lvar + | {empty} + ; + +var = {resb} label semicol reservebyte number + | {resw} label semicol reserveword number + | {resd} label semicol reservedoubleword number + | {resq} label semicol reservequadword number + | {rest} label semicol reservetenbytes number + ; + +sectext = section text lglobal linst; + +lglobal = {rec} global label lglobal + | {empty} + ; + +linst = {rec} inst linst | + {last} inst + ; + +inst = {mov} oplabel mov ar comma acr + | {push} oplabel push acr + | {pop} oplabel pop ar + | {add} oplabel add ar comma acr + | {sub} oplabel sub ar comma acr + | {imul} oplabel imul ar comma acr + | {idiv} oplabel idiv ar + | {and} oplabel and ar comma acr + | {or} oplabel or ar comma acr + | {xor} oplabel xor ar comma acr + | {not} oplabel not ar + | {cmp} oplabel cmp ar comma acr + | {jmp} oplabel jmp label + | {je} oplabel je label + | {jne} oplabel jne label + | {jg} oplabel jg label + | {jge} oplabel jge label + | {jl} oplabel jl label + | {call} oplabel call label + | {ret} oplabel ret + | {inter} oplabel int + ; + +acr = {address} address + | {numconst} numconst + | {register} register + ; + +ar = {address} address + | {register} register + ; + +address = opsizeof brackopen exp brackclose; + +opsizeof = {byte} byte + | {word} word + | {dword} dword + | {empty} + ; + +exp = {plus} exp plus exp1 + | {minus} exp minus exp1 + | {next} exp1 + ; + +exp1 = {times} exp1 times exp2 + | {next} exp2 + ; + +exp2 = {label} label + | {numconst} numconst + | {register} register + ; + +numconst = number; + +register = {temp} prefix_register number + | {eax} eax + | {ebx} ebx + | {ecx} ecx + | {edx} edx + | {ebp} ebp + | {esp} esp + ; + +oplabel = {label} label semicol + | {empty} + ; + +label = id; diff --git a/out/production/2024-compilation-bazizi/nasmParser/lexer/lexer.dat b/out/production/2024-compilation-bazizi/nasmParser/lexer/lexer.dat new file mode 100644 index 0000000000000000000000000000000000000000..d33ec07f563edccd204503643bdbba3a7ab795f8 GIT binary patch literal 5580 zcmZQzU|?imV3^3jz@Wvzz`zN`ATcfm1_lsjVqjq4g<@s~1_lKvW?^7pP=R7r1_lOI zC}v||U{Hr*cBr`^vpE<T7_^}nWRDI50|N+y?9gRkU;trm1_lN_DCS{cU@%}{V6cSR zZN<RA0K$9>3=Gy#%+J8U-~hz}3=9m83=9lW3=9k)_e3)=Fo3Wi0|P@W6bmshFvLSK zNKGOG0|N*PGcYhDL9qw}14A+ti!v}Uq(HG40|P@U6pJ%3Fr+~-$eeTr1_lt8U|?X# zfMSq%CIbTl2um_BFl0fo6axc8HUk4g4%D5w3=9k)EX}~ckO##w3=9nUP%O*9z)%3i zatsU%g-{GKzlec>0fgll7#ND77!*Gx3=9lqQ1i<f7#KiUk%57s0*aLw7#J!U7#OOc zYC!P~iW7zZ|NsAkrU_E`pmYI?D`lj30I@;g3$h2qX21bJ`eES@N>i{f2c;>HUqDz5 z>Moc)pfm|G4ipX`8suJ3x&x&r5Y}K|U;w2jP&xvMgVcktCIbTl9|Obx|IjoF(hI|& zv<osn>i_@$KcQ&@lomj4hq(!qmO<$N6lWlDSe${<HYm<ueg)+ZbhAL=57Gk)dk_Yt ze~@|*28o0Gg02S?exSSo3Lj9K0jUGo4Z@(j0<s^bALLhT`aya?`axJ9nzqsX1=0ud z7bvZP)Wg!5AvBGF(icb^6c-?D#K6E%3QcDqaZnlqVPj|-gSiQm??GlGhbhQUCeZu_ za+4{No6Mm34HVwy(EJ8U;~+agZUA8m1_lO@8(?-|3u{mw1L*;U83=>Q5m1=H^uXde z`Tzg_uaWEol`)`j0O<kg2k8M}P?-Y?YY?`9=1rJcp!A0BN09qL`ax!aur0K_0F@gc zaZq^y!gkQ|0^Pm#&~gD}H>ivQ*$cv;GLBF>1E~Yq0a6FTPSElL=3Y>K1GzWv|NsAw zp?(3Wb4F8#EnGqA0%SHQPC(cNTJFHihNWS2vt6NPgW?UOACz`L*bSP7VESQhOZor* z{}X8ZgTl`p8h$W!FniF|c|g^n+vADD9&~qlLEQ<n2j(7hb>3*|KxHT>Osk+}2Z#?! zt03$HExSPJ9)x|Ne2~9D*bmBQ0F_Js|Nnmv<%7yA5cY=_P%yWkr`Z5#IH9{4U0ooW zI&AR^axW-;K;Z|%LC}1TZg%$n|Noys>oHJX35KRum^y4`gVGqtY)}~k!XePQ45kMZ zX6Ru^3Lh3e=y4T_7FXEZ1}eKiZUdFkARLBNM}ov*=`H{N|Nj@D=7IbW4)p`N{s=Vv zFt?Te|Ns9Kw2TDV6G@~xP`d_HXTZV=W*)kGKy4mS9z|D&9wsqRKfu&s3lmUV2IO~8 z8wP|y?I=(?2A>{KngQtn<!um-L(6xtau>Ni0M!8?J)k-Xgh6dIQ2B|T78B6YB6@m( zg$a6@0LpWqau?=qT<SpXz@`p8j6rV17RKoIg8YDN9=0$Bg%QZ_p!OOFgUSO?T0(bg z@&Et-FG1@)P#A;E1?h#U!xa|jZU@yl$Zp5xCQ!K!auX>0K^T+{Kz73Hg6S#x|Ns9E zX!#FP2TCI#bs!8%C&=!Dg?ZBd|Njpm)%T!!4-`%?vtjBI|NsC00;!DvDq}$5j;^lo z|Ns9Fp=}h9yFv9O$Ss7_f$B(Pb)fJA@j)0=PJ#F!e}FJ3pM&_I{0hRL@B<aeATfO9 z6U;B@=>p_VQ2e305xq<Wxdr4Om^yU(VCJKT0m#iDy}0zDn?ord<_`2Y1I0hKI4k}C z|NkCnxd2M@AdD@|qlX7b4RUzE>_t}xiX&uopgt_9Uj)LSG8A8&Q5qJ6^uzKFa`^|! zlc4+t%4Z-9iZ@VR0?{CGP(KFbX7uo_M#@JZb)b9%!Zpx(9+YlD;-K^j!nM$R0!kYo zaZow|;W}u!3W^7iI4GP!xE@+h!Q6rFH(2<imrV^&^9bofZ=W<m-Hl5hEYE?;a}aKV zwv#}90O4jR9~4%|?J#6M%+2U_x1iY#Q->T+AUj*3WfCqo;tHdZ|Ns9VhK36$U$jBf zKe{;}x3&}E4|ID-<-`1!@&Et-BhYaQP@3z2j#Hq!3l^TBH~?XE`(Wmw=fzI6b|Fk1 zdiZytg+IuAP(B9XZUzPhm_GD&Ob=Q+2BZ%ZhA{WS^r4r*z0iIFvOhunN)Ya2U|_(O zPeEl0D1U(J4iN5#_MMQ;K(-s^7LeEkEO818$BF;{gU2I4d}IvjGlKFyXlw)I9#A<3 z>Q96G1nP5w`l0Mly`Zr$P#YE0z5?l^2!qT-#!$C|{DaM0(D)f>tPC_p1{xa!jiF&v zhb{&h*8q)2fW{cm<v`;%=wfg_7Po=o1vJhBQv({00kJ{j37|ebXe<E~x1ezVP+uM- zhmJw<1RB=>jmv<>RzURyXuJnBUItSO8n*zkLE}^)8Z@3H0do%n0|RIb1~di&k^^DT zxD{v|%NC@Dfq?-u4hI?!1daEB#`!?wd!R8vkXle*4>U#z8s`IzbArTR`ao>ZI3F@! L0BR;^jMEeViv>_9 literal 0 HcmV?d00001 diff --git a/out/production/2024-compilation-bazizi/nasmParser/parser/parser.dat b/out/production/2024-compilation-bazizi/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/out/production/2024-compilation-bazizi/sa.cfg b/out/production/2024-compilation-bazizi/sa.cfg new file mode 100644 index 0000000..60ff9b8 --- /dev/null +++ b/out/production/2024-compilation-bazizi/sa.cfg @@ -0,0 +1,127 @@ +Package saParser; + +Helpers + +lettre = [['a' .. 'z'] + ['A' .. 'Z']]; +chiffre = ['0' .. '9']; +alpha = [lettre + ['_' + '$']]; +alphanum = [lettre + chiffre]; + +Tokens + +espaces = (' ' | 13 | 10 | 9)+; +commentaire= '#' [[0 .. 0xffff] - [10 + 13]]* (10 | 13 | 10 13); + + +po = '('; +pf = ')'; +saappel = 'SaAppel'; +sadecfonc = 'SaDecFonc'; +sadectab = 'SaDecTab'; +sadecvar = 'SaDecVar'; +sadecvarsimple = 'SaDecVarSimple'; +saexpadd = 'SaExpAdd'; +saexpand = 'SaExpAnd'; +saexpappel = 'SaExpAppel'; +saexpdiv = 'SaExpDiv'; +saexpequal = 'SaExpEqual'; +saexpfaux = 'SaExpFaux'; +saexpinf = 'SaExpInf'; +saexpint = 'SaExpInt'; +saexplire = 'SaExpLire'; +saexpmult = 'SaExpMult'; +saexpnot = 'SaExpNot'; +saexpor = 'SaExpOr'; +saexpsub = 'SaExpSub'; +saexpvar = 'SaExpVar'; +saexpvrai = 'SaExpVrai'; +sainstaffect = 'SaInstAffect'; +sainstbloc = 'SaInstBloc'; +sainstecriture = 'SaInstEcriture'; +sainstretour = 'SaInstRetour'; +sainstsi = 'SaInstSi'; +sainsttantque = 'SaInstTantQue'; +saldecfonc = 'SaLDecFonc'; +saldecvar = 'SaLDecVar'; +salexp = 'SaLExp'; +salinst = 'SaLInst'; +saprog = 'SaProg'; +savarindicee = 'SaVarIndicee'; +savarsimple = 'SaVarSimple'; +faux = 'faux'; +vrai = 'vrai'; +lire = 'lire'; +null = 'null'; +entier = 'entier'; +bool = 'bool'; +nul = 'nul'; +integer = chiffre+; +id = alpha alphanum*; + +Ignored Tokens + +espaces, commentaire; + +Productions + +prog = po saprog ldecvar ldecfonc pf; + + +exp = {add} po saexpadd [op1]:exp [op2]:exp pf + | {and} po saexpand [op1]:exp [op2]:exp pf + | {div} po saexpdiv [op1]:exp [op2]:exp pf + | {equal} po saexpequal [op1]:exp [op2]:exp pf + | {inf} po saexpinf [op1]:exp [op2]:exp pf + | {mult} po saexpmult [op1]:exp [op2]:exp pf + | {or} po saexpor [op1]:exp [op2]:exp pf + | {sub} po saexpsub [op1]:exp [op2]:exp pf + | {not} po saexpnot exp pf + | {appel} po saexpappel appel pf + | {var} po saexpvar var pf + | {faux} faux + | {vrai} vrai + | {int} integer + | {lire} lire + ; + +inst = {affect} po sainstaffect var exp pf + | {bloc} po sainstbloc linst pf + | {ecriture} po sainstecriture exp pf + | {retour} po sainstretour exp pf + | {si} po sainstsi exp [alors]:inst [sinon]:inst pf + | {si2} po sainstsi exp [alors]:inst null pf + | {tantque} po sainsttantque exp inst pf + | {appel} appel + ; + +ldecfonc = {rec} po saldecfonc decfonc ldecfonc pf + | {fin} null + ; + +ldecvar = {rec} po saldecvar decvar ldecvar pf + | {fin} null + ; + +lexp = {rec} po salexp exp lexp pf + | {fin} null + ; + +linst = {rec} po salinst inst linst pf + | {fin} null + ; + +decfonc = po sadecfonc id type [param]:ldecvar [variables]:ldecvar inst pf; + +decvar = {tab} po sadectab id type integer pf + | {simple} po sadecvarsimple id type pf + ; + +var = {indicee} po savarindicee id exp pf + | {simple} po savarsimple id pf; + +appel = po saappel id lexp pf; + +type = {entier} entier + | {bool} bool + | {null} nul + ; \ No newline at end of file diff --git a/out/production/2024-compilation-bazizi/saParser/lexer/lexer.dat b/out/production/2024-compilation-bazizi/saParser/lexer/lexer.dat new file mode 100644 index 0000000000000000000000000000000000000000..a1bd028415b0ad63a549525ba6dc4d3836c69934 GIT binary patch literal 8476 zcmZQzU|?imU^u|Qz#z%Mz`zN`ATcfm1_lsjVqjq4g<@s~1_lKvW?^7pP=;bw1_lNd zC}v||V9<bKb_NCpO(^DIU|=v{U|_I>+TqB+z!1d1zyMMo%)r0^!XW!X7#J9$pyKfi z3=AL)Qj^HQzyQJ^b`k>v0|;|7Ffb%DFfgP*)u%ErFn}-*0|P@E6ocHJ&cMKs4ONrF zz`y{)d<+Z>xljx;Gmn9R0fhM(7#Q*y7#K>S>dP1y7(iHnfq|i%fq|h4Dh>)GP<Sc) z|Ns9VG#p9cgTjmf8Ww`kum<^Gh=G9t<S&pPK;j_xgRn3I0|Ore!~g#b3=AM~P+Y*m zQ-pzm0TiB~a09VH;RJFghz+s>ghB3wsRy|era$Wc|NlRrVGGhH3JqJBeo#Dv^dYMQ zg%ikZP&k3G7y|=C0W@qt;@I?n!Wtw8(hI`k&~S#?gUdY<M7Sq|fq?;Jb|wP@0|<lC zauxyiltA@>;u(acpz#cI4>ms(LiH3eFff3yGy?-eF_Jx?FlGS7(f|Mde?rp)DDFU5 z1{4WUF;I9`LBk!C-avd%z5w|F6ptV*%fP_k#K6Gd47JmRfq?;p<ro+kT%lN=fq}t| zfq}sTs>YLnfdPa;dDM%6fx#Op?!&;q0K$q43=F;u3=IBI@c;$}1`t+aU|<MjU|<M^ ziia^UFn};9e}_Z!Bgk!_^Z^SWSbXLE|Ns9pG%i7D0aOkUN(-Pc1DOYk0}xh)<~MY+ zOaA}={~js_iX%0&ID)yM@c;k+@1Su4iWhaXc)=Ezpz;9Z22fc5!k{t>lt$6rfSm3@ z{s)z3pt1+14iv4}%m;-9$b3*(fUp(=0|O}i!1Q6$11iTrdO&3u2x~*jFnoGIWfDkF z1p@;E2<tE~FjOL?Nmv-={{R2~6SRy2<v(3$oWaaSE}uc>fzlv)+S7xkJ5c)5$C36x zX&IFEu$4tHx1h(DAzFOF)S-vH5n5RQQ<we!|Nke@avc<x#?W#d<~NwSjQ{`te}I+| zpmM^5fq?<JoPen-|NsC0eQ0=s!qgN;n5O*y|NjBB&H=@j8Crb7%tLpdIg#$Oz~R39 z|Ns9#gqFFWv;`_V2&FAhngzuxsJ;YYD`>rm9!BV9TN9CPL3s{jHYi_%unhwP11Mjk zn~fe`wm8BIJ^bx(gg<(kwnt0Tu<%DOqa2`NhweV~bP37>ApgMBfy#GK`i7O=F!Ry< z1uC~e?GIe~(9I#l$7K&Fe<It1Ef0h8DkyG1^#llm>JWEmdkZ8EYHxusNFAvB2Vsyn zsQd?EkRDJS0P^!o1_lOD`vepQpfm?k2MQw)2AK)+H^@yOagaSA462(zW`i)OZUUJH z!k{t&qz5DqQV)^?VNjg~k^|8oaZtSl!=SnghW!{A7+@GwpTRJwJ_EHYL3%-LN)QH# zf&7T>H&C62>^E3A7ytkN|2Z@bgVHg`JW%}ui%*!kr2qf_Uxv0pL3s*f7pM$JSBIXb zKyE?KuQ2n9{{R1f5n2|4(jCaXAp2qFVXHGh@elGVsErH4pg04yhhTa@ZE*DXLJxCL z7=XeY<WG=UAb)^x1Oo#D$gQN5<&jYL!|aFo4ZREmnTf5wMbE3zIPxlb-4KJLZa`NT zi>3~iXOPu_;t~`NptuC#IA|FUaxX|6RDXgnsBZ$Q=Rp`G4l0X5I03E9goOcm{R3)G zAlE<G;umBd$ZSx00bx)%4k~Za!x!28Aag-}0I5Y+hhAoa{0DMBx;k{Xg6cP9x5E5{ z-bMqZM^JwW-8}So1*KJx-_X^em%*U449W}W>d@^4)#u3eg8EmWbdMe`AU}Y@1r(N` za0P`W2!q;#$o7ExU?BbI<s7Je0V?M}7?d7B<sGP;1DORX<3JdcHb7+@sC)s5gYp#! zgTfh<uRs{&cTnB}VUSxuc^#A|K<Yv92lFq?AFluZ|33n4bAikTxfxV`g7ks(fbu;E zgZu!>&#>|uy>5ZU8+sWBDrb<(I9&SB(+@}w$X_t`!puicKcKh)g*{9iy7}mQm^tY7 zf!e#s_F>C2pzs5Q2`HXH7}SOX<p-GEFtgFq8mQe23O{sp$^ZZV-wtgrf$|GT9+V$I zG{_#9dFbk@q2&g;I`sOW2Ccln<|j}%gX{u@BM8?bjYojQVQxUr7j-!LOz7(B(bR#) zL_p~uIsbtC46+N9$3eJ(fq?;(k3nGu5(lLr5N?F_+0gxs9^Oqv))mb-+RNx^xCPB# zTxlxt|NsAsp!EPKeY8UBa6;~F!{J`!Fao8$cBt9t=B57s|9=*=%?k>@4rutHt3$6V zJ8}3Qz5USzO{3`Mp|?-Fp>9A|hn{D9aP&XW{o9MfzvyLtACYx=Kbm>C;t@T+O+d?U z*zysm{05~}P}vQ_6QO-#^sqn=+ev6)i|!_vUC8wXsLTi11uE}Bcrvs-1uC2OVi^lU zHxrhp(c^ClTKwVChaOK;(ZUsGK6-y^8d`q~-F$RD%p7!gPDgVmOdWc@ok1YqqT7eg zhnb6>erMuHzv%f8lqW&u7<w8&PrtKqq+j%MZ4Qod0^Q$p3HTf4FZ4Qa9*%x4y1Mx| z)S<g~0S@<~hvz~Z;fY?Kfy!1;n+6u1#KzZR9Ok2!hf8pjhv@2-qNzi72dR8me4wZE zWjN9~dKt1Dtqg&ghaS!=aD)STdR&PkJ))<xRcPr9W-q$?R-?HOJ$!KKTZ5(#rVc$m z)}qA+OkK|Z|NlXCA*ehC;dN+bGP*m^`7m?P{j(m;UAXk2ht~!i;f3C2+KAR>g0<C= z>j2Q$1E>xF^#wq96Lj7STU#HO`_R+dW*q4aUELNO>d^D+R<!mfEIiS}WgC&<0%|LR z+NiMn4>J$F+}VMn+(8fLooL|<GY{RryU_fLD?HKD<!-ceiAx{4`}d%^AD2FKcY^AE zQ2P%SKE&$Vhvq+A;jkY~9lH6%@DKd|51wlT&2PXlR17qC0GbyD*$<j;0P(S6sCtln zAdFQF0|Nt0oESAQwICWaKLVnO!JzpUkUG#@6KH-2G~WZ7PXdY23xnq6Kz4!V+dwo3 zgXWV!ZATEBR17LtNYMkD|3g*}>f?dN2SM|}pt)y|9BAGdM1wGBZW1)_4Pt{ZXbu`Q zKMb1h1@X}_XpR$I48#YOiy#_?L38h*Ic(5aGH4zcCXP;n<~NbWKw~nXxm1uCXpR>| n!!T%G6voCygXShda-cb75Dl8Y1<{~+P7n>kpm|r&n4lB@w7}(l literal 0 HcmV?d00001 diff --git a/out/production/2024-compilation-bazizi/saParser/parser/parser.dat b/out/production/2024-compilation-bazizi/saParser/parser/parser.dat new file mode 100644 index 0000000000000000000000000000000000000000..ab0f40aba3c0985f37bdb0b822ad9f1dfab43c82 GIT binary patch literal 7678 zcmZQzVCZCEU|{<H|Nnmm1_ovZRKSQP2jVM0m4MVD>tkYIV9-HUk7OoDEmRu=3j+g# z8kEC|te$}ZEGG+<V`pGsV1$|hvR4}9J}4h#9vf60h~hvplM~HMkU1bVAk2*>2ht}4 zl3-w9;6<}f5=|`^NFJ(|56vwgb3y(BN%J!>Fu>d<fToTIqyUOR>T!hw$SqK13_>7# zq5cMi14tY>+(Gtfg9I5E7(~$A46+|4CyFK~2r?I{PYg{CWG5($LDJ%Aeh>x;LNO@( zV159FI}6mEAiW^Bs6*9(!cqgumSSLF(1fx<af+-5<VIrjAg2qEdC1`baxcu!a%ldN zK=QLZhz)fwC|p7QKsFcT4rD&a{mAx!(v23>AD}#eEC))%ATvSIilB52wFeX~AUA=` z2Fc+I7i7CZ?nX8rWFO3YWi)>%p~V-753&n{(bF8V9UylyBe_!rqydW2^&z`O6{-eA zfx?gj$qW!5R4#zzKyeOAXCO8x+(7XJVuRue<UbG_RDOWM1jN>5U|;~nEr_khz`y`X zD<HN$TAYHy5*8K)Xkh`e1KF)0H-PK|nPZ4%4#-U)aS%2_3qzP5kemrpSz`*y>q!0u zxgVqkgv}Wk7(j6YVp}jUFu=mol7WE%7G_oq3=A-Pt<lT^`5&Yggef%(6n-FcK$udq zK;aKE2ZYHn3pve!(lK(H1H}o*To86Z3TH>O_yENZD7}KzIWsUYz|y!2S{NFG6hJXK zZbeQzpm+zB86e}_(9#)599gXyNFJn+fq}uDfq{VsDUE>K0jrZd7#J8pWhh9gCj$cm zs0;<My%-o6K=loX?ajcz0IFX=Y#(Sn1!DU$Fff41cM#i;fq?;3o`cx_3=H5p1H=ws zU|@ii*MZRb0VEy-av#)9pu7XBmyqKHRR19JL3Io=A5{M#`_~3!9>`z@28Lj?d}WIy z7lI~d2h{_jz-0y0O`vkp9wZ3G=yIU60V+p9(%~TUq54360hPVTZgT?3gA_6_Fhro) z4@x_*yd8-q2TDsYxhOO_S0po|(d0mB18N<(or4^1pg3ZKx)tO{Q2fKxg3<*g<pn7H zP+}Hxn1RwC%&d5{JOxURFgZ%y3`)<`G7FR+sAU!?KT*ppP=2JAS)lw(Ewe!70VQT3 zrx#Fp0y7I#HY2BbP+Jn24=Rt4%luH7Mre5t%IhGZOtgFzhLq>B(b6QS3;^i?VRF(W zvim@FGjbjUl?xzqL6{t~k;4g8j)2N2kXd;k|3J$EkQk^eM-G=5kRm7s)jhCqL2q-! zLe+pMa@>dP*Eo<NP)v?l$bJQt8^~=xWVr;8-=X#tp~Yn)R2)Q+;|65^B!LWpVoJ?Q zhMEJSC^ahuWC#?KV-|8)rXq!9Ia*kzLG1uh<k*88mgyivpqL!9klmbt<mM{0d=AR@ zp!@)`sv1o$3rSxMh>etgKz$43{F4JR0E$8F1z7$8wIz|=k_$2is;&;iMluuBW=B?= z50Zzftw(cP0g_w;np`20TqB5$WCy67hipeNNFHiO6Ph_CNOH|+a-~ReEogFONOG+p zHj@3IHYc+E6(D)2{cULGR3gc>gV;#sfZC|Y<tV5xkIV;+2O!&13(^m@rvt=BG7HoW zLe>jv>ml<&=>wS$Drb=Sptcn<AJl(E=7YwakolnT8e~4GeU8irwb7CJpuRtHn;B%k z1l0YYwlJvg25R?$`dy$lE~w80YR`iDBcQe;sNDxDw?S<-P?-yAQ-R7oP<seeW`Wu= zpz;RP4gr-Fpf&_3pM&auP@V?W-Jtvks`o(Y98^bv(lN+PP&x#e2}*MyGePMIWF{!> zfXoD?6OfspGyyUT6yG4TKyk|o^#iC+4RSZAZU(s<RQH0~wV*l)BnHZdu($-JUr?P6 z>chjvazNn;3Lj8=7t}Wc<s%RV)vYjnpmsUP?Vxl369e^|Kz4xh8PqKxvteNmG83j2 z6qcZN2dFH8iGjvwKy6o0{Q@fsKyd|1i=ci1C>?>^0~#0LV@PGFU?^ZnWk_ZyVaR02 zV@PMPVo+dEXV72(`Ck~Pd@w^ILjXe&Lq0<~SS2o#Tp9csK%pjv(<G2hI$%5V7)lv( z7;?bo;Z_f_*@wXe?B+0rM1~@;dTAoe*JMy<z_dvmr%q&>+!*p1@)(lAcH#1?Is?cC z1_pJ!CPG{u!jQ<21a}X}CWtu1N5Kr447m&i3^@#`U>kXHn3%}`O2zoY3Sus@`;~B* z26A^EI31*dLlqKMNeuZ6`QTWA@FB4TN*yXV&C!7S3=|^B`arP@;)Bv!2}3GFIs?cq zP;VW3N<>#zh|^9`7&<Z(fKxNf7Ig-Ys3$`nLoq`MgCj#4LmD{Ul)&AGEbqjS!;lY- zV~`6`^|~@7GZZmoGL$fsG8BPh1yfBBLn=cFLq1pqETtiv4~kW6;-Itu3im*UQn1Mk z4Ei{Ii3r&=hD3%^h6=b(${30m5*ae#{2Yc%B$uLxqXteJKrV))LQuG+Fk~_$Go*su zh43*%9^@b7R4RhkOdkf2d7yXzrJad*)w+U9B}ax7h7`DeK<<Kx=iv~?7W)uAE)1Cr zWmwE|Whi7QWk^Iy-w1m^?oGp@#}`~qp{5~-Eq)C74A{i|k@6G5{9uMsv@!r<3M6zv zp=5(Ilo06vk;6z!5$X((oD9n==qUt$+3&*uaVyA`_~RWpPckr=(9lQdJ^;<?ff`q! zmJ+CS0%{R~T0x+e4~Pwt1J%-?mJSGmS~xIqka|$75QIT;pc)<|2WsJgFvtv;9H>Ty zVbG`{NIggmhz4PhK4c8C7c_bZl7pE85(B9LjWQx*kQfMqdd47eP-_CD4}?LZ3ZRw& zG6so*FvvU*2DLard=Lh?7lc7<kQ~TvkeMJ1;)7^h7$gr;55ge#fXo1?1@S>Nh!0|e z<Uo872DLaq;vhCMMiv9HVHl<##0T|cKr{@4{0L*iXk;-E8>AnELGm#DAaQ({9RT%8 B>-hix literal 0 HcmV?d00001 diff --git a/src/c3aParser/analysis/Analysis.java b/src/c3aParser/analysis/Analysis.java new file mode 100644 index 0000000..1975438 --- /dev/null +++ b/src/c3aParser/analysis/Analysis.java @@ -0,0 +1,100 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.analysis; + +import c3aParser.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 caseARecursifListeinst(ARecursifListeinst node); + void caseAFinalListeinst(AFinalListeinst node); + void caseAAddInst(AAddInst node); + void caseASubInst(ASubInst node); + void caseAMulInst(AMulInst node); + void caseADivInst(ADivInst node); + void caseAAffInst(AAffInst node); + void caseAJmpInst(AJmpInst node); + void caseAJmpegInst(AJmpegInst node); + void caseAJmpnegInst(AJmpnegInst node); + void caseAJmpinfInst(AJmpinfInst node); + void caseAJminfegInst(AJminfegInst node); + void caseAJmpsupInst(AJmpsupInst node); + void caseAJmpsupegInst(AJmpsupegInst node); + void caseAFcallInst(AFcallInst node); + void caseAIwriteInst(AIwriteInst node); + void caseAIreadInst(AIreadInst node); + void caseAArgInst(AArgInst node); + void caseAReturnInst(AReturnInst node); + void caseABeginInst(ABeginInst node); + void caseAEndInst(AEndInst node); + void caseAStopInst(AStopInst node); + void caseAAdd(AAdd node); + void caseASub(ASub node); + void caseAMul(AMul node); + void caseADiv(ADiv node); + void caseAAffect(AAffect node); + void caseAJmpeg(AJmpeg node); + void caseAJmpneg(AJmpneg node); + void caseAJmpinf(AJmpinf node); + void caseAJmpinfeg(AJmpinfeg node); + void caseAJmpsup(AJmpsup node); + void caseAJmpsupeg(AJmpsupeg node); + void caseAJmp(AJmp node); + void caseABegin(ABegin node); + void caseAEnd(AEnd node); + void caseAFcall(AFcall node); + void caseAIwrite(AIwrite node); + void caseAIread(AIread node); + void caseAArg(AArg node); + void caseAReturn(AReturn node); + void caseAIstop(AIstop node); + void caseACCtv(ACCtv node); + void caseATCtv(ATCtv node); + void caseAVCtv(AVCtv node); + void caseATTv(ATTv node); + void caseAVTv(AVTv node); + void caseAConstante(AConstante node); + void caseATemporaire(ATemporaire node); + void caseAScalaireVariable(AScalaireVariable node); + void caseATabVariable(ATabVariable node); + void caseACteEtiqop(ACteEtiqop node); + void caseAVideEtiqop(AVideEtiqop node); + + void caseTEspaces(TEspaces node); + void caseTCommentaire(TCommentaire node); + void caseTCo(TCo node); + void caseTCf(TCf node); + void caseTCall(TCall node); + void caseTStop(TStop node); + void caseTFbegin(TFbegin node); + void caseTFend(TFend node); + void caseTAff(TAff node); + void caseTNoteq(TNoteq node); + void caseTInf(TInf node); + void caseTInfeq(TInfeq node); + void caseTSup(TSup node); + void caseTSupeq(TSupeq node); + void caseTEq(TEq node); + void caseTGoto(TGoto node); + void caseTParam(TParam node); + void caseTRet(TRet node); + void caseTIf(TIf node); + void caseTMoins(TMoins node); + void caseTPlus(TPlus node); + void caseTFois(TFois node); + void caseTDivise(TDivise node); + void caseTWrite(TWrite node); + void caseTRead(TRead node); + void caseTNombre(TNombre node); + void caseTPrefixeTemp(TPrefixeTemp node); + void caseTIdentif(TIdentif node); + void caseEOF(EOF node); + void caseInvalidToken(InvalidToken node); +} diff --git a/src/c3aParser/analysis/AnalysisAdapter.java b/src/c3aParser/analysis/AnalysisAdapter.java new file mode 100644 index 0000000..b0b68a0 --- /dev/null +++ b/src/c3aParser/analysis/AnalysisAdapter.java @@ -0,0 +1,585 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.analysis; + +import java.util.*; +import c3aParser.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 caseARecursifListeinst(ARecursifListeinst node) + { + defaultCase(node); + } + + @Override + public void caseAFinalListeinst(AFinalListeinst node) + { + defaultCase(node); + } + + @Override + public void caseAAddInst(AAddInst node) + { + defaultCase(node); + } + + @Override + public void caseASubInst(ASubInst node) + { + defaultCase(node); + } + + @Override + public void caseAMulInst(AMulInst node) + { + defaultCase(node); + } + + @Override + public void caseADivInst(ADivInst node) + { + defaultCase(node); + } + + @Override + public void caseAAffInst(AAffInst node) + { + defaultCase(node); + } + + @Override + public void caseAJmpInst(AJmpInst node) + { + defaultCase(node); + } + + @Override + public void caseAJmpegInst(AJmpegInst node) + { + defaultCase(node); + } + + @Override + public void caseAJmpnegInst(AJmpnegInst node) + { + defaultCase(node); + } + + @Override + public void caseAJmpinfInst(AJmpinfInst node) + { + defaultCase(node); + } + + @Override + public void caseAJminfegInst(AJminfegInst node) + { + defaultCase(node); + } + + @Override + public void caseAJmpsupInst(AJmpsupInst node) + { + defaultCase(node); + } + + @Override + public void caseAJmpsupegInst(AJmpsupegInst node) + { + defaultCase(node); + } + + @Override + public void caseAFcallInst(AFcallInst node) + { + defaultCase(node); + } + + @Override + public void caseAIwriteInst(AIwriteInst node) + { + defaultCase(node); + } + + @Override + public void caseAIreadInst(AIreadInst node) + { + defaultCase(node); + } + + @Override + public void caseAArgInst(AArgInst node) + { + defaultCase(node); + } + + @Override + public void caseAReturnInst(AReturnInst node) + { + defaultCase(node); + } + + @Override + public void caseABeginInst(ABeginInst node) + { + defaultCase(node); + } + + @Override + public void caseAEndInst(AEndInst node) + { + defaultCase(node); + } + + @Override + public void caseAStopInst(AStopInst node) + { + defaultCase(node); + } + + @Override + public void caseAAdd(AAdd node) + { + defaultCase(node); + } + + @Override + public void caseASub(ASub node) + { + defaultCase(node); + } + + @Override + public void caseAMul(AMul node) + { + defaultCase(node); + } + + @Override + public void caseADiv(ADiv node) + { + defaultCase(node); + } + + @Override + public void caseAAffect(AAffect node) + { + defaultCase(node); + } + + @Override + public void caseAJmpeg(AJmpeg node) + { + defaultCase(node); + } + + @Override + public void caseAJmpneg(AJmpneg node) + { + defaultCase(node); + } + + @Override + public void caseAJmpinf(AJmpinf node) + { + defaultCase(node); + } + + @Override + public void caseAJmpinfeg(AJmpinfeg node) + { + defaultCase(node); + } + + @Override + public void caseAJmpsup(AJmpsup node) + { + defaultCase(node); + } + + @Override + public void caseAJmpsupeg(AJmpsupeg node) + { + defaultCase(node); + } + + @Override + public void caseAJmp(AJmp node) + { + defaultCase(node); + } + + @Override + public void caseABegin(ABegin node) + { + defaultCase(node); + } + + @Override + public void caseAEnd(AEnd node) + { + defaultCase(node); + } + + @Override + public void caseAFcall(AFcall node) + { + defaultCase(node); + } + + @Override + public void caseAIwrite(AIwrite node) + { + defaultCase(node); + } + + @Override + public void caseAIread(AIread node) + { + defaultCase(node); + } + + @Override + public void caseAArg(AArg node) + { + defaultCase(node); + } + + @Override + public void caseAReturn(AReturn node) + { + defaultCase(node); + } + + @Override + public void caseAIstop(AIstop node) + { + defaultCase(node); + } + + @Override + public void caseACCtv(ACCtv node) + { + defaultCase(node); + } + + @Override + public void caseATCtv(ATCtv node) + { + defaultCase(node); + } + + @Override + public void caseAVCtv(AVCtv node) + { + defaultCase(node); + } + + @Override + public void caseATTv(ATTv node) + { + defaultCase(node); + } + + @Override + public void caseAVTv(AVTv node) + { + defaultCase(node); + } + + @Override + public void caseAConstante(AConstante node) + { + defaultCase(node); + } + + @Override + public void caseATemporaire(ATemporaire node) + { + defaultCase(node); + } + + @Override + public void caseAScalaireVariable(AScalaireVariable node) + { + defaultCase(node); + } + + @Override + public void caseATabVariable(ATabVariable node) + { + defaultCase(node); + } + + @Override + public void caseACteEtiqop(ACteEtiqop node) + { + defaultCase(node); + } + + @Override + public void caseAVideEtiqop(AVideEtiqop node) + { + defaultCase(node); + } + + @Override + public void caseTEspaces(TEspaces node) + { + defaultCase(node); + } + + @Override + public void caseTCommentaire(TCommentaire node) + { + defaultCase(node); + } + + @Override + public void caseTCo(TCo node) + { + defaultCase(node); + } + + @Override + public void caseTCf(TCf node) + { + defaultCase(node); + } + + @Override + public void caseTCall(TCall node) + { + defaultCase(node); + } + + @Override + public void caseTStop(TStop node) + { + defaultCase(node); + } + + @Override + public void caseTFbegin(TFbegin node) + { + defaultCase(node); + } + + @Override + public void caseTFend(TFend node) + { + defaultCase(node); + } + + @Override + public void caseTAff(TAff node) + { + defaultCase(node); + } + + @Override + public void caseTNoteq(TNoteq node) + { + defaultCase(node); + } + + @Override + public void caseTInf(TInf node) + { + defaultCase(node); + } + + @Override + public void caseTInfeq(TInfeq node) + { + defaultCase(node); + } + + @Override + public void caseTSup(TSup node) + { + defaultCase(node); + } + + @Override + public void caseTSupeq(TSupeq node) + { + defaultCase(node); + } + + @Override + public void caseTEq(TEq node) + { + defaultCase(node); + } + + @Override + public void caseTGoto(TGoto node) + { + defaultCase(node); + } + + @Override + public void caseTParam(TParam node) + { + defaultCase(node); + } + + @Override + public void caseTRet(TRet node) + { + defaultCase(node); + } + + @Override + public void caseTIf(TIf node) + { + defaultCase(node); + } + + @Override + public void caseTMoins(TMoins node) + { + defaultCase(node); + } + + @Override + public void caseTPlus(TPlus node) + { + defaultCase(node); + } + + @Override + public void caseTFois(TFois node) + { + defaultCase(node); + } + + @Override + public void caseTDivise(TDivise node) + { + defaultCase(node); + } + + @Override + public void caseTWrite(TWrite node) + { + defaultCase(node); + } + + @Override + public void caseTRead(TRead node) + { + defaultCase(node); + } + + @Override + public void caseTNombre(TNombre node) + { + defaultCase(node); + } + + @Override + public void caseTPrefixeTemp(TPrefixeTemp node) + { + defaultCase(node); + } + + @Override + public void caseTIdentif(TIdentif 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/c3aParser/analysis/DepthFirstAdapter.java b/src/c3aParser/analysis/DepthFirstAdapter.java new file mode 100644 index 0000000..b3fdde8 --- /dev/null +++ b/src/c3aParser/analysis/DepthFirstAdapter.java @@ -0,0 +1,1500 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.analysis; + +import java.util.*; +import c3aParser.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.getListeinst() != null) + { + node.getListeinst().apply(this); + } + outAProg(node); + } + + public void inARecursifListeinst(ARecursifListeinst node) + { + defaultIn(node); + } + + public void outARecursifListeinst(ARecursifListeinst node) + { + defaultOut(node); + } + + @Override + public void caseARecursifListeinst(ARecursifListeinst node) + { + inARecursifListeinst(node); + if(node.getInst() != null) + { + node.getInst().apply(this); + } + if(node.getListeinst() != null) + { + node.getListeinst().apply(this); + } + outARecursifListeinst(node); + } + + public void inAFinalListeinst(AFinalListeinst node) + { + defaultIn(node); + } + + public void outAFinalListeinst(AFinalListeinst node) + { + defaultOut(node); + } + + @Override + public void caseAFinalListeinst(AFinalListeinst node) + { + inAFinalListeinst(node); + if(node.getInst() != null) + { + node.getInst().apply(this); + } + outAFinalListeinst(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.getAdd() != null) + { + node.getAdd().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.getSub() != null) + { + node.getSub().apply(this); + } + outASubInst(node); + } + + public void inAMulInst(AMulInst node) + { + defaultIn(node); + } + + public void outAMulInst(AMulInst node) + { + defaultOut(node); + } + + @Override + public void caseAMulInst(AMulInst node) + { + inAMulInst(node); + if(node.getMul() != null) + { + node.getMul().apply(this); + } + outAMulInst(node); + } + + public void inADivInst(ADivInst node) + { + defaultIn(node); + } + + public void outADivInst(ADivInst node) + { + defaultOut(node); + } + + @Override + public void caseADivInst(ADivInst node) + { + inADivInst(node); + if(node.getDiv() != null) + { + node.getDiv().apply(this); + } + outADivInst(node); + } + + public void inAAffInst(AAffInst node) + { + defaultIn(node); + } + + public void outAAffInst(AAffInst node) + { + defaultOut(node); + } + + @Override + public void caseAAffInst(AAffInst node) + { + inAAffInst(node); + if(node.getAffect() != null) + { + node.getAffect().apply(this); + } + outAAffInst(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.getJmp() != null) + { + node.getJmp().apply(this); + } + outAJmpInst(node); + } + + public void inAJmpegInst(AJmpegInst node) + { + defaultIn(node); + } + + public void outAJmpegInst(AJmpegInst node) + { + defaultOut(node); + } + + @Override + public void caseAJmpegInst(AJmpegInst node) + { + inAJmpegInst(node); + if(node.getJmpeg() != null) + { + node.getJmpeg().apply(this); + } + outAJmpegInst(node); + } + + public void inAJmpnegInst(AJmpnegInst node) + { + defaultIn(node); + } + + public void outAJmpnegInst(AJmpnegInst node) + { + defaultOut(node); + } + + @Override + public void caseAJmpnegInst(AJmpnegInst node) + { + inAJmpnegInst(node); + if(node.getJmpneg() != null) + { + node.getJmpneg().apply(this); + } + outAJmpnegInst(node); + } + + public void inAJmpinfInst(AJmpinfInst node) + { + defaultIn(node); + } + + public void outAJmpinfInst(AJmpinfInst node) + { + defaultOut(node); + } + + @Override + public void caseAJmpinfInst(AJmpinfInst node) + { + inAJmpinfInst(node); + if(node.getJmpinf() != null) + { + node.getJmpinf().apply(this); + } + outAJmpinfInst(node); + } + + public void inAJminfegInst(AJminfegInst node) + { + defaultIn(node); + } + + public void outAJminfegInst(AJminfegInst node) + { + defaultOut(node); + } + + @Override + public void caseAJminfegInst(AJminfegInst node) + { + inAJminfegInst(node); + if(node.getJmpinfeg() != null) + { + node.getJmpinfeg().apply(this); + } + outAJminfegInst(node); + } + + public void inAJmpsupInst(AJmpsupInst node) + { + defaultIn(node); + } + + public void outAJmpsupInst(AJmpsupInst node) + { + defaultOut(node); + } + + @Override + public void caseAJmpsupInst(AJmpsupInst node) + { + inAJmpsupInst(node); + if(node.getJmpsup() != null) + { + node.getJmpsup().apply(this); + } + outAJmpsupInst(node); + } + + public void inAJmpsupegInst(AJmpsupegInst node) + { + defaultIn(node); + } + + public void outAJmpsupegInst(AJmpsupegInst node) + { + defaultOut(node); + } + + @Override + public void caseAJmpsupegInst(AJmpsupegInst node) + { + inAJmpsupegInst(node); + if(node.getJmpsupeg() != null) + { + node.getJmpsupeg().apply(this); + } + outAJmpsupegInst(node); + } + + public void inAFcallInst(AFcallInst node) + { + defaultIn(node); + } + + public void outAFcallInst(AFcallInst node) + { + defaultOut(node); + } + + @Override + public void caseAFcallInst(AFcallInst node) + { + inAFcallInst(node); + if(node.getFcall() != null) + { + node.getFcall().apply(this); + } + outAFcallInst(node); + } + + public void inAIwriteInst(AIwriteInst node) + { + defaultIn(node); + } + + public void outAIwriteInst(AIwriteInst node) + { + defaultOut(node); + } + + @Override + public void caseAIwriteInst(AIwriteInst node) + { + inAIwriteInst(node); + if(node.getIwrite() != null) + { + node.getIwrite().apply(this); + } + outAIwriteInst(node); + } + + public void inAIreadInst(AIreadInst node) + { + defaultIn(node); + } + + public void outAIreadInst(AIreadInst node) + { + defaultOut(node); + } + + @Override + public void caseAIreadInst(AIreadInst node) + { + inAIreadInst(node); + if(node.getIread() != null) + { + node.getIread().apply(this); + } + outAIreadInst(node); + } + + public void inAArgInst(AArgInst node) + { + defaultIn(node); + } + + public void outAArgInst(AArgInst node) + { + defaultOut(node); + } + + @Override + public void caseAArgInst(AArgInst node) + { + inAArgInst(node); + if(node.getArg() != null) + { + node.getArg().apply(this); + } + outAArgInst(node); + } + + public void inAReturnInst(AReturnInst node) + { + defaultIn(node); + } + + public void outAReturnInst(AReturnInst node) + { + defaultOut(node); + } + + @Override + public void caseAReturnInst(AReturnInst node) + { + inAReturnInst(node); + if(node.getReturn() != null) + { + node.getReturn().apply(this); + } + outAReturnInst(node); + } + + public void inABeginInst(ABeginInst node) + { + defaultIn(node); + } + + public void outABeginInst(ABeginInst node) + { + defaultOut(node); + } + + @Override + public void caseABeginInst(ABeginInst node) + { + inABeginInst(node); + if(node.getBegin() != null) + { + node.getBegin().apply(this); + } + outABeginInst(node); + } + + public void inAEndInst(AEndInst node) + { + defaultIn(node); + } + + public void outAEndInst(AEndInst node) + { + defaultOut(node); + } + + @Override + public void caseAEndInst(AEndInst node) + { + inAEndInst(node); + if(node.getEnd() != null) + { + node.getEnd().apply(this); + } + outAEndInst(node); + } + + public void inAStopInst(AStopInst node) + { + defaultIn(node); + } + + public void outAStopInst(AStopInst node) + { + defaultOut(node); + } + + @Override + public void caseAStopInst(AStopInst node) + { + inAStopInst(node); + if(node.getIstop() != null) + { + node.getIstop().apply(this); + } + outAStopInst(node); + } + + public void inAAdd(AAdd node) + { + defaultIn(node); + } + + public void outAAdd(AAdd node) + { + defaultOut(node); + } + + @Override + public void caseAAdd(AAdd node) + { + inAAdd(node); + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getAff() != null) + { + node.getAff().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getPlus() != null) + { + node.getPlus().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + outAAdd(node); + } + + public void inASub(ASub node) + { + defaultIn(node); + } + + public void outASub(ASub node) + { + defaultOut(node); + } + + @Override + public void caseASub(ASub node) + { + inASub(node); + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getAff() != null) + { + node.getAff().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getMoins() != null) + { + node.getMoins().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + outASub(node); + } + + public void inAMul(AMul node) + { + defaultIn(node); + } + + public void outAMul(AMul node) + { + defaultOut(node); + } + + @Override + public void caseAMul(AMul node) + { + inAMul(node); + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getAff() != null) + { + node.getAff().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getFois() != null) + { + node.getFois().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + outAMul(node); + } + + public void inADiv(ADiv node) + { + defaultIn(node); + } + + public void outADiv(ADiv node) + { + defaultOut(node); + } + + @Override + public void caseADiv(ADiv node) + { + inADiv(node); + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getAff() != null) + { + node.getAff().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getDivise() != null) + { + node.getDivise().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + outADiv(node); + } + + public void inAAffect(AAffect node) + { + defaultIn(node); + } + + public void outAAffect(AAffect node) + { + defaultOut(node); + } + + @Override + public void caseAAffect(AAffect node) + { + inAAffect(node); + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getAff() != null) + { + node.getAff().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + outAAffect(node); + } + + public void inAJmpeg(AJmpeg node) + { + defaultIn(node); + } + + public void outAJmpeg(AJmpeg node) + { + defaultOut(node); + } + + @Override + public void caseAJmpeg(AJmpeg node) + { + inAJmpeg(node); + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + if(node.getIf() != null) + { + node.getIf().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getEq() != null) + { + node.getEq().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getGoto() != null) + { + node.getGoto().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + outAJmpeg(node); + } + + public void inAJmpneg(AJmpneg node) + { + defaultIn(node); + } + + public void outAJmpneg(AJmpneg node) + { + defaultOut(node); + } + + @Override + public void caseAJmpneg(AJmpneg node) + { + inAJmpneg(node); + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + if(node.getIf() != null) + { + node.getIf().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getNoteq() != null) + { + node.getNoteq().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getGoto() != null) + { + node.getGoto().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + outAJmpneg(node); + } + + public void inAJmpinf(AJmpinf node) + { + defaultIn(node); + } + + public void outAJmpinf(AJmpinf node) + { + defaultOut(node); + } + + @Override + public void caseAJmpinf(AJmpinf node) + { + inAJmpinf(node); + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + if(node.getIf() != null) + { + node.getIf().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getInf() != null) + { + node.getInf().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getGoto() != null) + { + node.getGoto().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + outAJmpinf(node); + } + + public void inAJmpinfeg(AJmpinfeg node) + { + defaultIn(node); + } + + public void outAJmpinfeg(AJmpinfeg node) + { + defaultOut(node); + } + + @Override + public void caseAJmpinfeg(AJmpinfeg node) + { + inAJmpinfeg(node); + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + if(node.getIf() != null) + { + node.getIf().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getInfeq() != null) + { + node.getInfeq().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getGoto() != null) + { + node.getGoto().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + outAJmpinfeg(node); + } + + public void inAJmpsup(AJmpsup node) + { + defaultIn(node); + } + + public void outAJmpsup(AJmpsup node) + { + defaultOut(node); + } + + @Override + public void caseAJmpsup(AJmpsup node) + { + inAJmpsup(node); + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + if(node.getIf() != null) + { + node.getIf().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getSup() != null) + { + node.getSup().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getGoto() != null) + { + node.getGoto().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + outAJmpsup(node); + } + + public void inAJmpsupeg(AJmpsupeg node) + { + defaultIn(node); + } + + public void outAJmpsupeg(AJmpsupeg node) + { + defaultOut(node); + } + + @Override + public void caseAJmpsupeg(AJmpsupeg node) + { + inAJmpsupeg(node); + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + if(node.getIf() != null) + { + node.getIf().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getSupeq() != null) + { + node.getSupeq().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getGoto() != null) + { + node.getGoto().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + outAJmpsupeg(node); + } + + public void inAJmp(AJmp node) + { + defaultIn(node); + } + + public void outAJmp(AJmp node) + { + defaultOut(node); + } + + @Override + public void caseAJmp(AJmp node) + { + inAJmp(node); + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + if(node.getGoto() != null) + { + node.getGoto().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + outAJmp(node); + } + + public void inABegin(ABegin node) + { + defaultIn(node); + } + + public void outABegin(ABegin node) + { + defaultOut(node); + } + + @Override + public void caseABegin(ABegin node) + { + inABegin(node); + if(node.getIdentif() != null) + { + node.getIdentif().apply(this); + } + if(node.getFbegin() != null) + { + node.getFbegin().apply(this); + } + outABegin(node); + } + + public void inAEnd(AEnd node) + { + defaultIn(node); + } + + public void outAEnd(AEnd node) + { + defaultOut(node); + } + + @Override + public void caseAEnd(AEnd node) + { + inAEnd(node); + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + if(node.getFend() != null) + { + node.getFend().apply(this); + } + outAEnd(node); + } + + public void inAFcall(AFcall node) + { + defaultIn(node); + } + + public void outAFcall(AFcall node) + { + defaultOut(node); + } + + @Override + public void caseAFcall(AFcall node) + { + inAFcall(node); + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getAff() != null) + { + node.getAff().apply(this); + } + if(node.getCall() != null) + { + node.getCall().apply(this); + } + if(node.getIdentif() != null) + { + node.getIdentif().apply(this); + } + outAFcall(node); + } + + public void inAIwrite(AIwrite node) + { + defaultIn(node); + } + + public void outAIwrite(AIwrite node) + { + defaultOut(node); + } + + @Override + public void caseAIwrite(AIwrite node) + { + inAIwrite(node); + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + if(node.getWrite() != null) + { + node.getWrite().apply(this); + } + if(node.getCtv() != null) + { + node.getCtv().apply(this); + } + outAIwrite(node); + } + + public void inAIread(AIread node) + { + defaultIn(node); + } + + public void outAIread(AIread node) + { + defaultOut(node); + } + + @Override + public void caseAIread(AIread node) + { + inAIread(node); + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getAff() != null) + { + node.getAff().apply(this); + } + if(node.getRead() != null) + { + node.getRead().apply(this); + } + outAIread(node); + } + + public void inAArg(AArg node) + { + defaultIn(node); + } + + public void outAArg(AArg node) + { + defaultOut(node); + } + + @Override + public void caseAArg(AArg node) + { + inAArg(node); + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + if(node.getParam() != null) + { + node.getParam().apply(this); + } + if(node.getCtv() != null) + { + node.getCtv().apply(this); + } + outAArg(node); + } + + public void inAReturn(AReturn node) + { + defaultIn(node); + } + + public void outAReturn(AReturn node) + { + defaultOut(node); + } + + @Override + public void caseAReturn(AReturn node) + { + inAReturn(node); + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + if(node.getRet() != null) + { + node.getRet().apply(this); + } + if(node.getCtv() != null) + { + node.getCtv().apply(this); + } + outAReturn(node); + } + + public void inAIstop(AIstop node) + { + defaultIn(node); + } + + public void outAIstop(AIstop node) + { + defaultOut(node); + } + + @Override + public void caseAIstop(AIstop node) + { + inAIstop(node); + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + if(node.getStop() != null) + { + node.getStop().apply(this); + } + if(node.getCtv() != null) + { + node.getCtv().apply(this); + } + outAIstop(node); + } + + public void inACCtv(ACCtv node) + { + defaultIn(node); + } + + public void outACCtv(ACCtv node) + { + defaultOut(node); + } + + @Override + public void caseACCtv(ACCtv node) + { + inACCtv(node); + if(node.getConstante() != null) + { + node.getConstante().apply(this); + } + outACCtv(node); + } + + public void inATCtv(ATCtv node) + { + defaultIn(node); + } + + public void outATCtv(ATCtv node) + { + defaultOut(node); + } + + @Override + public void caseATCtv(ATCtv node) + { + inATCtv(node); + if(node.getTemporaire() != null) + { + node.getTemporaire().apply(this); + } + outATCtv(node); + } + + public void inAVCtv(AVCtv node) + { + defaultIn(node); + } + + public void outAVCtv(AVCtv node) + { + defaultOut(node); + } + + @Override + public void caseAVCtv(AVCtv node) + { + inAVCtv(node); + if(node.getVariable() != null) + { + node.getVariable().apply(this); + } + outAVCtv(node); + } + + public void inATTv(ATTv node) + { + defaultIn(node); + } + + public void outATTv(ATTv node) + { + defaultOut(node); + } + + @Override + public void caseATTv(ATTv node) + { + inATTv(node); + if(node.getTemporaire() != null) + { + node.getTemporaire().apply(this); + } + outATTv(node); + } + + public void inAVTv(AVTv node) + { + defaultIn(node); + } + + public void outAVTv(AVTv node) + { + defaultOut(node); + } + + @Override + public void caseAVTv(AVTv node) + { + inAVTv(node); + if(node.getVariable() != null) + { + node.getVariable().apply(this); + } + outAVTv(node); + } + + public void inAConstante(AConstante node) + { + defaultIn(node); + } + + public void outAConstante(AConstante node) + { + defaultOut(node); + } + + @Override + public void caseAConstante(AConstante node) + { + inAConstante(node); + if(node.getNombre() != null) + { + node.getNombre().apply(this); + } + outAConstante(node); + } + + public void inATemporaire(ATemporaire node) + { + defaultIn(node); + } + + public void outATemporaire(ATemporaire node) + { + defaultOut(node); + } + + @Override + public void caseATemporaire(ATemporaire node) + { + inATemporaire(node); + if(node.getPrefixeTemp() != null) + { + node.getPrefixeTemp().apply(this); + } + if(node.getNombre() != null) + { + node.getNombre().apply(this); + } + outATemporaire(node); + } + + public void inAScalaireVariable(AScalaireVariable node) + { + defaultIn(node); + } + + public void outAScalaireVariable(AScalaireVariable node) + { + defaultOut(node); + } + + @Override + public void caseAScalaireVariable(AScalaireVariable node) + { + inAScalaireVariable(node); + if(node.getIdentif() != null) + { + node.getIdentif().apply(this); + } + outAScalaireVariable(node); + } + + public void inATabVariable(ATabVariable node) + { + defaultIn(node); + } + + public void outATabVariable(ATabVariable node) + { + defaultOut(node); + } + + @Override + public void caseATabVariable(ATabVariable node) + { + inATabVariable(node); + if(node.getIdentif() != null) + { + node.getIdentif().apply(this); + } + if(node.getCo() != null) + { + node.getCo().apply(this); + } + if(node.getCtv() != null) + { + node.getCtv().apply(this); + } + if(node.getCf() != null) + { + node.getCf().apply(this); + } + outATabVariable(node); + } + + public void inACteEtiqop(ACteEtiqop node) + { + defaultIn(node); + } + + public void outACteEtiqop(ACteEtiqop node) + { + defaultOut(node); + } + + @Override + public void caseACteEtiqop(ACteEtiqop node) + { + inACteEtiqop(node); + if(node.getNombre() != null) + { + node.getNombre().apply(this); + } + outACteEtiqop(node); + } + + public void inAVideEtiqop(AVideEtiqop node) + { + defaultIn(node); + } + + public void outAVideEtiqop(AVideEtiqop node) + { + defaultOut(node); + } + + @Override + public void caseAVideEtiqop(AVideEtiqop node) + { + inAVideEtiqop(node); + outAVideEtiqop(node); + } +} diff --git a/src/c3aParser/analysis/ReversedDepthFirstAdapter.java b/src/c3aParser/analysis/ReversedDepthFirstAdapter.java new file mode 100644 index 0000000..d3d83ee --- /dev/null +++ b/src/c3aParser/analysis/ReversedDepthFirstAdapter.java @@ -0,0 +1,1500 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.analysis; + +import java.util.*; +import c3aParser.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.getListeinst() != null) + { + node.getListeinst().apply(this); + } + outAProg(node); + } + + public void inARecursifListeinst(ARecursifListeinst node) + { + defaultIn(node); + } + + public void outARecursifListeinst(ARecursifListeinst node) + { + defaultOut(node); + } + + @Override + public void caseARecursifListeinst(ARecursifListeinst node) + { + inARecursifListeinst(node); + if(node.getListeinst() != null) + { + node.getListeinst().apply(this); + } + if(node.getInst() != null) + { + node.getInst().apply(this); + } + outARecursifListeinst(node); + } + + public void inAFinalListeinst(AFinalListeinst node) + { + defaultIn(node); + } + + public void outAFinalListeinst(AFinalListeinst node) + { + defaultOut(node); + } + + @Override + public void caseAFinalListeinst(AFinalListeinst node) + { + inAFinalListeinst(node); + if(node.getInst() != null) + { + node.getInst().apply(this); + } + outAFinalListeinst(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.getAdd() != null) + { + node.getAdd().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.getSub() != null) + { + node.getSub().apply(this); + } + outASubInst(node); + } + + public void inAMulInst(AMulInst node) + { + defaultIn(node); + } + + public void outAMulInst(AMulInst node) + { + defaultOut(node); + } + + @Override + public void caseAMulInst(AMulInst node) + { + inAMulInst(node); + if(node.getMul() != null) + { + node.getMul().apply(this); + } + outAMulInst(node); + } + + public void inADivInst(ADivInst node) + { + defaultIn(node); + } + + public void outADivInst(ADivInst node) + { + defaultOut(node); + } + + @Override + public void caseADivInst(ADivInst node) + { + inADivInst(node); + if(node.getDiv() != null) + { + node.getDiv().apply(this); + } + outADivInst(node); + } + + public void inAAffInst(AAffInst node) + { + defaultIn(node); + } + + public void outAAffInst(AAffInst node) + { + defaultOut(node); + } + + @Override + public void caseAAffInst(AAffInst node) + { + inAAffInst(node); + if(node.getAffect() != null) + { + node.getAffect().apply(this); + } + outAAffInst(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.getJmp() != null) + { + node.getJmp().apply(this); + } + outAJmpInst(node); + } + + public void inAJmpegInst(AJmpegInst node) + { + defaultIn(node); + } + + public void outAJmpegInst(AJmpegInst node) + { + defaultOut(node); + } + + @Override + public void caseAJmpegInst(AJmpegInst node) + { + inAJmpegInst(node); + if(node.getJmpeg() != null) + { + node.getJmpeg().apply(this); + } + outAJmpegInst(node); + } + + public void inAJmpnegInst(AJmpnegInst node) + { + defaultIn(node); + } + + public void outAJmpnegInst(AJmpnegInst node) + { + defaultOut(node); + } + + @Override + public void caseAJmpnegInst(AJmpnegInst node) + { + inAJmpnegInst(node); + if(node.getJmpneg() != null) + { + node.getJmpneg().apply(this); + } + outAJmpnegInst(node); + } + + public void inAJmpinfInst(AJmpinfInst node) + { + defaultIn(node); + } + + public void outAJmpinfInst(AJmpinfInst node) + { + defaultOut(node); + } + + @Override + public void caseAJmpinfInst(AJmpinfInst node) + { + inAJmpinfInst(node); + if(node.getJmpinf() != null) + { + node.getJmpinf().apply(this); + } + outAJmpinfInst(node); + } + + public void inAJminfegInst(AJminfegInst node) + { + defaultIn(node); + } + + public void outAJminfegInst(AJminfegInst node) + { + defaultOut(node); + } + + @Override + public void caseAJminfegInst(AJminfegInst node) + { + inAJminfegInst(node); + if(node.getJmpinfeg() != null) + { + node.getJmpinfeg().apply(this); + } + outAJminfegInst(node); + } + + public void inAJmpsupInst(AJmpsupInst node) + { + defaultIn(node); + } + + public void outAJmpsupInst(AJmpsupInst node) + { + defaultOut(node); + } + + @Override + public void caseAJmpsupInst(AJmpsupInst node) + { + inAJmpsupInst(node); + if(node.getJmpsup() != null) + { + node.getJmpsup().apply(this); + } + outAJmpsupInst(node); + } + + public void inAJmpsupegInst(AJmpsupegInst node) + { + defaultIn(node); + } + + public void outAJmpsupegInst(AJmpsupegInst node) + { + defaultOut(node); + } + + @Override + public void caseAJmpsupegInst(AJmpsupegInst node) + { + inAJmpsupegInst(node); + if(node.getJmpsupeg() != null) + { + node.getJmpsupeg().apply(this); + } + outAJmpsupegInst(node); + } + + public void inAFcallInst(AFcallInst node) + { + defaultIn(node); + } + + public void outAFcallInst(AFcallInst node) + { + defaultOut(node); + } + + @Override + public void caseAFcallInst(AFcallInst node) + { + inAFcallInst(node); + if(node.getFcall() != null) + { + node.getFcall().apply(this); + } + outAFcallInst(node); + } + + public void inAIwriteInst(AIwriteInst node) + { + defaultIn(node); + } + + public void outAIwriteInst(AIwriteInst node) + { + defaultOut(node); + } + + @Override + public void caseAIwriteInst(AIwriteInst node) + { + inAIwriteInst(node); + if(node.getIwrite() != null) + { + node.getIwrite().apply(this); + } + outAIwriteInst(node); + } + + public void inAIreadInst(AIreadInst node) + { + defaultIn(node); + } + + public void outAIreadInst(AIreadInst node) + { + defaultOut(node); + } + + @Override + public void caseAIreadInst(AIreadInst node) + { + inAIreadInst(node); + if(node.getIread() != null) + { + node.getIread().apply(this); + } + outAIreadInst(node); + } + + public void inAArgInst(AArgInst node) + { + defaultIn(node); + } + + public void outAArgInst(AArgInst node) + { + defaultOut(node); + } + + @Override + public void caseAArgInst(AArgInst node) + { + inAArgInst(node); + if(node.getArg() != null) + { + node.getArg().apply(this); + } + outAArgInst(node); + } + + public void inAReturnInst(AReturnInst node) + { + defaultIn(node); + } + + public void outAReturnInst(AReturnInst node) + { + defaultOut(node); + } + + @Override + public void caseAReturnInst(AReturnInst node) + { + inAReturnInst(node); + if(node.getReturn() != null) + { + node.getReturn().apply(this); + } + outAReturnInst(node); + } + + public void inABeginInst(ABeginInst node) + { + defaultIn(node); + } + + public void outABeginInst(ABeginInst node) + { + defaultOut(node); + } + + @Override + public void caseABeginInst(ABeginInst node) + { + inABeginInst(node); + if(node.getBegin() != null) + { + node.getBegin().apply(this); + } + outABeginInst(node); + } + + public void inAEndInst(AEndInst node) + { + defaultIn(node); + } + + public void outAEndInst(AEndInst node) + { + defaultOut(node); + } + + @Override + public void caseAEndInst(AEndInst node) + { + inAEndInst(node); + if(node.getEnd() != null) + { + node.getEnd().apply(this); + } + outAEndInst(node); + } + + public void inAStopInst(AStopInst node) + { + defaultIn(node); + } + + public void outAStopInst(AStopInst node) + { + defaultOut(node); + } + + @Override + public void caseAStopInst(AStopInst node) + { + inAStopInst(node); + if(node.getIstop() != null) + { + node.getIstop().apply(this); + } + outAStopInst(node); + } + + public void inAAdd(AAdd node) + { + defaultIn(node); + } + + public void outAAdd(AAdd node) + { + defaultOut(node); + } + + @Override + public void caseAAdd(AAdd node) + { + inAAdd(node); + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getPlus() != null) + { + node.getPlus().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getAff() != null) + { + node.getAff().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + outAAdd(node); + } + + public void inASub(ASub node) + { + defaultIn(node); + } + + public void outASub(ASub node) + { + defaultOut(node); + } + + @Override + public void caseASub(ASub node) + { + inASub(node); + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getMoins() != null) + { + node.getMoins().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getAff() != null) + { + node.getAff().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + outASub(node); + } + + public void inAMul(AMul node) + { + defaultIn(node); + } + + public void outAMul(AMul node) + { + defaultOut(node); + } + + @Override + public void caseAMul(AMul node) + { + inAMul(node); + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getFois() != null) + { + node.getFois().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getAff() != null) + { + node.getAff().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + outAMul(node); + } + + public void inADiv(ADiv node) + { + defaultIn(node); + } + + public void outADiv(ADiv node) + { + defaultOut(node); + } + + @Override + public void caseADiv(ADiv node) + { + inADiv(node); + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getDivise() != null) + { + node.getDivise().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getAff() != null) + { + node.getAff().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + outADiv(node); + } + + public void inAAffect(AAffect node) + { + defaultIn(node); + } + + public void outAAffect(AAffect node) + { + defaultOut(node); + } + + @Override + public void caseAAffect(AAffect node) + { + inAAffect(node); + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getAff() != null) + { + node.getAff().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + outAAffect(node); + } + + public void inAJmpeg(AJmpeg node) + { + defaultIn(node); + } + + public void outAJmpeg(AJmpeg node) + { + defaultOut(node); + } + + @Override + public void caseAJmpeg(AJmpeg node) + { + inAJmpeg(node); + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getGoto() != null) + { + node.getGoto().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getEq() != null) + { + node.getEq().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getIf() != null) + { + node.getIf().apply(this); + } + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + outAJmpeg(node); + } + + public void inAJmpneg(AJmpneg node) + { + defaultIn(node); + } + + public void outAJmpneg(AJmpneg node) + { + defaultOut(node); + } + + @Override + public void caseAJmpneg(AJmpneg node) + { + inAJmpneg(node); + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getGoto() != null) + { + node.getGoto().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getNoteq() != null) + { + node.getNoteq().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getIf() != null) + { + node.getIf().apply(this); + } + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + outAJmpneg(node); + } + + public void inAJmpinf(AJmpinf node) + { + defaultIn(node); + } + + public void outAJmpinf(AJmpinf node) + { + defaultOut(node); + } + + @Override + public void caseAJmpinf(AJmpinf node) + { + inAJmpinf(node); + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getGoto() != null) + { + node.getGoto().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getInf() != null) + { + node.getInf().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getIf() != null) + { + node.getIf().apply(this); + } + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + outAJmpinf(node); + } + + public void inAJmpinfeg(AJmpinfeg node) + { + defaultIn(node); + } + + public void outAJmpinfeg(AJmpinfeg node) + { + defaultOut(node); + } + + @Override + public void caseAJmpinfeg(AJmpinfeg node) + { + inAJmpinfeg(node); + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getGoto() != null) + { + node.getGoto().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getInfeq() != null) + { + node.getInfeq().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getIf() != null) + { + node.getIf().apply(this); + } + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + outAJmpinfeg(node); + } + + public void inAJmpsup(AJmpsup node) + { + defaultIn(node); + } + + public void outAJmpsup(AJmpsup node) + { + defaultOut(node); + } + + @Override + public void caseAJmpsup(AJmpsup node) + { + inAJmpsup(node); + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getGoto() != null) + { + node.getGoto().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getSup() != null) + { + node.getSup().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getIf() != null) + { + node.getIf().apply(this); + } + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + outAJmpsup(node); + } + + public void inAJmpsupeg(AJmpsupeg node) + { + defaultIn(node); + } + + public void outAJmpsupeg(AJmpsupeg node) + { + defaultOut(node); + } + + @Override + public void caseAJmpsupeg(AJmpsupeg node) + { + inAJmpsupeg(node); + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getGoto() != null) + { + node.getGoto().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getSupeq() != null) + { + node.getSupeq().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getIf() != null) + { + node.getIf().apply(this); + } + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + outAJmpsupeg(node); + } + + public void inAJmp(AJmp node) + { + defaultIn(node); + } + + public void outAJmp(AJmp node) + { + defaultOut(node); + } + + @Override + public void caseAJmp(AJmp node) + { + inAJmp(node); + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getGoto() != null) + { + node.getGoto().apply(this); + } + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + outAJmp(node); + } + + public void inABegin(ABegin node) + { + defaultIn(node); + } + + public void outABegin(ABegin node) + { + defaultOut(node); + } + + @Override + public void caseABegin(ABegin node) + { + inABegin(node); + if(node.getFbegin() != null) + { + node.getFbegin().apply(this); + } + if(node.getIdentif() != null) + { + node.getIdentif().apply(this); + } + outABegin(node); + } + + public void inAEnd(AEnd node) + { + defaultIn(node); + } + + public void outAEnd(AEnd node) + { + defaultOut(node); + } + + @Override + public void caseAEnd(AEnd node) + { + inAEnd(node); + if(node.getFend() != null) + { + node.getFend().apply(this); + } + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + outAEnd(node); + } + + public void inAFcall(AFcall node) + { + defaultIn(node); + } + + public void outAFcall(AFcall node) + { + defaultOut(node); + } + + @Override + public void caseAFcall(AFcall node) + { + inAFcall(node); + if(node.getIdentif() != null) + { + node.getIdentif().apply(this); + } + if(node.getCall() != null) + { + node.getCall().apply(this); + } + if(node.getAff() != null) + { + node.getAff().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + outAFcall(node); + } + + public void inAIwrite(AIwrite node) + { + defaultIn(node); + } + + public void outAIwrite(AIwrite node) + { + defaultOut(node); + } + + @Override + public void caseAIwrite(AIwrite node) + { + inAIwrite(node); + if(node.getCtv() != null) + { + node.getCtv().apply(this); + } + if(node.getWrite() != null) + { + node.getWrite().apply(this); + } + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + outAIwrite(node); + } + + public void inAIread(AIread node) + { + defaultIn(node); + } + + public void outAIread(AIread node) + { + defaultOut(node); + } + + @Override + public void caseAIread(AIread node) + { + inAIread(node); + if(node.getRead() != null) + { + node.getRead().apply(this); + } + if(node.getAff() != null) + { + node.getAff().apply(this); + } + if(node.getResult() != null) + { + node.getResult().apply(this); + } + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + outAIread(node); + } + + public void inAArg(AArg node) + { + defaultIn(node); + } + + public void outAArg(AArg node) + { + defaultOut(node); + } + + @Override + public void caseAArg(AArg node) + { + inAArg(node); + if(node.getCtv() != null) + { + node.getCtv().apply(this); + } + if(node.getParam() != null) + { + node.getParam().apply(this); + } + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + outAArg(node); + } + + public void inAReturn(AReturn node) + { + defaultIn(node); + } + + public void outAReturn(AReturn node) + { + defaultOut(node); + } + + @Override + public void caseAReturn(AReturn node) + { + inAReturn(node); + if(node.getCtv() != null) + { + node.getCtv().apply(this); + } + if(node.getRet() != null) + { + node.getRet().apply(this); + } + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + outAReturn(node); + } + + public void inAIstop(AIstop node) + { + defaultIn(node); + } + + public void outAIstop(AIstop node) + { + defaultOut(node); + } + + @Override + public void caseAIstop(AIstop node) + { + inAIstop(node); + if(node.getCtv() != null) + { + node.getCtv().apply(this); + } + if(node.getStop() != null) + { + node.getStop().apply(this); + } + if(node.getEtiqop() != null) + { + node.getEtiqop().apply(this); + } + outAIstop(node); + } + + public void inACCtv(ACCtv node) + { + defaultIn(node); + } + + public void outACCtv(ACCtv node) + { + defaultOut(node); + } + + @Override + public void caseACCtv(ACCtv node) + { + inACCtv(node); + if(node.getConstante() != null) + { + node.getConstante().apply(this); + } + outACCtv(node); + } + + public void inATCtv(ATCtv node) + { + defaultIn(node); + } + + public void outATCtv(ATCtv node) + { + defaultOut(node); + } + + @Override + public void caseATCtv(ATCtv node) + { + inATCtv(node); + if(node.getTemporaire() != null) + { + node.getTemporaire().apply(this); + } + outATCtv(node); + } + + public void inAVCtv(AVCtv node) + { + defaultIn(node); + } + + public void outAVCtv(AVCtv node) + { + defaultOut(node); + } + + @Override + public void caseAVCtv(AVCtv node) + { + inAVCtv(node); + if(node.getVariable() != null) + { + node.getVariable().apply(this); + } + outAVCtv(node); + } + + public void inATTv(ATTv node) + { + defaultIn(node); + } + + public void outATTv(ATTv node) + { + defaultOut(node); + } + + @Override + public void caseATTv(ATTv node) + { + inATTv(node); + if(node.getTemporaire() != null) + { + node.getTemporaire().apply(this); + } + outATTv(node); + } + + public void inAVTv(AVTv node) + { + defaultIn(node); + } + + public void outAVTv(AVTv node) + { + defaultOut(node); + } + + @Override + public void caseAVTv(AVTv node) + { + inAVTv(node); + if(node.getVariable() != null) + { + node.getVariable().apply(this); + } + outAVTv(node); + } + + public void inAConstante(AConstante node) + { + defaultIn(node); + } + + public void outAConstante(AConstante node) + { + defaultOut(node); + } + + @Override + public void caseAConstante(AConstante node) + { + inAConstante(node); + if(node.getNombre() != null) + { + node.getNombre().apply(this); + } + outAConstante(node); + } + + public void inATemporaire(ATemporaire node) + { + defaultIn(node); + } + + public void outATemporaire(ATemporaire node) + { + defaultOut(node); + } + + @Override + public void caseATemporaire(ATemporaire node) + { + inATemporaire(node); + if(node.getNombre() != null) + { + node.getNombre().apply(this); + } + if(node.getPrefixeTemp() != null) + { + node.getPrefixeTemp().apply(this); + } + outATemporaire(node); + } + + public void inAScalaireVariable(AScalaireVariable node) + { + defaultIn(node); + } + + public void outAScalaireVariable(AScalaireVariable node) + { + defaultOut(node); + } + + @Override + public void caseAScalaireVariable(AScalaireVariable node) + { + inAScalaireVariable(node); + if(node.getIdentif() != null) + { + node.getIdentif().apply(this); + } + outAScalaireVariable(node); + } + + public void inATabVariable(ATabVariable node) + { + defaultIn(node); + } + + public void outATabVariable(ATabVariable node) + { + defaultOut(node); + } + + @Override + public void caseATabVariable(ATabVariable node) + { + inATabVariable(node); + if(node.getCf() != null) + { + node.getCf().apply(this); + } + if(node.getCtv() != null) + { + node.getCtv().apply(this); + } + if(node.getCo() != null) + { + node.getCo().apply(this); + } + if(node.getIdentif() != null) + { + node.getIdentif().apply(this); + } + outATabVariable(node); + } + + public void inACteEtiqop(ACteEtiqop node) + { + defaultIn(node); + } + + public void outACteEtiqop(ACteEtiqop node) + { + defaultOut(node); + } + + @Override + public void caseACteEtiqop(ACteEtiqop node) + { + inACteEtiqop(node); + if(node.getNombre() != null) + { + node.getNombre().apply(this); + } + outACteEtiqop(node); + } + + public void inAVideEtiqop(AVideEtiqop node) + { + defaultIn(node); + } + + public void outAVideEtiqop(AVideEtiqop node) + { + defaultOut(node); + } + + @Override + public void caseAVideEtiqop(AVideEtiqop node) + { + inAVideEtiqop(node); + outAVideEtiqop(node); + } +} diff --git a/src/c3aParser/lexer/IPushbackReader.java b/src/c3aParser/lexer/IPushbackReader.java new file mode 100644 index 0000000..b360834 --- /dev/null +++ b/src/c3aParser/lexer/IPushbackReader.java @@ -0,0 +1,12 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.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/c3aParser/lexer/Lexer.java b/src/c3aParser/lexer/Lexer.java new file mode 100644 index 0000000..05bfc4e --- /dev/null +++ b/src/c3aParser/lexer/Lexer.java @@ -0,0 +1,711 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.lexer; + +import java.io.*; +import c3aParser.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( + getText(accept_length), + 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( + 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 TCo(line, pos); } + Token new3(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TCf(line, pos); } + Token new4(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TCall(line, pos); } + Token new5(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TStop(line, pos); } + Token new6(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TFbegin(line, pos); } + Token new7(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TFend(line, pos); } + Token new8(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TAff(line, pos); } + Token new9(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TNoteq(line, pos); } + Token new10(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TInf(line, pos); } + Token new11(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TInfeq(line, pos); } + Token new12(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSup(line, pos); } + Token new13(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSupeq(line, pos); } + Token new14(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TEq(line, pos); } + Token new15(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TGoto(line, pos); } + Token new16(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TParam(line, pos); } + Token new17(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TRet(line, pos); } + Token new18(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TIf(line, pos); } + Token new19(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TMoins(line, pos); } + Token new20(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TPlus(line, pos); } + Token new21(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TFois(line, pos); } + Token new22(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TDivise(line, pos); } + Token new23(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TWrite(line, pos); } + Token new24(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TRead(line, pos); } + Token new25(@SuppressWarnings("hiding") String text, @SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TNombre(text, line, pos); } + Token new26(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TPrefixeTemp(line, pos); } + Token new27(@SuppressWarnings("hiding") String text, @SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TIdentif(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 + {{9, 9, 1}, {10, 10, 2}, {13, 13, 3}, {32, 32, 4}, {33, 33, 5}, {35, 35, 6}, {36, 36, 7}, {42, 42, 8}, {43, 43, 9}, {45, 45, 10}, {47, 47, 11}, {48, 57, 12}, {60, 60, 13}, {61, 61, 14}, {62, 62, 15}, {64, 64, 16}, {65, 90, 7}, {91, 91, 17}, {93, 93, 18}, {95, 95, 7}, {97, 98, 7}, {99, 99, 19}, {100, 101, 7}, {102, 102, 20}, {103, 103, 21}, {104, 104, 7}, {105, 105, 22}, {106, 111, 7}, {112, 112, 23}, {113, 113, 7}, {114, 114, 24}, {115, 115, 25}, {116, 118, 7}, {119, 119, 26}, {120, 122, 7}, }, + {{9, 32, -2}, }, + {{9, 32, -2}, }, + {{9, 32, -2}, }, + {{9, 32, -2}, }, + {{61, 61, 27}, }, + {{0, 9, 28}, {10, 10, 29}, {11, 12, 28}, {13, 13, 30}, {14, 65535, 28}, }, + {{48, 57, 31}, {65, 90, 31}, {97, 122, 31}, }, + {}, + {}, + {}, + {}, + {{48, 57, 12}, }, + {{61, 61, 32}, }, + {{61, 61, 33}, }, + {{61, 61, 34}, }, + {}, + {}, + {}, + {{48, 90, -9}, {97, 97, 35}, {98, 122, 31}, }, + {{48, 90, -9}, {97, 97, 31}, {98, 98, 36}, {99, 100, 31}, {101, 101, 37}, {102, 122, 31}, }, + {{48, 90, -9}, {97, 110, 31}, {111, 111, 38}, {112, 122, 31}, }, + {{48, 90, -9}, {97, 101, 31}, {102, 102, 39}, {103, 122, 31}, }, + {{48, 90, -9}, {97, 97, 40}, {98, 122, 31}, }, + {{48, 90, -9}, {97, 100, 31}, {101, 101, 41}, {102, 122, 31}, }, + {{48, 90, -9}, {97, 115, 31}, {116, 116, 42}, {117, 122, 31}, }, + {{48, 90, -9}, {97, 113, 31}, {114, 114, 43}, {115, 122, 31}, }, + {}, + {{0, 65535, -8}, }, + {{13, 13, 44}, }, + {}, + {{48, 122, -9}, }, + {}, + {}, + {}, + {{48, 90, -9}, {97, 107, 31}, {108, 108, 45}, {109, 122, 31}, }, + {{48, 100, -26}, {101, 101, 46}, {102, 122, 31}, }, + {{48, 90, -9}, {97, 109, 31}, {110, 110, 47}, {111, 122, 31}, }, + {{48, 115, -27}, {116, 116, 48}, {117, 122, 31}, }, + {{48, 122, -9}, }, + {{48, 113, -28}, {114, 114, 49}, {115, 122, 31}, }, + {{48, 90, -9}, {97, 97, 50}, {98, 115, 31}, {116, 116, 51}, {117, 122, 31}, }, + {{48, 110, -23}, {111, 111, 52}, {112, 122, 31}, }, + {{48, 90, -9}, {97, 104, 31}, {105, 105, 53}, {106, 122, 31}, }, + {}, + {{48, 107, -37}, {108, 108, 54}, {109, 122, 31}, }, + {{48, 90, -9}, {97, 102, 31}, {103, 103, 55}, {104, 122, 31}, }, + {{48, 90, -9}, {97, 99, 31}, {100, 100, 56}, {101, 122, 31}, }, + {{48, 110, -23}, {111, 111, 57}, {112, 122, 31}, }, + {{48, 90, -9}, {97, 97, 58}, {98, 122, 31}, }, + {{48, 99, -49}, {100, 100, 59}, {101, 122, 31}, }, + {{48, 122, -9}, }, + {{48, 90, -9}, {97, 111, 31}, {112, 112, 60}, {113, 122, 31}, }, + {{48, 115, -27}, {116, 116, 61}, {117, 122, 31}, }, + {{48, 122, -9}, }, + {{48, 104, -45}, {105, 105, 62}, {106, 122, 31}, }, + {{48, 122, -9}, }, + {{48, 122, -9}, }, + {{48, 90, -9}, {97, 108, 31}, {109, 109, 63}, {110, 122, 31}, }, + {{48, 122, -9}, }, + {{48, 122, -9}, }, + {{48, 100, -26}, {101, 101, 64}, {102, 122, 31}, }, + {{48, 109, -39}, {110, 110, 65}, {111, 122, 31}, }, + {{48, 122, -9}, }, + {{48, 122, -9}, }, + {{48, 122, -9}, }, + } + };*/ + + private static int[][] accept; +/* { + // INITIAL + {-1, 0, 0, 0, 0, -1, -1, 27, 21, 20, 19, 22, 25, 10, 8, 12, 26, 2, 3, 27, 27, 27, 27, 27, 27, 27, 27, 9, -1, 1, 1, 27, 11, 14, 13, 27, 27, 27, 27, 18, 27, 27, 27, 27, 1, 27, 27, 27, 27, 27, 27, 17, 27, 27, 4, 27, 7, 15, 27, 24, 5, 27, 27, 16, 23, 6, }, + + };*/ + + 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/c3aParser/lexer/LexerException.java b/src/c3aParser/lexer/LexerException.java new file mode 100644 index 0000000..9fa6811 --- /dev/null +++ b/src/c3aParser/lexer/LexerException.java @@ -0,0 +1,22 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.lexer; + +import c3aParser.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/c3aParser/lexer/lexer.dat b/src/c3aParser/lexer/lexer.dat new file mode 100644 index 0000000000000000000000000000000000000000..80616e928dc0d74feac209ffd3cac8d7344265f5 GIT binary patch literal 2536 zcmZQzU|?imU~pn!U{GdYVBmyekQf&O0|N*%F)%RjLNPM~1A_t-voJ6)C_*tSR6ocJ zHU<U;6)0wBU|`UKVh#od25l$?*`v$AzyQJ^JM<YC7(ketfq}t*fq}u2fq{XCfq}sW zib3|<GB7ZJFdqX0gB=v}GcYhXK(PP=1A`+2149%80|Ut3Xa)ub5Ef)$V2FicAqED9 zcqj&`Nn~JPNP?<QW?*0dVPOUah7<+{hE%9{8Uq6Z2#YW<Fr-7VC<6mS1{8zL$z)() z0AVo(28JvK28Mj7-U0>&1`rl!U|=YOVvzbG1_lNYmSA9DD28H51_p)_1_p*QsNQl0 z1_lt8VqjpXU|?XVf{KIU1{8h@|NsC02aP{c`JiwFVQB^i22k8FK;vBo8t0%mk!4_D z0L2F=9zf!tH~?We1_lN`28RFt85kHq;-EAEi!*toH~_Ih;R|v%hz+s>8H4-*(+9Ex z#0R+vgh6QxnGZ^5$b2PagBTbXU~Y)||NsAY1_lO@y&w!qkD&O4xdD_mL3X061Gx{R z4unBz7nBY_X#gY+N(UgU3QY$vvq0$|-K;zY1_qEGQ2c|i8Z`d#=>eGy(gR9kAgm5e zV=z6q{H6g-yD)Xw+=K21O(OgNN{=A-fYKregYs`FH2s0ZvDpJk+aNhmng(G|J_nft za~mkSK=H=_N;m)i|Nj9^x1jU{!a5)YP%%)LRzc$tDh#Hu*_#aw?;HjO1`r07C%H&& zg@s+p|NsA=LGv^yy!D6(2aq`+KY`*DghAyKC{AI1f|*_X|NsA|(7X!@FOd6@!wckZ zkQmHQFnxvp|NnmiEeAkhW(X|@VCIAJB}gB7S~Y^kJ1BfX?gQBg!o~~?49NDv?8*E8 z|Nl#9nFMmb2@z=$RJMW429;?bYzi&cU~U6N2+aKK|NsBrhK4^V4$K%B7(ihMQ;RL$ zK<ON0KCC=7hnA)I^nmgtNDnAYgRliOK4E%b?m_o2s4fAO!RYGH!_^8JuITEL|NsAg z9$F`W?6pR-7d?Kl`4<%KAh(0u0m7hq4U}il?LtpWpt2A-PSNdx`8nhN|Nobvbr2}N zK=mW29)g*Vt`D7$&CQ^=1i2X$mmqA<z`y{?2gI5Qa~pcz1J&1{_=lMTQ<wYy|Nom% zJ3#h;>T*!H!PKF<nHav)|Nr263Y1>q7$gS53=9mQ`VUl>gX(rry$`CtLG>`G{sXmF zK=l%+{spyxK<)&o$A>wg=7QV?!XUMvIuz7q0hMzgJ~9TiN09j-HcTIgjgCQW8JHL- c&OmHXdx9V87f^cwRBnL8K^W8~0<}HZ0BTG`4gdfE literal 0 HcmV?d00001 diff --git a/src/c3aParser/node/AAdd.java b/src/c3aParser/node/AAdd.java new file mode 100644 index 0000000..dfc908f --- /dev/null +++ b/src/c3aParser/node/AAdd.java @@ -0,0 +1,310 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAdd extends PAdd +{ + private PEtiqop _etiqop_; + private PTv _result_; + private TAff _aff_; + private PCtv _op1_; + private TPlus _plus_; + private PCtv _op2_; + + public AAdd() + { + // Constructor + } + + public AAdd( + @SuppressWarnings("hiding") PEtiqop _etiqop_, + @SuppressWarnings("hiding") PTv _result_, + @SuppressWarnings("hiding") TAff _aff_, + @SuppressWarnings("hiding") PCtv _op1_, + @SuppressWarnings("hiding") TPlus _plus_, + @SuppressWarnings("hiding") PCtv _op2_) + { + // Constructor + setEtiqop(_etiqop_); + + setResult(_result_); + + setAff(_aff_); + + setOp1(_op1_); + + setPlus(_plus_); + + setOp2(_op2_); + + } + + @Override + public Object clone() + { + return new AAdd( + cloneNode(this._etiqop_), + cloneNode(this._result_), + cloneNode(this._aff_), + cloneNode(this._op1_), + cloneNode(this._plus_), + cloneNode(this._op2_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAdd(this); + } + + public PEtiqop getEtiqop() + { + return this._etiqop_; + } + + public void setEtiqop(PEtiqop node) + { + if(this._etiqop_ != null) + { + this._etiqop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._etiqop_ = node; + } + + public PTv getResult() + { + return this._result_; + } + + public void setResult(PTv node) + { + if(this._result_ != null) + { + this._result_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._result_ = node; + } + + public TAff getAff() + { + return this._aff_; + } + + public void setAff(TAff node) + { + if(this._aff_ != null) + { + this._aff_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._aff_ = node; + } + + public PCtv getOp1() + { + return this._op1_; + } + + public void setOp1(PCtv node) + { + if(this._op1_ != null) + { + this._op1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op1_ = 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 PCtv getOp2() + { + return this._op2_; + } + + public void setOp2(PCtv node) + { + if(this._op2_ != null) + { + this._op2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op2_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._etiqop_) + + toString(this._result_) + + toString(this._aff_) + + toString(this._op1_) + + toString(this._plus_) + + toString(this._op2_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._etiqop_ == child) + { + this._etiqop_ = null; + return; + } + + if(this._result_ == child) + { + this._result_ = null; + return; + } + + if(this._aff_ == child) + { + this._aff_ = null; + return; + } + + if(this._op1_ == child) + { + this._op1_ = null; + return; + } + + if(this._plus_ == child) + { + this._plus_ = null; + return; + } + + if(this._op2_ == child) + { + this._op2_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._etiqop_ == oldChild) + { + setEtiqop((PEtiqop) newChild); + return; + } + + if(this._result_ == oldChild) + { + setResult((PTv) newChild); + return; + } + + if(this._aff_ == oldChild) + { + setAff((TAff) newChild); + return; + } + + if(this._op1_ == oldChild) + { + setOp1((PCtv) newChild); + return; + } + + if(this._plus_ == oldChild) + { + setPlus((TPlus) newChild); + return; + } + + if(this._op2_ == oldChild) + { + setOp2((PCtv) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AAddInst.java b/src/c3aParser/node/AAddInst.java new file mode 100644 index 0000000..8014afb --- /dev/null +++ b/src/c3aParser/node/AAddInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAddInst extends PInst +{ + private PAdd _add_; + + public AAddInst() + { + // Constructor + } + + public AAddInst( + @SuppressWarnings("hiding") PAdd _add_) + { + // Constructor + setAdd(_add_); + + } + + @Override + public Object clone() + { + return new AAddInst( + cloneNode(this._add_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAddInst(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/c3aParser/node/AAffInst.java b/src/c3aParser/node/AAffInst.java new file mode 100644 index 0000000..3e4e6f0 --- /dev/null +++ b/src/c3aParser/node/AAffInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAffInst extends PInst +{ + private PAffect _affect_; + + public AAffInst() + { + // Constructor + } + + public AAffInst( + @SuppressWarnings("hiding") PAffect _affect_) + { + // Constructor + setAffect(_affect_); + + } + + @Override + public Object clone() + { + return new AAffInst( + cloneNode(this._affect_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAffInst(this); + } + + public PAffect getAffect() + { + return this._affect_; + } + + public void setAffect(PAffect node) + { + if(this._affect_ != null) + { + this._affect_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._affect_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._affect_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._affect_ == child) + { + this._affect_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._affect_ == oldChild) + { + setAffect((PAffect) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AAffect.java b/src/c3aParser/node/AAffect.java new file mode 100644 index 0000000..37d0e85 --- /dev/null +++ b/src/c3aParser/node/AAffect.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAffect extends PAffect +{ + private PEtiqop _etiqop_; + private PTv _result_; + private TAff _aff_; + private PCtv _op1_; + + public AAffect() + { + // Constructor + } + + public AAffect( + @SuppressWarnings("hiding") PEtiqop _etiqop_, + @SuppressWarnings("hiding") PTv _result_, + @SuppressWarnings("hiding") TAff _aff_, + @SuppressWarnings("hiding") PCtv _op1_) + { + // Constructor + setEtiqop(_etiqop_); + + setResult(_result_); + + setAff(_aff_); + + setOp1(_op1_); + + } + + @Override + public Object clone() + { + return new AAffect( + cloneNode(this._etiqop_), + cloneNode(this._result_), + cloneNode(this._aff_), + cloneNode(this._op1_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAffect(this); + } + + public PEtiqop getEtiqop() + { + return this._etiqop_; + } + + public void setEtiqop(PEtiqop node) + { + if(this._etiqop_ != null) + { + this._etiqop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._etiqop_ = node; + } + + public PTv getResult() + { + return this._result_; + } + + public void setResult(PTv node) + { + if(this._result_ != null) + { + this._result_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._result_ = node; + } + + public TAff getAff() + { + return this._aff_; + } + + public void setAff(TAff node) + { + if(this._aff_ != null) + { + this._aff_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._aff_ = node; + } + + public PCtv getOp1() + { + return this._op1_; + } + + public void setOp1(PCtv node) + { + if(this._op1_ != null) + { + this._op1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op1_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._etiqop_) + + toString(this._result_) + + toString(this._aff_) + + toString(this._op1_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._etiqop_ == child) + { + this._etiqop_ = null; + return; + } + + if(this._result_ == child) + { + this._result_ = null; + return; + } + + if(this._aff_ == child) + { + this._aff_ = null; + return; + } + + if(this._op1_ == child) + { + this._op1_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._etiqop_ == oldChild) + { + setEtiqop((PEtiqop) newChild); + return; + } + + if(this._result_ == oldChild) + { + setResult((PTv) newChild); + return; + } + + if(this._aff_ == oldChild) + { + setAff((TAff) newChild); + return; + } + + if(this._op1_ == oldChild) + { + setOp1((PCtv) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AArg.java b/src/c3aParser/node/AArg.java new file mode 100644 index 0000000..dc5402b --- /dev/null +++ b/src/c3aParser/node/AArg.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AArg extends PArg +{ + private PEtiqop _etiqop_; + private TParam _param_; + private PCtv _ctv_; + + public AArg() + { + // Constructor + } + + public AArg( + @SuppressWarnings("hiding") PEtiqop _etiqop_, + @SuppressWarnings("hiding") TParam _param_, + @SuppressWarnings("hiding") PCtv _ctv_) + { + // Constructor + setEtiqop(_etiqop_); + + setParam(_param_); + + setCtv(_ctv_); + + } + + @Override + public Object clone() + { + return new AArg( + cloneNode(this._etiqop_), + cloneNode(this._param_), + cloneNode(this._ctv_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAArg(this); + } + + public PEtiqop getEtiqop() + { + return this._etiqop_; + } + + public void setEtiqop(PEtiqop node) + { + if(this._etiqop_ != null) + { + this._etiqop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._etiqop_ = node; + } + + public TParam getParam() + { + return this._param_; + } + + public void setParam(TParam node) + { + if(this._param_ != null) + { + this._param_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._param_ = node; + } + + public PCtv getCtv() + { + return this._ctv_; + } + + public void setCtv(PCtv node) + { + if(this._ctv_ != null) + { + this._ctv_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ctv_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._etiqop_) + + toString(this._param_) + + toString(this._ctv_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._etiqop_ == child) + { + this._etiqop_ = null; + return; + } + + if(this._param_ == child) + { + this._param_ = null; + return; + } + + if(this._ctv_ == child) + { + this._ctv_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._etiqop_ == oldChild) + { + setEtiqop((PEtiqop) newChild); + return; + } + + if(this._param_ == oldChild) + { + setParam((TParam) newChild); + return; + } + + if(this._ctv_ == oldChild) + { + setCtv((PCtv) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AArgInst.java b/src/c3aParser/node/AArgInst.java new file mode 100644 index 0000000..943b920 --- /dev/null +++ b/src/c3aParser/node/AArgInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AArgInst extends PInst +{ + private PArg _arg_; + + public AArgInst() + { + // Constructor + } + + public AArgInst( + @SuppressWarnings("hiding") PArg _arg_) + { + // Constructor + setArg(_arg_); + + } + + @Override + public Object clone() + { + return new AArgInst( + cloneNode(this._arg_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAArgInst(this); + } + + public PArg getArg() + { + return this._arg_; + } + + public void setArg(PArg node) + { + if(this._arg_ != null) + { + this._arg_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._arg_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._arg_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._arg_ == child) + { + this._arg_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._arg_ == oldChild) + { + setArg((PArg) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/ABegin.java b/src/c3aParser/node/ABegin.java new file mode 100644 index 0000000..0809371 --- /dev/null +++ b/src/c3aParser/node/ABegin.java @@ -0,0 +1,138 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class ABegin extends PBegin +{ + private TIdentif _identif_; + private TFbegin _fbegin_; + + public ABegin() + { + // Constructor + } + + public ABegin( + @SuppressWarnings("hiding") TIdentif _identif_, + @SuppressWarnings("hiding") TFbegin _fbegin_) + { + // Constructor + setIdentif(_identif_); + + setFbegin(_fbegin_); + + } + + @Override + public Object clone() + { + return new ABegin( + cloneNode(this._identif_), + cloneNode(this._fbegin_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseABegin(this); + } + + public TIdentif getIdentif() + { + return this._identif_; + } + + public void setIdentif(TIdentif node) + { + if(this._identif_ != null) + { + this._identif_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._identif_ = node; + } + + public TFbegin getFbegin() + { + return this._fbegin_; + } + + public void setFbegin(TFbegin node) + { + if(this._fbegin_ != null) + { + this._fbegin_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._fbegin_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._identif_) + + toString(this._fbegin_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._identif_ == child) + { + this._identif_ = null; + return; + } + + if(this._fbegin_ == child) + { + this._fbegin_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._identif_ == oldChild) + { + setIdentif((TIdentif) newChild); + return; + } + + if(this._fbegin_ == oldChild) + { + setFbegin((TFbegin) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/ABeginInst.java b/src/c3aParser/node/ABeginInst.java new file mode 100644 index 0000000..019f236 --- /dev/null +++ b/src/c3aParser/node/ABeginInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class ABeginInst extends PInst +{ + private PBegin _begin_; + + public ABeginInst() + { + // Constructor + } + + public ABeginInst( + @SuppressWarnings("hiding") PBegin _begin_) + { + // Constructor + setBegin(_begin_); + + } + + @Override + public Object clone() + { + return new ABeginInst( + cloneNode(this._begin_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseABeginInst(this); + } + + public PBegin getBegin() + { + return this._begin_; + } + + public void setBegin(PBegin node) + { + if(this._begin_ != null) + { + this._begin_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._begin_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._begin_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._begin_ == child) + { + this._begin_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._begin_ == oldChild) + { + setBegin((PBegin) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/ACCtv.java b/src/c3aParser/node/ACCtv.java new file mode 100644 index 0000000..e090622 --- /dev/null +++ b/src/c3aParser/node/ACCtv.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class ACCtv extends PCtv +{ + private PConstante _constante_; + + public ACCtv() + { + // Constructor + } + + public ACCtv( + @SuppressWarnings("hiding") PConstante _constante_) + { + // Constructor + setConstante(_constante_); + + } + + @Override + public Object clone() + { + return new ACCtv( + cloneNode(this._constante_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseACCtv(this); + } + + public PConstante getConstante() + { + return this._constante_; + } + + public void setConstante(PConstante node) + { + if(this._constante_ != null) + { + this._constante_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._constante_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._constante_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._constante_ == child) + { + this._constante_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._constante_ == oldChild) + { + setConstante((PConstante) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AConstante.java b/src/c3aParser/node/AConstante.java new file mode 100644 index 0000000..2473e38 --- /dev/null +++ b/src/c3aParser/node/AConstante.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AConstante extends PConstante +{ + private TNombre _nombre_; + + public AConstante() + { + // Constructor + } + + public AConstante( + @SuppressWarnings("hiding") TNombre _nombre_) + { + // Constructor + setNombre(_nombre_); + + } + + @Override + public Object clone() + { + return new AConstante( + cloneNode(this._nombre_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAConstante(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/c3aParser/node/ACteEtiqop.java b/src/c3aParser/node/ACteEtiqop.java new file mode 100644 index 0000000..2487976 --- /dev/null +++ b/src/c3aParser/node/ACteEtiqop.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class ACteEtiqop extends PEtiqop +{ + private TNombre _nombre_; + + public ACteEtiqop() + { + // Constructor + } + + public ACteEtiqop( + @SuppressWarnings("hiding") TNombre _nombre_) + { + // Constructor + setNombre(_nombre_); + + } + + @Override + public Object clone() + { + return new ACteEtiqop( + cloneNode(this._nombre_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseACteEtiqop(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/c3aParser/node/ADiv.java b/src/c3aParser/node/ADiv.java new file mode 100644 index 0000000..6a732fb --- /dev/null +++ b/src/c3aParser/node/ADiv.java @@ -0,0 +1,310 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class ADiv extends PDiv +{ + private PEtiqop _etiqop_; + private PTv _result_; + private TAff _aff_; + private PCtv _op1_; + private TDivise _divise_; + private PCtv _op2_; + + public ADiv() + { + // Constructor + } + + public ADiv( + @SuppressWarnings("hiding") PEtiqop _etiqop_, + @SuppressWarnings("hiding") PTv _result_, + @SuppressWarnings("hiding") TAff _aff_, + @SuppressWarnings("hiding") PCtv _op1_, + @SuppressWarnings("hiding") TDivise _divise_, + @SuppressWarnings("hiding") PCtv _op2_) + { + // Constructor + setEtiqop(_etiqop_); + + setResult(_result_); + + setAff(_aff_); + + setOp1(_op1_); + + setDivise(_divise_); + + setOp2(_op2_); + + } + + @Override + public Object clone() + { + return new ADiv( + cloneNode(this._etiqop_), + cloneNode(this._result_), + cloneNode(this._aff_), + cloneNode(this._op1_), + cloneNode(this._divise_), + cloneNode(this._op2_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseADiv(this); + } + + public PEtiqop getEtiqop() + { + return this._etiqop_; + } + + public void setEtiqop(PEtiqop node) + { + if(this._etiqop_ != null) + { + this._etiqop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._etiqop_ = node; + } + + public PTv getResult() + { + return this._result_; + } + + public void setResult(PTv node) + { + if(this._result_ != null) + { + this._result_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._result_ = node; + } + + public TAff getAff() + { + return this._aff_; + } + + public void setAff(TAff node) + { + if(this._aff_ != null) + { + this._aff_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._aff_ = node; + } + + public PCtv getOp1() + { + return this._op1_; + } + + public void setOp1(PCtv node) + { + if(this._op1_ != null) + { + this._op1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op1_ = node; + } + + public TDivise getDivise() + { + return this._divise_; + } + + public void setDivise(TDivise node) + { + if(this._divise_ != null) + { + this._divise_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._divise_ = node; + } + + public PCtv getOp2() + { + return this._op2_; + } + + public void setOp2(PCtv node) + { + if(this._op2_ != null) + { + this._op2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op2_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._etiqop_) + + toString(this._result_) + + toString(this._aff_) + + toString(this._op1_) + + toString(this._divise_) + + toString(this._op2_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._etiqop_ == child) + { + this._etiqop_ = null; + return; + } + + if(this._result_ == child) + { + this._result_ = null; + return; + } + + if(this._aff_ == child) + { + this._aff_ = null; + return; + } + + if(this._op1_ == child) + { + this._op1_ = null; + return; + } + + if(this._divise_ == child) + { + this._divise_ = null; + return; + } + + if(this._op2_ == child) + { + this._op2_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._etiqop_ == oldChild) + { + setEtiqop((PEtiqop) newChild); + return; + } + + if(this._result_ == oldChild) + { + setResult((PTv) newChild); + return; + } + + if(this._aff_ == oldChild) + { + setAff((TAff) newChild); + return; + } + + if(this._op1_ == oldChild) + { + setOp1((PCtv) newChild); + return; + } + + if(this._divise_ == oldChild) + { + setDivise((TDivise) newChild); + return; + } + + if(this._op2_ == oldChild) + { + setOp2((PCtv) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/ADivInst.java b/src/c3aParser/node/ADivInst.java new file mode 100644 index 0000000..5007c1d --- /dev/null +++ b/src/c3aParser/node/ADivInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class ADivInst extends PInst +{ + private PDiv _div_; + + public ADivInst() + { + // Constructor + } + + public ADivInst( + @SuppressWarnings("hiding") PDiv _div_) + { + // Constructor + setDiv(_div_); + + } + + @Override + public Object clone() + { + return new ADivInst( + cloneNode(this._div_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseADivInst(this); + } + + public PDiv getDiv() + { + return this._div_; + } + + public void setDiv(PDiv node) + { + if(this._div_ != null) + { + this._div_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._div_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._div_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._div_ == child) + { + this._div_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._div_ == oldChild) + { + setDiv((PDiv) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AEnd.java b/src/c3aParser/node/AEnd.java new file mode 100644 index 0000000..15f7a11 --- /dev/null +++ b/src/c3aParser/node/AEnd.java @@ -0,0 +1,138 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEnd extends PEnd +{ + private PEtiqop _etiqop_; + private TFend _fend_; + + public AEnd() + { + // Constructor + } + + public AEnd( + @SuppressWarnings("hiding") PEtiqop _etiqop_, + @SuppressWarnings("hiding") TFend _fend_) + { + // Constructor + setEtiqop(_etiqop_); + + setFend(_fend_); + + } + + @Override + public Object clone() + { + return new AEnd( + cloneNode(this._etiqop_), + cloneNode(this._fend_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEnd(this); + } + + public PEtiqop getEtiqop() + { + return this._etiqop_; + } + + public void setEtiqop(PEtiqop node) + { + if(this._etiqop_ != null) + { + this._etiqop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._etiqop_ = node; + } + + public TFend getFend() + { + return this._fend_; + } + + public void setFend(TFend node) + { + if(this._fend_ != null) + { + this._fend_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._fend_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._etiqop_) + + toString(this._fend_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._etiqop_ == child) + { + this._etiqop_ = null; + return; + } + + if(this._fend_ == child) + { + this._fend_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._etiqop_ == oldChild) + { + setEtiqop((PEtiqop) newChild); + return; + } + + if(this._fend_ == oldChild) + { + setFend((TFend) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AEndInst.java b/src/c3aParser/node/AEndInst.java new file mode 100644 index 0000000..34d756f --- /dev/null +++ b/src/c3aParser/node/AEndInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEndInst extends PInst +{ + private PEnd _end_; + + public AEndInst() + { + // Constructor + } + + public AEndInst( + @SuppressWarnings("hiding") PEnd _end_) + { + // Constructor + setEnd(_end_); + + } + + @Override + public Object clone() + { + return new AEndInst( + cloneNode(this._end_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEndInst(this); + } + + public PEnd getEnd() + { + return this._end_; + } + + public void setEnd(PEnd node) + { + if(this._end_ != null) + { + this._end_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._end_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._end_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._end_ == child) + { + this._end_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._end_ == oldChild) + { + setEnd((PEnd) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AFcall.java b/src/c3aParser/node/AFcall.java new file mode 100644 index 0000000..66e5f1c --- /dev/null +++ b/src/c3aParser/node/AFcall.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AFcall extends PFcall +{ + private PEtiqop _etiqop_; + private PTv _result_; + private TAff _aff_; + private TCall _call_; + private TIdentif _identif_; + + public AFcall() + { + // Constructor + } + + public AFcall( + @SuppressWarnings("hiding") PEtiqop _etiqop_, + @SuppressWarnings("hiding") PTv _result_, + @SuppressWarnings("hiding") TAff _aff_, + @SuppressWarnings("hiding") TCall _call_, + @SuppressWarnings("hiding") TIdentif _identif_) + { + // Constructor + setEtiqop(_etiqop_); + + setResult(_result_); + + setAff(_aff_); + + setCall(_call_); + + setIdentif(_identif_); + + } + + @Override + public Object clone() + { + return new AFcall( + cloneNode(this._etiqop_), + cloneNode(this._result_), + cloneNode(this._aff_), + cloneNode(this._call_), + cloneNode(this._identif_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAFcall(this); + } + + public PEtiqop getEtiqop() + { + return this._etiqop_; + } + + public void setEtiqop(PEtiqop node) + { + if(this._etiqop_ != null) + { + this._etiqop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._etiqop_ = node; + } + + public PTv getResult() + { + return this._result_; + } + + public void setResult(PTv node) + { + if(this._result_ != null) + { + this._result_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._result_ = node; + } + + public TAff getAff() + { + return this._aff_; + } + + public void setAff(TAff node) + { + if(this._aff_ != null) + { + this._aff_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._aff_ = node; + } + + public TCall getCall() + { + return this._call_; + } + + public void setCall(TCall node) + { + if(this._call_ != null) + { + this._call_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._call_ = node; + } + + public TIdentif getIdentif() + { + return this._identif_; + } + + public void setIdentif(TIdentif node) + { + if(this._identif_ != null) + { + this._identif_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._identif_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._etiqop_) + + toString(this._result_) + + toString(this._aff_) + + toString(this._call_) + + toString(this._identif_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._etiqop_ == child) + { + this._etiqop_ = null; + return; + } + + if(this._result_ == child) + { + this._result_ = null; + return; + } + + if(this._aff_ == child) + { + this._aff_ = null; + return; + } + + if(this._call_ == child) + { + this._call_ = null; + return; + } + + if(this._identif_ == child) + { + this._identif_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._etiqop_ == oldChild) + { + setEtiqop((PEtiqop) newChild); + return; + } + + if(this._result_ == oldChild) + { + setResult((PTv) newChild); + return; + } + + if(this._aff_ == oldChild) + { + setAff((TAff) newChild); + return; + } + + if(this._call_ == oldChild) + { + setCall((TCall) newChild); + return; + } + + if(this._identif_ == oldChild) + { + setIdentif((TIdentif) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AFcallInst.java b/src/c3aParser/node/AFcallInst.java new file mode 100644 index 0000000..35b147e --- /dev/null +++ b/src/c3aParser/node/AFcallInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AFcallInst extends PInst +{ + private PFcall _fcall_; + + public AFcallInst() + { + // Constructor + } + + public AFcallInst( + @SuppressWarnings("hiding") PFcall _fcall_) + { + // Constructor + setFcall(_fcall_); + + } + + @Override + public Object clone() + { + return new AFcallInst( + cloneNode(this._fcall_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAFcallInst(this); + } + + public PFcall getFcall() + { + return this._fcall_; + } + + public void setFcall(PFcall node) + { + if(this._fcall_ != null) + { + this._fcall_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._fcall_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._fcall_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._fcall_ == child) + { + this._fcall_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._fcall_ == oldChild) + { + setFcall((PFcall) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AFinalListeinst.java b/src/c3aParser/node/AFinalListeinst.java new file mode 100644 index 0000000..9b9d6c5 --- /dev/null +++ b/src/c3aParser/node/AFinalListeinst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AFinalListeinst extends PListeinst +{ + private PInst _inst_; + + public AFinalListeinst() + { + // Constructor + } + + public AFinalListeinst( + @SuppressWarnings("hiding") PInst _inst_) + { + // Constructor + setInst(_inst_); + + } + + @Override + public Object clone() + { + return new AFinalListeinst( + cloneNode(this._inst_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAFinalListeinst(this); + } + + public PInst getInst() + { + return this._inst_; + } + + public void setInst(PInst node) + { + if(this._inst_ != null) + { + this._inst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._inst_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._inst_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._inst_ == child) + { + this._inst_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._inst_ == oldChild) + { + setInst((PInst) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AIread.java b/src/c3aParser/node/AIread.java new file mode 100644 index 0000000..c61ddda --- /dev/null +++ b/src/c3aParser/node/AIread.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AIread extends PIread +{ + private PEtiqop _etiqop_; + private PTv _result_; + private TAff _aff_; + private TRead _read_; + + public AIread() + { + // Constructor + } + + public AIread( + @SuppressWarnings("hiding") PEtiqop _etiqop_, + @SuppressWarnings("hiding") PTv _result_, + @SuppressWarnings("hiding") TAff _aff_, + @SuppressWarnings("hiding") TRead _read_) + { + // Constructor + setEtiqop(_etiqop_); + + setResult(_result_); + + setAff(_aff_); + + setRead(_read_); + + } + + @Override + public Object clone() + { + return new AIread( + cloneNode(this._etiqop_), + cloneNode(this._result_), + cloneNode(this._aff_), + cloneNode(this._read_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAIread(this); + } + + public PEtiqop getEtiqop() + { + return this._etiqop_; + } + + public void setEtiqop(PEtiqop node) + { + if(this._etiqop_ != null) + { + this._etiqop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._etiqop_ = node; + } + + public PTv getResult() + { + return this._result_; + } + + public void setResult(PTv node) + { + if(this._result_ != null) + { + this._result_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._result_ = node; + } + + public TAff getAff() + { + return this._aff_; + } + + public void setAff(TAff node) + { + if(this._aff_ != null) + { + this._aff_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._aff_ = node; + } + + public TRead getRead() + { + return this._read_; + } + + public void setRead(TRead node) + { + if(this._read_ != null) + { + this._read_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._read_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._etiqop_) + + toString(this._result_) + + toString(this._aff_) + + toString(this._read_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._etiqop_ == child) + { + this._etiqop_ = null; + return; + } + + if(this._result_ == child) + { + this._result_ = null; + return; + } + + if(this._aff_ == child) + { + this._aff_ = null; + return; + } + + if(this._read_ == child) + { + this._read_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._etiqop_ == oldChild) + { + setEtiqop((PEtiqop) newChild); + return; + } + + if(this._result_ == oldChild) + { + setResult((PTv) newChild); + return; + } + + if(this._aff_ == oldChild) + { + setAff((TAff) newChild); + return; + } + + if(this._read_ == oldChild) + { + setRead((TRead) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AIreadInst.java b/src/c3aParser/node/AIreadInst.java new file mode 100644 index 0000000..3083585 --- /dev/null +++ b/src/c3aParser/node/AIreadInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AIreadInst extends PInst +{ + private PIread _iread_; + + public AIreadInst() + { + // Constructor + } + + public AIreadInst( + @SuppressWarnings("hiding") PIread _iread_) + { + // Constructor + setIread(_iread_); + + } + + @Override + public Object clone() + { + return new AIreadInst( + cloneNode(this._iread_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAIreadInst(this); + } + + public PIread getIread() + { + return this._iread_; + } + + public void setIread(PIread node) + { + if(this._iread_ != null) + { + this._iread_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._iread_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._iread_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._iread_ == child) + { + this._iread_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._iread_ == oldChild) + { + setIread((PIread) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AIstop.java b/src/c3aParser/node/AIstop.java new file mode 100644 index 0000000..0f33ed2 --- /dev/null +++ b/src/c3aParser/node/AIstop.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AIstop extends PIstop +{ + private PEtiqop _etiqop_; + private TStop _stop_; + private PCtv _ctv_; + + public AIstop() + { + // Constructor + } + + public AIstop( + @SuppressWarnings("hiding") PEtiqop _etiqop_, + @SuppressWarnings("hiding") TStop _stop_, + @SuppressWarnings("hiding") PCtv _ctv_) + { + // Constructor + setEtiqop(_etiqop_); + + setStop(_stop_); + + setCtv(_ctv_); + + } + + @Override + public Object clone() + { + return new AIstop( + cloneNode(this._etiqop_), + cloneNode(this._stop_), + cloneNode(this._ctv_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAIstop(this); + } + + public PEtiqop getEtiqop() + { + return this._etiqop_; + } + + public void setEtiqop(PEtiqop node) + { + if(this._etiqop_ != null) + { + this._etiqop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._etiqop_ = node; + } + + public TStop getStop() + { + return this._stop_; + } + + public void setStop(TStop node) + { + if(this._stop_ != null) + { + this._stop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._stop_ = node; + } + + public PCtv getCtv() + { + return this._ctv_; + } + + public void setCtv(PCtv node) + { + if(this._ctv_ != null) + { + this._ctv_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ctv_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._etiqop_) + + toString(this._stop_) + + toString(this._ctv_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._etiqop_ == child) + { + this._etiqop_ = null; + return; + } + + if(this._stop_ == child) + { + this._stop_ = null; + return; + } + + if(this._ctv_ == child) + { + this._ctv_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._etiqop_ == oldChild) + { + setEtiqop((PEtiqop) newChild); + return; + } + + if(this._stop_ == oldChild) + { + setStop((TStop) newChild); + return; + } + + if(this._ctv_ == oldChild) + { + setCtv((PCtv) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AIwrite.java b/src/c3aParser/node/AIwrite.java new file mode 100644 index 0000000..0bf77db --- /dev/null +++ b/src/c3aParser/node/AIwrite.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AIwrite extends PIwrite +{ + private PEtiqop _etiqop_; + private TWrite _write_; + private PCtv _ctv_; + + public AIwrite() + { + // Constructor + } + + public AIwrite( + @SuppressWarnings("hiding") PEtiqop _etiqop_, + @SuppressWarnings("hiding") TWrite _write_, + @SuppressWarnings("hiding") PCtv _ctv_) + { + // Constructor + setEtiqop(_etiqop_); + + setWrite(_write_); + + setCtv(_ctv_); + + } + + @Override + public Object clone() + { + return new AIwrite( + cloneNode(this._etiqop_), + cloneNode(this._write_), + cloneNode(this._ctv_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAIwrite(this); + } + + public PEtiqop getEtiqop() + { + return this._etiqop_; + } + + public void setEtiqop(PEtiqop node) + { + if(this._etiqop_ != null) + { + this._etiqop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._etiqop_ = node; + } + + public TWrite getWrite() + { + return this._write_; + } + + public void setWrite(TWrite node) + { + if(this._write_ != null) + { + this._write_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._write_ = node; + } + + public PCtv getCtv() + { + return this._ctv_; + } + + public void setCtv(PCtv node) + { + if(this._ctv_ != null) + { + this._ctv_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ctv_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._etiqop_) + + toString(this._write_) + + toString(this._ctv_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._etiqop_ == child) + { + this._etiqop_ = null; + return; + } + + if(this._write_ == child) + { + this._write_ = null; + return; + } + + if(this._ctv_ == child) + { + this._ctv_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._etiqop_ == oldChild) + { + setEtiqop((PEtiqop) newChild); + return; + } + + if(this._write_ == oldChild) + { + setWrite((TWrite) newChild); + return; + } + + if(this._ctv_ == oldChild) + { + setCtv((PCtv) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AIwriteInst.java b/src/c3aParser/node/AIwriteInst.java new file mode 100644 index 0000000..dd00543 --- /dev/null +++ b/src/c3aParser/node/AIwriteInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AIwriteInst extends PInst +{ + private PIwrite _iwrite_; + + public AIwriteInst() + { + // Constructor + } + + public AIwriteInst( + @SuppressWarnings("hiding") PIwrite _iwrite_) + { + // Constructor + setIwrite(_iwrite_); + + } + + @Override + public Object clone() + { + return new AIwriteInst( + cloneNode(this._iwrite_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAIwriteInst(this); + } + + public PIwrite getIwrite() + { + return this._iwrite_; + } + + public void setIwrite(PIwrite node) + { + if(this._iwrite_ != null) + { + this._iwrite_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._iwrite_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._iwrite_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._iwrite_ == child) + { + this._iwrite_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._iwrite_ == oldChild) + { + setIwrite((PIwrite) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AJminfegInst.java b/src/c3aParser/node/AJminfegInst.java new file mode 100644 index 0000000..cc5bec6 --- /dev/null +++ b/src/c3aParser/node/AJminfegInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJminfegInst extends PInst +{ + private PJmpinfeg _jmpinfeg_; + + public AJminfegInst() + { + // Constructor + } + + public AJminfegInst( + @SuppressWarnings("hiding") PJmpinfeg _jmpinfeg_) + { + // Constructor + setJmpinfeg(_jmpinfeg_); + + } + + @Override + public Object clone() + { + return new AJminfegInst( + cloneNode(this._jmpinfeg_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJminfegInst(this); + } + + public PJmpinfeg getJmpinfeg() + { + return this._jmpinfeg_; + } + + public void setJmpinfeg(PJmpinfeg node) + { + if(this._jmpinfeg_ != null) + { + this._jmpinfeg_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._jmpinfeg_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._jmpinfeg_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._jmpinfeg_ == child) + { + this._jmpinfeg_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._jmpinfeg_ == oldChild) + { + setJmpinfeg((PJmpinfeg) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AJmp.java b/src/c3aParser/node/AJmp.java new file mode 100644 index 0000000..e7e5c61 --- /dev/null +++ b/src/c3aParser/node/AJmp.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJmp extends PJmp +{ + private PEtiqop _etiqop_; + private TGoto _goto_; + private PConstante _result_; + + public AJmp() + { + // Constructor + } + + public AJmp( + @SuppressWarnings("hiding") PEtiqop _etiqop_, + @SuppressWarnings("hiding") TGoto _goto_, + @SuppressWarnings("hiding") PConstante _result_) + { + // Constructor + setEtiqop(_etiqop_); + + setGoto(_goto_); + + setResult(_result_); + + } + + @Override + public Object clone() + { + return new AJmp( + cloneNode(this._etiqop_), + cloneNode(this._goto_), + cloneNode(this._result_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJmp(this); + } + + public PEtiqop getEtiqop() + { + return this._etiqop_; + } + + public void setEtiqop(PEtiqop node) + { + if(this._etiqop_ != null) + { + this._etiqop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._etiqop_ = node; + } + + public TGoto getGoto() + { + return this._goto_; + } + + public void setGoto(TGoto node) + { + if(this._goto_ != null) + { + this._goto_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._goto_ = node; + } + + public PConstante getResult() + { + return this._result_; + } + + public void setResult(PConstante node) + { + if(this._result_ != null) + { + this._result_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._result_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._etiqop_) + + toString(this._goto_) + + toString(this._result_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._etiqop_ == child) + { + this._etiqop_ = null; + return; + } + + if(this._goto_ == child) + { + this._goto_ = null; + return; + } + + if(this._result_ == child) + { + this._result_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._etiqop_ == oldChild) + { + setEtiqop((PEtiqop) newChild); + return; + } + + if(this._goto_ == oldChild) + { + setGoto((TGoto) newChild); + return; + } + + if(this._result_ == oldChild) + { + setResult((PConstante) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AJmpInst.java b/src/c3aParser/node/AJmpInst.java new file mode 100644 index 0000000..5531004 --- /dev/null +++ b/src/c3aParser/node/AJmpInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJmpInst extends PInst +{ + private PJmp _jmp_; + + public AJmpInst() + { + // Constructor + } + + public AJmpInst( + @SuppressWarnings("hiding") PJmp _jmp_) + { + // Constructor + setJmp(_jmp_); + + } + + @Override + public Object clone() + { + return new AJmpInst( + cloneNode(this._jmp_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJmpInst(this); + } + + public PJmp getJmp() + { + return this._jmp_; + } + + public void setJmp(PJmp node) + { + if(this._jmp_ != null) + { + this._jmp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._jmp_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._jmp_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._jmp_ == child) + { + this._jmp_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._jmp_ == oldChild) + { + setJmp((PJmp) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AJmpeg.java b/src/c3aParser/node/AJmpeg.java new file mode 100644 index 0000000..7aece53 --- /dev/null +++ b/src/c3aParser/node/AJmpeg.java @@ -0,0 +1,353 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJmpeg extends PJmpeg +{ + private PEtiqop _etiqop_; + private TIf _if_; + private PCtv _op1_; + private TEq _eq_; + private PCtv _op2_; + private TGoto _goto_; + private PConstante _result_; + + public AJmpeg() + { + // Constructor + } + + public AJmpeg( + @SuppressWarnings("hiding") PEtiqop _etiqop_, + @SuppressWarnings("hiding") TIf _if_, + @SuppressWarnings("hiding") PCtv _op1_, + @SuppressWarnings("hiding") TEq _eq_, + @SuppressWarnings("hiding") PCtv _op2_, + @SuppressWarnings("hiding") TGoto _goto_, + @SuppressWarnings("hiding") PConstante _result_) + { + // Constructor + setEtiqop(_etiqop_); + + setIf(_if_); + + setOp1(_op1_); + + setEq(_eq_); + + setOp2(_op2_); + + setGoto(_goto_); + + setResult(_result_); + + } + + @Override + public Object clone() + { + return new AJmpeg( + cloneNode(this._etiqop_), + cloneNode(this._if_), + cloneNode(this._op1_), + cloneNode(this._eq_), + cloneNode(this._op2_), + cloneNode(this._goto_), + cloneNode(this._result_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJmpeg(this); + } + + public PEtiqop getEtiqop() + { + return this._etiqop_; + } + + public void setEtiqop(PEtiqop node) + { + if(this._etiqop_ != null) + { + this._etiqop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._etiqop_ = node; + } + + public TIf getIf() + { + return this._if_; + } + + public void setIf(TIf node) + { + if(this._if_ != null) + { + this._if_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._if_ = node; + } + + public PCtv getOp1() + { + return this._op1_; + } + + public void setOp1(PCtv node) + { + if(this._op1_ != null) + { + this._op1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op1_ = node; + } + + public TEq getEq() + { + return this._eq_; + } + + public void setEq(TEq node) + { + if(this._eq_ != null) + { + this._eq_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._eq_ = node; + } + + public PCtv getOp2() + { + return this._op2_; + } + + public void setOp2(PCtv node) + { + if(this._op2_ != null) + { + this._op2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op2_ = node; + } + + public TGoto getGoto() + { + return this._goto_; + } + + public void setGoto(TGoto node) + { + if(this._goto_ != null) + { + this._goto_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._goto_ = node; + } + + public PConstante getResult() + { + return this._result_; + } + + public void setResult(PConstante node) + { + if(this._result_ != null) + { + this._result_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._result_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._etiqop_) + + toString(this._if_) + + toString(this._op1_) + + toString(this._eq_) + + toString(this._op2_) + + toString(this._goto_) + + toString(this._result_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._etiqop_ == child) + { + this._etiqop_ = null; + return; + } + + if(this._if_ == child) + { + this._if_ = null; + return; + } + + if(this._op1_ == child) + { + this._op1_ = null; + return; + } + + if(this._eq_ == child) + { + this._eq_ = null; + return; + } + + if(this._op2_ == child) + { + this._op2_ = null; + return; + } + + if(this._goto_ == child) + { + this._goto_ = null; + return; + } + + if(this._result_ == child) + { + this._result_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._etiqop_ == oldChild) + { + setEtiqop((PEtiqop) newChild); + return; + } + + if(this._if_ == oldChild) + { + setIf((TIf) newChild); + return; + } + + if(this._op1_ == oldChild) + { + setOp1((PCtv) newChild); + return; + } + + if(this._eq_ == oldChild) + { + setEq((TEq) newChild); + return; + } + + if(this._op2_ == oldChild) + { + setOp2((PCtv) newChild); + return; + } + + if(this._goto_ == oldChild) + { + setGoto((TGoto) newChild); + return; + } + + if(this._result_ == oldChild) + { + setResult((PConstante) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AJmpegInst.java b/src/c3aParser/node/AJmpegInst.java new file mode 100644 index 0000000..112ca14 --- /dev/null +++ b/src/c3aParser/node/AJmpegInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJmpegInst extends PInst +{ + private PJmpeg _jmpeg_; + + public AJmpegInst() + { + // Constructor + } + + public AJmpegInst( + @SuppressWarnings("hiding") PJmpeg _jmpeg_) + { + // Constructor + setJmpeg(_jmpeg_); + + } + + @Override + public Object clone() + { + return new AJmpegInst( + cloneNode(this._jmpeg_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJmpegInst(this); + } + + public PJmpeg getJmpeg() + { + return this._jmpeg_; + } + + public void setJmpeg(PJmpeg node) + { + if(this._jmpeg_ != null) + { + this._jmpeg_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._jmpeg_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._jmpeg_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._jmpeg_ == child) + { + this._jmpeg_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._jmpeg_ == oldChild) + { + setJmpeg((PJmpeg) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AJmpinf.java b/src/c3aParser/node/AJmpinf.java new file mode 100644 index 0000000..6eb092a --- /dev/null +++ b/src/c3aParser/node/AJmpinf.java @@ -0,0 +1,353 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJmpinf extends PJmpinf +{ + private PEtiqop _etiqop_; + private TIf _if_; + private PCtv _op1_; + private TInf _inf_; + private PCtv _op2_; + private TGoto _goto_; + private PConstante _result_; + + public AJmpinf() + { + // Constructor + } + + public AJmpinf( + @SuppressWarnings("hiding") PEtiqop _etiqop_, + @SuppressWarnings("hiding") TIf _if_, + @SuppressWarnings("hiding") PCtv _op1_, + @SuppressWarnings("hiding") TInf _inf_, + @SuppressWarnings("hiding") PCtv _op2_, + @SuppressWarnings("hiding") TGoto _goto_, + @SuppressWarnings("hiding") PConstante _result_) + { + // Constructor + setEtiqop(_etiqop_); + + setIf(_if_); + + setOp1(_op1_); + + setInf(_inf_); + + setOp2(_op2_); + + setGoto(_goto_); + + setResult(_result_); + + } + + @Override + public Object clone() + { + return new AJmpinf( + cloneNode(this._etiqop_), + cloneNode(this._if_), + cloneNode(this._op1_), + cloneNode(this._inf_), + cloneNode(this._op2_), + cloneNode(this._goto_), + cloneNode(this._result_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJmpinf(this); + } + + public PEtiqop getEtiqop() + { + return this._etiqop_; + } + + public void setEtiqop(PEtiqop node) + { + if(this._etiqop_ != null) + { + this._etiqop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._etiqop_ = node; + } + + public TIf getIf() + { + return this._if_; + } + + public void setIf(TIf node) + { + if(this._if_ != null) + { + this._if_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._if_ = node; + } + + public PCtv getOp1() + { + return this._op1_; + } + + public void setOp1(PCtv node) + { + if(this._op1_ != null) + { + this._op1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op1_ = 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 PCtv getOp2() + { + return this._op2_; + } + + public void setOp2(PCtv node) + { + if(this._op2_ != null) + { + this._op2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op2_ = node; + } + + public TGoto getGoto() + { + return this._goto_; + } + + public void setGoto(TGoto node) + { + if(this._goto_ != null) + { + this._goto_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._goto_ = node; + } + + public PConstante getResult() + { + return this._result_; + } + + public void setResult(PConstante node) + { + if(this._result_ != null) + { + this._result_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._result_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._etiqop_) + + toString(this._if_) + + toString(this._op1_) + + toString(this._inf_) + + toString(this._op2_) + + toString(this._goto_) + + toString(this._result_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._etiqop_ == child) + { + this._etiqop_ = null; + return; + } + + if(this._if_ == child) + { + this._if_ = null; + return; + } + + if(this._op1_ == child) + { + this._op1_ = null; + return; + } + + if(this._inf_ == child) + { + this._inf_ = null; + return; + } + + if(this._op2_ == child) + { + this._op2_ = null; + return; + } + + if(this._goto_ == child) + { + this._goto_ = null; + return; + } + + if(this._result_ == child) + { + this._result_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._etiqop_ == oldChild) + { + setEtiqop((PEtiqop) newChild); + return; + } + + if(this._if_ == oldChild) + { + setIf((TIf) newChild); + return; + } + + if(this._op1_ == oldChild) + { + setOp1((PCtv) newChild); + return; + } + + if(this._inf_ == oldChild) + { + setInf((TInf) newChild); + return; + } + + if(this._op2_ == oldChild) + { + setOp2((PCtv) newChild); + return; + } + + if(this._goto_ == oldChild) + { + setGoto((TGoto) newChild); + return; + } + + if(this._result_ == oldChild) + { + setResult((PConstante) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AJmpinfInst.java b/src/c3aParser/node/AJmpinfInst.java new file mode 100644 index 0000000..c737a85 --- /dev/null +++ b/src/c3aParser/node/AJmpinfInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJmpinfInst extends PInst +{ + private PJmpinf _jmpinf_; + + public AJmpinfInst() + { + // Constructor + } + + public AJmpinfInst( + @SuppressWarnings("hiding") PJmpinf _jmpinf_) + { + // Constructor + setJmpinf(_jmpinf_); + + } + + @Override + public Object clone() + { + return new AJmpinfInst( + cloneNode(this._jmpinf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJmpinfInst(this); + } + + public PJmpinf getJmpinf() + { + return this._jmpinf_; + } + + public void setJmpinf(PJmpinf node) + { + if(this._jmpinf_ != null) + { + this._jmpinf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._jmpinf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._jmpinf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._jmpinf_ == child) + { + this._jmpinf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._jmpinf_ == oldChild) + { + setJmpinf((PJmpinf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AJmpinfeg.java b/src/c3aParser/node/AJmpinfeg.java new file mode 100644 index 0000000..eb3559f --- /dev/null +++ b/src/c3aParser/node/AJmpinfeg.java @@ -0,0 +1,353 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJmpinfeg extends PJmpinfeg +{ + private PEtiqop _etiqop_; + private TIf _if_; + private PCtv _op1_; + private TInfeq _infeq_; + private PCtv _op2_; + private TGoto _goto_; + private PConstante _result_; + + public AJmpinfeg() + { + // Constructor + } + + public AJmpinfeg( + @SuppressWarnings("hiding") PEtiqop _etiqop_, + @SuppressWarnings("hiding") TIf _if_, + @SuppressWarnings("hiding") PCtv _op1_, + @SuppressWarnings("hiding") TInfeq _infeq_, + @SuppressWarnings("hiding") PCtv _op2_, + @SuppressWarnings("hiding") TGoto _goto_, + @SuppressWarnings("hiding") PConstante _result_) + { + // Constructor + setEtiqop(_etiqop_); + + setIf(_if_); + + setOp1(_op1_); + + setInfeq(_infeq_); + + setOp2(_op2_); + + setGoto(_goto_); + + setResult(_result_); + + } + + @Override + public Object clone() + { + return new AJmpinfeg( + cloneNode(this._etiqop_), + cloneNode(this._if_), + cloneNode(this._op1_), + cloneNode(this._infeq_), + cloneNode(this._op2_), + cloneNode(this._goto_), + cloneNode(this._result_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJmpinfeg(this); + } + + public PEtiqop getEtiqop() + { + return this._etiqop_; + } + + public void setEtiqop(PEtiqop node) + { + if(this._etiqop_ != null) + { + this._etiqop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._etiqop_ = node; + } + + public TIf getIf() + { + return this._if_; + } + + public void setIf(TIf node) + { + if(this._if_ != null) + { + this._if_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._if_ = node; + } + + public PCtv getOp1() + { + return this._op1_; + } + + public void setOp1(PCtv node) + { + if(this._op1_ != null) + { + this._op1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op1_ = node; + } + + public TInfeq getInfeq() + { + return this._infeq_; + } + + public void setInfeq(TInfeq node) + { + if(this._infeq_ != null) + { + this._infeq_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._infeq_ = node; + } + + public PCtv getOp2() + { + return this._op2_; + } + + public void setOp2(PCtv node) + { + if(this._op2_ != null) + { + this._op2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op2_ = node; + } + + public TGoto getGoto() + { + return this._goto_; + } + + public void setGoto(TGoto node) + { + if(this._goto_ != null) + { + this._goto_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._goto_ = node; + } + + public PConstante getResult() + { + return this._result_; + } + + public void setResult(PConstante node) + { + if(this._result_ != null) + { + this._result_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._result_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._etiqop_) + + toString(this._if_) + + toString(this._op1_) + + toString(this._infeq_) + + toString(this._op2_) + + toString(this._goto_) + + toString(this._result_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._etiqop_ == child) + { + this._etiqop_ = null; + return; + } + + if(this._if_ == child) + { + this._if_ = null; + return; + } + + if(this._op1_ == child) + { + this._op1_ = null; + return; + } + + if(this._infeq_ == child) + { + this._infeq_ = null; + return; + } + + if(this._op2_ == child) + { + this._op2_ = null; + return; + } + + if(this._goto_ == child) + { + this._goto_ = null; + return; + } + + if(this._result_ == child) + { + this._result_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._etiqop_ == oldChild) + { + setEtiqop((PEtiqop) newChild); + return; + } + + if(this._if_ == oldChild) + { + setIf((TIf) newChild); + return; + } + + if(this._op1_ == oldChild) + { + setOp1((PCtv) newChild); + return; + } + + if(this._infeq_ == oldChild) + { + setInfeq((TInfeq) newChild); + return; + } + + if(this._op2_ == oldChild) + { + setOp2((PCtv) newChild); + return; + } + + if(this._goto_ == oldChild) + { + setGoto((TGoto) newChild); + return; + } + + if(this._result_ == oldChild) + { + setResult((PConstante) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AJmpneg.java b/src/c3aParser/node/AJmpneg.java new file mode 100644 index 0000000..8944ae3 --- /dev/null +++ b/src/c3aParser/node/AJmpneg.java @@ -0,0 +1,353 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJmpneg extends PJmpneg +{ + private PEtiqop _etiqop_; + private TIf _if_; + private PCtv _op1_; + private TNoteq _noteq_; + private PCtv _op2_; + private TGoto _goto_; + private PConstante _result_; + + public AJmpneg() + { + // Constructor + } + + public AJmpneg( + @SuppressWarnings("hiding") PEtiqop _etiqop_, + @SuppressWarnings("hiding") TIf _if_, + @SuppressWarnings("hiding") PCtv _op1_, + @SuppressWarnings("hiding") TNoteq _noteq_, + @SuppressWarnings("hiding") PCtv _op2_, + @SuppressWarnings("hiding") TGoto _goto_, + @SuppressWarnings("hiding") PConstante _result_) + { + // Constructor + setEtiqop(_etiqop_); + + setIf(_if_); + + setOp1(_op1_); + + setNoteq(_noteq_); + + setOp2(_op2_); + + setGoto(_goto_); + + setResult(_result_); + + } + + @Override + public Object clone() + { + return new AJmpneg( + cloneNode(this._etiqop_), + cloneNode(this._if_), + cloneNode(this._op1_), + cloneNode(this._noteq_), + cloneNode(this._op2_), + cloneNode(this._goto_), + cloneNode(this._result_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJmpneg(this); + } + + public PEtiqop getEtiqop() + { + return this._etiqop_; + } + + public void setEtiqop(PEtiqop node) + { + if(this._etiqop_ != null) + { + this._etiqop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._etiqop_ = node; + } + + public TIf getIf() + { + return this._if_; + } + + public void setIf(TIf node) + { + if(this._if_ != null) + { + this._if_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._if_ = node; + } + + public PCtv getOp1() + { + return this._op1_; + } + + public void setOp1(PCtv node) + { + if(this._op1_ != null) + { + this._op1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op1_ = node; + } + + public TNoteq getNoteq() + { + return this._noteq_; + } + + public void setNoteq(TNoteq node) + { + if(this._noteq_ != null) + { + this._noteq_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._noteq_ = node; + } + + public PCtv getOp2() + { + return this._op2_; + } + + public void setOp2(PCtv node) + { + if(this._op2_ != null) + { + this._op2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op2_ = node; + } + + public TGoto getGoto() + { + return this._goto_; + } + + public void setGoto(TGoto node) + { + if(this._goto_ != null) + { + this._goto_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._goto_ = node; + } + + public PConstante getResult() + { + return this._result_; + } + + public void setResult(PConstante node) + { + if(this._result_ != null) + { + this._result_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._result_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._etiqop_) + + toString(this._if_) + + toString(this._op1_) + + toString(this._noteq_) + + toString(this._op2_) + + toString(this._goto_) + + toString(this._result_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._etiqop_ == child) + { + this._etiqop_ = null; + return; + } + + if(this._if_ == child) + { + this._if_ = null; + return; + } + + if(this._op1_ == child) + { + this._op1_ = null; + return; + } + + if(this._noteq_ == child) + { + this._noteq_ = null; + return; + } + + if(this._op2_ == child) + { + this._op2_ = null; + return; + } + + if(this._goto_ == child) + { + this._goto_ = null; + return; + } + + if(this._result_ == child) + { + this._result_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._etiqop_ == oldChild) + { + setEtiqop((PEtiqop) newChild); + return; + } + + if(this._if_ == oldChild) + { + setIf((TIf) newChild); + return; + } + + if(this._op1_ == oldChild) + { + setOp1((PCtv) newChild); + return; + } + + if(this._noteq_ == oldChild) + { + setNoteq((TNoteq) newChild); + return; + } + + if(this._op2_ == oldChild) + { + setOp2((PCtv) newChild); + return; + } + + if(this._goto_ == oldChild) + { + setGoto((TGoto) newChild); + return; + } + + if(this._result_ == oldChild) + { + setResult((PConstante) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AJmpnegInst.java b/src/c3aParser/node/AJmpnegInst.java new file mode 100644 index 0000000..6b9e460 --- /dev/null +++ b/src/c3aParser/node/AJmpnegInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJmpnegInst extends PInst +{ + private PJmpneg _jmpneg_; + + public AJmpnegInst() + { + // Constructor + } + + public AJmpnegInst( + @SuppressWarnings("hiding") PJmpneg _jmpneg_) + { + // Constructor + setJmpneg(_jmpneg_); + + } + + @Override + public Object clone() + { + return new AJmpnegInst( + cloneNode(this._jmpneg_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJmpnegInst(this); + } + + public PJmpneg getJmpneg() + { + return this._jmpneg_; + } + + public void setJmpneg(PJmpneg node) + { + if(this._jmpneg_ != null) + { + this._jmpneg_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._jmpneg_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._jmpneg_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._jmpneg_ == child) + { + this._jmpneg_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._jmpneg_ == oldChild) + { + setJmpneg((PJmpneg) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AJmpsup.java b/src/c3aParser/node/AJmpsup.java new file mode 100644 index 0000000..2609ea8 --- /dev/null +++ b/src/c3aParser/node/AJmpsup.java @@ -0,0 +1,353 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJmpsup extends PJmpsup +{ + private PEtiqop _etiqop_; + private TIf _if_; + private PCtv _op1_; + private TSup _sup_; + private PCtv _op2_; + private TGoto _goto_; + private PConstante _result_; + + public AJmpsup() + { + // Constructor + } + + public AJmpsup( + @SuppressWarnings("hiding") PEtiqop _etiqop_, + @SuppressWarnings("hiding") TIf _if_, + @SuppressWarnings("hiding") PCtv _op1_, + @SuppressWarnings("hiding") TSup _sup_, + @SuppressWarnings("hiding") PCtv _op2_, + @SuppressWarnings("hiding") TGoto _goto_, + @SuppressWarnings("hiding") PConstante _result_) + { + // Constructor + setEtiqop(_etiqop_); + + setIf(_if_); + + setOp1(_op1_); + + setSup(_sup_); + + setOp2(_op2_); + + setGoto(_goto_); + + setResult(_result_); + + } + + @Override + public Object clone() + { + return new AJmpsup( + cloneNode(this._etiqop_), + cloneNode(this._if_), + cloneNode(this._op1_), + cloneNode(this._sup_), + cloneNode(this._op2_), + cloneNode(this._goto_), + cloneNode(this._result_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJmpsup(this); + } + + public PEtiqop getEtiqop() + { + return this._etiqop_; + } + + public void setEtiqop(PEtiqop node) + { + if(this._etiqop_ != null) + { + this._etiqop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._etiqop_ = node; + } + + public TIf getIf() + { + return this._if_; + } + + public void setIf(TIf node) + { + if(this._if_ != null) + { + this._if_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._if_ = node; + } + + public PCtv getOp1() + { + return this._op1_; + } + + public void setOp1(PCtv node) + { + if(this._op1_ != null) + { + this._op1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op1_ = node; + } + + public TSup getSup() + { + return this._sup_; + } + + public void setSup(TSup node) + { + if(this._sup_ != null) + { + this._sup_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._sup_ = node; + } + + public PCtv getOp2() + { + return this._op2_; + } + + public void setOp2(PCtv node) + { + if(this._op2_ != null) + { + this._op2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op2_ = node; + } + + public TGoto getGoto() + { + return this._goto_; + } + + public void setGoto(TGoto node) + { + if(this._goto_ != null) + { + this._goto_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._goto_ = node; + } + + public PConstante getResult() + { + return this._result_; + } + + public void setResult(PConstante node) + { + if(this._result_ != null) + { + this._result_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._result_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._etiqop_) + + toString(this._if_) + + toString(this._op1_) + + toString(this._sup_) + + toString(this._op2_) + + toString(this._goto_) + + toString(this._result_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._etiqop_ == child) + { + this._etiqop_ = null; + return; + } + + if(this._if_ == child) + { + this._if_ = null; + return; + } + + if(this._op1_ == child) + { + this._op1_ = null; + return; + } + + if(this._sup_ == child) + { + this._sup_ = null; + return; + } + + if(this._op2_ == child) + { + this._op2_ = null; + return; + } + + if(this._goto_ == child) + { + this._goto_ = null; + return; + } + + if(this._result_ == child) + { + this._result_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._etiqop_ == oldChild) + { + setEtiqop((PEtiqop) newChild); + return; + } + + if(this._if_ == oldChild) + { + setIf((TIf) newChild); + return; + } + + if(this._op1_ == oldChild) + { + setOp1((PCtv) newChild); + return; + } + + if(this._sup_ == oldChild) + { + setSup((TSup) newChild); + return; + } + + if(this._op2_ == oldChild) + { + setOp2((PCtv) newChild); + return; + } + + if(this._goto_ == oldChild) + { + setGoto((TGoto) newChild); + return; + } + + if(this._result_ == oldChild) + { + setResult((PConstante) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AJmpsupInst.java b/src/c3aParser/node/AJmpsupInst.java new file mode 100644 index 0000000..45ce7e9 --- /dev/null +++ b/src/c3aParser/node/AJmpsupInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJmpsupInst extends PInst +{ + private PJmpsup _jmpsup_; + + public AJmpsupInst() + { + // Constructor + } + + public AJmpsupInst( + @SuppressWarnings("hiding") PJmpsup _jmpsup_) + { + // Constructor + setJmpsup(_jmpsup_); + + } + + @Override + public Object clone() + { + return new AJmpsupInst( + cloneNode(this._jmpsup_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJmpsupInst(this); + } + + public PJmpsup getJmpsup() + { + return this._jmpsup_; + } + + public void setJmpsup(PJmpsup node) + { + if(this._jmpsup_ != null) + { + this._jmpsup_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._jmpsup_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._jmpsup_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._jmpsup_ == child) + { + this._jmpsup_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._jmpsup_ == oldChild) + { + setJmpsup((PJmpsup) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AJmpsupeg.java b/src/c3aParser/node/AJmpsupeg.java new file mode 100644 index 0000000..6d1ce64 --- /dev/null +++ b/src/c3aParser/node/AJmpsupeg.java @@ -0,0 +1,353 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJmpsupeg extends PJmpsupeg +{ + private PEtiqop _etiqop_; + private TIf _if_; + private PCtv _op1_; + private TSupeq _supeq_; + private PCtv _op2_; + private TGoto _goto_; + private PConstante _result_; + + public AJmpsupeg() + { + // Constructor + } + + public AJmpsupeg( + @SuppressWarnings("hiding") PEtiqop _etiqop_, + @SuppressWarnings("hiding") TIf _if_, + @SuppressWarnings("hiding") PCtv _op1_, + @SuppressWarnings("hiding") TSupeq _supeq_, + @SuppressWarnings("hiding") PCtv _op2_, + @SuppressWarnings("hiding") TGoto _goto_, + @SuppressWarnings("hiding") PConstante _result_) + { + // Constructor + setEtiqop(_etiqop_); + + setIf(_if_); + + setOp1(_op1_); + + setSupeq(_supeq_); + + setOp2(_op2_); + + setGoto(_goto_); + + setResult(_result_); + + } + + @Override + public Object clone() + { + return new AJmpsupeg( + cloneNode(this._etiqop_), + cloneNode(this._if_), + cloneNode(this._op1_), + cloneNode(this._supeq_), + cloneNode(this._op2_), + cloneNode(this._goto_), + cloneNode(this._result_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJmpsupeg(this); + } + + public PEtiqop getEtiqop() + { + return this._etiqop_; + } + + public void setEtiqop(PEtiqop node) + { + if(this._etiqop_ != null) + { + this._etiqop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._etiqop_ = node; + } + + public TIf getIf() + { + return this._if_; + } + + public void setIf(TIf node) + { + if(this._if_ != null) + { + this._if_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._if_ = node; + } + + public PCtv getOp1() + { + return this._op1_; + } + + public void setOp1(PCtv node) + { + if(this._op1_ != null) + { + this._op1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op1_ = node; + } + + public TSupeq getSupeq() + { + return this._supeq_; + } + + public void setSupeq(TSupeq node) + { + if(this._supeq_ != null) + { + this._supeq_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._supeq_ = node; + } + + public PCtv getOp2() + { + return this._op2_; + } + + public void setOp2(PCtv node) + { + if(this._op2_ != null) + { + this._op2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op2_ = node; + } + + public TGoto getGoto() + { + return this._goto_; + } + + public void setGoto(TGoto node) + { + if(this._goto_ != null) + { + this._goto_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._goto_ = node; + } + + public PConstante getResult() + { + return this._result_; + } + + public void setResult(PConstante node) + { + if(this._result_ != null) + { + this._result_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._result_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._etiqop_) + + toString(this._if_) + + toString(this._op1_) + + toString(this._supeq_) + + toString(this._op2_) + + toString(this._goto_) + + toString(this._result_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._etiqop_ == child) + { + this._etiqop_ = null; + return; + } + + if(this._if_ == child) + { + this._if_ = null; + return; + } + + if(this._op1_ == child) + { + this._op1_ = null; + return; + } + + if(this._supeq_ == child) + { + this._supeq_ = null; + return; + } + + if(this._op2_ == child) + { + this._op2_ = null; + return; + } + + if(this._goto_ == child) + { + this._goto_ = null; + return; + } + + if(this._result_ == child) + { + this._result_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._etiqop_ == oldChild) + { + setEtiqop((PEtiqop) newChild); + return; + } + + if(this._if_ == oldChild) + { + setIf((TIf) newChild); + return; + } + + if(this._op1_ == oldChild) + { + setOp1((PCtv) newChild); + return; + } + + if(this._supeq_ == oldChild) + { + setSupeq((TSupeq) newChild); + return; + } + + if(this._op2_ == oldChild) + { + setOp2((PCtv) newChild); + return; + } + + if(this._goto_ == oldChild) + { + setGoto((TGoto) newChild); + return; + } + + if(this._result_ == oldChild) + { + setResult((PConstante) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AJmpsupegInst.java b/src/c3aParser/node/AJmpsupegInst.java new file mode 100644 index 0000000..11c908e --- /dev/null +++ b/src/c3aParser/node/AJmpsupegInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJmpsupegInst extends PInst +{ + private PJmpsupeg _jmpsupeg_; + + public AJmpsupegInst() + { + // Constructor + } + + public AJmpsupegInst( + @SuppressWarnings("hiding") PJmpsupeg _jmpsupeg_) + { + // Constructor + setJmpsupeg(_jmpsupeg_); + + } + + @Override + public Object clone() + { + return new AJmpsupegInst( + cloneNode(this._jmpsupeg_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJmpsupegInst(this); + } + + public PJmpsupeg getJmpsupeg() + { + return this._jmpsupeg_; + } + + public void setJmpsupeg(PJmpsupeg node) + { + if(this._jmpsupeg_ != null) + { + this._jmpsupeg_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._jmpsupeg_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._jmpsupeg_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._jmpsupeg_ == child) + { + this._jmpsupeg_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._jmpsupeg_ == oldChild) + { + setJmpsupeg((PJmpsupeg) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AMul.java b/src/c3aParser/node/AMul.java new file mode 100644 index 0000000..438face --- /dev/null +++ b/src/c3aParser/node/AMul.java @@ -0,0 +1,310 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AMul extends PMul +{ + private PEtiqop _etiqop_; + private PTv _result_; + private TAff _aff_; + private PCtv _op1_; + private TFois _fois_; + private PCtv _op2_; + + public AMul() + { + // Constructor + } + + public AMul( + @SuppressWarnings("hiding") PEtiqop _etiqop_, + @SuppressWarnings("hiding") PTv _result_, + @SuppressWarnings("hiding") TAff _aff_, + @SuppressWarnings("hiding") PCtv _op1_, + @SuppressWarnings("hiding") TFois _fois_, + @SuppressWarnings("hiding") PCtv _op2_) + { + // Constructor + setEtiqop(_etiqop_); + + setResult(_result_); + + setAff(_aff_); + + setOp1(_op1_); + + setFois(_fois_); + + setOp2(_op2_); + + } + + @Override + public Object clone() + { + return new AMul( + cloneNode(this._etiqop_), + cloneNode(this._result_), + cloneNode(this._aff_), + cloneNode(this._op1_), + cloneNode(this._fois_), + cloneNode(this._op2_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAMul(this); + } + + public PEtiqop getEtiqop() + { + return this._etiqop_; + } + + public void setEtiqop(PEtiqop node) + { + if(this._etiqop_ != null) + { + this._etiqop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._etiqop_ = node; + } + + public PTv getResult() + { + return this._result_; + } + + public void setResult(PTv node) + { + if(this._result_ != null) + { + this._result_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._result_ = node; + } + + public TAff getAff() + { + return this._aff_; + } + + public void setAff(TAff node) + { + if(this._aff_ != null) + { + this._aff_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._aff_ = node; + } + + public PCtv getOp1() + { + return this._op1_; + } + + public void setOp1(PCtv node) + { + if(this._op1_ != null) + { + this._op1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op1_ = 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 PCtv getOp2() + { + return this._op2_; + } + + public void setOp2(PCtv node) + { + if(this._op2_ != null) + { + this._op2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op2_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._etiqop_) + + toString(this._result_) + + toString(this._aff_) + + toString(this._op1_) + + toString(this._fois_) + + toString(this._op2_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._etiqop_ == child) + { + this._etiqop_ = null; + return; + } + + if(this._result_ == child) + { + this._result_ = null; + return; + } + + if(this._aff_ == child) + { + this._aff_ = null; + return; + } + + if(this._op1_ == child) + { + this._op1_ = null; + return; + } + + if(this._fois_ == child) + { + this._fois_ = null; + return; + } + + if(this._op2_ == child) + { + this._op2_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._etiqop_ == oldChild) + { + setEtiqop((PEtiqop) newChild); + return; + } + + if(this._result_ == oldChild) + { + setResult((PTv) newChild); + return; + } + + if(this._aff_ == oldChild) + { + setAff((TAff) newChild); + return; + } + + if(this._op1_ == oldChild) + { + setOp1((PCtv) newChild); + return; + } + + if(this._fois_ == oldChild) + { + setFois((TFois) newChild); + return; + } + + if(this._op2_ == oldChild) + { + setOp2((PCtv) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AMulInst.java b/src/c3aParser/node/AMulInst.java new file mode 100644 index 0000000..9d22319 --- /dev/null +++ b/src/c3aParser/node/AMulInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AMulInst extends PInst +{ + private PMul _mul_; + + public AMulInst() + { + // Constructor + } + + public AMulInst( + @SuppressWarnings("hiding") PMul _mul_) + { + // Constructor + setMul(_mul_); + + } + + @Override + public Object clone() + { + return new AMulInst( + cloneNode(this._mul_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAMulInst(this); + } + + public PMul getMul() + { + return this._mul_; + } + + public void setMul(PMul node) + { + if(this._mul_ != null) + { + this._mul_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._mul_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._mul_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._mul_ == child) + { + this._mul_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._mul_ == oldChild) + { + setMul((PMul) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AProg.java b/src/c3aParser/node/AProg.java new file mode 100644 index 0000000..e20c2fa --- /dev/null +++ b/src/c3aParser/node/AProg.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AProg extends PProg +{ + private PListeinst _listeinst_; + + public AProg() + { + // Constructor + } + + public AProg( + @SuppressWarnings("hiding") PListeinst _listeinst_) + { + // Constructor + setListeinst(_listeinst_); + + } + + @Override + public Object clone() + { + return new AProg( + cloneNode(this._listeinst_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAProg(this); + } + + public PListeinst getListeinst() + { + return this._listeinst_; + } + + public void setListeinst(PListeinst node) + { + if(this._listeinst_ != null) + { + this._listeinst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._listeinst_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._listeinst_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._listeinst_ == child) + { + this._listeinst_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._listeinst_ == oldChild) + { + setListeinst((PListeinst) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/ARecursifListeinst.java b/src/c3aParser/node/ARecursifListeinst.java new file mode 100644 index 0000000..9e04694 --- /dev/null +++ b/src/c3aParser/node/ARecursifListeinst.java @@ -0,0 +1,138 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class ARecursifListeinst extends PListeinst +{ + private PInst _inst_; + private PListeinst _listeinst_; + + public ARecursifListeinst() + { + // Constructor + } + + public ARecursifListeinst( + @SuppressWarnings("hiding") PInst _inst_, + @SuppressWarnings("hiding") PListeinst _listeinst_) + { + // Constructor + setInst(_inst_); + + setListeinst(_listeinst_); + + } + + @Override + public Object clone() + { + return new ARecursifListeinst( + cloneNode(this._inst_), + cloneNode(this._listeinst_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseARecursifListeinst(this); + } + + public PInst getInst() + { + return this._inst_; + } + + public void setInst(PInst node) + { + if(this._inst_ != null) + { + this._inst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._inst_ = node; + } + + public PListeinst getListeinst() + { + return this._listeinst_; + } + + public void setListeinst(PListeinst node) + { + if(this._listeinst_ != null) + { + this._listeinst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._listeinst_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._inst_) + + toString(this._listeinst_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._inst_ == child) + { + this._inst_ = null; + return; + } + + if(this._listeinst_ == child) + { + this._listeinst_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._inst_ == oldChild) + { + setInst((PInst) newChild); + return; + } + + if(this._listeinst_ == oldChild) + { + setListeinst((PListeinst) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AReturn.java b/src/c3aParser/node/AReturn.java new file mode 100644 index 0000000..8234b7a --- /dev/null +++ b/src/c3aParser/node/AReturn.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AReturn extends PReturn +{ + private PEtiqop _etiqop_; + private TRet _ret_; + private PCtv _ctv_; + + public AReturn() + { + // Constructor + } + + public AReturn( + @SuppressWarnings("hiding") PEtiqop _etiqop_, + @SuppressWarnings("hiding") TRet _ret_, + @SuppressWarnings("hiding") PCtv _ctv_) + { + // Constructor + setEtiqop(_etiqop_); + + setRet(_ret_); + + setCtv(_ctv_); + + } + + @Override + public Object clone() + { + return new AReturn( + cloneNode(this._etiqop_), + cloneNode(this._ret_), + cloneNode(this._ctv_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAReturn(this); + } + + public PEtiqop getEtiqop() + { + return this._etiqop_; + } + + public void setEtiqop(PEtiqop node) + { + if(this._etiqop_ != null) + { + this._etiqop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._etiqop_ = node; + } + + public TRet getRet() + { + return this._ret_; + } + + public void setRet(TRet node) + { + if(this._ret_ != null) + { + this._ret_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ret_ = node; + } + + public PCtv getCtv() + { + return this._ctv_; + } + + public void setCtv(PCtv node) + { + if(this._ctv_ != null) + { + this._ctv_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ctv_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._etiqop_) + + toString(this._ret_) + + toString(this._ctv_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._etiqop_ == child) + { + this._etiqop_ = null; + return; + } + + if(this._ret_ == child) + { + this._ret_ = null; + return; + } + + if(this._ctv_ == child) + { + this._ctv_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._etiqop_ == oldChild) + { + setEtiqop((PEtiqop) newChild); + return; + } + + if(this._ret_ == oldChild) + { + setRet((TRet) newChild); + return; + } + + if(this._ctv_ == oldChild) + { + setCtv((PCtv) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AReturnInst.java b/src/c3aParser/node/AReturnInst.java new file mode 100644 index 0000000..0db04e4 --- /dev/null +++ b/src/c3aParser/node/AReturnInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AReturnInst extends PInst +{ + private PReturn _return_; + + public AReturnInst() + { + // Constructor + } + + public AReturnInst( + @SuppressWarnings("hiding") PReturn _return_) + { + // Constructor + setReturn(_return_); + + } + + @Override + public Object clone() + { + return new AReturnInst( + cloneNode(this._return_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAReturnInst(this); + } + + public PReturn getReturn() + { + return this._return_; + } + + public void setReturn(PReturn node) + { + if(this._return_ != null) + { + this._return_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._return_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._return_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._return_ == child) + { + this._return_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._return_ == oldChild) + { + setReturn((PReturn) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AScalaireVariable.java b/src/c3aParser/node/AScalaireVariable.java new file mode 100644 index 0000000..3b08d63 --- /dev/null +++ b/src/c3aParser/node/AScalaireVariable.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AScalaireVariable extends PVariable +{ + private TIdentif _identif_; + + public AScalaireVariable() + { + // Constructor + } + + public AScalaireVariable( + @SuppressWarnings("hiding") TIdentif _identif_) + { + // Constructor + setIdentif(_identif_); + + } + + @Override + public Object clone() + { + return new AScalaireVariable( + cloneNode(this._identif_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAScalaireVariable(this); + } + + public TIdentif getIdentif() + { + return this._identif_; + } + + public void setIdentif(TIdentif node) + { + if(this._identif_ != null) + { + this._identif_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._identif_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._identif_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._identif_ == child) + { + this._identif_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._identif_ == oldChild) + { + setIdentif((TIdentif) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AStopInst.java b/src/c3aParser/node/AStopInst.java new file mode 100644 index 0000000..25443a2 --- /dev/null +++ b/src/c3aParser/node/AStopInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AStopInst extends PInst +{ + private PIstop _istop_; + + public AStopInst() + { + // Constructor + } + + public AStopInst( + @SuppressWarnings("hiding") PIstop _istop_) + { + // Constructor + setIstop(_istop_); + + } + + @Override + public Object clone() + { + return new AStopInst( + cloneNode(this._istop_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAStopInst(this); + } + + public PIstop getIstop() + { + return this._istop_; + } + + public void setIstop(PIstop node) + { + if(this._istop_ != null) + { + this._istop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._istop_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._istop_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._istop_ == child) + { + this._istop_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._istop_ == oldChild) + { + setIstop((PIstop) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/ASub.java b/src/c3aParser/node/ASub.java new file mode 100644 index 0000000..b2c950c --- /dev/null +++ b/src/c3aParser/node/ASub.java @@ -0,0 +1,310 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class ASub extends PSub +{ + private PEtiqop _etiqop_; + private PTv _result_; + private TAff _aff_; + private PCtv _op1_; + private TMoins _moins_; + private PCtv _op2_; + + public ASub() + { + // Constructor + } + + public ASub( + @SuppressWarnings("hiding") PEtiqop _etiqop_, + @SuppressWarnings("hiding") PTv _result_, + @SuppressWarnings("hiding") TAff _aff_, + @SuppressWarnings("hiding") PCtv _op1_, + @SuppressWarnings("hiding") TMoins _moins_, + @SuppressWarnings("hiding") PCtv _op2_) + { + // Constructor + setEtiqop(_etiqop_); + + setResult(_result_); + + setAff(_aff_); + + setOp1(_op1_); + + setMoins(_moins_); + + setOp2(_op2_); + + } + + @Override + public Object clone() + { + return new ASub( + cloneNode(this._etiqop_), + cloneNode(this._result_), + cloneNode(this._aff_), + cloneNode(this._op1_), + cloneNode(this._moins_), + cloneNode(this._op2_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseASub(this); + } + + public PEtiqop getEtiqop() + { + return this._etiqop_; + } + + public void setEtiqop(PEtiqop node) + { + if(this._etiqop_ != null) + { + this._etiqop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._etiqop_ = node; + } + + public PTv getResult() + { + return this._result_; + } + + public void setResult(PTv node) + { + if(this._result_ != null) + { + this._result_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._result_ = node; + } + + public TAff getAff() + { + return this._aff_; + } + + public void setAff(TAff node) + { + if(this._aff_ != null) + { + this._aff_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._aff_ = node; + } + + public PCtv getOp1() + { + return this._op1_; + } + + public void setOp1(PCtv node) + { + if(this._op1_ != null) + { + this._op1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op1_ = 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 PCtv getOp2() + { + return this._op2_; + } + + public void setOp2(PCtv node) + { + if(this._op2_ != null) + { + this._op2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op2_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._etiqop_) + + toString(this._result_) + + toString(this._aff_) + + toString(this._op1_) + + toString(this._moins_) + + toString(this._op2_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._etiqop_ == child) + { + this._etiqop_ = null; + return; + } + + if(this._result_ == child) + { + this._result_ = null; + return; + } + + if(this._aff_ == child) + { + this._aff_ = null; + return; + } + + if(this._op1_ == child) + { + this._op1_ = null; + return; + } + + if(this._moins_ == child) + { + this._moins_ = null; + return; + } + + if(this._op2_ == child) + { + this._op2_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._etiqop_ == oldChild) + { + setEtiqop((PEtiqop) newChild); + return; + } + + if(this._result_ == oldChild) + { + setResult((PTv) newChild); + return; + } + + if(this._aff_ == oldChild) + { + setAff((TAff) newChild); + return; + } + + if(this._op1_ == oldChild) + { + setOp1((PCtv) newChild); + return; + } + + if(this._moins_ == oldChild) + { + setMoins((TMoins) newChild); + return; + } + + if(this._op2_ == oldChild) + { + setOp2((PCtv) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/ASubInst.java b/src/c3aParser/node/ASubInst.java new file mode 100644 index 0000000..a42f2be --- /dev/null +++ b/src/c3aParser/node/ASubInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class ASubInst extends PInst +{ + private PSub _sub_; + + public ASubInst() + { + // Constructor + } + + public ASubInst( + @SuppressWarnings("hiding") PSub _sub_) + { + // Constructor + setSub(_sub_); + + } + + @Override + public Object clone() + { + return new ASubInst( + cloneNode(this._sub_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseASubInst(this); + } + + public PSub getSub() + { + return this._sub_; + } + + public void setSub(PSub node) + { + if(this._sub_ != null) + { + this._sub_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._sub_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._sub_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._sub_ == child) + { + this._sub_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._sub_ == oldChild) + { + setSub((PSub) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/ATCtv.java b/src/c3aParser/node/ATCtv.java new file mode 100644 index 0000000..acb4ed8 --- /dev/null +++ b/src/c3aParser/node/ATCtv.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class ATCtv extends PCtv +{ + private PTemporaire _temporaire_; + + public ATCtv() + { + // Constructor + } + + public ATCtv( + @SuppressWarnings("hiding") PTemporaire _temporaire_) + { + // Constructor + setTemporaire(_temporaire_); + + } + + @Override + public Object clone() + { + return new ATCtv( + cloneNode(this._temporaire_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseATCtv(this); + } + + public PTemporaire getTemporaire() + { + return this._temporaire_; + } + + public void setTemporaire(PTemporaire node) + { + if(this._temporaire_ != null) + { + this._temporaire_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._temporaire_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._temporaire_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._temporaire_ == child) + { + this._temporaire_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._temporaire_ == oldChild) + { + setTemporaire((PTemporaire) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/ATTv.java b/src/c3aParser/node/ATTv.java new file mode 100644 index 0000000..3e4fc2c --- /dev/null +++ b/src/c3aParser/node/ATTv.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class ATTv extends PTv +{ + private PTemporaire _temporaire_; + + public ATTv() + { + // Constructor + } + + public ATTv( + @SuppressWarnings("hiding") PTemporaire _temporaire_) + { + // Constructor + setTemporaire(_temporaire_); + + } + + @Override + public Object clone() + { + return new ATTv( + cloneNode(this._temporaire_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseATTv(this); + } + + public PTemporaire getTemporaire() + { + return this._temporaire_; + } + + public void setTemporaire(PTemporaire node) + { + if(this._temporaire_ != null) + { + this._temporaire_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._temporaire_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._temporaire_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._temporaire_ == child) + { + this._temporaire_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._temporaire_ == oldChild) + { + setTemporaire((PTemporaire) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/ATabVariable.java b/src/c3aParser/node/ATabVariable.java new file mode 100644 index 0000000..64debcc --- /dev/null +++ b/src/c3aParser/node/ATabVariable.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class ATabVariable extends PVariable +{ + private TIdentif _identif_; + private TCo _co_; + private PCtv _ctv_; + private TCf _cf_; + + public ATabVariable() + { + // Constructor + } + + public ATabVariable( + @SuppressWarnings("hiding") TIdentif _identif_, + @SuppressWarnings("hiding") TCo _co_, + @SuppressWarnings("hiding") PCtv _ctv_, + @SuppressWarnings("hiding") TCf _cf_) + { + // Constructor + setIdentif(_identif_); + + setCo(_co_); + + setCtv(_ctv_); + + setCf(_cf_); + + } + + @Override + public Object clone() + { + return new ATabVariable( + cloneNode(this._identif_), + cloneNode(this._co_), + cloneNode(this._ctv_), + cloneNode(this._cf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseATabVariable(this); + } + + public TIdentif getIdentif() + { + return this._identif_; + } + + public void setIdentif(TIdentif node) + { + if(this._identif_ != null) + { + this._identif_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._identif_ = node; + } + + public TCo getCo() + { + return this._co_; + } + + public void setCo(TCo node) + { + if(this._co_ != null) + { + this._co_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._co_ = node; + } + + public PCtv getCtv() + { + return this._ctv_; + } + + public void setCtv(PCtv node) + { + if(this._ctv_ != null) + { + this._ctv_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ctv_ = node; + } + + public TCf getCf() + { + return this._cf_; + } + + public void setCf(TCf node) + { + if(this._cf_ != null) + { + this._cf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._cf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._identif_) + + toString(this._co_) + + toString(this._ctv_) + + toString(this._cf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._identif_ == child) + { + this._identif_ = null; + return; + } + + if(this._co_ == child) + { + this._co_ = null; + return; + } + + if(this._ctv_ == child) + { + this._ctv_ = null; + return; + } + + if(this._cf_ == child) + { + this._cf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._identif_ == oldChild) + { + setIdentif((TIdentif) newChild); + return; + } + + if(this._co_ == oldChild) + { + setCo((TCo) newChild); + return; + } + + if(this._ctv_ == oldChild) + { + setCtv((PCtv) newChild); + return; + } + + if(this._cf_ == oldChild) + { + setCf((TCf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/ATemporaire.java b/src/c3aParser/node/ATemporaire.java new file mode 100644 index 0000000..1f5ee6f --- /dev/null +++ b/src/c3aParser/node/ATemporaire.java @@ -0,0 +1,138 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class ATemporaire extends PTemporaire +{ + private TPrefixeTemp _prefixeTemp_; + private TNombre _nombre_; + + public ATemporaire() + { + // Constructor + } + + public ATemporaire( + @SuppressWarnings("hiding") TPrefixeTemp _prefixeTemp_, + @SuppressWarnings("hiding") TNombre _nombre_) + { + // Constructor + setPrefixeTemp(_prefixeTemp_); + + setNombre(_nombre_); + + } + + @Override + public Object clone() + { + return new ATemporaire( + cloneNode(this._prefixeTemp_), + cloneNode(this._nombre_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseATemporaire(this); + } + + public TPrefixeTemp getPrefixeTemp() + { + return this._prefixeTemp_; + } + + public void setPrefixeTemp(TPrefixeTemp node) + { + if(this._prefixeTemp_ != null) + { + this._prefixeTemp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._prefixeTemp_ = 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; + } + + @Override + public String toString() + { + return "" + + toString(this._prefixeTemp_) + + toString(this._nombre_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._prefixeTemp_ == child) + { + this._prefixeTemp_ = null; + return; + } + + 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._prefixeTemp_ == oldChild) + { + setPrefixeTemp((TPrefixeTemp) newChild); + return; + } + + if(this._nombre_ == oldChild) + { + setNombre((TNombre) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AVCtv.java b/src/c3aParser/node/AVCtv.java new file mode 100644 index 0000000..0b00379 --- /dev/null +++ b/src/c3aParser/node/AVCtv.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AVCtv extends PCtv +{ + private PVariable _variable_; + + public AVCtv() + { + // Constructor + } + + public AVCtv( + @SuppressWarnings("hiding") PVariable _variable_) + { + // Constructor + setVariable(_variable_); + + } + + @Override + public Object clone() + { + return new AVCtv( + cloneNode(this._variable_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAVCtv(this); + } + + public PVariable getVariable() + { + return this._variable_; + } + + public void setVariable(PVariable node) + { + if(this._variable_ != null) + { + this._variable_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._variable_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._variable_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._variable_ == child) + { + this._variable_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._variable_ == oldChild) + { + setVariable((PVariable) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AVTv.java b/src/c3aParser/node/AVTv.java new file mode 100644 index 0000000..9e64f4a --- /dev/null +++ b/src/c3aParser/node/AVTv.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AVTv extends PTv +{ + private PVariable _variable_; + + public AVTv() + { + // Constructor + } + + public AVTv( + @SuppressWarnings("hiding") PVariable _variable_) + { + // Constructor + setVariable(_variable_); + + } + + @Override + public Object clone() + { + return new AVTv( + cloneNode(this._variable_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAVTv(this); + } + + public PVariable getVariable() + { + return this._variable_; + } + + public void setVariable(PVariable node) + { + if(this._variable_ != null) + { + this._variable_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._variable_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._variable_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._variable_ == child) + { + this._variable_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._variable_ == oldChild) + { + setVariable((PVariable) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/c3aParser/node/AVideEtiqop.java b/src/c3aParser/node/AVideEtiqop.java new file mode 100644 index 0000000..0443ecd --- /dev/null +++ b/src/c3aParser/node/AVideEtiqop.java @@ -0,0 +1,47 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class AVideEtiqop extends PEtiqop +{ + + public AVideEtiqop() + { + // Constructor + } + + @Override + public Object clone() + { + return new AVideEtiqop(); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAVideEtiqop(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/c3aParser/node/EOF.java b/src/c3aParser/node/EOF.java new file mode 100644 index 0000000..254b085 --- /dev/null +++ b/src/c3aParser/node/EOF.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.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/c3aParser/node/InvalidToken.java b/src/c3aParser/node/InvalidToken.java new file mode 100644 index 0000000..e30df8b --- /dev/null +++ b/src/c3aParser/node/InvalidToken.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.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/c3aParser/node/Node.java b/src/c3aParser/node/Node.java new file mode 100644 index 0000000..9227e11 --- /dev/null +++ b/src/c3aParser/node/Node.java @@ -0,0 +1,78 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.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/c3aParser/node/PAdd.java b/src/c3aParser/node/PAdd.java new file mode 100644 index 0000000..1682363 --- /dev/null +++ b/src/c3aParser/node/PAdd.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PAdd extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PAffect.java b/src/c3aParser/node/PAffect.java new file mode 100644 index 0000000..26fc8cc --- /dev/null +++ b/src/c3aParser/node/PAffect.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PAffect extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PArg.java b/src/c3aParser/node/PArg.java new file mode 100644 index 0000000..2d46d77 --- /dev/null +++ b/src/c3aParser/node/PArg.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PArg extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PBegin.java b/src/c3aParser/node/PBegin.java new file mode 100644 index 0000000..18b18b5 --- /dev/null +++ b/src/c3aParser/node/PBegin.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PBegin extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PConstante.java b/src/c3aParser/node/PConstante.java new file mode 100644 index 0000000..56581f4 --- /dev/null +++ b/src/c3aParser/node/PConstante.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PConstante extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PCtv.java b/src/c3aParser/node/PCtv.java new file mode 100644 index 0000000..8b4183e --- /dev/null +++ b/src/c3aParser/node/PCtv.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PCtv extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PDiv.java b/src/c3aParser/node/PDiv.java new file mode 100644 index 0000000..5108bd7 --- /dev/null +++ b/src/c3aParser/node/PDiv.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PDiv extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PEnd.java b/src/c3aParser/node/PEnd.java new file mode 100644 index 0000000..1a2f469 --- /dev/null +++ b/src/c3aParser/node/PEnd.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PEnd extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PEtiqop.java b/src/c3aParser/node/PEtiqop.java new file mode 100644 index 0000000..bf4a4b5 --- /dev/null +++ b/src/c3aParser/node/PEtiqop.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PEtiqop extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PFcall.java b/src/c3aParser/node/PFcall.java new file mode 100644 index 0000000..5aa5548 --- /dev/null +++ b/src/c3aParser/node/PFcall.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PFcall extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PInst.java b/src/c3aParser/node/PInst.java new file mode 100644 index 0000000..909c5d8 --- /dev/null +++ b/src/c3aParser/node/PInst.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PInst extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PIread.java b/src/c3aParser/node/PIread.java new file mode 100644 index 0000000..e681746 --- /dev/null +++ b/src/c3aParser/node/PIread.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PIread extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PIstop.java b/src/c3aParser/node/PIstop.java new file mode 100644 index 0000000..42d55a9 --- /dev/null +++ b/src/c3aParser/node/PIstop.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PIstop extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PIwrite.java b/src/c3aParser/node/PIwrite.java new file mode 100644 index 0000000..82cf8c9 --- /dev/null +++ b/src/c3aParser/node/PIwrite.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PIwrite extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PJmp.java b/src/c3aParser/node/PJmp.java new file mode 100644 index 0000000..8faa52b --- /dev/null +++ b/src/c3aParser/node/PJmp.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PJmp extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PJmpeg.java b/src/c3aParser/node/PJmpeg.java new file mode 100644 index 0000000..fcfda42 --- /dev/null +++ b/src/c3aParser/node/PJmpeg.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PJmpeg extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PJmpinf.java b/src/c3aParser/node/PJmpinf.java new file mode 100644 index 0000000..0f6703f --- /dev/null +++ b/src/c3aParser/node/PJmpinf.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PJmpinf extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PJmpinfeg.java b/src/c3aParser/node/PJmpinfeg.java new file mode 100644 index 0000000..829649d --- /dev/null +++ b/src/c3aParser/node/PJmpinfeg.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PJmpinfeg extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PJmpneg.java b/src/c3aParser/node/PJmpneg.java new file mode 100644 index 0000000..a93d43f --- /dev/null +++ b/src/c3aParser/node/PJmpneg.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PJmpneg extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PJmpsup.java b/src/c3aParser/node/PJmpsup.java new file mode 100644 index 0000000..80b798a --- /dev/null +++ b/src/c3aParser/node/PJmpsup.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PJmpsup extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PJmpsupeg.java b/src/c3aParser/node/PJmpsupeg.java new file mode 100644 index 0000000..5162e80 --- /dev/null +++ b/src/c3aParser/node/PJmpsupeg.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PJmpsupeg extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PListeinst.java b/src/c3aParser/node/PListeinst.java new file mode 100644 index 0000000..bcbc957 --- /dev/null +++ b/src/c3aParser/node/PListeinst.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PListeinst extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PMul.java b/src/c3aParser/node/PMul.java new file mode 100644 index 0000000..7223423 --- /dev/null +++ b/src/c3aParser/node/PMul.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PMul extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PProg.java b/src/c3aParser/node/PProg.java new file mode 100644 index 0000000..3e7c44f --- /dev/null +++ b/src/c3aParser/node/PProg.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PProg extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PReturn.java b/src/c3aParser/node/PReturn.java new file mode 100644 index 0000000..5f0adc0 --- /dev/null +++ b/src/c3aParser/node/PReturn.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PReturn extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PSub.java b/src/c3aParser/node/PSub.java new file mode 100644 index 0000000..3a57207 --- /dev/null +++ b/src/c3aParser/node/PSub.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PSub extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PTemporaire.java b/src/c3aParser/node/PTemporaire.java new file mode 100644 index 0000000..7e7ef56 --- /dev/null +++ b/src/c3aParser/node/PTemporaire.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PTemporaire extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PTv.java b/src/c3aParser/node/PTv.java new file mode 100644 index 0000000..13fdcd7 --- /dev/null +++ b/src/c3aParser/node/PTv.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PTv extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/PVariable.java b/src/c3aParser/node/PVariable.java new file mode 100644 index 0000000..8272cab --- /dev/null +++ b/src/c3aParser/node/PVariable.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public abstract class PVariable extends Node +{ + // Empty body +} diff --git a/src/c3aParser/node/Start.java b/src/c3aParser/node/Start.java new file mode 100644 index 0000000..2f9c86e --- /dev/null +++ b/src/c3aParser/node/Start.java @@ -0,0 +1,133 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.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/c3aParser/node/Switch.java b/src/c3aParser/node/Switch.java new file mode 100644 index 0000000..939c00a --- /dev/null +++ b/src/c3aParser/node/Switch.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public interface Switch +{ + // Empty body +} diff --git a/src/c3aParser/node/Switchable.java b/src/c3aParser/node/Switchable.java new file mode 100644 index 0000000..0093546 --- /dev/null +++ b/src/c3aParser/node/Switchable.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +public interface Switchable +{ + void apply(Switch sw); +} diff --git a/src/c3aParser/node/TAff.java b/src/c3aParser/node/TAff.java new file mode 100644 index 0000000..87cf6ee --- /dev/null +++ b/src/c3aParser/node/TAff.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TAff extends Token +{ + public TAff() + { + super.setText("="); + } + + public TAff(int line, int pos) + { + super.setText("="); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TAff(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTAff(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TAff text."); + } +} diff --git a/src/c3aParser/node/TCall.java b/src/c3aParser/node/TCall.java new file mode 100644 index 0000000..d0bcc66 --- /dev/null +++ b/src/c3aParser/node/TCall.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TCall extends Token +{ + public TCall() + { + super.setText("call"); + } + + public TCall(int line, int pos) + { + super.setText("call"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TCall(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTCall(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TCall text."); + } +} diff --git a/src/c3aParser/node/TCf.java b/src/c3aParser/node/TCf.java new file mode 100644 index 0000000..10355f5 --- /dev/null +++ b/src/c3aParser/node/TCf.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TCf extends Token +{ + public TCf() + { + super.setText("]"); + } + + public TCf(int line, int pos) + { + super.setText("]"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TCf(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTCf(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TCf text."); + } +} diff --git a/src/c3aParser/node/TCo.java b/src/c3aParser/node/TCo.java new file mode 100644 index 0000000..7e306e4 --- /dev/null +++ b/src/c3aParser/node/TCo.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TCo extends Token +{ + public TCo() + { + super.setText("["); + } + + public TCo(int line, int pos) + { + super.setText("["); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TCo(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTCo(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TCo text."); + } +} diff --git a/src/c3aParser/node/TCommentaire.java b/src/c3aParser/node/TCommentaire.java new file mode 100644 index 0000000..61b717a --- /dev/null +++ b/src/c3aParser/node/TCommentaire.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.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/c3aParser/node/TDivise.java b/src/c3aParser/node/TDivise.java new file mode 100644 index 0000000..8de0e8a --- /dev/null +++ b/src/c3aParser/node/TDivise.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TDivise extends Token +{ + public TDivise() + { + super.setText("/"); + } + + public TDivise(int line, int pos) + { + super.setText("/"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TDivise(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTDivise(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TDivise text."); + } +} diff --git a/src/c3aParser/node/TEq.java b/src/c3aParser/node/TEq.java new file mode 100644 index 0000000..217e02d --- /dev/null +++ b/src/c3aParser/node/TEq.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TEq extends Token +{ + public TEq() + { + super.setText("=="); + } + + public TEq(int line, int pos) + { + super.setText("=="); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TEq(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTEq(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TEq text."); + } +} diff --git a/src/c3aParser/node/TEspaces.java b/src/c3aParser/node/TEspaces.java new file mode 100644 index 0000000..f43214a --- /dev/null +++ b/src/c3aParser/node/TEspaces.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.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/c3aParser/node/TFbegin.java b/src/c3aParser/node/TFbegin.java new file mode 100644 index 0000000..35774a5 --- /dev/null +++ b/src/c3aParser/node/TFbegin.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TFbegin extends Token +{ + public TFbegin() + { + super.setText("fbegin"); + } + + public TFbegin(int line, int pos) + { + super.setText("fbegin"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TFbegin(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTFbegin(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TFbegin text."); + } +} diff --git a/src/c3aParser/node/TFend.java b/src/c3aParser/node/TFend.java new file mode 100644 index 0000000..33975bc --- /dev/null +++ b/src/c3aParser/node/TFend.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TFend extends Token +{ + public TFend() + { + super.setText("fend"); + } + + public TFend(int line, int pos) + { + super.setText("fend"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TFend(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTFend(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TFend text."); + } +} diff --git a/src/c3aParser/node/TFois.java b/src/c3aParser/node/TFois.java new file mode 100644 index 0000000..836d6c8 --- /dev/null +++ b/src/c3aParser/node/TFois.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.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/c3aParser/node/TGoto.java b/src/c3aParser/node/TGoto.java new file mode 100644 index 0000000..d730f2f --- /dev/null +++ b/src/c3aParser/node/TGoto.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TGoto extends Token +{ + public TGoto() + { + super.setText("goto"); + } + + public TGoto(int line, int pos) + { + super.setText("goto"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TGoto(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTGoto(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TGoto text."); + } +} diff --git a/src/c3aParser/node/TIdentif.java b/src/c3aParser/node/TIdentif.java new file mode 100644 index 0000000..acd7adf --- /dev/null +++ b/src/c3aParser/node/TIdentif.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TIdentif extends Token +{ + public TIdentif(String text) + { + setText(text); + } + + public TIdentif(String text, int line, int pos) + { + setText(text); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TIdentif(getText(), getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTIdentif(this); + } +} diff --git a/src/c3aParser/node/TIf.java b/src/c3aParser/node/TIf.java new file mode 100644 index 0000000..d9c1cc3 --- /dev/null +++ b/src/c3aParser/node/TIf.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TIf extends Token +{ + public TIf() + { + super.setText("if"); + } + + public TIf(int line, int pos) + { + super.setText("if"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TIf(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTIf(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TIf text."); + } +} diff --git a/src/c3aParser/node/TInf.java b/src/c3aParser/node/TInf.java new file mode 100644 index 0000000..aeabf83 --- /dev/null +++ b/src/c3aParser/node/TInf.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.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/c3aParser/node/TInfeq.java b/src/c3aParser/node/TInfeq.java new file mode 100644 index 0000000..7a2fc77 --- /dev/null +++ b/src/c3aParser/node/TInfeq.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TInfeq extends Token +{ + public TInfeq() + { + super.setText("<="); + } + + public TInfeq(int line, int pos) + { + super.setText("<="); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TInfeq(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTInfeq(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TInfeq text."); + } +} diff --git a/src/c3aParser/node/TMoins.java b/src/c3aParser/node/TMoins.java new file mode 100644 index 0000000..77e6093 --- /dev/null +++ b/src/c3aParser/node/TMoins.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.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/c3aParser/node/TNombre.java b/src/c3aParser/node/TNombre.java new file mode 100644 index 0000000..d32bb98 --- /dev/null +++ b/src/c3aParser/node/TNombre.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.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/c3aParser/node/TNoteq.java b/src/c3aParser/node/TNoteq.java new file mode 100644 index 0000000..084cabb --- /dev/null +++ b/src/c3aParser/node/TNoteq.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TNoteq extends Token +{ + public TNoteq() + { + super.setText("!="); + } + + public TNoteq(int line, int pos) + { + super.setText("!="); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TNoteq(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTNoteq(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TNoteq text."); + } +} diff --git a/src/c3aParser/node/TParam.java b/src/c3aParser/node/TParam.java new file mode 100644 index 0000000..e3b1bbc --- /dev/null +++ b/src/c3aParser/node/TParam.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TParam extends Token +{ + public TParam() + { + super.setText("param"); + } + + public TParam(int line, int pos) + { + super.setText("param"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TParam(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTParam(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TParam text."); + } +} diff --git a/src/c3aParser/node/TPlus.java b/src/c3aParser/node/TPlus.java new file mode 100644 index 0000000..1896102 --- /dev/null +++ b/src/c3aParser/node/TPlus.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.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/c3aParser/node/TPrefixeTemp.java b/src/c3aParser/node/TPrefixeTemp.java new file mode 100644 index 0000000..61e0c7d --- /dev/null +++ b/src/c3aParser/node/TPrefixeTemp.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TPrefixeTemp extends Token +{ + public TPrefixeTemp() + { + super.setText("@"); + } + + public TPrefixeTemp(int line, int pos) + { + super.setText("@"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TPrefixeTemp(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTPrefixeTemp(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TPrefixeTemp text."); + } +} diff --git a/src/c3aParser/node/TRead.java b/src/c3aParser/node/TRead.java new file mode 100644 index 0000000..58b1068 --- /dev/null +++ b/src/c3aParser/node/TRead.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TRead extends Token +{ + public TRead() + { + super.setText("read"); + } + + public TRead(int line, int pos) + { + super.setText("read"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TRead(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTRead(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TRead text."); + } +} diff --git a/src/c3aParser/node/TRet.java b/src/c3aParser/node/TRet.java new file mode 100644 index 0000000..ec27877 --- /dev/null +++ b/src/c3aParser/node/TRet.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TRet extends Token +{ + public TRet() + { + super.setText("ret"); + } + + public TRet(int line, int pos) + { + super.setText("ret"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TRet(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTRet(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TRet text."); + } +} diff --git a/src/c3aParser/node/TStop.java b/src/c3aParser/node/TStop.java new file mode 100644 index 0000000..810d696 --- /dev/null +++ b/src/c3aParser/node/TStop.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TStop extends Token +{ + public TStop() + { + super.setText("stop"); + } + + public TStop(int line, int pos) + { + super.setText("stop"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TStop(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTStop(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TStop text."); + } +} diff --git a/src/c3aParser/node/TSup.java b/src/c3aParser/node/TSup.java new file mode 100644 index 0000000..cec29c9 --- /dev/null +++ b/src/c3aParser/node/TSup.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSup extends Token +{ + public TSup() + { + super.setText(">"); + } + + public TSup(int line, int pos) + { + super.setText(">"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSup(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSup(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSup text."); + } +} diff --git a/src/c3aParser/node/TSupeq.java b/src/c3aParser/node/TSupeq.java new file mode 100644 index 0000000..6ecb182 --- /dev/null +++ b/src/c3aParser/node/TSupeq.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSupeq extends Token +{ + public TSupeq() + { + super.setText(">="); + } + + public TSupeq(int line, int pos) + { + super.setText(">="); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSupeq(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSupeq(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSupeq text."); + } +} diff --git a/src/c3aParser/node/TWrite.java b/src/c3aParser/node/TWrite.java new file mode 100644 index 0000000..fd35f0a --- /dev/null +++ b/src/c3aParser/node/TWrite.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.node; + +import c3aParser.analysis.*; + +@SuppressWarnings("nls") +public final class TWrite extends Token +{ + public TWrite() + { + super.setText("write"); + } + + public TWrite(int line, int pos) + { + super.setText("write"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TWrite(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTWrite(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TWrite text."); + } +} diff --git a/src/c3aParser/node/Token.java b/src/c3aParser/node/Token.java new file mode 100644 index 0000000..a881a43 --- /dev/null +++ b/src/c3aParser/node/Token.java @@ -0,0 +1,59 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.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/c3aParser/parser/Parser.java b/src/c3aParser/parser/Parser.java new file mode 100644 index 0000000..665ca0f --- /dev/null +++ b/src/c3aParser/parser/Parser.java @@ -0,0 +1,2965 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.parser; + +import c3aParser.lexer.*; +import c3aParser.node.*; +import c3aParser.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 AProg */ + { + ArrayList<Object> list = new0(); + push(goTo(0), list); + } + break; + case 1: /* reduce ARecursifListeinst */ + { + ArrayList<Object> list = new1(); + push(goTo(1), list); + } + break; + case 2: /* reduce AFinalListeinst */ + { + ArrayList<Object> list = new2(); + push(goTo(1), list); + } + break; + case 3: /* reduce AAddInst */ + { + ArrayList<Object> list = new3(); + push(goTo(2), list); + } + break; + case 4: /* reduce ASubInst */ + { + ArrayList<Object> list = new4(); + push(goTo(2), list); + } + break; + case 5: /* reduce AMulInst */ + { + ArrayList<Object> list = new5(); + push(goTo(2), list); + } + break; + case 6: /* reduce ADivInst */ + { + ArrayList<Object> list = new6(); + push(goTo(2), list); + } + break; + case 7: /* reduce AAffInst */ + { + ArrayList<Object> list = new7(); + push(goTo(2), list); + } + break; + case 8: /* reduce AJmpInst */ + { + ArrayList<Object> list = new8(); + push(goTo(2), list); + } + break; + case 9: /* reduce AJmpegInst */ + { + ArrayList<Object> list = new9(); + push(goTo(2), list); + } + break; + case 10: /* reduce AJmpnegInst */ + { + ArrayList<Object> list = new10(); + push(goTo(2), list); + } + break; + case 11: /* reduce AJmpinfInst */ + { + ArrayList<Object> list = new11(); + push(goTo(2), list); + } + break; + case 12: /* reduce AJminfegInst */ + { + ArrayList<Object> list = new12(); + push(goTo(2), list); + } + break; + case 13: /* reduce AJmpsupInst */ + { + ArrayList<Object> list = new13(); + push(goTo(2), list); + } + break; + case 14: /* reduce AJmpsupegInst */ + { + ArrayList<Object> list = new14(); + push(goTo(2), list); + } + break; + case 15: /* reduce AFcallInst */ + { + ArrayList<Object> list = new15(); + push(goTo(2), list); + } + break; + case 16: /* reduce AIwriteInst */ + { + ArrayList<Object> list = new16(); + push(goTo(2), list); + } + break; + case 17: /* reduce AIreadInst */ + { + ArrayList<Object> list = new17(); + push(goTo(2), list); + } + break; + case 18: /* reduce AArgInst */ + { + ArrayList<Object> list = new18(); + push(goTo(2), list); + } + break; + case 19: /* reduce AReturnInst */ + { + ArrayList<Object> list = new19(); + push(goTo(2), list); + } + break; + case 20: /* reduce ABeginInst */ + { + ArrayList<Object> list = new20(); + push(goTo(2), list); + } + break; + case 21: /* reduce AEndInst */ + { + ArrayList<Object> list = new21(); + push(goTo(2), list); + } + break; + case 22: /* reduce AStopInst */ + { + ArrayList<Object> list = new22(); + push(goTo(2), list); + } + break; + case 23: /* reduce ACte1Add */ + { + ArrayList<Object> list = new23(); + push(goTo(3), list); + } + break; + case 24: /* reduce AVide1Add */ + { + ArrayList<Object> list = new24(); + push(goTo(3), list); + } + break; + case 25: /* reduce ACte1Sub */ + { + ArrayList<Object> list = new25(); + push(goTo(4), list); + } + break; + case 26: /* reduce AVide1Sub */ + { + ArrayList<Object> list = new26(); + push(goTo(4), list); + } + break; + case 27: /* reduce ACte1Mul */ + { + ArrayList<Object> list = new27(); + push(goTo(5), list); + } + break; + case 28: /* reduce AVide1Mul */ + { + ArrayList<Object> list = new28(); + push(goTo(5), list); + } + break; + case 29: /* reduce ACte1Div */ + { + ArrayList<Object> list = new29(); + push(goTo(6), list); + } + break; + case 30: /* reduce AVide1Div */ + { + ArrayList<Object> list = new30(); + push(goTo(6), list); + } + break; + case 31: /* reduce ACte1Affect */ + { + ArrayList<Object> list = new31(); + push(goTo(7), list); + } + break; + case 32: /* reduce AVide1Affect */ + { + ArrayList<Object> list = new32(); + push(goTo(7), list); + } + break; + case 33: /* reduce ACte1Jmpeg */ + { + ArrayList<Object> list = new33(); + push(goTo(8), list); + } + break; + case 34: /* reduce AVide1Jmpeg */ + { + ArrayList<Object> list = new34(); + push(goTo(8), list); + } + break; + case 35: /* reduce ACte1Jmpneg */ + { + ArrayList<Object> list = new35(); + push(goTo(9), list); + } + break; + case 36: /* reduce AVide1Jmpneg */ + { + ArrayList<Object> list = new36(); + push(goTo(9), list); + } + break; + case 37: /* reduce ACte1Jmpinf */ + { + ArrayList<Object> list = new37(); + push(goTo(10), list); + } + break; + case 38: /* reduce AVide1Jmpinf */ + { + ArrayList<Object> list = new38(); + push(goTo(10), list); + } + break; + case 39: /* reduce ACte1Jmpinfeg */ + { + ArrayList<Object> list = new39(); + push(goTo(11), list); + } + break; + case 40: /* reduce AVide1Jmpinfeg */ + { + ArrayList<Object> list = new40(); + push(goTo(11), list); + } + break; + case 41: /* reduce ACte1Jmpsup */ + { + ArrayList<Object> list = new41(); + push(goTo(12), list); + } + break; + case 42: /* reduce AVide1Jmpsup */ + { + ArrayList<Object> list = new42(); + push(goTo(12), list); + } + break; + case 43: /* reduce ACte1Jmpsupeg */ + { + ArrayList<Object> list = new43(); + push(goTo(13), list); + } + break; + case 44: /* reduce AVide1Jmpsupeg */ + { + ArrayList<Object> list = new44(); + push(goTo(13), list); + } + break; + case 45: /* reduce ACte1Jmp */ + { + ArrayList<Object> list = new45(); + push(goTo(14), list); + } + break; + case 46: /* reduce AVide1Jmp */ + { + ArrayList<Object> list = new46(); + push(goTo(14), list); + } + break; + case 47: /* reduce ABegin */ + { + ArrayList<Object> list = new47(); + push(goTo(15), list); + } + break; + case 48: /* reduce ACte1End */ + { + ArrayList<Object> list = new48(); + push(goTo(16), list); + } + break; + case 49: /* reduce AVide1End */ + { + ArrayList<Object> list = new49(); + push(goTo(16), list); + } + break; + case 50: /* reduce ACte1Fcall */ + { + ArrayList<Object> list = new50(); + push(goTo(17), list); + } + break; + case 51: /* reduce AVide1Fcall */ + { + ArrayList<Object> list = new51(); + push(goTo(17), list); + } + break; + case 52: /* reduce ACte1Iwrite */ + { + ArrayList<Object> list = new52(); + push(goTo(18), list); + } + break; + case 53: /* reduce AVide1Iwrite */ + { + ArrayList<Object> list = new53(); + push(goTo(18), list); + } + break; + case 54: /* reduce ACte1Iread */ + { + ArrayList<Object> list = new54(); + push(goTo(19), list); + } + break; + case 55: /* reduce AVide1Iread */ + { + ArrayList<Object> list = new55(); + push(goTo(19), list); + } + break; + case 56: /* reduce ACte1Arg */ + { + ArrayList<Object> list = new56(); + push(goTo(20), list); + } + break; + case 57: /* reduce AVide1Arg */ + { + ArrayList<Object> list = new57(); + push(goTo(20), list); + } + break; + case 58: /* reduce ACte1Return */ + { + ArrayList<Object> list = new58(); + push(goTo(21), list); + } + break; + case 59: /* reduce AVide1Return */ + { + ArrayList<Object> list = new59(); + push(goTo(21), list); + } + break; + case 60: /* reduce ACte1Istop */ + { + ArrayList<Object> list = new60(); + push(goTo(22), list); + } + break; + case 61: /* reduce AVide1Istop */ + { + ArrayList<Object> list = new61(); + push(goTo(22), list); + } + break; + case 62: /* reduce ACCtv */ + { + ArrayList<Object> list = new62(); + push(goTo(23), list); + } + break; + case 63: /* reduce ATCtv */ + { + ArrayList<Object> list = new63(); + push(goTo(23), list); + } + break; + case 64: /* reduce AVCtv */ + { + ArrayList<Object> list = new64(); + push(goTo(23), list); + } + break; + case 65: /* reduce ATTv */ + { + ArrayList<Object> list = new65(); + push(goTo(24), list); + } + break; + case 66: /* reduce AVTv */ + { + ArrayList<Object> list = new66(); + push(goTo(24), list); + } + break; + case 67: /* reduce AConstante */ + { + ArrayList<Object> list = new67(); + push(goTo(25), list); + } + break; + case 68: /* reduce ATemporaire */ + { + ArrayList<Object> list = new68(); + push(goTo(26), list); + } + break; + case 69: /* reduce AScalaireVariable */ + { + ArrayList<Object> list = new69(); + push(goTo(27), list); + } + break; + case 70: /* reduce ATabVariable */ + { + ArrayList<Object> list = new70(); + push(goTo(27), list); + } + break; + } + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new0() /* reduce AProg */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PProg pprogNode1; + { + // Block + PListeinst plisteinstNode2; + plisteinstNode2 = (PListeinst)nodeArrayList1.get(0); + + pprogNode1 = new AProg(plisteinstNode2); + } + nodeList.add(pprogNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new1() /* reduce ARecursifListeinst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PListeinst plisteinstNode1; + { + // Block + PInst pinstNode2; + PListeinst plisteinstNode3; + pinstNode2 = (PInst)nodeArrayList1.get(0); + plisteinstNode3 = (PListeinst)nodeArrayList2.get(0); + + plisteinstNode1 = new ARecursifListeinst(pinstNode2, plisteinstNode3); + } + nodeList.add(plisteinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new2() /* reduce AFinalListeinst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PListeinst plisteinstNode1; + { + // Block + PInst pinstNode2; + pinstNode2 = (PInst)nodeArrayList1.get(0); + + plisteinstNode1 = new AFinalListeinst(pinstNode2); + } + nodeList.add(plisteinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new3() /* reduce AAddInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PAdd paddNode2; + paddNode2 = (PAdd)nodeArrayList1.get(0); + + pinstNode1 = new AAddInst(paddNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new4() /* reduce ASubInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PSub psubNode2; + psubNode2 = (PSub)nodeArrayList1.get(0); + + pinstNode1 = new ASubInst(psubNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new5() /* reduce AMulInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PMul pmulNode2; + pmulNode2 = (PMul)nodeArrayList1.get(0); + + pinstNode1 = new AMulInst(pmulNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new6() /* reduce ADivInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PDiv pdivNode2; + pdivNode2 = (PDiv)nodeArrayList1.get(0); + + pinstNode1 = new ADivInst(pdivNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new7() /* reduce AAffInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PAffect paffectNode2; + paffectNode2 = (PAffect)nodeArrayList1.get(0); + + pinstNode1 = new AAffInst(paffectNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new8() /* reduce AJmpInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PJmp pjmpNode2; + pjmpNode2 = (PJmp)nodeArrayList1.get(0); + + pinstNode1 = new AJmpInst(pjmpNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new9() /* reduce AJmpegInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PJmpeg pjmpegNode2; + pjmpegNode2 = (PJmpeg)nodeArrayList1.get(0); + + pinstNode1 = new AJmpegInst(pjmpegNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new10() /* reduce AJmpnegInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PJmpneg pjmpnegNode2; + pjmpnegNode2 = (PJmpneg)nodeArrayList1.get(0); + + pinstNode1 = new AJmpnegInst(pjmpnegNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new11() /* reduce AJmpinfInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PJmpinf pjmpinfNode2; + pjmpinfNode2 = (PJmpinf)nodeArrayList1.get(0); + + pinstNode1 = new AJmpinfInst(pjmpinfNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new12() /* reduce AJminfegInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PJmpinfeg pjmpinfegNode2; + pjmpinfegNode2 = (PJmpinfeg)nodeArrayList1.get(0); + + pinstNode1 = new AJminfegInst(pjmpinfegNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new13() /* reduce AJmpsupInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PJmpsup pjmpsupNode2; + pjmpsupNode2 = (PJmpsup)nodeArrayList1.get(0); + + pinstNode1 = new AJmpsupInst(pjmpsupNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new14() /* reduce AJmpsupegInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PJmpsupeg pjmpsupegNode2; + pjmpsupegNode2 = (PJmpsupeg)nodeArrayList1.get(0); + + pinstNode1 = new AJmpsupegInst(pjmpsupegNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new15() /* reduce AFcallInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PFcall pfcallNode2; + pfcallNode2 = (PFcall)nodeArrayList1.get(0); + + pinstNode1 = new AFcallInst(pfcallNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new16() /* reduce AIwriteInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PIwrite piwriteNode2; + piwriteNode2 = (PIwrite)nodeArrayList1.get(0); + + pinstNode1 = new AIwriteInst(piwriteNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new17() /* reduce AIreadInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PIread pireadNode2; + pireadNode2 = (PIread)nodeArrayList1.get(0); + + pinstNode1 = new AIreadInst(pireadNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new18() /* reduce AArgInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PArg pargNode2; + pargNode2 = (PArg)nodeArrayList1.get(0); + + pinstNode1 = new AArgInst(pargNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new19() /* reduce AReturnInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PReturn preturnNode2; + preturnNode2 = (PReturn)nodeArrayList1.get(0); + + pinstNode1 = new AReturnInst(preturnNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new20() /* reduce ABeginInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PBegin pbeginNode2; + pbeginNode2 = (PBegin)nodeArrayList1.get(0); + + pinstNode1 = new ABeginInst(pbeginNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new21() /* reduce AEndInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PEnd pendNode2; + pendNode2 = (PEnd)nodeArrayList1.get(0); + + pinstNode1 = new AEndInst(pendNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new22() /* reduce AStopInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PIstop pistopNode2; + pistopNode2 = (PIstop)nodeArrayList1.get(0); + + pinstNode1 = new AStopInst(pistopNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new23() /* reduce ACte1Add */ + { + @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(); + PAdd paddNode1; + { + // Block + PEtiqop petiqopNode2; + PTv ptvNode4; + TAff taffNode5; + PCtv pctvNode6; + TPlus tplusNode7; + PCtv pctvNode8; + { + // Block + TNombre tnombreNode3; + tnombreNode3 = (TNombre)nodeArrayList1.get(0); + + petiqopNode2 = new ACteEtiqop(tnombreNode3); + } + ptvNode4 = (PTv)nodeArrayList2.get(0); + taffNode5 = (TAff)nodeArrayList3.get(0); + pctvNode6 = (PCtv)nodeArrayList4.get(0); + tplusNode7 = (TPlus)nodeArrayList5.get(0); + pctvNode8 = (PCtv)nodeArrayList6.get(0); + + paddNode1 = new AAdd(petiqopNode2, ptvNode4, taffNode5, pctvNode6, tplusNode7, pctvNode8); + } + nodeList.add(paddNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new24() /* reduce AVide1Add */ + { + @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(); + PAdd paddNode1; + { + // Block + PEtiqop petiqopNode2; + PTv ptvNode3; + TAff taffNode4; + PCtv pctvNode5; + TPlus tplusNode6; + PCtv pctvNode7; + { + // Block + + petiqopNode2 = new AVideEtiqop(); + } + ptvNode3 = (PTv)nodeArrayList1.get(0); + taffNode4 = (TAff)nodeArrayList2.get(0); + pctvNode5 = (PCtv)nodeArrayList3.get(0); + tplusNode6 = (TPlus)nodeArrayList4.get(0); + pctvNode7 = (PCtv)nodeArrayList5.get(0); + + paddNode1 = new AAdd(petiqopNode2, ptvNode3, taffNode4, pctvNode5, tplusNode6, pctvNode7); + } + nodeList.add(paddNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new25() /* reduce ACte1Sub */ + { + @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(); + PSub psubNode1; + { + // Block + PEtiqop petiqopNode2; + PTv ptvNode4; + TAff taffNode5; + PCtv pctvNode6; + TMoins tmoinsNode7; + PCtv pctvNode8; + { + // Block + TNombre tnombreNode3; + tnombreNode3 = (TNombre)nodeArrayList1.get(0); + + petiqopNode2 = new ACteEtiqop(tnombreNode3); + } + ptvNode4 = (PTv)nodeArrayList2.get(0); + taffNode5 = (TAff)nodeArrayList3.get(0); + pctvNode6 = (PCtv)nodeArrayList4.get(0); + tmoinsNode7 = (TMoins)nodeArrayList5.get(0); + pctvNode8 = (PCtv)nodeArrayList6.get(0); + + psubNode1 = new ASub(petiqopNode2, ptvNode4, taffNode5, pctvNode6, tmoinsNode7, pctvNode8); + } + nodeList.add(psubNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new26() /* reduce AVide1Sub */ + { + @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(); + PSub psubNode1; + { + // Block + PEtiqop petiqopNode2; + PTv ptvNode3; + TAff taffNode4; + PCtv pctvNode5; + TMoins tmoinsNode6; + PCtv pctvNode7; + { + // Block + + petiqopNode2 = new AVideEtiqop(); + } + ptvNode3 = (PTv)nodeArrayList1.get(0); + taffNode4 = (TAff)nodeArrayList2.get(0); + pctvNode5 = (PCtv)nodeArrayList3.get(0); + tmoinsNode6 = (TMoins)nodeArrayList4.get(0); + pctvNode7 = (PCtv)nodeArrayList5.get(0); + + psubNode1 = new ASub(petiqopNode2, ptvNode3, taffNode4, pctvNode5, tmoinsNode6, pctvNode7); + } + nodeList.add(psubNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new27() /* reduce ACte1Mul */ + { + @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(); + PMul pmulNode1; + { + // Block + PEtiqop petiqopNode2; + PTv ptvNode4; + TAff taffNode5; + PCtv pctvNode6; + TFois tfoisNode7; + PCtv pctvNode8; + { + // Block + TNombre tnombreNode3; + tnombreNode3 = (TNombre)nodeArrayList1.get(0); + + petiqopNode2 = new ACteEtiqop(tnombreNode3); + } + ptvNode4 = (PTv)nodeArrayList2.get(0); + taffNode5 = (TAff)nodeArrayList3.get(0); + pctvNode6 = (PCtv)nodeArrayList4.get(0); + tfoisNode7 = (TFois)nodeArrayList5.get(0); + pctvNode8 = (PCtv)nodeArrayList6.get(0); + + pmulNode1 = new AMul(petiqopNode2, ptvNode4, taffNode5, pctvNode6, tfoisNode7, pctvNode8); + } + nodeList.add(pmulNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new28() /* reduce AVide1Mul */ + { + @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(); + PMul pmulNode1; + { + // Block + PEtiqop petiqopNode2; + PTv ptvNode3; + TAff taffNode4; + PCtv pctvNode5; + TFois tfoisNode6; + PCtv pctvNode7; + { + // Block + + petiqopNode2 = new AVideEtiqop(); + } + ptvNode3 = (PTv)nodeArrayList1.get(0); + taffNode4 = (TAff)nodeArrayList2.get(0); + pctvNode5 = (PCtv)nodeArrayList3.get(0); + tfoisNode6 = (TFois)nodeArrayList4.get(0); + pctvNode7 = (PCtv)nodeArrayList5.get(0); + + pmulNode1 = new AMul(petiqopNode2, ptvNode3, taffNode4, pctvNode5, tfoisNode6, pctvNode7); + } + nodeList.add(pmulNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new29() /* reduce ACte1Div */ + { + @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(); + PDiv pdivNode1; + { + // Block + PEtiqop petiqopNode2; + PTv ptvNode4; + TAff taffNode5; + PCtv pctvNode6; + TDivise tdiviseNode7; + PCtv pctvNode8; + { + // Block + TNombre tnombreNode3; + tnombreNode3 = (TNombre)nodeArrayList1.get(0); + + petiqopNode2 = new ACteEtiqop(tnombreNode3); + } + ptvNode4 = (PTv)nodeArrayList2.get(0); + taffNode5 = (TAff)nodeArrayList3.get(0); + pctvNode6 = (PCtv)nodeArrayList4.get(0); + tdiviseNode7 = (TDivise)nodeArrayList5.get(0); + pctvNode8 = (PCtv)nodeArrayList6.get(0); + + pdivNode1 = new ADiv(petiqopNode2, ptvNode4, taffNode5, pctvNode6, tdiviseNode7, pctvNode8); + } + nodeList.add(pdivNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new30() /* reduce AVide1Div */ + { + @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(); + PDiv pdivNode1; + { + // Block + PEtiqop petiqopNode2; + PTv ptvNode3; + TAff taffNode4; + PCtv pctvNode5; + TDivise tdiviseNode6; + PCtv pctvNode7; + { + // Block + + petiqopNode2 = new AVideEtiqop(); + } + ptvNode3 = (PTv)nodeArrayList1.get(0); + taffNode4 = (TAff)nodeArrayList2.get(0); + pctvNode5 = (PCtv)nodeArrayList3.get(0); + tdiviseNode6 = (TDivise)nodeArrayList4.get(0); + pctvNode7 = (PCtv)nodeArrayList5.get(0); + + pdivNode1 = new ADiv(petiqopNode2, ptvNode3, taffNode4, pctvNode5, tdiviseNode6, pctvNode7); + } + nodeList.add(pdivNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new31() /* reduce ACte1Affect */ + { + @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(); + PAffect paffectNode1; + { + // Block + PEtiqop petiqopNode2; + PTv ptvNode4; + TAff taffNode5; + PCtv pctvNode6; + { + // Block + TNombre tnombreNode3; + tnombreNode3 = (TNombre)nodeArrayList1.get(0); + + petiqopNode2 = new ACteEtiqop(tnombreNode3); + } + ptvNode4 = (PTv)nodeArrayList2.get(0); + taffNode5 = (TAff)nodeArrayList3.get(0); + pctvNode6 = (PCtv)nodeArrayList4.get(0); + + paffectNode1 = new AAffect(petiqopNode2, ptvNode4, taffNode5, pctvNode6); + } + nodeList.add(paffectNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new32() /* reduce AVide1Affect */ + { + @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(); + PAffect paffectNode1; + { + // Block + PEtiqop petiqopNode2; + PTv ptvNode3; + TAff taffNode4; + PCtv pctvNode5; + { + // Block + + petiqopNode2 = new AVideEtiqop(); + } + ptvNode3 = (PTv)nodeArrayList1.get(0); + taffNode4 = (TAff)nodeArrayList2.get(0); + pctvNode5 = (PCtv)nodeArrayList3.get(0); + + paffectNode1 = new AAffect(petiqopNode2, ptvNode3, taffNode4, pctvNode5); + } + nodeList.add(paffectNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new33() /* reduce ACte1Jmpeg */ + { + @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(); + PJmpeg pjmpegNode1; + { + // Block + PEtiqop petiqopNode2; + TIf tifNode4; + PCtv pctvNode5; + TEq teqNode6; + PCtv pctvNode7; + TGoto tgotoNode8; + PConstante pconstanteNode9; + { + // Block + TNombre tnombreNode3; + tnombreNode3 = (TNombre)nodeArrayList1.get(0); + + petiqopNode2 = new ACteEtiqop(tnombreNode3); + } + tifNode4 = (TIf)nodeArrayList2.get(0); + pctvNode5 = (PCtv)nodeArrayList3.get(0); + teqNode6 = (TEq)nodeArrayList4.get(0); + pctvNode7 = (PCtv)nodeArrayList5.get(0); + tgotoNode8 = (TGoto)nodeArrayList6.get(0); + pconstanteNode9 = (PConstante)nodeArrayList7.get(0); + + pjmpegNode1 = new AJmpeg(petiqopNode2, tifNode4, pctvNode5, teqNode6, pctvNode7, tgotoNode8, pconstanteNode9); + } + nodeList.add(pjmpegNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new34() /* reduce AVide1Jmpeg */ + { + @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(); + PJmpeg pjmpegNode1; + { + // Block + PEtiqop petiqopNode2; + TIf tifNode3; + PCtv pctvNode4; + TEq teqNode5; + PCtv pctvNode6; + TGoto tgotoNode7; + PConstante pconstanteNode8; + { + // Block + + petiqopNode2 = new AVideEtiqop(); + } + tifNode3 = (TIf)nodeArrayList1.get(0); + pctvNode4 = (PCtv)nodeArrayList2.get(0); + teqNode5 = (TEq)nodeArrayList3.get(0); + pctvNode6 = (PCtv)nodeArrayList4.get(0); + tgotoNode7 = (TGoto)nodeArrayList5.get(0); + pconstanteNode8 = (PConstante)nodeArrayList6.get(0); + + pjmpegNode1 = new AJmpeg(petiqopNode2, tifNode3, pctvNode4, teqNode5, pctvNode6, tgotoNode7, pconstanteNode8); + } + nodeList.add(pjmpegNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new35() /* reduce ACte1Jmpneg */ + { + @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(); + PJmpneg pjmpnegNode1; + { + // Block + PEtiqop petiqopNode2; + TIf tifNode4; + PCtv pctvNode5; + TNoteq tnoteqNode6; + PCtv pctvNode7; + TGoto tgotoNode8; + PConstante pconstanteNode9; + { + // Block + TNombre tnombreNode3; + tnombreNode3 = (TNombre)nodeArrayList1.get(0); + + petiqopNode2 = new ACteEtiqop(tnombreNode3); + } + tifNode4 = (TIf)nodeArrayList2.get(0); + pctvNode5 = (PCtv)nodeArrayList3.get(0); + tnoteqNode6 = (TNoteq)nodeArrayList4.get(0); + pctvNode7 = (PCtv)nodeArrayList5.get(0); + tgotoNode8 = (TGoto)nodeArrayList6.get(0); + pconstanteNode9 = (PConstante)nodeArrayList7.get(0); + + pjmpnegNode1 = new AJmpneg(petiqopNode2, tifNode4, pctvNode5, tnoteqNode6, pctvNode7, tgotoNode8, pconstanteNode9); + } + nodeList.add(pjmpnegNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new36() /* reduce AVide1Jmpneg */ + { + @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(); + PJmpneg pjmpnegNode1; + { + // Block + PEtiqop petiqopNode2; + TIf tifNode3; + PCtv pctvNode4; + TNoteq tnoteqNode5; + PCtv pctvNode6; + TGoto tgotoNode7; + PConstante pconstanteNode8; + { + // Block + + petiqopNode2 = new AVideEtiqop(); + } + tifNode3 = (TIf)nodeArrayList1.get(0); + pctvNode4 = (PCtv)nodeArrayList2.get(0); + tnoteqNode5 = (TNoteq)nodeArrayList3.get(0); + pctvNode6 = (PCtv)nodeArrayList4.get(0); + tgotoNode7 = (TGoto)nodeArrayList5.get(0); + pconstanteNode8 = (PConstante)nodeArrayList6.get(0); + + pjmpnegNode1 = new AJmpneg(petiqopNode2, tifNode3, pctvNode4, tnoteqNode5, pctvNode6, tgotoNode7, pconstanteNode8); + } + nodeList.add(pjmpnegNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new37() /* reduce ACte1Jmpinf */ + { + @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(); + PJmpinf pjmpinfNode1; + { + // Block + PEtiqop petiqopNode2; + TIf tifNode4; + PCtv pctvNode5; + TInf tinfNode6; + PCtv pctvNode7; + TGoto tgotoNode8; + PConstante pconstanteNode9; + { + // Block + TNombre tnombreNode3; + tnombreNode3 = (TNombre)nodeArrayList1.get(0); + + petiqopNode2 = new ACteEtiqop(tnombreNode3); + } + tifNode4 = (TIf)nodeArrayList2.get(0); + pctvNode5 = (PCtv)nodeArrayList3.get(0); + tinfNode6 = (TInf)nodeArrayList4.get(0); + pctvNode7 = (PCtv)nodeArrayList5.get(0); + tgotoNode8 = (TGoto)nodeArrayList6.get(0); + pconstanteNode9 = (PConstante)nodeArrayList7.get(0); + + pjmpinfNode1 = new AJmpinf(petiqopNode2, tifNode4, pctvNode5, tinfNode6, pctvNode7, tgotoNode8, pconstanteNode9); + } + nodeList.add(pjmpinfNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new38() /* reduce AVide1Jmpinf */ + { + @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(); + PJmpinf pjmpinfNode1; + { + // Block + PEtiqop petiqopNode2; + TIf tifNode3; + PCtv pctvNode4; + TInf tinfNode5; + PCtv pctvNode6; + TGoto tgotoNode7; + PConstante pconstanteNode8; + { + // Block + + petiqopNode2 = new AVideEtiqop(); + } + tifNode3 = (TIf)nodeArrayList1.get(0); + pctvNode4 = (PCtv)nodeArrayList2.get(0); + tinfNode5 = (TInf)nodeArrayList3.get(0); + pctvNode6 = (PCtv)nodeArrayList4.get(0); + tgotoNode7 = (TGoto)nodeArrayList5.get(0); + pconstanteNode8 = (PConstante)nodeArrayList6.get(0); + + pjmpinfNode1 = new AJmpinf(petiqopNode2, tifNode3, pctvNode4, tinfNode5, pctvNode6, tgotoNode7, pconstanteNode8); + } + nodeList.add(pjmpinfNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new39() /* reduce ACte1Jmpinfeg */ + { + @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(); + PJmpinfeg pjmpinfegNode1; + { + // Block + PEtiqop petiqopNode2; + TIf tifNode4; + PCtv pctvNode5; + TInfeq tinfeqNode6; + PCtv pctvNode7; + TGoto tgotoNode8; + PConstante pconstanteNode9; + { + // Block + TNombre tnombreNode3; + tnombreNode3 = (TNombre)nodeArrayList1.get(0); + + petiqopNode2 = new ACteEtiqop(tnombreNode3); + } + tifNode4 = (TIf)nodeArrayList2.get(0); + pctvNode5 = (PCtv)nodeArrayList3.get(0); + tinfeqNode6 = (TInfeq)nodeArrayList4.get(0); + pctvNode7 = (PCtv)nodeArrayList5.get(0); + tgotoNode8 = (TGoto)nodeArrayList6.get(0); + pconstanteNode9 = (PConstante)nodeArrayList7.get(0); + + pjmpinfegNode1 = new AJmpinfeg(petiqopNode2, tifNode4, pctvNode5, tinfeqNode6, pctvNode7, tgotoNode8, pconstanteNode9); + } + nodeList.add(pjmpinfegNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new40() /* reduce AVide1Jmpinfeg */ + { + @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(); + PJmpinfeg pjmpinfegNode1; + { + // Block + PEtiqop petiqopNode2; + TIf tifNode3; + PCtv pctvNode4; + TInfeq tinfeqNode5; + PCtv pctvNode6; + TGoto tgotoNode7; + PConstante pconstanteNode8; + { + // Block + + petiqopNode2 = new AVideEtiqop(); + } + tifNode3 = (TIf)nodeArrayList1.get(0); + pctvNode4 = (PCtv)nodeArrayList2.get(0); + tinfeqNode5 = (TInfeq)nodeArrayList3.get(0); + pctvNode6 = (PCtv)nodeArrayList4.get(0); + tgotoNode7 = (TGoto)nodeArrayList5.get(0); + pconstanteNode8 = (PConstante)nodeArrayList6.get(0); + + pjmpinfegNode1 = new AJmpinfeg(petiqopNode2, tifNode3, pctvNode4, tinfeqNode5, pctvNode6, tgotoNode7, pconstanteNode8); + } + nodeList.add(pjmpinfegNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new41() /* reduce ACte1Jmpsup */ + { + @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(); + PJmpsup pjmpsupNode1; + { + // Block + PEtiqop petiqopNode2; + TIf tifNode4; + PCtv pctvNode5; + TSup tsupNode6; + PCtv pctvNode7; + TGoto tgotoNode8; + PConstante pconstanteNode9; + { + // Block + TNombre tnombreNode3; + tnombreNode3 = (TNombre)nodeArrayList1.get(0); + + petiqopNode2 = new ACteEtiqop(tnombreNode3); + } + tifNode4 = (TIf)nodeArrayList2.get(0); + pctvNode5 = (PCtv)nodeArrayList3.get(0); + tsupNode6 = (TSup)nodeArrayList4.get(0); + pctvNode7 = (PCtv)nodeArrayList5.get(0); + tgotoNode8 = (TGoto)nodeArrayList6.get(0); + pconstanteNode9 = (PConstante)nodeArrayList7.get(0); + + pjmpsupNode1 = new AJmpsup(petiqopNode2, tifNode4, pctvNode5, tsupNode6, pctvNode7, tgotoNode8, pconstanteNode9); + } + nodeList.add(pjmpsupNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new42() /* reduce AVide1Jmpsup */ + { + @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(); + PJmpsup pjmpsupNode1; + { + // Block + PEtiqop petiqopNode2; + TIf tifNode3; + PCtv pctvNode4; + TSup tsupNode5; + PCtv pctvNode6; + TGoto tgotoNode7; + PConstante pconstanteNode8; + { + // Block + + petiqopNode2 = new AVideEtiqop(); + } + tifNode3 = (TIf)nodeArrayList1.get(0); + pctvNode4 = (PCtv)nodeArrayList2.get(0); + tsupNode5 = (TSup)nodeArrayList3.get(0); + pctvNode6 = (PCtv)nodeArrayList4.get(0); + tgotoNode7 = (TGoto)nodeArrayList5.get(0); + pconstanteNode8 = (PConstante)nodeArrayList6.get(0); + + pjmpsupNode1 = new AJmpsup(petiqopNode2, tifNode3, pctvNode4, tsupNode5, pctvNode6, tgotoNode7, pconstanteNode8); + } + nodeList.add(pjmpsupNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new43() /* reduce ACte1Jmpsupeg */ + { + @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(); + PJmpsupeg pjmpsupegNode1; + { + // Block + PEtiqop petiqopNode2; + TIf tifNode4; + PCtv pctvNode5; + TSupeq tsupeqNode6; + PCtv pctvNode7; + TGoto tgotoNode8; + PConstante pconstanteNode9; + { + // Block + TNombre tnombreNode3; + tnombreNode3 = (TNombre)nodeArrayList1.get(0); + + petiqopNode2 = new ACteEtiqop(tnombreNode3); + } + tifNode4 = (TIf)nodeArrayList2.get(0); + pctvNode5 = (PCtv)nodeArrayList3.get(0); + tsupeqNode6 = (TSupeq)nodeArrayList4.get(0); + pctvNode7 = (PCtv)nodeArrayList5.get(0); + tgotoNode8 = (TGoto)nodeArrayList6.get(0); + pconstanteNode9 = (PConstante)nodeArrayList7.get(0); + + pjmpsupegNode1 = new AJmpsupeg(petiqopNode2, tifNode4, pctvNode5, tsupeqNode6, pctvNode7, tgotoNode8, pconstanteNode9); + } + nodeList.add(pjmpsupegNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new44() /* reduce AVide1Jmpsupeg */ + { + @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(); + PJmpsupeg pjmpsupegNode1; + { + // Block + PEtiqop petiqopNode2; + TIf tifNode3; + PCtv pctvNode4; + TSupeq tsupeqNode5; + PCtv pctvNode6; + TGoto tgotoNode7; + PConstante pconstanteNode8; + { + // Block + + petiqopNode2 = new AVideEtiqop(); + } + tifNode3 = (TIf)nodeArrayList1.get(0); + pctvNode4 = (PCtv)nodeArrayList2.get(0); + tsupeqNode5 = (TSupeq)nodeArrayList3.get(0); + pctvNode6 = (PCtv)nodeArrayList4.get(0); + tgotoNode7 = (TGoto)nodeArrayList5.get(0); + pconstanteNode8 = (PConstante)nodeArrayList6.get(0); + + pjmpsupegNode1 = new AJmpsupeg(petiqopNode2, tifNode3, pctvNode4, tsupeqNode5, pctvNode6, tgotoNode7, pconstanteNode8); + } + nodeList.add(pjmpsupegNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new45() /* reduce ACte1Jmp */ + { + @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(); + PJmp pjmpNode1; + { + // Block + PEtiqop petiqopNode2; + TGoto tgotoNode4; + PConstante pconstanteNode5; + { + // Block + TNombre tnombreNode3; + tnombreNode3 = (TNombre)nodeArrayList1.get(0); + + petiqopNode2 = new ACteEtiqop(tnombreNode3); + } + tgotoNode4 = (TGoto)nodeArrayList2.get(0); + pconstanteNode5 = (PConstante)nodeArrayList3.get(0); + + pjmpNode1 = new AJmp(petiqopNode2, tgotoNode4, pconstanteNode5); + } + nodeList.add(pjmpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new46() /* reduce AVide1Jmp */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PJmp pjmpNode1; + { + // Block + PEtiqop petiqopNode2; + TGoto tgotoNode3; + PConstante pconstanteNode4; + { + // Block + + petiqopNode2 = new AVideEtiqop(); + } + tgotoNode3 = (TGoto)nodeArrayList1.get(0); + pconstanteNode4 = (PConstante)nodeArrayList2.get(0); + + pjmpNode1 = new AJmp(petiqopNode2, tgotoNode3, pconstanteNode4); + } + nodeList.add(pjmpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new47() /* reduce ABegin */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PBegin pbeginNode1; + { + // Block + TIdentif tidentifNode2; + TFbegin tfbeginNode3; + tidentifNode2 = (TIdentif)nodeArrayList1.get(0); + tfbeginNode3 = (TFbegin)nodeArrayList2.get(0); + + pbeginNode1 = new ABegin(tidentifNode2, tfbeginNode3); + } + nodeList.add(pbeginNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new48() /* reduce ACte1End */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PEnd pendNode1; + { + // Block + PEtiqop petiqopNode2; + TFend tfendNode4; + { + // Block + TNombre tnombreNode3; + tnombreNode3 = (TNombre)nodeArrayList1.get(0); + + petiqopNode2 = new ACteEtiqop(tnombreNode3); + } + tfendNode4 = (TFend)nodeArrayList2.get(0); + + pendNode1 = new AEnd(petiqopNode2, tfendNode4); + } + nodeList.add(pendNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new49() /* reduce AVide1End */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PEnd pendNode1; + { + // Block + PEtiqop petiqopNode2; + TFend tfendNode3; + { + // Block + + petiqopNode2 = new AVideEtiqop(); + } + tfendNode3 = (TFend)nodeArrayList1.get(0); + + pendNode1 = new AEnd(petiqopNode2, tfendNode3); + } + nodeList.add(pendNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new50() /* reduce ACte1Fcall */ + { + @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(); + PFcall pfcallNode1; + { + // Block + PEtiqop petiqopNode2; + PTv ptvNode4; + TAff taffNode5; + TCall tcallNode6; + TIdentif tidentifNode7; + { + // Block + TNombre tnombreNode3; + tnombreNode3 = (TNombre)nodeArrayList1.get(0); + + petiqopNode2 = new ACteEtiqop(tnombreNode3); + } + ptvNode4 = (PTv)nodeArrayList2.get(0); + taffNode5 = (TAff)nodeArrayList3.get(0); + tcallNode6 = (TCall)nodeArrayList4.get(0); + tidentifNode7 = (TIdentif)nodeArrayList5.get(0); + + pfcallNode1 = new AFcall(petiqopNode2, ptvNode4, taffNode5, tcallNode6, tidentifNode7); + } + nodeList.add(pfcallNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new51() /* reduce AVide1Fcall */ + { + @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(); + PFcall pfcallNode1; + { + // Block + PEtiqop petiqopNode2; + PTv ptvNode3; + TAff taffNode4; + TCall tcallNode5; + TIdentif tidentifNode6; + { + // Block + + petiqopNode2 = new AVideEtiqop(); + } + ptvNode3 = (PTv)nodeArrayList1.get(0); + taffNode4 = (TAff)nodeArrayList2.get(0); + tcallNode5 = (TCall)nodeArrayList3.get(0); + tidentifNode6 = (TIdentif)nodeArrayList4.get(0); + + pfcallNode1 = new AFcall(petiqopNode2, ptvNode3, taffNode4, tcallNode5, tidentifNode6); + } + nodeList.add(pfcallNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new52() /* reduce ACte1Iwrite */ + { + @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(); + PIwrite piwriteNode1; + { + // Block + PEtiqop petiqopNode2; + TWrite twriteNode4; + PCtv pctvNode5; + { + // Block + TNombre tnombreNode3; + tnombreNode3 = (TNombre)nodeArrayList1.get(0); + + petiqopNode2 = new ACteEtiqop(tnombreNode3); + } + twriteNode4 = (TWrite)nodeArrayList2.get(0); + pctvNode5 = (PCtv)nodeArrayList3.get(0); + + piwriteNode1 = new AIwrite(petiqopNode2, twriteNode4, pctvNode5); + } + nodeList.add(piwriteNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new53() /* reduce AVide1Iwrite */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PIwrite piwriteNode1; + { + // Block + PEtiqop petiqopNode2; + TWrite twriteNode3; + PCtv pctvNode4; + { + // Block + + petiqopNode2 = new AVideEtiqop(); + } + twriteNode3 = (TWrite)nodeArrayList1.get(0); + pctvNode4 = (PCtv)nodeArrayList2.get(0); + + piwriteNode1 = new AIwrite(petiqopNode2, twriteNode3, pctvNode4); + } + nodeList.add(piwriteNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new54() /* reduce ACte1Iread */ + { + @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(); + PIread pireadNode1; + { + // Block + PEtiqop petiqopNode2; + PTv ptvNode4; + TAff taffNode5; + TRead treadNode6; + { + // Block + TNombre tnombreNode3; + tnombreNode3 = (TNombre)nodeArrayList1.get(0); + + petiqopNode2 = new ACteEtiqop(tnombreNode3); + } + ptvNode4 = (PTv)nodeArrayList2.get(0); + taffNode5 = (TAff)nodeArrayList3.get(0); + treadNode6 = (TRead)nodeArrayList4.get(0); + + pireadNode1 = new AIread(petiqopNode2, ptvNode4, taffNode5, treadNode6); + } + nodeList.add(pireadNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new55() /* reduce AVide1Iread */ + { + @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(); + PIread pireadNode1; + { + // Block + PEtiqop petiqopNode2; + PTv ptvNode3; + TAff taffNode4; + TRead treadNode5; + { + // Block + + petiqopNode2 = new AVideEtiqop(); + } + ptvNode3 = (PTv)nodeArrayList1.get(0); + taffNode4 = (TAff)nodeArrayList2.get(0); + treadNode5 = (TRead)nodeArrayList3.get(0); + + pireadNode1 = new AIread(petiqopNode2, ptvNode3, taffNode4, treadNode5); + } + nodeList.add(pireadNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new56() /* reduce ACte1Arg */ + { + @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(); + PArg pargNode1; + { + // Block + PEtiqop petiqopNode2; + TParam tparamNode4; + PCtv pctvNode5; + { + // Block + TNombre tnombreNode3; + tnombreNode3 = (TNombre)nodeArrayList1.get(0); + + petiqopNode2 = new ACteEtiqop(tnombreNode3); + } + tparamNode4 = (TParam)nodeArrayList2.get(0); + pctvNode5 = (PCtv)nodeArrayList3.get(0); + + pargNode1 = new AArg(petiqopNode2, tparamNode4, pctvNode5); + } + nodeList.add(pargNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new57() /* reduce AVide1Arg */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PArg pargNode1; + { + // Block + PEtiqop petiqopNode2; + TParam tparamNode3; + PCtv pctvNode4; + { + // Block + + petiqopNode2 = new AVideEtiqop(); + } + tparamNode3 = (TParam)nodeArrayList1.get(0); + pctvNode4 = (PCtv)nodeArrayList2.get(0); + + pargNode1 = new AArg(petiqopNode2, tparamNode3, pctvNode4); + } + nodeList.add(pargNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new58() /* reduce ACte1Return */ + { + @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(); + PReturn preturnNode1; + { + // Block + PEtiqop petiqopNode2; + TRet tretNode4; + PCtv pctvNode5; + { + // Block + TNombre tnombreNode3; + tnombreNode3 = (TNombre)nodeArrayList1.get(0); + + petiqopNode2 = new ACteEtiqop(tnombreNode3); + } + tretNode4 = (TRet)nodeArrayList2.get(0); + pctvNode5 = (PCtv)nodeArrayList3.get(0); + + preturnNode1 = new AReturn(petiqopNode2, tretNode4, pctvNode5); + } + nodeList.add(preturnNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new59() /* reduce AVide1Return */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PReturn preturnNode1; + { + // Block + PEtiqop petiqopNode2; + TRet tretNode3; + PCtv pctvNode4; + { + // Block + + petiqopNode2 = new AVideEtiqop(); + } + tretNode3 = (TRet)nodeArrayList1.get(0); + pctvNode4 = (PCtv)nodeArrayList2.get(0); + + preturnNode1 = new AReturn(petiqopNode2, tretNode3, pctvNode4); + } + nodeList.add(preturnNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new60() /* reduce ACte1Istop */ + { + @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(); + PIstop pistopNode1; + { + // Block + PEtiqop petiqopNode2; + TStop tstopNode4; + PCtv pctvNode5; + { + // Block + TNombre tnombreNode3; + tnombreNode3 = (TNombre)nodeArrayList1.get(0); + + petiqopNode2 = new ACteEtiqop(tnombreNode3); + } + tstopNode4 = (TStop)nodeArrayList2.get(0); + pctvNode5 = (PCtv)nodeArrayList3.get(0); + + pistopNode1 = new AIstop(petiqopNode2, tstopNode4, pctvNode5); + } + nodeList.add(pistopNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new61() /* reduce AVide1Istop */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PIstop pistopNode1; + { + // Block + PEtiqop petiqopNode2; + TStop tstopNode3; + PCtv pctvNode4; + { + // Block + + petiqopNode2 = new AVideEtiqop(); + } + tstopNode3 = (TStop)nodeArrayList1.get(0); + pctvNode4 = (PCtv)nodeArrayList2.get(0); + + pistopNode1 = new AIstop(petiqopNode2, tstopNode3, pctvNode4); + } + nodeList.add(pistopNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new62() /* reduce ACCtv */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PCtv pctvNode1; + { + // Block + PConstante pconstanteNode2; + pconstanteNode2 = (PConstante)nodeArrayList1.get(0); + + pctvNode1 = new ACCtv(pconstanteNode2); + } + nodeList.add(pctvNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new63() /* reduce ATCtv */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PCtv pctvNode1; + { + // Block + PTemporaire ptemporaireNode2; + ptemporaireNode2 = (PTemporaire)nodeArrayList1.get(0); + + pctvNode1 = new ATCtv(ptemporaireNode2); + } + nodeList.add(pctvNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new64() /* reduce AVCtv */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PCtv pctvNode1; + { + // Block + PVariable pvariableNode2; + pvariableNode2 = (PVariable)nodeArrayList1.get(0); + + pctvNode1 = new AVCtv(pvariableNode2); + } + nodeList.add(pctvNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new65() /* reduce ATTv */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PTv ptvNode1; + { + // Block + PTemporaire ptemporaireNode2; + ptemporaireNode2 = (PTemporaire)nodeArrayList1.get(0); + + ptvNode1 = new ATTv(ptemporaireNode2); + } + nodeList.add(ptvNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new66() /* reduce AVTv */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PTv ptvNode1; + { + // Block + PVariable pvariableNode2; + pvariableNode2 = (PVariable)nodeArrayList1.get(0); + + ptvNode1 = new AVTv(pvariableNode2); + } + nodeList.add(ptvNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new67() /* reduce AConstante */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PConstante pconstanteNode1; + { + // Block + TNombre tnombreNode2; + tnombreNode2 = (TNombre)nodeArrayList1.get(0); + + pconstanteNode1 = new AConstante(tnombreNode2); + } + nodeList.add(pconstanteNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new68() /* reduce ATemporaire */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList2 = pop(); + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PTemporaire ptemporaireNode1; + { + // Block + TPrefixeTemp tprefixetempNode2; + TNombre tnombreNode3; + tprefixetempNode2 = (TPrefixeTemp)nodeArrayList1.get(0); + tnombreNode3 = (TNombre)nodeArrayList2.get(0); + + ptemporaireNode1 = new ATemporaire(tprefixetempNode2, tnombreNode3); + } + nodeList.add(ptemporaireNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new69() /* reduce AScalaireVariable */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PVariable pvariableNode1; + { + // Block + TIdentif tidentifNode2; + tidentifNode2 = (TIdentif)nodeArrayList1.get(0); + + pvariableNode1 = new AScalaireVariable(tidentifNode2); + } + nodeList.add(pvariableNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new70() /* reduce ATabVariable */ + { + @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(); + PVariable pvariableNode1; + { + // Block + TIdentif tidentifNode2; + TCo tcoNode3; + PCtv pctvNode4; + TCf tcfNode5; + tidentifNode2 = (TIdentif)nodeArrayList1.get(0); + tcoNode3 = (TCo)nodeArrayList2.get(0); + pctvNode4 = (PCtv)nodeArrayList3.get(0); + tcfNode5 = (TCf)nodeArrayList4.get(0); + + pvariableNode1 = new ATabVariable(tidentifNode2, tcoNode3, pctvNode4, tcfNode5); + } + nodeList.add(pvariableNode1); + return nodeList; + } + + + + private static int[][][] actionTable; +/* { + {{-1, ERROR, 0}, {3, SHIFT, 1}, {5, SHIFT, 2}, {13, SHIFT, 3}, {14, SHIFT, 4}, {15, SHIFT, 5}, {16, SHIFT, 6}, {21, SHIFT, 7}, {23, SHIFT, 8}, {24, SHIFT, 9}, {25, SHIFT, 10}, }, + {{-1, ERROR, 1}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, REDUCE, 49}, }, + {{-1, ERROR, 3}, {23, SHIFT, 37}, }, + {{-1, ERROR, 4}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 5}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 6}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 7}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 8}, {3, SHIFT, 48}, {5, SHIFT, 49}, {13, SHIFT, 50}, {14, SHIFT, 51}, {15, SHIFT, 52}, {16, SHIFT, 53}, {21, SHIFT, 54}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 9}, {23, SHIFT, 56}, }, + {{-1, REDUCE, 69}, {0, SHIFT, 57}, {4, SHIFT, 58}, }, + {{-1, ERROR, 11}, {26, ACCEPT, -1}, }, + {{-1, REDUCE, 0}, }, + {{-1, REDUCE, 2}, {3, SHIFT, 1}, {5, SHIFT, 2}, {13, SHIFT, 3}, {14, SHIFT, 4}, {15, SHIFT, 5}, {16, SHIFT, 6}, {21, SHIFT, 7}, {23, SHIFT, 8}, {24, SHIFT, 9}, {25, SHIFT, 10}, }, + {{-1, REDUCE, 3}, }, + {{-1, REDUCE, 4}, }, + {{-1, REDUCE, 5}, }, + {{-1, REDUCE, 6}, }, + {{-1, REDUCE, 7}, }, + {{-1, REDUCE, 9}, }, + {{-1, REDUCE, 10}, }, + {{-1, REDUCE, 11}, }, + {{-1, REDUCE, 12}, }, + {{-1, REDUCE, 13}, }, + {{-1, REDUCE, 14}, }, + {{-1, REDUCE, 8}, }, + {{-1, REDUCE, 20}, }, + {{-1, REDUCE, 21}, }, + {{-1, REDUCE, 15}, }, + {{-1, REDUCE, 16}, }, + {{-1, REDUCE, 17}, }, + {{-1, REDUCE, 18}, }, + {{-1, REDUCE, 19}, }, + {{-1, REDUCE, 22}, }, + {{-1, ERROR, 34}, {6, SHIFT, 60}, }, + {{-1, REDUCE, 65}, }, + {{-1, REDUCE, 66}, }, + {{-1, REDUCE, 67}, }, + {{-1, REDUCE, 69}, {0, SHIFT, 57}, }, + {{-1, REDUCE, 61}, }, + {{-1, REDUCE, 62}, }, + {{-1, REDUCE, 63}, }, + {{-1, REDUCE, 64}, }, + {{-1, REDUCE, 46}, }, + {{-1, REDUCE, 57}, }, + {{-1, REDUCE, 59}, }, + {{-1, ERROR, 46}, {7, SHIFT, 61}, {8, SHIFT, 62}, {9, SHIFT, 63}, {10, SHIFT, 64}, {11, SHIFT, 65}, {12, SHIFT, 66}, }, + {{-1, REDUCE, 53}, }, + {{-1, ERROR, 48}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, REDUCE, 48}, }, + {{-1, ERROR, 50}, {23, SHIFT, 37}, }, + {{-1, ERROR, 51}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 52}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 53}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 54}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 55}, {6, SHIFT, 73}, }, + {{-1, REDUCE, 68}, }, + {{-1, ERROR, 57}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, REDUCE, 47}, }, + {{-1, REDUCE, 1}, }, + {{-1, ERROR, 60}, {2, SHIFT, 75}, {22, SHIFT, 76}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 61}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 62}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 63}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 64}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 65}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 66}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, REDUCE, 60}, }, + {{-1, REDUCE, 45}, }, + {{-1, REDUCE, 56}, }, + {{-1, REDUCE, 58}, }, + {{-1, ERROR, 71}, {7, SHIFT, 84}, {8, SHIFT, 85}, {9, SHIFT, 86}, {10, SHIFT, 87}, {11, SHIFT, 88}, {12, SHIFT, 89}, }, + {{-1, REDUCE, 52}, }, + {{-1, ERROR, 73}, {2, SHIFT, 90}, {22, SHIFT, 91}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 74}, {1, SHIFT, 93}, }, + {{-1, ERROR, 75}, {25, SHIFT, 94}, }, + {{-1, REDUCE, 55}, }, + {{-1, REDUCE, 32}, {17, SHIFT, 95}, {18, SHIFT, 96}, {19, SHIFT, 97}, {20, SHIFT, 98}, }, + {{-1, ERROR, 78}, {13, SHIFT, 99}, }, + {{-1, ERROR, 79}, {13, SHIFT, 100}, }, + {{-1, ERROR, 80}, {13, SHIFT, 101}, }, + {{-1, ERROR, 81}, {13, SHIFT, 102}, }, + {{-1, ERROR, 82}, {13, SHIFT, 103}, }, + {{-1, ERROR, 83}, {13, SHIFT, 104}, }, + {{-1, ERROR, 84}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 85}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 86}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 87}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 88}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 89}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 90}, {25, SHIFT, 111}, }, + {{-1, REDUCE, 54}, }, + {{-1, REDUCE, 31}, {17, SHIFT, 112}, {18, SHIFT, 113}, {19, SHIFT, 114}, {20, SHIFT, 115}, }, + {{-1, REDUCE, 70}, }, + {{-1, REDUCE, 51}, }, + {{-1, ERROR, 95}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 96}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 97}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 98}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 99}, {23, SHIFT, 37}, }, + {{-1, ERROR, 100}, {23, SHIFT, 37}, }, + {{-1, ERROR, 101}, {23, SHIFT, 37}, }, + {{-1, ERROR, 102}, {23, SHIFT, 37}, }, + {{-1, ERROR, 103}, {23, SHIFT, 37}, }, + {{-1, ERROR, 104}, {23, SHIFT, 37}, }, + {{-1, ERROR, 105}, {13, SHIFT, 126}, }, + {{-1, ERROR, 106}, {13, SHIFT, 127}, }, + {{-1, ERROR, 107}, {13, SHIFT, 128}, }, + {{-1, ERROR, 108}, {13, SHIFT, 129}, }, + {{-1, ERROR, 109}, {13, SHIFT, 130}, }, + {{-1, ERROR, 110}, {13, SHIFT, 131}, }, + {{-1, REDUCE, 50}, }, + {{-1, ERROR, 112}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 113}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 114}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, ERROR, 115}, {23, SHIFT, 37}, {24, SHIFT, 9}, {25, SHIFT, 38}, }, + {{-1, REDUCE, 26}, }, + {{-1, REDUCE, 24}, }, + {{-1, REDUCE, 28}, }, + {{-1, REDUCE, 30}, }, + {{-1, REDUCE, 36}, }, + {{-1, REDUCE, 38}, }, + {{-1, REDUCE, 40}, }, + {{-1, REDUCE, 42}, }, + {{-1, REDUCE, 44}, }, + {{-1, REDUCE, 34}, }, + {{-1, ERROR, 126}, {23, SHIFT, 37}, }, + {{-1, ERROR, 127}, {23, SHIFT, 37}, }, + {{-1, ERROR, 128}, {23, SHIFT, 37}, }, + {{-1, ERROR, 129}, {23, SHIFT, 37}, }, + {{-1, ERROR, 130}, {23, SHIFT, 37}, }, + {{-1, ERROR, 131}, {23, SHIFT, 37}, }, + {{-1, REDUCE, 25}, }, + {{-1, REDUCE, 23}, }, + {{-1, REDUCE, 27}, }, + {{-1, REDUCE, 29}, }, + {{-1, REDUCE, 35}, }, + {{-1, REDUCE, 37}, }, + {{-1, REDUCE, 39}, }, + {{-1, REDUCE, 41}, }, + {{-1, REDUCE, 43}, }, + {{-1, REDUCE, 33}, }, + };*/ + private static int[][][] gotoTable; +/* { + {{-1, 11}, }, + {{-1, 12}, {13, 59}, }, + {{-1, 13}, }, + {{-1, 14}, }, + {{-1, 15}, }, + {{-1, 16}, }, + {{-1, 17}, }, + {{-1, 18}, }, + {{-1, 19}, }, + {{-1, 20}, }, + {{-1, 21}, }, + {{-1, 22}, }, + {{-1, 23}, }, + {{-1, 24}, }, + {{-1, 25}, }, + {{-1, 26}, }, + {{-1, 27}, }, + {{-1, 28}, }, + {{-1, 29}, }, + {{-1, 30}, }, + {{-1, 31}, }, + {{-1, 32}, }, + {{-1, 33}, }, + {{-1, 39}, {4, 44}, {5, 45}, {6, 46}, {7, 47}, {48, 67}, {51, 69}, {52, 70}, {53, 71}, {54, 72}, {57, 74}, {60, 77}, {61, 78}, {62, 79}, {63, 80}, {64, 81}, {65, 82}, {66, 83}, {73, 92}, {84, 105}, {85, 106}, {86, 107}, {87, 108}, {88, 109}, {89, 110}, {95, 116}, {96, 117}, {97, 118}, {98, 119}, {112, 132}, {113, 133}, {114, 134}, {115, 135}, }, + {{-1, 34}, {8, 55}, }, + {{-1, 40}, {3, 43}, {50, 68}, {99, 120}, {100, 121}, {101, 122}, {102, 123}, {103, 124}, {104, 125}, {126, 136}, {127, 137}, {128, 138}, {129, 139}, {130, 140}, {131, 141}, }, + {{-1, 41}, {0, 35}, {8, 35}, {13, 35}, }, + {{-1, 42}, {0, 36}, {8, 36}, {13, 36}, }, + };*/ + private static String[] errorMessages; +/* { + "expecting: 'stop', 'fend', 'goto', 'param', 'ret', 'if', 'write', nombre, '@', identif", + "expecting: nombre, '@', identif", + "expecting: 'stop', 'fend', 'goto', 'param', 'ret', 'if', 'write', nombre, '@', identif, EOF", + "expecting: nombre", + "expecting: 'stop', 'fend', 'goto', 'param', 'ret', 'if', 'write', '@', identif", + "expecting: '[', 'fbegin', '='", + "expecting: EOF", + "expecting: '='", + "expecting: ']', 'stop', 'fend', '!=', '<', '<=', '>', '>=', '==', 'goto', 'param', 'ret', 'if', '-', '+', '*', '/', 'write', nombre, '@', identif, EOF", + "expecting: '[', ']', 'stop', 'fend', '=', '!=', '<', '<=', '>', '>=', '==', 'goto', 'param', 'ret', 'if', '-', '+', '*', '/', 'write', nombre, '@', identif, EOF", + "expecting: '!=', '<', '<=', '>', '>=', '=='", + "expecting: ']', 'stop', 'fend', '=', '!=', '<', '<=', '>', '>=', '==', 'goto', 'param', 'ret', 'if', '-', '+', '*', '/', 'write', nombre, '@', identif, EOF", + "expecting: 'call', 'read', nombre, '@', identif", + "expecting: ']'", + "expecting: identif", + "expecting: 'stop', 'fend', 'goto', 'param', 'ret', 'if', '-', '+', '*', '/', 'write', nombre, '@', identif, EOF", + "expecting: 'goto'", + };*/ + private static int[] errors; +/* { + 0, 1, 2, 3, 1, 1, 1, 1, 4, 3, 5, 6, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 7, 7, 8, 9, 2, 8, 8, 8, 2, 2, 2, 10, 2, 1, 2, 3, 1, 1, 1, 1, 7, 11, 1, 2, 6, 12, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 10, 2, 12, 13, 14, 2, 15, 16, 16, 16, 16, 16, 16, 1, 1, 1, 1, 1, 1, 14, 2, 15, 11, 2, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 16, 16, 16, 16, 16, 16, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + };*/ + + 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/c3aParser/parser/ParserException.java b/src/c3aParser/parser/ParserException.java new file mode 100644 index 0000000..f23ce10 --- /dev/null +++ b/src/c3aParser/parser/ParserException.java @@ -0,0 +1,22 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.parser; + +import c3aParser.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/c3aParser/parser/State.java b/src/c3aParser/parser/State.java new file mode 100644 index 0000000..fea41ba --- /dev/null +++ b/src/c3aParser/parser/State.java @@ -0,0 +1,17 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.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/c3aParser/parser/TokenIndex.java b/src/c3aParser/parser/TokenIndex.java new file mode 100644 index 0000000..5c703c2 --- /dev/null +++ b/src/c3aParser/parser/TokenIndex.java @@ -0,0 +1,173 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package c3aParser.parser; + +import c3aParser.node.*; +import c3aParser.analysis.*; + +class TokenIndex extends AnalysisAdapter +{ + int index; + + @Override + public void caseTCo(@SuppressWarnings("unused") TCo node) + { + this.index = 0; + } + + @Override + public void caseTCf(@SuppressWarnings("unused") TCf node) + { + this.index = 1; + } + + @Override + public void caseTCall(@SuppressWarnings("unused") TCall node) + { + this.index = 2; + } + + @Override + public void caseTStop(@SuppressWarnings("unused") TStop node) + { + this.index = 3; + } + + @Override + public void caseTFbegin(@SuppressWarnings("unused") TFbegin node) + { + this.index = 4; + } + + @Override + public void caseTFend(@SuppressWarnings("unused") TFend node) + { + this.index = 5; + } + + @Override + public void caseTAff(@SuppressWarnings("unused") TAff node) + { + this.index = 6; + } + + @Override + public void caseTNoteq(@SuppressWarnings("unused") TNoteq node) + { + this.index = 7; + } + + @Override + public void caseTInf(@SuppressWarnings("unused") TInf node) + { + this.index = 8; + } + + @Override + public void caseTInfeq(@SuppressWarnings("unused") TInfeq node) + { + this.index = 9; + } + + @Override + public void caseTSup(@SuppressWarnings("unused") TSup node) + { + this.index = 10; + } + + @Override + public void caseTSupeq(@SuppressWarnings("unused") TSupeq node) + { + this.index = 11; + } + + @Override + public void caseTEq(@SuppressWarnings("unused") TEq node) + { + this.index = 12; + } + + @Override + public void caseTGoto(@SuppressWarnings("unused") TGoto node) + { + this.index = 13; + } + + @Override + public void caseTParam(@SuppressWarnings("unused") TParam node) + { + this.index = 14; + } + + @Override + public void caseTRet(@SuppressWarnings("unused") TRet node) + { + this.index = 15; + } + + @Override + public void caseTIf(@SuppressWarnings("unused") TIf node) + { + this.index = 16; + } + + @Override + public void caseTMoins(@SuppressWarnings("unused") TMoins node) + { + this.index = 17; + } + + @Override + public void caseTPlus(@SuppressWarnings("unused") TPlus node) + { + this.index = 18; + } + + @Override + public void caseTFois(@SuppressWarnings("unused") TFois node) + { + this.index = 19; + } + + @Override + public void caseTDivise(@SuppressWarnings("unused") TDivise node) + { + this.index = 20; + } + + @Override + public void caseTWrite(@SuppressWarnings("unused") TWrite node) + { + this.index = 21; + } + + @Override + public void caseTRead(@SuppressWarnings("unused") TRead node) + { + this.index = 22; + } + + @Override + public void caseTNombre(@SuppressWarnings("unused") TNombre node) + { + this.index = 23; + } + + @Override + public void caseTPrefixeTemp(@SuppressWarnings("unused") TPrefixeTemp node) + { + this.index = 24; + } + + @Override + public void caseTIdentif(@SuppressWarnings("unused") TIdentif node) + { + this.index = 25; + } + + @Override + public void caseEOF(@SuppressWarnings("unused") EOF node) + { + this.index = 26; + } +} diff --git a/src/c3aParser/parser/parser.dat b/src/c3aParser/parser/parser.dat new file mode 100644 index 0000000000000000000000000000000000000000..ad501e5a0e8ff588785c34dca865cbef609f41d4 GIT binary patch literal 8098 zcmZQzVCZ9DVBr4$|Nnmm1_ovZ2!PRy3=9mc5FrL81_lORC>tct2W7J`Ffi~#*&ww7 zP&OL_1A{1(&CbBUAP!}7FfcGkK-ruO3=EP`HWvc}0}GNnKz76QsN&G0#=yY92-O2p zZ^*#Fzy#%k+z7(RW+0mnayPOZHaCIHN7e)KAE|mk;XtY$<nY4hcP=Eqg2EN#Ur=xw zAjKOfOknY5#K6D+i#KDWcr#&OV1UJ&DN?+d;R$!-a0bOA%#RkJbOd!5C{A2K4uWD! zP#i<qR%mg>&A`AQg(QX?uOKb3Gzu~klonxr1@S@g0#XAKhxrvG5A!Q1uBnwqk=+Hd z1DOx92bm9Y7cw7|7LfU%ct+-f!V#Gd$`i<ZP#7WedC<~7$nVJVApaxtL1_e;FM_5Y zlwXnML1Bi>2c;2Yz95=@AvC@)8ea@4enDZU#K6D+3KLM=*`TR)MB_W5@tu*(0;K`; zbcXCsTQt3PXncD#z5^Ox4~-8>$H?YeGcYi)L(@FSUm*3MxCQwOWH%_>L2Qt{pg0Dx zL3V=T7sLkH2Z~z|8{}_Lyn@*1eg@@D<njoV&tdrvUpay7R*)X#ybCH5kj+3gA5=yl z%MnvXg31z7^?>|Esvc0;M2sF}znUYZH&3)Ubpe%4NO1^?V`9ul4qJURGePN+4arPU z8V8k8pt$vBU|;~{2N2r_seZ&4kH~QYN>{|V4_OZ={gJ8%luk+214_@N>H(#DQuToH z2Qhk(;|LT7$b4P2I0MyR$nv0i3OR4PgYr5k(ij*RLKqkrV0k-~fq?;*x5F417+`rj z9Mryos*hk`V1VWANHlvv`35<yfYK){twbTEm1rW<3Ua#l0@($1Lo8Cc2`Z~V=@8Zi zivy{HrdLqf1?3l3B)$Rz0|Thc2N@O5z`y`1??LPY1_lODSr1|-GB7ZJ>J<<>3C%7) zq&8$Snw&q9Tnd_80FqoPnp_}~TpF5O5RzOvnp`lFTn1X+2gNHf=?Xb-f#RQ3J)m?# zsvb~!B2^D4-I1yXls<{kgPhJl=@gch^3l=~sJuo_OY%r*sQ@W06(XgjBBZobjAou2 z8Xr_wA;$+OeG=n-WIdpCOsXDGdM8y6C|?kx2RUp(`2|@IvK%PC;F1I77hH0n{DMmk zlwWYkf$|G3xlE*dRfm@6vXJEJ(d4p`<QmZAa**U2(d2TG<eJdr@{r`3(b5a3-GdzW zpfrf=Ct}(<ptMS=9#EPlRSzib6Qc*Y-U9Wdkoh40AoFF=!b1*?uY$%0^@Wl3YoN(% zq49Ol_@K5va+(FD4P-wd%Yo7cE;&%zz$FJt8@S{^X#<xWC~Y9iA^Q_lo+0x=>X7-; zX#SK%<13@_LG3$a{px7)nrM7&G`=DO0|Rp0f%*-wumiO%Kz%?^e*|U+h!0~U_Xm;t zcF6rYQ2h>5531i`Y*76UV}t5<7#q3I2x`y5#F4`ZIqe~bCvqA^4o77FA%`b&8U@uK zFuOqQ5*Qm4K8nyb3n*+seR5D*1og#1Z9Pzb6V^Wiwbw!YAy8iuRDXc_kf3%LsBQuE zNkDBqP`%~Bz`y|N4}jWHp!TCL0|Nu7{S9i*fZEicwhO483~Hx<+P<JR38*~_YJY&* zsGzn6s67`0Z8L((NKktLR33ub0HCrDRIh`|IZ#~<D$_vqFR1(i)ng?L3=E*Usg!|% z0aV|VF)%QI>X32<1_n^M)xyBQ04j@G85kHq<x3j_0|ThcXh$j!LHQ5VRt2@`_@Utg z%EO>GASjK2%0o~e2vpBhFfcHH>Xb?b1_n_5QN_T(0IDmh85kHq^+F8;0|TfIsAXVa z0OjKj1_lODp6z5{U;yRME(Qh$P+sh2U|;~{yB-Dx22dXBMQUe((mAM&2+AKIcY$b7 zS_RRtav4;nfYgA>B9Iyo4N?Q5LFqJ%A(f$mp@1QkA(^3sA(J7GA)UdBL4iS?p_rkB zA)lduL7hPd%ui!TWyoVlf%DTD^1&)#@&ycu3`Goy47qR>MGUD7C2(FQLmHf2&QQdV z$xy<O3Khv?$Y;o9NMZo#fY{~$mC0mC0ox058z}tbak!Uw6QXgLFgSe-3Jq5Ve+E!~ z62#$hWWO^o_~B4RU;n8y;EF+6obHQ;#<@B}8bcC8DnmLrJ;KtLEd!`5;=`dE7Dl+_ z)fpiAr{U1A&JYW?olweG1e*nl8FdC5xGozcQ9HP(9g?Um5}T6TqYF1(8_v>#v-IIC za&sBTXRz>GfHS-hu|<5yf#LvUx;n#13PWw2VMtjhFfh!<Y4T{CfYKRi?Ew;jrE7hh zA(zaM$dJR31J6aEIw=ue?;)49AoFmSbGS<)P~3n<ez4cPsBUIp$j9kYLgmy@DPwTe zYw8RLA3$bVK`j~3s2XTg57g=cv5_&Tr3w-UwNyc^R1gNKr8Wl5Ou#UxRRtQg1la*% z!!U>s!=RB&5F6xH5Dju8h>eUv=7D-5ATf{{klR7M5fC362B|^DFgrkcKrK8_PX#0o v>ZO2sC)hAHb3tOrdO>ainFA6>#vngn!`SQriD5GXBt{IzW)Db=7`;pY7xPiZ literal 0 HcmV?d00001 diff --git a/src/nasmParser/lexer/IPushbackReader.java b/src/nasmParser/lexer/IPushbackReader.java new file mode 100644 index 0000000..bad3c45 --- /dev/null +++ b/src/nasmParser/lexer/IPushbackReader.java @@ -0,0 +1,12 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.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/nasmParser/lexer/Lexer.java b/src/nasmParser/lexer/Lexer.java new file mode 100644 index 0000000..ef2ff27 --- /dev/null +++ b/src/nasmParser/lexer/Lexer.java @@ -0,0 +1,1164 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.lexer; + +import java.io.*; +import nasmParser.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( + 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( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 33: + { + @SuppressWarnings("hiding") Token token = new33( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 34: + { + @SuppressWarnings("hiding") Token token = new34( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 35: + { + @SuppressWarnings("hiding") Token token = new35( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 36: + { + @SuppressWarnings("hiding") Token token = new36( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 37: + { + @SuppressWarnings("hiding") Token token = new37( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 38: + { + @SuppressWarnings("hiding") Token token = new38( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 39: + { + @SuppressWarnings("hiding") Token token = new39( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 40: + { + @SuppressWarnings("hiding") Token token = new40( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 41: + { + @SuppressWarnings("hiding") Token token = new41( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 42: + { + @SuppressWarnings("hiding") Token token = new42( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 43: + { + @SuppressWarnings("hiding") Token token = new43( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 44: + { + @SuppressWarnings("hiding") Token token = new44( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 45: + { + @SuppressWarnings("hiding") Token token = new45( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 46: + { + @SuppressWarnings("hiding") Token token = new46( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 47: + { + @SuppressWarnings("hiding") Token token = new47( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 48: + { + @SuppressWarnings("hiding") Token token = new48( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 49: + { + @SuppressWarnings("hiding") Token token = new49( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 50: + { + @SuppressWarnings("hiding") Token token = new50( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 51: + { + @SuppressWarnings("hiding") Token token = new51( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 52: + { + @SuppressWarnings("hiding") Token token = new52( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 53: + { + @SuppressWarnings("hiding") Token token = new53( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 54: + { + @SuppressWarnings("hiding") Token token = new54( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 55: + { + @SuppressWarnings("hiding") Token token = new55( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 56: + { + @SuppressWarnings("hiding") Token token = new56( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 57: + { + @SuppressWarnings("hiding") Token token = new57( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 58: + { + @SuppressWarnings("hiding") Token token = new58( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 59: + { + @SuppressWarnings("hiding") Token token = new59( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 60: + { + @SuppressWarnings("hiding") Token token = new60( + getText(accept_length), + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 61: + { + @SuppressWarnings("hiding") Token token = new61( + 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 TSpaces(text, line, pos); } + Token new1(@SuppressWarnings("hiding") String text, @SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TComment(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 TMinus(line, pos); } + Token new4(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TTimes(line, pos); } + Token new5(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TBrackopen(line, pos); } + Token new6(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TBrackclose(line, pos); } + Token new7(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSemicol(line, pos); } + Token new8(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TComma(line, pos); } + Token new9(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TQuote(line, pos); } + Token new10(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TDot(line, pos); } + Token new11(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TPercentage(line, pos); } + Token new12(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TByte(line, pos); } + Token new13(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TWord(line, pos); } + Token new14(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TDword(line, pos); } + Token new15(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TPrefixRegister(line, pos); } + Token new16(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TInc(line, pos); } + Token new17(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSection(line, pos); } + Token new18(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TData(line, pos); } + Token new19(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TDefinebyte(line, pos); } + Token new20(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TDefineword(line, pos); } + Token new21(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TDefinedoubleword(line, pos); } + Token new22(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TDefinequadword(line, pos); } + Token new23(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TDefinetenbytes(line, pos); } + Token new24(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TBss(line, pos); } + Token new25(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TReservebyte(line, pos); } + Token new26(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TReserveword(line, pos); } + Token new27(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TReservedoubleword(line, pos); } + Token new28(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TReservequadword(line, pos); } + Token new29(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TReservetenbytes(line, pos); } + Token new30(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TText(line, pos); } + Token new31(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TGlobal(line, pos); } + Token new32(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TMov(line, pos); } + Token new33(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TPush(line, pos); } + Token new34(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TPop(line, pos); } + Token new35(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TAdd(line, pos); } + Token new36(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSub(line, pos); } + Token new37(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TImul(line, pos); } + Token new38(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TIdiv(line, pos); } + Token new39(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TAnd(line, pos); } + Token new40(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TOr(line, pos); } + Token new41(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TXor(line, pos); } + Token new42(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TNot(line, pos); } + Token new43(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TCmp(line, pos); } + Token new44(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TJmp(line, pos); } + Token new45(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TJe(line, pos); } + Token new46(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TJne(line, pos); } + Token new47(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TJg(line, pos); } + Token new48(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TJge(line, pos); } + Token new49(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TJl(line, pos); } + Token new50(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TJle(line, pos); } + Token new51(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TCall(line, pos); } + Token new52(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TRet(line, pos); } + Token new53(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TInt(line, pos); } + Token new54(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TEax(line, pos); } + Token new55(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TEbx(line, pos); } + Token new56(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TEcx(line, pos); } + Token new57(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TEdx(line, pos); } + Token new58(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TEbp(line, pos); } + Token new59(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TEsp(line, pos); } + Token new60(@SuppressWarnings("hiding") String text, @SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TNumber(text, line, pos); } + Token new61(@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 + {{9, 9, 1}, {10, 10, 2}, {13, 13, 3}, {32, 32, 4}, {36, 36, 5}, {37, 37, 6}, {39, 39, 7}, {42, 42, 8}, {43, 43, 9}, {44, 44, 10}, {45, 45, 11}, {46, 46, 12}, {48, 57, 13}, {58, 58, 14}, {59, 59, 15}, {64, 64, 16}, {65, 90, 5}, {91, 91, 17}, {93, 93, 18}, {95, 95, 5}, {97, 97, 19}, {98, 98, 20}, {99, 99, 21}, {100, 100, 22}, {101, 101, 23}, {102, 102, 5}, {103, 103, 24}, {104, 104, 5}, {105, 105, 25}, {106, 106, 26}, {107, 108, 5}, {109, 109, 27}, {110, 110, 28}, {111, 111, 29}, {112, 112, 30}, {113, 113, 5}, {114, 114, 31}, {115, 115, 32}, {116, 118, 5}, {119, 119, 33}, {120, 120, 34}, {121, 122, 5}, }, + {{9, 32, -2}, }, + {{9, 32, -2}, }, + {{9, 32, -2}, }, + {{9, 32, -2}, }, + {{48, 57, 35}, {65, 90, 35}, {97, 122, 35}, }, + {}, + {}, + {}, + {}, + {}, + {}, + {{98, 98, 36}, {100, 100, 37}, {116, 116, 38}, }, + {{48, 57, 13}, }, + {}, + {{0, 9, 39}, {10, 10, 40}, {11, 12, 39}, {13, 13, 41}, {14, 65535, 39}, }, + {}, + {}, + {}, + {{48, 90, -7}, {97, 99, 35}, {100, 100, 42}, {101, 109, 35}, {110, 110, 43}, {111, 122, 35}, }, + {{48, 90, -7}, {97, 120, 35}, {121, 121, 44}, {122, 122, 35}, }, + {{48, 90, -7}, {97, 97, 45}, {98, 108, 35}, {109, 109, 46}, {110, 122, 35}, }, + {{48, 90, -7}, {97, 97, 35}, {98, 98, 47}, {99, 99, 35}, {100, 100, 48}, {101, 112, 35}, {113, 113, 49}, {114, 115, 35}, {116, 116, 50}, {117, 118, 35}, {119, 119, 51}, {120, 122, 35}, }, + {{48, 90, -7}, {97, 97, 52}, {98, 98, 53}, {99, 99, 54}, {100, 100, 55}, {101, 114, 35}, {115, 115, 56}, {116, 122, 35}, }, + {{48, 90, -7}, {97, 107, 35}, {108, 108, 57}, {109, 122, 35}, }, + {{48, 99, -21}, {100, 100, 58}, {101, 108, 35}, {109, 109, 59}, {110, 110, 60}, {111, 122, 35}, }, + {{48, 90, -7}, {97, 100, 35}, {101, 101, 61}, {102, 102, 35}, {103, 103, 62}, {104, 107, 35}, {108, 108, 63}, {109, 109, 64}, {110, 110, 65}, {111, 122, 35}, }, + {{48, 90, -7}, {97, 110, 35}, {111, 111, 66}, {112, 122, 35}, }, + {{48, 110, -29}, {111, 111, 67}, {112, 122, 35}, }, + {{48, 90, -7}, {97, 113, 35}, {114, 114, 68}, {115, 122, 35}, }, + {{48, 110, -29}, {111, 111, 69}, {112, 116, 35}, {117, 117, 70}, {118, 122, 35}, }, + {{48, 100, -28}, {101, 101, 71}, {102, 122, 35}, }, + {{48, 100, -28}, {101, 101, 72}, {102, 116, 35}, {117, 117, 73}, {118, 122, 35}, }, + {{48, 110, -29}, {111, 111, 74}, {112, 122, 35}, }, + {{48, 110, -29}, {111, 111, 75}, {112, 122, 35}, }, + {{48, 122, -7}, }, + {{115, 115, 76}, }, + {{97, 97, 77}, }, + {{101, 101, 78}, }, + {{0, 65535, -17}, }, + {{13, 13, 79}, }, + {}, + {{48, 99, -21}, {100, 100, 80}, {101, 122, 35}, }, + {{48, 99, -21}, {100, 100, 81}, {101, 122, 35}, }, + {{48, 90, -7}, {97, 115, 35}, {116, 116, 82}, {117, 122, 35}, }, + {{48, 107, -26}, {108, 108, 83}, {109, 122, 35}, }, + {{48, 90, -7}, {97, 111, 35}, {112, 112, 84}, {113, 122, 35}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 110, -29}, {111, 111, 85}, {112, 122, 35}, }, + {{48, 90, -7}, {97, 119, 35}, {120, 120, 86}, {121, 122, 35}, }, + {{48, 111, -48}, {112, 112, 87}, {113, 119, 35}, {120, 120, 88}, {121, 122, 35}, }, + {{48, 119, -54}, {120, 120, 89}, {121, 122, 35}, }, + {{48, 119, -54}, {120, 120, 90}, {121, 122, 35}, }, + {{48, 111, -48}, {112, 112, 91}, {113, 122, 35}, }, + {{48, 110, -29}, {111, 111, 92}, {112, 122, 35}, }, + {{48, 90, -7}, {97, 104, 35}, {105, 105, 93}, {106, 122, 35}, }, + {{48, 90, -7}, {97, 116, 35}, {117, 117, 94}, {118, 122, 35}, }, + {{48, 90, -7}, {97, 98, 35}, {99, 99, 95}, {100, 115, 35}, {116, 116, 96}, {117, 122, 35}, }, + {{48, 122, -7}, }, + {{48, 100, -28}, {101, 101, 97}, {102, 122, 35}, }, + {{48, 100, -28}, {101, 101, 98}, {102, 122, 35}, }, + {{48, 111, -48}, {112, 112, 99}, {113, 122, 35}, }, + {{48, 100, -28}, {101, 101, 100}, {102, 122, 35}, }, + {{48, 90, -7}, {97, 117, 35}, {118, 118, 101}, {119, 122, 35}, }, + {{48, 115, -46}, {116, 116, 102}, {117, 122, 35}, }, + {{48, 122, -7}, }, + {{48, 111, -48}, {112, 112, 103}, {113, 122, 35}, }, + {{48, 90, -7}, {97, 114, 35}, {115, 115, 104}, {116, 122, 35}, }, + {{48, 114, -72}, {115, 115, 105}, {116, 116, 106}, {117, 122, 35}, }, + {{48, 98, -62}, {99, 99, 107}, {100, 122, 35}, }, + {{48, 97, -24}, {98, 98, 108}, {99, 122, 35}, }, + {{48, 113, -31}, {114, 114, 109}, {115, 122, 35}, }, + {{48, 113, -31}, {114, 114, 110}, {115, 122, 35}, }, + {{115, 115, 111}, }, + {{116, 116, 112}, }, + {{120, 120, 113}, }, + {}, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 100, -28}, {101, 101, 114}, {102, 122, 35}, }, + {{48, 107, -26}, {108, 108, 115}, {109, 122, 35}, }, + {{48, 122, -7}, }, + {{48, 113, -31}, {114, 114, 116}, {115, 122, 35}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 97, -24}, {98, 98, 117}, {99, 122, 35}, }, + {{48, 117, -68}, {118, 118, 118}, {119, 122, 35}, }, + {{48, 107, -26}, {108, 108, 119}, {109, 122, 35}, }, + {{48, 107, -26}, {108, 108, 120}, {109, 122, 35}, }, + {{32, 32, 121}, {48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 90, -7}, {97, 103, 35}, {104, 104, 122}, {105, 122, 35}, }, + {{48, 97, -24}, {98, 98, 123}, {99, 99, 35}, {100, 100, 124}, {101, 112, 35}, {113, 113, 125}, {114, 115, 35}, {116, 116, 126}, {117, 118, 35}, {119, 119, 127}, {120, 122, 35}, }, + {{48, 122, -7}, }, + {{48, 115, -46}, {116, 116, 128}, {117, 122, 35}, }, + {{48, 122, -7}, }, + {{48, 99, -21}, {100, 100, 129}, {101, 122, 35}, }, + {{48, 122, -7}, }, + {}, + {{97, 97, 130}, }, + {{116, 116, 131}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 99, -21}, {100, 100, 132}, {101, 122, 35}, }, + {{48, 90, -7}, {97, 97, 133}, {98, 122, 35}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 116, -61}, {117, 117, 134}, {118, 122, 35}, }, + {{48, 48, 135}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 122, -7}, }, + {{48, 104, -60}, {105, 105, 136}, {106, 122, 35}, }, + {{48, 122, -7}, }, + {}, + {}, + {{48, 122, -7}, }, + {{48, 107, -26}, {108, 108, 137}, {109, 122, 35}, }, + {{48, 99, -21}, {100, 100, 138}, {101, 122, 35}, }, + {{120, 120, 139}, }, + {{48, 110, -29}, {111, 111, 140}, {112, 122, 35}, }, + {{48, 122, -7}, }, + {{48, 100, -28}, {101, 101, 141}, {102, 122, 35}, }, + {{56, 56, 142}, }, + {{48, 90, -7}, {97, 109, 35}, {110, 110, 143}, {111, 122, 35}, }, + {{48, 122, -7}, }, + {{48, 48, 144}, }, + {{48, 122, -7}, }, + {}, + } + };*/ + + private static int[][] accept; +/* { + // INITIAL + {-1, 0, 0, 0, 0, 61, 11, 9, 4, 2, 8, 3, 10, 60, 7, -1, 15, 5, 6, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, -1, -1, -1, -1, 1, 1, 61, 61, 61, 61, 61, 19, 21, 22, 23, 20, 61, 61, 61, 61, 61, 61, 61, 61, 61, 45, 47, 49, 61, 61, 61, 61, 40, 61, 61, 61, 61, 61, 61, 61, -1, -1, -1, 1, 35, 39, 61, 61, 43, 61, 54, 58, 55, 56, 57, 59, 61, 61, 61, 61, 61, 48, 50, 44, 46, 32, 42, 34, 61, 61, 52, 61, 36, 61, 41, 24, -1, -1, 12, 51, 61, 61, 38, 37, 61, -1, 33, 25, 27, 28, 29, 26, 61, 13, 18, 30, 14, 61, 61, -1, 61, 31, 61, -1, 61, 16, -1, 17, 53, }, + + };*/ + + 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/nasmParser/lexer/LexerException.java b/src/nasmParser/lexer/LexerException.java new file mode 100644 index 0000000..43233cb --- /dev/null +++ b/src/nasmParser/lexer/LexerException.java @@ -0,0 +1,22 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.lexer; + +import nasmParser.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/nasmParser/lexer/lexer.dat b/src/nasmParser/lexer/lexer.dat new file mode 100644 index 0000000000000000000000000000000000000000..d33ec07f563edccd204503643bdbba3a7ab795f8 GIT binary patch literal 5580 zcmZQzU|?imV3^3jz@Wvzz`zN`ATcfm1_lsjVqjq4g<@s~1_lKvW?^7pP=R7r1_lOI zC}v||U{Hr*cBr`^vpE<T7_^}nWRDI50|N+y?9gRkU;trm1_lN_DCS{cU@%}{V6cSR zZN<RA0K$9>3=Gy#%+J8U-~hz}3=9m83=9lW3=9k)_e3)=Fo3Wi0|P@W6bmshFvLSK zNKGOG0|N*PGcYhDL9qw}14A+ti!v}Uq(HG40|P@U6pJ%3Fr+~-$eeTr1_lt8U|?X# zfMSq%CIbTl2um_BFl0fo6axc8HUk4g4%D5w3=9k)EX}~ckO##w3=9nUP%O*9z)%3i zatsU%g-{GKzlec>0fgll7#ND77!*Gx3=9lqQ1i<f7#KiUk%57s0*aLw7#J!U7#OOc zYC!P~iW7zZ|NsAkrU_E`pmYI?D`lj30I@;g3$h2qX21bJ`eES@N>i{f2c;>HUqDz5 z>Moc)pfm|G4ipX`8suJ3x&x&r5Y}K|U;w2jP&xvMgVcktCIbTl9|Obx|IjoF(hI|& zv<osn>i_@$KcQ&@lomj4hq(!qmO<$N6lWlDSe${<HYm<ueg)+ZbhAL=57Gk)dk_Yt ze~@|*28o0Gg02S?exSSo3Lj9K0jUGo4Z@(j0<s^bALLhT`aya?`axJ9nzqsX1=0ud z7bvZP)Wg!5AvBGF(icb^6c-?D#K6E%3QcDqaZnlqVPj|-gSiQm??GlGhbhQUCeZu_ za+4{No6Mm34HVwy(EJ8U;~+agZUA8m1_lO@8(?-|3u{mw1L*;U83=>Q5m1=H^uXde z`Tzg_uaWEol`)`j0O<kg2k8M}P?-Y?YY?`9=1rJcp!A0BN09qL`ax!aur0K_0F@gc zaZq^y!gkQ|0^Pm#&~gD}H>ivQ*$cv;GLBF>1E~Yq0a6FTPSElL=3Y>K1GzWv|NsAw zp?(3Wb4F8#EnGqA0%SHQPC(cNTJFHihNWS2vt6NPgW?UOACz`L*bSP7VESQhOZor* z{}X8ZgTl`p8h$W!FniF|c|g^n+vADD9&~qlLEQ<n2j(7hb>3*|KxHT>Osk+}2Z#?! zt03$HExSPJ9)x|Ne2~9D*bmBQ0F_Js|Nnmv<%7yA5cY=_P%yWkr`Z5#IH9{4U0ooW zI&AR^axW-;K;Z|%LC}1TZg%$n|Noys>oHJX35KRum^y4`gVGqtY)}~k!XePQ45kMZ zX6Ru^3Lh3e=y4T_7FXEZ1}eKiZUdFkARLBNM}ov*=`H{N|Nj@D=7IbW4)p`N{s=Vv zFt?Te|Ns9Kw2TDV6G@~xP`d_HXTZV=W*)kGKy4mS9z|D&9wsqRKfu&s3lmUV2IO~8 z8wP|y?I=(?2A>{KngQtn<!um-L(6xtau>Ni0M!8?J)k-Xgh6dIQ2B|T78B6YB6@m( zg$a6@0LpWqau?=qT<SpXz@`p8j6rV17RKoIg8YDN9=0$Bg%QZ_p!OOFgUSO?T0(bg z@&Et-FG1@)P#A;E1?h#U!xa|jZU@yl$Zp5xCQ!K!auX>0K^T+{Kz73Hg6S#x|Ns9E zX!#FP2TCI#bs!8%C&=!Dg?ZBd|Njpm)%T!!4-`%?vtjBI|NsC00;!DvDq}$5j;^lo z|Ns9Fp=}h9yFv9O$Ss7_f$B(Pb)fJA@j)0=PJ#F!e}FJ3pM&_I{0hRL@B<aeATfO9 z6U;B@=>p_VQ2e305xq<Wxdr4Om^yU(VCJKT0m#iDy}0zDn?ord<_`2Y1I0hKI4k}C z|NkCnxd2M@AdD@|qlX7b4RUzE>_t}xiX&uopgt_9Uj)LSG8A8&Q5qJ6^uzKFa`^|! zlc4+t%4Z-9iZ@VR0?{CGP(KFbX7uo_M#@JZb)b9%!Zpx(9+YlD;-K^j!nM$R0!kYo zaZow|;W}u!3W^7iI4GP!xE@+h!Q6rFH(2<imrV^&^9bofZ=W<m-Hl5hEYE?;a}aKV zwv#}90O4jR9~4%|?J#6M%+2U_x1iY#Q->T+AUj*3WfCqo;tHdZ|Ns9VhK36$U$jBf zKe{;}x3&}E4|ID-<-`1!@&Et-BhYaQP@3z2j#Hq!3l^TBH~?XE`(Wmw=fzI6b|Fk1 zdiZytg+IuAP(B9XZUzPhm_GD&Ob=Q+2BZ%ZhA{WS^r4r*z0iIFvOhunN)Ya2U|_(O zPeEl0D1U(J4iN5#_MMQ;K(-s^7LeEkEO818$BF;{gU2I4d}IvjGlKFyXlw)I9#A<3 z>Q96G1nP5w`l0Mly`Zr$P#YE0z5?l^2!qT-#!$C|{DaM0(D)f>tPC_p1{xa!jiF&v zhb{&h*8q)2fW{cm<v`;%=wfg_7Po=o1vJhBQv({00kJ{j37|ebXe<E~x1ezVP+uM- zhmJw<1RB=>jmv<>RzURyXuJnBUItSO8n*zkLE}^)8Z@3H0do%n0|RIb1~di&k^^DT zxD{v|%NC@Dfq?-u4hI?!1daEB#`!?wd!R8vkXle*4>U#z8s`IzbArTR`ao>ZI3F@! L0BR;^jMEeViv>_9 literal 0 HcmV?d00001 diff --git a/src/nasmParser/node/AAddInst.java b/src/nasmParser/node/AAddInst.java new file mode 100644 index 0000000..48a678f --- /dev/null +++ b/src/nasmParser/node/AAddInst.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAddInst extends PInst +{ + private POplabel _oplabel_; + private TAdd _add_; + private PAr _ar_; + private TComma _comma_; + private PAcr _acr_; + + public AAddInst() + { + // Constructor + } + + public AAddInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TAdd _add_, + @SuppressWarnings("hiding") PAr _ar_, + @SuppressWarnings("hiding") TComma _comma_, + @SuppressWarnings("hiding") PAcr _acr_) + { + // Constructor + setOplabel(_oplabel_); + + setAdd(_add_); + + setAr(_ar_); + + setComma(_comma_); + + setAcr(_acr_); + + } + + @Override + public Object clone() + { + return new AAddInst( + cloneNode(this._oplabel_), + cloneNode(this._add_), + cloneNode(this._ar_), + cloneNode(this._comma_), + cloneNode(this._acr_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAddInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TAdd getAdd() + { + return this._add_; + } + + public void setAdd(TAdd 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 PAr getAr() + { + return this._ar_; + } + + public void setAr(PAr node) + { + if(this._ar_ != null) + { + this._ar_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ar_ = node; + } + + public TComma getComma() + { + return this._comma_; + } + + public void setComma(TComma node) + { + if(this._comma_ != null) + { + this._comma_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._comma_ = node; + } + + public PAcr getAcr() + { + return this._acr_; + } + + public void setAcr(PAcr node) + { + if(this._acr_ != null) + { + this._acr_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._acr_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._add_) + + toString(this._ar_) + + toString(this._comma_) + + toString(this._acr_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._add_ == child) + { + this._add_ = null; + return; + } + + if(this._ar_ == child) + { + this._ar_ = null; + return; + } + + if(this._comma_ == child) + { + this._comma_ = null; + return; + } + + if(this._acr_ == child) + { + this._acr_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._add_ == oldChild) + { + setAdd((TAdd) newChild); + return; + } + + if(this._ar_ == oldChild) + { + setAr((PAr) newChild); + return; + } + + if(this._comma_ == oldChild) + { + setComma((TComma) newChild); + return; + } + + if(this._acr_ == oldChild) + { + setAcr((PAcr) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AAddress.java b/src/nasmParser/node/AAddress.java new file mode 100644 index 0000000..7699476 --- /dev/null +++ b/src/nasmParser/node/AAddress.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAddress extends PAddress +{ + private POpsizeof _opsizeof_; + private TBrackopen _brackopen_; + private PExp _exp_; + private TBrackclose _brackclose_; + + public AAddress() + { + // Constructor + } + + public AAddress( + @SuppressWarnings("hiding") POpsizeof _opsizeof_, + @SuppressWarnings("hiding") TBrackopen _brackopen_, + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") TBrackclose _brackclose_) + { + // Constructor + setOpsizeof(_opsizeof_); + + setBrackopen(_brackopen_); + + setExp(_exp_); + + setBrackclose(_brackclose_); + + } + + @Override + public Object clone() + { + return new AAddress( + cloneNode(this._opsizeof_), + cloneNode(this._brackopen_), + cloneNode(this._exp_), + cloneNode(this._brackclose_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAddress(this); + } + + public POpsizeof getOpsizeof() + { + return this._opsizeof_; + } + + public void setOpsizeof(POpsizeof node) + { + if(this._opsizeof_ != null) + { + this._opsizeof_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._opsizeof_ = node; + } + + public TBrackopen getBrackopen() + { + return this._brackopen_; + } + + public void setBrackopen(TBrackopen node) + { + if(this._brackopen_ != null) + { + this._brackopen_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._brackopen_ = 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 TBrackclose getBrackclose() + { + return this._brackclose_; + } + + public void setBrackclose(TBrackclose node) + { + if(this._brackclose_ != null) + { + this._brackclose_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._brackclose_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._opsizeof_) + + toString(this._brackopen_) + + toString(this._exp_) + + toString(this._brackclose_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._opsizeof_ == child) + { + this._opsizeof_ = null; + return; + } + + if(this._brackopen_ == child) + { + this._brackopen_ = null; + return; + } + + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._brackclose_ == child) + { + this._brackclose_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._opsizeof_ == oldChild) + { + setOpsizeof((POpsizeof) newChild); + return; + } + + if(this._brackopen_ == oldChild) + { + setBrackopen((TBrackopen) newChild); + return; + } + + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._brackclose_ == oldChild) + { + setBrackclose((TBrackclose) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AAddressAcr.java b/src/nasmParser/node/AAddressAcr.java new file mode 100644 index 0000000..25e0ade --- /dev/null +++ b/src/nasmParser/node/AAddressAcr.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAddressAcr extends PAcr +{ + private PAddress _address_; + + public AAddressAcr() + { + // Constructor + } + + public AAddressAcr( + @SuppressWarnings("hiding") PAddress _address_) + { + // Constructor + setAddress(_address_); + + } + + @Override + public Object clone() + { + return new AAddressAcr( + cloneNode(this._address_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAddressAcr(this); + } + + public PAddress getAddress() + { + return this._address_; + } + + public void setAddress(PAddress node) + { + if(this._address_ != null) + { + this._address_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._address_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._address_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._address_ == child) + { + this._address_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._address_ == oldChild) + { + setAddress((PAddress) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AAddressAr.java b/src/nasmParser/node/AAddressAr.java new file mode 100644 index 0000000..de05302 --- /dev/null +++ b/src/nasmParser/node/AAddressAr.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAddressAr extends PAr +{ + private PAddress _address_; + + public AAddressAr() + { + // Constructor + } + + public AAddressAr( + @SuppressWarnings("hiding") PAddress _address_) + { + // Constructor + setAddress(_address_); + + } + + @Override + public Object clone() + { + return new AAddressAr( + cloneNode(this._address_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAddressAr(this); + } + + public PAddress getAddress() + { + return this._address_; + } + + public void setAddress(PAddress node) + { + if(this._address_ != null) + { + this._address_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._address_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._address_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._address_ == child) + { + this._address_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._address_ == oldChild) + { + setAddress((PAddress) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AAndInst.java b/src/nasmParser/node/AAndInst.java new file mode 100644 index 0000000..3be2e13 --- /dev/null +++ b/src/nasmParser/node/AAndInst.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAndInst extends PInst +{ + private POplabel _oplabel_; + private TAnd _and_; + private PAr _ar_; + private TComma _comma_; + private PAcr _acr_; + + public AAndInst() + { + // Constructor + } + + public AAndInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TAnd _and_, + @SuppressWarnings("hiding") PAr _ar_, + @SuppressWarnings("hiding") TComma _comma_, + @SuppressWarnings("hiding") PAcr _acr_) + { + // Constructor + setOplabel(_oplabel_); + + setAnd(_and_); + + setAr(_ar_); + + setComma(_comma_); + + setAcr(_acr_); + + } + + @Override + public Object clone() + { + return new AAndInst( + cloneNode(this._oplabel_), + cloneNode(this._and_), + cloneNode(this._ar_), + cloneNode(this._comma_), + cloneNode(this._acr_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAndInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TAnd getAnd() + { + return this._and_; + } + + public void setAnd(TAnd 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 PAr getAr() + { + return this._ar_; + } + + public void setAr(PAr node) + { + if(this._ar_ != null) + { + this._ar_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ar_ = node; + } + + public TComma getComma() + { + return this._comma_; + } + + public void setComma(TComma node) + { + if(this._comma_ != null) + { + this._comma_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._comma_ = node; + } + + public PAcr getAcr() + { + return this._acr_; + } + + public void setAcr(PAcr node) + { + if(this._acr_ != null) + { + this._acr_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._acr_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._and_) + + toString(this._ar_) + + toString(this._comma_) + + toString(this._acr_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._and_ == child) + { + this._and_ = null; + return; + } + + if(this._ar_ == child) + { + this._ar_ = null; + return; + } + + if(this._comma_ == child) + { + this._comma_ = null; + return; + } + + if(this._acr_ == child) + { + this._acr_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._and_ == oldChild) + { + setAnd((TAnd) newChild); + return; + } + + if(this._ar_ == oldChild) + { + setAr((PAr) newChild); + return; + } + + if(this._comma_ == oldChild) + { + setComma((TComma) newChild); + return; + } + + if(this._acr_ == oldChild) + { + setAcr((PAcr) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AByteOpsizeof.java b/src/nasmParser/node/AByteOpsizeof.java new file mode 100644 index 0000000..1569f58 --- /dev/null +++ b/src/nasmParser/node/AByteOpsizeof.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AByteOpsizeof extends POpsizeof +{ + private TByte _byte_; + + public AByteOpsizeof() + { + // Constructor + } + + public AByteOpsizeof( + @SuppressWarnings("hiding") TByte _byte_) + { + // Constructor + setByte(_byte_); + + } + + @Override + public Object clone() + { + return new AByteOpsizeof( + cloneNode(this._byte_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAByteOpsizeof(this); + } + + public TByte getByte() + { + return this._byte_; + } + + public void setByte(TByte node) + { + if(this._byte_ != null) + { + this._byte_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._byte_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._byte_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._byte_ == child) + { + this._byte_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._byte_ == oldChild) + { + setByte((TByte) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ACallInst.java b/src/nasmParser/node/ACallInst.java new file mode 100644 index 0000000..a9e1d6e --- /dev/null +++ b/src/nasmParser/node/ACallInst.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ACallInst extends PInst +{ + private POplabel _oplabel_; + private TCall _call_; + private PLabel _label_; + + public ACallInst() + { + // Constructor + } + + public ACallInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TCall _call_, + @SuppressWarnings("hiding") PLabel _label_) + { + // Constructor + setOplabel(_oplabel_); + + setCall(_call_); + + setLabel(_label_); + + } + + @Override + public Object clone() + { + return new ACallInst( + cloneNode(this._oplabel_), + cloneNode(this._call_), + cloneNode(this._label_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseACallInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TCall getCall() + { + return this._call_; + } + + public void setCall(TCall node) + { + if(this._call_ != null) + { + this._call_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._call_ = node; + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._call_) + + toString(this._label_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._call_ == child) + { + this._call_ = null; + return; + } + + if(this._label_ == child) + { + this._label_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._call_ == oldChild) + { + setCall((TCall) newChild); + return; + } + + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ACmpInst.java b/src/nasmParser/node/ACmpInst.java new file mode 100644 index 0000000..48fed94 --- /dev/null +++ b/src/nasmParser/node/ACmpInst.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ACmpInst extends PInst +{ + private POplabel _oplabel_; + private TCmp _cmp_; + private PAr _ar_; + private TComma _comma_; + private PAcr _acr_; + + public ACmpInst() + { + // Constructor + } + + public ACmpInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TCmp _cmp_, + @SuppressWarnings("hiding") PAr _ar_, + @SuppressWarnings("hiding") TComma _comma_, + @SuppressWarnings("hiding") PAcr _acr_) + { + // Constructor + setOplabel(_oplabel_); + + setCmp(_cmp_); + + setAr(_ar_); + + setComma(_comma_); + + setAcr(_acr_); + + } + + @Override + public Object clone() + { + return new ACmpInst( + cloneNode(this._oplabel_), + cloneNode(this._cmp_), + cloneNode(this._ar_), + cloneNode(this._comma_), + cloneNode(this._acr_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseACmpInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TCmp getCmp() + { + return this._cmp_; + } + + public void setCmp(TCmp node) + { + if(this._cmp_ != null) + { + this._cmp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._cmp_ = node; + } + + public PAr getAr() + { + return this._ar_; + } + + public void setAr(PAr node) + { + if(this._ar_ != null) + { + this._ar_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ar_ = node; + } + + public TComma getComma() + { + return this._comma_; + } + + public void setComma(TComma node) + { + if(this._comma_ != null) + { + this._comma_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._comma_ = node; + } + + public PAcr getAcr() + { + return this._acr_; + } + + public void setAcr(PAcr node) + { + if(this._acr_ != null) + { + this._acr_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._acr_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._cmp_) + + toString(this._ar_) + + toString(this._comma_) + + toString(this._acr_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._cmp_ == child) + { + this._cmp_ = null; + return; + } + + if(this._ar_ == child) + { + this._ar_ = null; + return; + } + + if(this._comma_ == child) + { + this._comma_ = null; + return; + } + + if(this._acr_ == child) + { + this._acr_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._cmp_ == oldChild) + { + setCmp((TCmp) newChild); + return; + } + + if(this._ar_ == oldChild) + { + setAr((PAr) newChild); + return; + } + + if(this._comma_ == oldChild) + { + setComma((TComma) newChild); + return; + } + + if(this._acr_ == oldChild) + { + setAcr((PAcr) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AComplexFilename.java b/src/nasmParser/node/AComplexFilename.java new file mode 100644 index 0000000..50d7099 --- /dev/null +++ b/src/nasmParser/node/AComplexFilename.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AComplexFilename extends PFilename +{ + private PLabel _prefix_; + private TDot _dot_; + private PLabel _suffix_; + + public AComplexFilename() + { + // Constructor + } + + public AComplexFilename( + @SuppressWarnings("hiding") PLabel _prefix_, + @SuppressWarnings("hiding") TDot _dot_, + @SuppressWarnings("hiding") PLabel _suffix_) + { + // Constructor + setPrefix(_prefix_); + + setDot(_dot_); + + setSuffix(_suffix_); + + } + + @Override + public Object clone() + { + return new AComplexFilename( + cloneNode(this._prefix_), + cloneNode(this._dot_), + cloneNode(this._suffix_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAComplexFilename(this); + } + + public PLabel getPrefix() + { + return this._prefix_; + } + + public void setPrefix(PLabel node) + { + if(this._prefix_ != null) + { + this._prefix_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._prefix_ = node; + } + + public TDot getDot() + { + return this._dot_; + } + + public void setDot(TDot node) + { + if(this._dot_ != null) + { + this._dot_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._dot_ = node; + } + + public PLabel getSuffix() + { + return this._suffix_; + } + + public void setSuffix(PLabel node) + { + if(this._suffix_ != null) + { + this._suffix_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._suffix_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._prefix_) + + toString(this._dot_) + + toString(this._suffix_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._prefix_ == child) + { + this._prefix_ = null; + return; + } + + if(this._dot_ == child) + { + this._dot_ = null; + return; + } + + if(this._suffix_ == child) + { + this._suffix_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._prefix_ == oldChild) + { + setPrefix((PLabel) newChild); + return; + } + + if(this._dot_ == oldChild) + { + setDot((TDot) newChild); + return; + } + + if(this._suffix_ == oldChild) + { + setSuffix((PLabel) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ADbConst.java b/src/nasmParser/node/ADbConst.java new file mode 100644 index 0000000..07411a6 --- /dev/null +++ b/src/nasmParser/node/ADbConst.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ADbConst extends PConst +{ + private PLabel _label_; + private TDefinebyte _definebyte_; + private PNumconst _numconst_; + + public ADbConst() + { + // Constructor + } + + public ADbConst( + @SuppressWarnings("hiding") PLabel _label_, + @SuppressWarnings("hiding") TDefinebyte _definebyte_, + @SuppressWarnings("hiding") PNumconst _numconst_) + { + // Constructor + setLabel(_label_); + + setDefinebyte(_definebyte_); + + setNumconst(_numconst_); + + } + + @Override + public Object clone() + { + return new ADbConst( + cloneNode(this._label_), + cloneNode(this._definebyte_), + cloneNode(this._numconst_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseADbConst(this); + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + public TDefinebyte getDefinebyte() + { + return this._definebyte_; + } + + public void setDefinebyte(TDefinebyte node) + { + if(this._definebyte_ != null) + { + this._definebyte_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._definebyte_ = node; + } + + public PNumconst getNumconst() + { + return this._numconst_; + } + + public void setNumconst(PNumconst node) + { + if(this._numconst_ != null) + { + this._numconst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._numconst_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._label_) + + toString(this._definebyte_) + + toString(this._numconst_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._label_ == child) + { + this._label_ = null; + return; + } + + if(this._definebyte_ == child) + { + this._definebyte_ = null; + return; + } + + if(this._numconst_ == child) + { + this._numconst_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + if(this._definebyte_ == oldChild) + { + setDefinebyte((TDefinebyte) newChild); + return; + } + + if(this._numconst_ == oldChild) + { + setNumconst((PNumconst) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ADdConst.java b/src/nasmParser/node/ADdConst.java new file mode 100644 index 0000000..8063f6f --- /dev/null +++ b/src/nasmParser/node/ADdConst.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ADdConst extends PConst +{ + private PLabel _label_; + private TDefinedoubleword _definedoubleword_; + private PNumconst _numconst_; + + public ADdConst() + { + // Constructor + } + + public ADdConst( + @SuppressWarnings("hiding") PLabel _label_, + @SuppressWarnings("hiding") TDefinedoubleword _definedoubleword_, + @SuppressWarnings("hiding") PNumconst _numconst_) + { + // Constructor + setLabel(_label_); + + setDefinedoubleword(_definedoubleword_); + + setNumconst(_numconst_); + + } + + @Override + public Object clone() + { + return new ADdConst( + cloneNode(this._label_), + cloneNode(this._definedoubleword_), + cloneNode(this._numconst_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseADdConst(this); + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + public TDefinedoubleword getDefinedoubleword() + { + return this._definedoubleword_; + } + + public void setDefinedoubleword(TDefinedoubleword node) + { + if(this._definedoubleword_ != null) + { + this._definedoubleword_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._definedoubleword_ = node; + } + + public PNumconst getNumconst() + { + return this._numconst_; + } + + public void setNumconst(PNumconst node) + { + if(this._numconst_ != null) + { + this._numconst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._numconst_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._label_) + + toString(this._definedoubleword_) + + toString(this._numconst_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._label_ == child) + { + this._label_ = null; + return; + } + + if(this._definedoubleword_ == child) + { + this._definedoubleword_ = null; + return; + } + + if(this._numconst_ == child) + { + this._numconst_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + if(this._definedoubleword_ == oldChild) + { + setDefinedoubleword((TDefinedoubleword) newChild); + return; + } + + if(this._numconst_ == oldChild) + { + setNumconst((PNumconst) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ADqConst.java b/src/nasmParser/node/ADqConst.java new file mode 100644 index 0000000..38b48f5 --- /dev/null +++ b/src/nasmParser/node/ADqConst.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ADqConst extends PConst +{ + private PLabel _label_; + private TDefinequadword _definequadword_; + private PNumconst _numconst_; + + public ADqConst() + { + // Constructor + } + + public ADqConst( + @SuppressWarnings("hiding") PLabel _label_, + @SuppressWarnings("hiding") TDefinequadword _definequadword_, + @SuppressWarnings("hiding") PNumconst _numconst_) + { + // Constructor + setLabel(_label_); + + setDefinequadword(_definequadword_); + + setNumconst(_numconst_); + + } + + @Override + public Object clone() + { + return new ADqConst( + cloneNode(this._label_), + cloneNode(this._definequadword_), + cloneNode(this._numconst_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseADqConst(this); + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + public TDefinequadword getDefinequadword() + { + return this._definequadword_; + } + + public void setDefinequadword(TDefinequadword node) + { + if(this._definequadword_ != null) + { + this._definequadword_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._definequadword_ = node; + } + + public PNumconst getNumconst() + { + return this._numconst_; + } + + public void setNumconst(PNumconst node) + { + if(this._numconst_ != null) + { + this._numconst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._numconst_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._label_) + + toString(this._definequadword_) + + toString(this._numconst_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._label_ == child) + { + this._label_ = null; + return; + } + + if(this._definequadword_ == child) + { + this._definequadword_ = null; + return; + } + + if(this._numconst_ == child) + { + this._numconst_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + if(this._definequadword_ == oldChild) + { + setDefinequadword((TDefinequadword) newChild); + return; + } + + if(this._numconst_ == oldChild) + { + setNumconst((PNumconst) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ADtConst.java b/src/nasmParser/node/ADtConst.java new file mode 100644 index 0000000..0695221 --- /dev/null +++ b/src/nasmParser/node/ADtConst.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ADtConst extends PConst +{ + private PLabel _label_; + private TDefinetenbytes _definetenbytes_; + private PNumconst _numconst_; + + public ADtConst() + { + // Constructor + } + + public ADtConst( + @SuppressWarnings("hiding") PLabel _label_, + @SuppressWarnings("hiding") TDefinetenbytes _definetenbytes_, + @SuppressWarnings("hiding") PNumconst _numconst_) + { + // Constructor + setLabel(_label_); + + setDefinetenbytes(_definetenbytes_); + + setNumconst(_numconst_); + + } + + @Override + public Object clone() + { + return new ADtConst( + cloneNode(this._label_), + cloneNode(this._definetenbytes_), + cloneNode(this._numconst_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseADtConst(this); + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + public TDefinetenbytes getDefinetenbytes() + { + return this._definetenbytes_; + } + + public void setDefinetenbytes(TDefinetenbytes node) + { + if(this._definetenbytes_ != null) + { + this._definetenbytes_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._definetenbytes_ = node; + } + + public PNumconst getNumconst() + { + return this._numconst_; + } + + public void setNumconst(PNumconst node) + { + if(this._numconst_ != null) + { + this._numconst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._numconst_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._label_) + + toString(this._definetenbytes_) + + toString(this._numconst_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._label_ == child) + { + this._label_ = null; + return; + } + + if(this._definetenbytes_ == child) + { + this._definetenbytes_ = null; + return; + } + + if(this._numconst_ == child) + { + this._numconst_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + if(this._definetenbytes_ == oldChild) + { + setDefinetenbytes((TDefinetenbytes) newChild); + return; + } + + if(this._numconst_ == oldChild) + { + setNumconst((PNumconst) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ADwConst.java b/src/nasmParser/node/ADwConst.java new file mode 100644 index 0000000..0ecbfc0 --- /dev/null +++ b/src/nasmParser/node/ADwConst.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ADwConst extends PConst +{ + private PLabel _label_; + private TDefineword _defineword_; + private PNumconst _numconst_; + + public ADwConst() + { + // Constructor + } + + public ADwConst( + @SuppressWarnings("hiding") PLabel _label_, + @SuppressWarnings("hiding") TDefineword _defineword_, + @SuppressWarnings("hiding") PNumconst _numconst_) + { + // Constructor + setLabel(_label_); + + setDefineword(_defineword_); + + setNumconst(_numconst_); + + } + + @Override + public Object clone() + { + return new ADwConst( + cloneNode(this._label_), + cloneNode(this._defineword_), + cloneNode(this._numconst_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseADwConst(this); + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + public TDefineword getDefineword() + { + return this._defineword_; + } + + public void setDefineword(TDefineword node) + { + if(this._defineword_ != null) + { + this._defineword_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._defineword_ = node; + } + + public PNumconst getNumconst() + { + return this._numconst_; + } + + public void setNumconst(PNumconst node) + { + if(this._numconst_ != null) + { + this._numconst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._numconst_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._label_) + + toString(this._defineword_) + + toString(this._numconst_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._label_ == child) + { + this._label_ = null; + return; + } + + if(this._defineword_ == child) + { + this._defineword_ = null; + return; + } + + if(this._numconst_ == child) + { + this._numconst_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + if(this._defineword_ == oldChild) + { + setDefineword((TDefineword) newChild); + return; + } + + if(this._numconst_ == oldChild) + { + setNumconst((PNumconst) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ADwordOpsizeof.java b/src/nasmParser/node/ADwordOpsizeof.java new file mode 100644 index 0000000..31c0d59 --- /dev/null +++ b/src/nasmParser/node/ADwordOpsizeof.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ADwordOpsizeof extends POpsizeof +{ + private TDword _dword_; + + public ADwordOpsizeof() + { + // Constructor + } + + public ADwordOpsizeof( + @SuppressWarnings("hiding") TDword _dword_) + { + // Constructor + setDword(_dword_); + + } + + @Override + public Object clone() + { + return new ADwordOpsizeof( + cloneNode(this._dword_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseADwordOpsizeof(this); + } + + public TDword getDword() + { + return this._dword_; + } + + public void setDword(TDword node) + { + if(this._dword_ != null) + { + this._dword_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._dword_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._dword_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._dword_ == child) + { + this._dword_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._dword_ == oldChild) + { + setDword((TDword) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AEaxRegister.java b/src/nasmParser/node/AEaxRegister.java new file mode 100644 index 0000000..ac883ad --- /dev/null +++ b/src/nasmParser/node/AEaxRegister.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEaxRegister extends PRegister +{ + private TEax _eax_; + + public AEaxRegister() + { + // Constructor + } + + public AEaxRegister( + @SuppressWarnings("hiding") TEax _eax_) + { + // Constructor + setEax(_eax_); + + } + + @Override + public Object clone() + { + return new AEaxRegister( + cloneNode(this._eax_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEaxRegister(this); + } + + public TEax getEax() + { + return this._eax_; + } + + public void setEax(TEax node) + { + if(this._eax_ != null) + { + this._eax_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._eax_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._eax_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._eax_ == child) + { + this._eax_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._eax_ == oldChild) + { + setEax((TEax) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AEbpRegister.java b/src/nasmParser/node/AEbpRegister.java new file mode 100644 index 0000000..6869067 --- /dev/null +++ b/src/nasmParser/node/AEbpRegister.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEbpRegister extends PRegister +{ + private TEbp _ebp_; + + public AEbpRegister() + { + // Constructor + } + + public AEbpRegister( + @SuppressWarnings("hiding") TEbp _ebp_) + { + // Constructor + setEbp(_ebp_); + + } + + @Override + public Object clone() + { + return new AEbpRegister( + cloneNode(this._ebp_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEbpRegister(this); + } + + public TEbp getEbp() + { + return this._ebp_; + } + + public void setEbp(TEbp node) + { + if(this._ebp_ != null) + { + this._ebp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ebp_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._ebp_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._ebp_ == child) + { + this._ebp_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._ebp_ == oldChild) + { + setEbp((TEbp) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AEbxRegister.java b/src/nasmParser/node/AEbxRegister.java new file mode 100644 index 0000000..25f8b82 --- /dev/null +++ b/src/nasmParser/node/AEbxRegister.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEbxRegister extends PRegister +{ + private TEbx _ebx_; + + public AEbxRegister() + { + // Constructor + } + + public AEbxRegister( + @SuppressWarnings("hiding") TEbx _ebx_) + { + // Constructor + setEbx(_ebx_); + + } + + @Override + public Object clone() + { + return new AEbxRegister( + cloneNode(this._ebx_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEbxRegister(this); + } + + public TEbx getEbx() + { + return this._ebx_; + } + + public void setEbx(TEbx node) + { + if(this._ebx_ != null) + { + this._ebx_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ebx_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._ebx_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._ebx_ == child) + { + this._ebx_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._ebx_ == oldChild) + { + setEbx((TEbx) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AEcxRegister.java b/src/nasmParser/node/AEcxRegister.java new file mode 100644 index 0000000..e03fe07 --- /dev/null +++ b/src/nasmParser/node/AEcxRegister.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEcxRegister extends PRegister +{ + private TEcx _ecx_; + + public AEcxRegister() + { + // Constructor + } + + public AEcxRegister( + @SuppressWarnings("hiding") TEcx _ecx_) + { + // Constructor + setEcx(_ecx_); + + } + + @Override + public Object clone() + { + return new AEcxRegister( + cloneNode(this._ecx_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEcxRegister(this); + } + + public TEcx getEcx() + { + return this._ecx_; + } + + public void setEcx(TEcx node) + { + if(this._ecx_ != null) + { + this._ecx_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ecx_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._ecx_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._ecx_ == child) + { + this._ecx_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._ecx_ == oldChild) + { + setEcx((TEcx) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AEdxRegister.java b/src/nasmParser/node/AEdxRegister.java new file mode 100644 index 0000000..12f18a7 --- /dev/null +++ b/src/nasmParser/node/AEdxRegister.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEdxRegister extends PRegister +{ + private TEdx _edx_; + + public AEdxRegister() + { + // Constructor + } + + public AEdxRegister( + @SuppressWarnings("hiding") TEdx _edx_) + { + // Constructor + setEdx(_edx_); + + } + + @Override + public Object clone() + { + return new AEdxRegister( + cloneNode(this._edx_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEdxRegister(this); + } + + public TEdx getEdx() + { + return this._edx_; + } + + public void setEdx(TEdx node) + { + if(this._edx_ != null) + { + this._edx_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._edx_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._edx_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._edx_ == child) + { + this._edx_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._edx_ == oldChild) + { + setEdx((TEdx) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AEmptyLconst.java b/src/nasmParser/node/AEmptyLconst.java new file mode 100644 index 0000000..da8855b --- /dev/null +++ b/src/nasmParser/node/AEmptyLconst.java @@ -0,0 +1,47 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEmptyLconst extends PLconst +{ + + public AEmptyLconst() + { + // Constructor + } + + @Override + public Object clone() + { + return new AEmptyLconst(); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEmptyLconst(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/nasmParser/node/AEmptyLglobal.java b/src/nasmParser/node/AEmptyLglobal.java new file mode 100644 index 0000000..d7ef8d0 --- /dev/null +++ b/src/nasmParser/node/AEmptyLglobal.java @@ -0,0 +1,47 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEmptyLglobal extends PLglobal +{ + + public AEmptyLglobal() + { + // Constructor + } + + @Override + public Object clone() + { + return new AEmptyLglobal(); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEmptyLglobal(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/nasmParser/node/AEmptyLinclude.java b/src/nasmParser/node/AEmptyLinclude.java new file mode 100644 index 0000000..380b09f --- /dev/null +++ b/src/nasmParser/node/AEmptyLinclude.java @@ -0,0 +1,47 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEmptyLinclude extends PLinclude +{ + + public AEmptyLinclude() + { + // Constructor + } + + @Override + public Object clone() + { + return new AEmptyLinclude(); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEmptyLinclude(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/nasmParser/node/AEmptyLvar.java b/src/nasmParser/node/AEmptyLvar.java new file mode 100644 index 0000000..bfb5a2a --- /dev/null +++ b/src/nasmParser/node/AEmptyLvar.java @@ -0,0 +1,47 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEmptyLvar extends PLvar +{ + + public AEmptyLvar() + { + // Constructor + } + + @Override + public Object clone() + { + return new AEmptyLvar(); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEmptyLvar(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/nasmParser/node/AEmptyOplabel.java b/src/nasmParser/node/AEmptyOplabel.java new file mode 100644 index 0000000..ee064ee --- /dev/null +++ b/src/nasmParser/node/AEmptyOplabel.java @@ -0,0 +1,47 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEmptyOplabel extends POplabel +{ + + public AEmptyOplabel() + { + // Constructor + } + + @Override + public Object clone() + { + return new AEmptyOplabel(); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEmptyOplabel(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/nasmParser/node/AEmptyOpsizeof.java b/src/nasmParser/node/AEmptyOpsizeof.java new file mode 100644 index 0000000..a777887 --- /dev/null +++ b/src/nasmParser/node/AEmptyOpsizeof.java @@ -0,0 +1,47 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEmptyOpsizeof extends POpsizeof +{ + + public AEmptyOpsizeof() + { + // Constructor + } + + @Override + public Object clone() + { + return new AEmptyOpsizeof(); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEmptyOpsizeof(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/nasmParser/node/AEmptySecbss.java b/src/nasmParser/node/AEmptySecbss.java new file mode 100644 index 0000000..825aa6f --- /dev/null +++ b/src/nasmParser/node/AEmptySecbss.java @@ -0,0 +1,47 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEmptySecbss extends PSecbss +{ + + public AEmptySecbss() + { + // Constructor + } + + @Override + public Object clone() + { + return new AEmptySecbss(); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEmptySecbss(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/nasmParser/node/AEmptySecdata.java b/src/nasmParser/node/AEmptySecdata.java new file mode 100644 index 0000000..439721a --- /dev/null +++ b/src/nasmParser/node/AEmptySecdata.java @@ -0,0 +1,47 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEmptySecdata extends PSecdata +{ + + public AEmptySecdata() + { + // Constructor + } + + @Override + public Object clone() + { + return new AEmptySecdata(); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEmptySecdata(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/nasmParser/node/AEspRegister.java b/src/nasmParser/node/AEspRegister.java new file mode 100644 index 0000000..934e383 --- /dev/null +++ b/src/nasmParser/node/AEspRegister.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEspRegister extends PRegister +{ + private TEsp _esp_; + + public AEspRegister() + { + // Constructor + } + + public AEspRegister( + @SuppressWarnings("hiding") TEsp _esp_) + { + // Constructor + setEsp(_esp_); + + } + + @Override + public Object clone() + { + return new AEspRegister( + cloneNode(this._esp_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEspRegister(this); + } + + public TEsp getEsp() + { + return this._esp_; + } + + public void setEsp(TEsp node) + { + if(this._esp_ != null) + { + this._esp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._esp_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._esp_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._esp_ == child) + { + this._esp_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._esp_ == oldChild) + { + setEsp((TEsp) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AIdivInst.java b/src/nasmParser/node/AIdivInst.java new file mode 100644 index 0000000..b3a426f --- /dev/null +++ b/src/nasmParser/node/AIdivInst.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AIdivInst extends PInst +{ + private POplabel _oplabel_; + private TIdiv _idiv_; + private PAr _ar_; + + public AIdivInst() + { + // Constructor + } + + public AIdivInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TIdiv _idiv_, + @SuppressWarnings("hiding") PAr _ar_) + { + // Constructor + setOplabel(_oplabel_); + + setIdiv(_idiv_); + + setAr(_ar_); + + } + + @Override + public Object clone() + { + return new AIdivInst( + cloneNode(this._oplabel_), + cloneNode(this._idiv_), + cloneNode(this._ar_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAIdivInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TIdiv getIdiv() + { + return this._idiv_; + } + + public void setIdiv(TIdiv node) + { + if(this._idiv_ != null) + { + this._idiv_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._idiv_ = node; + } + + public PAr getAr() + { + return this._ar_; + } + + public void setAr(PAr node) + { + if(this._ar_ != null) + { + this._ar_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ar_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._idiv_) + + toString(this._ar_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._idiv_ == child) + { + this._idiv_ = null; + return; + } + + if(this._ar_ == child) + { + this._ar_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._idiv_ == oldChild) + { + setIdiv((TIdiv) newChild); + return; + } + + if(this._ar_ == oldChild) + { + setAr((PAr) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AImulInst.java b/src/nasmParser/node/AImulInst.java new file mode 100644 index 0000000..cfb70ef --- /dev/null +++ b/src/nasmParser/node/AImulInst.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AImulInst extends PInst +{ + private POplabel _oplabel_; + private TImul _imul_; + private PAr _ar_; + private TComma _comma_; + private PAcr _acr_; + + public AImulInst() + { + // Constructor + } + + public AImulInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TImul _imul_, + @SuppressWarnings("hiding") PAr _ar_, + @SuppressWarnings("hiding") TComma _comma_, + @SuppressWarnings("hiding") PAcr _acr_) + { + // Constructor + setOplabel(_oplabel_); + + setImul(_imul_); + + setAr(_ar_); + + setComma(_comma_); + + setAcr(_acr_); + + } + + @Override + public Object clone() + { + return new AImulInst( + cloneNode(this._oplabel_), + cloneNode(this._imul_), + cloneNode(this._ar_), + cloneNode(this._comma_), + cloneNode(this._acr_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAImulInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TImul getImul() + { + return this._imul_; + } + + public void setImul(TImul node) + { + if(this._imul_ != null) + { + this._imul_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._imul_ = node; + } + + public PAr getAr() + { + return this._ar_; + } + + public void setAr(PAr node) + { + if(this._ar_ != null) + { + this._ar_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ar_ = node; + } + + public TComma getComma() + { + return this._comma_; + } + + public void setComma(TComma node) + { + if(this._comma_ != null) + { + this._comma_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._comma_ = node; + } + + public PAcr getAcr() + { + return this._acr_; + } + + public void setAcr(PAcr node) + { + if(this._acr_ != null) + { + this._acr_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._acr_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._imul_) + + toString(this._ar_) + + toString(this._comma_) + + toString(this._acr_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._imul_ == child) + { + this._imul_ = null; + return; + } + + if(this._ar_ == child) + { + this._ar_ = null; + return; + } + + if(this._comma_ == child) + { + this._comma_ = null; + return; + } + + if(this._acr_ == child) + { + this._acr_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._imul_ == oldChild) + { + setImul((TImul) newChild); + return; + } + + if(this._ar_ == oldChild) + { + setAr((PAr) newChild); + return; + } + + if(this._comma_ == oldChild) + { + setComma((TComma) newChild); + return; + } + + if(this._acr_ == oldChild) + { + setAcr((PAcr) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AInclude.java b/src/nasmParser/node/AInclude.java new file mode 100644 index 0000000..da9ef52 --- /dev/null +++ b/src/nasmParser/node/AInclude.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AInclude extends PInclude +{ + private TPercentage _percentage_; + private TInc _inc_; + private TQuote _open_; + private PFilename _filename_; + private TQuote _close_; + + public AInclude() + { + // Constructor + } + + public AInclude( + @SuppressWarnings("hiding") TPercentage _percentage_, + @SuppressWarnings("hiding") TInc _inc_, + @SuppressWarnings("hiding") TQuote _open_, + @SuppressWarnings("hiding") PFilename _filename_, + @SuppressWarnings("hiding") TQuote _close_) + { + // Constructor + setPercentage(_percentage_); + + setInc(_inc_); + + setOpen(_open_); + + setFilename(_filename_); + + setClose(_close_); + + } + + @Override + public Object clone() + { + return new AInclude( + cloneNode(this._percentage_), + cloneNode(this._inc_), + cloneNode(this._open_), + cloneNode(this._filename_), + cloneNode(this._close_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAInclude(this); + } + + public TPercentage getPercentage() + { + return this._percentage_; + } + + public void setPercentage(TPercentage node) + { + if(this._percentage_ != null) + { + this._percentage_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._percentage_ = node; + } + + public TInc getInc() + { + return this._inc_; + } + + public void setInc(TInc node) + { + if(this._inc_ != null) + { + this._inc_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._inc_ = node; + } + + public TQuote getOpen() + { + return this._open_; + } + + public void setOpen(TQuote node) + { + if(this._open_ != null) + { + this._open_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._open_ = node; + } + + public PFilename getFilename() + { + return this._filename_; + } + + public void setFilename(PFilename node) + { + if(this._filename_ != null) + { + this._filename_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._filename_ = node; + } + + public TQuote getClose() + { + return this._close_; + } + + public void setClose(TQuote node) + { + if(this._close_ != null) + { + this._close_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._close_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._percentage_) + + toString(this._inc_) + + toString(this._open_) + + toString(this._filename_) + + toString(this._close_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._percentage_ == child) + { + this._percentage_ = null; + return; + } + + if(this._inc_ == child) + { + this._inc_ = null; + return; + } + + if(this._open_ == child) + { + this._open_ = null; + return; + } + + if(this._filename_ == child) + { + this._filename_ = null; + return; + } + + if(this._close_ == child) + { + this._close_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._percentage_ == oldChild) + { + setPercentage((TPercentage) newChild); + return; + } + + if(this._inc_ == oldChild) + { + setInc((TInc) newChild); + return; + } + + if(this._open_ == oldChild) + { + setOpen((TQuote) newChild); + return; + } + + if(this._filename_ == oldChild) + { + setFilename((PFilename) newChild); + return; + } + + if(this._close_ == oldChild) + { + setClose((TQuote) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AInterInst.java b/src/nasmParser/node/AInterInst.java new file mode 100644 index 0000000..b9c0d45 --- /dev/null +++ b/src/nasmParser/node/AInterInst.java @@ -0,0 +1,138 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AInterInst extends PInst +{ + private POplabel _oplabel_; + private TInt _int_; + + public AInterInst() + { + // Constructor + } + + public AInterInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TInt _int_) + { + // Constructor + setOplabel(_oplabel_); + + setInt(_int_); + + } + + @Override + public Object clone() + { + return new AInterInst( + cloneNode(this._oplabel_), + cloneNode(this._int_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAInterInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TInt getInt() + { + return this._int_; + } + + public void setInt(TInt node) + { + if(this._int_ != null) + { + this._int_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._int_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._int_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._int_ == child) + { + this._int_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._int_ == oldChild) + { + setInt((TInt) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AJeInst.java b/src/nasmParser/node/AJeInst.java new file mode 100644 index 0000000..af2616f --- /dev/null +++ b/src/nasmParser/node/AJeInst.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJeInst extends PInst +{ + private POplabel _oplabel_; + private TJe _je_; + private PLabel _label_; + + public AJeInst() + { + // Constructor + } + + public AJeInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TJe _je_, + @SuppressWarnings("hiding") PLabel _label_) + { + // Constructor + setOplabel(_oplabel_); + + setJe(_je_); + + setLabel(_label_); + + } + + @Override + public Object clone() + { + return new AJeInst( + cloneNode(this._oplabel_), + cloneNode(this._je_), + cloneNode(this._label_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJeInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TJe getJe() + { + return this._je_; + } + + public void setJe(TJe node) + { + if(this._je_ != null) + { + this._je_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._je_ = node; + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._je_) + + toString(this._label_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._je_ == child) + { + this._je_ = null; + return; + } + + if(this._label_ == child) + { + this._label_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._je_ == oldChild) + { + setJe((TJe) newChild); + return; + } + + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AJgInst.java b/src/nasmParser/node/AJgInst.java new file mode 100644 index 0000000..de7fd79 --- /dev/null +++ b/src/nasmParser/node/AJgInst.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJgInst extends PInst +{ + private POplabel _oplabel_; + private TJg _jg_; + private PLabel _label_; + + public AJgInst() + { + // Constructor + } + + public AJgInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TJg _jg_, + @SuppressWarnings("hiding") PLabel _label_) + { + // Constructor + setOplabel(_oplabel_); + + setJg(_jg_); + + setLabel(_label_); + + } + + @Override + public Object clone() + { + return new AJgInst( + cloneNode(this._oplabel_), + cloneNode(this._jg_), + cloneNode(this._label_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJgInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TJg getJg() + { + return this._jg_; + } + + public void setJg(TJg node) + { + if(this._jg_ != null) + { + this._jg_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._jg_ = node; + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._jg_) + + toString(this._label_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._jg_ == child) + { + this._jg_ = null; + return; + } + + if(this._label_ == child) + { + this._label_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._jg_ == oldChild) + { + setJg((TJg) newChild); + return; + } + + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AJgeInst.java b/src/nasmParser/node/AJgeInst.java new file mode 100644 index 0000000..1d38ca0 --- /dev/null +++ b/src/nasmParser/node/AJgeInst.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJgeInst extends PInst +{ + private POplabel _oplabel_; + private TJge _jge_; + private PLabel _label_; + + public AJgeInst() + { + // Constructor + } + + public AJgeInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TJge _jge_, + @SuppressWarnings("hiding") PLabel _label_) + { + // Constructor + setOplabel(_oplabel_); + + setJge(_jge_); + + setLabel(_label_); + + } + + @Override + public Object clone() + { + return new AJgeInst( + cloneNode(this._oplabel_), + cloneNode(this._jge_), + cloneNode(this._label_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJgeInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TJge getJge() + { + return this._jge_; + } + + public void setJge(TJge node) + { + if(this._jge_ != null) + { + this._jge_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._jge_ = node; + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._jge_) + + toString(this._label_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._jge_ == child) + { + this._jge_ = null; + return; + } + + if(this._label_ == child) + { + this._label_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._jge_ == oldChild) + { + setJge((TJge) newChild); + return; + } + + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AJlInst.java b/src/nasmParser/node/AJlInst.java new file mode 100644 index 0000000..05fa7b5 --- /dev/null +++ b/src/nasmParser/node/AJlInst.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJlInst extends PInst +{ + private POplabel _oplabel_; + private TJl _jl_; + private PLabel _label_; + + public AJlInst() + { + // Constructor + } + + public AJlInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TJl _jl_, + @SuppressWarnings("hiding") PLabel _label_) + { + // Constructor + setOplabel(_oplabel_); + + setJl(_jl_); + + setLabel(_label_); + + } + + @Override + public Object clone() + { + return new AJlInst( + cloneNode(this._oplabel_), + cloneNode(this._jl_), + cloneNode(this._label_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJlInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TJl getJl() + { + return this._jl_; + } + + public void setJl(TJl node) + { + if(this._jl_ != null) + { + this._jl_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._jl_ = node; + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._jl_) + + toString(this._label_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._jl_ == child) + { + this._jl_ = null; + return; + } + + if(this._label_ == child) + { + this._label_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._jl_ == oldChild) + { + setJl((TJl) newChild); + return; + } + + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AJmpInst.java b/src/nasmParser/node/AJmpInst.java new file mode 100644 index 0000000..2d6008e --- /dev/null +++ b/src/nasmParser/node/AJmpInst.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJmpInst extends PInst +{ + private POplabel _oplabel_; + private TJmp _jmp_; + private PLabel _label_; + + public AJmpInst() + { + // Constructor + } + + public AJmpInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TJmp _jmp_, + @SuppressWarnings("hiding") PLabel _label_) + { + // Constructor + setOplabel(_oplabel_); + + setJmp(_jmp_); + + setLabel(_label_); + + } + + @Override + public Object clone() + { + return new AJmpInst( + cloneNode(this._oplabel_), + cloneNode(this._jmp_), + cloneNode(this._label_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJmpInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TJmp getJmp() + { + return this._jmp_; + } + + public void setJmp(TJmp node) + { + if(this._jmp_ != null) + { + this._jmp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._jmp_ = node; + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._jmp_) + + toString(this._label_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._jmp_ == child) + { + this._jmp_ = null; + return; + } + + if(this._label_ == child) + { + this._label_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._jmp_ == oldChild) + { + setJmp((TJmp) newChild); + return; + } + + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AJneInst.java b/src/nasmParser/node/AJneInst.java new file mode 100644 index 0000000..04ac3f7 --- /dev/null +++ b/src/nasmParser/node/AJneInst.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AJneInst extends PInst +{ + private POplabel _oplabel_; + private TJne _jne_; + private PLabel _label_; + + public AJneInst() + { + // Constructor + } + + public AJneInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TJne _jne_, + @SuppressWarnings("hiding") PLabel _label_) + { + // Constructor + setOplabel(_oplabel_); + + setJne(_jne_); + + setLabel(_label_); + + } + + @Override + public Object clone() + { + return new AJneInst( + cloneNode(this._oplabel_), + cloneNode(this._jne_), + cloneNode(this._label_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAJneInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TJne getJne() + { + return this._jne_; + } + + public void setJne(TJne node) + { + if(this._jne_ != null) + { + this._jne_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._jne_ = node; + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._jne_) + + toString(this._label_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._jne_ == child) + { + this._jne_ = null; + return; + } + + if(this._label_ == child) + { + this._label_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._jne_ == oldChild) + { + setJne((TJne) newChild); + return; + } + + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ALabel.java b/src/nasmParser/node/ALabel.java new file mode 100644 index 0000000..0003d14 --- /dev/null +++ b/src/nasmParser/node/ALabel.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ALabel extends PLabel +{ + private TId _id_; + + public ALabel() + { + // Constructor + } + + public ALabel( + @SuppressWarnings("hiding") TId _id_) + { + // Constructor + setId(_id_); + + } + + @Override + public Object clone() + { + return new ALabel( + cloneNode(this._id_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseALabel(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/nasmParser/node/ALabelExp2.java b/src/nasmParser/node/ALabelExp2.java new file mode 100644 index 0000000..7cd371b --- /dev/null +++ b/src/nasmParser/node/ALabelExp2.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ALabelExp2 extends PExp2 +{ + private PLabel _label_; + + public ALabelExp2() + { + // Constructor + } + + public ALabelExp2( + @SuppressWarnings("hiding") PLabel _label_) + { + // Constructor + setLabel(_label_); + + } + + @Override + public Object clone() + { + return new ALabelExp2( + cloneNode(this._label_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseALabelExp2(this); + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._label_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._label_ == child) + { + this._label_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ALabelOplabel.java b/src/nasmParser/node/ALabelOplabel.java new file mode 100644 index 0000000..355a8e8 --- /dev/null +++ b/src/nasmParser/node/ALabelOplabel.java @@ -0,0 +1,138 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ALabelOplabel extends POplabel +{ + private PLabel _label_; + private TSemicol _semicol_; + + public ALabelOplabel() + { + // Constructor + } + + public ALabelOplabel( + @SuppressWarnings("hiding") PLabel _label_, + @SuppressWarnings("hiding") TSemicol _semicol_) + { + // Constructor + setLabel(_label_); + + setSemicol(_semicol_); + + } + + @Override + public Object clone() + { + return new ALabelOplabel( + cloneNode(this._label_), + cloneNode(this._semicol_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseALabelOplabel(this); + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + public TSemicol getSemicol() + { + return this._semicol_; + } + + public void setSemicol(TSemicol node) + { + if(this._semicol_ != null) + { + this._semicol_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._semicol_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._label_) + + toString(this._semicol_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._label_ == child) + { + this._label_ = null; + return; + } + + if(this._semicol_ == child) + { + this._semicol_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + if(this._semicol_ == oldChild) + { + setSemicol((TSemicol) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ALastLinst.java b/src/nasmParser/node/ALastLinst.java new file mode 100644 index 0000000..1ffd2eb --- /dev/null +++ b/src/nasmParser/node/ALastLinst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ALastLinst extends PLinst +{ + private PInst _inst_; + + public ALastLinst() + { + // Constructor + } + + public ALastLinst( + @SuppressWarnings("hiding") PInst _inst_) + { + // Constructor + setInst(_inst_); + + } + + @Override + public Object clone() + { + return new ALastLinst( + cloneNode(this._inst_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseALastLinst(this); + } + + public PInst getInst() + { + return this._inst_; + } + + public void setInst(PInst node) + { + if(this._inst_ != null) + { + this._inst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._inst_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._inst_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._inst_ == child) + { + this._inst_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._inst_ == oldChild) + { + setInst((PInst) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AMinusExp.java b/src/nasmParser/node/AMinusExp.java new file mode 100644 index 0000000..626c1e4 --- /dev/null +++ b/src/nasmParser/node/AMinusExp.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AMinusExp extends PExp +{ + private PExp _exp_; + private TMinus _minus_; + private PExp1 _exp1_; + + public AMinusExp() + { + // Constructor + } + + public AMinusExp( + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") TMinus _minus_, + @SuppressWarnings("hiding") PExp1 _exp1_) + { + // Constructor + setExp(_exp_); + + setMinus(_minus_); + + setExp1(_exp1_); + + } + + @Override + public Object clone() + { + return new AMinusExp( + cloneNode(this._exp_), + cloneNode(this._minus_), + cloneNode(this._exp1_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAMinusExp(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 TMinus getMinus() + { + return this._minus_; + } + + public void setMinus(TMinus node) + { + if(this._minus_ != null) + { + this._minus_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._minus_ = node; + } + + public PExp1 getExp1() + { + return this._exp1_; + } + + public void setExp1(PExp1 node) + { + if(this._exp1_ != null) + { + this._exp1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._exp1_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._exp_) + + toString(this._minus_) + + toString(this._exp1_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._minus_ == child) + { + this._minus_ = null; + return; + } + + if(this._exp1_ == child) + { + this._exp1_ = 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._minus_ == oldChild) + { + setMinus((TMinus) newChild); + return; + } + + if(this._exp1_ == oldChild) + { + setExp1((PExp1) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AMovInst.java b/src/nasmParser/node/AMovInst.java new file mode 100644 index 0000000..d9bd9d7 --- /dev/null +++ b/src/nasmParser/node/AMovInst.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AMovInst extends PInst +{ + private POplabel _oplabel_; + private TMov _mov_; + private PAr _ar_; + private TComma _comma_; + private PAcr _acr_; + + public AMovInst() + { + // Constructor + } + + public AMovInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TMov _mov_, + @SuppressWarnings("hiding") PAr _ar_, + @SuppressWarnings("hiding") TComma _comma_, + @SuppressWarnings("hiding") PAcr _acr_) + { + // Constructor + setOplabel(_oplabel_); + + setMov(_mov_); + + setAr(_ar_); + + setComma(_comma_); + + setAcr(_acr_); + + } + + @Override + public Object clone() + { + return new AMovInst( + cloneNode(this._oplabel_), + cloneNode(this._mov_), + cloneNode(this._ar_), + cloneNode(this._comma_), + cloneNode(this._acr_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAMovInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TMov getMov() + { + return this._mov_; + } + + public void setMov(TMov node) + { + if(this._mov_ != null) + { + this._mov_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._mov_ = node; + } + + public PAr getAr() + { + return this._ar_; + } + + public void setAr(PAr node) + { + if(this._ar_ != null) + { + this._ar_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ar_ = node; + } + + public TComma getComma() + { + return this._comma_; + } + + public void setComma(TComma node) + { + if(this._comma_ != null) + { + this._comma_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._comma_ = node; + } + + public PAcr getAcr() + { + return this._acr_; + } + + public void setAcr(PAcr node) + { + if(this._acr_ != null) + { + this._acr_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._acr_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._mov_) + + toString(this._ar_) + + toString(this._comma_) + + toString(this._acr_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._mov_ == child) + { + this._mov_ = null; + return; + } + + if(this._ar_ == child) + { + this._ar_ = null; + return; + } + + if(this._comma_ == child) + { + this._comma_ = null; + return; + } + + if(this._acr_ == child) + { + this._acr_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._mov_ == oldChild) + { + setMov((TMov) newChild); + return; + } + + if(this._ar_ == oldChild) + { + setAr((PAr) newChild); + return; + } + + if(this._comma_ == oldChild) + { + setComma((TComma) newChild); + return; + } + + if(this._acr_ == oldChild) + { + setAcr((PAcr) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ANextExp.java b/src/nasmParser/node/ANextExp.java new file mode 100644 index 0000000..e07f3ae --- /dev/null +++ b/src/nasmParser/node/ANextExp.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ANextExp extends PExp +{ + private PExp1 _exp1_; + + public ANextExp() + { + // Constructor + } + + public ANextExp( + @SuppressWarnings("hiding") PExp1 _exp1_) + { + // Constructor + setExp1(_exp1_); + + } + + @Override + public Object clone() + { + return new ANextExp( + cloneNode(this._exp1_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseANextExp(this); + } + + public PExp1 getExp1() + { + return this._exp1_; + } + + public void setExp1(PExp1 node) + { + if(this._exp1_ != null) + { + this._exp1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._exp1_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._exp1_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._exp1_ == child) + { + this._exp1_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._exp1_ == oldChild) + { + setExp1((PExp1) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ANextExp1.java b/src/nasmParser/node/ANextExp1.java new file mode 100644 index 0000000..13752b8 --- /dev/null +++ b/src/nasmParser/node/ANextExp1.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ANextExp1 extends PExp1 +{ + private PExp2 _exp2_; + + public ANextExp1() + { + // Constructor + } + + public ANextExp1( + @SuppressWarnings("hiding") PExp2 _exp2_) + { + // Constructor + setExp2(_exp2_); + + } + + @Override + public Object clone() + { + return new ANextExp1( + cloneNode(this._exp2_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseANextExp1(this); + } + + public PExp2 getExp2() + { + return this._exp2_; + } + + public void setExp2(PExp2 node) + { + if(this._exp2_ != null) + { + this._exp2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._exp2_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._exp2_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._exp2_ == child) + { + this._exp2_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._exp2_ == oldChild) + { + setExp2((PExp2) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ANonemptySecbss.java b/src/nasmParser/node/ANonemptySecbss.java new file mode 100644 index 0000000..dc4cb51 --- /dev/null +++ b/src/nasmParser/node/ANonemptySecbss.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ANonemptySecbss extends PSecbss +{ + private TSection _section_; + private TBss _bss_; + private PLvar _lvar_; + + public ANonemptySecbss() + { + // Constructor + } + + public ANonemptySecbss( + @SuppressWarnings("hiding") TSection _section_, + @SuppressWarnings("hiding") TBss _bss_, + @SuppressWarnings("hiding") PLvar _lvar_) + { + // Constructor + setSection(_section_); + + setBss(_bss_); + + setLvar(_lvar_); + + } + + @Override + public Object clone() + { + return new ANonemptySecbss( + cloneNode(this._section_), + cloneNode(this._bss_), + cloneNode(this._lvar_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseANonemptySecbss(this); + } + + public TSection getSection() + { + return this._section_; + } + + public void setSection(TSection node) + { + if(this._section_ != null) + { + this._section_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._section_ = node; + } + + public TBss getBss() + { + return this._bss_; + } + + public void setBss(TBss node) + { + if(this._bss_ != null) + { + this._bss_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._bss_ = node; + } + + public PLvar getLvar() + { + return this._lvar_; + } + + public void setLvar(PLvar node) + { + if(this._lvar_ != null) + { + this._lvar_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._lvar_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._section_) + + toString(this._bss_) + + toString(this._lvar_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._section_ == child) + { + this._section_ = null; + return; + } + + if(this._bss_ == child) + { + this._bss_ = null; + return; + } + + if(this._lvar_ == child) + { + this._lvar_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._section_ == oldChild) + { + setSection((TSection) newChild); + return; + } + + if(this._bss_ == oldChild) + { + setBss((TBss) newChild); + return; + } + + if(this._lvar_ == oldChild) + { + setLvar((PLvar) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ANonemptySecdata.java b/src/nasmParser/node/ANonemptySecdata.java new file mode 100644 index 0000000..a952703 --- /dev/null +++ b/src/nasmParser/node/ANonemptySecdata.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ANonemptySecdata extends PSecdata +{ + private TSection _section_; + private TData _data_; + private PLconst _lconst_; + + public ANonemptySecdata() + { + // Constructor + } + + public ANonemptySecdata( + @SuppressWarnings("hiding") TSection _section_, + @SuppressWarnings("hiding") TData _data_, + @SuppressWarnings("hiding") PLconst _lconst_) + { + // Constructor + setSection(_section_); + + setData(_data_); + + setLconst(_lconst_); + + } + + @Override + public Object clone() + { + return new ANonemptySecdata( + cloneNode(this._section_), + cloneNode(this._data_), + cloneNode(this._lconst_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseANonemptySecdata(this); + } + + public TSection getSection() + { + return this._section_; + } + + public void setSection(TSection node) + { + if(this._section_ != null) + { + this._section_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._section_ = node; + } + + public TData getData() + { + return this._data_; + } + + public void setData(TData node) + { + if(this._data_ != null) + { + this._data_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._data_ = node; + } + + public PLconst getLconst() + { + return this._lconst_; + } + + public void setLconst(PLconst node) + { + if(this._lconst_ != null) + { + this._lconst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._lconst_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._section_) + + toString(this._data_) + + toString(this._lconst_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._section_ == child) + { + this._section_ = null; + return; + } + + if(this._data_ == child) + { + this._data_ = null; + return; + } + + if(this._lconst_ == child) + { + this._lconst_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._section_ == oldChild) + { + setSection((TSection) newChild); + return; + } + + if(this._data_ == oldChild) + { + setData((TData) newChild); + return; + } + + if(this._lconst_ == oldChild) + { + setLconst((PLconst) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ANotInst.java b/src/nasmParser/node/ANotInst.java new file mode 100644 index 0000000..aaba5c3 --- /dev/null +++ b/src/nasmParser/node/ANotInst.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ANotInst extends PInst +{ + private POplabel _oplabel_; + private TNot _not_; + private PAr _ar_; + + public ANotInst() + { + // Constructor + } + + public ANotInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TNot _not_, + @SuppressWarnings("hiding") PAr _ar_) + { + // Constructor + setOplabel(_oplabel_); + + setNot(_not_); + + setAr(_ar_); + + } + + @Override + public Object clone() + { + return new ANotInst( + cloneNode(this._oplabel_), + cloneNode(this._not_), + cloneNode(this._ar_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseANotInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TNot getNot() + { + return this._not_; + } + + public void setNot(TNot node) + { + if(this._not_ != null) + { + this._not_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._not_ = node; + } + + public PAr getAr() + { + return this._ar_; + } + + public void setAr(PAr node) + { + if(this._ar_ != null) + { + this._ar_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ar_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._not_) + + toString(this._ar_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._not_ == child) + { + this._not_ = null; + return; + } + + if(this._ar_ == child) + { + this._ar_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._not_ == oldChild) + { + setNot((TNot) newChild); + return; + } + + if(this._ar_ == oldChild) + { + setAr((PAr) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ANumconst.java b/src/nasmParser/node/ANumconst.java new file mode 100644 index 0000000..4823176 --- /dev/null +++ b/src/nasmParser/node/ANumconst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ANumconst extends PNumconst +{ + private TNumber _number_; + + public ANumconst() + { + // Constructor + } + + public ANumconst( + @SuppressWarnings("hiding") TNumber _number_) + { + // Constructor + setNumber(_number_); + + } + + @Override + public Object clone() + { + return new ANumconst( + cloneNode(this._number_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseANumconst(this); + } + + public TNumber getNumber() + { + return this._number_; + } + + public void setNumber(TNumber node) + { + if(this._number_ != null) + { + this._number_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._number_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._number_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._number_ == child) + { + this._number_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._number_ == oldChild) + { + setNumber((TNumber) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ANumconstAcr.java b/src/nasmParser/node/ANumconstAcr.java new file mode 100644 index 0000000..bfb2b58 --- /dev/null +++ b/src/nasmParser/node/ANumconstAcr.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ANumconstAcr extends PAcr +{ + private PNumconst _numconst_; + + public ANumconstAcr() + { + // Constructor + } + + public ANumconstAcr( + @SuppressWarnings("hiding") PNumconst _numconst_) + { + // Constructor + setNumconst(_numconst_); + + } + + @Override + public Object clone() + { + return new ANumconstAcr( + cloneNode(this._numconst_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseANumconstAcr(this); + } + + public PNumconst getNumconst() + { + return this._numconst_; + } + + public void setNumconst(PNumconst node) + { + if(this._numconst_ != null) + { + this._numconst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._numconst_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._numconst_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._numconst_ == child) + { + this._numconst_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._numconst_ == oldChild) + { + setNumconst((PNumconst) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ANumconstExp2.java b/src/nasmParser/node/ANumconstExp2.java new file mode 100644 index 0000000..8a6b256 --- /dev/null +++ b/src/nasmParser/node/ANumconstExp2.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ANumconstExp2 extends PExp2 +{ + private PNumconst _numconst_; + + public ANumconstExp2() + { + // Constructor + } + + public ANumconstExp2( + @SuppressWarnings("hiding") PNumconst _numconst_) + { + // Constructor + setNumconst(_numconst_); + + } + + @Override + public Object clone() + { + return new ANumconstExp2( + cloneNode(this._numconst_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseANumconstExp2(this); + } + + public PNumconst getNumconst() + { + return this._numconst_; + } + + public void setNumconst(PNumconst node) + { + if(this._numconst_ != null) + { + this._numconst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._numconst_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._numconst_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._numconst_ == child) + { + this._numconst_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._numconst_ == oldChild) + { + setNumconst((PNumconst) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AOrInst.java b/src/nasmParser/node/AOrInst.java new file mode 100644 index 0000000..1ada1ec --- /dev/null +++ b/src/nasmParser/node/AOrInst.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AOrInst extends PInst +{ + private POplabel _oplabel_; + private TOr _or_; + private PAr _ar_; + private TComma _comma_; + private PAcr _acr_; + + public AOrInst() + { + // Constructor + } + + public AOrInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TOr _or_, + @SuppressWarnings("hiding") PAr _ar_, + @SuppressWarnings("hiding") TComma _comma_, + @SuppressWarnings("hiding") PAcr _acr_) + { + // Constructor + setOplabel(_oplabel_); + + setOr(_or_); + + setAr(_ar_); + + setComma(_comma_); + + setAcr(_acr_); + + } + + @Override + public Object clone() + { + return new AOrInst( + cloneNode(this._oplabel_), + cloneNode(this._or_), + cloneNode(this._ar_), + cloneNode(this._comma_), + cloneNode(this._acr_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAOrInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TOr getOr() + { + return this._or_; + } + + public void setOr(TOr node) + { + if(this._or_ != null) + { + this._or_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._or_ = node; + } + + public PAr getAr() + { + return this._ar_; + } + + public void setAr(PAr node) + { + if(this._ar_ != null) + { + this._ar_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ar_ = node; + } + + public TComma getComma() + { + return this._comma_; + } + + public void setComma(TComma node) + { + if(this._comma_ != null) + { + this._comma_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._comma_ = node; + } + + public PAcr getAcr() + { + return this._acr_; + } + + public void setAcr(PAcr node) + { + if(this._acr_ != null) + { + this._acr_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._acr_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._or_) + + toString(this._ar_) + + toString(this._comma_) + + toString(this._acr_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._or_ == child) + { + this._or_ = null; + return; + } + + if(this._ar_ == child) + { + this._ar_ = null; + return; + } + + if(this._comma_ == child) + { + this._comma_ = null; + return; + } + + if(this._acr_ == child) + { + this._acr_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._or_ == oldChild) + { + setOr((TOr) newChild); + return; + } + + if(this._ar_ == oldChild) + { + setAr((PAr) newChild); + return; + } + + if(this._comma_ == oldChild) + { + setComma((TComma) newChild); + return; + } + + if(this._acr_ == oldChild) + { + setAcr((PAcr) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/APlusExp.java b/src/nasmParser/node/APlusExp.java new file mode 100644 index 0000000..c3d2bbf --- /dev/null +++ b/src/nasmParser/node/APlusExp.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class APlusExp extends PExp +{ + private PExp _exp_; + private TPlus _plus_; + private PExp1 _exp1_; + + public APlusExp() + { + // Constructor + } + + public APlusExp( + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") TPlus _plus_, + @SuppressWarnings("hiding") PExp1 _exp1_) + { + // Constructor + setExp(_exp_); + + setPlus(_plus_); + + setExp1(_exp1_); + + } + + @Override + public Object clone() + { + return new APlusExp( + cloneNode(this._exp_), + cloneNode(this._plus_), + cloneNode(this._exp1_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAPlusExp(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 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 PExp1 getExp1() + { + return this._exp1_; + } + + public void setExp1(PExp1 node) + { + if(this._exp1_ != null) + { + this._exp1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._exp1_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._exp_) + + toString(this._plus_) + + toString(this._exp1_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._plus_ == child) + { + this._plus_ = null; + return; + } + + if(this._exp1_ == child) + { + this._exp1_ = 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._plus_ == oldChild) + { + setPlus((TPlus) newChild); + return; + } + + if(this._exp1_ == oldChild) + { + setExp1((PExp1) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/APopInst.java b/src/nasmParser/node/APopInst.java new file mode 100644 index 0000000..c4e25bf --- /dev/null +++ b/src/nasmParser/node/APopInst.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class APopInst extends PInst +{ + private POplabel _oplabel_; + private TPop _pop_; + private PAr _ar_; + + public APopInst() + { + // Constructor + } + + public APopInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TPop _pop_, + @SuppressWarnings("hiding") PAr _ar_) + { + // Constructor + setOplabel(_oplabel_); + + setPop(_pop_); + + setAr(_ar_); + + } + + @Override + public Object clone() + { + return new APopInst( + cloneNode(this._oplabel_), + cloneNode(this._pop_), + cloneNode(this._ar_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAPopInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TPop getPop() + { + return this._pop_; + } + + public void setPop(TPop node) + { + if(this._pop_ != null) + { + this._pop_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pop_ = node; + } + + public PAr getAr() + { + return this._ar_; + } + + public void setAr(PAr node) + { + if(this._ar_ != null) + { + this._ar_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ar_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._pop_) + + toString(this._ar_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._pop_ == child) + { + this._pop_ = null; + return; + } + + if(this._ar_ == child) + { + this._ar_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._pop_ == oldChild) + { + setPop((TPop) newChild); + return; + } + + if(this._ar_ == oldChild) + { + setAr((PAr) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AProg.java b/src/nasmParser/node/AProg.java new file mode 100644 index 0000000..197f01b --- /dev/null +++ b/src/nasmParser/node/AProg.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AProg extends PProg +{ + private PLinclude _linclude_; + private PSecdata _secdata_; + private PSecbss _secbss_; + private PSectext _sectext_; + + public AProg() + { + // Constructor + } + + public AProg( + @SuppressWarnings("hiding") PLinclude _linclude_, + @SuppressWarnings("hiding") PSecdata _secdata_, + @SuppressWarnings("hiding") PSecbss _secbss_, + @SuppressWarnings("hiding") PSectext _sectext_) + { + // Constructor + setLinclude(_linclude_); + + setSecdata(_secdata_); + + setSecbss(_secbss_); + + setSectext(_sectext_); + + } + + @Override + public Object clone() + { + return new AProg( + cloneNode(this._linclude_), + cloneNode(this._secdata_), + cloneNode(this._secbss_), + cloneNode(this._sectext_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAProg(this); + } + + public PLinclude getLinclude() + { + return this._linclude_; + } + + public void setLinclude(PLinclude node) + { + if(this._linclude_ != null) + { + this._linclude_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._linclude_ = node; + } + + public PSecdata getSecdata() + { + return this._secdata_; + } + + public void setSecdata(PSecdata node) + { + if(this._secdata_ != null) + { + this._secdata_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._secdata_ = node; + } + + public PSecbss getSecbss() + { + return this._secbss_; + } + + public void setSecbss(PSecbss node) + { + if(this._secbss_ != null) + { + this._secbss_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._secbss_ = node; + } + + public PSectext getSectext() + { + return this._sectext_; + } + + public void setSectext(PSectext node) + { + if(this._sectext_ != null) + { + this._sectext_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._sectext_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._linclude_) + + toString(this._secdata_) + + toString(this._secbss_) + + toString(this._sectext_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._linclude_ == child) + { + this._linclude_ = null; + return; + } + + if(this._secdata_ == child) + { + this._secdata_ = null; + return; + } + + if(this._secbss_ == child) + { + this._secbss_ = null; + return; + } + + if(this._sectext_ == child) + { + this._sectext_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._linclude_ == oldChild) + { + setLinclude((PLinclude) newChild); + return; + } + + if(this._secdata_ == oldChild) + { + setSecdata((PSecdata) newChild); + return; + } + + if(this._secbss_ == oldChild) + { + setSecbss((PSecbss) newChild); + return; + } + + if(this._sectext_ == oldChild) + { + setSectext((PSectext) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/APushInst.java b/src/nasmParser/node/APushInst.java new file mode 100644 index 0000000..b6da43f --- /dev/null +++ b/src/nasmParser/node/APushInst.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class APushInst extends PInst +{ + private POplabel _oplabel_; + private TPush _push_; + private PAcr _acr_; + + public APushInst() + { + // Constructor + } + + public APushInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TPush _push_, + @SuppressWarnings("hiding") PAcr _acr_) + { + // Constructor + setOplabel(_oplabel_); + + setPush(_push_); + + setAcr(_acr_); + + } + + @Override + public Object clone() + { + return new APushInst( + cloneNode(this._oplabel_), + cloneNode(this._push_), + cloneNode(this._acr_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAPushInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TPush getPush() + { + return this._push_; + } + + public void setPush(TPush node) + { + if(this._push_ != null) + { + this._push_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._push_ = node; + } + + public PAcr getAcr() + { + return this._acr_; + } + + public void setAcr(PAcr node) + { + if(this._acr_ != null) + { + this._acr_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._acr_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._push_) + + toString(this._acr_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._push_ == child) + { + this._push_ = null; + return; + } + + if(this._acr_ == child) + { + this._acr_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._push_ == oldChild) + { + setPush((TPush) newChild); + return; + } + + if(this._acr_ == oldChild) + { + setAcr((PAcr) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ARecLconst.java b/src/nasmParser/node/ARecLconst.java new file mode 100644 index 0000000..6faa06a --- /dev/null +++ b/src/nasmParser/node/ARecLconst.java @@ -0,0 +1,138 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ARecLconst extends PLconst +{ + private PConst _const_; + private PLconst _lconst_; + + public ARecLconst() + { + // Constructor + } + + public ARecLconst( + @SuppressWarnings("hiding") PConst _const_, + @SuppressWarnings("hiding") PLconst _lconst_) + { + // Constructor + setConst(_const_); + + setLconst(_lconst_); + + } + + @Override + public Object clone() + { + return new ARecLconst( + cloneNode(this._const_), + cloneNode(this._lconst_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseARecLconst(this); + } + + public PConst getConst() + { + return this._const_; + } + + public void setConst(PConst node) + { + if(this._const_ != null) + { + this._const_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._const_ = node; + } + + public PLconst getLconst() + { + return this._lconst_; + } + + public void setLconst(PLconst node) + { + if(this._lconst_ != null) + { + this._lconst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._lconst_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._const_) + + toString(this._lconst_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._const_ == child) + { + this._const_ = null; + return; + } + + if(this._lconst_ == child) + { + this._lconst_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._const_ == oldChild) + { + setConst((PConst) newChild); + return; + } + + if(this._lconst_ == oldChild) + { + setLconst((PLconst) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ARecLglobal.java b/src/nasmParser/node/ARecLglobal.java new file mode 100644 index 0000000..2f1f60f --- /dev/null +++ b/src/nasmParser/node/ARecLglobal.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ARecLglobal extends PLglobal +{ + private TGlobal _global_; + private PLabel _label_; + private PLglobal _lglobal_; + + public ARecLglobal() + { + // Constructor + } + + public ARecLglobal( + @SuppressWarnings("hiding") TGlobal _global_, + @SuppressWarnings("hiding") PLabel _label_, + @SuppressWarnings("hiding") PLglobal _lglobal_) + { + // Constructor + setGlobal(_global_); + + setLabel(_label_); + + setLglobal(_lglobal_); + + } + + @Override + public Object clone() + { + return new ARecLglobal( + cloneNode(this._global_), + cloneNode(this._label_), + cloneNode(this._lglobal_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseARecLglobal(this); + } + + public TGlobal getGlobal() + { + return this._global_; + } + + public void setGlobal(TGlobal node) + { + if(this._global_ != null) + { + this._global_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._global_ = node; + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + public PLglobal getLglobal() + { + return this._lglobal_; + } + + public void setLglobal(PLglobal node) + { + if(this._lglobal_ != null) + { + this._lglobal_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._lglobal_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._global_) + + toString(this._label_) + + toString(this._lglobal_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._global_ == child) + { + this._global_ = null; + return; + } + + if(this._label_ == child) + { + this._label_ = null; + return; + } + + if(this._lglobal_ == child) + { + this._lglobal_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._global_ == oldChild) + { + setGlobal((TGlobal) newChild); + return; + } + + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + if(this._lglobal_ == oldChild) + { + setLglobal((PLglobal) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ARecLinclude.java b/src/nasmParser/node/ARecLinclude.java new file mode 100644 index 0000000..9dc548c --- /dev/null +++ b/src/nasmParser/node/ARecLinclude.java @@ -0,0 +1,138 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ARecLinclude extends PLinclude +{ + private PInclude _include_; + private PLinclude _linclude_; + + public ARecLinclude() + { + // Constructor + } + + public ARecLinclude( + @SuppressWarnings("hiding") PInclude _include_, + @SuppressWarnings("hiding") PLinclude _linclude_) + { + // Constructor + setInclude(_include_); + + setLinclude(_linclude_); + + } + + @Override + public Object clone() + { + return new ARecLinclude( + cloneNode(this._include_), + cloneNode(this._linclude_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseARecLinclude(this); + } + + public PInclude getInclude() + { + return this._include_; + } + + public void setInclude(PInclude node) + { + if(this._include_ != null) + { + this._include_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._include_ = node; + } + + public PLinclude getLinclude() + { + return this._linclude_; + } + + public void setLinclude(PLinclude node) + { + if(this._linclude_ != null) + { + this._linclude_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._linclude_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._include_) + + toString(this._linclude_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._include_ == child) + { + this._include_ = null; + return; + } + + if(this._linclude_ == child) + { + this._linclude_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._include_ == oldChild) + { + setInclude((PInclude) newChild); + return; + } + + if(this._linclude_ == oldChild) + { + setLinclude((PLinclude) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ARecLinst.java b/src/nasmParser/node/ARecLinst.java new file mode 100644 index 0000000..af7d2f9 --- /dev/null +++ b/src/nasmParser/node/ARecLinst.java @@ -0,0 +1,138 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ARecLinst extends PLinst +{ + private PInst _inst_; + private PLinst _linst_; + + public ARecLinst() + { + // Constructor + } + + public ARecLinst( + @SuppressWarnings("hiding") PInst _inst_, + @SuppressWarnings("hiding") PLinst _linst_) + { + // Constructor + setInst(_inst_); + + setLinst(_linst_); + + } + + @Override + public Object clone() + { + return new ARecLinst( + cloneNode(this._inst_), + cloneNode(this._linst_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseARecLinst(this); + } + + public PInst getInst() + { + return this._inst_; + } + + public void setInst(PInst node) + { + if(this._inst_ != null) + { + this._inst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._inst_ = node; + } + + public PLinst getLinst() + { + return this._linst_; + } + + public void setLinst(PLinst node) + { + if(this._linst_ != null) + { + this._linst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._linst_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._inst_) + + toString(this._linst_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._inst_ == child) + { + this._inst_ = null; + return; + } + + if(this._linst_ == child) + { + this._linst_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._inst_ == oldChild) + { + setInst((PInst) newChild); + return; + } + + if(this._linst_ == oldChild) + { + setLinst((PLinst) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ARecLvar.java b/src/nasmParser/node/ARecLvar.java new file mode 100644 index 0000000..06eaea4 --- /dev/null +++ b/src/nasmParser/node/ARecLvar.java @@ -0,0 +1,138 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ARecLvar extends PLvar +{ + private PVar _var_; + private PLvar _lvar_; + + public ARecLvar() + { + // Constructor + } + + public ARecLvar( + @SuppressWarnings("hiding") PVar _var_, + @SuppressWarnings("hiding") PLvar _lvar_) + { + // Constructor + setVar(_var_); + + setLvar(_lvar_); + + } + + @Override + public Object clone() + { + return new ARecLvar( + cloneNode(this._var_), + cloneNode(this._lvar_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseARecLvar(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 PLvar getLvar() + { + return this._lvar_; + } + + public void setLvar(PLvar node) + { + if(this._lvar_ != null) + { + this._lvar_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._lvar_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._var_) + + toString(this._lvar_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._var_ == child) + { + this._var_ = null; + return; + } + + if(this._lvar_ == child) + { + this._lvar_ = 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._lvar_ == oldChild) + { + setLvar((PLvar) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ARegisterAcr.java b/src/nasmParser/node/ARegisterAcr.java new file mode 100644 index 0000000..3d2018f --- /dev/null +++ b/src/nasmParser/node/ARegisterAcr.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ARegisterAcr extends PAcr +{ + private PRegister _register_; + + public ARegisterAcr() + { + // Constructor + } + + public ARegisterAcr( + @SuppressWarnings("hiding") PRegister _register_) + { + // Constructor + setRegister(_register_); + + } + + @Override + public Object clone() + { + return new ARegisterAcr( + cloneNode(this._register_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseARegisterAcr(this); + } + + public PRegister getRegister() + { + return this._register_; + } + + public void setRegister(PRegister node) + { + if(this._register_ != null) + { + this._register_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._register_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._register_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._register_ == child) + { + this._register_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._register_ == oldChild) + { + setRegister((PRegister) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ARegisterAr.java b/src/nasmParser/node/ARegisterAr.java new file mode 100644 index 0000000..5e139fc --- /dev/null +++ b/src/nasmParser/node/ARegisterAr.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ARegisterAr extends PAr +{ + private PRegister _register_; + + public ARegisterAr() + { + // Constructor + } + + public ARegisterAr( + @SuppressWarnings("hiding") PRegister _register_) + { + // Constructor + setRegister(_register_); + + } + + @Override + public Object clone() + { + return new ARegisterAr( + cloneNode(this._register_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseARegisterAr(this); + } + + public PRegister getRegister() + { + return this._register_; + } + + public void setRegister(PRegister node) + { + if(this._register_ != null) + { + this._register_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._register_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._register_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._register_ == child) + { + this._register_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._register_ == oldChild) + { + setRegister((PRegister) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ARegisterExp2.java b/src/nasmParser/node/ARegisterExp2.java new file mode 100644 index 0000000..be6f446 --- /dev/null +++ b/src/nasmParser/node/ARegisterExp2.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ARegisterExp2 extends PExp2 +{ + private PRegister _register_; + + public ARegisterExp2() + { + // Constructor + } + + public ARegisterExp2( + @SuppressWarnings("hiding") PRegister _register_) + { + // Constructor + setRegister(_register_); + + } + + @Override + public Object clone() + { + return new ARegisterExp2( + cloneNode(this._register_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseARegisterExp2(this); + } + + public PRegister getRegister() + { + return this._register_; + } + + public void setRegister(PRegister node) + { + if(this._register_ != null) + { + this._register_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._register_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._register_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._register_ == child) + { + this._register_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._register_ == oldChild) + { + setRegister((PRegister) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AResbVar.java b/src/nasmParser/node/AResbVar.java new file mode 100644 index 0000000..3277c8e --- /dev/null +++ b/src/nasmParser/node/AResbVar.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AResbVar extends PVar +{ + private PLabel _label_; + private TSemicol _semicol_; + private TReservebyte _reservebyte_; + private TNumber _number_; + + public AResbVar() + { + // Constructor + } + + public AResbVar( + @SuppressWarnings("hiding") PLabel _label_, + @SuppressWarnings("hiding") TSemicol _semicol_, + @SuppressWarnings("hiding") TReservebyte _reservebyte_, + @SuppressWarnings("hiding") TNumber _number_) + { + // Constructor + setLabel(_label_); + + setSemicol(_semicol_); + + setReservebyte(_reservebyte_); + + setNumber(_number_); + + } + + @Override + public Object clone() + { + return new AResbVar( + cloneNode(this._label_), + cloneNode(this._semicol_), + cloneNode(this._reservebyte_), + cloneNode(this._number_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAResbVar(this); + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + public TSemicol getSemicol() + { + return this._semicol_; + } + + public void setSemicol(TSemicol node) + { + if(this._semicol_ != null) + { + this._semicol_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._semicol_ = node; + } + + public TReservebyte getReservebyte() + { + return this._reservebyte_; + } + + public void setReservebyte(TReservebyte node) + { + if(this._reservebyte_ != null) + { + this._reservebyte_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._reservebyte_ = node; + } + + public TNumber getNumber() + { + return this._number_; + } + + public void setNumber(TNumber node) + { + if(this._number_ != null) + { + this._number_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._number_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._label_) + + toString(this._semicol_) + + toString(this._reservebyte_) + + toString(this._number_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._label_ == child) + { + this._label_ = null; + return; + } + + if(this._semicol_ == child) + { + this._semicol_ = null; + return; + } + + if(this._reservebyte_ == child) + { + this._reservebyte_ = null; + return; + } + + if(this._number_ == child) + { + this._number_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + if(this._semicol_ == oldChild) + { + setSemicol((TSemicol) newChild); + return; + } + + if(this._reservebyte_ == oldChild) + { + setReservebyte((TReservebyte) newChild); + return; + } + + if(this._number_ == oldChild) + { + setNumber((TNumber) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AResdVar.java b/src/nasmParser/node/AResdVar.java new file mode 100644 index 0000000..33462d8 --- /dev/null +++ b/src/nasmParser/node/AResdVar.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AResdVar extends PVar +{ + private PLabel _label_; + private TSemicol _semicol_; + private TReservedoubleword _reservedoubleword_; + private TNumber _number_; + + public AResdVar() + { + // Constructor + } + + public AResdVar( + @SuppressWarnings("hiding") PLabel _label_, + @SuppressWarnings("hiding") TSemicol _semicol_, + @SuppressWarnings("hiding") TReservedoubleword _reservedoubleword_, + @SuppressWarnings("hiding") TNumber _number_) + { + // Constructor + setLabel(_label_); + + setSemicol(_semicol_); + + setReservedoubleword(_reservedoubleword_); + + setNumber(_number_); + + } + + @Override + public Object clone() + { + return new AResdVar( + cloneNode(this._label_), + cloneNode(this._semicol_), + cloneNode(this._reservedoubleword_), + cloneNode(this._number_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAResdVar(this); + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + public TSemicol getSemicol() + { + return this._semicol_; + } + + public void setSemicol(TSemicol node) + { + if(this._semicol_ != null) + { + this._semicol_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._semicol_ = node; + } + + public TReservedoubleword getReservedoubleword() + { + return this._reservedoubleword_; + } + + public void setReservedoubleword(TReservedoubleword node) + { + if(this._reservedoubleword_ != null) + { + this._reservedoubleword_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._reservedoubleword_ = node; + } + + public TNumber getNumber() + { + return this._number_; + } + + public void setNumber(TNumber node) + { + if(this._number_ != null) + { + this._number_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._number_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._label_) + + toString(this._semicol_) + + toString(this._reservedoubleword_) + + toString(this._number_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._label_ == child) + { + this._label_ = null; + return; + } + + if(this._semicol_ == child) + { + this._semicol_ = null; + return; + } + + if(this._reservedoubleword_ == child) + { + this._reservedoubleword_ = null; + return; + } + + if(this._number_ == child) + { + this._number_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + if(this._semicol_ == oldChild) + { + setSemicol((TSemicol) newChild); + return; + } + + if(this._reservedoubleword_ == oldChild) + { + setReservedoubleword((TReservedoubleword) newChild); + return; + } + + if(this._number_ == oldChild) + { + setNumber((TNumber) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AResqVar.java b/src/nasmParser/node/AResqVar.java new file mode 100644 index 0000000..6df39a4 --- /dev/null +++ b/src/nasmParser/node/AResqVar.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AResqVar extends PVar +{ + private PLabel _label_; + private TSemicol _semicol_; + private TReservequadword _reservequadword_; + private TNumber _number_; + + public AResqVar() + { + // Constructor + } + + public AResqVar( + @SuppressWarnings("hiding") PLabel _label_, + @SuppressWarnings("hiding") TSemicol _semicol_, + @SuppressWarnings("hiding") TReservequadword _reservequadword_, + @SuppressWarnings("hiding") TNumber _number_) + { + // Constructor + setLabel(_label_); + + setSemicol(_semicol_); + + setReservequadword(_reservequadword_); + + setNumber(_number_); + + } + + @Override + public Object clone() + { + return new AResqVar( + cloneNode(this._label_), + cloneNode(this._semicol_), + cloneNode(this._reservequadword_), + cloneNode(this._number_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAResqVar(this); + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + public TSemicol getSemicol() + { + return this._semicol_; + } + + public void setSemicol(TSemicol node) + { + if(this._semicol_ != null) + { + this._semicol_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._semicol_ = node; + } + + public TReservequadword getReservequadword() + { + return this._reservequadword_; + } + + public void setReservequadword(TReservequadword node) + { + if(this._reservequadword_ != null) + { + this._reservequadword_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._reservequadword_ = node; + } + + public TNumber getNumber() + { + return this._number_; + } + + public void setNumber(TNumber node) + { + if(this._number_ != null) + { + this._number_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._number_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._label_) + + toString(this._semicol_) + + toString(this._reservequadword_) + + toString(this._number_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._label_ == child) + { + this._label_ = null; + return; + } + + if(this._semicol_ == child) + { + this._semicol_ = null; + return; + } + + if(this._reservequadword_ == child) + { + this._reservequadword_ = null; + return; + } + + if(this._number_ == child) + { + this._number_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + if(this._semicol_ == oldChild) + { + setSemicol((TSemicol) newChild); + return; + } + + if(this._reservequadword_ == oldChild) + { + setReservequadword((TReservequadword) newChild); + return; + } + + if(this._number_ == oldChild) + { + setNumber((TNumber) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ARestVar.java b/src/nasmParser/node/ARestVar.java new file mode 100644 index 0000000..38b546d --- /dev/null +++ b/src/nasmParser/node/ARestVar.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ARestVar extends PVar +{ + private PLabel _label_; + private TSemicol _semicol_; + private TReservetenbytes _reservetenbytes_; + private TNumber _number_; + + public ARestVar() + { + // Constructor + } + + public ARestVar( + @SuppressWarnings("hiding") PLabel _label_, + @SuppressWarnings("hiding") TSemicol _semicol_, + @SuppressWarnings("hiding") TReservetenbytes _reservetenbytes_, + @SuppressWarnings("hiding") TNumber _number_) + { + // Constructor + setLabel(_label_); + + setSemicol(_semicol_); + + setReservetenbytes(_reservetenbytes_); + + setNumber(_number_); + + } + + @Override + public Object clone() + { + return new ARestVar( + cloneNode(this._label_), + cloneNode(this._semicol_), + cloneNode(this._reservetenbytes_), + cloneNode(this._number_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseARestVar(this); + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + public TSemicol getSemicol() + { + return this._semicol_; + } + + public void setSemicol(TSemicol node) + { + if(this._semicol_ != null) + { + this._semicol_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._semicol_ = node; + } + + public TReservetenbytes getReservetenbytes() + { + return this._reservetenbytes_; + } + + public void setReservetenbytes(TReservetenbytes node) + { + if(this._reservetenbytes_ != null) + { + this._reservetenbytes_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._reservetenbytes_ = node; + } + + public TNumber getNumber() + { + return this._number_; + } + + public void setNumber(TNumber node) + { + if(this._number_ != null) + { + this._number_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._number_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._label_) + + toString(this._semicol_) + + toString(this._reservetenbytes_) + + toString(this._number_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._label_ == child) + { + this._label_ = null; + return; + } + + if(this._semicol_ == child) + { + this._semicol_ = null; + return; + } + + if(this._reservetenbytes_ == child) + { + this._reservetenbytes_ = null; + return; + } + + if(this._number_ == child) + { + this._number_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + if(this._semicol_ == oldChild) + { + setSemicol((TSemicol) newChild); + return; + } + + if(this._reservetenbytes_ == oldChild) + { + setReservetenbytes((TReservetenbytes) newChild); + return; + } + + if(this._number_ == oldChild) + { + setNumber((TNumber) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AReswVar.java b/src/nasmParser/node/AReswVar.java new file mode 100644 index 0000000..3743e3c --- /dev/null +++ b/src/nasmParser/node/AReswVar.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AReswVar extends PVar +{ + private PLabel _label_; + private TSemicol _semicol_; + private TReserveword _reserveword_; + private TNumber _number_; + + public AReswVar() + { + // Constructor + } + + public AReswVar( + @SuppressWarnings("hiding") PLabel _label_, + @SuppressWarnings("hiding") TSemicol _semicol_, + @SuppressWarnings("hiding") TReserveword _reserveword_, + @SuppressWarnings("hiding") TNumber _number_) + { + // Constructor + setLabel(_label_); + + setSemicol(_semicol_); + + setReserveword(_reserveword_); + + setNumber(_number_); + + } + + @Override + public Object clone() + { + return new AReswVar( + cloneNode(this._label_), + cloneNode(this._semicol_), + cloneNode(this._reserveword_), + cloneNode(this._number_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAReswVar(this); + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + public TSemicol getSemicol() + { + return this._semicol_; + } + + public void setSemicol(TSemicol node) + { + if(this._semicol_ != null) + { + this._semicol_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._semicol_ = node; + } + + public TReserveword getReserveword() + { + return this._reserveword_; + } + + public void setReserveword(TReserveword node) + { + if(this._reserveword_ != null) + { + this._reserveword_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._reserveword_ = node; + } + + public TNumber getNumber() + { + return this._number_; + } + + public void setNumber(TNumber node) + { + if(this._number_ != null) + { + this._number_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._number_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._label_) + + toString(this._semicol_) + + toString(this._reserveword_) + + toString(this._number_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._label_ == child) + { + this._label_ = null; + return; + } + + if(this._semicol_ == child) + { + this._semicol_ = null; + return; + } + + if(this._reserveword_ == child) + { + this._reserveword_ = null; + return; + } + + if(this._number_ == child) + { + this._number_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + if(this._semicol_ == oldChild) + { + setSemicol((TSemicol) newChild); + return; + } + + if(this._reserveword_ == oldChild) + { + setReserveword((TReserveword) newChild); + return; + } + + if(this._number_ == oldChild) + { + setNumber((TNumber) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ARetInst.java b/src/nasmParser/node/ARetInst.java new file mode 100644 index 0000000..c6632a4 --- /dev/null +++ b/src/nasmParser/node/ARetInst.java @@ -0,0 +1,138 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ARetInst extends PInst +{ + private POplabel _oplabel_; + private TRet _ret_; + + public ARetInst() + { + // Constructor + } + + public ARetInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TRet _ret_) + { + // Constructor + setOplabel(_oplabel_); + + setRet(_ret_); + + } + + @Override + public Object clone() + { + return new ARetInst( + cloneNode(this._oplabel_), + cloneNode(this._ret_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseARetInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TRet getRet() + { + return this._ret_; + } + + public void setRet(TRet node) + { + if(this._ret_ != null) + { + this._ret_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ret_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._ret_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._ret_ == child) + { + this._ret_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._ret_ == oldChild) + { + setRet((TRet) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ASectext.java b/src/nasmParser/node/ASectext.java new file mode 100644 index 0000000..b0b655e --- /dev/null +++ b/src/nasmParser/node/ASectext.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ASectext extends PSectext +{ + private TSection _section_; + private TText _text_; + private PLglobal _lglobal_; + private PLinst _linst_; + + public ASectext() + { + // Constructor + } + + public ASectext( + @SuppressWarnings("hiding") TSection _section_, + @SuppressWarnings("hiding") TText _text_, + @SuppressWarnings("hiding") PLglobal _lglobal_, + @SuppressWarnings("hiding") PLinst _linst_) + { + // Constructor + setSection(_section_); + + setText(_text_); + + setLglobal(_lglobal_); + + setLinst(_linst_); + + } + + @Override + public Object clone() + { + return new ASectext( + cloneNode(this._section_), + cloneNode(this._text_), + cloneNode(this._lglobal_), + cloneNode(this._linst_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseASectext(this); + } + + public TSection getSection() + { + return this._section_; + } + + public void setSection(TSection node) + { + if(this._section_ != null) + { + this._section_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._section_ = node; + } + + public TText getText() + { + return this._text_; + } + + public void setText(TText node) + { + if(this._text_ != null) + { + this._text_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._text_ = node; + } + + public PLglobal getLglobal() + { + return this._lglobal_; + } + + public void setLglobal(PLglobal node) + { + if(this._lglobal_ != null) + { + this._lglobal_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._lglobal_ = node; + } + + public PLinst getLinst() + { + return this._linst_; + } + + public void setLinst(PLinst node) + { + if(this._linst_ != null) + { + this._linst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._linst_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._section_) + + toString(this._text_) + + toString(this._lglobal_) + + toString(this._linst_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._section_ == child) + { + this._section_ = null; + return; + } + + if(this._text_ == child) + { + this._text_ = null; + return; + } + + if(this._lglobal_ == child) + { + this._lglobal_ = null; + return; + } + + if(this._linst_ == child) + { + this._linst_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._section_ == oldChild) + { + setSection((TSection) newChild); + return; + } + + if(this._text_ == oldChild) + { + setText((TText) newChild); + return; + } + + if(this._lglobal_ == oldChild) + { + setLglobal((PLglobal) newChild); + return; + } + + if(this._linst_ == oldChild) + { + setLinst((PLinst) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ASimpleFilename.java b/src/nasmParser/node/ASimpleFilename.java new file mode 100644 index 0000000..a73af59 --- /dev/null +++ b/src/nasmParser/node/ASimpleFilename.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ASimpleFilename extends PFilename +{ + private PLabel _label_; + + public ASimpleFilename() + { + // Constructor + } + + public ASimpleFilename( + @SuppressWarnings("hiding") PLabel _label_) + { + // Constructor + setLabel(_label_); + + } + + @Override + public Object clone() + { + return new ASimpleFilename( + cloneNode(this._label_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseASimpleFilename(this); + } + + public PLabel getLabel() + { + return this._label_; + } + + public void setLabel(PLabel node) + { + if(this._label_ != null) + { + this._label_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._label_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._label_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._label_ == child) + { + this._label_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._label_ == oldChild) + { + setLabel((PLabel) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ASubInst.java b/src/nasmParser/node/ASubInst.java new file mode 100644 index 0000000..2cd17dd --- /dev/null +++ b/src/nasmParser/node/ASubInst.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ASubInst extends PInst +{ + private POplabel _oplabel_; + private TSub _sub_; + private PAr _ar_; + private TComma _comma_; + private PAcr _acr_; + + public ASubInst() + { + // Constructor + } + + public ASubInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TSub _sub_, + @SuppressWarnings("hiding") PAr _ar_, + @SuppressWarnings("hiding") TComma _comma_, + @SuppressWarnings("hiding") PAcr _acr_) + { + // Constructor + setOplabel(_oplabel_); + + setSub(_sub_); + + setAr(_ar_); + + setComma(_comma_); + + setAcr(_acr_); + + } + + @Override + public Object clone() + { + return new ASubInst( + cloneNode(this._oplabel_), + cloneNode(this._sub_), + cloneNode(this._ar_), + cloneNode(this._comma_), + cloneNode(this._acr_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseASubInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TSub getSub() + { + return this._sub_; + } + + public void setSub(TSub node) + { + if(this._sub_ != null) + { + this._sub_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._sub_ = node; + } + + public PAr getAr() + { + return this._ar_; + } + + public void setAr(PAr node) + { + if(this._ar_ != null) + { + this._ar_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ar_ = node; + } + + public TComma getComma() + { + return this._comma_; + } + + public void setComma(TComma node) + { + if(this._comma_ != null) + { + this._comma_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._comma_ = node; + } + + public PAcr getAcr() + { + return this._acr_; + } + + public void setAcr(PAcr node) + { + if(this._acr_ != null) + { + this._acr_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._acr_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._sub_) + + toString(this._ar_) + + toString(this._comma_) + + toString(this._acr_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._sub_ == child) + { + this._sub_ = null; + return; + } + + if(this._ar_ == child) + { + this._ar_ = null; + return; + } + + if(this._comma_ == child) + { + this._comma_ = null; + return; + } + + if(this._acr_ == child) + { + this._acr_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._sub_ == oldChild) + { + setSub((TSub) newChild); + return; + } + + if(this._ar_ == oldChild) + { + setAr((PAr) newChild); + return; + } + + if(this._comma_ == oldChild) + { + setComma((TComma) newChild); + return; + } + + if(this._acr_ == oldChild) + { + setAcr((PAcr) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ATempRegister.java b/src/nasmParser/node/ATempRegister.java new file mode 100644 index 0000000..79c1779 --- /dev/null +++ b/src/nasmParser/node/ATempRegister.java @@ -0,0 +1,138 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ATempRegister extends PRegister +{ + private TPrefixRegister _prefixRegister_; + private TNumber _number_; + + public ATempRegister() + { + // Constructor + } + + public ATempRegister( + @SuppressWarnings("hiding") TPrefixRegister _prefixRegister_, + @SuppressWarnings("hiding") TNumber _number_) + { + // Constructor + setPrefixRegister(_prefixRegister_); + + setNumber(_number_); + + } + + @Override + public Object clone() + { + return new ATempRegister( + cloneNode(this._prefixRegister_), + cloneNode(this._number_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseATempRegister(this); + } + + public TPrefixRegister getPrefixRegister() + { + return this._prefixRegister_; + } + + public void setPrefixRegister(TPrefixRegister node) + { + if(this._prefixRegister_ != null) + { + this._prefixRegister_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._prefixRegister_ = node; + } + + public TNumber getNumber() + { + return this._number_; + } + + public void setNumber(TNumber node) + { + if(this._number_ != null) + { + this._number_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._number_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._prefixRegister_) + + toString(this._number_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._prefixRegister_ == child) + { + this._prefixRegister_ = null; + return; + } + + if(this._number_ == child) + { + this._number_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._prefixRegister_ == oldChild) + { + setPrefixRegister((TPrefixRegister) newChild); + return; + } + + if(this._number_ == oldChild) + { + setNumber((TNumber) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/ATimesExp1.java b/src/nasmParser/node/ATimesExp1.java new file mode 100644 index 0000000..babb876 --- /dev/null +++ b/src/nasmParser/node/ATimesExp1.java @@ -0,0 +1,181 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class ATimesExp1 extends PExp1 +{ + private PExp1 _exp1_; + private TTimes _times_; + private PExp2 _exp2_; + + public ATimesExp1() + { + // Constructor + } + + public ATimesExp1( + @SuppressWarnings("hiding") PExp1 _exp1_, + @SuppressWarnings("hiding") TTimes _times_, + @SuppressWarnings("hiding") PExp2 _exp2_) + { + // Constructor + setExp1(_exp1_); + + setTimes(_times_); + + setExp2(_exp2_); + + } + + @Override + public Object clone() + { + return new ATimesExp1( + cloneNode(this._exp1_), + cloneNode(this._times_), + cloneNode(this._exp2_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseATimesExp1(this); + } + + public PExp1 getExp1() + { + return this._exp1_; + } + + public void setExp1(PExp1 node) + { + if(this._exp1_ != null) + { + this._exp1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._exp1_ = node; + } + + public TTimes getTimes() + { + return this._times_; + } + + public void setTimes(TTimes node) + { + if(this._times_ != null) + { + this._times_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._times_ = node; + } + + public PExp2 getExp2() + { + return this._exp2_; + } + + public void setExp2(PExp2 node) + { + if(this._exp2_ != null) + { + this._exp2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._exp2_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._exp1_) + + toString(this._times_) + + toString(this._exp2_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._exp1_ == child) + { + this._exp1_ = null; + return; + } + + if(this._times_ == child) + { + this._times_ = null; + return; + } + + if(this._exp2_ == child) + { + this._exp2_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._exp1_ == oldChild) + { + setExp1((PExp1) newChild); + return; + } + + if(this._times_ == oldChild) + { + setTimes((TTimes) newChild); + return; + } + + if(this._exp2_ == oldChild) + { + setExp2((PExp2) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AWordOpsizeof.java b/src/nasmParser/node/AWordOpsizeof.java new file mode 100644 index 0000000..717a42b --- /dev/null +++ b/src/nasmParser/node/AWordOpsizeof.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AWordOpsizeof extends POpsizeof +{ + private TWord _word_; + + public AWordOpsizeof() + { + // Constructor + } + + public AWordOpsizeof( + @SuppressWarnings("hiding") TWord _word_) + { + // Constructor + setWord(_word_); + + } + + @Override + public Object clone() + { + return new AWordOpsizeof( + cloneNode(this._word_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAWordOpsizeof(this); + } + + public TWord getWord() + { + return this._word_; + } + + public void setWord(TWord node) + { + if(this._word_ != null) + { + this._word_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._word_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._word_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._word_ == child) + { + this._word_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._word_ == oldChild) + { + setWord((TWord) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/AXorInst.java b/src/nasmParser/node/AXorInst.java new file mode 100644 index 0000000..abda44a --- /dev/null +++ b/src/nasmParser/node/AXorInst.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class AXorInst extends PInst +{ + private POplabel _oplabel_; + private TXor _xor_; + private PAr _ar_; + private TComma _comma_; + private PAcr _acr_; + + public AXorInst() + { + // Constructor + } + + public AXorInst( + @SuppressWarnings("hiding") POplabel _oplabel_, + @SuppressWarnings("hiding") TXor _xor_, + @SuppressWarnings("hiding") PAr _ar_, + @SuppressWarnings("hiding") TComma _comma_, + @SuppressWarnings("hiding") PAcr _acr_) + { + // Constructor + setOplabel(_oplabel_); + + setXor(_xor_); + + setAr(_ar_); + + setComma(_comma_); + + setAcr(_acr_); + + } + + @Override + public Object clone() + { + return new AXorInst( + cloneNode(this._oplabel_), + cloneNode(this._xor_), + cloneNode(this._ar_), + cloneNode(this._comma_), + cloneNode(this._acr_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAXorInst(this); + } + + public POplabel getOplabel() + { + return this._oplabel_; + } + + public void setOplabel(POplabel node) + { + if(this._oplabel_ != null) + { + this._oplabel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._oplabel_ = node; + } + + public TXor getXor() + { + return this._xor_; + } + + public void setXor(TXor node) + { + if(this._xor_ != null) + { + this._xor_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._xor_ = node; + } + + public PAr getAr() + { + return this._ar_; + } + + public void setAr(PAr node) + { + if(this._ar_ != null) + { + this._ar_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ar_ = node; + } + + public TComma getComma() + { + return this._comma_; + } + + public void setComma(TComma node) + { + if(this._comma_ != null) + { + this._comma_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._comma_ = node; + } + + public PAcr getAcr() + { + return this._acr_; + } + + public void setAcr(PAcr node) + { + if(this._acr_ != null) + { + this._acr_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._acr_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._oplabel_) + + toString(this._xor_) + + toString(this._ar_) + + toString(this._comma_) + + toString(this._acr_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._oplabel_ == child) + { + this._oplabel_ = null; + return; + } + + if(this._xor_ == child) + { + this._xor_ = null; + return; + } + + if(this._ar_ == child) + { + this._ar_ = null; + return; + } + + if(this._comma_ == child) + { + this._comma_ = null; + return; + } + + if(this._acr_ == child) + { + this._acr_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._oplabel_ == oldChild) + { + setOplabel((POplabel) newChild); + return; + } + + if(this._xor_ == oldChild) + { + setXor((TXor) newChild); + return; + } + + if(this._ar_ == oldChild) + { + setAr((PAr) newChild); + return; + } + + if(this._comma_ == oldChild) + { + setComma((TComma) newChild); + return; + } + + if(this._acr_ == oldChild) + { + setAcr((PAcr) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/nasmParser/node/EOF.java b/src/nasmParser/node/EOF.java new file mode 100644 index 0000000..a3fa14b --- /dev/null +++ b/src/nasmParser/node/EOF.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.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/nasmParser/node/InvalidToken.java b/src/nasmParser/node/InvalidToken.java new file mode 100644 index 0000000..54e3f1e --- /dev/null +++ b/src/nasmParser/node/InvalidToken.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.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/nasmParser/node/Node.java b/src/nasmParser/node/Node.java new file mode 100644 index 0000000..c32d720 --- /dev/null +++ b/src/nasmParser/node/Node.java @@ -0,0 +1,78 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.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/nasmParser/node/PAcr.java b/src/nasmParser/node/PAcr.java new file mode 100644 index 0000000..d4cc80e --- /dev/null +++ b/src/nasmParser/node/PAcr.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PAcr extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PAddress.java b/src/nasmParser/node/PAddress.java new file mode 100644 index 0000000..6131d26 --- /dev/null +++ b/src/nasmParser/node/PAddress.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PAddress extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PAr.java b/src/nasmParser/node/PAr.java new file mode 100644 index 0000000..05cdb27 --- /dev/null +++ b/src/nasmParser/node/PAr.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PAr extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PConst.java b/src/nasmParser/node/PConst.java new file mode 100644 index 0000000..0f01a2e --- /dev/null +++ b/src/nasmParser/node/PConst.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PConst extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PExp.java b/src/nasmParser/node/PExp.java new file mode 100644 index 0000000..36c41e3 --- /dev/null +++ b/src/nasmParser/node/PExp.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PExp extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PExp1.java b/src/nasmParser/node/PExp1.java new file mode 100644 index 0000000..3ee36b5 --- /dev/null +++ b/src/nasmParser/node/PExp1.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PExp1 extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PExp2.java b/src/nasmParser/node/PExp2.java new file mode 100644 index 0000000..46810b6 --- /dev/null +++ b/src/nasmParser/node/PExp2.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PExp2 extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PFilename.java b/src/nasmParser/node/PFilename.java new file mode 100644 index 0000000..65d5395 --- /dev/null +++ b/src/nasmParser/node/PFilename.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PFilename extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PInclude.java b/src/nasmParser/node/PInclude.java new file mode 100644 index 0000000..16a62b4 --- /dev/null +++ b/src/nasmParser/node/PInclude.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PInclude extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PInst.java b/src/nasmParser/node/PInst.java new file mode 100644 index 0000000..9fab7ca --- /dev/null +++ b/src/nasmParser/node/PInst.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PInst extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PLabel.java b/src/nasmParser/node/PLabel.java new file mode 100644 index 0000000..50f03d5 --- /dev/null +++ b/src/nasmParser/node/PLabel.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PLabel extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PLconst.java b/src/nasmParser/node/PLconst.java new file mode 100644 index 0000000..bce1e80 --- /dev/null +++ b/src/nasmParser/node/PLconst.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PLconst extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PLglobal.java b/src/nasmParser/node/PLglobal.java new file mode 100644 index 0000000..dbd8883 --- /dev/null +++ b/src/nasmParser/node/PLglobal.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PLglobal extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PLinclude.java b/src/nasmParser/node/PLinclude.java new file mode 100644 index 0000000..b68dc0d --- /dev/null +++ b/src/nasmParser/node/PLinclude.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PLinclude extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PLinst.java b/src/nasmParser/node/PLinst.java new file mode 100644 index 0000000..88c41fe --- /dev/null +++ b/src/nasmParser/node/PLinst.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PLinst extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PLvar.java b/src/nasmParser/node/PLvar.java new file mode 100644 index 0000000..a5f6861 --- /dev/null +++ b/src/nasmParser/node/PLvar.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PLvar extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PNumconst.java b/src/nasmParser/node/PNumconst.java new file mode 100644 index 0000000..d06b2eb --- /dev/null +++ b/src/nasmParser/node/PNumconst.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PNumconst extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/POplabel.java b/src/nasmParser/node/POplabel.java new file mode 100644 index 0000000..6d9ab29 --- /dev/null +++ b/src/nasmParser/node/POplabel.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class POplabel extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/POpsizeof.java b/src/nasmParser/node/POpsizeof.java new file mode 100644 index 0000000..dd31405 --- /dev/null +++ b/src/nasmParser/node/POpsizeof.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class POpsizeof extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PProg.java b/src/nasmParser/node/PProg.java new file mode 100644 index 0000000..9f0a03b --- /dev/null +++ b/src/nasmParser/node/PProg.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PProg extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PRegister.java b/src/nasmParser/node/PRegister.java new file mode 100644 index 0000000..e0aaa65 --- /dev/null +++ b/src/nasmParser/node/PRegister.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PRegister extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PSecbss.java b/src/nasmParser/node/PSecbss.java new file mode 100644 index 0000000..3a4f567 --- /dev/null +++ b/src/nasmParser/node/PSecbss.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PSecbss extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PSecdata.java b/src/nasmParser/node/PSecdata.java new file mode 100644 index 0000000..f88fbc9 --- /dev/null +++ b/src/nasmParser/node/PSecdata.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PSecdata extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PSectext.java b/src/nasmParser/node/PSectext.java new file mode 100644 index 0000000..1690152 --- /dev/null +++ b/src/nasmParser/node/PSectext.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PSectext extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/PVar.java b/src/nasmParser/node/PVar.java new file mode 100644 index 0000000..b680a39 --- /dev/null +++ b/src/nasmParser/node/PVar.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public abstract class PVar extends Node +{ + // Empty body +} diff --git a/src/nasmParser/node/Start.java b/src/nasmParser/node/Start.java new file mode 100644 index 0000000..df9fbf6 --- /dev/null +++ b/src/nasmParser/node/Start.java @@ -0,0 +1,133 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.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/nasmParser/node/Switch.java b/src/nasmParser/node/Switch.java new file mode 100644 index 0000000..2df2c2f --- /dev/null +++ b/src/nasmParser/node/Switch.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public interface Switch +{ + // Empty body +} diff --git a/src/nasmParser/node/Switchable.java b/src/nasmParser/node/Switchable.java new file mode 100644 index 0000000..3b59efa --- /dev/null +++ b/src/nasmParser/node/Switchable.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +public interface Switchable +{ + void apply(Switch sw); +} diff --git a/src/nasmParser/node/TAdd.java b/src/nasmParser/node/TAdd.java new file mode 100644 index 0000000..e720142 --- /dev/null +++ b/src/nasmParser/node/TAdd.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TAdd extends Token +{ + public TAdd() + { + super.setText("add"); + } + + public TAdd(int line, int pos) + { + super.setText("add"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TAdd(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTAdd(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TAdd text."); + } +} diff --git a/src/nasmParser/node/TAnd.java b/src/nasmParser/node/TAnd.java new file mode 100644 index 0000000..22205a4 --- /dev/null +++ b/src/nasmParser/node/TAnd.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TAnd extends Token +{ + public TAnd() + { + super.setText("and"); + } + + public TAnd(int line, int pos) + { + super.setText("and"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TAnd(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTAnd(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TAnd text."); + } +} diff --git a/src/nasmParser/node/TBrackclose.java b/src/nasmParser/node/TBrackclose.java new file mode 100644 index 0000000..78f3f07 --- /dev/null +++ b/src/nasmParser/node/TBrackclose.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TBrackclose extends Token +{ + public TBrackclose() + { + super.setText("]"); + } + + public TBrackclose(int line, int pos) + { + super.setText("]"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TBrackclose(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTBrackclose(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TBrackclose text."); + } +} diff --git a/src/nasmParser/node/TBrackopen.java b/src/nasmParser/node/TBrackopen.java new file mode 100644 index 0000000..493e458 --- /dev/null +++ b/src/nasmParser/node/TBrackopen.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TBrackopen extends Token +{ + public TBrackopen() + { + super.setText("["); + } + + public TBrackopen(int line, int pos) + { + super.setText("["); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TBrackopen(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTBrackopen(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TBrackopen text."); + } +} diff --git a/src/nasmParser/node/TBss.java b/src/nasmParser/node/TBss.java new file mode 100644 index 0000000..cb93040 --- /dev/null +++ b/src/nasmParser/node/TBss.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TBss extends Token +{ + public TBss() + { + super.setText(".bss"); + } + + public TBss(int line, int pos) + { + super.setText(".bss"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TBss(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTBss(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TBss text."); + } +} diff --git a/src/nasmParser/node/TByte.java b/src/nasmParser/node/TByte.java new file mode 100644 index 0000000..f3a81d9 --- /dev/null +++ b/src/nasmParser/node/TByte.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TByte extends Token +{ + public TByte() + { + super.setText("byte"); + } + + public TByte(int line, int pos) + { + super.setText("byte"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TByte(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTByte(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TByte text."); + } +} diff --git a/src/nasmParser/node/TCall.java b/src/nasmParser/node/TCall.java new file mode 100644 index 0000000..f385170 --- /dev/null +++ b/src/nasmParser/node/TCall.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TCall extends Token +{ + public TCall() + { + super.setText("call"); + } + + public TCall(int line, int pos) + { + super.setText("call"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TCall(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTCall(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TCall text."); + } +} diff --git a/src/nasmParser/node/TCmp.java b/src/nasmParser/node/TCmp.java new file mode 100644 index 0000000..eab93b8 --- /dev/null +++ b/src/nasmParser/node/TCmp.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TCmp extends Token +{ + public TCmp() + { + super.setText("cmp"); + } + + public TCmp(int line, int pos) + { + super.setText("cmp"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TCmp(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTCmp(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TCmp text."); + } +} diff --git a/src/nasmParser/node/TComma.java b/src/nasmParser/node/TComma.java new file mode 100644 index 0000000..0259834 --- /dev/null +++ b/src/nasmParser/node/TComma.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TComma extends Token +{ + public TComma() + { + super.setText(","); + } + + public TComma(int line, int pos) + { + super.setText(","); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TComma(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTComma(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TComma text."); + } +} diff --git a/src/nasmParser/node/TComment.java b/src/nasmParser/node/TComment.java new file mode 100644 index 0000000..091bb97 --- /dev/null +++ b/src/nasmParser/node/TComment.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TComment extends Token +{ + public TComment(String text) + { + setText(text); + } + + public TComment(String text, int line, int pos) + { + setText(text); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TComment(getText(), getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTComment(this); + } +} diff --git a/src/nasmParser/node/TData.java b/src/nasmParser/node/TData.java new file mode 100644 index 0000000..b80008a --- /dev/null +++ b/src/nasmParser/node/TData.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TData extends Token +{ + public TData() + { + super.setText(".data"); + } + + public TData(int line, int pos) + { + super.setText(".data"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TData(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTData(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TData text."); + } +} diff --git a/src/nasmParser/node/TDefinebyte.java b/src/nasmParser/node/TDefinebyte.java new file mode 100644 index 0000000..a038bad --- /dev/null +++ b/src/nasmParser/node/TDefinebyte.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TDefinebyte extends Token +{ + public TDefinebyte() + { + super.setText("db"); + } + + public TDefinebyte(int line, int pos) + { + super.setText("db"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TDefinebyte(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTDefinebyte(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TDefinebyte text."); + } +} diff --git a/src/nasmParser/node/TDefinedoubleword.java b/src/nasmParser/node/TDefinedoubleword.java new file mode 100644 index 0000000..56674d8 --- /dev/null +++ b/src/nasmParser/node/TDefinedoubleword.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TDefinedoubleword extends Token +{ + public TDefinedoubleword() + { + super.setText("dd"); + } + + public TDefinedoubleword(int line, int pos) + { + super.setText("dd"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TDefinedoubleword(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTDefinedoubleword(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TDefinedoubleword text."); + } +} diff --git a/src/nasmParser/node/TDefinequadword.java b/src/nasmParser/node/TDefinequadword.java new file mode 100644 index 0000000..68195ac --- /dev/null +++ b/src/nasmParser/node/TDefinequadword.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TDefinequadword extends Token +{ + public TDefinequadword() + { + super.setText("dq"); + } + + public TDefinequadword(int line, int pos) + { + super.setText("dq"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TDefinequadword(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTDefinequadword(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TDefinequadword text."); + } +} diff --git a/src/nasmParser/node/TDefinetenbytes.java b/src/nasmParser/node/TDefinetenbytes.java new file mode 100644 index 0000000..0380bd2 --- /dev/null +++ b/src/nasmParser/node/TDefinetenbytes.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TDefinetenbytes extends Token +{ + public TDefinetenbytes() + { + super.setText("dt"); + } + + public TDefinetenbytes(int line, int pos) + { + super.setText("dt"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TDefinetenbytes(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTDefinetenbytes(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TDefinetenbytes text."); + } +} diff --git a/src/nasmParser/node/TDefineword.java b/src/nasmParser/node/TDefineword.java new file mode 100644 index 0000000..b8029fd --- /dev/null +++ b/src/nasmParser/node/TDefineword.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TDefineword extends Token +{ + public TDefineword() + { + super.setText("dw"); + } + + public TDefineword(int line, int pos) + { + super.setText("dw"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TDefineword(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTDefineword(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TDefineword text."); + } +} diff --git a/src/nasmParser/node/TDot.java b/src/nasmParser/node/TDot.java new file mode 100644 index 0000000..0d7b580 --- /dev/null +++ b/src/nasmParser/node/TDot.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TDot extends Token +{ + public TDot() + { + super.setText("."); + } + + public TDot(int line, int pos) + { + super.setText("."); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TDot(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTDot(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TDot text."); + } +} diff --git a/src/nasmParser/node/TDword.java b/src/nasmParser/node/TDword.java new file mode 100644 index 0000000..395bd81 --- /dev/null +++ b/src/nasmParser/node/TDword.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TDword extends Token +{ + public TDword() + { + super.setText("dword"); + } + + public TDword(int line, int pos) + { + super.setText("dword"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TDword(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTDword(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TDword text."); + } +} diff --git a/src/nasmParser/node/TEax.java b/src/nasmParser/node/TEax.java new file mode 100644 index 0000000..3f0280a --- /dev/null +++ b/src/nasmParser/node/TEax.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TEax extends Token +{ + public TEax() + { + super.setText("eax"); + } + + public TEax(int line, int pos) + { + super.setText("eax"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TEax(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTEax(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TEax text."); + } +} diff --git a/src/nasmParser/node/TEbp.java b/src/nasmParser/node/TEbp.java new file mode 100644 index 0000000..4e9fa09 --- /dev/null +++ b/src/nasmParser/node/TEbp.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TEbp extends Token +{ + public TEbp() + { + super.setText("ebp"); + } + + public TEbp(int line, int pos) + { + super.setText("ebp"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TEbp(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTEbp(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TEbp text."); + } +} diff --git a/src/nasmParser/node/TEbx.java b/src/nasmParser/node/TEbx.java new file mode 100644 index 0000000..2282055 --- /dev/null +++ b/src/nasmParser/node/TEbx.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TEbx extends Token +{ + public TEbx() + { + super.setText("ebx"); + } + + public TEbx(int line, int pos) + { + super.setText("ebx"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TEbx(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTEbx(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TEbx text."); + } +} diff --git a/src/nasmParser/node/TEcx.java b/src/nasmParser/node/TEcx.java new file mode 100644 index 0000000..56d44c9 --- /dev/null +++ b/src/nasmParser/node/TEcx.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TEcx extends Token +{ + public TEcx() + { + super.setText("ecx"); + } + + public TEcx(int line, int pos) + { + super.setText("ecx"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TEcx(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTEcx(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TEcx text."); + } +} diff --git a/src/nasmParser/node/TEdx.java b/src/nasmParser/node/TEdx.java new file mode 100644 index 0000000..d288d8b --- /dev/null +++ b/src/nasmParser/node/TEdx.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TEdx extends Token +{ + public TEdx() + { + super.setText("edx"); + } + + public TEdx(int line, int pos) + { + super.setText("edx"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TEdx(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTEdx(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TEdx text."); + } +} diff --git a/src/nasmParser/node/TEsp.java b/src/nasmParser/node/TEsp.java new file mode 100644 index 0000000..4ade5cf --- /dev/null +++ b/src/nasmParser/node/TEsp.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TEsp extends Token +{ + public TEsp() + { + super.setText("esp"); + } + + public TEsp(int line, int pos) + { + super.setText("esp"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TEsp(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTEsp(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TEsp text."); + } +} diff --git a/src/nasmParser/node/TGlobal.java b/src/nasmParser/node/TGlobal.java new file mode 100644 index 0000000..7e3e6ab --- /dev/null +++ b/src/nasmParser/node/TGlobal.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TGlobal extends Token +{ + public TGlobal() + { + super.setText("global"); + } + + public TGlobal(int line, int pos) + { + super.setText("global"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TGlobal(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTGlobal(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TGlobal text."); + } +} diff --git a/src/nasmParser/node/TId.java b/src/nasmParser/node/TId.java new file mode 100644 index 0000000..fe5be2c --- /dev/null +++ b/src/nasmParser/node/TId.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.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/nasmParser/node/TIdiv.java b/src/nasmParser/node/TIdiv.java new file mode 100644 index 0000000..94b2e2b --- /dev/null +++ b/src/nasmParser/node/TIdiv.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TIdiv extends Token +{ + public TIdiv() + { + super.setText("idiv"); + } + + public TIdiv(int line, int pos) + { + super.setText("idiv"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TIdiv(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTIdiv(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TIdiv text."); + } +} diff --git a/src/nasmParser/node/TImul.java b/src/nasmParser/node/TImul.java new file mode 100644 index 0000000..2ed0346 --- /dev/null +++ b/src/nasmParser/node/TImul.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TImul extends Token +{ + public TImul() + { + super.setText("imul"); + } + + public TImul(int line, int pos) + { + super.setText("imul"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TImul(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTImul(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TImul text."); + } +} diff --git a/src/nasmParser/node/TInc.java b/src/nasmParser/node/TInc.java new file mode 100644 index 0000000..c8e496b --- /dev/null +++ b/src/nasmParser/node/TInc.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TInc extends Token +{ + public TInc() + { + super.setText("include"); + } + + public TInc(int line, int pos) + { + super.setText("include"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TInc(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTInc(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TInc text."); + } +} diff --git a/src/nasmParser/node/TInt.java b/src/nasmParser/node/TInt.java new file mode 100644 index 0000000..925eb17 --- /dev/null +++ b/src/nasmParser/node/TInt.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TInt extends Token +{ + public TInt() + { + super.setText("int 0x80"); + } + + public TInt(int line, int pos) + { + super.setText("int 0x80"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TInt(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTInt(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TInt text."); + } +} diff --git a/src/nasmParser/node/TJe.java b/src/nasmParser/node/TJe.java new file mode 100644 index 0000000..6030fa1 --- /dev/null +++ b/src/nasmParser/node/TJe.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TJe extends Token +{ + public TJe() + { + super.setText("je"); + } + + public TJe(int line, int pos) + { + super.setText("je"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TJe(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTJe(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TJe text."); + } +} diff --git a/src/nasmParser/node/TJg.java b/src/nasmParser/node/TJg.java new file mode 100644 index 0000000..838ea7b --- /dev/null +++ b/src/nasmParser/node/TJg.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TJg extends Token +{ + public TJg() + { + super.setText("jg"); + } + + public TJg(int line, int pos) + { + super.setText("jg"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TJg(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTJg(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TJg text."); + } +} diff --git a/src/nasmParser/node/TJge.java b/src/nasmParser/node/TJge.java new file mode 100644 index 0000000..d44afe6 --- /dev/null +++ b/src/nasmParser/node/TJge.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TJge extends Token +{ + public TJge() + { + super.setText("jge"); + } + + public TJge(int line, int pos) + { + super.setText("jge"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TJge(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTJge(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TJge text."); + } +} diff --git a/src/nasmParser/node/TJl.java b/src/nasmParser/node/TJl.java new file mode 100644 index 0000000..3e0df33 --- /dev/null +++ b/src/nasmParser/node/TJl.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TJl extends Token +{ + public TJl() + { + super.setText("jl"); + } + + public TJl(int line, int pos) + { + super.setText("jl"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TJl(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTJl(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TJl text."); + } +} diff --git a/src/nasmParser/node/TJle.java b/src/nasmParser/node/TJle.java new file mode 100644 index 0000000..046605d --- /dev/null +++ b/src/nasmParser/node/TJle.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TJle extends Token +{ + public TJle() + { + super.setText("jle"); + } + + public TJle(int line, int pos) + { + super.setText("jle"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TJle(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTJle(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TJle text."); + } +} diff --git a/src/nasmParser/node/TJmp.java b/src/nasmParser/node/TJmp.java new file mode 100644 index 0000000..24b6428 --- /dev/null +++ b/src/nasmParser/node/TJmp.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TJmp extends Token +{ + public TJmp() + { + super.setText("jmp"); + } + + public TJmp(int line, int pos) + { + super.setText("jmp"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TJmp(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTJmp(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TJmp text."); + } +} diff --git a/src/nasmParser/node/TJne.java b/src/nasmParser/node/TJne.java new file mode 100644 index 0000000..f0ffc6c --- /dev/null +++ b/src/nasmParser/node/TJne.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TJne extends Token +{ + public TJne() + { + super.setText("jne"); + } + + public TJne(int line, int pos) + { + super.setText("jne"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TJne(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTJne(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TJne text."); + } +} diff --git a/src/nasmParser/node/TMinus.java b/src/nasmParser/node/TMinus.java new file mode 100644 index 0000000..6a5c894 --- /dev/null +++ b/src/nasmParser/node/TMinus.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TMinus extends Token +{ + public TMinus() + { + super.setText("-"); + } + + public TMinus(int line, int pos) + { + super.setText("-"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TMinus(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTMinus(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TMinus text."); + } +} diff --git a/src/nasmParser/node/TMov.java b/src/nasmParser/node/TMov.java new file mode 100644 index 0000000..aa84bf8 --- /dev/null +++ b/src/nasmParser/node/TMov.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TMov extends Token +{ + public TMov() + { + super.setText("mov"); + } + + public TMov(int line, int pos) + { + super.setText("mov"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TMov(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTMov(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TMov text."); + } +} diff --git a/src/nasmParser/node/TNot.java b/src/nasmParser/node/TNot.java new file mode 100644 index 0000000..e79eadf --- /dev/null +++ b/src/nasmParser/node/TNot.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TNot extends Token +{ + public TNot() + { + super.setText("not"); + } + + public TNot(int line, int pos) + { + super.setText("not"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TNot(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTNot(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TNot text."); + } +} diff --git a/src/nasmParser/node/TNumber.java b/src/nasmParser/node/TNumber.java new file mode 100644 index 0000000..cebbf8b --- /dev/null +++ b/src/nasmParser/node/TNumber.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TNumber extends Token +{ + public TNumber(String text) + { + setText(text); + } + + public TNumber(String text, int line, int pos) + { + setText(text); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TNumber(getText(), getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTNumber(this); + } +} diff --git a/src/nasmParser/node/TOr.java b/src/nasmParser/node/TOr.java new file mode 100644 index 0000000..6d550fa --- /dev/null +++ b/src/nasmParser/node/TOr.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TOr extends Token +{ + public TOr() + { + super.setText("or"); + } + + public TOr(int line, int pos) + { + super.setText("or"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TOr(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTOr(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TOr text."); + } +} diff --git a/src/nasmParser/node/TPercentage.java b/src/nasmParser/node/TPercentage.java new file mode 100644 index 0000000..11e641a --- /dev/null +++ b/src/nasmParser/node/TPercentage.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TPercentage extends Token +{ + public TPercentage() + { + super.setText("%"); + } + + public TPercentage(int line, int pos) + { + super.setText("%"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TPercentage(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTPercentage(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TPercentage text."); + } +} diff --git a/src/nasmParser/node/TPlus.java b/src/nasmParser/node/TPlus.java new file mode 100644 index 0000000..5123ee7 --- /dev/null +++ b/src/nasmParser/node/TPlus.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.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/nasmParser/node/TPop.java b/src/nasmParser/node/TPop.java new file mode 100644 index 0000000..b731bc1 --- /dev/null +++ b/src/nasmParser/node/TPop.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TPop extends Token +{ + public TPop() + { + super.setText("pop"); + } + + public TPop(int line, int pos) + { + super.setText("pop"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TPop(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTPop(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TPop text."); + } +} diff --git a/src/nasmParser/node/TPrefixRegister.java b/src/nasmParser/node/TPrefixRegister.java new file mode 100644 index 0000000..36d8cd3 --- /dev/null +++ b/src/nasmParser/node/TPrefixRegister.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TPrefixRegister extends Token +{ + public TPrefixRegister() + { + super.setText("@"); + } + + public TPrefixRegister(int line, int pos) + { + super.setText("@"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TPrefixRegister(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTPrefixRegister(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TPrefixRegister text."); + } +} diff --git a/src/nasmParser/node/TPush.java b/src/nasmParser/node/TPush.java new file mode 100644 index 0000000..6aa4c4c --- /dev/null +++ b/src/nasmParser/node/TPush.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TPush extends Token +{ + public TPush() + { + super.setText("push"); + } + + public TPush(int line, int pos) + { + super.setText("push"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TPush(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTPush(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TPush text."); + } +} diff --git a/src/nasmParser/node/TQuote.java b/src/nasmParser/node/TQuote.java new file mode 100644 index 0000000..4ce1088 --- /dev/null +++ b/src/nasmParser/node/TQuote.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TQuote extends Token +{ + public TQuote() + { + super.setText("\'"); + } + + public TQuote(int line, int pos) + { + super.setText("\'"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TQuote(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTQuote(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TQuote text."); + } +} diff --git a/src/nasmParser/node/TReservebyte.java b/src/nasmParser/node/TReservebyte.java new file mode 100644 index 0000000..202db66 --- /dev/null +++ b/src/nasmParser/node/TReservebyte.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TReservebyte extends Token +{ + public TReservebyte() + { + super.setText("resb"); + } + + public TReservebyte(int line, int pos) + { + super.setText("resb"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TReservebyte(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTReservebyte(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TReservebyte text."); + } +} diff --git a/src/nasmParser/node/TReservedoubleword.java b/src/nasmParser/node/TReservedoubleword.java new file mode 100644 index 0000000..c4a922d --- /dev/null +++ b/src/nasmParser/node/TReservedoubleword.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TReservedoubleword extends Token +{ + public TReservedoubleword() + { + super.setText("resd"); + } + + public TReservedoubleword(int line, int pos) + { + super.setText("resd"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TReservedoubleword(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTReservedoubleword(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TReservedoubleword text."); + } +} diff --git a/src/nasmParser/node/TReservequadword.java b/src/nasmParser/node/TReservequadword.java new file mode 100644 index 0000000..7d52a5b --- /dev/null +++ b/src/nasmParser/node/TReservequadword.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TReservequadword extends Token +{ + public TReservequadword() + { + super.setText("resq"); + } + + public TReservequadword(int line, int pos) + { + super.setText("resq"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TReservequadword(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTReservequadword(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TReservequadword text."); + } +} diff --git a/src/nasmParser/node/TReservetenbytes.java b/src/nasmParser/node/TReservetenbytes.java new file mode 100644 index 0000000..9ff74bd --- /dev/null +++ b/src/nasmParser/node/TReservetenbytes.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TReservetenbytes extends Token +{ + public TReservetenbytes() + { + super.setText("rest"); + } + + public TReservetenbytes(int line, int pos) + { + super.setText("rest"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TReservetenbytes(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTReservetenbytes(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TReservetenbytes text."); + } +} diff --git a/src/nasmParser/node/TReserveword.java b/src/nasmParser/node/TReserveword.java new file mode 100644 index 0000000..1d424f9 --- /dev/null +++ b/src/nasmParser/node/TReserveword.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TReserveword extends Token +{ + public TReserveword() + { + super.setText("resw"); + } + + public TReserveword(int line, int pos) + { + super.setText("resw"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TReserveword(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTReserveword(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TReserveword text."); + } +} diff --git a/src/nasmParser/node/TRet.java b/src/nasmParser/node/TRet.java new file mode 100644 index 0000000..3b3fa2a --- /dev/null +++ b/src/nasmParser/node/TRet.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TRet extends Token +{ + public TRet() + { + super.setText("ret"); + } + + public TRet(int line, int pos) + { + super.setText("ret"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TRet(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTRet(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TRet text."); + } +} diff --git a/src/nasmParser/node/TSection.java b/src/nasmParser/node/TSection.java new file mode 100644 index 0000000..9ed383f --- /dev/null +++ b/src/nasmParser/node/TSection.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSection extends Token +{ + public TSection() + { + super.setText("section"); + } + + public TSection(int line, int pos) + { + super.setText("section"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSection(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSection(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSection text."); + } +} diff --git a/src/nasmParser/node/TSemicol.java b/src/nasmParser/node/TSemicol.java new file mode 100644 index 0000000..5bd45e2 --- /dev/null +++ b/src/nasmParser/node/TSemicol.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSemicol extends Token +{ + public TSemicol() + { + super.setText(":"); + } + + public TSemicol(int line, int pos) + { + super.setText(":"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSemicol(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSemicol(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSemicol text."); + } +} diff --git a/src/nasmParser/node/TSpaces.java b/src/nasmParser/node/TSpaces.java new file mode 100644 index 0000000..8ba36d5 --- /dev/null +++ b/src/nasmParser/node/TSpaces.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSpaces extends Token +{ + public TSpaces(String text) + { + setText(text); + } + + public TSpaces(String text, int line, int pos) + { + setText(text); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSpaces(getText(), getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSpaces(this); + } +} diff --git a/src/nasmParser/node/TSub.java b/src/nasmParser/node/TSub.java new file mode 100644 index 0000000..341460a --- /dev/null +++ b/src/nasmParser/node/TSub.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSub extends Token +{ + public TSub() + { + super.setText("sub"); + } + + public TSub(int line, int pos) + { + super.setText("sub"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSub(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSub(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSub text."); + } +} diff --git a/src/nasmParser/node/TText.java b/src/nasmParser/node/TText.java new file mode 100644 index 0000000..41a27a5 --- /dev/null +++ b/src/nasmParser/node/TText.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TText extends Token +{ + public TText() + { + super.setText(".text"); + } + + public TText(int line, int pos) + { + super.setText(".text"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TText(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTText(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TText text."); + } +} diff --git a/src/nasmParser/node/TTimes.java b/src/nasmParser/node/TTimes.java new file mode 100644 index 0000000..7f026a0 --- /dev/null +++ b/src/nasmParser/node/TTimes.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TTimes extends Token +{ + public TTimes() + { + super.setText("*"); + } + + public TTimes(int line, int pos) + { + super.setText("*"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TTimes(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTTimes(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TTimes text."); + } +} diff --git a/src/nasmParser/node/TWord.java b/src/nasmParser/node/TWord.java new file mode 100644 index 0000000..cfbc4c3 --- /dev/null +++ b/src/nasmParser/node/TWord.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TWord extends Token +{ + public TWord() + { + super.setText("word"); + } + + public TWord(int line, int pos) + { + super.setText("word"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TWord(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTWord(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TWord text."); + } +} diff --git a/src/nasmParser/node/TXor.java b/src/nasmParser/node/TXor.java new file mode 100644 index 0000000..7b1d4a5 --- /dev/null +++ b/src/nasmParser/node/TXor.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.node; + +import nasmParser.analysis.*; + +@SuppressWarnings("nls") +public final class TXor extends Token +{ + public TXor() + { + super.setText("xor"); + } + + public TXor(int line, int pos) + { + super.setText("xor"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TXor(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTXor(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TXor text."); + } +} diff --git a/src/nasmParser/node/Token.java b/src/nasmParser/node/Token.java new file mode 100644 index 0000000..a80802f --- /dev/null +++ b/src/nasmParser/node/Token.java @@ -0,0 +1,59 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package nasmParser.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/saParser/analysis/Analysis.java b/src/saParser/analysis/Analysis.java new file mode 100644 index 0000000..3e31ebf --- /dev/null +++ b/src/saParser/analysis/Analysis.java @@ -0,0 +1,105 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.analysis; + +import saParser.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 caseAAddExp(AAddExp node); + void caseAAndExp(AAndExp node); + void caseADivExp(ADivExp node); + void caseAEqualExp(AEqualExp node); + void caseAInfExp(AInfExp node); + void caseAMultExp(AMultExp node); + void caseAOrExp(AOrExp node); + void caseASubExp(ASubExp node); + void caseANotExp(ANotExp node); + void caseAAppelExp(AAppelExp node); + void caseAVarExp(AVarExp node); + void caseAFauxExp(AFauxExp node); + void caseAVraiExp(AVraiExp node); + void caseAIntExp(AIntExp node); + void caseALireExp(ALireExp node); + void caseAAffectInst(AAffectInst node); + void caseABlocInst(ABlocInst node); + void caseAEcritureInst(AEcritureInst node); + void caseARetourInst(ARetourInst node); + void caseASiInst(ASiInst node); + void caseASi2Inst(ASi2Inst node); + void caseATantqueInst(ATantqueInst node); + void caseAAppelInst(AAppelInst node); + void caseARecLdecfonc(ARecLdecfonc node); + void caseAFinLdecfonc(AFinLdecfonc node); + void caseARecLdecvar(ARecLdecvar node); + void caseAFinLdecvar(AFinLdecvar node); + void caseARecLexp(ARecLexp node); + void caseAFinLexp(AFinLexp node); + void caseARecLinst(ARecLinst node); + void caseAFinLinst(AFinLinst node); + void caseADecfonc(ADecfonc node); + void caseATabDecvar(ATabDecvar node); + void caseASimpleDecvar(ASimpleDecvar node); + void caseAIndiceeVar(AIndiceeVar node); + void caseASimpleVar(ASimpleVar node); + void caseAAppel(AAppel node); + void caseAEntierType(AEntierType node); + void caseABoolType(ABoolType node); + void caseANullType(ANullType node); + + void caseTEspaces(TEspaces node); + void caseTCommentaire(TCommentaire node); + void caseTPo(TPo node); + void caseTPf(TPf node); + void caseTSaappel(TSaappel node); + void caseTSadecfonc(TSadecfonc node); + void caseTSadectab(TSadectab node); + void caseTSadecvar(TSadecvar node); + void caseTSadecvarsimple(TSadecvarsimple node); + void caseTSaexpadd(TSaexpadd node); + void caseTSaexpand(TSaexpand node); + void caseTSaexpappel(TSaexpappel node); + void caseTSaexpdiv(TSaexpdiv node); + void caseTSaexpequal(TSaexpequal node); + void caseTSaexpfaux(TSaexpfaux node); + void caseTSaexpinf(TSaexpinf node); + void caseTSaexpint(TSaexpint node); + void caseTSaexplire(TSaexplire node); + void caseTSaexpmult(TSaexpmult node); + void caseTSaexpnot(TSaexpnot node); + void caseTSaexpor(TSaexpor node); + void caseTSaexpsub(TSaexpsub node); + void caseTSaexpvar(TSaexpvar node); + void caseTSaexpvrai(TSaexpvrai node); + void caseTSainstaffect(TSainstaffect node); + void caseTSainstbloc(TSainstbloc node); + void caseTSainstecriture(TSainstecriture node); + void caseTSainstretour(TSainstretour node); + void caseTSainstsi(TSainstsi node); + void caseTSainsttantque(TSainsttantque node); + void caseTSaldecfonc(TSaldecfonc node); + void caseTSaldecvar(TSaldecvar node); + void caseTSalexp(TSalexp node); + void caseTSalinst(TSalinst node); + void caseTSaprog(TSaprog node); + void caseTSavarindicee(TSavarindicee node); + void caseTSavarsimple(TSavarsimple node); + void caseTFaux(TFaux node); + void caseTVrai(TVrai node); + void caseTLire(TLire node); + void caseTNull(TNull node); + void caseTEntier(TEntier node); + void caseTBool(TBool node); + void caseTNul(TNul node); + void caseTInteger(TInteger node); + void caseTId(TId node); + void caseEOF(EOF node); + void caseInvalidToken(InvalidToken node); +} diff --git a/src/saParser/analysis/AnalysisAdapter.java b/src/saParser/analysis/AnalysisAdapter.java new file mode 100644 index 0000000..2d1be4a --- /dev/null +++ b/src/saParser/analysis/AnalysisAdapter.java @@ -0,0 +1,615 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.analysis; + +import java.util.*; +import saParser.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 caseAAddExp(AAddExp node) + { + defaultCase(node); + } + + @Override + public void caseAAndExp(AAndExp node) + { + defaultCase(node); + } + + @Override + public void caseADivExp(ADivExp node) + { + defaultCase(node); + } + + @Override + public void caseAEqualExp(AEqualExp node) + { + defaultCase(node); + } + + @Override + public void caseAInfExp(AInfExp node) + { + defaultCase(node); + } + + @Override + public void caseAMultExp(AMultExp node) + { + defaultCase(node); + } + + @Override + public void caseAOrExp(AOrExp node) + { + defaultCase(node); + } + + @Override + public void caseASubExp(ASubExp node) + { + defaultCase(node); + } + + @Override + public void caseANotExp(ANotExp node) + { + defaultCase(node); + } + + @Override + public void caseAAppelExp(AAppelExp node) + { + defaultCase(node); + } + + @Override + public void caseAVarExp(AVarExp node) + { + defaultCase(node); + } + + @Override + public void caseAFauxExp(AFauxExp node) + { + defaultCase(node); + } + + @Override + public void caseAVraiExp(AVraiExp node) + { + defaultCase(node); + } + + @Override + public void caseAIntExp(AIntExp node) + { + defaultCase(node); + } + + @Override + public void caseALireExp(ALireExp node) + { + defaultCase(node); + } + + @Override + public void caseAAffectInst(AAffectInst node) + { + defaultCase(node); + } + + @Override + public void caseABlocInst(ABlocInst node) + { + defaultCase(node); + } + + @Override + public void caseAEcritureInst(AEcritureInst node) + { + defaultCase(node); + } + + @Override + public void caseARetourInst(ARetourInst node) + { + defaultCase(node); + } + + @Override + public void caseASiInst(ASiInst node) + { + defaultCase(node); + } + + @Override + public void caseASi2Inst(ASi2Inst node) + { + defaultCase(node); + } + + @Override + public void caseATantqueInst(ATantqueInst node) + { + defaultCase(node); + } + + @Override + public void caseAAppelInst(AAppelInst node) + { + defaultCase(node); + } + + @Override + public void caseARecLdecfonc(ARecLdecfonc node) + { + defaultCase(node); + } + + @Override + public void caseAFinLdecfonc(AFinLdecfonc node) + { + defaultCase(node); + } + + @Override + public void caseARecLdecvar(ARecLdecvar node) + { + defaultCase(node); + } + + @Override + public void caseAFinLdecvar(AFinLdecvar node) + { + defaultCase(node); + } + + @Override + public void caseARecLexp(ARecLexp node) + { + defaultCase(node); + } + + @Override + public void caseAFinLexp(AFinLexp node) + { + defaultCase(node); + } + + @Override + public void caseARecLinst(ARecLinst node) + { + defaultCase(node); + } + + @Override + public void caseAFinLinst(AFinLinst node) + { + defaultCase(node); + } + + @Override + public void caseADecfonc(ADecfonc node) + { + defaultCase(node); + } + + @Override + public void caseATabDecvar(ATabDecvar node) + { + defaultCase(node); + } + + @Override + public void caseASimpleDecvar(ASimpleDecvar node) + { + defaultCase(node); + } + + @Override + public void caseAIndiceeVar(AIndiceeVar node) + { + defaultCase(node); + } + + @Override + public void caseASimpleVar(ASimpleVar node) + { + defaultCase(node); + } + + @Override + public void caseAAppel(AAppel node) + { + defaultCase(node); + } + + @Override + public void caseAEntierType(AEntierType node) + { + defaultCase(node); + } + + @Override + public void caseABoolType(ABoolType node) + { + defaultCase(node); + } + + @Override + public void caseANullType(ANullType node) + { + defaultCase(node); + } + + @Override + public void caseTEspaces(TEspaces node) + { + defaultCase(node); + } + + @Override + public void caseTCommentaire(TCommentaire node) + { + defaultCase(node); + } + + @Override + public void caseTPo(TPo node) + { + defaultCase(node); + } + + @Override + public void caseTPf(TPf node) + { + defaultCase(node); + } + + @Override + public void caseTSaappel(TSaappel node) + { + defaultCase(node); + } + + @Override + public void caseTSadecfonc(TSadecfonc node) + { + defaultCase(node); + } + + @Override + public void caseTSadectab(TSadectab node) + { + defaultCase(node); + } + + @Override + public void caseTSadecvar(TSadecvar node) + { + defaultCase(node); + } + + @Override + public void caseTSadecvarsimple(TSadecvarsimple node) + { + defaultCase(node); + } + + @Override + public void caseTSaexpadd(TSaexpadd node) + { + defaultCase(node); + } + + @Override + public void caseTSaexpand(TSaexpand node) + { + defaultCase(node); + } + + @Override + public void caseTSaexpappel(TSaexpappel node) + { + defaultCase(node); + } + + @Override + public void caseTSaexpdiv(TSaexpdiv node) + { + defaultCase(node); + } + + @Override + public void caseTSaexpequal(TSaexpequal node) + { + defaultCase(node); + } + + @Override + public void caseTSaexpfaux(TSaexpfaux node) + { + defaultCase(node); + } + + @Override + public void caseTSaexpinf(TSaexpinf node) + { + defaultCase(node); + } + + @Override + public void caseTSaexpint(TSaexpint node) + { + defaultCase(node); + } + + @Override + public void caseTSaexplire(TSaexplire node) + { + defaultCase(node); + } + + @Override + public void caseTSaexpmult(TSaexpmult node) + { + defaultCase(node); + } + + @Override + public void caseTSaexpnot(TSaexpnot node) + { + defaultCase(node); + } + + @Override + public void caseTSaexpor(TSaexpor node) + { + defaultCase(node); + } + + @Override + public void caseTSaexpsub(TSaexpsub node) + { + defaultCase(node); + } + + @Override + public void caseTSaexpvar(TSaexpvar node) + { + defaultCase(node); + } + + @Override + public void caseTSaexpvrai(TSaexpvrai node) + { + defaultCase(node); + } + + @Override + public void caseTSainstaffect(TSainstaffect node) + { + defaultCase(node); + } + + @Override + public void caseTSainstbloc(TSainstbloc node) + { + defaultCase(node); + } + + @Override + public void caseTSainstecriture(TSainstecriture node) + { + defaultCase(node); + } + + @Override + public void caseTSainstretour(TSainstretour node) + { + defaultCase(node); + } + + @Override + public void caseTSainstsi(TSainstsi node) + { + defaultCase(node); + } + + @Override + public void caseTSainsttantque(TSainsttantque node) + { + defaultCase(node); + } + + @Override + public void caseTSaldecfonc(TSaldecfonc node) + { + defaultCase(node); + } + + @Override + public void caseTSaldecvar(TSaldecvar node) + { + defaultCase(node); + } + + @Override + public void caseTSalexp(TSalexp node) + { + defaultCase(node); + } + + @Override + public void caseTSalinst(TSalinst node) + { + defaultCase(node); + } + + @Override + public void caseTSaprog(TSaprog node) + { + defaultCase(node); + } + + @Override + public void caseTSavarindicee(TSavarindicee node) + { + defaultCase(node); + } + + @Override + public void caseTSavarsimple(TSavarsimple node) + { + defaultCase(node); + } + + @Override + public void caseTFaux(TFaux node) + { + defaultCase(node); + } + + @Override + public void caseTVrai(TVrai node) + { + defaultCase(node); + } + + @Override + public void caseTLire(TLire node) + { + defaultCase(node); + } + + @Override + public void caseTNull(TNull node) + { + defaultCase(node); + } + + @Override + public void caseTEntier(TEntier node) + { + defaultCase(node); + } + + @Override + public void caseTBool(TBool node) + { + defaultCase(node); + } + + @Override + public void caseTNul(TNul node) + { + defaultCase(node); + } + + @Override + public void caseTInteger(TInteger 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/saParser/analysis/DepthFirstAdapter.java b/src/saParser/analysis/DepthFirstAdapter.java new file mode 100644 index 0000000..80c2ee4 --- /dev/null +++ b/src/saParser/analysis/DepthFirstAdapter.java @@ -0,0 +1,1359 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.analysis; + +import java.util.*; +import saParser.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.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSaprog() != null) + { + node.getSaprog().apply(this); + } + if(node.getLdecvar() != null) + { + node.getLdecvar().apply(this); + } + if(node.getLdecfonc() != null) + { + node.getLdecfonc().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outAProg(node); + } + + public void inAAddExp(AAddExp node) + { + defaultIn(node); + } + + public void outAAddExp(AAddExp node) + { + defaultOut(node); + } + + @Override + public void caseAAddExp(AAddExp node) + { + inAAddExp(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSaexpadd() != null) + { + node.getSaexpadd().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outAAddExp(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.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSaexpand() != null) + { + node.getSaexpand().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outAAndExp(node); + } + + public void inADivExp(ADivExp node) + { + defaultIn(node); + } + + public void outADivExp(ADivExp node) + { + defaultOut(node); + } + + @Override + public void caseADivExp(ADivExp node) + { + inADivExp(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSaexpdiv() != null) + { + node.getSaexpdiv().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outADivExp(node); + } + + public void inAEqualExp(AEqualExp node) + { + defaultIn(node); + } + + public void outAEqualExp(AEqualExp node) + { + defaultOut(node); + } + + @Override + public void caseAEqualExp(AEqualExp node) + { + inAEqualExp(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSaexpequal() != null) + { + node.getSaexpequal().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outAEqualExp(node); + } + + public void inAInfExp(AInfExp node) + { + defaultIn(node); + } + + public void outAInfExp(AInfExp node) + { + defaultOut(node); + } + + @Override + public void caseAInfExp(AInfExp node) + { + inAInfExp(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSaexpinf() != null) + { + node.getSaexpinf().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outAInfExp(node); + } + + public void inAMultExp(AMultExp node) + { + defaultIn(node); + } + + public void outAMultExp(AMultExp node) + { + defaultOut(node); + } + + @Override + public void caseAMultExp(AMultExp node) + { + inAMultExp(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSaexpmult() != null) + { + node.getSaexpmult().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outAMultExp(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.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSaexpor() != null) + { + node.getSaexpor().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outAOrExp(node); + } + + public void inASubExp(ASubExp node) + { + defaultIn(node); + } + + public void outASubExp(ASubExp node) + { + defaultOut(node); + } + + @Override + public void caseASubExp(ASubExp node) + { + inASubExp(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSaexpsub() != null) + { + node.getSaexpsub().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outASubExp(node); + } + + public void inANotExp(ANotExp node) + { + defaultIn(node); + } + + public void outANotExp(ANotExp node) + { + defaultOut(node); + } + + @Override + public void caseANotExp(ANotExp node) + { + inANotExp(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSaexpnot() != null) + { + node.getSaexpnot().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outANotExp(node); + } + + public void inAAppelExp(AAppelExp node) + { + defaultIn(node); + } + + public void outAAppelExp(AAppelExp node) + { + defaultOut(node); + } + + @Override + public void caseAAppelExp(AAppelExp node) + { + inAAppelExp(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSaexpappel() != null) + { + node.getSaexpappel().apply(this); + } + if(node.getAppel() != null) + { + node.getAppel().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outAAppelExp(node); + } + + public void inAVarExp(AVarExp node) + { + defaultIn(node); + } + + public void outAVarExp(AVarExp node) + { + defaultOut(node); + } + + @Override + public void caseAVarExp(AVarExp node) + { + inAVarExp(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSaexpvar() != null) + { + node.getSaexpvar().apply(this); + } + if(node.getVar() != null) + { + node.getVar().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outAVarExp(node); + } + + public void inAFauxExp(AFauxExp node) + { + defaultIn(node); + } + + public void outAFauxExp(AFauxExp node) + { + defaultOut(node); + } + + @Override + public void caseAFauxExp(AFauxExp node) + { + inAFauxExp(node); + if(node.getFaux() != null) + { + node.getFaux().apply(this); + } + outAFauxExp(node); + } + + public void inAVraiExp(AVraiExp node) + { + defaultIn(node); + } + + public void outAVraiExp(AVraiExp node) + { + defaultOut(node); + } + + @Override + public void caseAVraiExp(AVraiExp node) + { + inAVraiExp(node); + if(node.getVrai() != null) + { + node.getVrai().apply(this); + } + outAVraiExp(node); + } + + public void inAIntExp(AIntExp node) + { + defaultIn(node); + } + + public void outAIntExp(AIntExp node) + { + defaultOut(node); + } + + @Override + public void caseAIntExp(AIntExp node) + { + inAIntExp(node); + if(node.getInteger() != null) + { + node.getInteger().apply(this); + } + outAIntExp(node); + } + + public void inALireExp(ALireExp node) + { + defaultIn(node); + } + + public void outALireExp(ALireExp node) + { + defaultOut(node); + } + + @Override + public void caseALireExp(ALireExp node) + { + inALireExp(node); + if(node.getLire() != null) + { + node.getLire().apply(this); + } + outALireExp(node); + } + + public void inAAffectInst(AAffectInst node) + { + defaultIn(node); + } + + public void outAAffectInst(AAffectInst node) + { + defaultOut(node); + } + + @Override + public void caseAAffectInst(AAffectInst node) + { + inAAffectInst(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSainstaffect() != null) + { + node.getSainstaffect().apply(this); + } + if(node.getVar() != null) + { + node.getVar().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outAAffectInst(node); + } + + public void inABlocInst(ABlocInst node) + { + defaultIn(node); + } + + public void outABlocInst(ABlocInst node) + { + defaultOut(node); + } + + @Override + public void caseABlocInst(ABlocInst node) + { + inABlocInst(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSainstbloc() != null) + { + node.getSainstbloc().apply(this); + } + if(node.getLinst() != null) + { + node.getLinst().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outABlocInst(node); + } + + public void inAEcritureInst(AEcritureInst node) + { + defaultIn(node); + } + + public void outAEcritureInst(AEcritureInst node) + { + defaultOut(node); + } + + @Override + public void caseAEcritureInst(AEcritureInst node) + { + inAEcritureInst(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSainstecriture() != null) + { + node.getSainstecriture().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outAEcritureInst(node); + } + + public void inARetourInst(ARetourInst node) + { + defaultIn(node); + } + + public void outARetourInst(ARetourInst node) + { + defaultOut(node); + } + + @Override + public void caseARetourInst(ARetourInst node) + { + inARetourInst(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSainstretour() != null) + { + node.getSainstretour().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outARetourInst(node); + } + + public void inASiInst(ASiInst node) + { + defaultIn(node); + } + + public void outASiInst(ASiInst node) + { + defaultOut(node); + } + + @Override + public void caseASiInst(ASiInst node) + { + inASiInst(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSainstsi() != null) + { + node.getSainstsi().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getAlors() != null) + { + node.getAlors().apply(this); + } + if(node.getSinon() != null) + { + node.getSinon().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outASiInst(node); + } + + public void inASi2Inst(ASi2Inst node) + { + defaultIn(node); + } + + public void outASi2Inst(ASi2Inst node) + { + defaultOut(node); + } + + @Override + public void caseASi2Inst(ASi2Inst node) + { + inASi2Inst(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSainstsi() != null) + { + node.getSainstsi().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getAlors() != null) + { + node.getAlors().apply(this); + } + if(node.getNull() != null) + { + node.getNull().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outASi2Inst(node); + } + + public void inATantqueInst(ATantqueInst node) + { + defaultIn(node); + } + + public void outATantqueInst(ATantqueInst node) + { + defaultOut(node); + } + + @Override + public void caseATantqueInst(ATantqueInst node) + { + inATantqueInst(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSainsttantque() != null) + { + node.getSainsttantque().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getInst() != null) + { + node.getInst().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outATantqueInst(node); + } + + public void inAAppelInst(AAppelInst node) + { + defaultIn(node); + } + + public void outAAppelInst(AAppelInst node) + { + defaultOut(node); + } + + @Override + public void caseAAppelInst(AAppelInst node) + { + inAAppelInst(node); + if(node.getAppel() != null) + { + node.getAppel().apply(this); + } + outAAppelInst(node); + } + + public void inARecLdecfonc(ARecLdecfonc node) + { + defaultIn(node); + } + + public void outARecLdecfonc(ARecLdecfonc node) + { + defaultOut(node); + } + + @Override + public void caseARecLdecfonc(ARecLdecfonc node) + { + inARecLdecfonc(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSaldecfonc() != null) + { + node.getSaldecfonc().apply(this); + } + if(node.getDecfonc() != null) + { + node.getDecfonc().apply(this); + } + if(node.getLdecfonc() != null) + { + node.getLdecfonc().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outARecLdecfonc(node); + } + + public void inAFinLdecfonc(AFinLdecfonc node) + { + defaultIn(node); + } + + public void outAFinLdecfonc(AFinLdecfonc node) + { + defaultOut(node); + } + + @Override + public void caseAFinLdecfonc(AFinLdecfonc node) + { + inAFinLdecfonc(node); + if(node.getNull() != null) + { + node.getNull().apply(this); + } + outAFinLdecfonc(node); + } + + public void inARecLdecvar(ARecLdecvar node) + { + defaultIn(node); + } + + public void outARecLdecvar(ARecLdecvar node) + { + defaultOut(node); + } + + @Override + public void caseARecLdecvar(ARecLdecvar node) + { + inARecLdecvar(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSaldecvar() != null) + { + node.getSaldecvar().apply(this); + } + if(node.getDecvar() != null) + { + node.getDecvar().apply(this); + } + if(node.getLdecvar() != null) + { + node.getLdecvar().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outARecLdecvar(node); + } + + public void inAFinLdecvar(AFinLdecvar node) + { + defaultIn(node); + } + + public void outAFinLdecvar(AFinLdecvar node) + { + defaultOut(node); + } + + @Override + public void caseAFinLdecvar(AFinLdecvar node) + { + inAFinLdecvar(node); + if(node.getNull() != null) + { + node.getNull().apply(this); + } + outAFinLdecvar(node); + } + + public void inARecLexp(ARecLexp node) + { + defaultIn(node); + } + + public void outARecLexp(ARecLexp node) + { + defaultOut(node); + } + + @Override + public void caseARecLexp(ARecLexp node) + { + inARecLexp(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSalexp() != null) + { + node.getSalexp().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getLexp() != null) + { + node.getLexp().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outARecLexp(node); + } + + public void inAFinLexp(AFinLexp node) + { + defaultIn(node); + } + + public void outAFinLexp(AFinLexp node) + { + defaultOut(node); + } + + @Override + public void caseAFinLexp(AFinLexp node) + { + inAFinLexp(node); + if(node.getNull() != null) + { + node.getNull().apply(this); + } + outAFinLexp(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.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSalinst() != null) + { + node.getSalinst().apply(this); + } + if(node.getInst() != null) + { + node.getInst().apply(this); + } + if(node.getLinst() != null) + { + node.getLinst().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outARecLinst(node); + } + + public void inAFinLinst(AFinLinst node) + { + defaultIn(node); + } + + public void outAFinLinst(AFinLinst node) + { + defaultOut(node); + } + + @Override + public void caseAFinLinst(AFinLinst node) + { + inAFinLinst(node); + if(node.getNull() != null) + { + node.getNull().apply(this); + } + outAFinLinst(node); + } + + public void inADecfonc(ADecfonc node) + { + defaultIn(node); + } + + public void outADecfonc(ADecfonc node) + { + defaultOut(node); + } + + @Override + public void caseADecfonc(ADecfonc node) + { + inADecfonc(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSadecfonc() != null) + { + node.getSadecfonc().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getType() != null) + { + node.getType().apply(this); + } + if(node.getParam() != null) + { + node.getParam().apply(this); + } + if(node.getVariables() != null) + { + node.getVariables().apply(this); + } + if(node.getInst() != null) + { + node.getInst().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outADecfonc(node); + } + + public void inATabDecvar(ATabDecvar node) + { + defaultIn(node); + } + + public void outATabDecvar(ATabDecvar node) + { + defaultOut(node); + } + + @Override + public void caseATabDecvar(ATabDecvar node) + { + inATabDecvar(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSadectab() != null) + { + node.getSadectab().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getType() != null) + { + node.getType().apply(this); + } + if(node.getInteger() != null) + { + node.getInteger().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outATabDecvar(node); + } + + public void inASimpleDecvar(ASimpleDecvar node) + { + defaultIn(node); + } + + public void outASimpleDecvar(ASimpleDecvar node) + { + defaultOut(node); + } + + @Override + public void caseASimpleDecvar(ASimpleDecvar node) + { + inASimpleDecvar(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSadecvarsimple() != null) + { + node.getSadecvarsimple().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getType() != null) + { + node.getType().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outASimpleDecvar(node); + } + + public void inAIndiceeVar(AIndiceeVar node) + { + defaultIn(node); + } + + public void outAIndiceeVar(AIndiceeVar node) + { + defaultOut(node); + } + + @Override + public void caseAIndiceeVar(AIndiceeVar node) + { + inAIndiceeVar(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSavarindicee() != null) + { + node.getSavarindicee().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outAIndiceeVar(node); + } + + public void inASimpleVar(ASimpleVar node) + { + defaultIn(node); + } + + public void outASimpleVar(ASimpleVar node) + { + defaultOut(node); + } + + @Override + public void caseASimpleVar(ASimpleVar node) + { + inASimpleVar(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSavarsimple() != null) + { + node.getSavarsimple().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outASimpleVar(node); + } + + public void inAAppel(AAppel node) + { + defaultIn(node); + } + + public void outAAppel(AAppel node) + { + defaultOut(node); + } + + @Override + public void caseAAppel(AAppel node) + { + inAAppel(node); + if(node.getPo() != null) + { + node.getPo().apply(this); + } + if(node.getSaappel() != null) + { + node.getSaappel().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getLexp() != null) + { + node.getLexp().apply(this); + } + if(node.getPf() != null) + { + node.getPf().apply(this); + } + outAAppel(node); + } + + public void inAEntierType(AEntierType node) + { + defaultIn(node); + } + + public void outAEntierType(AEntierType node) + { + defaultOut(node); + } + + @Override + public void caseAEntierType(AEntierType node) + { + inAEntierType(node); + if(node.getEntier() != null) + { + node.getEntier().apply(this); + } + outAEntierType(node); + } + + public void inABoolType(ABoolType node) + { + defaultIn(node); + } + + public void outABoolType(ABoolType node) + { + defaultOut(node); + } + + @Override + public void caseABoolType(ABoolType node) + { + inABoolType(node); + if(node.getBool() != null) + { + node.getBool().apply(this); + } + outABoolType(node); + } + + public void inANullType(ANullType node) + { + defaultIn(node); + } + + public void outANullType(ANullType node) + { + defaultOut(node); + } + + @Override + public void caseANullType(ANullType node) + { + inANullType(node); + if(node.getNul() != null) + { + node.getNul().apply(this); + } + outANullType(node); + } +} diff --git a/src/saParser/analysis/ReversedDepthFirstAdapter.java b/src/saParser/analysis/ReversedDepthFirstAdapter.java new file mode 100644 index 0000000..598cce6 --- /dev/null +++ b/src/saParser/analysis/ReversedDepthFirstAdapter.java @@ -0,0 +1,1359 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.analysis; + +import java.util.*; +import saParser.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.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getLdecfonc() != null) + { + node.getLdecfonc().apply(this); + } + if(node.getLdecvar() != null) + { + node.getLdecvar().apply(this); + } + if(node.getSaprog() != null) + { + node.getSaprog().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outAProg(node); + } + + public void inAAddExp(AAddExp node) + { + defaultIn(node); + } + + public void outAAddExp(AAddExp node) + { + defaultOut(node); + } + + @Override + public void caseAAddExp(AAddExp node) + { + inAAddExp(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getSaexpadd() != null) + { + node.getSaexpadd().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outAAddExp(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.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getSaexpand() != null) + { + node.getSaexpand().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outAAndExp(node); + } + + public void inADivExp(ADivExp node) + { + defaultIn(node); + } + + public void outADivExp(ADivExp node) + { + defaultOut(node); + } + + @Override + public void caseADivExp(ADivExp node) + { + inADivExp(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getSaexpdiv() != null) + { + node.getSaexpdiv().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outADivExp(node); + } + + public void inAEqualExp(AEqualExp node) + { + defaultIn(node); + } + + public void outAEqualExp(AEqualExp node) + { + defaultOut(node); + } + + @Override + public void caseAEqualExp(AEqualExp node) + { + inAEqualExp(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getSaexpequal() != null) + { + node.getSaexpequal().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outAEqualExp(node); + } + + public void inAInfExp(AInfExp node) + { + defaultIn(node); + } + + public void outAInfExp(AInfExp node) + { + defaultOut(node); + } + + @Override + public void caseAInfExp(AInfExp node) + { + inAInfExp(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getSaexpinf() != null) + { + node.getSaexpinf().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outAInfExp(node); + } + + public void inAMultExp(AMultExp node) + { + defaultIn(node); + } + + public void outAMultExp(AMultExp node) + { + defaultOut(node); + } + + @Override + public void caseAMultExp(AMultExp node) + { + inAMultExp(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getSaexpmult() != null) + { + node.getSaexpmult().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outAMultExp(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.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getSaexpor() != null) + { + node.getSaexpor().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outAOrExp(node); + } + + public void inASubExp(ASubExp node) + { + defaultIn(node); + } + + public void outASubExp(ASubExp node) + { + defaultOut(node); + } + + @Override + public void caseASubExp(ASubExp node) + { + inASubExp(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getOp2() != null) + { + node.getOp2().apply(this); + } + if(node.getOp1() != null) + { + node.getOp1().apply(this); + } + if(node.getSaexpsub() != null) + { + node.getSaexpsub().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outASubExp(node); + } + + public void inANotExp(ANotExp node) + { + defaultIn(node); + } + + public void outANotExp(ANotExp node) + { + defaultOut(node); + } + + @Override + public void caseANotExp(ANotExp node) + { + inANotExp(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getSaexpnot() != null) + { + node.getSaexpnot().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outANotExp(node); + } + + public void inAAppelExp(AAppelExp node) + { + defaultIn(node); + } + + public void outAAppelExp(AAppelExp node) + { + defaultOut(node); + } + + @Override + public void caseAAppelExp(AAppelExp node) + { + inAAppelExp(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getAppel() != null) + { + node.getAppel().apply(this); + } + if(node.getSaexpappel() != null) + { + node.getSaexpappel().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outAAppelExp(node); + } + + public void inAVarExp(AVarExp node) + { + defaultIn(node); + } + + public void outAVarExp(AVarExp node) + { + defaultOut(node); + } + + @Override + public void caseAVarExp(AVarExp node) + { + inAVarExp(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getVar() != null) + { + node.getVar().apply(this); + } + if(node.getSaexpvar() != null) + { + node.getSaexpvar().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outAVarExp(node); + } + + public void inAFauxExp(AFauxExp node) + { + defaultIn(node); + } + + public void outAFauxExp(AFauxExp node) + { + defaultOut(node); + } + + @Override + public void caseAFauxExp(AFauxExp node) + { + inAFauxExp(node); + if(node.getFaux() != null) + { + node.getFaux().apply(this); + } + outAFauxExp(node); + } + + public void inAVraiExp(AVraiExp node) + { + defaultIn(node); + } + + public void outAVraiExp(AVraiExp node) + { + defaultOut(node); + } + + @Override + public void caseAVraiExp(AVraiExp node) + { + inAVraiExp(node); + if(node.getVrai() != null) + { + node.getVrai().apply(this); + } + outAVraiExp(node); + } + + public void inAIntExp(AIntExp node) + { + defaultIn(node); + } + + public void outAIntExp(AIntExp node) + { + defaultOut(node); + } + + @Override + public void caseAIntExp(AIntExp node) + { + inAIntExp(node); + if(node.getInteger() != null) + { + node.getInteger().apply(this); + } + outAIntExp(node); + } + + public void inALireExp(ALireExp node) + { + defaultIn(node); + } + + public void outALireExp(ALireExp node) + { + defaultOut(node); + } + + @Override + public void caseALireExp(ALireExp node) + { + inALireExp(node); + if(node.getLire() != null) + { + node.getLire().apply(this); + } + outALireExp(node); + } + + public void inAAffectInst(AAffectInst node) + { + defaultIn(node); + } + + public void outAAffectInst(AAffectInst node) + { + defaultOut(node); + } + + @Override + public void caseAAffectInst(AAffectInst node) + { + inAAffectInst(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getVar() != null) + { + node.getVar().apply(this); + } + if(node.getSainstaffect() != null) + { + node.getSainstaffect().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outAAffectInst(node); + } + + public void inABlocInst(ABlocInst node) + { + defaultIn(node); + } + + public void outABlocInst(ABlocInst node) + { + defaultOut(node); + } + + @Override + public void caseABlocInst(ABlocInst node) + { + inABlocInst(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getLinst() != null) + { + node.getLinst().apply(this); + } + if(node.getSainstbloc() != null) + { + node.getSainstbloc().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outABlocInst(node); + } + + public void inAEcritureInst(AEcritureInst node) + { + defaultIn(node); + } + + public void outAEcritureInst(AEcritureInst node) + { + defaultOut(node); + } + + @Override + public void caseAEcritureInst(AEcritureInst node) + { + inAEcritureInst(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getSainstecriture() != null) + { + node.getSainstecriture().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outAEcritureInst(node); + } + + public void inARetourInst(ARetourInst node) + { + defaultIn(node); + } + + public void outARetourInst(ARetourInst node) + { + defaultOut(node); + } + + @Override + public void caseARetourInst(ARetourInst node) + { + inARetourInst(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getSainstretour() != null) + { + node.getSainstretour().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outARetourInst(node); + } + + public void inASiInst(ASiInst node) + { + defaultIn(node); + } + + public void outASiInst(ASiInst node) + { + defaultOut(node); + } + + @Override + public void caseASiInst(ASiInst node) + { + inASiInst(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getSinon() != null) + { + node.getSinon().apply(this); + } + if(node.getAlors() != null) + { + node.getAlors().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getSainstsi() != null) + { + node.getSainstsi().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outASiInst(node); + } + + public void inASi2Inst(ASi2Inst node) + { + defaultIn(node); + } + + public void outASi2Inst(ASi2Inst node) + { + defaultOut(node); + } + + @Override + public void caseASi2Inst(ASi2Inst node) + { + inASi2Inst(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getNull() != null) + { + node.getNull().apply(this); + } + if(node.getAlors() != null) + { + node.getAlors().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getSainstsi() != null) + { + node.getSainstsi().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outASi2Inst(node); + } + + public void inATantqueInst(ATantqueInst node) + { + defaultIn(node); + } + + public void outATantqueInst(ATantqueInst node) + { + defaultOut(node); + } + + @Override + public void caseATantqueInst(ATantqueInst node) + { + inATantqueInst(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getInst() != null) + { + node.getInst().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getSainsttantque() != null) + { + node.getSainsttantque().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outATantqueInst(node); + } + + public void inAAppelInst(AAppelInst node) + { + defaultIn(node); + } + + public void outAAppelInst(AAppelInst node) + { + defaultOut(node); + } + + @Override + public void caseAAppelInst(AAppelInst node) + { + inAAppelInst(node); + if(node.getAppel() != null) + { + node.getAppel().apply(this); + } + outAAppelInst(node); + } + + public void inARecLdecfonc(ARecLdecfonc node) + { + defaultIn(node); + } + + public void outARecLdecfonc(ARecLdecfonc node) + { + defaultOut(node); + } + + @Override + public void caseARecLdecfonc(ARecLdecfonc node) + { + inARecLdecfonc(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getLdecfonc() != null) + { + node.getLdecfonc().apply(this); + } + if(node.getDecfonc() != null) + { + node.getDecfonc().apply(this); + } + if(node.getSaldecfonc() != null) + { + node.getSaldecfonc().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outARecLdecfonc(node); + } + + public void inAFinLdecfonc(AFinLdecfonc node) + { + defaultIn(node); + } + + public void outAFinLdecfonc(AFinLdecfonc node) + { + defaultOut(node); + } + + @Override + public void caseAFinLdecfonc(AFinLdecfonc node) + { + inAFinLdecfonc(node); + if(node.getNull() != null) + { + node.getNull().apply(this); + } + outAFinLdecfonc(node); + } + + public void inARecLdecvar(ARecLdecvar node) + { + defaultIn(node); + } + + public void outARecLdecvar(ARecLdecvar node) + { + defaultOut(node); + } + + @Override + public void caseARecLdecvar(ARecLdecvar node) + { + inARecLdecvar(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getLdecvar() != null) + { + node.getLdecvar().apply(this); + } + if(node.getDecvar() != null) + { + node.getDecvar().apply(this); + } + if(node.getSaldecvar() != null) + { + node.getSaldecvar().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outARecLdecvar(node); + } + + public void inAFinLdecvar(AFinLdecvar node) + { + defaultIn(node); + } + + public void outAFinLdecvar(AFinLdecvar node) + { + defaultOut(node); + } + + @Override + public void caseAFinLdecvar(AFinLdecvar node) + { + inAFinLdecvar(node); + if(node.getNull() != null) + { + node.getNull().apply(this); + } + outAFinLdecvar(node); + } + + public void inARecLexp(ARecLexp node) + { + defaultIn(node); + } + + public void outARecLexp(ARecLexp node) + { + defaultOut(node); + } + + @Override + public void caseARecLexp(ARecLexp node) + { + inARecLexp(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getLexp() != null) + { + node.getLexp().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getSalexp() != null) + { + node.getSalexp().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outARecLexp(node); + } + + public void inAFinLexp(AFinLexp node) + { + defaultIn(node); + } + + public void outAFinLexp(AFinLexp node) + { + defaultOut(node); + } + + @Override + public void caseAFinLexp(AFinLexp node) + { + inAFinLexp(node); + if(node.getNull() != null) + { + node.getNull().apply(this); + } + outAFinLexp(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.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getLinst() != null) + { + node.getLinst().apply(this); + } + if(node.getInst() != null) + { + node.getInst().apply(this); + } + if(node.getSalinst() != null) + { + node.getSalinst().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outARecLinst(node); + } + + public void inAFinLinst(AFinLinst node) + { + defaultIn(node); + } + + public void outAFinLinst(AFinLinst node) + { + defaultOut(node); + } + + @Override + public void caseAFinLinst(AFinLinst node) + { + inAFinLinst(node); + if(node.getNull() != null) + { + node.getNull().apply(this); + } + outAFinLinst(node); + } + + public void inADecfonc(ADecfonc node) + { + defaultIn(node); + } + + public void outADecfonc(ADecfonc node) + { + defaultOut(node); + } + + @Override + public void caseADecfonc(ADecfonc node) + { + inADecfonc(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getInst() != null) + { + node.getInst().apply(this); + } + if(node.getVariables() != null) + { + node.getVariables().apply(this); + } + if(node.getParam() != null) + { + node.getParam().apply(this); + } + if(node.getType() != null) + { + node.getType().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getSadecfonc() != null) + { + node.getSadecfonc().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outADecfonc(node); + } + + public void inATabDecvar(ATabDecvar node) + { + defaultIn(node); + } + + public void outATabDecvar(ATabDecvar node) + { + defaultOut(node); + } + + @Override + public void caseATabDecvar(ATabDecvar node) + { + inATabDecvar(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getInteger() != null) + { + node.getInteger().apply(this); + } + if(node.getType() != null) + { + node.getType().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getSadectab() != null) + { + node.getSadectab().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outATabDecvar(node); + } + + public void inASimpleDecvar(ASimpleDecvar node) + { + defaultIn(node); + } + + public void outASimpleDecvar(ASimpleDecvar node) + { + defaultOut(node); + } + + @Override + public void caseASimpleDecvar(ASimpleDecvar node) + { + inASimpleDecvar(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getType() != null) + { + node.getType().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getSadecvarsimple() != null) + { + node.getSadecvarsimple().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outASimpleDecvar(node); + } + + public void inAIndiceeVar(AIndiceeVar node) + { + defaultIn(node); + } + + public void outAIndiceeVar(AIndiceeVar node) + { + defaultOut(node); + } + + @Override + public void caseAIndiceeVar(AIndiceeVar node) + { + inAIndiceeVar(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getExp() != null) + { + node.getExp().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getSavarindicee() != null) + { + node.getSavarindicee().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outAIndiceeVar(node); + } + + public void inASimpleVar(ASimpleVar node) + { + defaultIn(node); + } + + public void outASimpleVar(ASimpleVar node) + { + defaultOut(node); + } + + @Override + public void caseASimpleVar(ASimpleVar node) + { + inASimpleVar(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getSavarsimple() != null) + { + node.getSavarsimple().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outASimpleVar(node); + } + + public void inAAppel(AAppel node) + { + defaultIn(node); + } + + public void outAAppel(AAppel node) + { + defaultOut(node); + } + + @Override + public void caseAAppel(AAppel node) + { + inAAppel(node); + if(node.getPf() != null) + { + node.getPf().apply(this); + } + if(node.getLexp() != null) + { + node.getLexp().apply(this); + } + if(node.getId() != null) + { + node.getId().apply(this); + } + if(node.getSaappel() != null) + { + node.getSaappel().apply(this); + } + if(node.getPo() != null) + { + node.getPo().apply(this); + } + outAAppel(node); + } + + public void inAEntierType(AEntierType node) + { + defaultIn(node); + } + + public void outAEntierType(AEntierType node) + { + defaultOut(node); + } + + @Override + public void caseAEntierType(AEntierType node) + { + inAEntierType(node); + if(node.getEntier() != null) + { + node.getEntier().apply(this); + } + outAEntierType(node); + } + + public void inABoolType(ABoolType node) + { + defaultIn(node); + } + + public void outABoolType(ABoolType node) + { + defaultOut(node); + } + + @Override + public void caseABoolType(ABoolType node) + { + inABoolType(node); + if(node.getBool() != null) + { + node.getBool().apply(this); + } + outABoolType(node); + } + + public void inANullType(ANullType node) + { + defaultIn(node); + } + + public void outANullType(ANullType node) + { + defaultOut(node); + } + + @Override + public void caseANullType(ANullType node) + { + inANullType(node); + if(node.getNul() != null) + { + node.getNul().apply(this); + } + outANullType(node); + } +} diff --git a/src/saParser/lexer/IPushbackReader.java b/src/saParser/lexer/IPushbackReader.java new file mode 100644 index 0000000..dc70cad --- /dev/null +++ b/src/saParser/lexer/IPushbackReader.java @@ -0,0 +1,12 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.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/saParser/lexer/Lexer.java b/src/saParser/lexer/Lexer.java new file mode 100644 index 0000000..648ecb5 --- /dev/null +++ b/src/saParser/lexer/Lexer.java @@ -0,0 +1,1035 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.lexer; + +import java.io.*; +import saParser.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( + 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( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 33: + { + @SuppressWarnings("hiding") Token token = new33( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 34: + { + @SuppressWarnings("hiding") Token token = new34( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 35: + { + @SuppressWarnings("hiding") Token token = new35( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 36: + { + @SuppressWarnings("hiding") Token token = new36( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 37: + { + @SuppressWarnings("hiding") Token token = new37( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 38: + { + @SuppressWarnings("hiding") Token token = new38( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 39: + { + @SuppressWarnings("hiding") Token token = new39( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 40: + { + @SuppressWarnings("hiding") Token token = new40( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 41: + { + @SuppressWarnings("hiding") Token token = new41( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 42: + { + @SuppressWarnings("hiding") Token token = new42( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 43: + { + @SuppressWarnings("hiding") Token token = new43( + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 44: + { + @SuppressWarnings("hiding") Token token = new44( + getText(accept_length), + start_line + 1, + start_pos + 1); + pushBack(accept_length); + this.pos = accept_pos; + this.line = accept_line; + return token; + } + case 45: + { + @SuppressWarnings("hiding") Token token = new45( + 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 TPo(line, pos); } + Token new3(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TPf(line, pos); } + Token new4(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSaappel(line, pos); } + Token new5(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSadecfonc(line, pos); } + Token new6(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSadectab(line, pos); } + Token new7(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSadecvar(line, pos); } + Token new8(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSadecvarsimple(line, pos); } + Token new9(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSaexpadd(line, pos); } + Token new10(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSaexpand(line, pos); } + Token new11(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSaexpappel(line, pos); } + Token new12(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSaexpdiv(line, pos); } + Token new13(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSaexpequal(line, pos); } + Token new14(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSaexpfaux(line, pos); } + Token new15(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSaexpinf(line, pos); } + Token new16(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSaexpint(line, pos); } + Token new17(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSaexplire(line, pos); } + Token new18(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSaexpmult(line, pos); } + Token new19(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSaexpnot(line, pos); } + Token new20(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSaexpor(line, pos); } + Token new21(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSaexpsub(line, pos); } + Token new22(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSaexpvar(line, pos); } + Token new23(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSaexpvrai(line, pos); } + Token new24(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSainstaffect(line, pos); } + Token new25(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSainstbloc(line, pos); } + Token new26(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSainstecriture(line, pos); } + Token new27(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSainstretour(line, pos); } + Token new28(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSainstsi(line, pos); } + Token new29(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSainsttantque(line, pos); } + Token new30(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSaldecfonc(line, pos); } + Token new31(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSaldecvar(line, pos); } + Token new32(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSalexp(line, pos); } + Token new33(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSalinst(line, pos); } + Token new34(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSaprog(line, pos); } + Token new35(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSavarindicee(line, pos); } + Token new36(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TSavarsimple(line, pos); } + Token new37(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TFaux(line, pos); } + Token new38(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TVrai(line, pos); } + Token new39(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TLire(line, pos); } + Token new40(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TNull(line, pos); } + Token new41(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TEntier(line, pos); } + Token new42(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TBool(line, pos); } + Token new43(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TNul(line, pos); } + Token new44(@SuppressWarnings("hiding") String text, @SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) { return new TInteger(text, line, pos); } + Token new45(@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 + {{9, 9, 1}, {10, 10, 2}, {13, 13, 3}, {32, 32, 4}, {35, 35, 5}, {36, 36, 6}, {40, 40, 7}, {41, 41, 8}, {48, 57, 9}, {65, 82, 6}, {83, 83, 10}, {84, 90, 6}, {95, 95, 6}, {97, 97, 6}, {98, 98, 11}, {99, 100, 6}, {101, 101, 12}, {102, 102, 13}, {103, 107, 6}, {108, 108, 14}, {109, 109, 6}, {110, 110, 15}, {111, 117, 6}, {118, 118, 16}, {119, 122, 6}, }, + {{9, 32, -2}, }, + {{9, 32, -2}, }, + {{9, 32, -2}, }, + {{9, 32, -2}, }, + {{0, 9, 17}, {10, 10, 18}, {11, 12, 17}, {13, 13, 19}, {14, 65535, 17}, }, + {{48, 57, 20}, {65, 90, 20}, {97, 122, 20}, }, + {}, + {}, + {{48, 57, 9}, }, + {{48, 90, -8}, {97, 97, 21}, {98, 122, 20}, }, + {{48, 90, -8}, {97, 110, 20}, {111, 111, 22}, {112, 122, 20}, }, + {{48, 90, -8}, {97, 109, 20}, {110, 110, 23}, {111, 122, 20}, }, + {{48, 90, -8}, {97, 97, 24}, {98, 122, 20}, }, + {{48, 90, -8}, {97, 104, 20}, {105, 105, 25}, {106, 122, 20}, }, + {{48, 90, -8}, {97, 116, 20}, {117, 117, 26}, {118, 122, 20}, }, + {{48, 90, -8}, {97, 113, 20}, {114, 114, 27}, {115, 122, 20}, }, + {{0, 65535, -7}, }, + {{13, 13, 28}, }, + {}, + {{48, 122, -8}, }, + {{48, 57, 20}, {65, 65, 29}, {66, 67, 20}, {68, 68, 30}, {69, 69, 31}, {70, 72, 20}, {73, 73, 32}, {74, 75, 20}, {76, 76, 33}, {77, 79, 20}, {80, 80, 34}, {81, 85, 20}, {86, 86, 35}, {87, 90, 20}, {97, 122, 20}, }, + {{48, 110, -13}, {111, 111, 36}, {112, 122, 20}, }, + {{48, 90, -8}, {97, 115, 20}, {116, 116, 37}, {117, 122, 20}, }, + {{48, 116, -17}, {117, 117, 38}, {118, 122, 20}, }, + {{48, 113, -18}, {114, 114, 39}, {115, 122, 20}, }, + {{48, 90, -8}, {97, 107, 20}, {108, 108, 40}, {109, 122, 20}, }, + {{48, 90, -8}, {97, 97, 41}, {98, 122, 20}, }, + {}, + {{48, 90, -8}, {97, 111, 20}, {112, 112, 42}, {113, 122, 20}, }, + {{48, 90, -8}, {97, 100, 20}, {101, 101, 43}, {102, 122, 20}, }, + {{48, 90, -8}, {97, 119, 20}, {120, 120, 44}, {121, 122, 20}, }, + {{48, 109, -14}, {110, 110, 45}, {111, 122, 20}, }, + {{48, 57, 20}, {65, 67, 20}, {68, 68, 46}, {69, 69, 47}, {70, 72, 20}, {73, 73, 48}, {74, 90, 20}, {97, 122, 20}, }, + {{48, 113, -18}, {114, 114, 49}, {115, 122, 20}, }, + {{48, 90, -8}, {97, 97, 50}, {98, 122, 20}, }, + {{48, 107, -28}, {108, 108, 51}, {109, 122, 20}, }, + {{48, 104, -16}, {105, 105, 52}, {106, 122, 20}, }, + {{48, 119, -33}, {120, 120, 53}, {121, 122, 20}, }, + {{48, 100, -32}, {101, 101, 54}, {102, 122, 20}, }, + {{48, 107, -28}, {108, 108, 55}, {109, 122, 20}, }, + {{48, 104, -16}, {105, 105, 56}, {106, 122, 20}, }, + {{48, 111, -31}, {112, 112, 57}, {113, 122, 20}, }, + {{48, 90, -8}, {97, 98, 20}, {99, 99, 58}, {100, 122, 20}, }, + {{48, 111, -31}, {112, 112, 59}, {113, 122, 20}, }, + {{48, 90, -8}, {97, 114, 20}, {115, 115, 60}, {116, 122, 20}, }, + {{48, 100, -32}, {101, 101, 61}, {102, 122, 20}, }, + {{48, 119, -33}, {120, 120, 62}, {121, 122, 20}, }, + {{48, 109, -14}, {110, 110, 63}, {111, 122, 20}, }, + {{48, 110, -13}, {111, 111, 64}, {112, 122, 20}, }, + {{48, 113, -18}, {114, 114, 65}, {115, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 100, -32}, {101, 101, 66}, {102, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 122, -8}, }, + {{48, 122, -8}, }, + {{48, 122, -8}, }, + {{48, 100, -32}, {101, 101, 67}, {102, 122, 20}, }, + {{48, 57, 20}, {65, 69, 20}, {70, 70, 68}, {71, 83, 20}, {84, 84, 69}, {85, 85, 20}, {86, 86, 70}, {87, 122, -23}, }, + {{48, 57, 20}, {65, 65, 71}, {66, 67, 20}, {68, 68, 72}, {69, 69, 73}, {70, 70, 74}, {71, 72, 20}, {73, 73, 75}, {74, 75, 20}, {76, 76, 76}, {77, 77, 77}, {78, 78, 78}, {79, 79, 79}, {80, 82, 20}, {83, 83, 80}, {84, 85, 20}, {86, 86, 81}, {87, 122, -23}, }, + {{48, 115, -25}, {116, 116, 82}, {117, 122, 20}, }, + {{48, 98, -45}, {99, 99, 83}, {100, 122, 20}, }, + {{48, 111, -31}, {112, 112, 84}, {113, 122, 20}, }, + {{48, 114, -47}, {115, 115, 85}, {116, 122, 20}, }, + {{48, 90, -8}, {97, 102, 20}, {103, 103, 86}, {104, 122, 20}, }, + {{48, 57, 20}, {65, 72, 20}, {73, 73, 87}, {74, 82, 20}, {83, 83, 88}, {84, 90, 20}, {97, 122, 20}, }, + {{48, 113, -18}, {114, 114, 89}, {115, 122, 20}, }, + {{48, 107, -28}, {108, 108, 90}, {109, 122, 20}, }, + {{48, 110, -13}, {111, 111, 91}, {112, 122, 20}, }, + {{48, 90, -8}, {97, 97, 92}, {98, 122, 20}, }, + {{48, 90, -8}, {97, 97, 93}, {98, 122, 20}, }, + {{48, 90, -8}, {97, 99, 20}, {100, 100, 94}, {101, 109, 20}, {110, 110, 95}, {111, 111, 20}, {112, 112, 96}, {113, 122, 20}, }, + {{48, 104, -16}, {105, 105, 97}, {106, 122, 20}, }, + {{48, 90, -8}, {97, 112, 20}, {113, 113, 98}, {114, 122, 20}, }, + {{48, 90, -8}, {97, 97, 99}, {98, 122, 20}, }, + {{48, 109, -14}, {110, 110, 100}, {111, 122, 20}, }, + {{48, 104, -16}, {105, 105, 101}, {106, 122, 20}, }, + {{48, 116, -17}, {117, 117, 102}, {118, 122, 20}, }, + {{48, 110, -13}, {111, 111, 103}, {112, 122, 20}, }, + {{48, 113, -18}, {114, 114, 104}, {115, 122, 20}, }, + {{48, 116, -17}, {117, 117, 105}, {118, 122, 20}, }, + {{48, 90, -8}, {97, 97, 106}, {98, 113, 20}, {114, 114, 107}, {115, 122, 20}, }, + {{48, 57, 20}, {65, 65, 108}, {66, 66, 109}, {67, 68, 20}, {69, 69, 110}, {70, 81, 20}, {82, 82, 111}, {83, 83, 112}, {84, 84, 113}, {85, 90, 20}, {97, 122, 20}, }, + {{48, 69, -60}, {70, 70, 114}, {71, 85, 20}, {86, 86, 115}, {87, 122, -23}, }, + {{48, 122, -8}, }, + {{48, 115, -25}, {116, 116, 116}, {117, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 109, -14}, {110, 110, 117}, {111, 122, 20}, }, + {{48, 104, -16}, {105, 105, 118}, {106, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 122, -8}, }, + {{48, 109, -14}, {110, 110, 119}, {111, 122, 20}, }, + {{48, 90, -8}, {97, 97, 20}, {98, 98, 120}, {99, 122, 20}, }, + {{48, 113, -18}, {114, 114, 121}, {115, 122, 20}, }, + {{48, 99, -73}, {100, 100, 122}, {101, 122, 20}, }, + {{48, 99, -73}, {100, 100, 123}, {101, 122, 20}, }, + {{48, 111, -31}, {112, 112, 124}, {113, 122, 20}, }, + {{48, 90, -8}, {97, 117, 20}, {118, 118, 125}, {119, 122, 20}, }, + {{48, 116, -17}, {117, 117, 126}, {118, 122, 20}, }, + {{48, 116, -17}, {117, 117, 127}, {118, 122, 20}, }, + {{48, 90, -8}, {97, 101, 20}, {102, 102, 128}, {103, 115, 20}, {116, 116, 129}, {117, 122, 20}, }, + {{48, 113, -18}, {114, 114, 130}, {115, 122, 20}, }, + {{48, 107, -28}, {108, 108, 131}, {109, 122, 20}, }, + {{48, 115, -25}, {116, 116, 132}, {117, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 97, -94}, {98, 98, 133}, {99, 122, 20}, }, + {{48, 113, -18}, {114, 114, 134}, {115, 122, 20}, }, + {{48, 90, -8}, {97, 97, 135}, {98, 122, 20}, }, + {{48, 101, -102}, {102, 102, 136}, {103, 122, 20}, }, + {{48, 107, -28}, {108, 108, 137}, {109, 122, 20}, }, + {{48, 98, -45}, {99, 99, 138}, {100, 122, 20}, }, + {{48, 100, -32}, {101, 101, 139}, {102, 122, 20}, }, + {{48, 104, -16}, {105, 105, 140}, {106, 122, 20}, }, + {{48, 90, -8}, {97, 97, 141}, {98, 122, 20}, }, + {{48, 110, -13}, {111, 111, 142}, {112, 122, 20}, }, + {{48, 90, -8}, {97, 97, 143}, {98, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 99, -73}, {100, 100, 144}, {101, 122, 20}, }, + {{48, 90, -8}, {97, 108, 20}, {109, 109, 145}, {110, 122, 20}, }, + {{48, 98, -45}, {99, 99, 146}, {100, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 57, 20}, {65, 82, 20}, {83, 83, 147}, {84, 122, -67}, }, + {{48, 122, -8}, }, + {{48, 122, -8}, }, + {{48, 100, -32}, {101, 101, 148}, {102, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 90, -8}, {97, 97, 149}, {98, 122, 20}, }, + {{48, 119, -33}, {120, 120, 150}, {121, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 122, -8}, }, + {{48, 100, -32}, {101, 101, 151}, {102, 122, 20}, }, + {{48, 115, -25}, {116, 116, 152}, {117, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 122, -8}, }, + {{48, 122, -8}, }, + {{48, 104, -16}, {105, 105, 153}, {106, 122, 20}, }, + {{48, 101, -102}, {102, 102, 154}, {103, 122, 20}, }, + {{48, 110, -13}, {111, 111, 155}, {112, 122, 20}, }, + {{48, 113, -18}, {114, 114, 156}, {115, 122, 20}, }, + {{48, 115, -25}, {116, 116, 157}, {117, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 109, -14}, {110, 110, 158}, {111, 122, 20}, }, + {{48, 109, -14}, {110, 110, 159}, {111, 122, 20}, }, + {{48, 113, -18}, {114, 114, 160}, {115, 122, 20}, }, + {{48, 104, -16}, {105, 105, 161}, {106, 122, 20}, }, + {{48, 111, -31}, {112, 112, 162}, {113, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 104, -16}, {105, 105, 163}, {106, 122, 20}, }, + {{48, 107, -28}, {108, 108, 164}, {109, 122, 20}, }, + {{48, 107, -28}, {108, 108, 165}, {109, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 122, -8}, }, + {{48, 122, -8}, }, + {{48, 122, -8}, }, + {{48, 100, -32}, {101, 101, 166}, {102, 122, 20}, }, + {{48, 98, -45}, {99, 99, 167}, {100, 122, 20}, }, + {{48, 104, -16}, {105, 105, 168}, {106, 122, 20}, }, + {{48, 110, -13}, {111, 111, 169}, {112, 122, 20}, }, + {{48, 115, -25}, {116, 116, 170}, {117, 122, 20}, }, + {{48, 98, -45}, {99, 99, 171}, {100, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 98, -45}, {99, 99, 172}, {100, 122, 20}, }, + {{48, 107, -28}, {108, 108, 173}, {109, 122, 20}, }, + {{48, 108, -120}, {109, 109, 174}, {110, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 122, -8}, }, + {{48, 98, -45}, {99, 99, 175}, {100, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 115, -25}, {116, 116, 176}, {117, 122, 20}, }, + {{48, 116, -17}, {117, 117, 177}, {118, 122, 20}, }, + {{48, 57, 20}, {65, 80, 20}, {81, 81, 178}, {82, 90, 20}, {97, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 100, -32}, {101, 101, 179}, {102, 122, 20}, }, + {{48, 100, -32}, {101, 101, 180}, {102, 122, 20}, }, + {{48, 111, -31}, {112, 112, 181}, {113, 122, 20}, }, + {{48, 115, -25}, {116, 116, 182}, {117, 122, 20}, }, + {{48, 116, -17}, {117, 117, 183}, {118, 122, 20}, }, + {{48, 113, -18}, {114, 114, 184}, {115, 122, 20}, }, + {{48, 116, -17}, {117, 117, 185}, {118, 122, 20}, }, + {{48, 100, -32}, {101, 101, 186}, {102, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 107, -28}, {108, 108, 187}, {109, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 113, -18}, {114, 114, 188}, {115, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 100, -32}, {101, 101, 189}, {102, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 100, -32}, {101, 101, 190}, {102, 122, 20}, }, + {{48, 100, -32}, {101, 101, 191}, {102, 122, 20}, }, + {{48, 122, -8}, }, + {{48, 122, -8}, }, + {{48, 122, -8}, }, + } + };*/ + + private static int[][] accept; +/* { + // INITIAL + {-1, 0, 0, 0, 0, -1, 45, 2, 3, 44, 45, 45, 45, 45, 45, 45, 45, -1, 1, 1, 45, 45, 45, 45, 45, 45, 45, 45, 1, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 43, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 42, 45, 37, 39, 40, 38, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 32, 45, 34, 45, 45, 41, 4, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 20, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 33, 45, 45, 45, 6, 7, 9, 10, 45, 12, 45, 45, 15, 16, 45, 45, 19, 21, 22, 45, 45, 45, 45, 45, 28, 45, 45, 45, 45, 45, 5, 45, 45, 45, 14, 17, 18, 23, 45, 45, 45, 45, 45, 45, 31, 45, 45, 45, 11, 13, 45, 25, 45, 45, 45, 30, 45, 45, 45, 45, 45, 45, 45, 45, 36, 45, 24, 45, 27, 45, 35, 45, 45, 29, 8, 26, }, + + };*/ + + 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/saParser/lexer/LexerException.java b/src/saParser/lexer/LexerException.java new file mode 100644 index 0000000..1b9f365 --- /dev/null +++ b/src/saParser/lexer/LexerException.java @@ -0,0 +1,22 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.lexer; + +import saParser.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/saParser/lexer/lexer.dat b/src/saParser/lexer/lexer.dat new file mode 100644 index 0000000000000000000000000000000000000000..a1bd028415b0ad63a549525ba6dc4d3836c69934 GIT binary patch literal 8476 zcmZQzU|?imU^u|Qz#z%Mz`zN`ATcfm1_lsjVqjq4g<@s~1_lKvW?^7pP=;bw1_lNd zC}v||V9<bKb_NCpO(^DIU|=v{U|_I>+TqB+z!1d1zyMMo%)r0^!XW!X7#J9$pyKfi z3=AL)Qj^HQzyQJ^b`k>v0|;|7Ffb%DFfgP*)u%ErFn}-*0|P@E6ocHJ&cMKs4ONrF zz`y{)d<+Z>xljx;Gmn9R0fhM(7#Q*y7#K>S>dP1y7(iHnfq|i%fq|h4Dh>)GP<Sc) z|Ns9VG#p9cgTjmf8Ww`kum<^Gh=G9t<S&pPK;j_xgRn3I0|Ore!~g#b3=AM~P+Y*m zQ-pzm0TiB~a09VH;RJFghz+s>ghB3wsRy|era$Wc|NlRrVGGhH3JqJBeo#Dv^dYMQ zg%ikZP&k3G7y|=C0W@qt;@I?n!Wtw8(hI`k&~S#?gUdY<M7Sq|fq?;Jb|wP@0|<lC zauxyiltA@>;u(acpz#cI4>ms(LiH3eFff3yGy?-eF_Jx?FlGS7(f|Mde?rp)DDFU5 z1{4WUF;I9`LBk!C-avd%z5w|F6ptV*%fP_k#K6Gd47JmRfq?;p<ro+kT%lN=fq}t| zfq}sTs>YLnfdPa;dDM%6fx#Op?!&;q0K$q43=F;u3=IBI@c;$}1`t+aU|<MjU|<M^ ziia^UFn};9e}_Z!Bgk!_^Z^SWSbXLE|Ns9pG%i7D0aOkUN(-Pc1DOYk0}xh)<~MY+ zOaA}={~js_iX%0&ID)yM@c;k+@1Su4iWhaXc)=Ezpz;9Z22fc5!k{t>lt$6rfSm3@ z{s)z3pt1+14iv4}%m;-9$b3*(fUp(=0|O}i!1Q6$11iTrdO&3u2x~*jFnoGIWfDkF z1p@;E2<tE~FjOL?Nmv-={{R2~6SRy2<v(3$oWaaSE}uc>fzlv)+S7xkJ5c)5$C36x zX&IFEu$4tHx1h(DAzFOF)S-vH5n5RQQ<we!|Nke@avc<x#?W#d<~NwSjQ{`te}I+| zpmM^5fq?<JoPen-|NsC0eQ0=s!qgN;n5O*y|NjBB&H=@j8Crb7%tLpdIg#$Oz~R39 z|Ns9#gqFFWv;`_V2&FAhngzuxsJ;YYD`>rm9!BV9TN9CPL3s{jHYi_%unhwP11Mjk zn~fe`wm8BIJ^bx(gg<(kwnt0Tu<%DOqa2`NhweV~bP37>ApgMBfy#GK`i7O=F!Ry< z1uC~e?GIe~(9I#l$7K&Fe<It1Ef0h8DkyG1^#llm>JWEmdkZ8EYHxusNFAvB2Vsyn zsQd?EkRDJS0P^!o1_lOD`vepQpfm?k2MQw)2AK)+H^@yOagaSA462(zW`i)OZUUJH z!k{t&qz5DqQV)^?VNjg~k^|8oaZtSl!=SnghW!{A7+@GwpTRJwJ_EHYL3%-LN)QH# zf&7T>H&C62>^E3A7ytkN|2Z@bgVHg`JW%}ui%*!kr2qf_Uxv0pL3s*f7pM$JSBIXb zKyE?KuQ2n9{{R1f5n2|4(jCaXAp2qFVXHGh@elGVsErH4pg04yhhTa@ZE*DXLJxCL z7=XeY<WG=UAb)^x1Oo#D$gQN5<&jYL!|aFo4ZREmnTf5wMbE3zIPxlb-4KJLZa`NT zi>3~iXOPu_;t~`NptuC#IA|FUaxX|6RDXgnsBZ$Q=Rp`G4l0X5I03E9goOcm{R3)G zAlE<G;umBd$ZSx00bx)%4k~Za!x!28Aag-}0I5Y+hhAoa{0DMBx;k{Xg6cP9x5E5{ z-bMqZM^JwW-8}So1*KJx-_X^em%*U449W}W>d@^4)#u3eg8EmWbdMe`AU}Y@1r(N` za0P`W2!q;#$o7ExU?BbI<s7Je0V?M}7?d7B<sGP;1DORX<3JdcHb7+@sC)s5gYp#! zgTfh<uRs{&cTnB}VUSxuc^#A|K<Yv92lFq?AFluZ|33n4bAikTxfxV`g7ks(fbu;E zgZu!>&#>|uy>5ZU8+sWBDrb<(I9&SB(+@}w$X_t`!puicKcKh)g*{9iy7}mQm^tY7 zf!e#s_F>C2pzs5Q2`HXH7}SOX<p-GEFtgFq8mQe23O{sp$^ZZV-wtgrf$|GT9+V$I zG{_#9dFbk@q2&g;I`sOW2Ccln<|j}%gX{u@BM8?bjYojQVQxUr7j-!LOz7(B(bR#) zL_p~uIsbtC46+N9$3eJ(fq?;(k3nGu5(lLr5N?F_+0gxs9^Oqv))mb-+RNx^xCPB# zTxlxt|NsAsp!EPKeY8UBa6;~F!{J`!Fao8$cBt9t=B57s|9=*=%?k>@4rutHt3$6V zJ8}3Qz5USzO{3`Mp|?-Fp>9A|hn{D9aP&XW{o9MfzvyLtACYx=Kbm>C;t@T+O+d?U z*zysm{05~}P}vQ_6QO-#^sqn=+ev6)i|!_vUC8wXsLTi11uE}Bcrvs-1uC2OVi^lU zHxrhp(c^ClTKwVChaOK;(ZUsGK6-y^8d`q~-F$RD%p7!gPDgVmOdWc@ok1YqqT7eg zhnb6>erMuHzv%f8lqW&u7<w8&PrtKqq+j%MZ4Qod0^Q$p3HTf4FZ4Qa9*%x4y1Mx| z)S<g~0S@<~hvz~Z;fY?Kfy!1;n+6u1#KzZR9Ok2!hf8pjhv@2-qNzi72dR8me4wZE zWjN9~dKt1Dtqg&ghaS!=aD)STdR&PkJ))<xRcPr9W-q$?R-?HOJ$!KKTZ5(#rVc$m z)}qA+OkK|Z|NlXCA*ehC;dN+bGP*m^`7m?P{j(m;UAXk2ht~!i;f3C2+KAR>g0<C= z>j2Q$1E>xF^#wq96Lj7STU#HO`_R+dW*q4aUELNO>d^D+R<!mfEIiS}WgC&<0%|LR z+NiMn4>J$F+}VMn+(8fLooL|<GY{RryU_fLD?HKD<!-ceiAx{4`}d%^AD2FKcY^AE zQ2P%SKE&$Vhvq+A;jkY~9lH6%@DKd|51wlT&2PXlR17qC0GbyD*$<j;0P(S6sCtln zAdFQF0|Nt0oESAQwICWaKLVnO!JzpUkUG#@6KH-2G~WZ7PXdY23xnq6Kz4!V+dwo3 zgXWV!ZATEBR17LtNYMkD|3g*}>f?dN2SM|}pt)y|9BAGdM1wGBZW1)_4Pt{ZXbu`Q zKMb1h1@X}_XpR$I48#YOiy#_?L38h*Ic(5aGH4zcCXP;n<~NbWKw~nXxm1uCXpR>| n!!T%G6voCygXShda-cb75Dl8Y1<{~+P7n>kpm|r&n4lB@w7}(l literal 0 HcmV?d00001 diff --git a/src/saParser/node/AAddExp.java b/src/saParser/node/AAddExp.java new file mode 100644 index 0000000..e36c33f --- /dev/null +++ b/src/saParser/node/AAddExp.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAddExp extends PExp +{ + private TPo _po_; + private TSaexpadd _saexpadd_; + private PExp _op1_; + private PExp _op2_; + private TPf _pf_; + + public AAddExp() + { + // Constructor + } + + public AAddExp( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSaexpadd _saexpadd_, + @SuppressWarnings("hiding") PExp _op1_, + @SuppressWarnings("hiding") PExp _op2_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSaexpadd(_saexpadd_); + + setOp1(_op1_); + + setOp2(_op2_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new AAddExp( + cloneNode(this._po_), + cloneNode(this._saexpadd_), + cloneNode(this._op1_), + cloneNode(this._op2_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAddExp(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSaexpadd getSaexpadd() + { + return this._saexpadd_; + } + + public void setSaexpadd(TSaexpadd node) + { + if(this._saexpadd_ != null) + { + this._saexpadd_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._saexpadd_ = node; + } + + public PExp getOp1() + { + return this._op1_; + } + + public void setOp1(PExp node) + { + if(this._op1_ != null) + { + this._op1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op1_ = node; + } + + public PExp getOp2() + { + return this._op2_; + } + + public void setOp2(PExp node) + { + if(this._op2_ != null) + { + this._op2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op2_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._saexpadd_) + + toString(this._op1_) + + toString(this._op2_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._saexpadd_ == child) + { + this._saexpadd_ = null; + return; + } + + if(this._op1_ == child) + { + this._op1_ = null; + return; + } + + if(this._op2_ == child) + { + this._op2_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._saexpadd_ == oldChild) + { + setSaexpadd((TSaexpadd) newChild); + return; + } + + if(this._op1_ == oldChild) + { + setOp1((PExp) newChild); + return; + } + + if(this._op2_ == oldChild) + { + setOp2((PExp) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/AAffectInst.java b/src/saParser/node/AAffectInst.java new file mode 100644 index 0000000..22b97ce --- /dev/null +++ b/src/saParser/node/AAffectInst.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAffectInst extends PInst +{ + private TPo _po_; + private TSainstaffect _sainstaffect_; + private PVar _var_; + private PExp _exp_; + private TPf _pf_; + + public AAffectInst() + { + // Constructor + } + + public AAffectInst( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSainstaffect _sainstaffect_, + @SuppressWarnings("hiding") PVar _var_, + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSainstaffect(_sainstaffect_); + + setVar(_var_); + + setExp(_exp_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new AAffectInst( + cloneNode(this._po_), + cloneNode(this._sainstaffect_), + cloneNode(this._var_), + cloneNode(this._exp_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAffectInst(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSainstaffect getSainstaffect() + { + return this._sainstaffect_; + } + + public void setSainstaffect(TSainstaffect node) + { + if(this._sainstaffect_ != null) + { + this._sainstaffect_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._sainstaffect_ = node; + } + + 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 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 TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._sainstaffect_) + + toString(this._var_) + + toString(this._exp_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._sainstaffect_ == child) + { + this._sainstaffect_ = null; + return; + } + + if(this._var_ == child) + { + this._var_ = null; + return; + } + + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._sainstaffect_ == oldChild) + { + setSainstaffect((TSainstaffect) newChild); + return; + } + + if(this._var_ == oldChild) + { + setVar((PVar) newChild); + return; + } + + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/AAndExp.java b/src/saParser/node/AAndExp.java new file mode 100644 index 0000000..7b641e4 --- /dev/null +++ b/src/saParser/node/AAndExp.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAndExp extends PExp +{ + private TPo _po_; + private TSaexpand _saexpand_; + private PExp _op1_; + private PExp _op2_; + private TPf _pf_; + + public AAndExp() + { + // Constructor + } + + public AAndExp( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSaexpand _saexpand_, + @SuppressWarnings("hiding") PExp _op1_, + @SuppressWarnings("hiding") PExp _op2_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSaexpand(_saexpand_); + + setOp1(_op1_); + + setOp2(_op2_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new AAndExp( + cloneNode(this._po_), + cloneNode(this._saexpand_), + cloneNode(this._op1_), + cloneNode(this._op2_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAndExp(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSaexpand getSaexpand() + { + return this._saexpand_; + } + + public void setSaexpand(TSaexpand node) + { + if(this._saexpand_ != null) + { + this._saexpand_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._saexpand_ = node; + } + + public PExp getOp1() + { + return this._op1_; + } + + public void setOp1(PExp node) + { + if(this._op1_ != null) + { + this._op1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op1_ = node; + } + + public PExp getOp2() + { + return this._op2_; + } + + public void setOp2(PExp node) + { + if(this._op2_ != null) + { + this._op2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op2_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._saexpand_) + + toString(this._op1_) + + toString(this._op2_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._saexpand_ == child) + { + this._saexpand_ = null; + return; + } + + if(this._op1_ == child) + { + this._op1_ = null; + return; + } + + if(this._op2_ == child) + { + this._op2_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._saexpand_ == oldChild) + { + setSaexpand((TSaexpand) newChild); + return; + } + + if(this._op1_ == oldChild) + { + setOp1((PExp) newChild); + return; + } + + if(this._op2_ == oldChild) + { + setOp2((PExp) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/AAppel.java b/src/saParser/node/AAppel.java new file mode 100644 index 0000000..651e79d --- /dev/null +++ b/src/saParser/node/AAppel.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAppel extends PAppel +{ + private TPo _po_; + private TSaappel _saappel_; + private TId _id_; + private PLexp _lexp_; + private TPf _pf_; + + public AAppel() + { + // Constructor + } + + public AAppel( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSaappel _saappel_, + @SuppressWarnings("hiding") TId _id_, + @SuppressWarnings("hiding") PLexp _lexp_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSaappel(_saappel_); + + setId(_id_); + + setLexp(_lexp_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new AAppel( + cloneNode(this._po_), + cloneNode(this._saappel_), + cloneNode(this._id_), + cloneNode(this._lexp_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAppel(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSaappel getSaappel() + { + return this._saappel_; + } + + public void setSaappel(TSaappel node) + { + if(this._saappel_ != null) + { + this._saappel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._saappel_ = 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 PLexp getLexp() + { + return this._lexp_; + } + + public void setLexp(PLexp node) + { + if(this._lexp_ != null) + { + this._lexp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._lexp_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._saappel_) + + toString(this._id_) + + toString(this._lexp_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._saappel_ == child) + { + this._saappel_ = null; + return; + } + + if(this._id_ == child) + { + this._id_ = null; + return; + } + + if(this._lexp_ == child) + { + this._lexp_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._saappel_ == oldChild) + { + setSaappel((TSaappel) newChild); + return; + } + + if(this._id_ == oldChild) + { + setId((TId) newChild); + return; + } + + if(this._lexp_ == oldChild) + { + setLexp((PLexp) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/AAppelExp.java b/src/saParser/node/AAppelExp.java new file mode 100644 index 0000000..f801541 --- /dev/null +++ b/src/saParser/node/AAppelExp.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAppelExp extends PExp +{ + private TPo _po_; + private TSaexpappel _saexpappel_; + private PAppel _appel_; + private TPf _pf_; + + public AAppelExp() + { + // Constructor + } + + public AAppelExp( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSaexpappel _saexpappel_, + @SuppressWarnings("hiding") PAppel _appel_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSaexpappel(_saexpappel_); + + setAppel(_appel_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new AAppelExp( + cloneNode(this._po_), + cloneNode(this._saexpappel_), + cloneNode(this._appel_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAppelExp(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSaexpappel getSaexpappel() + { + return this._saexpappel_; + } + + public void setSaexpappel(TSaexpappel node) + { + if(this._saexpappel_ != null) + { + this._saexpappel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._saexpappel_ = node; + } + + public PAppel getAppel() + { + return this._appel_; + } + + public void setAppel(PAppel node) + { + if(this._appel_ != null) + { + this._appel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._appel_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._saexpappel_) + + toString(this._appel_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._saexpappel_ == child) + { + this._saexpappel_ = null; + return; + } + + if(this._appel_ == child) + { + this._appel_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._saexpappel_ == oldChild) + { + setSaexpappel((TSaexpappel) newChild); + return; + } + + if(this._appel_ == oldChild) + { + setAppel((PAppel) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/AAppelInst.java b/src/saParser/node/AAppelInst.java new file mode 100644 index 0000000..59baa63 --- /dev/null +++ b/src/saParser/node/AAppelInst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AAppelInst extends PInst +{ + private PAppel _appel_; + + public AAppelInst() + { + // Constructor + } + + public AAppelInst( + @SuppressWarnings("hiding") PAppel _appel_) + { + // Constructor + setAppel(_appel_); + + } + + @Override + public Object clone() + { + return new AAppelInst( + cloneNode(this._appel_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAAppelInst(this); + } + + public PAppel getAppel() + { + return this._appel_; + } + + public void setAppel(PAppel node) + { + if(this._appel_ != null) + { + this._appel_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._appel_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._appel_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._appel_ == child) + { + this._appel_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._appel_ == oldChild) + { + setAppel((PAppel) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/ABlocInst.java b/src/saParser/node/ABlocInst.java new file mode 100644 index 0000000..b8165c4 --- /dev/null +++ b/src/saParser/node/ABlocInst.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class ABlocInst extends PInst +{ + private TPo _po_; + private TSainstbloc _sainstbloc_; + private PLinst _linst_; + private TPf _pf_; + + public ABlocInst() + { + // Constructor + } + + public ABlocInst( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSainstbloc _sainstbloc_, + @SuppressWarnings("hiding") PLinst _linst_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSainstbloc(_sainstbloc_); + + setLinst(_linst_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new ABlocInst( + cloneNode(this._po_), + cloneNode(this._sainstbloc_), + cloneNode(this._linst_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseABlocInst(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSainstbloc getSainstbloc() + { + return this._sainstbloc_; + } + + public void setSainstbloc(TSainstbloc node) + { + if(this._sainstbloc_ != null) + { + this._sainstbloc_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._sainstbloc_ = node; + } + + public PLinst getLinst() + { + return this._linst_; + } + + public void setLinst(PLinst node) + { + if(this._linst_ != null) + { + this._linst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._linst_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._sainstbloc_) + + toString(this._linst_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._sainstbloc_ == child) + { + this._sainstbloc_ = null; + return; + } + + if(this._linst_ == child) + { + this._linst_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._sainstbloc_ == oldChild) + { + setSainstbloc((TSainstbloc) newChild); + return; + } + + if(this._linst_ == oldChild) + { + setLinst((PLinst) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/ABoolType.java b/src/saParser/node/ABoolType.java new file mode 100644 index 0000000..2deb0de --- /dev/null +++ b/src/saParser/node/ABoolType.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class ABoolType extends PType +{ + private TBool _bool_; + + public ABoolType() + { + // Constructor + } + + public ABoolType( + @SuppressWarnings("hiding") TBool _bool_) + { + // Constructor + setBool(_bool_); + + } + + @Override + public Object clone() + { + return new ABoolType( + cloneNode(this._bool_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseABoolType(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/saParser/node/ADecfonc.java b/src/saParser/node/ADecfonc.java new file mode 100644 index 0000000..fb6f1ee --- /dev/null +++ b/src/saParser/node/ADecfonc.java @@ -0,0 +1,396 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class ADecfonc extends PDecfonc +{ + private TPo _po_; + private TSadecfonc _sadecfonc_; + private TId _id_; + private PType _type_; + private PLdecvar _param_; + private PLdecvar _variables_; + private PInst _inst_; + private TPf _pf_; + + public ADecfonc() + { + // Constructor + } + + public ADecfonc( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSadecfonc _sadecfonc_, + @SuppressWarnings("hiding") TId _id_, + @SuppressWarnings("hiding") PType _type_, + @SuppressWarnings("hiding") PLdecvar _param_, + @SuppressWarnings("hiding") PLdecvar _variables_, + @SuppressWarnings("hiding") PInst _inst_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSadecfonc(_sadecfonc_); + + setId(_id_); + + setType(_type_); + + setParam(_param_); + + setVariables(_variables_); + + setInst(_inst_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new ADecfonc( + cloneNode(this._po_), + cloneNode(this._sadecfonc_), + cloneNode(this._id_), + cloneNode(this._type_), + cloneNode(this._param_), + cloneNode(this._variables_), + cloneNode(this._inst_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseADecfonc(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSadecfonc getSadecfonc() + { + return this._sadecfonc_; + } + + public void setSadecfonc(TSadecfonc node) + { + if(this._sadecfonc_ != null) + { + this._sadecfonc_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._sadecfonc_ = 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 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 PLdecvar getParam() + { + return this._param_; + } + + public void setParam(PLdecvar node) + { + if(this._param_ != null) + { + this._param_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._param_ = node; + } + + public PLdecvar getVariables() + { + return this._variables_; + } + + public void setVariables(PLdecvar node) + { + if(this._variables_ != null) + { + this._variables_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._variables_ = node; + } + + public PInst getInst() + { + return this._inst_; + } + + public void setInst(PInst node) + { + if(this._inst_ != null) + { + this._inst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._inst_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._sadecfonc_) + + toString(this._id_) + + toString(this._type_) + + toString(this._param_) + + toString(this._variables_) + + toString(this._inst_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._sadecfonc_ == child) + { + this._sadecfonc_ = null; + return; + } + + if(this._id_ == child) + { + this._id_ = null; + return; + } + + if(this._type_ == child) + { + this._type_ = null; + return; + } + + if(this._param_ == child) + { + this._param_ = null; + return; + } + + if(this._variables_ == child) + { + this._variables_ = null; + return; + } + + if(this._inst_ == child) + { + this._inst_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._sadecfonc_ == oldChild) + { + setSadecfonc((TSadecfonc) newChild); + return; + } + + if(this._id_ == oldChild) + { + setId((TId) newChild); + return; + } + + if(this._type_ == oldChild) + { + setType((PType) newChild); + return; + } + + if(this._param_ == oldChild) + { + setParam((PLdecvar) newChild); + return; + } + + if(this._variables_ == oldChild) + { + setVariables((PLdecvar) newChild); + return; + } + + if(this._inst_ == oldChild) + { + setInst((PInst) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/ADivExp.java b/src/saParser/node/ADivExp.java new file mode 100644 index 0000000..06f1290 --- /dev/null +++ b/src/saParser/node/ADivExp.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class ADivExp extends PExp +{ + private TPo _po_; + private TSaexpdiv _saexpdiv_; + private PExp _op1_; + private PExp _op2_; + private TPf _pf_; + + public ADivExp() + { + // Constructor + } + + public ADivExp( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSaexpdiv _saexpdiv_, + @SuppressWarnings("hiding") PExp _op1_, + @SuppressWarnings("hiding") PExp _op2_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSaexpdiv(_saexpdiv_); + + setOp1(_op1_); + + setOp2(_op2_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new ADivExp( + cloneNode(this._po_), + cloneNode(this._saexpdiv_), + cloneNode(this._op1_), + cloneNode(this._op2_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseADivExp(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSaexpdiv getSaexpdiv() + { + return this._saexpdiv_; + } + + public void setSaexpdiv(TSaexpdiv node) + { + if(this._saexpdiv_ != null) + { + this._saexpdiv_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._saexpdiv_ = node; + } + + public PExp getOp1() + { + return this._op1_; + } + + public void setOp1(PExp node) + { + if(this._op1_ != null) + { + this._op1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op1_ = node; + } + + public PExp getOp2() + { + return this._op2_; + } + + public void setOp2(PExp node) + { + if(this._op2_ != null) + { + this._op2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op2_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._saexpdiv_) + + toString(this._op1_) + + toString(this._op2_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._saexpdiv_ == child) + { + this._saexpdiv_ = null; + return; + } + + if(this._op1_ == child) + { + this._op1_ = null; + return; + } + + if(this._op2_ == child) + { + this._op2_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._saexpdiv_ == oldChild) + { + setSaexpdiv((TSaexpdiv) newChild); + return; + } + + if(this._op1_ == oldChild) + { + setOp1((PExp) newChild); + return; + } + + if(this._op2_ == oldChild) + { + setOp2((PExp) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/AEcritureInst.java b/src/saParser/node/AEcritureInst.java new file mode 100644 index 0000000..d2d9dc8 --- /dev/null +++ b/src/saParser/node/AEcritureInst.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEcritureInst extends PInst +{ + private TPo _po_; + private TSainstecriture _sainstecriture_; + private PExp _exp_; + private TPf _pf_; + + public AEcritureInst() + { + // Constructor + } + + public AEcritureInst( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSainstecriture _sainstecriture_, + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSainstecriture(_sainstecriture_); + + setExp(_exp_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new AEcritureInst( + cloneNode(this._po_), + cloneNode(this._sainstecriture_), + cloneNode(this._exp_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEcritureInst(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSainstecriture getSainstecriture() + { + return this._sainstecriture_; + } + + public void setSainstecriture(TSainstecriture node) + { + if(this._sainstecriture_ != null) + { + this._sainstecriture_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._sainstecriture_ = 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 TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._sainstecriture_) + + toString(this._exp_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._sainstecriture_ == child) + { + this._sainstecriture_ = null; + return; + } + + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._sainstecriture_ == oldChild) + { + setSainstecriture((TSainstecriture) newChild); + return; + } + + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/AEntierType.java b/src/saParser/node/AEntierType.java new file mode 100644 index 0000000..a3cbf0d --- /dev/null +++ b/src/saParser/node/AEntierType.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEntierType extends PType +{ + private TEntier _entier_; + + public AEntierType() + { + // Constructor + } + + public AEntierType( + @SuppressWarnings("hiding") TEntier _entier_) + { + // Constructor + setEntier(_entier_); + + } + + @Override + public Object clone() + { + return new AEntierType( + cloneNode(this._entier_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEntierType(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/saParser/node/AEqualExp.java b/src/saParser/node/AEqualExp.java new file mode 100644 index 0000000..6a9c2ad --- /dev/null +++ b/src/saParser/node/AEqualExp.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AEqualExp extends PExp +{ + private TPo _po_; + private TSaexpequal _saexpequal_; + private PExp _op1_; + private PExp _op2_; + private TPf _pf_; + + public AEqualExp() + { + // Constructor + } + + public AEqualExp( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSaexpequal _saexpequal_, + @SuppressWarnings("hiding") PExp _op1_, + @SuppressWarnings("hiding") PExp _op2_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSaexpequal(_saexpequal_); + + setOp1(_op1_); + + setOp2(_op2_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new AEqualExp( + cloneNode(this._po_), + cloneNode(this._saexpequal_), + cloneNode(this._op1_), + cloneNode(this._op2_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAEqualExp(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSaexpequal getSaexpequal() + { + return this._saexpequal_; + } + + public void setSaexpequal(TSaexpequal node) + { + if(this._saexpequal_ != null) + { + this._saexpequal_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._saexpequal_ = node; + } + + public PExp getOp1() + { + return this._op1_; + } + + public void setOp1(PExp node) + { + if(this._op1_ != null) + { + this._op1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op1_ = node; + } + + public PExp getOp2() + { + return this._op2_; + } + + public void setOp2(PExp node) + { + if(this._op2_ != null) + { + this._op2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op2_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._saexpequal_) + + toString(this._op1_) + + toString(this._op2_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._saexpequal_ == child) + { + this._saexpequal_ = null; + return; + } + + if(this._op1_ == child) + { + this._op1_ = null; + return; + } + + if(this._op2_ == child) + { + this._op2_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._saexpequal_ == oldChild) + { + setSaexpequal((TSaexpequal) newChild); + return; + } + + if(this._op1_ == oldChild) + { + setOp1((PExp) newChild); + return; + } + + if(this._op2_ == oldChild) + { + setOp2((PExp) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/AFauxExp.java b/src/saParser/node/AFauxExp.java new file mode 100644 index 0000000..6fe3d38 --- /dev/null +++ b/src/saParser/node/AFauxExp.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AFauxExp extends PExp +{ + private TFaux _faux_; + + public AFauxExp() + { + // Constructor + } + + public AFauxExp( + @SuppressWarnings("hiding") TFaux _faux_) + { + // Constructor + setFaux(_faux_); + + } + + @Override + public Object clone() + { + return new AFauxExp( + cloneNode(this._faux_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAFauxExp(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/saParser/node/AFinLdecfonc.java b/src/saParser/node/AFinLdecfonc.java new file mode 100644 index 0000000..ed42bd5 --- /dev/null +++ b/src/saParser/node/AFinLdecfonc.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AFinLdecfonc extends PLdecfonc +{ + private TNull _null_; + + public AFinLdecfonc() + { + // Constructor + } + + public AFinLdecfonc( + @SuppressWarnings("hiding") TNull _null_) + { + // Constructor + setNull(_null_); + + } + + @Override + public Object clone() + { + return new AFinLdecfonc( + cloneNode(this._null_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAFinLdecfonc(this); + } + + public TNull getNull() + { + return this._null_; + } + + public void setNull(TNull node) + { + if(this._null_ != null) + { + this._null_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._null_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._null_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._null_ == child) + { + this._null_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._null_ == oldChild) + { + setNull((TNull) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/AFinLdecvar.java b/src/saParser/node/AFinLdecvar.java new file mode 100644 index 0000000..d16d56d --- /dev/null +++ b/src/saParser/node/AFinLdecvar.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AFinLdecvar extends PLdecvar +{ + private TNull _null_; + + public AFinLdecvar() + { + // Constructor + } + + public AFinLdecvar( + @SuppressWarnings("hiding") TNull _null_) + { + // Constructor + setNull(_null_); + + } + + @Override + public Object clone() + { + return new AFinLdecvar( + cloneNode(this._null_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAFinLdecvar(this); + } + + public TNull getNull() + { + return this._null_; + } + + public void setNull(TNull node) + { + if(this._null_ != null) + { + this._null_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._null_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._null_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._null_ == child) + { + this._null_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._null_ == oldChild) + { + setNull((TNull) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/AFinLexp.java b/src/saParser/node/AFinLexp.java new file mode 100644 index 0000000..de9d127 --- /dev/null +++ b/src/saParser/node/AFinLexp.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AFinLexp extends PLexp +{ + private TNull _null_; + + public AFinLexp() + { + // Constructor + } + + public AFinLexp( + @SuppressWarnings("hiding") TNull _null_) + { + // Constructor + setNull(_null_); + + } + + @Override + public Object clone() + { + return new AFinLexp( + cloneNode(this._null_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAFinLexp(this); + } + + public TNull getNull() + { + return this._null_; + } + + public void setNull(TNull node) + { + if(this._null_ != null) + { + this._null_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._null_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._null_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._null_ == child) + { + this._null_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._null_ == oldChild) + { + setNull((TNull) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/AFinLinst.java b/src/saParser/node/AFinLinst.java new file mode 100644 index 0000000..c725dcd --- /dev/null +++ b/src/saParser/node/AFinLinst.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AFinLinst extends PLinst +{ + private TNull _null_; + + public AFinLinst() + { + // Constructor + } + + public AFinLinst( + @SuppressWarnings("hiding") TNull _null_) + { + // Constructor + setNull(_null_); + + } + + @Override + public Object clone() + { + return new AFinLinst( + cloneNode(this._null_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAFinLinst(this); + } + + public TNull getNull() + { + return this._null_; + } + + public void setNull(TNull node) + { + if(this._null_ != null) + { + this._null_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._null_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._null_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._null_ == child) + { + this._null_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._null_ == oldChild) + { + setNull((TNull) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/AIndiceeVar.java b/src/saParser/node/AIndiceeVar.java new file mode 100644 index 0000000..9720d11 --- /dev/null +++ b/src/saParser/node/AIndiceeVar.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AIndiceeVar extends PVar +{ + private TPo _po_; + private TSavarindicee _savarindicee_; + private TId _id_; + private PExp _exp_; + private TPf _pf_; + + public AIndiceeVar() + { + // Constructor + } + + public AIndiceeVar( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSavarindicee _savarindicee_, + @SuppressWarnings("hiding") TId _id_, + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSavarindicee(_savarindicee_); + + setId(_id_); + + setExp(_exp_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new AIndiceeVar( + cloneNode(this._po_), + cloneNode(this._savarindicee_), + cloneNode(this._id_), + cloneNode(this._exp_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAIndiceeVar(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSavarindicee getSavarindicee() + { + return this._savarindicee_; + } + + public void setSavarindicee(TSavarindicee node) + { + if(this._savarindicee_ != null) + { + this._savarindicee_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._savarindicee_ = 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 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 TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._savarindicee_) + + toString(this._id_) + + toString(this._exp_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._savarindicee_ == child) + { + this._savarindicee_ = null; + return; + } + + if(this._id_ == child) + { + this._id_ = null; + return; + } + + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._savarindicee_ == oldChild) + { + setSavarindicee((TSavarindicee) newChild); + return; + } + + if(this._id_ == oldChild) + { + setId((TId) newChild); + return; + } + + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/AInfExp.java b/src/saParser/node/AInfExp.java new file mode 100644 index 0000000..fe628c1 --- /dev/null +++ b/src/saParser/node/AInfExp.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AInfExp extends PExp +{ + private TPo _po_; + private TSaexpinf _saexpinf_; + private PExp _op1_; + private PExp _op2_; + private TPf _pf_; + + public AInfExp() + { + // Constructor + } + + public AInfExp( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSaexpinf _saexpinf_, + @SuppressWarnings("hiding") PExp _op1_, + @SuppressWarnings("hiding") PExp _op2_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSaexpinf(_saexpinf_); + + setOp1(_op1_); + + setOp2(_op2_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new AInfExp( + cloneNode(this._po_), + cloneNode(this._saexpinf_), + cloneNode(this._op1_), + cloneNode(this._op2_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAInfExp(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSaexpinf getSaexpinf() + { + return this._saexpinf_; + } + + public void setSaexpinf(TSaexpinf node) + { + if(this._saexpinf_ != null) + { + this._saexpinf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._saexpinf_ = node; + } + + public PExp getOp1() + { + return this._op1_; + } + + public void setOp1(PExp node) + { + if(this._op1_ != null) + { + this._op1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op1_ = node; + } + + public PExp getOp2() + { + return this._op2_; + } + + public void setOp2(PExp node) + { + if(this._op2_ != null) + { + this._op2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op2_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._saexpinf_) + + toString(this._op1_) + + toString(this._op2_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._saexpinf_ == child) + { + this._saexpinf_ = null; + return; + } + + if(this._op1_ == child) + { + this._op1_ = null; + return; + } + + if(this._op2_ == child) + { + this._op2_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._saexpinf_ == oldChild) + { + setSaexpinf((TSaexpinf) newChild); + return; + } + + if(this._op1_ == oldChild) + { + setOp1((PExp) newChild); + return; + } + + if(this._op2_ == oldChild) + { + setOp2((PExp) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/AIntExp.java b/src/saParser/node/AIntExp.java new file mode 100644 index 0000000..d507d9e --- /dev/null +++ b/src/saParser/node/AIntExp.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AIntExp extends PExp +{ + private TInteger _integer_; + + public AIntExp() + { + // Constructor + } + + public AIntExp( + @SuppressWarnings("hiding") TInteger _integer_) + { + // Constructor + setInteger(_integer_); + + } + + @Override + public Object clone() + { + return new AIntExp( + cloneNode(this._integer_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAIntExp(this); + } + + public TInteger getInteger() + { + return this._integer_; + } + + public void setInteger(TInteger node) + { + if(this._integer_ != null) + { + this._integer_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._integer_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._integer_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._integer_ == child) + { + this._integer_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._integer_ == oldChild) + { + setInteger((TInteger) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/ALireExp.java b/src/saParser/node/ALireExp.java new file mode 100644 index 0000000..c6d90b4 --- /dev/null +++ b/src/saParser/node/ALireExp.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class ALireExp extends PExp +{ + private TLire _lire_; + + public ALireExp() + { + // Constructor + } + + public ALireExp( + @SuppressWarnings("hiding") TLire _lire_) + { + // Constructor + setLire(_lire_); + + } + + @Override + public Object clone() + { + return new ALireExp( + cloneNode(this._lire_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseALireExp(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; + } + + @Override + public String toString() + { + return "" + + toString(this._lire_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._lire_ == child) + { + this._lire_ = 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; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/AMultExp.java b/src/saParser/node/AMultExp.java new file mode 100644 index 0000000..52b96ce --- /dev/null +++ b/src/saParser/node/AMultExp.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AMultExp extends PExp +{ + private TPo _po_; + private TSaexpmult _saexpmult_; + private PExp _op1_; + private PExp _op2_; + private TPf _pf_; + + public AMultExp() + { + // Constructor + } + + public AMultExp( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSaexpmult _saexpmult_, + @SuppressWarnings("hiding") PExp _op1_, + @SuppressWarnings("hiding") PExp _op2_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSaexpmult(_saexpmult_); + + setOp1(_op1_); + + setOp2(_op2_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new AMultExp( + cloneNode(this._po_), + cloneNode(this._saexpmult_), + cloneNode(this._op1_), + cloneNode(this._op2_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAMultExp(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSaexpmult getSaexpmult() + { + return this._saexpmult_; + } + + public void setSaexpmult(TSaexpmult node) + { + if(this._saexpmult_ != null) + { + this._saexpmult_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._saexpmult_ = node; + } + + public PExp getOp1() + { + return this._op1_; + } + + public void setOp1(PExp node) + { + if(this._op1_ != null) + { + this._op1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op1_ = node; + } + + public PExp getOp2() + { + return this._op2_; + } + + public void setOp2(PExp node) + { + if(this._op2_ != null) + { + this._op2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op2_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._saexpmult_) + + toString(this._op1_) + + toString(this._op2_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._saexpmult_ == child) + { + this._saexpmult_ = null; + return; + } + + if(this._op1_ == child) + { + this._op1_ = null; + return; + } + + if(this._op2_ == child) + { + this._op2_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._saexpmult_ == oldChild) + { + setSaexpmult((TSaexpmult) newChild); + return; + } + + if(this._op1_ == oldChild) + { + setOp1((PExp) newChild); + return; + } + + if(this._op2_ == oldChild) + { + setOp2((PExp) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/ANotExp.java b/src/saParser/node/ANotExp.java new file mode 100644 index 0000000..83787a5 --- /dev/null +++ b/src/saParser/node/ANotExp.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class ANotExp extends PExp +{ + private TPo _po_; + private TSaexpnot _saexpnot_; + private PExp _exp_; + private TPf _pf_; + + public ANotExp() + { + // Constructor + } + + public ANotExp( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSaexpnot _saexpnot_, + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSaexpnot(_saexpnot_); + + setExp(_exp_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new ANotExp( + cloneNode(this._po_), + cloneNode(this._saexpnot_), + cloneNode(this._exp_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseANotExp(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSaexpnot getSaexpnot() + { + return this._saexpnot_; + } + + public void setSaexpnot(TSaexpnot node) + { + if(this._saexpnot_ != null) + { + this._saexpnot_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._saexpnot_ = 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 TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._saexpnot_) + + toString(this._exp_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._saexpnot_ == child) + { + this._saexpnot_ = null; + return; + } + + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._saexpnot_ == oldChild) + { + setSaexpnot((TSaexpnot) newChild); + return; + } + + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/ANullType.java b/src/saParser/node/ANullType.java new file mode 100644 index 0000000..4985cf8 --- /dev/null +++ b/src/saParser/node/ANullType.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class ANullType extends PType +{ + private TNul _nul_; + + public ANullType() + { + // Constructor + } + + public ANullType( + @SuppressWarnings("hiding") TNul _nul_) + { + // Constructor + setNul(_nul_); + + } + + @Override + public Object clone() + { + return new ANullType( + cloneNode(this._nul_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseANullType(this); + } + + public TNul getNul() + { + return this._nul_; + } + + public void setNul(TNul node) + { + if(this._nul_ != null) + { + this._nul_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._nul_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._nul_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._nul_ == child) + { + this._nul_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._nul_ == oldChild) + { + setNul((TNul) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/AOrExp.java b/src/saParser/node/AOrExp.java new file mode 100644 index 0000000..6656f89 --- /dev/null +++ b/src/saParser/node/AOrExp.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AOrExp extends PExp +{ + private TPo _po_; + private TSaexpor _saexpor_; + private PExp _op1_; + private PExp _op2_; + private TPf _pf_; + + public AOrExp() + { + // Constructor + } + + public AOrExp( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSaexpor _saexpor_, + @SuppressWarnings("hiding") PExp _op1_, + @SuppressWarnings("hiding") PExp _op2_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSaexpor(_saexpor_); + + setOp1(_op1_); + + setOp2(_op2_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new AOrExp( + cloneNode(this._po_), + cloneNode(this._saexpor_), + cloneNode(this._op1_), + cloneNode(this._op2_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAOrExp(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSaexpor getSaexpor() + { + return this._saexpor_; + } + + public void setSaexpor(TSaexpor node) + { + if(this._saexpor_ != null) + { + this._saexpor_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._saexpor_ = node; + } + + public PExp getOp1() + { + return this._op1_; + } + + public void setOp1(PExp node) + { + if(this._op1_ != null) + { + this._op1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op1_ = node; + } + + public PExp getOp2() + { + return this._op2_; + } + + public void setOp2(PExp node) + { + if(this._op2_ != null) + { + this._op2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op2_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._saexpor_) + + toString(this._op1_) + + toString(this._op2_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._saexpor_ == child) + { + this._saexpor_ = null; + return; + } + + if(this._op1_ == child) + { + this._op1_ = null; + return; + } + + if(this._op2_ == child) + { + this._op2_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._saexpor_ == oldChild) + { + setSaexpor((TSaexpor) newChild); + return; + } + + if(this._op1_ == oldChild) + { + setOp1((PExp) newChild); + return; + } + + if(this._op2_ == oldChild) + { + setOp2((PExp) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/AProg.java b/src/saParser/node/AProg.java new file mode 100644 index 0000000..6f0fc82 --- /dev/null +++ b/src/saParser/node/AProg.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AProg extends PProg +{ + private TPo _po_; + private TSaprog _saprog_; + private PLdecvar _ldecvar_; + private PLdecfonc _ldecfonc_; + private TPf _pf_; + + public AProg() + { + // Constructor + } + + public AProg( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSaprog _saprog_, + @SuppressWarnings("hiding") PLdecvar _ldecvar_, + @SuppressWarnings("hiding") PLdecfonc _ldecfonc_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSaprog(_saprog_); + + setLdecvar(_ldecvar_); + + setLdecfonc(_ldecfonc_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new AProg( + cloneNode(this._po_), + cloneNode(this._saprog_), + cloneNode(this._ldecvar_), + cloneNode(this._ldecfonc_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAProg(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSaprog getSaprog() + { + return this._saprog_; + } + + public void setSaprog(TSaprog node) + { + if(this._saprog_ != null) + { + this._saprog_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._saprog_ = node; + } + + public PLdecvar getLdecvar() + { + return this._ldecvar_; + } + + public void setLdecvar(PLdecvar node) + { + if(this._ldecvar_ != null) + { + this._ldecvar_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ldecvar_ = node; + } + + public PLdecfonc getLdecfonc() + { + return this._ldecfonc_; + } + + public void setLdecfonc(PLdecfonc node) + { + if(this._ldecfonc_ != null) + { + this._ldecfonc_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ldecfonc_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._saprog_) + + toString(this._ldecvar_) + + toString(this._ldecfonc_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._saprog_ == child) + { + this._saprog_ = null; + return; + } + + if(this._ldecvar_ == child) + { + this._ldecvar_ = null; + return; + } + + if(this._ldecfonc_ == child) + { + this._ldecfonc_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._saprog_ == oldChild) + { + setSaprog((TSaprog) newChild); + return; + } + + if(this._ldecvar_ == oldChild) + { + setLdecvar((PLdecvar) newChild); + return; + } + + if(this._ldecfonc_ == oldChild) + { + setLdecfonc((PLdecfonc) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/ARecLdecfonc.java b/src/saParser/node/ARecLdecfonc.java new file mode 100644 index 0000000..ee08622 --- /dev/null +++ b/src/saParser/node/ARecLdecfonc.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class ARecLdecfonc extends PLdecfonc +{ + private TPo _po_; + private TSaldecfonc _saldecfonc_; + private PDecfonc _decfonc_; + private PLdecfonc _ldecfonc_; + private TPf _pf_; + + public ARecLdecfonc() + { + // Constructor + } + + public ARecLdecfonc( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSaldecfonc _saldecfonc_, + @SuppressWarnings("hiding") PDecfonc _decfonc_, + @SuppressWarnings("hiding") PLdecfonc _ldecfonc_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSaldecfonc(_saldecfonc_); + + setDecfonc(_decfonc_); + + setLdecfonc(_ldecfonc_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new ARecLdecfonc( + cloneNode(this._po_), + cloneNode(this._saldecfonc_), + cloneNode(this._decfonc_), + cloneNode(this._ldecfonc_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseARecLdecfonc(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSaldecfonc getSaldecfonc() + { + return this._saldecfonc_; + } + + public void setSaldecfonc(TSaldecfonc node) + { + if(this._saldecfonc_ != null) + { + this._saldecfonc_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._saldecfonc_ = node; + } + + 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 PLdecfonc getLdecfonc() + { + return this._ldecfonc_; + } + + public void setLdecfonc(PLdecfonc node) + { + if(this._ldecfonc_ != null) + { + this._ldecfonc_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ldecfonc_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._saldecfonc_) + + toString(this._decfonc_) + + toString(this._ldecfonc_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._saldecfonc_ == child) + { + this._saldecfonc_ = null; + return; + } + + if(this._decfonc_ == child) + { + this._decfonc_ = null; + return; + } + + if(this._ldecfonc_ == child) + { + this._ldecfonc_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._saldecfonc_ == oldChild) + { + setSaldecfonc((TSaldecfonc) newChild); + return; + } + + if(this._decfonc_ == oldChild) + { + setDecfonc((PDecfonc) newChild); + return; + } + + if(this._ldecfonc_ == oldChild) + { + setLdecfonc((PLdecfonc) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/ARecLdecvar.java b/src/saParser/node/ARecLdecvar.java new file mode 100644 index 0000000..e49c72c --- /dev/null +++ b/src/saParser/node/ARecLdecvar.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class ARecLdecvar extends PLdecvar +{ + private TPo _po_; + private TSaldecvar _saldecvar_; + private PDecvar _decvar_; + private PLdecvar _ldecvar_; + private TPf _pf_; + + public ARecLdecvar() + { + // Constructor + } + + public ARecLdecvar( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSaldecvar _saldecvar_, + @SuppressWarnings("hiding") PDecvar _decvar_, + @SuppressWarnings("hiding") PLdecvar _ldecvar_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSaldecvar(_saldecvar_); + + setDecvar(_decvar_); + + setLdecvar(_ldecvar_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new ARecLdecvar( + cloneNode(this._po_), + cloneNode(this._saldecvar_), + cloneNode(this._decvar_), + cloneNode(this._ldecvar_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseARecLdecvar(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSaldecvar getSaldecvar() + { + return this._saldecvar_; + } + + public void setSaldecvar(TSaldecvar node) + { + if(this._saldecvar_ != null) + { + this._saldecvar_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._saldecvar_ = 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 PLdecvar getLdecvar() + { + return this._ldecvar_; + } + + public void setLdecvar(PLdecvar node) + { + if(this._ldecvar_ != null) + { + this._ldecvar_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._ldecvar_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._saldecvar_) + + toString(this._decvar_) + + toString(this._ldecvar_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._saldecvar_ == child) + { + this._saldecvar_ = null; + return; + } + + if(this._decvar_ == child) + { + this._decvar_ = null; + return; + } + + if(this._ldecvar_ == child) + { + this._ldecvar_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._saldecvar_ == oldChild) + { + setSaldecvar((TSaldecvar) newChild); + return; + } + + if(this._decvar_ == oldChild) + { + setDecvar((PDecvar) newChild); + return; + } + + if(this._ldecvar_ == oldChild) + { + setLdecvar((PLdecvar) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/ARecLexp.java b/src/saParser/node/ARecLexp.java new file mode 100644 index 0000000..3362854 --- /dev/null +++ b/src/saParser/node/ARecLexp.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class ARecLexp extends PLexp +{ + private TPo _po_; + private TSalexp _salexp_; + private PExp _exp_; + private PLexp _lexp_; + private TPf _pf_; + + public ARecLexp() + { + // Constructor + } + + public ARecLexp( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSalexp _salexp_, + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") PLexp _lexp_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSalexp(_salexp_); + + setExp(_exp_); + + setLexp(_lexp_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new ARecLexp( + cloneNode(this._po_), + cloneNode(this._salexp_), + cloneNode(this._exp_), + cloneNode(this._lexp_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseARecLexp(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSalexp getSalexp() + { + return this._salexp_; + } + + public void setSalexp(TSalexp node) + { + if(this._salexp_ != null) + { + this._salexp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._salexp_ = 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 PLexp getLexp() + { + return this._lexp_; + } + + public void setLexp(PLexp node) + { + if(this._lexp_ != null) + { + this._lexp_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._lexp_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._salexp_) + + toString(this._exp_) + + toString(this._lexp_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._salexp_ == child) + { + this._salexp_ = null; + return; + } + + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._lexp_ == child) + { + this._lexp_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._salexp_ == oldChild) + { + setSalexp((TSalexp) newChild); + return; + } + + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._lexp_ == oldChild) + { + setLexp((PLexp) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/ARecLinst.java b/src/saParser/node/ARecLinst.java new file mode 100644 index 0000000..25f532b --- /dev/null +++ b/src/saParser/node/ARecLinst.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class ARecLinst extends PLinst +{ + private TPo _po_; + private TSalinst _salinst_; + private PInst _inst_; + private PLinst _linst_; + private TPf _pf_; + + public ARecLinst() + { + // Constructor + } + + public ARecLinst( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSalinst _salinst_, + @SuppressWarnings("hiding") PInst _inst_, + @SuppressWarnings("hiding") PLinst _linst_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSalinst(_salinst_); + + setInst(_inst_); + + setLinst(_linst_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new ARecLinst( + cloneNode(this._po_), + cloneNode(this._salinst_), + cloneNode(this._inst_), + cloneNode(this._linst_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseARecLinst(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSalinst getSalinst() + { + return this._salinst_; + } + + public void setSalinst(TSalinst node) + { + if(this._salinst_ != null) + { + this._salinst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._salinst_ = node; + } + + public PInst getInst() + { + return this._inst_; + } + + public void setInst(PInst node) + { + if(this._inst_ != null) + { + this._inst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._inst_ = node; + } + + public PLinst getLinst() + { + return this._linst_; + } + + public void setLinst(PLinst node) + { + if(this._linst_ != null) + { + this._linst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._linst_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._salinst_) + + toString(this._inst_) + + toString(this._linst_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._salinst_ == child) + { + this._salinst_ = null; + return; + } + + if(this._inst_ == child) + { + this._inst_ = null; + return; + } + + if(this._linst_ == child) + { + this._linst_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._salinst_ == oldChild) + { + setSalinst((TSalinst) newChild); + return; + } + + if(this._inst_ == oldChild) + { + setInst((PInst) newChild); + return; + } + + if(this._linst_ == oldChild) + { + setLinst((PLinst) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/ARetourInst.java b/src/saParser/node/ARetourInst.java new file mode 100644 index 0000000..f866655 --- /dev/null +++ b/src/saParser/node/ARetourInst.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class ARetourInst extends PInst +{ + private TPo _po_; + private TSainstretour _sainstretour_; + private PExp _exp_; + private TPf _pf_; + + public ARetourInst() + { + // Constructor + } + + public ARetourInst( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSainstretour _sainstretour_, + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSainstretour(_sainstretour_); + + setExp(_exp_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new ARetourInst( + cloneNode(this._po_), + cloneNode(this._sainstretour_), + cloneNode(this._exp_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseARetourInst(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSainstretour getSainstretour() + { + return this._sainstretour_; + } + + public void setSainstretour(TSainstretour node) + { + if(this._sainstretour_ != null) + { + this._sainstretour_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._sainstretour_ = 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 TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._sainstretour_) + + toString(this._exp_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._sainstretour_ == child) + { + this._sainstretour_ = null; + return; + } + + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._sainstretour_ == oldChild) + { + setSainstretour((TSainstretour) newChild); + return; + } + + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/ASi2Inst.java b/src/saParser/node/ASi2Inst.java new file mode 100644 index 0000000..9b2dbd3 --- /dev/null +++ b/src/saParser/node/ASi2Inst.java @@ -0,0 +1,310 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class ASi2Inst extends PInst +{ + private TPo _po_; + private TSainstsi _sainstsi_; + private PExp _exp_; + private PInst _alors_; + private TNull _null_; + private TPf _pf_; + + public ASi2Inst() + { + // Constructor + } + + public ASi2Inst( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSainstsi _sainstsi_, + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") PInst _alors_, + @SuppressWarnings("hiding") TNull _null_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSainstsi(_sainstsi_); + + setExp(_exp_); + + setAlors(_alors_); + + setNull(_null_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new ASi2Inst( + cloneNode(this._po_), + cloneNode(this._sainstsi_), + cloneNode(this._exp_), + cloneNode(this._alors_), + cloneNode(this._null_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseASi2Inst(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSainstsi getSainstsi() + { + return this._sainstsi_; + } + + public void setSainstsi(TSainstsi node) + { + if(this._sainstsi_ != null) + { + this._sainstsi_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._sainstsi_ = 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 PInst getAlors() + { + return this._alors_; + } + + public void setAlors(PInst 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 TNull getNull() + { + return this._null_; + } + + public void setNull(TNull node) + { + if(this._null_ != null) + { + this._null_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._null_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._sainstsi_) + + toString(this._exp_) + + toString(this._alors_) + + toString(this._null_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._sainstsi_ == child) + { + this._sainstsi_ = null; + return; + } + + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._alors_ == child) + { + this._alors_ = null; + return; + } + + if(this._null_ == child) + { + this._null_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._sainstsi_ == oldChild) + { + setSainstsi((TSainstsi) newChild); + return; + } + + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._alors_ == oldChild) + { + setAlors((PInst) newChild); + return; + } + + if(this._null_ == oldChild) + { + setNull((TNull) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/ASiInst.java b/src/saParser/node/ASiInst.java new file mode 100644 index 0000000..02d314f --- /dev/null +++ b/src/saParser/node/ASiInst.java @@ -0,0 +1,310 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class ASiInst extends PInst +{ + private TPo _po_; + private TSainstsi _sainstsi_; + private PExp _exp_; + private PInst _alors_; + private PInst _sinon_; + private TPf _pf_; + + public ASiInst() + { + // Constructor + } + + public ASiInst( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSainstsi _sainstsi_, + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") PInst _alors_, + @SuppressWarnings("hiding") PInst _sinon_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSainstsi(_sainstsi_); + + setExp(_exp_); + + setAlors(_alors_); + + setSinon(_sinon_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new ASiInst( + cloneNode(this._po_), + cloneNode(this._sainstsi_), + cloneNode(this._exp_), + cloneNode(this._alors_), + cloneNode(this._sinon_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseASiInst(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSainstsi getSainstsi() + { + return this._sainstsi_; + } + + public void setSainstsi(TSainstsi node) + { + if(this._sainstsi_ != null) + { + this._sainstsi_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._sainstsi_ = 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 PInst getAlors() + { + return this._alors_; + } + + public void setAlors(PInst 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 PInst getSinon() + { + return this._sinon_; + } + + public void setSinon(PInst 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 TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._sainstsi_) + + toString(this._exp_) + + toString(this._alors_) + + toString(this._sinon_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._sainstsi_ == child) + { + this._sainstsi_ = null; + return; + } + + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._alors_ == child) + { + this._alors_ = null; + return; + } + + if(this._sinon_ == child) + { + this._sinon_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._sainstsi_ == oldChild) + { + setSainstsi((TSainstsi) newChild); + return; + } + + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._alors_ == oldChild) + { + setAlors((PInst) newChild); + return; + } + + if(this._sinon_ == oldChild) + { + setSinon((PInst) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/ASimpleDecvar.java b/src/saParser/node/ASimpleDecvar.java new file mode 100644 index 0000000..6b68a71 --- /dev/null +++ b/src/saParser/node/ASimpleDecvar.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class ASimpleDecvar extends PDecvar +{ + private TPo _po_; + private TSadecvarsimple _sadecvarsimple_; + private TId _id_; + private PType _type_; + private TPf _pf_; + + public ASimpleDecvar() + { + // Constructor + } + + public ASimpleDecvar( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSadecvarsimple _sadecvarsimple_, + @SuppressWarnings("hiding") TId _id_, + @SuppressWarnings("hiding") PType _type_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSadecvarsimple(_sadecvarsimple_); + + setId(_id_); + + setType(_type_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new ASimpleDecvar( + cloneNode(this._po_), + cloneNode(this._sadecvarsimple_), + cloneNode(this._id_), + cloneNode(this._type_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseASimpleDecvar(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSadecvarsimple getSadecvarsimple() + { + return this._sadecvarsimple_; + } + + public void setSadecvarsimple(TSadecvarsimple node) + { + if(this._sadecvarsimple_ != null) + { + this._sadecvarsimple_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._sadecvarsimple_ = 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 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 TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._sadecvarsimple_) + + toString(this._id_) + + toString(this._type_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._sadecvarsimple_ == child) + { + this._sadecvarsimple_ = null; + return; + } + + if(this._id_ == child) + { + this._id_ = null; + return; + } + + if(this._type_ == child) + { + this._type_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._sadecvarsimple_ == oldChild) + { + setSadecvarsimple((TSadecvarsimple) newChild); + return; + } + + if(this._id_ == oldChild) + { + setId((TId) newChild); + return; + } + + if(this._type_ == oldChild) + { + setType((PType) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/ASimpleVar.java b/src/saParser/node/ASimpleVar.java new file mode 100644 index 0000000..71570f7 --- /dev/null +++ b/src/saParser/node/ASimpleVar.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class ASimpleVar extends PVar +{ + private TPo _po_; + private TSavarsimple _savarsimple_; + private TId _id_; + private TPf _pf_; + + public ASimpleVar() + { + // Constructor + } + + public ASimpleVar( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSavarsimple _savarsimple_, + @SuppressWarnings("hiding") TId _id_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSavarsimple(_savarsimple_); + + setId(_id_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new ASimpleVar( + cloneNode(this._po_), + cloneNode(this._savarsimple_), + cloneNode(this._id_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseASimpleVar(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSavarsimple getSavarsimple() + { + return this._savarsimple_; + } + + public void setSavarsimple(TSavarsimple node) + { + if(this._savarsimple_ != null) + { + this._savarsimple_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._savarsimple_ = 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 TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._savarsimple_) + + toString(this._id_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._savarsimple_ == child) + { + this._savarsimple_ = null; + return; + } + + if(this._id_ == child) + { + this._id_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._savarsimple_ == oldChild) + { + setSavarsimple((TSavarsimple) newChild); + return; + } + + if(this._id_ == oldChild) + { + setId((TId) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/ASubExp.java b/src/saParser/node/ASubExp.java new file mode 100644 index 0000000..2f50ab2 --- /dev/null +++ b/src/saParser/node/ASubExp.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class ASubExp extends PExp +{ + private TPo _po_; + private TSaexpsub _saexpsub_; + private PExp _op1_; + private PExp _op2_; + private TPf _pf_; + + public ASubExp() + { + // Constructor + } + + public ASubExp( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSaexpsub _saexpsub_, + @SuppressWarnings("hiding") PExp _op1_, + @SuppressWarnings("hiding") PExp _op2_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSaexpsub(_saexpsub_); + + setOp1(_op1_); + + setOp2(_op2_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new ASubExp( + cloneNode(this._po_), + cloneNode(this._saexpsub_), + cloneNode(this._op1_), + cloneNode(this._op2_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseASubExp(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSaexpsub getSaexpsub() + { + return this._saexpsub_; + } + + public void setSaexpsub(TSaexpsub node) + { + if(this._saexpsub_ != null) + { + this._saexpsub_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._saexpsub_ = node; + } + + public PExp getOp1() + { + return this._op1_; + } + + public void setOp1(PExp node) + { + if(this._op1_ != null) + { + this._op1_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op1_ = node; + } + + public PExp getOp2() + { + return this._op2_; + } + + public void setOp2(PExp node) + { + if(this._op2_ != null) + { + this._op2_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._op2_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._saexpsub_) + + toString(this._op1_) + + toString(this._op2_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._saexpsub_ == child) + { + this._saexpsub_ = null; + return; + } + + if(this._op1_ == child) + { + this._op1_ = null; + return; + } + + if(this._op2_ == child) + { + this._op2_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._saexpsub_ == oldChild) + { + setSaexpsub((TSaexpsub) newChild); + return; + } + + if(this._op1_ == oldChild) + { + setOp1((PExp) newChild); + return; + } + + if(this._op2_ == oldChild) + { + setOp2((PExp) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/ATabDecvar.java b/src/saParser/node/ATabDecvar.java new file mode 100644 index 0000000..19712c2 --- /dev/null +++ b/src/saParser/node/ATabDecvar.java @@ -0,0 +1,310 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class ATabDecvar extends PDecvar +{ + private TPo _po_; + private TSadectab _sadectab_; + private TId _id_; + private PType _type_; + private TInteger _integer_; + private TPf _pf_; + + public ATabDecvar() + { + // Constructor + } + + public ATabDecvar( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSadectab _sadectab_, + @SuppressWarnings("hiding") TId _id_, + @SuppressWarnings("hiding") PType _type_, + @SuppressWarnings("hiding") TInteger _integer_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSadectab(_sadectab_); + + setId(_id_); + + setType(_type_); + + setInteger(_integer_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new ATabDecvar( + cloneNode(this._po_), + cloneNode(this._sadectab_), + cloneNode(this._id_), + cloneNode(this._type_), + cloneNode(this._integer_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseATabDecvar(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSadectab getSadectab() + { + return this._sadectab_; + } + + public void setSadectab(TSadectab node) + { + if(this._sadectab_ != null) + { + this._sadectab_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._sadectab_ = 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 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 TInteger getInteger() + { + return this._integer_; + } + + public void setInteger(TInteger node) + { + if(this._integer_ != null) + { + this._integer_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._integer_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._sadectab_) + + toString(this._id_) + + toString(this._type_) + + toString(this._integer_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._sadectab_ == child) + { + this._sadectab_ = null; + return; + } + + if(this._id_ == child) + { + this._id_ = null; + return; + } + + if(this._type_ == child) + { + this._type_ = null; + return; + } + + if(this._integer_ == child) + { + this._integer_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._sadectab_ == oldChild) + { + setSadectab((TSadectab) newChild); + return; + } + + if(this._id_ == oldChild) + { + setId((TId) newChild); + return; + } + + if(this._type_ == oldChild) + { + setType((PType) newChild); + return; + } + + if(this._integer_ == oldChild) + { + setInteger((TInteger) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/ATantqueInst.java b/src/saParser/node/ATantqueInst.java new file mode 100644 index 0000000..e8f990e --- /dev/null +++ b/src/saParser/node/ATantqueInst.java @@ -0,0 +1,267 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class ATantqueInst extends PInst +{ + private TPo _po_; + private TSainsttantque _sainsttantque_; + private PExp _exp_; + private PInst _inst_; + private TPf _pf_; + + public ATantqueInst() + { + // Constructor + } + + public ATantqueInst( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSainsttantque _sainsttantque_, + @SuppressWarnings("hiding") PExp _exp_, + @SuppressWarnings("hiding") PInst _inst_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSainsttantque(_sainsttantque_); + + setExp(_exp_); + + setInst(_inst_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new ATantqueInst( + cloneNode(this._po_), + cloneNode(this._sainsttantque_), + cloneNode(this._exp_), + cloneNode(this._inst_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseATantqueInst(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSainsttantque getSainsttantque() + { + return this._sainsttantque_; + } + + public void setSainsttantque(TSainsttantque node) + { + if(this._sainsttantque_ != null) + { + this._sainsttantque_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._sainsttantque_ = 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 PInst getInst() + { + return this._inst_; + } + + public void setInst(PInst node) + { + if(this._inst_ != null) + { + this._inst_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._inst_ = node; + } + + public TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._sainsttantque_) + + toString(this._exp_) + + toString(this._inst_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._sainsttantque_ == child) + { + this._sainsttantque_ = null; + return; + } + + if(this._exp_ == child) + { + this._exp_ = null; + return; + } + + if(this._inst_ == child) + { + this._inst_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._sainsttantque_ == oldChild) + { + setSainsttantque((TSainsttantque) newChild); + return; + } + + if(this._exp_ == oldChild) + { + setExp((PExp) newChild); + return; + } + + if(this._inst_ == oldChild) + { + setInst((PInst) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/AVarExp.java b/src/saParser/node/AVarExp.java new file mode 100644 index 0000000..c60379b --- /dev/null +++ b/src/saParser/node/AVarExp.java @@ -0,0 +1,224 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AVarExp extends PExp +{ + private TPo _po_; + private TSaexpvar _saexpvar_; + private PVar _var_; + private TPf _pf_; + + public AVarExp() + { + // Constructor + } + + public AVarExp( + @SuppressWarnings("hiding") TPo _po_, + @SuppressWarnings("hiding") TSaexpvar _saexpvar_, + @SuppressWarnings("hiding") PVar _var_, + @SuppressWarnings("hiding") TPf _pf_) + { + // Constructor + setPo(_po_); + + setSaexpvar(_saexpvar_); + + setVar(_var_); + + setPf(_pf_); + + } + + @Override + public Object clone() + { + return new AVarExp( + cloneNode(this._po_), + cloneNode(this._saexpvar_), + cloneNode(this._var_), + cloneNode(this._pf_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAVarExp(this); + } + + public TPo getPo() + { + return this._po_; + } + + public void setPo(TPo node) + { + if(this._po_ != null) + { + this._po_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._po_ = node; + } + + public TSaexpvar getSaexpvar() + { + return this._saexpvar_; + } + + public void setSaexpvar(TSaexpvar node) + { + if(this._saexpvar_ != null) + { + this._saexpvar_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._saexpvar_ = node; + } + + 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 TPf getPf() + { + return this._pf_; + } + + public void setPf(TPf node) + { + if(this._pf_ != null) + { + this._pf_.parent(null); + } + + if(node != null) + { + if(node.parent() != null) + { + node.parent().removeChild(node); + } + + node.parent(this); + } + + this._pf_ = node; + } + + @Override + public String toString() + { + return "" + + toString(this._po_) + + toString(this._saexpvar_) + + toString(this._var_) + + toString(this._pf_); + } + + @Override + void removeChild(@SuppressWarnings("unused") Node child) + { + // Remove child + if(this._po_ == child) + { + this._po_ = null; + return; + } + + if(this._saexpvar_ == child) + { + this._saexpvar_ = null; + return; + } + + if(this._var_ == child) + { + this._var_ = null; + return; + } + + if(this._pf_ == child) + { + this._pf_ = null; + return; + } + + throw new RuntimeException("Not a child."); + } + + @Override + void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) + { + // Replace child + if(this._po_ == oldChild) + { + setPo((TPo) newChild); + return; + } + + if(this._saexpvar_ == oldChild) + { + setSaexpvar((TSaexpvar) newChild); + return; + } + + if(this._var_ == oldChild) + { + setVar((PVar) newChild); + return; + } + + if(this._pf_ == oldChild) + { + setPf((TPf) newChild); + return; + } + + throw new RuntimeException("Not a child."); + } +} diff --git a/src/saParser/node/AVraiExp.java b/src/saParser/node/AVraiExp.java new file mode 100644 index 0000000..de01ff0 --- /dev/null +++ b/src/saParser/node/AVraiExp.java @@ -0,0 +1,95 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class AVraiExp extends PExp +{ + private TVrai _vrai_; + + public AVraiExp() + { + // Constructor + } + + public AVraiExp( + @SuppressWarnings("hiding") TVrai _vrai_) + { + // Constructor + setVrai(_vrai_); + + } + + @Override + public Object clone() + { + return new AVraiExp( + cloneNode(this._vrai_)); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseAVraiExp(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/saParser/node/EOF.java b/src/saParser/node/EOF.java new file mode 100644 index 0000000..86f0774 --- /dev/null +++ b/src/saParser/node/EOF.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.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/saParser/node/InvalidToken.java b/src/saParser/node/InvalidToken.java new file mode 100644 index 0000000..61a7180 --- /dev/null +++ b/src/saParser/node/InvalidToken.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.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/saParser/node/Node.java b/src/saParser/node/Node.java new file mode 100644 index 0000000..5aff404 --- /dev/null +++ b/src/saParser/node/Node.java @@ -0,0 +1,78 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.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/saParser/node/PAppel.java b/src/saParser/node/PAppel.java new file mode 100644 index 0000000..1bbbece --- /dev/null +++ b/src/saParser/node/PAppel.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +public abstract class PAppel extends Node +{ + // Empty body +} diff --git a/src/saParser/node/PDecfonc.java b/src/saParser/node/PDecfonc.java new file mode 100644 index 0000000..b707b87 --- /dev/null +++ b/src/saParser/node/PDecfonc.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +public abstract class PDecfonc extends Node +{ + // Empty body +} diff --git a/src/saParser/node/PDecvar.java b/src/saParser/node/PDecvar.java new file mode 100644 index 0000000..fbc0580 --- /dev/null +++ b/src/saParser/node/PDecvar.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +public abstract class PDecvar extends Node +{ + // Empty body +} diff --git a/src/saParser/node/PExp.java b/src/saParser/node/PExp.java new file mode 100644 index 0000000..55e9024 --- /dev/null +++ b/src/saParser/node/PExp.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +public abstract class PExp extends Node +{ + // Empty body +} diff --git a/src/saParser/node/PInst.java b/src/saParser/node/PInst.java new file mode 100644 index 0000000..35ce31e --- /dev/null +++ b/src/saParser/node/PInst.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +public abstract class PInst extends Node +{ + // Empty body +} diff --git a/src/saParser/node/PLdecfonc.java b/src/saParser/node/PLdecfonc.java new file mode 100644 index 0000000..a9a668b --- /dev/null +++ b/src/saParser/node/PLdecfonc.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +public abstract class PLdecfonc extends Node +{ + // Empty body +} diff --git a/src/saParser/node/PLdecvar.java b/src/saParser/node/PLdecvar.java new file mode 100644 index 0000000..e93d084 --- /dev/null +++ b/src/saParser/node/PLdecvar.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +public abstract class PLdecvar extends Node +{ + // Empty body +} diff --git a/src/saParser/node/PLexp.java b/src/saParser/node/PLexp.java new file mode 100644 index 0000000..1815542 --- /dev/null +++ b/src/saParser/node/PLexp.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +public abstract class PLexp extends Node +{ + // Empty body +} diff --git a/src/saParser/node/PLinst.java b/src/saParser/node/PLinst.java new file mode 100644 index 0000000..5a9fe0c --- /dev/null +++ b/src/saParser/node/PLinst.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +public abstract class PLinst extends Node +{ + // Empty body +} diff --git a/src/saParser/node/PProg.java b/src/saParser/node/PProg.java new file mode 100644 index 0000000..c5d7eda --- /dev/null +++ b/src/saParser/node/PProg.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +public abstract class PProg extends Node +{ + // Empty body +} diff --git a/src/saParser/node/PType.java b/src/saParser/node/PType.java new file mode 100644 index 0000000..bb9e2cc --- /dev/null +++ b/src/saParser/node/PType.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +public abstract class PType extends Node +{ + // Empty body +} diff --git a/src/saParser/node/PVar.java b/src/saParser/node/PVar.java new file mode 100644 index 0000000..59686f5 --- /dev/null +++ b/src/saParser/node/PVar.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +public abstract class PVar extends Node +{ + // Empty body +} diff --git a/src/saParser/node/Start.java b/src/saParser/node/Start.java new file mode 100644 index 0000000..52ef1a6 --- /dev/null +++ b/src/saParser/node/Start.java @@ -0,0 +1,133 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.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/saParser/node/Switch.java b/src/saParser/node/Switch.java new file mode 100644 index 0000000..f876820 --- /dev/null +++ b/src/saParser/node/Switch.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +public interface Switch +{ + // Empty body +} diff --git a/src/saParser/node/Switchable.java b/src/saParser/node/Switchable.java new file mode 100644 index 0000000..cbea67c --- /dev/null +++ b/src/saParser/node/Switchable.java @@ -0,0 +1,8 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +public interface Switchable +{ + void apply(Switch sw); +} diff --git a/src/saParser/node/TBool.java b/src/saParser/node/TBool.java new file mode 100644 index 0000000..0a816bc --- /dev/null +++ b/src/saParser/node/TBool.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.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/saParser/node/TCommentaire.java b/src/saParser/node/TCommentaire.java new file mode 100644 index 0000000..4502626 --- /dev/null +++ b/src/saParser/node/TCommentaire.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.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/saParser/node/TEntier.java b/src/saParser/node/TEntier.java new file mode 100644 index 0000000..d795259 --- /dev/null +++ b/src/saParser/node/TEntier.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.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/saParser/node/TEspaces.java b/src/saParser/node/TEspaces.java new file mode 100644 index 0000000..80defe1 --- /dev/null +++ b/src/saParser/node/TEspaces.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.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/saParser/node/TFaux.java b/src/saParser/node/TFaux.java new file mode 100644 index 0000000..76ab589 --- /dev/null +++ b/src/saParser/node/TFaux.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.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/saParser/node/TId.java b/src/saParser/node/TId.java new file mode 100644 index 0000000..7430119 --- /dev/null +++ b/src/saParser/node/TId.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.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/saParser/node/TInteger.java b/src/saParser/node/TInteger.java new file mode 100644 index 0000000..b69e991 --- /dev/null +++ b/src/saParser/node/TInteger.java @@ -0,0 +1,33 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TInteger extends Token +{ + public TInteger(String text) + { + setText(text); + } + + public TInteger(String text, int line, int pos) + { + setText(text); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TInteger(getText(), getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTInteger(this); + } +} diff --git a/src/saParser/node/TLire.java b/src/saParser/node/TLire.java new file mode 100644 index 0000000..704d6e9 --- /dev/null +++ b/src/saParser/node/TLire.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.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/saParser/node/TNul.java b/src/saParser/node/TNul.java new file mode 100644 index 0000000..47058aa --- /dev/null +++ b/src/saParser/node/TNul.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TNul extends Token +{ + public TNul() + { + super.setText("nul"); + } + + public TNul(int line, int pos) + { + super.setText("nul"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TNul(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTNul(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TNul text."); + } +} diff --git a/src/saParser/node/TNull.java b/src/saParser/node/TNull.java new file mode 100644 index 0000000..8b4eda2 --- /dev/null +++ b/src/saParser/node/TNull.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TNull extends Token +{ + public TNull() + { + super.setText("null"); + } + + public TNull(int line, int pos) + { + super.setText("null"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TNull(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTNull(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TNull text."); + } +} diff --git a/src/saParser/node/TPf.java b/src/saParser/node/TPf.java new file mode 100644 index 0000000..f58d2fc --- /dev/null +++ b/src/saParser/node/TPf.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TPf extends Token +{ + public TPf() + { + super.setText(")"); + } + + public TPf(int line, int pos) + { + super.setText(")"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TPf(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTPf(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TPf text."); + } +} diff --git a/src/saParser/node/TPo.java b/src/saParser/node/TPo.java new file mode 100644 index 0000000..ba30e46 --- /dev/null +++ b/src/saParser/node/TPo.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TPo extends Token +{ + public TPo() + { + super.setText("("); + } + + public TPo(int line, int pos) + { + super.setText("("); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TPo(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTPo(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TPo text."); + } +} diff --git a/src/saParser/node/TSaappel.java b/src/saParser/node/TSaappel.java new file mode 100644 index 0000000..cca9fba --- /dev/null +++ b/src/saParser/node/TSaappel.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSaappel extends Token +{ + public TSaappel() + { + super.setText("SaAppel"); + } + + public TSaappel(int line, int pos) + { + super.setText("SaAppel"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSaappel(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSaappel(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSaappel text."); + } +} diff --git a/src/saParser/node/TSadecfonc.java b/src/saParser/node/TSadecfonc.java new file mode 100644 index 0000000..1c5323a --- /dev/null +++ b/src/saParser/node/TSadecfonc.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSadecfonc extends Token +{ + public TSadecfonc() + { + super.setText("SaDecFonc"); + } + + public TSadecfonc(int line, int pos) + { + super.setText("SaDecFonc"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSadecfonc(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSadecfonc(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSadecfonc text."); + } +} diff --git a/src/saParser/node/TSadectab.java b/src/saParser/node/TSadectab.java new file mode 100644 index 0000000..9d400cd --- /dev/null +++ b/src/saParser/node/TSadectab.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSadectab extends Token +{ + public TSadectab() + { + super.setText("SaDecTab"); + } + + public TSadectab(int line, int pos) + { + super.setText("SaDecTab"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSadectab(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSadectab(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSadectab text."); + } +} diff --git a/src/saParser/node/TSadecvar.java b/src/saParser/node/TSadecvar.java new file mode 100644 index 0000000..62287e3 --- /dev/null +++ b/src/saParser/node/TSadecvar.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSadecvar extends Token +{ + public TSadecvar() + { + super.setText("SaDecVar"); + } + + public TSadecvar(int line, int pos) + { + super.setText("SaDecVar"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSadecvar(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSadecvar(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSadecvar text."); + } +} diff --git a/src/saParser/node/TSadecvarsimple.java b/src/saParser/node/TSadecvarsimple.java new file mode 100644 index 0000000..d9ba5a7 --- /dev/null +++ b/src/saParser/node/TSadecvarsimple.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSadecvarsimple extends Token +{ + public TSadecvarsimple() + { + super.setText("SaDecVarSimple"); + } + + public TSadecvarsimple(int line, int pos) + { + super.setText("SaDecVarSimple"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSadecvarsimple(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSadecvarsimple(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSadecvarsimple text."); + } +} diff --git a/src/saParser/node/TSaexpadd.java b/src/saParser/node/TSaexpadd.java new file mode 100644 index 0000000..88856c1 --- /dev/null +++ b/src/saParser/node/TSaexpadd.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSaexpadd extends Token +{ + public TSaexpadd() + { + super.setText("SaExpAdd"); + } + + public TSaexpadd(int line, int pos) + { + super.setText("SaExpAdd"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSaexpadd(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSaexpadd(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSaexpadd text."); + } +} diff --git a/src/saParser/node/TSaexpand.java b/src/saParser/node/TSaexpand.java new file mode 100644 index 0000000..90fb5fe --- /dev/null +++ b/src/saParser/node/TSaexpand.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSaexpand extends Token +{ + public TSaexpand() + { + super.setText("SaExpAnd"); + } + + public TSaexpand(int line, int pos) + { + super.setText("SaExpAnd"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSaexpand(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSaexpand(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSaexpand text."); + } +} diff --git a/src/saParser/node/TSaexpappel.java b/src/saParser/node/TSaexpappel.java new file mode 100644 index 0000000..77ea680 --- /dev/null +++ b/src/saParser/node/TSaexpappel.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSaexpappel extends Token +{ + public TSaexpappel() + { + super.setText("SaExpAppel"); + } + + public TSaexpappel(int line, int pos) + { + super.setText("SaExpAppel"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSaexpappel(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSaexpappel(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSaexpappel text."); + } +} diff --git a/src/saParser/node/TSaexpdiv.java b/src/saParser/node/TSaexpdiv.java new file mode 100644 index 0000000..dfbae76 --- /dev/null +++ b/src/saParser/node/TSaexpdiv.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSaexpdiv extends Token +{ + public TSaexpdiv() + { + super.setText("SaExpDiv"); + } + + public TSaexpdiv(int line, int pos) + { + super.setText("SaExpDiv"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSaexpdiv(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSaexpdiv(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSaexpdiv text."); + } +} diff --git a/src/saParser/node/TSaexpequal.java b/src/saParser/node/TSaexpequal.java new file mode 100644 index 0000000..f65e152 --- /dev/null +++ b/src/saParser/node/TSaexpequal.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSaexpequal extends Token +{ + public TSaexpequal() + { + super.setText("SaExpEqual"); + } + + public TSaexpequal(int line, int pos) + { + super.setText("SaExpEqual"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSaexpequal(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSaexpequal(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSaexpequal text."); + } +} diff --git a/src/saParser/node/TSaexpfaux.java b/src/saParser/node/TSaexpfaux.java new file mode 100644 index 0000000..03982a3 --- /dev/null +++ b/src/saParser/node/TSaexpfaux.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSaexpfaux extends Token +{ + public TSaexpfaux() + { + super.setText("SaExpFaux"); + } + + public TSaexpfaux(int line, int pos) + { + super.setText("SaExpFaux"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSaexpfaux(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSaexpfaux(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSaexpfaux text."); + } +} diff --git a/src/saParser/node/TSaexpinf.java b/src/saParser/node/TSaexpinf.java new file mode 100644 index 0000000..6caf091 --- /dev/null +++ b/src/saParser/node/TSaexpinf.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSaexpinf extends Token +{ + public TSaexpinf() + { + super.setText("SaExpInf"); + } + + public TSaexpinf(int line, int pos) + { + super.setText("SaExpInf"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSaexpinf(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSaexpinf(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSaexpinf text."); + } +} diff --git a/src/saParser/node/TSaexpint.java b/src/saParser/node/TSaexpint.java new file mode 100644 index 0000000..5f1ab0f --- /dev/null +++ b/src/saParser/node/TSaexpint.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSaexpint extends Token +{ + public TSaexpint() + { + super.setText("SaExpInt"); + } + + public TSaexpint(int line, int pos) + { + super.setText("SaExpInt"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSaexpint(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSaexpint(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSaexpint text."); + } +} diff --git a/src/saParser/node/TSaexplire.java b/src/saParser/node/TSaexplire.java new file mode 100644 index 0000000..c175054 --- /dev/null +++ b/src/saParser/node/TSaexplire.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSaexplire extends Token +{ + public TSaexplire() + { + super.setText("SaExpLire"); + } + + public TSaexplire(int line, int pos) + { + super.setText("SaExpLire"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSaexplire(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSaexplire(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSaexplire text."); + } +} diff --git a/src/saParser/node/TSaexpmult.java b/src/saParser/node/TSaexpmult.java new file mode 100644 index 0000000..83ca4e5 --- /dev/null +++ b/src/saParser/node/TSaexpmult.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSaexpmult extends Token +{ + public TSaexpmult() + { + super.setText("SaExpMult"); + } + + public TSaexpmult(int line, int pos) + { + super.setText("SaExpMult"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSaexpmult(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSaexpmult(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSaexpmult text."); + } +} diff --git a/src/saParser/node/TSaexpnot.java b/src/saParser/node/TSaexpnot.java new file mode 100644 index 0000000..81accd2 --- /dev/null +++ b/src/saParser/node/TSaexpnot.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSaexpnot extends Token +{ + public TSaexpnot() + { + super.setText("SaExpNot"); + } + + public TSaexpnot(int line, int pos) + { + super.setText("SaExpNot"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSaexpnot(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSaexpnot(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSaexpnot text."); + } +} diff --git a/src/saParser/node/TSaexpor.java b/src/saParser/node/TSaexpor.java new file mode 100644 index 0000000..a3d17b9 --- /dev/null +++ b/src/saParser/node/TSaexpor.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSaexpor extends Token +{ + public TSaexpor() + { + super.setText("SaExpOr"); + } + + public TSaexpor(int line, int pos) + { + super.setText("SaExpOr"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSaexpor(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSaexpor(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSaexpor text."); + } +} diff --git a/src/saParser/node/TSaexpsub.java b/src/saParser/node/TSaexpsub.java new file mode 100644 index 0000000..5eec6f2 --- /dev/null +++ b/src/saParser/node/TSaexpsub.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSaexpsub extends Token +{ + public TSaexpsub() + { + super.setText("SaExpSub"); + } + + public TSaexpsub(int line, int pos) + { + super.setText("SaExpSub"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSaexpsub(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSaexpsub(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSaexpsub text."); + } +} diff --git a/src/saParser/node/TSaexpvar.java b/src/saParser/node/TSaexpvar.java new file mode 100644 index 0000000..95e0f3c --- /dev/null +++ b/src/saParser/node/TSaexpvar.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSaexpvar extends Token +{ + public TSaexpvar() + { + super.setText("SaExpVar"); + } + + public TSaexpvar(int line, int pos) + { + super.setText("SaExpVar"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSaexpvar(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSaexpvar(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSaexpvar text."); + } +} diff --git a/src/saParser/node/TSaexpvrai.java b/src/saParser/node/TSaexpvrai.java new file mode 100644 index 0000000..0fefbfd --- /dev/null +++ b/src/saParser/node/TSaexpvrai.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSaexpvrai extends Token +{ + public TSaexpvrai() + { + super.setText("SaExpVrai"); + } + + public TSaexpvrai(int line, int pos) + { + super.setText("SaExpVrai"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSaexpvrai(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSaexpvrai(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSaexpvrai text."); + } +} diff --git a/src/saParser/node/TSainstaffect.java b/src/saParser/node/TSainstaffect.java new file mode 100644 index 0000000..44b6b00 --- /dev/null +++ b/src/saParser/node/TSainstaffect.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSainstaffect extends Token +{ + public TSainstaffect() + { + super.setText("SaInstAffect"); + } + + public TSainstaffect(int line, int pos) + { + super.setText("SaInstAffect"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSainstaffect(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSainstaffect(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSainstaffect text."); + } +} diff --git a/src/saParser/node/TSainstbloc.java b/src/saParser/node/TSainstbloc.java new file mode 100644 index 0000000..94c0206 --- /dev/null +++ b/src/saParser/node/TSainstbloc.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSainstbloc extends Token +{ + public TSainstbloc() + { + super.setText("SaInstBloc"); + } + + public TSainstbloc(int line, int pos) + { + super.setText("SaInstBloc"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSainstbloc(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSainstbloc(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSainstbloc text."); + } +} diff --git a/src/saParser/node/TSainstecriture.java b/src/saParser/node/TSainstecriture.java new file mode 100644 index 0000000..c27bf23 --- /dev/null +++ b/src/saParser/node/TSainstecriture.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSainstecriture extends Token +{ + public TSainstecriture() + { + super.setText("SaInstEcriture"); + } + + public TSainstecriture(int line, int pos) + { + super.setText("SaInstEcriture"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSainstecriture(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSainstecriture(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSainstecriture text."); + } +} diff --git a/src/saParser/node/TSainstretour.java b/src/saParser/node/TSainstretour.java new file mode 100644 index 0000000..93b53e1 --- /dev/null +++ b/src/saParser/node/TSainstretour.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSainstretour extends Token +{ + public TSainstretour() + { + super.setText("SaInstRetour"); + } + + public TSainstretour(int line, int pos) + { + super.setText("SaInstRetour"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSainstretour(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSainstretour(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSainstretour text."); + } +} diff --git a/src/saParser/node/TSainstsi.java b/src/saParser/node/TSainstsi.java new file mode 100644 index 0000000..483d2e3 --- /dev/null +++ b/src/saParser/node/TSainstsi.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSainstsi extends Token +{ + public TSainstsi() + { + super.setText("SaInstSi"); + } + + public TSainstsi(int line, int pos) + { + super.setText("SaInstSi"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSainstsi(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSainstsi(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSainstsi text."); + } +} diff --git a/src/saParser/node/TSainsttantque.java b/src/saParser/node/TSainsttantque.java new file mode 100644 index 0000000..00c4f10 --- /dev/null +++ b/src/saParser/node/TSainsttantque.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSainsttantque extends Token +{ + public TSainsttantque() + { + super.setText("SaInstTantQue"); + } + + public TSainsttantque(int line, int pos) + { + super.setText("SaInstTantQue"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSainsttantque(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSainsttantque(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSainsttantque text."); + } +} diff --git a/src/saParser/node/TSaldecfonc.java b/src/saParser/node/TSaldecfonc.java new file mode 100644 index 0000000..b85c53c --- /dev/null +++ b/src/saParser/node/TSaldecfonc.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSaldecfonc extends Token +{ + public TSaldecfonc() + { + super.setText("SaLDecFonc"); + } + + public TSaldecfonc(int line, int pos) + { + super.setText("SaLDecFonc"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSaldecfonc(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSaldecfonc(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSaldecfonc text."); + } +} diff --git a/src/saParser/node/TSaldecvar.java b/src/saParser/node/TSaldecvar.java new file mode 100644 index 0000000..0c1b7e1 --- /dev/null +++ b/src/saParser/node/TSaldecvar.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSaldecvar extends Token +{ + public TSaldecvar() + { + super.setText("SaLDecVar"); + } + + public TSaldecvar(int line, int pos) + { + super.setText("SaLDecVar"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSaldecvar(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSaldecvar(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSaldecvar text."); + } +} diff --git a/src/saParser/node/TSalexp.java b/src/saParser/node/TSalexp.java new file mode 100644 index 0000000..2e4c9a0 --- /dev/null +++ b/src/saParser/node/TSalexp.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSalexp extends Token +{ + public TSalexp() + { + super.setText("SaLExp"); + } + + public TSalexp(int line, int pos) + { + super.setText("SaLExp"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSalexp(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSalexp(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSalexp text."); + } +} diff --git a/src/saParser/node/TSalinst.java b/src/saParser/node/TSalinst.java new file mode 100644 index 0000000..d474ac4 --- /dev/null +++ b/src/saParser/node/TSalinst.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSalinst extends Token +{ + public TSalinst() + { + super.setText("SaLInst"); + } + + public TSalinst(int line, int pos) + { + super.setText("SaLInst"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSalinst(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSalinst(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSalinst text."); + } +} diff --git a/src/saParser/node/TSaprog.java b/src/saParser/node/TSaprog.java new file mode 100644 index 0000000..39632bd --- /dev/null +++ b/src/saParser/node/TSaprog.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSaprog extends Token +{ + public TSaprog() + { + super.setText("SaProg"); + } + + public TSaprog(int line, int pos) + { + super.setText("SaProg"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSaprog(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSaprog(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSaprog text."); + } +} diff --git a/src/saParser/node/TSavarindicee.java b/src/saParser/node/TSavarindicee.java new file mode 100644 index 0000000..e8efc3e --- /dev/null +++ b/src/saParser/node/TSavarindicee.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSavarindicee extends Token +{ + public TSavarindicee() + { + super.setText("SaVarIndicee"); + } + + public TSavarindicee(int line, int pos) + { + super.setText("SaVarIndicee"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSavarindicee(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSavarindicee(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSavarindicee text."); + } +} diff --git a/src/saParser/node/TSavarsimple.java b/src/saParser/node/TSavarsimple.java new file mode 100644 index 0000000..eb54e4c --- /dev/null +++ b/src/saParser/node/TSavarsimple.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.analysis.*; + +@SuppressWarnings("nls") +public final class TSavarsimple extends Token +{ + public TSavarsimple() + { + super.setText("SaVarSimple"); + } + + public TSavarsimple(int line, int pos) + { + super.setText("SaVarSimple"); + setLine(line); + setPos(pos); + } + + @Override + public Object clone() + { + return new TSavarsimple(getLine(), getPos()); + } + + @Override + public void apply(Switch sw) + { + ((Analysis) sw).caseTSavarsimple(this); + } + + @Override + public void setText(@SuppressWarnings("unused") String text) + { + throw new RuntimeException("Cannot change TSavarsimple text."); + } +} diff --git a/src/saParser/node/TVrai.java b/src/saParser/node/TVrai.java new file mode 100644 index 0000000..64c383f --- /dev/null +++ b/src/saParser/node/TVrai.java @@ -0,0 +1,39 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.node; + +import saParser.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/saParser/node/Token.java b/src/saParser/node/Token.java new file mode 100644 index 0000000..04a5d34 --- /dev/null +++ b/src/saParser/node/Token.java @@ -0,0 +1,59 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.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/saParser/parser/Parser.java b/src/saParser/parser/Parser.java new file mode 100644 index 0000000..92c63c8 --- /dev/null +++ b/src/saParser/parser/Parser.java @@ -0,0 +1,1873 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.parser; + +import saParser.lexer.*; +import saParser.node.*; +import saParser.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; + } + + protected void filter() throws ParserException, LexerException, IOException + { + // Empty body + } + + private void push(int numstate, ArrayList<Object> listNode, boolean hidden) throws ParserException, LexerException, IOException + { + this.nodeList = listNode; + + if(!hidden) + { + filter(); + } + + 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, true); + 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, false); + } + 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 AProg */ + { + ArrayList<Object> list = new0(); + push(goTo(0), list, false); + } + break; + case 1: /* reduce AAddExp */ + { + ArrayList<Object> list = new1(); + push(goTo(1), list, false); + } + break; + case 2: /* reduce AAndExp */ + { + ArrayList<Object> list = new2(); + push(goTo(1), list, false); + } + break; + case 3: /* reduce ADivExp */ + { + ArrayList<Object> list = new3(); + push(goTo(1), list, false); + } + break; + case 4: /* reduce AEqualExp */ + { + ArrayList<Object> list = new4(); + push(goTo(1), list, false); + } + break; + case 5: /* reduce AInfExp */ + { + ArrayList<Object> list = new5(); + push(goTo(1), list, false); + } + break; + case 6: /* reduce AMultExp */ + { + ArrayList<Object> list = new6(); + push(goTo(1), list, false); + } + break; + case 7: /* reduce AOrExp */ + { + ArrayList<Object> list = new7(); + push(goTo(1), list, false); + } + break; + case 8: /* reduce ASubExp */ + { + ArrayList<Object> list = new8(); + push(goTo(1), list, false); + } + break; + case 9: /* reduce ANotExp */ + { + ArrayList<Object> list = new9(); + push(goTo(1), list, false); + } + break; + case 10: /* reduce AAppelExp */ + { + ArrayList<Object> list = new10(); + push(goTo(1), list, false); + } + break; + case 11: /* reduce AVarExp */ + { + ArrayList<Object> list = new11(); + push(goTo(1), list, false); + } + break; + case 12: /* reduce AFauxExp */ + { + ArrayList<Object> list = new12(); + push(goTo(1), list, false); + } + break; + case 13: /* reduce AVraiExp */ + { + ArrayList<Object> list = new13(); + push(goTo(1), list, false); + } + break; + case 14: /* reduce AIntExp */ + { + ArrayList<Object> list = new14(); + push(goTo(1), list, false); + } + break; + case 15: /* reduce ALireExp */ + { + ArrayList<Object> list = new15(); + push(goTo(1), list, false); + } + break; + case 16: /* reduce AAffectInst */ + { + ArrayList<Object> list = new16(); + push(goTo(2), list, false); + } + break; + case 17: /* reduce ABlocInst */ + { + ArrayList<Object> list = new17(); + push(goTo(2), list, false); + } + break; + case 18: /* reduce AEcritureInst */ + { + ArrayList<Object> list = new18(); + push(goTo(2), list, false); + } + break; + case 19: /* reduce ARetourInst */ + { + ArrayList<Object> list = new19(); + push(goTo(2), list, false); + } + break; + case 20: /* reduce ASiInst */ + { + ArrayList<Object> list = new20(); + push(goTo(2), list, false); + } + break; + case 21: /* reduce ASi2Inst */ + { + ArrayList<Object> list = new21(); + push(goTo(2), list, false); + } + break; + case 22: /* reduce ATantqueInst */ + { + ArrayList<Object> list = new22(); + push(goTo(2), list, false); + } + break; + case 23: /* reduce AAppelInst */ + { + ArrayList<Object> list = new23(); + push(goTo(2), list, false); + } + break; + case 24: /* reduce ARecLdecfonc */ + { + ArrayList<Object> list = new24(); + push(goTo(3), list, false); + } + break; + case 25: /* reduce AFinLdecfonc */ + { + ArrayList<Object> list = new25(); + push(goTo(3), list, false); + } + break; + case 26: /* reduce ARecLdecvar */ + { + ArrayList<Object> list = new26(); + push(goTo(4), list, false); + } + break; + case 27: /* reduce AFinLdecvar */ + { + ArrayList<Object> list = new27(); + push(goTo(4), list, false); + } + break; + case 28: /* reduce ARecLexp */ + { + ArrayList<Object> list = new28(); + push(goTo(5), list, false); + } + break; + case 29: /* reduce AFinLexp */ + { + ArrayList<Object> list = new29(); + push(goTo(5), list, false); + } + break; + case 30: /* reduce ARecLinst */ + { + ArrayList<Object> list = new30(); + push(goTo(6), list, false); + } + break; + case 31: /* reduce AFinLinst */ + { + ArrayList<Object> list = new31(); + push(goTo(6), list, false); + } + break; + case 32: /* reduce ADecfonc */ + { + ArrayList<Object> list = new32(); + push(goTo(7), list, false); + } + break; + case 33: /* reduce ATabDecvar */ + { + ArrayList<Object> list = new33(); + push(goTo(8), list, false); + } + break; + case 34: /* reduce ASimpleDecvar */ + { + ArrayList<Object> list = new34(); + push(goTo(8), list, false); + } + break; + case 35: /* reduce AIndiceeVar */ + { + ArrayList<Object> list = new35(); + push(goTo(9), list, false); + } + break; + case 36: /* reduce ASimpleVar */ + { + ArrayList<Object> list = new36(); + push(goTo(9), list, false); + } + break; + case 37: /* reduce AAppel */ + { + ArrayList<Object> list = new37(); + push(goTo(10), list, false); + } + break; + case 38: /* reduce AEntierType */ + { + ArrayList<Object> list = new38(); + push(goTo(11), list, false); + } + break; + case 39: /* reduce ABoolType */ + { + ArrayList<Object> list = new39(); + push(goTo(11), list, false); + } + break; + case 40: /* reduce ANullType */ + { + ArrayList<Object> list = new40(); + push(goTo(11), list, false); + } + break; + } + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new0() /* reduce AProg */ + { + @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 + TPo tpoNode2; + TSaprog tsaprogNode3; + PLdecvar pldecvarNode4; + PLdecfonc pldecfoncNode5; + TPf tpfNode6; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsaprogNode3 = (TSaprog)nodeArrayList2.get(0); + pldecvarNode4 = (PLdecvar)nodeArrayList3.get(0); + pldecfoncNode5 = (PLdecfonc)nodeArrayList4.get(0); + tpfNode6 = (TPf)nodeArrayList5.get(0); + + pprogNode1 = new AProg(tpoNode2, tsaprogNode3, pldecvarNode4, pldecfoncNode5, tpfNode6); + } + nodeList.add(pprogNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new1() /* reduce AAddExp */ + { + @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(); + PExp pexpNode1; + { + // Block + TPo tpoNode2; + TSaexpadd tsaexpaddNode3; + PExp pexpNode4; + PExp pexpNode5; + TPf tpfNode6; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsaexpaddNode3 = (TSaexpadd)nodeArrayList2.get(0); + pexpNode4 = (PExp)nodeArrayList3.get(0); + pexpNode5 = (PExp)nodeArrayList4.get(0); + tpfNode6 = (TPf)nodeArrayList5.get(0); + + pexpNode1 = new AAddExp(tpoNode2, tsaexpaddNode3, pexpNode4, pexpNode5, tpfNode6); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new2() /* reduce AAndExp */ + { + @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(); + PExp pexpNode1; + { + // Block + TPo tpoNode2; + TSaexpand tsaexpandNode3; + PExp pexpNode4; + PExp pexpNode5; + TPf tpfNode6; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsaexpandNode3 = (TSaexpand)nodeArrayList2.get(0); + pexpNode4 = (PExp)nodeArrayList3.get(0); + pexpNode5 = (PExp)nodeArrayList4.get(0); + tpfNode6 = (TPf)nodeArrayList5.get(0); + + pexpNode1 = new AAndExp(tpoNode2, tsaexpandNode3, pexpNode4, pexpNode5, tpfNode6); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new3() /* reduce ADivExp */ + { + @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(); + PExp pexpNode1; + { + // Block + TPo tpoNode2; + TSaexpdiv tsaexpdivNode3; + PExp pexpNode4; + PExp pexpNode5; + TPf tpfNode6; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsaexpdivNode3 = (TSaexpdiv)nodeArrayList2.get(0); + pexpNode4 = (PExp)nodeArrayList3.get(0); + pexpNode5 = (PExp)nodeArrayList4.get(0); + tpfNode6 = (TPf)nodeArrayList5.get(0); + + pexpNode1 = new ADivExp(tpoNode2, tsaexpdivNode3, pexpNode4, pexpNode5, tpfNode6); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new4() /* reduce AEqualExp */ + { + @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(); + PExp pexpNode1; + { + // Block + TPo tpoNode2; + TSaexpequal tsaexpequalNode3; + PExp pexpNode4; + PExp pexpNode5; + TPf tpfNode6; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsaexpequalNode3 = (TSaexpequal)nodeArrayList2.get(0); + pexpNode4 = (PExp)nodeArrayList3.get(0); + pexpNode5 = (PExp)nodeArrayList4.get(0); + tpfNode6 = (TPf)nodeArrayList5.get(0); + + pexpNode1 = new AEqualExp(tpoNode2, tsaexpequalNode3, pexpNode4, pexpNode5, tpfNode6); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new5() /* reduce AInfExp */ + { + @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(); + PExp pexpNode1; + { + // Block + TPo tpoNode2; + TSaexpinf tsaexpinfNode3; + PExp pexpNode4; + PExp pexpNode5; + TPf tpfNode6; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsaexpinfNode3 = (TSaexpinf)nodeArrayList2.get(0); + pexpNode4 = (PExp)nodeArrayList3.get(0); + pexpNode5 = (PExp)nodeArrayList4.get(0); + tpfNode6 = (TPf)nodeArrayList5.get(0); + + pexpNode1 = new AInfExp(tpoNode2, tsaexpinfNode3, pexpNode4, pexpNode5, tpfNode6); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new6() /* reduce AMultExp */ + { + @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(); + PExp pexpNode1; + { + // Block + TPo tpoNode2; + TSaexpmult tsaexpmultNode3; + PExp pexpNode4; + PExp pexpNode5; + TPf tpfNode6; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsaexpmultNode3 = (TSaexpmult)nodeArrayList2.get(0); + pexpNode4 = (PExp)nodeArrayList3.get(0); + pexpNode5 = (PExp)nodeArrayList4.get(0); + tpfNode6 = (TPf)nodeArrayList5.get(0); + + pexpNode1 = new AMultExp(tpoNode2, tsaexpmultNode3, pexpNode4, pexpNode5, tpfNode6); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new7() /* reduce AOrExp */ + { + @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(); + PExp pexpNode1; + { + // Block + TPo tpoNode2; + TSaexpor tsaexporNode3; + PExp pexpNode4; + PExp pexpNode5; + TPf tpfNode6; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsaexporNode3 = (TSaexpor)nodeArrayList2.get(0); + pexpNode4 = (PExp)nodeArrayList3.get(0); + pexpNode5 = (PExp)nodeArrayList4.get(0); + tpfNode6 = (TPf)nodeArrayList5.get(0); + + pexpNode1 = new AOrExp(tpoNode2, tsaexporNode3, pexpNode4, pexpNode5, tpfNode6); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new8() /* reduce ASubExp */ + { + @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(); + PExp pexpNode1; + { + // Block + TPo tpoNode2; + TSaexpsub tsaexpsubNode3; + PExp pexpNode4; + PExp pexpNode5; + TPf tpfNode6; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsaexpsubNode3 = (TSaexpsub)nodeArrayList2.get(0); + pexpNode4 = (PExp)nodeArrayList3.get(0); + pexpNode5 = (PExp)nodeArrayList4.get(0); + tpfNode6 = (TPf)nodeArrayList5.get(0); + + pexpNode1 = new ASubExp(tpoNode2, tsaexpsubNode3, pexpNode4, pexpNode5, tpfNode6); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new9() /* reduce ANotExp */ + { + @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(); + PExp pexpNode1; + { + // Block + TPo tpoNode2; + TSaexpnot tsaexpnotNode3; + PExp pexpNode4; + TPf tpfNode5; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsaexpnotNode3 = (TSaexpnot)nodeArrayList2.get(0); + pexpNode4 = (PExp)nodeArrayList3.get(0); + tpfNode5 = (TPf)nodeArrayList4.get(0); + + pexpNode1 = new ANotExp(tpoNode2, tsaexpnotNode3, pexpNode4, tpfNode5); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new10() /* reduce AAppelExp */ + { + @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(); + PExp pexpNode1; + { + // Block + TPo tpoNode2; + TSaexpappel tsaexpappelNode3; + PAppel pappelNode4; + TPf tpfNode5; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsaexpappelNode3 = (TSaexpappel)nodeArrayList2.get(0); + pappelNode4 = (PAppel)nodeArrayList3.get(0); + tpfNode5 = (TPf)nodeArrayList4.get(0); + + pexpNode1 = new AAppelExp(tpoNode2, tsaexpappelNode3, pappelNode4, tpfNode5); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new11() /* reduce AVarExp */ + { + @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(); + PExp pexpNode1; + { + // Block + TPo tpoNode2; + TSaexpvar tsaexpvarNode3; + PVar pvarNode4; + TPf tpfNode5; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsaexpvarNode3 = (TSaexpvar)nodeArrayList2.get(0); + pvarNode4 = (PVar)nodeArrayList3.get(0); + tpfNode5 = (TPf)nodeArrayList4.get(0); + + pexpNode1 = new AVarExp(tpoNode2, tsaexpvarNode3, pvarNode4, tpfNode5); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new12() /* reduce AFauxExp */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PExp pexpNode1; + { + // Block + TFaux tfauxNode2; + tfauxNode2 = (TFaux)nodeArrayList1.get(0); + + pexpNode1 = new AFauxExp(tfauxNode2); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new13() /* reduce AVraiExp */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PExp pexpNode1; + { + // Block + TVrai tvraiNode2; + tvraiNode2 = (TVrai)nodeArrayList1.get(0); + + pexpNode1 = new AVraiExp(tvraiNode2); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new14() /* reduce AIntExp */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PExp pexpNode1; + { + // Block + TInteger tintegerNode2; + tintegerNode2 = (TInteger)nodeArrayList1.get(0); + + pexpNode1 = new AIntExp(tintegerNode2); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new15() /* reduce ALireExp */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PExp pexpNode1; + { + // Block + TLire tlireNode2; + tlireNode2 = (TLire)nodeArrayList1.get(0); + + pexpNode1 = new ALireExp(tlireNode2); + } + nodeList.add(pexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new16() /* reduce AAffectInst */ + { + @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 + TPo tpoNode2; + TSainstaffect tsainstaffectNode3; + PVar pvarNode4; + PExp pexpNode5; + TPf tpfNode6; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsainstaffectNode3 = (TSainstaffect)nodeArrayList2.get(0); + pvarNode4 = (PVar)nodeArrayList3.get(0); + pexpNode5 = (PExp)nodeArrayList4.get(0); + tpfNode6 = (TPf)nodeArrayList5.get(0); + + pinstNode1 = new AAffectInst(tpoNode2, tsainstaffectNode3, pvarNode4, pexpNode5, tpfNode6); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new17() /* reduce ABlocInst */ + { + @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(); + PInst pinstNode1; + { + // Block + TPo tpoNode2; + TSainstbloc tsainstblocNode3; + PLinst plinstNode4; + TPf tpfNode5; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsainstblocNode3 = (TSainstbloc)nodeArrayList2.get(0); + plinstNode4 = (PLinst)nodeArrayList3.get(0); + tpfNode5 = (TPf)nodeArrayList4.get(0); + + pinstNode1 = new ABlocInst(tpoNode2, tsainstblocNode3, plinstNode4, tpfNode5); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new18() /* reduce AEcritureInst */ + { + @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(); + PInst pinstNode1; + { + // Block + TPo tpoNode2; + TSainstecriture tsainstecritureNode3; + PExp pexpNode4; + TPf tpfNode5; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsainstecritureNode3 = (TSainstecriture)nodeArrayList2.get(0); + pexpNode4 = (PExp)nodeArrayList3.get(0); + tpfNode5 = (TPf)nodeArrayList4.get(0); + + pinstNode1 = new AEcritureInst(tpoNode2, tsainstecritureNode3, pexpNode4, tpfNode5); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new19() /* reduce ARetourInst */ + { + @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(); + PInst pinstNode1; + { + // Block + TPo tpoNode2; + TSainstretour tsainstretourNode3; + PExp pexpNode4; + TPf tpfNode5; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsainstretourNode3 = (TSainstretour)nodeArrayList2.get(0); + pexpNode4 = (PExp)nodeArrayList3.get(0); + tpfNode5 = (TPf)nodeArrayList4.get(0); + + pinstNode1 = new ARetourInst(tpoNode2, tsainstretourNode3, pexpNode4, tpfNode5); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new20() /* reduce ASiInst */ + { + @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(); + PInst pinstNode1; + { + // Block + TPo tpoNode2; + TSainstsi tsainstsiNode3; + PExp pexpNode4; + PInst pinstNode5; + PInst pinstNode6; + TPf tpfNode7; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsainstsiNode3 = (TSainstsi)nodeArrayList2.get(0); + pexpNode4 = (PExp)nodeArrayList3.get(0); + pinstNode5 = (PInst)nodeArrayList4.get(0); + pinstNode6 = (PInst)nodeArrayList5.get(0); + tpfNode7 = (TPf)nodeArrayList6.get(0); + + pinstNode1 = new ASiInst(tpoNode2, tsainstsiNode3, pexpNode4, pinstNode5, pinstNode6, tpfNode7); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new21() /* reduce ASi2Inst */ + { + @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(); + PInst pinstNode1; + { + // Block + TPo tpoNode2; + TSainstsi tsainstsiNode3; + PExp pexpNode4; + PInst pinstNode5; + TNull tnullNode6; + TPf tpfNode7; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsainstsiNode3 = (TSainstsi)nodeArrayList2.get(0); + pexpNode4 = (PExp)nodeArrayList3.get(0); + pinstNode5 = (PInst)nodeArrayList4.get(0); + tnullNode6 = (TNull)nodeArrayList5.get(0); + tpfNode7 = (TPf)nodeArrayList6.get(0); + + pinstNode1 = new ASi2Inst(tpoNode2, tsainstsiNode3, pexpNode4, pinstNode5, tnullNode6, tpfNode7); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new22() /* reduce ATantqueInst */ + { + @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 + TPo tpoNode2; + TSainsttantque tsainsttantqueNode3; + PExp pexpNode4; + PInst pinstNode5; + TPf tpfNode6; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsainsttantqueNode3 = (TSainsttantque)nodeArrayList2.get(0); + pexpNode4 = (PExp)nodeArrayList3.get(0); + pinstNode5 = (PInst)nodeArrayList4.get(0); + tpfNode6 = (TPf)nodeArrayList5.get(0); + + pinstNode1 = new ATantqueInst(tpoNode2, tsainsttantqueNode3, pexpNode4, pinstNode5, tpfNode6); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new23() /* reduce AAppelInst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PInst pinstNode1; + { + // Block + PAppel pappelNode2; + pappelNode2 = (PAppel)nodeArrayList1.get(0); + + pinstNode1 = new AAppelInst(pappelNode2); + } + nodeList.add(pinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new24() /* reduce ARecLdecfonc */ + { + @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(); + PLdecfonc pldecfoncNode1; + { + // Block + TPo tpoNode2; + TSaldecfonc tsaldecfoncNode3; + PDecfonc pdecfoncNode4; + PLdecfonc pldecfoncNode5; + TPf tpfNode6; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsaldecfoncNode3 = (TSaldecfonc)nodeArrayList2.get(0); + pdecfoncNode4 = (PDecfonc)nodeArrayList3.get(0); + pldecfoncNode5 = (PLdecfonc)nodeArrayList4.get(0); + tpfNode6 = (TPf)nodeArrayList5.get(0); + + pldecfoncNode1 = new ARecLdecfonc(tpoNode2, tsaldecfoncNode3, pdecfoncNode4, pldecfoncNode5, tpfNode6); + } + nodeList.add(pldecfoncNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new25() /* reduce AFinLdecfonc */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PLdecfonc pldecfoncNode1; + { + // Block + TNull tnullNode2; + tnullNode2 = (TNull)nodeArrayList1.get(0); + + pldecfoncNode1 = new AFinLdecfonc(tnullNode2); + } + nodeList.add(pldecfoncNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new26() /* reduce ARecLdecvar */ + { + @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(); + PLdecvar pldecvarNode1; + { + // Block + TPo tpoNode2; + TSaldecvar tsaldecvarNode3; + PDecvar pdecvarNode4; + PLdecvar pldecvarNode5; + TPf tpfNode6; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsaldecvarNode3 = (TSaldecvar)nodeArrayList2.get(0); + pdecvarNode4 = (PDecvar)nodeArrayList3.get(0); + pldecvarNode5 = (PLdecvar)nodeArrayList4.get(0); + tpfNode6 = (TPf)nodeArrayList5.get(0); + + pldecvarNode1 = new ARecLdecvar(tpoNode2, tsaldecvarNode3, pdecvarNode4, pldecvarNode5, tpfNode6); + } + nodeList.add(pldecvarNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new27() /* reduce AFinLdecvar */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PLdecvar pldecvarNode1; + { + // Block + TNull tnullNode2; + tnullNode2 = (TNull)nodeArrayList1.get(0); + + pldecvarNode1 = new AFinLdecvar(tnullNode2); + } + nodeList.add(pldecvarNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new28() /* reduce ARecLexp */ + { + @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(); + PLexp plexpNode1; + { + // Block + TPo tpoNode2; + TSalexp tsalexpNode3; + PExp pexpNode4; + PLexp plexpNode5; + TPf tpfNode6; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsalexpNode3 = (TSalexp)nodeArrayList2.get(0); + pexpNode4 = (PExp)nodeArrayList3.get(0); + plexpNode5 = (PLexp)nodeArrayList4.get(0); + tpfNode6 = (TPf)nodeArrayList5.get(0); + + plexpNode1 = new ARecLexp(tpoNode2, tsalexpNode3, pexpNode4, plexpNode5, tpfNode6); + } + nodeList.add(plexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new29() /* reduce AFinLexp */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PLexp plexpNode1; + { + // Block + TNull tnullNode2; + tnullNode2 = (TNull)nodeArrayList1.get(0); + + plexpNode1 = new AFinLexp(tnullNode2); + } + nodeList.add(plexpNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new30() /* reduce ARecLinst */ + { + @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(); + PLinst plinstNode1; + { + // Block + TPo tpoNode2; + TSalinst tsalinstNode3; + PInst pinstNode4; + PLinst plinstNode5; + TPf tpfNode6; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsalinstNode3 = (TSalinst)nodeArrayList2.get(0); + pinstNode4 = (PInst)nodeArrayList3.get(0); + plinstNode5 = (PLinst)nodeArrayList4.get(0); + tpfNode6 = (TPf)nodeArrayList5.get(0); + + plinstNode1 = new ARecLinst(tpoNode2, tsalinstNode3, pinstNode4, plinstNode5, tpfNode6); + } + nodeList.add(plinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new31() /* reduce AFinLinst */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PLinst plinstNode1; + { + // Block + TNull tnullNode2; + tnullNode2 = (TNull)nodeArrayList1.get(0); + + plinstNode1 = new AFinLinst(tnullNode2); + } + nodeList.add(plinstNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new32() /* reduce ADecfonc */ + { + @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 + TPo tpoNode2; + TSadecfonc tsadecfoncNode3; + TId tidNode4; + PType ptypeNode5; + PLdecvar pldecvarNode6; + PLdecvar pldecvarNode7; + PInst pinstNode8; + TPf tpfNode9; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsadecfoncNode3 = (TSadecfonc)nodeArrayList2.get(0); + tidNode4 = (TId)nodeArrayList3.get(0); + ptypeNode5 = (PType)nodeArrayList4.get(0); + pldecvarNode6 = (PLdecvar)nodeArrayList5.get(0); + pldecvarNode7 = (PLdecvar)nodeArrayList6.get(0); + pinstNode8 = (PInst)nodeArrayList7.get(0); + tpfNode9 = (TPf)nodeArrayList8.get(0); + + pdecfoncNode1 = new ADecfonc(tpoNode2, tsadecfoncNode3, tidNode4, ptypeNode5, pldecvarNode6, pldecvarNode7, pinstNode8, tpfNode9); + } + nodeList.add(pdecfoncNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new33() /* reduce ATabDecvar */ + { + @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(); + PDecvar pdecvarNode1; + { + // Block + TPo tpoNode2; + TSadectab tsadectabNode3; + TId tidNode4; + PType ptypeNode5; + TInteger tintegerNode6; + TPf tpfNode7; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsadectabNode3 = (TSadectab)nodeArrayList2.get(0); + tidNode4 = (TId)nodeArrayList3.get(0); + ptypeNode5 = (PType)nodeArrayList4.get(0); + tintegerNode6 = (TInteger)nodeArrayList5.get(0); + tpfNode7 = (TPf)nodeArrayList6.get(0); + + pdecvarNode1 = new ATabDecvar(tpoNode2, tsadectabNode3, tidNode4, ptypeNode5, tintegerNode6, tpfNode7); + } + nodeList.add(pdecvarNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new34() /* reduce ASimpleDecvar */ + { + @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 + TPo tpoNode2; + TSadecvarsimple tsadecvarsimpleNode3; + TId tidNode4; + PType ptypeNode5; + TPf tpfNode6; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsadecvarsimpleNode3 = (TSadecvarsimple)nodeArrayList2.get(0); + tidNode4 = (TId)nodeArrayList3.get(0); + ptypeNode5 = (PType)nodeArrayList4.get(0); + tpfNode6 = (TPf)nodeArrayList5.get(0); + + pdecvarNode1 = new ASimpleDecvar(tpoNode2, tsadecvarsimpleNode3, tidNode4, ptypeNode5, tpfNode6); + } + nodeList.add(pdecvarNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new35() /* reduce AIndiceeVar */ + { + @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(); + PVar pvarNode1; + { + // Block + TPo tpoNode2; + TSavarindicee tsavarindiceeNode3; + TId tidNode4; + PExp pexpNode5; + TPf tpfNode6; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsavarindiceeNode3 = (TSavarindicee)nodeArrayList2.get(0); + tidNode4 = (TId)nodeArrayList3.get(0); + pexpNode5 = (PExp)nodeArrayList4.get(0); + tpfNode6 = (TPf)nodeArrayList5.get(0); + + pvarNode1 = new AIndiceeVar(tpoNode2, tsavarindiceeNode3, tidNode4, pexpNode5, tpfNode6); + } + nodeList.add(pvarNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new36() /* reduce ASimpleVar */ + { + @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 + TPo tpoNode2; + TSavarsimple tsavarsimpleNode3; + TId tidNode4; + TPf tpfNode5; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsavarsimpleNode3 = (TSavarsimple)nodeArrayList2.get(0); + tidNode4 = (TId)nodeArrayList3.get(0); + tpfNode5 = (TPf)nodeArrayList4.get(0); + + pvarNode1 = new ASimpleVar(tpoNode2, tsavarsimpleNode3, tidNode4, tpfNode5); + } + nodeList.add(pvarNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new37() /* reduce AAppel */ + { + @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(); + PAppel pappelNode1; + { + // Block + TPo tpoNode2; + TSaappel tsaappelNode3; + TId tidNode4; + PLexp plexpNode5; + TPf tpfNode6; + tpoNode2 = (TPo)nodeArrayList1.get(0); + tsaappelNode3 = (TSaappel)nodeArrayList2.get(0); + tidNode4 = (TId)nodeArrayList3.get(0); + plexpNode5 = (PLexp)nodeArrayList4.get(0); + tpfNode6 = (TPf)nodeArrayList5.get(0); + + pappelNode1 = new AAppel(tpoNode2, tsaappelNode3, tidNode4, plexpNode5, tpfNode6); + } + nodeList.add(pappelNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new38() /* reduce AEntierType */ + { + @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 AEntierType(tentierNode2); + } + nodeList.add(ptypeNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new39() /* reduce ABoolType */ + { + @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 ABoolType(tboolNode2); + } + nodeList.add(ptypeNode1); + return nodeList; + } + + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + ArrayList<Object> new40() /* reduce ANullType */ + { + @SuppressWarnings("hiding") ArrayList<Object> nodeList = new ArrayList<Object>(); + + @SuppressWarnings("unused") ArrayList<Object> nodeArrayList1 = pop(); + PType ptypeNode1; + { + // Block + TNul tnulNode2; + tnulNode2 = (TNul)nodeArrayList1.get(0); + + ptypeNode1 = new ANullType(tnulNode2); + } + nodeList.add(ptypeNode1); + return nodeList; + } + + + + private static int[][][] actionTable; +/* { + {{-1, ERROR, 0}, {0, SHIFT, 1}, }, + {{-1, ERROR, 1}, {32, SHIFT, 3}, }, + {{-1, ERROR, 2}, {44, ACCEPT, -1}, }, + {{-1, ERROR, 3}, {0, SHIFT, 4}, {38, SHIFT, 5}, }, + {{-1, ERROR, 4}, {29, SHIFT, 7}, }, + {{-1, REDUCE, 27}, }, + {{-1, ERROR, 6}, {0, SHIFT, 8}, {38, SHIFT, 9}, }, + {{-1, ERROR, 7}, {0, SHIFT, 11}, }, + {{-1, ERROR, 8}, {28, SHIFT, 13}, }, + {{-1, REDUCE, 25}, }, + {{-1, ERROR, 10}, {1, SHIFT, 14}, }, + {{-1, ERROR, 11}, {4, SHIFT, 15}, {6, SHIFT, 16}, }, + {{-1, ERROR, 12}, {0, SHIFT, 4}, {38, SHIFT, 5}, }, + {{-1, ERROR, 13}, {0, SHIFT, 18}, }, + {{-1, REDUCE, 0}, }, + {{-1, ERROR, 15}, {43, SHIFT, 20}, }, + {{-1, ERROR, 16}, {43, SHIFT, 21}, }, + {{-1, ERROR, 17}, {1, SHIFT, 22}, }, + {{-1, ERROR, 18}, {3, SHIFT, 23}, }, + {{-1, ERROR, 19}, {0, SHIFT, 8}, {38, SHIFT, 9}, }, + {{-1, ERROR, 20}, {39, SHIFT, 25}, {40, SHIFT, 26}, {41, SHIFT, 27}, }, + {{-1, ERROR, 21}, {39, SHIFT, 25}, {40, SHIFT, 26}, {41, SHIFT, 27}, }, + {{-1, REDUCE, 26}, }, + {{-1, ERROR, 23}, {43, SHIFT, 30}, }, + {{-1, ERROR, 24}, {1, SHIFT, 31}, }, + {{-1, REDUCE, 38}, }, + {{-1, REDUCE, 39}, }, + {{-1, REDUCE, 40}, }, + {{-1, ERROR, 28}, {42, SHIFT, 32}, }, + {{-1, ERROR, 29}, {1, SHIFT, 33}, }, + {{-1, ERROR, 30}, {39, SHIFT, 25}, {40, SHIFT, 26}, {41, SHIFT, 27}, }, + {{-1, REDUCE, 24}, }, + {{-1, ERROR, 32}, {1, SHIFT, 35}, }, + {{-1, REDUCE, 34}, }, + {{-1, ERROR, 34}, {0, SHIFT, 4}, {38, SHIFT, 5}, }, + {{-1, REDUCE, 33}, }, + {{-1, ERROR, 36}, {0, SHIFT, 4}, {38, SHIFT, 5}, }, + {{-1, ERROR, 37}, {0, SHIFT, 38}, }, + {{-1, ERROR, 38}, {2, SHIFT, 41}, {22, SHIFT, 42}, {23, SHIFT, 43}, {24, SHIFT, 44}, {25, SHIFT, 45}, {26, SHIFT, 46}, {27, SHIFT, 47}, }, + {{-1, ERROR, 39}, {1, SHIFT, 48}, }, + {{-1, REDUCE, 23}, }, + {{-1, ERROR, 41}, {43, SHIFT, 49}, }, + {{-1, ERROR, 42}, {0, SHIFT, 50}, }, + {{-1, ERROR, 43}, {0, SHIFT, 52}, {38, SHIFT, 53}, }, + {{-1, ERROR, 44}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 45}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 46}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 47}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, REDUCE, 32}, }, + {{-1, ERROR, 49}, {0, SHIFT, 64}, {38, SHIFT, 65}, }, + {{-1, ERROR, 50}, {33, SHIFT, 67}, {34, SHIFT, 68}, }, + {{-1, ERROR, 51}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 52}, {31, SHIFT, 70}, }, + {{-1, REDUCE, 31}, }, + {{-1, ERROR, 54}, {1, SHIFT, 71}, }, + {{-1, ERROR, 55}, {7, SHIFT, 72}, {8, SHIFT, 73}, {9, SHIFT, 74}, {10, SHIFT, 75}, {11, SHIFT, 76}, {13, SHIFT, 77}, {16, SHIFT, 78}, {17, SHIFT, 79}, {18, SHIFT, 80}, {19, SHIFT, 81}, {20, SHIFT, 82}, }, + {{-1, REDUCE, 12}, }, + {{-1, REDUCE, 13}, }, + {{-1, REDUCE, 15}, }, + {{-1, REDUCE, 14}, }, + {{-1, ERROR, 60}, {1, SHIFT, 83}, }, + {{-1, ERROR, 61}, {1, SHIFT, 84}, }, + {{-1, ERROR, 62}, {0, SHIFT, 38}, }, + {{-1, ERROR, 63}, {0, SHIFT, 38}, }, + {{-1, ERROR, 64}, {30, SHIFT, 87}, }, + {{-1, REDUCE, 29}, }, + {{-1, ERROR, 66}, {1, SHIFT, 88}, }, + {{-1, ERROR, 67}, {43, SHIFT, 89}, }, + {{-1, ERROR, 68}, {43, SHIFT, 90}, }, + {{-1, ERROR, 69}, {1, SHIFT, 91}, }, + {{-1, ERROR, 70}, {0, SHIFT, 38}, }, + {{-1, REDUCE, 17}, }, + {{-1, ERROR, 72}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 73}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 74}, {0, SHIFT, 95}, }, + {{-1, ERROR, 75}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 76}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 77}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 78}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 79}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 80}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 81}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 82}, {0, SHIFT, 50}, }, + {{-1, REDUCE, 18}, }, + {{-1, REDUCE, 19}, }, + {{-1, ERROR, 85}, {0, SHIFT, 38}, {38, SHIFT, 105}, }, + {{-1, ERROR, 86}, {1, SHIFT, 107}, }, + {{-1, ERROR, 87}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, REDUCE, 37}, }, + {{-1, ERROR, 89}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 90}, {1, SHIFT, 110}, }, + {{-1, REDUCE, 16}, }, + {{-1, ERROR, 92}, {0, SHIFT, 52}, {38, SHIFT, 53}, }, + {{-1, ERROR, 93}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 94}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 95}, {2, SHIFT, 41}, }, + {{-1, ERROR, 96}, {1, SHIFT, 114}, }, + {{-1, ERROR, 97}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 98}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 99}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 100}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 101}, {1, SHIFT, 119}, }, + {{-1, ERROR, 102}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 103}, {0, SHIFT, 55}, {35, SHIFT, 56}, {36, SHIFT, 57}, {37, SHIFT, 58}, {42, SHIFT, 59}, }, + {{-1, ERROR, 104}, {1, SHIFT, 122}, }, + {{-1, ERROR, 105}, {1, SHIFT, 123}, }, + {{-1, ERROR, 106}, {1, SHIFT, 124}, }, + {{-1, REDUCE, 22}, }, + {{-1, ERROR, 108}, {0, SHIFT, 64}, {38, SHIFT, 65}, }, + {{-1, ERROR, 109}, {1, SHIFT, 126}, }, + {{-1, REDUCE, 36}, }, + {{-1, ERROR, 111}, {1, SHIFT, 127}, }, + {{-1, ERROR, 112}, {1, SHIFT, 128}, }, + {{-1, ERROR, 113}, {1, SHIFT, 129}, }, + {{-1, REDUCE, 10}, }, + {{-1, ERROR, 115}, {1, SHIFT, 130}, }, + {{-1, ERROR, 116}, {1, SHIFT, 131}, }, + {{-1, ERROR, 117}, {1, SHIFT, 132}, }, + {{-1, ERROR, 118}, {1, SHIFT, 133}, }, + {{-1, REDUCE, 9}, }, + {{-1, ERROR, 120}, {1, SHIFT, 134}, }, + {{-1, ERROR, 121}, {1, SHIFT, 135}, }, + {{-1, REDUCE, 11}, }, + {{-1, REDUCE, 21}, }, + {{-1, REDUCE, 20}, }, + {{-1, ERROR, 125}, {1, SHIFT, 136}, }, + {{-1, REDUCE, 35}, }, + {{-1, REDUCE, 30}, }, + {{-1, REDUCE, 1}, }, + {{-1, REDUCE, 2}, }, + {{-1, REDUCE, 3}, }, + {{-1, REDUCE, 4}, }, + {{-1, REDUCE, 5}, }, + {{-1, REDUCE, 6}, }, + {{-1, REDUCE, 7}, }, + {{-1, REDUCE, 8}, }, + {{-1, REDUCE, 28}, }, + };*/ + private static int[][][] gotoTable; +/* { + {{-1, 2}, }, + {{-1, 60}, {45, 61}, {46, 62}, {47, 63}, {51, 69}, {72, 93}, {73, 94}, {75, 97}, {76, 98}, {77, 99}, {78, 100}, {79, 101}, {80, 102}, {81, 103}, {87, 108}, {89, 109}, {93, 112}, {94, 113}, {97, 115}, {98, 116}, {99, 117}, {100, 118}, {102, 120}, {103, 121}, }, + {{-1, 39}, {62, 85}, {63, 86}, {70, 92}, {85, 106}, }, + {{-1, 10}, {19, 24}, }, + {{-1, 6}, {12, 17}, {34, 36}, {36, 37}, }, + {{-1, 66}, {108, 125}, }, + {{-1, 54}, {92, 111}, }, + {{-1, 19}, }, + {{-1, 12}, }, + {{-1, 51}, {82, 104}, }, + {{-1, 40}, {74, 96}, }, + {{-1, 28}, {21, 29}, {30, 34}, }, + };*/ + private static String[] errorMessages; +/* { + "expecting: '('", + "expecting: 'SaProg'", + "expecting: EOF", + "expecting: '(', 'null'", + "expecting: 'SaLDecVar'", + "expecting: '(', ')', 'null'", + "expecting: 'SaLDecFonc'", + "expecting: ')'", + "expecting: 'SaDecTab', 'SaDecVarSimple'", + "expecting: id", + "expecting: 'SaDecFonc'", + "expecting: 'entier', 'bool', 'nul'", + "expecting: '(', ')', 'null', integer", + "expecting: integer", + "expecting: 'SaAppel', 'SaInstAffect', 'SaInstBloc', 'SaInstEcriture', 'SaInstRetour', 'SaInstSi', 'SaInstTantQue'", + "expecting: '(', 'faux', 'vrai', 'lire', integer", + "expecting: 'SaVarIndicee', 'SaVarSimple'", + "expecting: 'SaLInst'", + "expecting: 'SaExpAdd', 'SaExpAnd', 'SaExpAppel', 'SaExpDiv', 'SaExpEqual', 'SaExpInf', 'SaExpMult', 'SaExpNot', 'SaExpOr', 'SaExpSub', 'SaExpVar'", + "expecting: '(', ')', 'faux', 'vrai', 'lire', 'null', integer", + "expecting: 'SaLExp'", + "expecting: 'SaAppel'", + "expecting: '(', ')', 'faux', 'vrai', 'lire', integer", + };*/ + private static int[] errors; +/* { + 0, 1, 2, 3, 4, 5, 3, 0, 6, 7, 7, 8, 3, 0, 2, 9, 9, 7, 10, 3, 11, 11, 5, 9, 7, 12, 12, 12, 13, 7, 11, 7, 7, 3, 3, 3, 3, 0, 14, 7, 5, 9, 0, 3, 15, 15, 15, 15, 3, 3, 16, 15, 17, 7, 7, 18, 19, 19, 19, 19, 7, 7, 0, 0, 20, 7, 7, 9, 9, 7, 0, 5, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 0, 5, 5, 3, 7, 15, 5, 15, 7, 5, 3, 15, 15, 21, 7, 15, 15, 15, 15, 7, 15, 15, 7, 7, 7, 5, 3, 7, 22, 7, 7, 7, 19, 7, 7, 7, 7, 19, 7, 7, 19, 5, 5, 7, 22, 7, 19, 19, 19, 19, 19, 19, 19, 19, 7, + };*/ + + 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/saParser/parser/ParserException.java b/src/saParser/parser/ParserException.java new file mode 100644 index 0000000..47cd07d --- /dev/null +++ b/src/saParser/parser/ParserException.java @@ -0,0 +1,22 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.parser; + +import saParser.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/saParser/parser/State.java b/src/saParser/parser/State.java new file mode 100644 index 0000000..63482fa --- /dev/null +++ b/src/saParser/parser/State.java @@ -0,0 +1,17 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.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/saParser/parser/TokenIndex.java b/src/saParser/parser/TokenIndex.java new file mode 100644 index 0000000..c7c5f32 --- /dev/null +++ b/src/saParser/parser/TokenIndex.java @@ -0,0 +1,281 @@ +/* This file was generated by SableCC (http://www.sablecc.org/). */ + +package saParser.parser; + +import saParser.node.*; +import saParser.analysis.*; + +class TokenIndex extends AnalysisAdapter +{ + int index; + + @Override + public void caseTPo(@SuppressWarnings("unused") TPo node) + { + this.index = 0; + } + + @Override + public void caseTPf(@SuppressWarnings("unused") TPf node) + { + this.index = 1; + } + + @Override + public void caseTSaappel(@SuppressWarnings("unused") TSaappel node) + { + this.index = 2; + } + + @Override + public void caseTSadecfonc(@SuppressWarnings("unused") TSadecfonc node) + { + this.index = 3; + } + + @Override + public void caseTSadectab(@SuppressWarnings("unused") TSadectab node) + { + this.index = 4; + } + + @Override + public void caseTSadecvar(@SuppressWarnings("unused") TSadecvar node) + { + this.index = 5; + } + + @Override + public void caseTSadecvarsimple(@SuppressWarnings("unused") TSadecvarsimple node) + { + this.index = 6; + } + + @Override + public void caseTSaexpadd(@SuppressWarnings("unused") TSaexpadd node) + { + this.index = 7; + } + + @Override + public void caseTSaexpand(@SuppressWarnings("unused") TSaexpand node) + { + this.index = 8; + } + + @Override + public void caseTSaexpappel(@SuppressWarnings("unused") TSaexpappel node) + { + this.index = 9; + } + + @Override + public void caseTSaexpdiv(@SuppressWarnings("unused") TSaexpdiv node) + { + this.index = 10; + } + + @Override + public void caseTSaexpequal(@SuppressWarnings("unused") TSaexpequal node) + { + this.index = 11; + } + + @Override + public void caseTSaexpfaux(@SuppressWarnings("unused") TSaexpfaux node) + { + this.index = 12; + } + + @Override + public void caseTSaexpinf(@SuppressWarnings("unused") TSaexpinf node) + { + this.index = 13; + } + + @Override + public void caseTSaexpint(@SuppressWarnings("unused") TSaexpint node) + { + this.index = 14; + } + + @Override + public void caseTSaexplire(@SuppressWarnings("unused") TSaexplire node) + { + this.index = 15; + } + + @Override + public void caseTSaexpmult(@SuppressWarnings("unused") TSaexpmult node) + { + this.index = 16; + } + + @Override + public void caseTSaexpnot(@SuppressWarnings("unused") TSaexpnot node) + { + this.index = 17; + } + + @Override + public void caseTSaexpor(@SuppressWarnings("unused") TSaexpor node) + { + this.index = 18; + } + + @Override + public void caseTSaexpsub(@SuppressWarnings("unused") TSaexpsub node) + { + this.index = 19; + } + + @Override + public void caseTSaexpvar(@SuppressWarnings("unused") TSaexpvar node) + { + this.index = 20; + } + + @Override + public void caseTSaexpvrai(@SuppressWarnings("unused") TSaexpvrai node) + { + this.index = 21; + } + + @Override + public void caseTSainstaffect(@SuppressWarnings("unused") TSainstaffect node) + { + this.index = 22; + } + + @Override + public void caseTSainstbloc(@SuppressWarnings("unused") TSainstbloc node) + { + this.index = 23; + } + + @Override + public void caseTSainstecriture(@SuppressWarnings("unused") TSainstecriture node) + { + this.index = 24; + } + + @Override + public void caseTSainstretour(@SuppressWarnings("unused") TSainstretour node) + { + this.index = 25; + } + + @Override + public void caseTSainstsi(@SuppressWarnings("unused") TSainstsi node) + { + this.index = 26; + } + + @Override + public void caseTSainsttantque(@SuppressWarnings("unused") TSainsttantque node) + { + this.index = 27; + } + + @Override + public void caseTSaldecfonc(@SuppressWarnings("unused") TSaldecfonc node) + { + this.index = 28; + } + + @Override + public void caseTSaldecvar(@SuppressWarnings("unused") TSaldecvar node) + { + this.index = 29; + } + + @Override + public void caseTSalexp(@SuppressWarnings("unused") TSalexp node) + { + this.index = 30; + } + + @Override + public void caseTSalinst(@SuppressWarnings("unused") TSalinst node) + { + this.index = 31; + } + + @Override + public void caseTSaprog(@SuppressWarnings("unused") TSaprog node) + { + this.index = 32; + } + + @Override + public void caseTSavarindicee(@SuppressWarnings("unused") TSavarindicee node) + { + this.index = 33; + } + + @Override + public void caseTSavarsimple(@SuppressWarnings("unused") TSavarsimple node) + { + this.index = 34; + } + + @Override + public void caseTFaux(@SuppressWarnings("unused") TFaux node) + { + this.index = 35; + } + + @Override + public void caseTVrai(@SuppressWarnings("unused") TVrai node) + { + this.index = 36; + } + + @Override + public void caseTLire(@SuppressWarnings("unused") TLire node) + { + this.index = 37; + } + + @Override + public void caseTNull(@SuppressWarnings("unused") TNull node) + { + this.index = 38; + } + + @Override + public void caseTEntier(@SuppressWarnings("unused") TEntier node) + { + this.index = 39; + } + + @Override + public void caseTBool(@SuppressWarnings("unused") TBool node) + { + this.index = 40; + } + + @Override + public void caseTNul(@SuppressWarnings("unused") TNul node) + { + this.index = 41; + } + + @Override + public void caseTInteger(@SuppressWarnings("unused") TInteger node) + { + this.index = 42; + } + + @Override + public void caseTId(@SuppressWarnings("unused") TId node) + { + this.index = 43; + } + + @Override + public void caseEOF(@SuppressWarnings("unused") EOF node) + { + this.index = 44; + } +} diff --git a/src/saParser/parser/parser.dat b/src/saParser/parser/parser.dat new file mode 100644 index 0000000000000000000000000000000000000000..ab0f40aba3c0985f37bdb0b822ad9f1dfab43c82 GIT binary patch literal 7678 zcmZQzVCZCEU|{<H|Nnmm1_ovZRKSQP2jVM0m4MVD>tkYIV9-HUk7OoDEmRu=3j+g# z8kEC|te$}ZEGG+<V`pGsV1$|hvR4}9J}4h#9vf60h~hvplM~HMkU1bVAk2*>2ht}4 zl3-w9;6<}f5=|`^NFJ(|56vwgb3y(BN%J!>Fu>d<fToTIqyUOR>T!hw$SqK13_>7# zq5cMi14tY>+(Gtfg9I5E7(~$A46+|4CyFK~2r?I{PYg{CWG5($LDJ%Aeh>x;LNO@( zV159FI}6mEAiW^Bs6*9(!cqgumSSLF(1fx<af+-5<VIrjAg2qEdC1`baxcu!a%ldN zK=QLZhz)fwC|p7QKsFcT4rD&a{mAx!(v23>AD}#eEC))%ATvSIilB52wFeX~AUA=` z2Fc+I7i7CZ?nX8rWFO3YWi)>%p~V-753&n{(bF8V9UylyBe_!rqydW2^&z`O6{-eA zfx?gj$qW!5R4#zzKyeOAXCO8x+(7XJVuRue<UbG_RDOWM1jN>5U|;~nEr_khz`y`X zD<HN$TAYHy5*8K)Xkh`e1KF)0H-PK|nPZ4%4#-U)aS%2_3qzP5kemrpSz`*y>q!0u zxgVqkgv}Wk7(j6YVp}jUFu=mol7WE%7G_oq3=A-Pt<lT^`5&Yggef%(6n-FcK$udq zK;aKE2ZYHn3pve!(lK(H1H}o*To86Z3TH>O_yENZD7}KzIWsUYz|y!2S{NFG6hJXK zZbeQzpm+zB86e}_(9#)599gXyNFJn+fq}uDfq{VsDUE>K0jrZd7#J8pWhh9gCj$cm zs0;<My%-o6K=loX?ajcz0IFX=Y#(Sn1!DU$Fff41cM#i;fq?;3o`cx_3=H5p1H=ws zU|@ii*MZRb0VEy-av#)9pu7XBmyqKHRR19JL3Io=A5{M#`_~3!9>`z@28Lj?d}WIy z7lI~d2h{_jz-0y0O`vkp9wZ3G=yIU60V+p9(%~TUq54360hPVTZgT?3gA_6_Fhro) z4@x_*yd8-q2TDsYxhOO_S0po|(d0mB18N<(or4^1pg3ZKx)tO{Q2fKxg3<*g<pn7H zP+}Hxn1RwC%&d5{JOxURFgZ%y3`)<`G7FR+sAU!?KT*ppP=2JAS)lw(Ewe!70VQT3 zrx#Fp0y7I#HY2BbP+Jn24=Rt4%luH7Mre5t%IhGZOtgFzhLq>B(b6QS3;^i?VRF(W zvim@FGjbjUl?xzqL6{t~k;4g8j)2N2kXd;k|3J$EkQk^eM-G=5kRm7s)jhCqL2q-! zLe+pMa@>dP*Eo<NP)v?l$bJQt8^~=xWVr;8-=X#tp~Yn)R2)Q+;|65^B!LWpVoJ?Q zhMEJSC^ahuWC#?KV-|8)rXq!9Ia*kzLG1uh<k*88mgyivpqL!9klmbt<mM{0d=AR@ zp!@)`sv1o$3rSxMh>etgKz$43{F4JR0E$8F1z7$8wIz|=k_$2is;&;iMluuBW=B?= z50Zzftw(cP0g_w;np`20TqB5$WCy67hipeNNFHiO6Ph_CNOH|+a-~ReEogFONOG+p zHj@3IHYc+E6(D)2{cULGR3gc>gV;#sfZC|Y<tV5xkIV;+2O!&13(^m@rvt=BG7HoW zLe>jv>ml<&=>wS$Drb=Sptcn<AJl(E=7YwakolnT8e~4GeU8irwb7CJpuRtHn;B%k z1l0YYwlJvg25R?$`dy$lE~w80YR`iDBcQe;sNDxDw?S<-P?-yAQ-R7oP<seeW`Wu= zpz;RP4gr-Fpf&_3pM&auP@V?W-Jtvks`o(Y98^bv(lN+PP&x#e2}*MyGePMIWF{!> zfXoD?6OfspGyyUT6yG4TKyk|o^#iC+4RSZAZU(s<RQH0~wV*l)BnHZdu($-JUr?P6 z>chjvazNn;3Lj8=7t}Wc<s%RV)vYjnpmsUP?Vxl369e^|Kz4xh8PqKxvteNmG83j2 z6qcZN2dFH8iGjvwKy6o0{Q@fsKyd|1i=ci1C>?>^0~#0LV@PGFU?^ZnWk_ZyVaR02 zV@PMPVo+dEXV72(`Ck~Pd@w^ILjXe&Lq0<~SS2o#Tp9csK%pjv(<G2hI$%5V7)lv( z7;?bo;Z_f_*@wXe?B+0rM1~@;dTAoe*JMy<z_dvmr%q&>+!*p1@)(lAcH#1?Is?cC z1_pJ!CPG{u!jQ<21a}X}CWtu1N5Kr447m&i3^@#`U>kXHn3%}`O2zoY3Sus@`;~B* z26A^EI31*dLlqKMNeuZ6`QTWA@FB4TN*yXV&C!7S3=|^B`arP@;)Bv!2}3GFIs?cq zP;VW3N<>#zh|^9`7&<Z(fKxNf7Ig-Ys3$`nLoq`MgCj#4LmD{Ul)&AGEbqjS!;lY- zV~`6`^|~@7GZZmoGL$fsG8BPh1yfBBLn=cFLq1pqETtiv4~kW6;-Itu3im*UQn1Mk z4Ei{Ii3r&=hD3%^h6=b(${30m5*ae#{2Yc%B$uLxqXteJKrV))LQuG+Fk~_$Go*su zh43*%9^@b7R4RhkOdkf2d7yXzrJad*)w+U9B}ax7h7`DeK<<Kx=iv~?7W)uAE)1Cr zWmwE|Whi7QWk^Iy-w1m^?oGp@#}`~qp{5~-Eq)C74A{i|k@6G5{9uMsv@!r<3M6zv zp=5(Ilo06vk;6z!5$X((oD9n==qUt$+3&*uaVyA`_~RWpPckr=(9lQdJ^;<?ff`q! zmJ+CS0%{R~T0x+e4~Pwt1J%-?mJSGmS~xIqka|$75QIT;pc)<|2WsJgFvtv;9H>Ty zVbG`{NIggmhz4PhK4c8C7c_bZl7pE85(B9LjWQx*kQfMqdd47eP-_CD4}?LZ3ZRw& zG6so*FvvU*2DLard=Lh?7lc7<kQ~TvkeMJ1;)7^h7$gr;55ge#fXo1?1@S>Nh!0|e z<Uo872DLaq;vhCMMiv9HVHl<##0T|cKr{@4{0L*iXk;-E8>AnELGm#DAaQ({9RT%8 B>-hix literal 0 HcmV?d00001 -- GitLab