diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..13566b81b018ad684f3a35fee301741b2734c8f4 --- /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 0000000000000000000000000000000000000000..74b628481c6e9b5845788e82f71de945e301a370 --- /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 0000000000000000000000000000000000000000..dbb096cd6d54e582fa1f05a952f900aff209bf72 --- /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 0000000000000000000000000000000000000000..22c43dd9e2ef294ba8b6c1099688b8f5d3c84d67 --- /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 0000000000000000000000000000000000000000..35eb1ddfbbc029bcab630581847471d7f238ec53 --- /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 0000000000000000000000000000000000000000..871caa1526ad40a35eb85fb1032681e585fa4fba --- /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 0000000000000000000000000000000000000000..b64a54cfb52d4ed71cb744d8ded611b48cd6b86c --- /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 0000000000000000000000000000000000000000..0737c8bfa0ab825607216415bdcd5941de62244f --- /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 Binary files /dev/null and b/out/production/2024-compilation-bazizi/c3aParser/lexer/lexer.dat differ 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 Binary files /dev/null and b/out/production/2024-compilation-bazizi/c3aParser/parser/parser.dat differ diff --git a/out/production/2024-compilation-bazizi/l.cfg b/out/production/2024-compilation-bazizi/l.cfg new file mode 100644 index 0000000000000000000000000000000000000000..e4eabb757448c2fa4492fd7f67d27417bc58d4a5 --- /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 Binary files /dev/null and b/out/production/2024-compilation-bazizi/lParser/lexer/lexer.dat differ 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 Binary files /dev/null and b/out/production/2024-compilation-bazizi/lParser/parser/parser.dat differ diff --git a/out/production/2024-compilation-bazizi/nasm.cfg b/out/production/2024-compilation-bazizi/nasm.cfg new file mode 100644 index 0000000000000000000000000000000000000000..cbc3812ff198b459a7b8ef13cd583983504283d9 --- /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 Binary files /dev/null and b/out/production/2024-compilation-bazizi/nasmParser/lexer/lexer.dat differ 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 Binary files /dev/null and b/out/production/2024-compilation-bazizi/nasmParser/parser/parser.dat differ diff --git a/out/production/2024-compilation-bazizi/sa.cfg b/out/production/2024-compilation-bazizi/sa.cfg new file mode 100644 index 0000000000000000000000000000000000000000..60ff9b85148f3e6fe9b397212b275494b2853a94 --- /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 Binary files /dev/null and b/out/production/2024-compilation-bazizi/saParser/lexer/lexer.dat differ 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 Binary files /dev/null and b/out/production/2024-compilation-bazizi/saParser/parser/parser.dat differ diff --git a/src/c3aParser/analysis/Analysis.java b/src/c3aParser/analysis/Analysis.java new file mode 100644 index 0000000000000000000000000000000000000000..19754388906a7cec354577eb73d254d485e1594d --- /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 0000000000000000000000000000000000000000..b0b68a081a28976449816061d646d05e958ba5bc --- /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 0000000000000000000000000000000000000000..b3fdde89e7103f4efc32e4f55ccfdbca8df30b14 --- /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 0000000000000000000000000000000000000000..d3d83ee83ac937dbd949ed00188bae66ace19a0e --- /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 0000000000000000000000000000000000000000..b3608348c67bee52bcb476f04eb2ca561bee0cf5 --- /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 0000000000000000000000000000000000000000..05bfc4ed42f342a195af83e3d76ed3dd8d8f01c7 --- /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 0000000000000000000000000000000000000000..9fa6811ee1c8fccfbdf08002391dd9f8845df722 --- /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 Binary files /dev/null and b/src/c3aParser/lexer/lexer.dat differ diff --git a/src/c3aParser/node/AAdd.java b/src/c3aParser/node/AAdd.java new file mode 100644 index 0000000000000000000000000000000000000000..dfc908f95e48fddf40522dbe0aefdb59f50dbd61 --- /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 0000000000000000000000000000000000000000..8014afbe4257f6d33f2a73ba3b508a60421549c1 --- /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 0000000000000000000000000000000000000000..3e4e6f0e0cf42ffc915b12be2f07cf66b4db3819 --- /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 0000000000000000000000000000000000000000..37d0e8579d7a1d66a475020899469a9ea63efeb0 --- /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 0000000000000000000000000000000000000000..dc5402b8ad34338e4526892ed0a5b90de606fffb --- /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 0000000000000000000000000000000000000000..943b9206ef8f7ac2beae8d06b4b391442fa03b1a --- /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 0000000000000000000000000000000000000000..080937144796d22dbb54127febf474019af52e04 --- /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 0000000000000000000000000000000000000000..019f23630de194542492693aa857fdbb289d9cac --- /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 0000000000000000000000000000000000000000..e0906227d967e18637e2aeda68c6af4a41f42f77 --- /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 0000000000000000000000000000000000000000..2473e380975d2486e1a35865b66d6bc55a25337d --- /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 0000000000000000000000000000000000000000..2487976bea94e171cbb9e1b1a85279b070dfa91e --- /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 0000000000000000000000000000000000000000..6a732fbe8de517a55a84b4134d53fe84d1a41f8e --- /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 0000000000000000000000000000000000000000..5007c1d7fec1e01af50073cd9bd86d3178fd93df --- /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 0000000000000000000000000000000000000000..15f7a1196bd9b96c4aa1ce11c23c3698be6b0c40 --- /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 0000000000000000000000000000000000000000..34d756f8726f9e043f5340a9f2b05afbe40eebf1 --- /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 0000000000000000000000000000000000000000..66e5f1c3a5a72dbc535064b7654bf92e22fe40aa --- /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 0000000000000000000000000000000000000000..35b147e88a1b7757228ebdec0e524f70f974f862 --- /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 0000000000000000000000000000000000000000..9b9d6c510fb955465d43b222127661c866804356 --- /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 0000000000000000000000000000000000000000..c61ddda481b0f2dca20b0048a730648206f0801d --- /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 0000000000000000000000000000000000000000..3083585d9f5acc84d45e7acf0547bef405cb1c7e --- /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 0000000000000000000000000000000000000000..0f33ed25741c8b2d35c1cafe25424637c0805892 --- /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 0000000000000000000000000000000000000000..0bf77db8c3f04eb9e1786571341b30facae355a0 --- /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 0000000000000000000000000000000000000000..dd0054353e45594f78bb7e2af90340e6cbedd9ca --- /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 0000000000000000000000000000000000000000..cc5bec66410e13d3b260c3a7b5f422d92a1f6b47 --- /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 0000000000000000000000000000000000000000..e7e5c61af9bd522ea5317cc1ff8ad2635c4b6a68 --- /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 0000000000000000000000000000000000000000..5531004d0445b612b3cab8eb6ddd3470590de32b --- /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 0000000000000000000000000000000000000000..7aece532446ef4a162e5911224ea2dad3758ff87 --- /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 0000000000000000000000000000000000000000..112ca146055be1cc8ea327e10f4d1662d64db7d9 --- /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 0000000000000000000000000000000000000000..6eb092a23c62c488b24c923bc225f7b6f3928110 --- /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 0000000000000000000000000000000000000000..c737a85cb31d19c7e698a163b4f2ef0849517783 --- /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 0000000000000000000000000000000000000000..eb3559f06f1ade09b44b14b5bc83749c749784d3 --- /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 0000000000000000000000000000000000000000..8944ae3efd13bc7ee46d732992e0d9c97c746ebb --- /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 0000000000000000000000000000000000000000..6b9e460677a7f01b652ede729693ff492e52571f --- /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 0000000000000000000000000000000000000000..2609ea8c43cbbfcef0184cf03c0fd91db2a714c8 --- /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 0000000000000000000000000000000000000000..45ce7e90b950c6e99ad57b49305c6a5da9fdb751 --- /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 0000000000000000000000000000000000000000..6d1ce6419a9cf6bd8db12477c6791f348b1178cf --- /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 0000000000000000000000000000000000000000..11c908ed960865b79857bb36a16ff048412bdfd7 --- /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 0000000000000000000000000000000000000000..438faced5e285a7cb34b2bcce17154f0ff17510e --- /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 0000000000000000000000000000000000000000..9d22319e32a9c5f9d35721c6600b655f4cfc023d --- /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 0000000000000000000000000000000000000000..e20c2fa5cb6eeefce8b66058af22495a9e618b7d --- /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 0000000000000000000000000000000000000000..9e046942a311be0ce88fed712e65817e08c66b1b --- /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 0000000000000000000000000000000000000000..8234b7a98e3a81967b634c81300ff5341bd03112 --- /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 0000000000000000000000000000000000000000..0db04e434eba8fb5e95ca193247952ace430f77a --- /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 0000000000000000000000000000000000000000..3b08d63c9f26e236af954650c7a766d0b3731bcd --- /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 0000000000000000000000000000000000000000..25443a26f2fbb4cc12c66ebb24f70f8abbe06996 --- /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 0000000000000000000000000000000000000000..b2c950c9a9f676f9d8ad688e41b0cb04736cc6aa --- /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 0000000000000000000000000000000000000000..a42f2beecbc7dee5b0871787340edcfb39ee76e9 --- /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 0000000000000000000000000000000000000000..acb4ed80483b777448d5a8823ca5a98525fc7870 --- /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 0000000000000000000000000000000000000000..3e4fc2c02f4fbce1baf4ef39188116101689e301 --- /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 0000000000000000000000000000000000000000..64debcc5337c5e87f3ec0ad0e8518bdab2419343 --- /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 0000000000000000000000000000000000000000..1f5ee6f4461dc3e62a96a4960673a88fe1fb4051 --- /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 0000000000000000000000000000000000000000..0b003792081bb2223e04f5c117c0531a6961bc64 --- /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 0000000000000000000000000000000000000000..9e64f4ab478359debede8e54da225fa5d724c486 --- /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 0000000000000000000000000000000000000000..0443ecd8ea488478b1ddacf629ade8d40ae51e28 --- /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 0000000000000000000000000000000000000000..254b085ebe2b055f64678a775491b3bc5a67af8e --- /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 0000000000000000000000000000000000000000..e30df8b09b6dde35004823278c11ce1e713d898c --- /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 0000000000000000000000000000000000000000..9227e111b9931995dba4fce189f4c13a8ad0c84e --- /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 0000000000000000000000000000000000000000..168236377e3543ad8265104440176c54e8aa6e2d --- /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 0000000000000000000000000000000000000000..26fc8ccd1afbca2916e70436bd934b28b2b84c0a --- /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 0000000000000000000000000000000000000000..2d46d772071c53c78a2e94bdda2fbee5c1dbb4a0 --- /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 0000000000000000000000000000000000000000..18b18b5a48e840f2c4ba4daefbb4fc962654f69f --- /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 0000000000000000000000000000000000000000..56581f4bbf78a9355060d969fd9a5456d757e43f --- /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 0000000000000000000000000000000000000000..8b4183e7f1bb3034d62bee3822db976ac5f0202d --- /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 0000000000000000000000000000000000000000..5108bd7c7942bca0dd0996e1289d5c50fe1e69ee --- /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 0000000000000000000000000000000000000000..1a2f469f919bbcab576aad106d8db5985aca5a94 --- /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 0000000000000000000000000000000000000000..bf4a4b5ebac6d360b8974a4b4724c0a51f390d93 --- /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 0000000000000000000000000000000000000000..5aa5548bd7655196c29e906168d26c22bc573af1 --- /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 0000000000000000000000000000000000000000..909c5d8c253bdb65a86181d84a9ea0770c0f33b0 --- /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 0000000000000000000000000000000000000000..e6817460b4b72278761db1e229eb52eafcf14714 --- /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 0000000000000000000000000000000000000000..42d55a99b857cdd3535b87978889ccad9dce0de6 --- /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 0000000000000000000000000000000000000000..82cf8c9a36ef664b8b425b0acdbd970c0fc95973 --- /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 0000000000000000000000000000000000000000..8faa52b517aa76bda361a65a5d546212678f9017 --- /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 0000000000000000000000000000000000000000..fcfda42b15d89b101d78db41f162420479e78e07 --- /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 0000000000000000000000000000000000000000..0f6703f6c2de99e998f09fee3264c2c3cdf37d86 --- /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 0000000000000000000000000000000000000000..829649d3c3c781d2f2176ebdb174b1ad8a150087 --- /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 0000000000000000000000000000000000000000..a93d43f89b3cde01effbcc82632fada1b1a41e86 --- /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 0000000000000000000000000000000000000000..80b798aea641e8d9d2ce11cbdb29797465c80572 --- /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 0000000000000000000000000000000000000000..5162e80c230742db344fa035a6e13495986758cb --- /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 0000000000000000000000000000000000000000..bcbc9570bca7e4ea66a83722df238131d1e9860d --- /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 0000000000000000000000000000000000000000..72234236078722a2b834192906a8a5a683d7120d --- /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 0000000000000000000000000000000000000000..3e7c44f1acfcbd31c26b8b1934e2ddeb0a47922d --- /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 0000000000000000000000000000000000000000..5f0adc0718f6d33b6501b8ddc76a1e703ef60609 --- /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 0000000000000000000000000000000000000000..3a57207e8045fa42037c70dbeaefe2c8e4f44b57 --- /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 0000000000000000000000000000000000000000..7e7ef56a715c2f3c8446cde025e8c7f124fb6ffa --- /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 0000000000000000000000000000000000000000..13fdcd7823a159de83f76abb440026e28e89d416 --- /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 0000000000000000000000000000000000000000..8272cab8b6fe1a720a69aed9d95df5513feba952 --- /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 0000000000000000000000000000000000000000..2f9c86ec469466a6cb3b775c81a7e3475f546441 --- /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 0000000000000000000000000000000000000000..939c00a0d23e53ed8a6024942ea70ea47aac4697 --- /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 0000000000000000000000000000000000000000..0093546a8c17f9799f6307c5c8c2cd8c7ab292f9 --- /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 0000000000000000000000000000000000000000..87cf6eec813d00811e977bafdb4aa45c2ccf631d --- /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 0000000000000000000000000000000000000000..d0bcc6612fcd0c5d308d6ee1d3522f5b6b3007bb --- /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 0000000000000000000000000000000000000000..10355f5dee8a1b71443620a193415b298646ad75 --- /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 0000000000000000000000000000000000000000..7e306e40deae41f14301332f5bca931526931dfa --- /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 0000000000000000000000000000000000000000..61b717ac5a0498112a3c32b7871e13b4d539fdfc --- /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 0000000000000000000000000000000000000000..8de0e8af14b6371d66a4a71bff2c515a16068ef2 --- /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 0000000000000000000000000000000000000000..217e02d5dcf41fced00080bf62523a5a8b7597c2 --- /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 0000000000000000000000000000000000000000..f43214a82459431977a47839ce0757fd26ecb18f --- /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 0000000000000000000000000000000000000000..35774a514d4af2097dfdd2c7e9e5078ca1988b0a --- /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 0000000000000000000000000000000000000000..33975bc6301f8992cf7d700a276d007fade68fe8 --- /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 0000000000000000000000000000000000000000..836d6c8d15d7c06f68fdf16af7acbfc69eeffe8b --- /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 0000000000000000000000000000000000000000..d730f2f093cdac8852d0722bff3389429217e8a6 --- /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 0000000000000000000000000000000000000000..acd7adfc9678eafcb4f00724cfa55e9a735075d6 --- /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 0000000000000000000000000000000000000000..d9c1cc3e65020e7d12a4c5c59d964412dafb1a61 --- /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 0000000000000000000000000000000000000000..aeabf83dd3588f72c42255df1545aff0f703318f --- /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 0000000000000000000000000000000000000000..7a2fc77a64f19c3ea6b845f223b628dac6f4b461 --- /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 0000000000000000000000000000000000000000..77e6093698af1f4268c5a17c4672d527ea4ca874 --- /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 0000000000000000000000000000000000000000..d32bb98a34268548290d12362f7aa7e438a4b949 --- /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 0000000000000000000000000000000000000000..084cabba468aa40a752c0214d5c1c9633e24123b --- /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 0000000000000000000000000000000000000000..e3b1bbc54043966270d23777228309181b6c7848 --- /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 0000000000000000000000000000000000000000..18961026a8680fa3c063556b0caef866e01a30a2 --- /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 0000000000000000000000000000000000000000..61e0c7dcf2d6f6990ea443a02d4647cc04287c4c --- /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 0000000000000000000000000000000000000000..58b10682e29bbcbe7b8cf5b9b67ae89a62178c24 --- /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 0000000000000000000000000000000000000000..ec278778051df6f3436593984f4fbafd1c55e57f --- /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 0000000000000000000000000000000000000000..810d696573506d3daca8daaaedec855ee2b7ea90 --- /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 0000000000000000000000000000000000000000..cec29c99e7299fdfc03af961a48636c8923e0862 --- /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 0000000000000000000000000000000000000000..6ecb1822e3cbc614378329bea766c44d3b78e6e0 --- /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 0000000000000000000000000000000000000000..fd35f0a8c4d327798b5d39d1574ae5b079bed3cb --- /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 0000000000000000000000000000000000000000..a881a43267e8d28ea42981d33c19c50c8227bff0 --- /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 0000000000000000000000000000000000000000..665ca0f7e804e13b820e783f977614ecab608f56 --- /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 0000000000000000000000000000000000000000..f23ce10106f81d92e650f152c8b759cc7d5d7dd8 --- /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 0000000000000000000000000000000000000000..fea41ba36f6794fdf08fefdba4455eba0368d2aa --- /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 0000000000000000000000000000000000000000..5c703c25ce2e89f724c96ac126349079ca37fe9b --- /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 Binary files /dev/null and b/src/c3aParser/parser/parser.dat differ diff --git a/src/nasmParser/lexer/IPushbackReader.java b/src/nasmParser/lexer/IPushbackReader.java new file mode 100644 index 0000000000000000000000000000000000000000..bad3c451d5ae99c007e661a850f1f1a7ab2ec33f --- /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 0000000000000000000000000000000000000000..ef2ff27539583b01fa9b9f747bc68b6a69c1c1ab --- /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 0000000000000000000000000000000000000000..43233cbfc89a023d7a73da80e124fe6967f75707 --- /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 Binary files /dev/null and b/src/nasmParser/lexer/lexer.dat differ diff --git a/src/nasmParser/node/AAddInst.java b/src/nasmParser/node/AAddInst.java new file mode 100644 index 0000000000000000000000000000000000000000..48a678f3e9e5e246dafa837cbc0ce71ea7cf1b3b --- /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 0000000000000000000000000000000000000000..769947676d601edb26f4ed33c0273083c58c3519 --- /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 0000000000000000000000000000000000000000..25e0ade34293bdff9faf1660fc3ece3191389d10 --- /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 0000000000000000000000000000000000000000..de05302892ac1036c1dc90b48f7b6563b04e12e1 --- /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 0000000000000000000000000000000000000000..3be2e13315323b49091a9f9099f75fb9ad4eb868 --- /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 0000000000000000000000000000000000000000..1569f588e854d1a817553fd770c8220dd85575ff --- /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 0000000000000000000000000000000000000000..a9e1d6e5b598764ddd237d6838ac4846a708a893 --- /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 0000000000000000000000000000000000000000..48fed944c1dad3f09ffd8766cd4b9e5dd75a9bc1 --- /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 0000000000000000000000000000000000000000..50d7099bc4bd7461d3b19c459902f684a9da1ad9 --- /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 0000000000000000000000000000000000000000..07411a6f8ed62fd5e00def5c1127c2fa9032a108 --- /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 0000000000000000000000000000000000000000..8063f6f15ad52ab2947247fdcc31c77834359037 --- /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 0000000000000000000000000000000000000000..38b48f557910ace8ed37ee29833944d79325dd3e --- /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 0000000000000000000000000000000000000000..069522108c35cf4bfdaac6323c12417c8b2a56ad --- /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 0000000000000000000000000000000000000000..0ecbfc0005e2bc24463c67401f7336f06390a3f7 --- /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 0000000000000000000000000000000000000000..31c0d59106339bc7b3aad612ab7807feda083e70 --- /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 0000000000000000000000000000000000000000..ac883adcd5e0d1169dad482e840d6ce0a3581d59 --- /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 0000000000000000000000000000000000000000..6869067409bb161c2ceb61430552e693586a1289 --- /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 0000000000000000000000000000000000000000..25f8b82515f1fbbc781737b44c736f3d1741afe1 --- /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 0000000000000000000000000000000000000000..e03fe07590ae7446a0db6fd5dce7cda3809cc179 --- /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 0000000000000000000000000000000000000000..12f18a7ac166d738914a467a4b6d8fb7e11c4879 --- /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 0000000000000000000000000000000000000000..da8855b8a22969adc73cbd7f0629550d2dcf4adf --- /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 0000000000000000000000000000000000000000..d7ef8d070c2fc140a63112bcc43506e354e34f36 --- /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 0000000000000000000000000000000000000000..380b09f8fd6e7f453072213e9721d080f996c4a0 --- /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 0000000000000000000000000000000000000000..bfb5a2aed4e0dfcf8f4fdc1a681993cdba3a7e39 --- /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 0000000000000000000000000000000000000000..ee064ee5bff549a36d85e1130feb74dba08dedec --- /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 0000000000000000000000000000000000000000..a77788730d478b5a63997113bf061ddcd535f032 --- /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 0000000000000000000000000000000000000000..825aa6fcd52885d6cbb3cd3be49adcaf513f6e1b --- /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 0000000000000000000000000000000000000000..439721a485ce38df7132ba22ae1a1a9603b7a9b8 --- /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 0000000000000000000000000000000000000000..934e38378c24d8c6b5bde5f34c342227f56e3e19 --- /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 0000000000000000000000000000000000000000..b3a426ffb4b81663018166d0a30630627de1bcb3 --- /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 0000000000000000000000000000000000000000..cfb70ef74880d741b6054b1db56cbaf2b2d469fe --- /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 0000000000000000000000000000000000000000..da9ef529403f97db1c501f00edc82292031f8537 --- /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 0000000000000000000000000000000000000000..b9c0d45ec0c8f5d13637346cddc0ff2c7fef0fa1 --- /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 0000000000000000000000000000000000000000..af2616f2360045c3cbc446bd6dac6d87e8336ffc --- /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 0000000000000000000000000000000000000000..de7fd7931e5b7966d12d78059abb5e9886ee19bb --- /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 0000000000000000000000000000000000000000..1d38ca0b1be128ae68c6d9597c38db6eb6d2b2cd --- /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 0000000000000000000000000000000000000000..05fa7b58e6696d19d7c4656696762ce1b756686f --- /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 0000000000000000000000000000000000000000..2d6008e25eaf471456ac31aeceef099e30a5f7fc --- /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 0000000000000000000000000000000000000000..04ac3f7dafac86411c0ea6626c405b9c93391c9a --- /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 0000000000000000000000000000000000000000..0003d14fb4e329ec9abaa67a218a8e424471eba2 --- /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 0000000000000000000000000000000000000000..7cd371b52a8c1ace6dfd4b42f6df7530845105dd --- /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 0000000000000000000000000000000000000000..355a8e8b89b1266d9b1a093505a8203bdab2026d --- /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 0000000000000000000000000000000000000000..1ffd2eb29f571fe3efe111ed5ee2ac5b0540a24a --- /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 0000000000000000000000000000000000000000..626c1e4afdb8415ecb7d88b69024db2fef665985 --- /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 0000000000000000000000000000000000000000..d9bd9d752dcfc6b7e31adaa23ef38295626b5926 --- /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 0000000000000000000000000000000000000000..e07f3ae4846e6ca7d9a2e36413afc829204876a0 --- /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 0000000000000000000000000000000000000000..13752b82704e3a880a62984144b81923cdb58fb4 --- /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 0000000000000000000000000000000000000000..dc4cb51c2580a976a07a7d4053cfbd82fdac4634 --- /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 0000000000000000000000000000000000000000..a952703de61ace5b3892c9bd314929ea349b5571 --- /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 0000000000000000000000000000000000000000..aaba5c316a80d779c36bf06c731f561946137d6c --- /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 0000000000000000000000000000000000000000..482317699d7e8ef1f2a4aa272e8d89558ada0d25 --- /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 0000000000000000000000000000000000000000..bfb2b581053cf677f320e1cb99d751d4d49be372 --- /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 0000000000000000000000000000000000000000..8a6b25658f86003d9926184484cf8fdfae35a5d1 --- /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 0000000000000000000000000000000000000000..1ada1ec7470e6bfa553fab471a2c8ba19f8a5fb6 --- /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 0000000000000000000000000000000000000000..c3d2bbf85a73126d06f44048e483676887bd3e4b --- /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 0000000000000000000000000000000000000000..c4e25bfd18d25bd8cc2c7c3f9d5a2637a84958fd --- /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 0000000000000000000000000000000000000000..197f01b6a962855feb7f682fabeee7cf3e66d6e6 --- /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 0000000000000000000000000000000000000000..b6da43fa4238f0737483735adf0b93bd6c650f94 --- /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 0000000000000000000000000000000000000000..6faa06abd6c7509a28188b78b3d27925d6322a6e --- /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 0000000000000000000000000000000000000000..2f1f60f45b5331ff9147096d253455eca9651218 --- /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 0000000000000000000000000000000000000000..9dc548caa8d7771b0d36b3d9382447f2e7f79e26 --- /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 0000000000000000000000000000000000000000..af7d2f9e4ebdbf035f09cb1ea70648a1a23d1224 --- /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 0000000000000000000000000000000000000000..06eaea420f7ba586071b9bd8dafefc973b83d4ec --- /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 0000000000000000000000000000000000000000..3d2018feadcab15e730d9612219ed0a2a15c8727 --- /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 0000000000000000000000000000000000000000..5e139fc1a2ced5dfbbe84cf9557e8e526c274bd4 --- /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 0000000000000000000000000000000000000000..be6f4462089713ad0b30342427ca29fdf398898e --- /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 0000000000000000000000000000000000000000..3277c8eff555cf9b635512f6079a643087f990e3 --- /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 0000000000000000000000000000000000000000..33462d8f9cbb499df47e7938955239048f293d82 --- /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 0000000000000000000000000000000000000000..6df39a4e1468f5be15766debc74ff06c9c43cf57 --- /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 0000000000000000000000000000000000000000..38b546d0a96160c118baabc89ec8005b3bee7d4b --- /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 0000000000000000000000000000000000000000..3743e3cafcce9535de6a250ecff425cb397aa346 --- /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 0000000000000000000000000000000000000000..c6632a49d1b6b5f640b8ff4256e4863456a08ea2 --- /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 0000000000000000000000000000000000000000..b0b655e621e54a79af1b05dc3c73c4552ecb8e77 --- /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 0000000000000000000000000000000000000000..a73af5975adc51fa87e95d3ad7232da62e257f19 --- /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 0000000000000000000000000000000000000000..2cd17dde9858680218bf18b164e0e0ad5343438c --- /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 0000000000000000000000000000000000000000..79c17797591dbf3ce441babf8328184f6ede8a0c --- /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 0000000000000000000000000000000000000000..babb876ad3a5c69937aa1ed72839168e510ca040 --- /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 0000000000000000000000000000000000000000..717a42b7155e653327bdbc0ffc9c44b1b3a79595 --- /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 0000000000000000000000000000000000000000..abda44ab22609abaf840991fb36476f162da5006 --- /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 0000000000000000000000000000000000000000..a3fa14b1ccc3b5ab679e7a228c09a4481f293c0f --- /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 0000000000000000000000000000000000000000..54e3f1e2f63831986bae30a790d244eee58382a0 --- /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 0000000000000000000000000000000000000000..c32d720dc789e9b8aa209c85cbd774e9e5413477 --- /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 0000000000000000000000000000000000000000..d4cc80edc88f963383bf9bee8dedc630434f7a12 --- /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 0000000000000000000000000000000000000000..6131d26b9d9fd5709541242ce210e41f5b129bff --- /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 0000000000000000000000000000000000000000..05cdb27fbd8e1ac2bb61d121554cfbffc3704e4b --- /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 0000000000000000000000000000000000000000..0f01a2ea49c2c60b31a25138e968a72939788980 --- /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 0000000000000000000000000000000000000000..36c41e3341a14b00964109fbebe0c660cc4a84e5 --- /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 0000000000000000000000000000000000000000..3ee36b5c6504e5a268722a73706132241d469052 --- /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 0000000000000000000000000000000000000000..46810b64272bfda7e5e8561bf13c8ae8b6ab1dfd --- /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 0000000000000000000000000000000000000000..65d5395c598f69c235b09b3a1ad1a38463c7accb --- /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 0000000000000000000000000000000000000000..16a62b4caca6b5a0d90ba33f3e2f02c6f7542c82 --- /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 0000000000000000000000000000000000000000..9fab7ca2b771c86cc2b79243b17cb246b99dca1a --- /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 0000000000000000000000000000000000000000..50f03d561557c6f6eaa3a568f79606abb9b908fc --- /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 0000000000000000000000000000000000000000..bce1e802f3d3b99f28e3392079b1948083d363d5 --- /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 0000000000000000000000000000000000000000..dbd8883cfb458e8366544027b0a7b60039c97f98 --- /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 0000000000000000000000000000000000000000..b68dc0d0f60b556894d27783d7a189ede38636ec --- /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 0000000000000000000000000000000000000000..88c41fe510bc2d3e664eb43a18969b8678d22ecb --- /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 0000000000000000000000000000000000000000..a5f68618a3cf9342ada1f05923d869870f1261fd --- /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 0000000000000000000000000000000000000000..d06b2ebbe07ec4f308359741a9093a9c0505232c --- /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 0000000000000000000000000000000000000000..6d9ab29f7d9892418da2b4ac6db82c7f7d86295c --- /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 0000000000000000000000000000000000000000..dd3140513a0c9b9f5cc13898027e5753561fd1bf --- /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 0000000000000000000000000000000000000000..9f0a03bb0a4b871e49c302a6668e74d036c84e5e --- /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 0000000000000000000000000000000000000000..e0aaa65e7ddd66d79ebdaabd0330afd908e511cb --- /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 0000000000000000000000000000000000000000..3a4f567591310b787f8178ee2c943a0e1d21d90d --- /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 0000000000000000000000000000000000000000..f88fbc9ea2048b6f257af8f9db2675e17ef2cddc --- /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 0000000000000000000000000000000000000000..1690152136e28bf47c9ee3fc3382ac8d6d4dc67c --- /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 0000000000000000000000000000000000000000..b680a39ea926fc628196b657eb57270e51588b5c --- /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 0000000000000000000000000000000000000000..df9fbf65ee78c23276ba3de625e930b12afd94a8 --- /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 0000000000000000000000000000000000000000..2df2c2f36dc2da6b57bde65a8192a518389ef6e3 --- /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 0000000000000000000000000000000000000000..3b59efa564ab0b66fcb1d7b0671656f05996f939 --- /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 0000000000000000000000000000000000000000..e720142c42cd11a32d2a88cc8f9808679c6c0667 --- /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 0000000000000000000000000000000000000000..22205a40e3b3349328d066dc3eb337c933460d52 --- /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 0000000000000000000000000000000000000000..78f3f07659fbaab16378c2c281bdff6d4cb27974 --- /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 0000000000000000000000000000000000000000..493e4583d570aab2d95cc66869c43b4414f5c6e0 --- /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 0000000000000000000000000000000000000000..cb9304000c1356524b4cac5aea27a993b9c21c5d --- /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 0000000000000000000000000000000000000000..f3a81d9fa1fec041a7264b38b444a94d0500db93 --- /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 0000000000000000000000000000000000000000..f38517066d809d3ce83bebeae0d9a562ba527a25 --- /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 0000000000000000000000000000000000000000..eab93b8c95f0a9a1796882702f9b6e0ae5968a63 --- /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 0000000000000000000000000000000000000000..02598348d21cf7fbfcacbda4f690b15b0e032c3e --- /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 0000000000000000000000000000000000000000..091bb97fa7d89a4dc594d8efb14ded7291dee0d5 --- /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 0000000000000000000000000000000000000000..b80008afcc16f5a6e565cea4a0b11a2ba1fff610 --- /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 0000000000000000000000000000000000000000..a038bad89db00dfd5cda44ed9f9ade1f256002ab --- /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 0000000000000000000000000000000000000000..56674d813c3b4e007873df03e5c96375279cb017 --- /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 0000000000000000000000000000000000000000..68195ac4f13a31c2be7c25d51df1175f89038e67 --- /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 0000000000000000000000000000000000000000..0380bd2c894db768f596f1568ea2d935539ac7b7 --- /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 0000000000000000000000000000000000000000..b8029fd2da12acbac4fcfdd9919dd8f808df114b --- /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 0000000000000000000000000000000000000000..0d7b580817feea364d729ef9ca1eede49e6efc70 --- /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 0000000000000000000000000000000000000000..395bd81471a9c97ec19dc751494966826baef5c5 --- /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 0000000000000000000000000000000000000000..3f0280a3e5bca8a577fc0ecf74480aa1437401cb --- /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 0000000000000000000000000000000000000000..4e9fa09ccbf5aea3ff8a5f65e68d1f67114e0ae7 --- /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 0000000000000000000000000000000000000000..2282055e57cc2a1984daabec021508af4cd61010 --- /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 0000000000000000000000000000000000000000..56d44c9c4b8498cdf1d32651d1e0898a09a4212c --- /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 0000000000000000000000000000000000000000..d288d8b0aa50a066192743e83a7465a6aee12e51 --- /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 0000000000000000000000000000000000000000..4ade5cfa754ab4f50fec1febd9172700cf4bf88e --- /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 0000000000000000000000000000000000000000..7e3e6abae052cb15214d4603f13c3a69182a9897 --- /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 0000000000000000000000000000000000000000..fe5be2c921fa684ed0fae7980838e74221ed6688 --- /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 0000000000000000000000000000000000000000..94b2e2b03de52e6337de6be4c117a20f8f27ea75 --- /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 0000000000000000000000000000000000000000..2ed0346a5b02544a3e039f23c5032ccb4fdacab1 --- /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 0000000000000000000000000000000000000000..c8e496b9df59348587e031bf8ffdd0b77a816197 --- /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 0000000000000000000000000000000000000000..925eb1785c6821d157890206eccf377ff57ba1e0 --- /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 0000000000000000000000000000000000000000..6030fa176d632d2644dee0611b4313181a3a9e50 --- /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 0000000000000000000000000000000000000000..838ea7b99ce792589cee7f2d10539313febe0d3f --- /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 0000000000000000000000000000000000000000..d44afe6577416982148065e8f5fda7367b16b610 --- /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 0000000000000000000000000000000000000000..3e0df332b6ed0f09704dea165120803a8b46caf5 --- /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 0000000000000000000000000000000000000000..046605ddf3ef401603d62554760506fd739facd1 --- /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 0000000000000000000000000000000000000000..24b64281c9e5dbcb9a22296badb7a6a1611574d4 --- /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 0000000000000000000000000000000000000000..f0ffc6c5466623beaeccdf2dce0814902db140ce --- /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 0000000000000000000000000000000000000000..6a5c894b221bbb4f3aee4d397a835c83b4def4d3 --- /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 0000000000000000000000000000000000000000..aa84bf82f2cd2cf54dd2826db2155bd888042439 --- /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 0000000000000000000000000000000000000000..e79eadfdb7e8a13747b3ba9ba5fac1b257b4b746 --- /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 0000000000000000000000000000000000000000..cebbf8b464fa55008de8abc7c34222afdea85764 --- /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 0000000000000000000000000000000000000000..6d550fa19d662c6d2e3cca85502ee05f20f03f52 --- /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 0000000000000000000000000000000000000000..11e641a0864c9b62779697271538a203768eb571 --- /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 0000000000000000000000000000000000000000..5123ee7aeb00eef2899fc3a1a89adee8cf1a677c --- /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 0000000000000000000000000000000000000000..b731bc1b0cb27f3604335974207e7662771603cd --- /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 0000000000000000000000000000000000000000..36d8cd31a46171aba82136b9b0259ff3db00bfad --- /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 0000000000000000000000000000000000000000..6aa4c4c172940ac73cfcc0522799583820228d9c --- /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 0000000000000000000000000000000000000000..4ce1088f9c29b2cbb6f0bef4ad32d7900831e60e --- /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 0000000000000000000000000000000000000000..202db66d8bc7ec1c9b0fac941c1a111f6dad6e36 --- /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 0000000000000000000000000000000000000000..c4a922d5e21ac0d43d322e2094fdd88d86e7b360 --- /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 0000000000000000000000000000000000000000..7d52a5b79692386145256bfc161bed42cd5fd5df --- /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 0000000000000000000000000000000000000000..9ff74bd515ff6f17f7f61d66f62111462c0cc4dd --- /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 0000000000000000000000000000000000000000..1d424f90763151ba232e6effc3705e282bdcab58 --- /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 0000000000000000000000000000000000000000..3b3fa2a4747871d6a80b21d489dd5e82a68d1d46 --- /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 0000000000000000000000000000000000000000..9ed383fb4f89a55295173b85d7d9324b85bcbb39 --- /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 0000000000000000000000000000000000000000..5bd45e22527d1e8aaf41c90e19faada4f6a1d72f --- /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 0000000000000000000000000000000000000000..8ba36d5d31f7aac232677f154ef8017184d29992 --- /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 0000000000000000000000000000000000000000..341460a02ea9233e3cc7f089d7b931c252998762 --- /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 0000000000000000000000000000000000000000..41a27a51ab41c87b3fdd44afeeeefeaab2d31b22 --- /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 0000000000000000000000000000000000000000..7f026a00ee624b9893c57d21af1039358af12efa --- /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 0000000000000000000000000000000000000000..cfbc4c3d473628a3e9de6af7a2e4e1585142a24f --- /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 0000000000000000000000000000000000000000..7b1d4a51440752c9e6579d4e37f9d14505a3035a --- /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 0000000000000000000000000000000000000000..a80802f7c95e6aba7c917f8334afe2c7d949c1f0 --- /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 0000000000000000000000000000000000000000..3e31ebf283b11de0531d14f1c2801f3c435b1dee --- /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 0000000000000000000000000000000000000000..2d1be4a5456d9891e64fdec89f2082720bfd4aeb --- /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 0000000000000000000000000000000000000000..80c2ee4eda986187e243174e7a8e2078661af075 --- /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 0000000000000000000000000000000000000000..598cce69c216ddffe6465bc0fd4345115cff9b3a --- /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 0000000000000000000000000000000000000000..dc70cad371e863ed60825192d1b214110a7cc67d --- /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 0000000000000000000000000000000000000000..648ecb5a1cf0574424e9c9de22d6584f6e2200ac --- /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 0000000000000000000000000000000000000000..1b9f365db000c34ccb4b7ad002064ccce5a48bc0 --- /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 Binary files /dev/null and b/src/saParser/lexer/lexer.dat differ diff --git a/src/saParser/node/AAddExp.java b/src/saParser/node/AAddExp.java new file mode 100644 index 0000000000000000000000000000000000000000..e36c33f982984db3af867ff108cf4e1870d86fd4 --- /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 0000000000000000000000000000000000000000..22b97cead6d43392052d020f4d76e83f8ae10e58 --- /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 0000000000000000000000000000000000000000..7b641e46b7a093dc30930b4ee3dd5363e282b956 --- /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 0000000000000000000000000000000000000000..651e79dc45007b709b37f66e55187328b24ad8ce --- /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 0000000000000000000000000000000000000000..f8015415250870f1f4d2668639581a5f97f51ccc --- /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 0000000000000000000000000000000000000000..59baa639fc319fb125da3aec9bcd648e46087e0f --- /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 0000000000000000000000000000000000000000..b8165c46b196181fb8a45eb0491473d01615be74 --- /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 0000000000000000000000000000000000000000..2deb0de51f9c844d8d0f6abd1027901738081e18 --- /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 0000000000000000000000000000000000000000..fb6f1ee196656eb468f76053c8a6f7f88ee17b42 --- /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 0000000000000000000000000000000000000000..06f1290810b2754cd93530d55c1eb0cdeaeac69b --- /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 0000000000000000000000000000000000000000..d2d9dc83121eeabca63237fec8757268e3f63ff4 --- /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 0000000000000000000000000000000000000000..a3cbf0dff237d85b1d47ed64f61c646c333f34d9 --- /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 0000000000000000000000000000000000000000..6a9c2ad8b09dc6922edb39a8c30c3f76f4cd78f9 --- /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 0000000000000000000000000000000000000000..6fe3d3879d710e2dfab149c6aca4da23c079dd8f --- /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 0000000000000000000000000000000000000000..ed42bd5b7108258b7bd30943c3291f613467efd8 --- /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 0000000000000000000000000000000000000000..d16d56de9756e275837a650a2eed9d176d27672b --- /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 0000000000000000000000000000000000000000..de9d1270f8510fde8da2189c7aa144ce43d5ad6e --- /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 0000000000000000000000000000000000000000..c725dcd13b7bf5c150c5f40710ea118b4d0babf4 --- /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 0000000000000000000000000000000000000000..9720d112ce253dd2ff2fd5c45146986019354752 --- /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 0000000000000000000000000000000000000000..fe628c1eb41d23fe13b72ea43283aebf71460134 --- /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 0000000000000000000000000000000000000000..d507d9e5be68f7e1fd05746b653f028537071129 --- /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 0000000000000000000000000000000000000000..c6d90b4af6ab464af5cc28e3371a10764e8a1ba8 --- /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 0000000000000000000000000000000000000000..52b96ce6462b68dd6bd939ccc21a16d69d085746 --- /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 0000000000000000000000000000000000000000..83787a5765089146e39b70b349e7ac5c57c5e8b0 --- /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 0000000000000000000000000000000000000000..4985cf863a7da406d6039473a707a2ff39dda356 --- /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 0000000000000000000000000000000000000000..6656f890f905fc153acb6677d9e40ca307c14b29 --- /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 0000000000000000000000000000000000000000..6f0fc825261c9af2b8d99b6cb6b539f96851a909 --- /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 0000000000000000000000000000000000000000..ee08622fc7e3782535f0498ed075269a7ce54b6e --- /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 0000000000000000000000000000000000000000..e49c72c90c27e88b19a3d8cb1103ff9ceaa4444f --- /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 0000000000000000000000000000000000000000..3362854dd9572e8c02eecf0409f585503b702556 --- /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 0000000000000000000000000000000000000000..25f532bf2f93bc907cbb20d9202ffb8dd06a7816 --- /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 0000000000000000000000000000000000000000..f866655887df8f58c3d5e1a70e8ad1a57aac24c7 --- /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 0000000000000000000000000000000000000000..9b2dbd36419fba7fdde4eebad39fb2e1fffe3408 --- /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 0000000000000000000000000000000000000000..02d314f496ee5e924fbee30f758871a7ba8804a2 --- /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 0000000000000000000000000000000000000000..6b68a7137d37644975c96e44c51d3574a060eb50 --- /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 0000000000000000000000000000000000000000..71570f7d3040628a32aee188a0e6c177f860f883 --- /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 0000000000000000000000000000000000000000..2f50ab2eea17c09ce027f897af923a09df4c6b98 --- /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 0000000000000000000000000000000000000000..19712c23529bfd4c6803bb5f703985dc9766c51d --- /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 0000000000000000000000000000000000000000..e8f990ec9a9ee061bd10f3431e21cffd98454fd4 --- /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 0000000000000000000000000000000000000000..c60379b14330800bc2558487ca3221db7e0b3cc3 --- /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 0000000000000000000000000000000000000000..de01ff0c0d5ada7701a43635d4f55ba8b8c07f13 --- /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 0000000000000000000000000000000000000000..86f0774fe99d5dcf9bd4b90444c131615c8a2cb9 --- /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 0000000000000000000000000000000000000000..61a71807650a9e3bd984b5af1ed933960a616e8c --- /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 0000000000000000000000000000000000000000..5aff40425feb5aabf23b244c80e6883126718acf --- /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 0000000000000000000000000000000000000000..1bbbece48f149edbad8081549f49388c71f5dd32 --- /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 0000000000000000000000000000000000000000..b707b87dbce9f0e0d7dd9d2f21723294f14dc035 --- /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 0000000000000000000000000000000000000000..fbc05807bf8391b089b6084f25efe0bcf2745ac8 --- /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 0000000000000000000000000000000000000000..55e9024ac3f694975feab44e01c2bf5456859402 --- /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 0000000000000000000000000000000000000000..35ce31e30c799ebf07784c1af6f2301bfaf98b9b --- /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 0000000000000000000000000000000000000000..a9a668b53bdcce251a4d764d9e42f836b6339c7d --- /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 0000000000000000000000000000000000000000..e93d084f7f01857980f494278b18d213d1d4bcfa --- /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 0000000000000000000000000000000000000000..181554286fec0ae45e175c70136ab9030303e6c0 --- /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 0000000000000000000000000000000000000000..5a9fe0c80c4695e1c24a58fc1986bcf3e883c096 --- /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 0000000000000000000000000000000000000000..c5d7eda0264a0d69bf92d8b968c972183df169e4 --- /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 0000000000000000000000000000000000000000..bb9e2cc19496cb62e8bac544faa08378869fd880 --- /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 0000000000000000000000000000000000000000..59686f550e71d756464a1ba937dcc322ce76dfcc --- /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 0000000000000000000000000000000000000000..52ef1a65a6073c5e314ad90ee45e17fcf7501ed0 --- /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 0000000000000000000000000000000000000000..f8768202d03fed407cf8a76e037368f5e18d6557 --- /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 0000000000000000000000000000000000000000..cbea67c7070e6af9117b079305552b389e4bcb1f --- /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 0000000000000000000000000000000000000000..0a816bc381d807864250c1e5499ffd25cbe7a86a --- /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 0000000000000000000000000000000000000000..450262648f6c3e7581748bbf72a97358d2d41e65 --- /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 0000000000000000000000000000000000000000..d79525943036a3e5444389de6d366220fa0a7f98 --- /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 0000000000000000000000000000000000000000..80defe18852c36edd2369ed82363e5df23329efe --- /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 0000000000000000000000000000000000000000..76ab58960d261beeb029e0bbabde053260fc8815 --- /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 0000000000000000000000000000000000000000..74301196d386dba39fc3e20e5bc6aa00dbea4a12 --- /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 0000000000000000000000000000000000000000..b69e9911ac0808c79883966030c9bb69b0be7b78 --- /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 0000000000000000000000000000000000000000..704d6e9373162f46102a9c417cb2122b6a76e322 --- /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 0000000000000000000000000000000000000000..47058aa1c848b2ccef1a57b5572da34035d09da5 --- /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 0000000000000000000000000000000000000000..8b4eda23abd90a421ebd0320265e6e660dff070a --- /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 0000000000000000000000000000000000000000..f58d2fc301c964af1ce686a4f62a8fd831c0158a --- /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 0000000000000000000000000000000000000000..ba30e46cca993c12e870ad8247a6be227a4a092e --- /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 0000000000000000000000000000000000000000..cca9fbaf9cb9c1c7af0ef065e9b8859206430b93 --- /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 0000000000000000000000000000000000000000..1c5323a306b046bff7a3c9aad35d92be687bc903 --- /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 0000000000000000000000000000000000000000..9d400cdc82c25978579707a55202b2beceda8fe9 --- /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 0000000000000000000000000000000000000000..62287e36259ff3f94fc43da62e2b49534d73df47 --- /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 0000000000000000000000000000000000000000..d9ba5a761e5a459091f630b43b15e56cb9e1d986 --- /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 0000000000000000000000000000000000000000..88856c12d1fbf22b7a26f32fad7033d450bf9993 --- /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 0000000000000000000000000000000000000000..90fb5fe87244685a6e80dd8846aa1147f6c43575 --- /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 0000000000000000000000000000000000000000..77ea68034756445ee0ae0865a85607fae447950c --- /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 0000000000000000000000000000000000000000..dfbae76c766f909371b6382cb9bfbd9f736f11dc --- /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 0000000000000000000000000000000000000000..f65e152f211c697f1e57c8b111cff4040bcfb438 --- /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 0000000000000000000000000000000000000000..03982a3d21325e0c664cb3587a8eeead02035304 --- /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 0000000000000000000000000000000000000000..6caf091698c2f2eb8eb13b2a57c42ab22b06fdf7 --- /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 0000000000000000000000000000000000000000..5f1ab0f6e06229c275ffda8b270f71c10944fa97 --- /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 0000000000000000000000000000000000000000..c175054254fa662a31134efc82a868d1b297dba4 --- /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 0000000000000000000000000000000000000000..83ca4e5c4bdbcbe227ffab4df7f2363171a98cbd --- /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 0000000000000000000000000000000000000000..81accd29ced412a0b838c815738f9f5426f0d1f7 --- /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 0000000000000000000000000000000000000000..a3d17b970219bf40cf3693b259fdc054f68e4b11 --- /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 0000000000000000000000000000000000000000..5eec6f2addb65590924ae9ae2ff5a8f5acedd094 --- /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 0000000000000000000000000000000000000000..95e0f3c057e712fb578e6875ace1a6fbf618969c --- /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 0000000000000000000000000000000000000000..0fefbfd4deb0b48550e5f5c86c6c869dfe89c743 --- /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 0000000000000000000000000000000000000000..44b6b009eb1df179b4b5f8dfe97035b664a0b848 --- /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 0000000000000000000000000000000000000000..94c02063888391666b2e6629d48c4c740320c639 --- /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 0000000000000000000000000000000000000000..c27bf238745156cef95d26111edcd84e5562ba0b --- /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 0000000000000000000000000000000000000000..93b53e1d1f366d007f8ae7e08b5f72a279991d0a --- /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 0000000000000000000000000000000000000000..483d2e36e7d807a4d5f711ff23cfd973dde5681a --- /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 0000000000000000000000000000000000000000..00c4f109359fb6a0d62168c1e90f08f7501a015f --- /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 0000000000000000000000000000000000000000..b85c53c46fbc3dde63efc102cf6423bd68a7158b --- /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 0000000000000000000000000000000000000000..0c1b7e1a127572d7f1cf7e3b53ffab9f2867fcd9 --- /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 0000000000000000000000000000000000000000..2e4c9a0efb84a1e161f225cea1e4179075e2b84a --- /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 0000000000000000000000000000000000000000..d474ac4b7d4732c99b1891ae570ed0b8088f3790 --- /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 0000000000000000000000000000000000000000..39632bdd90818210d9a7b950980c7e90520c0bfb --- /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 0000000000000000000000000000000000000000..e8efc3ed1e0fa4f924981f2e2fa0fc7ccc2b4f50 --- /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 0000000000000000000000000000000000000000..eb54e4c3886d5f23fe1614b86347c94ed6d43dad --- /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 0000000000000000000000000000000000000000..64c383f1a82308bfe6f745ae255962b546071106 --- /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 0000000000000000000000000000000000000000..04a5d344c8993bfa5b3f26ffcca8f130ec9a0f41 --- /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 0000000000000000000000000000000000000000..92c63c87635462d189d1c02011451300810569ac --- /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 0000000000000000000000000000000000000000..47cd07d2119be9d71ae034181aa8ebf0dae800b6 --- /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 0000000000000000000000000000000000000000..63482fae7000cef554e969224ec7b22d51af10a3 --- /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 0000000000000000000000000000000000000000..c7c5f320853ff37760678a70f098126a2a058aa7 --- /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 Binary files /dev/null and b/src/saParser/parser/parser.dat differ