Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
2024_compilation_bauquin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BAUQUIN Niels
2024_compilation_bauquin
Commits
30863632
Commit
30863632
authored
1 year ago
by
BAUQUIN Niels
Browse files
Options
Downloads
Patches
Plain Diff
dfg
parent
3fadd663
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sa/Sc2sa.java
+10
-6
10 additions, 6 deletions
src/sa/Sc2sa.java
with
10 additions
and
6 deletions
src/sa/Sc2sa.java
+
10
−
6
View file @
30863632
...
@@ -144,7 +144,7 @@ public class Sc2sa extends DepthFirstAdapter
...
@@ -144,7 +144,7 @@ public class Sc2sa extends DepthFirstAdapter
op1
=
(
SaExp
)
this
.
returnValue
;
op1
=
(
SaExp
)
this
.
returnValue
;
node
.
getExp4
().
apply
(
this
);
node
.
getExp4
().
apply
(
this
);
op2
=
(
SaExp
)
this
.
returnValue
;
op2
=
(
SaExp
)
this
.
returnValue
;
this
.
returnValue
=
new
SaExp
Add
(
op1
,
op2
);
this
.
returnValue
=
new
SaExp
Sub
(
op1
,
op2
);
outASubExp3
(
node
);
outASubExp3
(
node
);
}
}
...
@@ -281,7 +281,7 @@ public class Sc2sa extends DepthFirstAdapter
...
@@ -281,7 +281,7 @@ public class Sc2sa extends DepthFirstAdapter
inAFairetantqueIns
(
node
);
inAFairetantqueIns
(
node
);
SaExp
test
=
null
;
SaExp
test
=
null
;
SaInst
faire
=
null
;
SaInst
faire
=
null
;
node
.
get
Tantque
().
apply
(
this
);
node
.
get
Exp
().
apply
(
this
);
test
=
(
SaExp
)
this
.
returnValue
;
test
=
(
SaExp
)
this
.
returnValue
;
node
.
getBloc
().
apply
(
this
);
node
.
getBloc
().
apply
(
this
);
faire
=
(
SaInst
)
this
.
returnValue
;
faire
=
(
SaInst
)
this
.
returnValue
;
...
@@ -292,8 +292,11 @@ public class Sc2sa extends DepthFirstAdapter
...
@@ -292,8 +292,11 @@ public class Sc2sa extends DepthFirstAdapter
@Override
@Override
public
void
caseAFonctionIns
(
AFonctionIns
node
)
{
public
void
caseAFonctionIns
(
AFonctionIns
node
)
{
inAFonctionIns
(
node
);
inAFonctionIns
(
node
);
node
.
getId
().
apply
(
this
);
String
id
=
node
.
getId
().
getText
();
node
.
getGpar
().
apply
(
this
);
SaLExp
args
=
null
;
node
.
getLexp
().
apply
(
this
);
args
=
(
SaLExp
)
this
.
returnValue
;
this
.
returnValue
=
new
SaAppel
(
id
,
args
);
outAFonctionIns
(
node
);
outAFonctionIns
(
node
);
}
}
...
@@ -480,14 +483,14 @@ public class Sc2sa extends DepthFirstAdapter
...
@@ -480,14 +483,14 @@ public class Sc2sa extends DepthFirstAdapter
@Override
@Override
public
void
caseATypeTypeopt
(
ATypeTypeopt
node
)
{
public
void
caseATypeTypeopt
(
ATypeTypeopt
node
)
{
inATypeTypeopt
(
node
);
inATypeTypeopt
(
node
);
this
.
returnType
=
Type
.
NUL
;
if
(
node
.
getType
()
!=
null
)
{
node
.
getType
().
apply
(
this
);}
outATypeTypeopt
(
node
);
outATypeTypeopt
(
node
);
}
}
@Override
@Override
public
void
caseAEpsilonTypeopt
(
AEpsilonTypeopt
node
)
{
public
void
caseAEpsilonTypeopt
(
AEpsilonTypeopt
node
)
{
inAEpsilonTypeopt
(
node
);
inAEpsilonTypeopt
(
node
);
this
.
return
Value
=
null
;
this
.
return
Type
=
Type
.
NUL
;
outAEpsilonTypeopt
(
node
);
outAEpsilonTypeopt
(
node
);
}
}
...
@@ -552,6 +555,7 @@ public class Sc2sa extends DepthFirstAdapter
...
@@ -552,6 +555,7 @@ public class Sc2sa extends DepthFirstAdapter
@Override
@Override
public
void
caseAEpsilonLdecvar
(
AEpsilonLdecvar
node
)
{
public
void
caseAEpsilonLdecvar
(
AEpsilonLdecvar
node
)
{
inAEpsilonLdecvar
(
node
);
inAEpsilonLdecvar
(
node
);
this
.
returnValue
=
null
;
this
.
returnValue
=
null
;
outAEpsilonLdecvar
(
node
);
outAEpsilonLdecvar
(
node
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment