Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LabComm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anders Blomdell
LabComm
Commits
5eef8a7f
Commit
5eef8a7f
authored
9 years ago
by
Sven Gestegård Robertz
Browse files
Options
Downloads
Patches
Plain Diff
Fixed duplicate generation of names in python
parent
3f2e9cd3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
compiler/2014/Python_CodeGen.jrag
+12
-12
12 additions, 12 deletions
compiler/2014/Python_CodeGen.jrag
with
12 additions
and
12 deletions
compiler/2014/Python_CodeGen.jrag
+
12
−
12
View file @
5eef8a7f
...
@@ -7,7 +7,7 @@ aspect Python_CodeGenEnv {
...
@@ -7,7 +7,7 @@ aspect Python_CodeGenEnv {
public class Python_env {
public class Python_env {
final private class Python_printer {
final private class Python_printer {
private boolean newline = true;
private boolean newline = true;
private PrintStream out;
private PrintStream out;
...
@@ -99,7 +99,7 @@ aspect Python_CodeGen {
...
@@ -99,7 +99,7 @@ aspect Python_CodeGen {
}
}
aspect PythonTypes {
aspect PythonTypes {
public void Specification.Python_genTypes(Python_env env) {
public void Specification.Python_genTypes(Python_env env) {
for (int i = 0 ; i < getNumDecl() ; i++) {
for (int i = 0 ; i < getNumDecl() ; i++) {
getDecl(i).Python_genSignatureAndTypedef(env);
getDecl(i).Python_genSignatureAndTypedef(env);
...
@@ -107,8 +107,8 @@ aspect PythonTypes {
...
@@ -107,8 +107,8 @@ aspect PythonTypes {
}
}
public void Decl.Python_genSignatureAndTypedef(Python_env env) {
public void Decl.Python_genSignatureAndTypedef(Python_env env) {
throw new Error(this.getClass().getName() +
throw new Error(this.getClass().getName() +
".Python_genSignatureAndTypedef(Python_env env)" +
".Python_genSignatureAndTypedef(Python_env env)" +
" not declared");
" not declared");
}
}
...
@@ -151,9 +151,9 @@ aspect PythonTypes {
...
@@ -151,9 +151,9 @@ aspect PythonTypes {
}
}
public void TypeInstance.Python_genIntentions(Python_env env) {
public void TypeInstance.Python_genIntentions(Python_env env) {
env.print("{
'':'"+getName()+"'
");
env.print("{");
for(Intention i : sortedIntentions()) {
for(Intention i : sortedIntentions()) {
env.print("
,
'"+i.getKey()+"':'"+new String(i.getValue())+"'");
env.print("'"+i.getKey()+"':'"+new String(i.getValue())+"'
,
");
}
}
env.print("}");
env.print("}");
}
}
...
@@ -167,8 +167,8 @@ aspect PythonTypes {
...
@@ -167,8 +167,8 @@ aspect PythonTypes {
}
}
public void DataType.Python_genSignature(Python_env env) {
public void DataType.Python_genSignature(Python_env env) {
throw new Error(this.getClass().getName() +
throw new Error(this.getClass().getName() +
".Python_genSignature(Python_env env)" +
".Python_genSignature(Python_env env)" +
" not declared");
" not declared");
}
}
...
@@ -227,8 +227,8 @@ aspect PythonTypes {
...
@@ -227,8 +227,8 @@ aspect PythonTypes {
}
}
public void DataType.Python_genTypedef(Python_env env) {
public void DataType.Python_genTypedef(Python_env env) {
throw new Error(this.getClass().getName() +
throw new Error(this.getClass().getName() +
".Python_genTypedef(Python_env env)" +
".Python_genTypedef(Python_env env)" +
" not declared");
" not declared");
}
}
...
@@ -297,8 +297,8 @@ aspect PythonTypes {
...
@@ -297,8 +297,8 @@ aspect PythonTypes {
}
}
public String Exp.Python_getValue() {
public String Exp.Python_getValue() {
throw new Error(this.getClass().getName() +
throw new Error(this.getClass().getName() +
".Python_getValue()" +
".Python_getValue()" +
" not declared");
" not declared");
}
}
...
...
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