Skip to content
Snippets Groups Projects
Commit 745c09a5 authored by Sven Gestegård Robertz's avatar Sven Gestegård Robertz
Browse files

renamed productions in grammar: ConcreteType to TypeInstance and Program to Specification

parent 7a4aa716
No related branches found
No related tags found
No related merge requests found
...@@ -4,11 +4,11 @@ aspect Refactoring { ...@@ -4,11 +4,11 @@ aspect Refactoring {
syn DataType Decl.getDataType() = getTypeInstance().getDataType(); syn DataType Decl.getDataType() = getTypeInstance().getDataType();
public Field.Field(TypeInstance t) { public Field.Field(TypeInstance t) {
this(t.getDataType(), t.getName(), t.getAnnotationList()); this(t.getDataType(), t.getName(), t.getIntentionList());
} }
public TypeInstance.TypeInstance(DataType t, String n) { public TypeInstance.TypeInstance(DataType t, String n) {
this(t, n, new List<Annotation>()); this(t, n, new List<Intention>());
System.out.println("WARNING! TypeInstance(DataType, String) ignoring intention list"); System.out.println("WARNING! TypeInstance(DataType, String) ignoring intention list");
} }
} }
...@@ -2,10 +2,10 @@ import java.util.*; ...@@ -2,10 +2,10 @@ import java.util.*;
aspect Intentions { aspect Intentions {
inh Decl ConcreteType.parentDecl(); inh Decl TypeInstance.parentDecl();
coll Set Decl.allIntentions() [new HashSet()] with add; coll Set Decl.allIntentions() [new HashSet()] with add;
ConcreteType contributes getIntentionString() TypeInstance contributes getIntentionString()
to Decl.allIntentions() to Decl.allIntentions()
for parentDecl(); for parentDecl();
} }
...@@ -37,7 +37,7 @@ aspect Signature { ...@@ -37,7 +37,7 @@ aspect Signature {
return sb.toString(); return sb.toString();
} }
syn String ConcreteType.getIntentionString() { syn String TypeInstance.getIntentionString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
List<Intention> ints = getIntentionList(); List<Intention> ints = getIntentionList();
for(Intention i : ints) { for(Intention i : ints) {
......
...@@ -96,6 +96,7 @@ public class ASTbuilder implements TypeDefParser.ParsedSymbolVisitor { ...@@ -96,6 +96,7 @@ public class ASTbuilder implements TypeDefParser.ParsedSymbolVisitor {
public void visit(TypeDefParser.ParsedField t){ public void visit(TypeDefParser.ParsedField t){
t.getType().accept(this); t.getType().accept(this);
fieldStack.push(new Field(new TypeInstance(typeStack.pop(),t.getName()))); fieldStack.push(new Field(new TypeInstance(typeStack.pop(),t.getName())));
} }
public void visit(TypeDefParser.ArrayType t){ public void visit(TypeDefParser.ArrayType t){
boolean isFixed = true; boolean isFixed = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment