From 745c09a543ec63e0974b58a2ff5d37e0b5f3781b Mon Sep 17 00:00:00 2001 From: Sven Gestegard Robertz <sven.robertz@cs.lth.se> Date: Thu, 30 Apr 2015 11:23:41 +0200 Subject: [PATCH] renamed productions in grammar: ConcreteType to TypeInstance and Program to Specification --- compiler/2014/Refactoring.jrag | 4 ++-- compiler/2014/Signature.jrag | 6 +++--- lib/java/se/lth/control/labcomm2014/ASTbuilder.java | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/compiler/2014/Refactoring.jrag b/compiler/2014/Refactoring.jrag index fbe083f..4a2609c 100644 --- a/compiler/2014/Refactoring.jrag +++ b/compiler/2014/Refactoring.jrag @@ -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"); } } diff --git a/compiler/2014/Signature.jrag b/compiler/2014/Signature.jrag index 1c1c820..96231d1 100644 --- a/compiler/2014/Signature.jrag +++ b/compiler/2014/Signature.jrag @@ -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) { diff --git a/lib/java/se/lth/control/labcomm2014/ASTbuilder.java b/lib/java/se/lth/control/labcomm2014/ASTbuilder.java index dccb39c..07b2d7b 100644 --- a/lib/java/se/lth/control/labcomm2014/ASTbuilder.java +++ b/lib/java/se/lth/control/labcomm2014/ASTbuilder.java @@ -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; -- GitLab