Archived
Renamed packages to match Java guidelines.
This commit is contained in:
+33
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* @(#)ArrayExpression.java 2.1 2003/10/07
|
||||
*
|
||||
* Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown
|
||||
* Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland
|
||||
* and School of Computer and Math Sciences, The Robert Gordon University,
|
||||
* St. Andrew Street, Aberdeen AB25 1HG, Scotland.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is provided free for educational use only. It may
|
||||
* not be used for commercial purposes without the prior written permission
|
||||
* of the authors.
|
||||
*/
|
||||
|
||||
package triangle.abstractSyntaxTrees.expressions;
|
||||
|
||||
import triangle.abstractSyntaxTrees.aggregates.ArrayAggregate;
|
||||
import triangle.abstractSyntaxTrees.visitors.ExpressionVisitor;
|
||||
import triangle.syntacticAnalyzer.SourcePosition;
|
||||
|
||||
public class ArrayExpression extends Expression {
|
||||
|
||||
public ArrayExpression(ArrayAggregate aaAST, SourcePosition position) {
|
||||
super(position);
|
||||
AA = aaAST;
|
||||
}
|
||||
|
||||
public <TArg, TResult> TResult visit(ExpressionVisitor<TArg, TResult> v, TArg arg) {
|
||||
return v.visitArrayExpression(this, arg);
|
||||
}
|
||||
|
||||
public final ArrayAggregate AA;
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* @(#)BinaryExpression.java 2.1 2003/10/07
|
||||
*
|
||||
* Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown
|
||||
* Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland
|
||||
* and School of Computer and Math Sciences, The Robert Gordon University,
|
||||
* St. Andrew Street, Aberdeen AB25 1HG, Scotland.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is provided free for educational use only. It may
|
||||
* not be used for commercial purposes without the prior written permission
|
||||
* of the authors.
|
||||
*/
|
||||
|
||||
package triangle.abstractSyntaxTrees.expressions;
|
||||
|
||||
import triangle.abstractSyntaxTrees.terminals.Operator;
|
||||
import triangle.abstractSyntaxTrees.visitors.ExpressionVisitor;
|
||||
import triangle.syntacticAnalyzer.SourcePosition;
|
||||
|
||||
public class BinaryExpression extends Expression {
|
||||
|
||||
public BinaryExpression(Expression e1AST, Operator oAST, Expression e2AST, SourcePosition position) {
|
||||
super(position);
|
||||
O = oAST;
|
||||
E1 = e1AST;
|
||||
E2 = e2AST;
|
||||
}
|
||||
|
||||
public <TArg, TResult> TResult visit(ExpressionVisitor<TArg, TResult> v, TArg arg) {
|
||||
return v.visitBinaryExpression(this, arg);
|
||||
}
|
||||
|
||||
public final Expression E1, E2;
|
||||
public final Operator O;
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* @(#)CallExpression.java 2.1 2003/10/07
|
||||
*
|
||||
* Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown
|
||||
* Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland
|
||||
* and School of Computer and Math Sciences, The Robert Gordon University,
|
||||
* St. Andrew Street, Aberdeen AB25 1HG, Scotland.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is provided free for educational use only. It may
|
||||
* not be used for commercial purposes without the prior written permission
|
||||
* of the authors.
|
||||
*/
|
||||
|
||||
package triangle.abstractSyntaxTrees.expressions;
|
||||
|
||||
import triangle.abstractSyntaxTrees.actuals.ActualParameterSequence;
|
||||
import triangle.abstractSyntaxTrees.terminals.Identifier;
|
||||
import triangle.abstractSyntaxTrees.visitors.ExpressionVisitor;
|
||||
import triangle.syntacticAnalyzer.SourcePosition;
|
||||
|
||||
public class CallExpression extends Expression {
|
||||
|
||||
public CallExpression(Identifier iAST, ActualParameterSequence apsAST, SourcePosition position) {
|
||||
super(position);
|
||||
I = iAST;
|
||||
APS = apsAST;
|
||||
}
|
||||
|
||||
public <TArg, TResult> TResult visit(ExpressionVisitor<TArg, TResult> v, TArg arg) {
|
||||
return v.visitCallExpression(this, arg);
|
||||
}
|
||||
|
||||
public final Identifier I;
|
||||
public final ActualParameterSequence APS;
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* @(#)CharacterExpression.java 2.1 2003/10/07
|
||||
*
|
||||
* Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown
|
||||
* Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland
|
||||
* and School of Computer and Math Sciences, The Robert Gordon University,
|
||||
* St. Andrew Street, Aberdeen AB25 1HG, Scotland.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is provided free for educational use only. It may
|
||||
* not be used for commercial purposes without the prior written permission
|
||||
* of the authors.
|
||||
*/
|
||||
|
||||
package triangle.abstractSyntaxTrees.expressions;
|
||||
|
||||
import triangle.abstractSyntaxTrees.terminals.CharacterLiteral;
|
||||
import triangle.abstractSyntaxTrees.visitors.ExpressionVisitor;
|
||||
import triangle.syntacticAnalyzer.SourcePosition;
|
||||
|
||||
public class CharacterExpression extends Expression {
|
||||
|
||||
public CharacterExpression(CharacterLiteral clAST, SourcePosition position) {
|
||||
super(position);
|
||||
CL = clAST;
|
||||
}
|
||||
|
||||
public <TArg, TResult> TResult visit(ExpressionVisitor<TArg, TResult> v, TArg arg) {
|
||||
return v.visitCharacterExpression(this, arg);
|
||||
}
|
||||
|
||||
public final CharacterLiteral CL;
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* @(#)EmptyExpression.java 2.1 2003/10/07
|
||||
*
|
||||
* Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown
|
||||
* Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland
|
||||
* and School of Computer and Math Sciences, The Robert Gordon University,
|
||||
* St. Andrew Street, Aberdeen AB25 1HG, Scotland.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is provided free for educational use only. It may
|
||||
* not be used for commercial purposes without the prior written permission
|
||||
* of the authors.
|
||||
*/
|
||||
|
||||
package triangle.abstractSyntaxTrees.expressions;
|
||||
|
||||
import triangle.abstractSyntaxTrees.visitors.ExpressionVisitor;
|
||||
import triangle.syntacticAnalyzer.SourcePosition;
|
||||
|
||||
public class EmptyExpression extends Expression {
|
||||
|
||||
public EmptyExpression(SourcePosition position) {
|
||||
super(position);
|
||||
}
|
||||
|
||||
public <TArg, TResult> TResult visit(ExpressionVisitor<TArg, TResult> v, TArg arg) {
|
||||
return v.visitEmptyExpression(this, arg);
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* @(#)Expression.java 2.1 2003/10/07
|
||||
*
|
||||
* Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown
|
||||
* Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland
|
||||
* and School of Computer and Math Sciences, The Robert Gordon University,
|
||||
* St. Andrew Street, Aberdeen AB25 1HG, Scotland.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is provided free for educational use only. It may
|
||||
* not be used for commercial purposes without the prior written permission
|
||||
* of the authors.
|
||||
*/
|
||||
|
||||
package triangle.abstractSyntaxTrees.expressions;
|
||||
|
||||
import triangle.abstractSyntaxTrees.AbstractSyntaxTree;
|
||||
import triangle.abstractSyntaxTrees.types.TypeDenoter;
|
||||
import triangle.abstractSyntaxTrees.visitors.ExpressionVisitor;
|
||||
import triangle.syntacticAnalyzer.SourcePosition;
|
||||
|
||||
public abstract class Expression extends AbstractSyntaxTree {
|
||||
|
||||
public Expression(SourcePosition position) {
|
||||
super(position);
|
||||
type = null;
|
||||
}
|
||||
|
||||
public TypeDenoter type;
|
||||
|
||||
public abstract <TArg, TResult> TResult visit(ExpressionVisitor<TArg, TResult> visitor, TArg arg);
|
||||
|
||||
public <TArg, TResult> TResult visit(ExpressionVisitor<TArg, TResult> visitor) {
|
||||
return visit(visitor, null);
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* @(#)IfExpression.java 2.1 2003/10/07
|
||||
*
|
||||
* Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown
|
||||
* Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland
|
||||
* and School of Computer and Math Sciences, The Robert Gordon University,
|
||||
* St. Andrew Street, Aberdeen AB25 1HG, Scotland.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is provided free for educational use only. It may
|
||||
* not be used for commercial purposes without the prior written permission
|
||||
* of the authors.
|
||||
*/
|
||||
|
||||
package triangle.abstractSyntaxTrees.expressions;
|
||||
|
||||
import triangle.abstractSyntaxTrees.visitors.ExpressionVisitor;
|
||||
import triangle.syntacticAnalyzer.SourcePosition;
|
||||
|
||||
public class IfExpression extends Expression {
|
||||
|
||||
public IfExpression(Expression e1AST, Expression e2AST, Expression e3AST, SourcePosition position) {
|
||||
super(position);
|
||||
E1 = e1AST;
|
||||
E2 = e2AST;
|
||||
E3 = e3AST;
|
||||
}
|
||||
|
||||
public <TArg, TResult> TResult visit(ExpressionVisitor<TArg, TResult> v, TArg arg) {
|
||||
return v.visitIfExpression(this, arg);
|
||||
}
|
||||
|
||||
public final Expression E1, E2, E3;
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* @(#)IntegerExpression.java 2.1 2003/10/07
|
||||
*
|
||||
* Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown
|
||||
* Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland
|
||||
* and School of Computer and Math Sciences, The Robert Gordon University,
|
||||
* St. Andrew Street, Aberdeen AB25 1HG, Scotland.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is provided free for educational use only. It may
|
||||
* not be used for commercial purposes without the prior written permission
|
||||
* of the authors.
|
||||
*/
|
||||
|
||||
package triangle.abstractSyntaxTrees.expressions;
|
||||
|
||||
import triangle.abstractSyntaxTrees.terminals.IntegerLiteral;
|
||||
import triangle.abstractSyntaxTrees.visitors.ExpressionVisitor;
|
||||
import triangle.syntacticAnalyzer.SourcePosition;
|
||||
|
||||
public class IntegerExpression extends Expression {
|
||||
|
||||
public IntegerExpression(IntegerLiteral ilAST, SourcePosition position) {
|
||||
super(position);
|
||||
IL = ilAST;
|
||||
}
|
||||
|
||||
public <TArg, TResult> TResult visit(ExpressionVisitor<TArg, TResult> v, TArg arg) {
|
||||
return v.visitIntegerExpression(this, arg);
|
||||
}
|
||||
|
||||
public final IntegerLiteral IL;
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* @(#)LetExpression.java 2.1 2003/10/07
|
||||
*
|
||||
* Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown
|
||||
* Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland
|
||||
* and School of Computer and Math Sciences, The Robert Gordon University,
|
||||
* St. Andrew Street, Aberdeen AB25 1HG, Scotland.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is provided free for educational use only. It may
|
||||
* not be used for commercial purposes without the prior written permission
|
||||
* of the authors.
|
||||
*/
|
||||
|
||||
package triangle.abstractSyntaxTrees.expressions;
|
||||
|
||||
import triangle.abstractSyntaxTrees.declarations.Declaration;
|
||||
import triangle.abstractSyntaxTrees.visitors.ExpressionVisitor;
|
||||
import triangle.syntacticAnalyzer.SourcePosition;
|
||||
|
||||
public class LetExpression extends Expression {
|
||||
|
||||
public LetExpression(Declaration dAST, Expression eAST, SourcePosition position) {
|
||||
super(position);
|
||||
D = dAST;
|
||||
E = eAST;
|
||||
}
|
||||
|
||||
public <TArg, TResult> TResult visit(ExpressionVisitor<TArg, TResult> v, TArg arg) {
|
||||
return v.visitLetExpression(this, arg);
|
||||
}
|
||||
|
||||
public final Declaration D;
|
||||
public final Expression E;
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* @(#)RecordExpression.java 2.1 2003/10/07
|
||||
*
|
||||
* Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown
|
||||
* Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland
|
||||
* and School of Computer and Math Sciences, The Robert Gordon University,
|
||||
* St. Andrew Street, Aberdeen AB25 1HG, Scotland.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is provided free for educational use only. It may
|
||||
* not be used for commercial purposes without the prior written permission
|
||||
* of the authors.
|
||||
*/
|
||||
|
||||
package triangle.abstractSyntaxTrees.expressions;
|
||||
|
||||
import triangle.abstractSyntaxTrees.aggregates.RecordAggregate;
|
||||
import triangle.abstractSyntaxTrees.visitors.ExpressionVisitor;
|
||||
import triangle.syntacticAnalyzer.SourcePosition;
|
||||
|
||||
public class RecordExpression extends Expression {
|
||||
|
||||
public RecordExpression(RecordAggregate raAST, SourcePosition position) {
|
||||
super(position);
|
||||
RA = raAST;
|
||||
}
|
||||
|
||||
public <TArg, TResult> TResult visit(ExpressionVisitor<TArg, TResult> v, TArg arg) {
|
||||
return v.visitRecordExpression(this, arg);
|
||||
}
|
||||
|
||||
public final RecordAggregate RA;
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* @(#)UnaryExpression.java 2.1 2003/10/07
|
||||
*
|
||||
* Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown
|
||||
* Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland
|
||||
* and School of Computer and Math Sciences, The Robert Gordon University,
|
||||
* St. Andrew Street, Aberdeen AB25 1HG, Scotland.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is provided free for educational use only. It may
|
||||
* not be used for commercial purposes without the prior written permission
|
||||
* of the authors.
|
||||
*/
|
||||
|
||||
package triangle.abstractSyntaxTrees.expressions;
|
||||
|
||||
import triangle.abstractSyntaxTrees.terminals.Operator;
|
||||
import triangle.abstractSyntaxTrees.visitors.ExpressionVisitor;
|
||||
import triangle.syntacticAnalyzer.SourcePosition;
|
||||
|
||||
public class UnaryExpression extends Expression {
|
||||
|
||||
public UnaryExpression(Operator oAST, Expression eAST, SourcePosition position) {
|
||||
super(position);
|
||||
O = oAST;
|
||||
E = eAST;
|
||||
}
|
||||
|
||||
public <TArg, TResult> TResult visit(ExpressionVisitor<TArg, TResult> v, TArg arg) {
|
||||
return v.visitUnaryExpression(this, arg);
|
||||
}
|
||||
|
||||
public final Expression E;
|
||||
public final Operator O;
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* @(#)VnameExpression.java 2.1 2003/10/07
|
||||
*
|
||||
* Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown
|
||||
* Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland
|
||||
* and School of Computer and Math Sciences, The Robert Gordon University,
|
||||
* St. Andrew Street, Aberdeen AB25 1HG, Scotland.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is provided free for educational use only. It may
|
||||
* not be used for commercial purposes without the prior written permission
|
||||
* of the authors.
|
||||
*/
|
||||
|
||||
package triangle.abstractSyntaxTrees.expressions;
|
||||
|
||||
import triangle.abstractSyntaxTrees.visitors.ExpressionVisitor;
|
||||
import triangle.abstractSyntaxTrees.vnames.Vname;
|
||||
import triangle.syntacticAnalyzer.SourcePosition;
|
||||
|
||||
public class VnameExpression extends Expression {
|
||||
|
||||
public VnameExpression(Vname vAST, SourcePosition position) {
|
||||
super(position);
|
||||
V = vAST;
|
||||
}
|
||||
|
||||
public <TArg, TResult> TResult visit(ExpressionVisitor<TArg, TResult> v, TArg arg) {
|
||||
return v.visitVnameExpression(this, arg);
|
||||
}
|
||||
|
||||
public final Vname V;
|
||||
}
|
||||
Reference in New Issue
Block a user