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