parent
55f6b2d105
commit
bffeafba10
@ -1,4 +1,4 @@ |
||||
package Triangle.AbstractMachine; |
||||
package triangle.abstractMachine; |
||||
|
||||
public enum OpCode { |
||||
LOAD, LOADA, LOADI, LOADL, STORE, STOREI, CALL, CALLI, RETURN, PUSH, POP, JUMP, JUMPI, JUMPIF, HALT |
@ -1,4 +1,4 @@ |
||||
package Triangle.AbstractMachine; |
||||
package triangle.abstractMachine; |
||||
|
||||
public enum Primitive { |
||||
ID, NOT, AND, OR, SUCC, PRED, NEG, ADD, SUB, MULT, DIV, MOD, LT, LE, GE, GT, EQ, NE, EOL, EOF, GET, PUT, GETEOL, |
@ -1,4 +1,4 @@ |
||||
package Triangle.AbstractMachine; |
||||
package triangle.abstractMachine; |
||||
|
||||
public enum Register { |
||||
CB, CT, PB, PT, SB, ST, HB, HT, LB, L1, L2, L3, L4, L5, L6, CP |
@ -1,27 +0,0 @@ |
||||
package Triangle.AbstractSyntaxTrees.Visitors; |
||||
|
||||
import Triangle.AbstractSyntaxTrees.Commands.AssignCommand; |
||||
import Triangle.AbstractSyntaxTrees.Commands.CallCommand; |
||||
import Triangle.AbstractSyntaxTrees.Commands.EmptyCommand; |
||||
import Triangle.AbstractSyntaxTrees.Commands.IfCommand; |
||||
import Triangle.AbstractSyntaxTrees.Commands.LetCommand; |
||||
import Triangle.AbstractSyntaxTrees.Commands.SequentialCommand; |
||||
import Triangle.AbstractSyntaxTrees.Commands.WhileCommand; |
||||
|
||||
public interface CommandVisitor<TArg, TResult> { |
||||
|
||||
TResult visitAssignCommand(AssignCommand ast, TArg arg); |
||||
|
||||
TResult visitCallCommand(CallCommand ast, TArg arg); |
||||
|
||||
TResult visitEmptyCommand(EmptyCommand ast, TArg arg); |
||||
|
||||
TResult visitIfCommand(IfCommand ast, TArg arg); |
||||
|
||||
TResult visitLetCommand(LetCommand ast, TArg arg); |
||||
|
||||
TResult visitSequentialCommand(SequentialCommand ast, TArg arg); |
||||
|
||||
TResult visitWhileCommand(WhileCommand ast, TArg arg); |
||||
|
||||
} |
@ -1,11 +0,0 @@ |
||||
package Triangle.CodeGenerator.Entities; |
||||
|
||||
import Triangle.AbstractSyntaxTrees.Vnames.Vname; |
||||
import Triangle.CodeGenerator.Emitter; |
||||
import Triangle.CodeGenerator.Frame; |
||||
|
||||
public interface FetchableEntity { |
||||
|
||||
void encodeFetch(Emitter emitter, Frame frame, int size, Vname vname); |
||||
|
||||
} |
@ -1,8 +1,8 @@ |
||||
package Triangle.AbstractSyntaxTrees.Visitors; |
||||
package triangle.abstractSyntaxTrees.visitors; |
||||
|
||||
import Triangle.AbstractSyntaxTrees.Actuals.EmptyActualParameterSequence; |
||||
import Triangle.AbstractSyntaxTrees.Actuals.MultipleActualParameterSequence; |
||||
import Triangle.AbstractSyntaxTrees.Actuals.SingleActualParameterSequence; |
||||
import triangle.abstractSyntaxTrees.actuals.EmptyActualParameterSequence; |
||||
import triangle.abstractSyntaxTrees.actuals.MultipleActualParameterSequence; |
||||
import triangle.abstractSyntaxTrees.actuals.SingleActualParameterSequence; |
||||
|
||||
public interface ActualParameterSequenceVisitor<TArg, TResult> { |
||||
|
@ -1,9 +1,9 @@ |
||||
package Triangle.AbstractSyntaxTrees.Visitors; |
||||
package triangle.abstractSyntaxTrees.visitors; |
||||
|
||||
import Triangle.AbstractSyntaxTrees.Actuals.ConstActualParameter; |
||||
import Triangle.AbstractSyntaxTrees.Actuals.FuncActualParameter; |
||||
import Triangle.AbstractSyntaxTrees.Actuals.ProcActualParameter; |
||||
import Triangle.AbstractSyntaxTrees.Actuals.VarActualParameter; |
||||
import triangle.abstractSyntaxTrees.actuals.ConstActualParameter; |
||||
import triangle.abstractSyntaxTrees.actuals.FuncActualParameter; |
||||
import triangle.abstractSyntaxTrees.actuals.ProcActualParameter; |
||||
import triangle.abstractSyntaxTrees.actuals.VarActualParameter; |
||||
|
||||
public interface ActualParameterVisitor<TArg, TResult> { |
||||
|
@ -1,7 +1,7 @@ |
||||
package Triangle.AbstractSyntaxTrees.Visitors; |
||||
package triangle.abstractSyntaxTrees.visitors; |
||||
|
||||
import Triangle.AbstractSyntaxTrees.Aggregates.MultipleArrayAggregate; |
||||
import Triangle.AbstractSyntaxTrees.Aggregates.SingleArrayAggregate; |
||||
import triangle.abstractSyntaxTrees.aggregates.MultipleArrayAggregate; |
||||
import triangle.abstractSyntaxTrees.aggregates.SingleArrayAggregate; |
||||
|
||||
public interface ArrayAggregateVisitor<TArg, TResult> { |
||||
|
@ -0,0 +1,27 @@ |
||||
package triangle.abstractSyntaxTrees.visitors; |
||||
|
||||
import triangle.abstractSyntaxTrees.commands.AssignCommand; |
||||
import triangle.abstractSyntaxTrees.commands.CallCommand; |
||||
import triangle.abstractSyntaxTrees.commands.EmptyCommand; |
||||
import triangle.abstractSyntaxTrees.commands.IfCommand; |
||||
import triangle.abstractSyntaxTrees.commands.LetCommand; |
||||
import triangle.abstractSyntaxTrees.commands.SequentialCommand; |
||||
import triangle.abstractSyntaxTrees.commands.WhileCommand; |
||||
|
||||
public interface CommandVisitor<TArg, TResult> { |
||||
|
||||
TResult visitAssignCommand(AssignCommand ast, TArg arg); |
||||
|
||||
TResult visitCallCommand(CallCommand ast, TArg arg); |
||||
|
||||
TResult visitEmptyCommand(EmptyCommand ast, TArg arg); |
||||
|
||||
TResult visitIfCommand(IfCommand ast, TArg arg); |
||||
|
||||
TResult visitLetCommand(LetCommand ast, TArg arg); |
||||
|
||||
TResult visitSequentialCommand(SequentialCommand ast, TArg arg); |
||||
|
||||
TResult visitWhileCommand(WhileCommand ast, TArg arg); |
||||
|
||||
} |
@ -1,13 +1,13 @@ |
||||
package Triangle.AbstractSyntaxTrees.Visitors; |
||||
|
||||
import Triangle.AbstractSyntaxTrees.Declarations.BinaryOperatorDeclaration; |
||||
import Triangle.AbstractSyntaxTrees.Declarations.ConstDeclaration; |
||||
import Triangle.AbstractSyntaxTrees.Declarations.FuncDeclaration; |
||||
import Triangle.AbstractSyntaxTrees.Declarations.ProcDeclaration; |
||||
import Triangle.AbstractSyntaxTrees.Declarations.SequentialDeclaration; |
||||
import Triangle.AbstractSyntaxTrees.Declarations.UnaryOperatorDeclaration; |
||||
import Triangle.AbstractSyntaxTrees.Declarations.VarDeclaration; |
||||
import Triangle.AbstractSyntaxTrees.Types.TypeDeclaration; |
||||
package triangle.abstractSyntaxTrees.visitors; |
||||
|
||||
import triangle.abstractSyntaxTrees.declarations.BinaryOperatorDeclaration; |
||||
import triangle.abstractSyntaxTrees.declarations.ConstDeclaration; |
||||
import triangle.abstractSyntaxTrees.declarations.FuncDeclaration; |
||||
import triangle.abstractSyntaxTrees.declarations.ProcDeclaration; |
||||
import triangle.abstractSyntaxTrees.declarations.SequentialDeclaration; |
||||
import triangle.abstractSyntaxTrees.declarations.UnaryOperatorDeclaration; |
||||
import triangle.abstractSyntaxTrees.declarations.VarDeclaration; |
||||
import triangle.abstractSyntaxTrees.types.TypeDeclaration; |
||||
|
||||
public interface DeclarationVisitor<TArg, TResult> extends FormalParameterVisitor<TArg, TResult> { |
||||
|
@ -1,16 +1,16 @@ |
||||
package Triangle.AbstractSyntaxTrees.Visitors; |
||||
|
||||
import Triangle.AbstractSyntaxTrees.Expressions.ArrayExpression; |
||||
import Triangle.AbstractSyntaxTrees.Expressions.BinaryExpression; |
||||
import Triangle.AbstractSyntaxTrees.Expressions.CallExpression; |
||||
import Triangle.AbstractSyntaxTrees.Expressions.CharacterExpression; |
||||
import Triangle.AbstractSyntaxTrees.Expressions.EmptyExpression; |
||||
import Triangle.AbstractSyntaxTrees.Expressions.IfExpression; |
||||
import Triangle.AbstractSyntaxTrees.Expressions.IntegerExpression; |
||||
import Triangle.AbstractSyntaxTrees.Expressions.LetExpression; |
||||
import Triangle.AbstractSyntaxTrees.Expressions.RecordExpression; |
||||
import Triangle.AbstractSyntaxTrees.Expressions.UnaryExpression; |
||||
import Triangle.AbstractSyntaxTrees.Expressions.VnameExpression; |
||||
package triangle.abstractSyntaxTrees.visitors; |
||||
|
||||
import triangle.abstractSyntaxTrees.expressions.ArrayExpression; |
||||
import triangle.abstractSyntaxTrees.expressions.BinaryExpression; |
||||
import triangle.abstractSyntaxTrees.expressions.CallExpression; |
||||
import triangle.abstractSyntaxTrees.expressions.CharacterExpression; |
||||
import triangle.abstractSyntaxTrees.expressions.EmptyExpression; |
||||
import triangle.abstractSyntaxTrees.expressions.IfExpression; |
||||
import triangle.abstractSyntaxTrees.expressions.IntegerExpression; |
||||
import triangle.abstractSyntaxTrees.expressions.LetExpression; |
||||
import triangle.abstractSyntaxTrees.expressions.RecordExpression; |
||||
import triangle.abstractSyntaxTrees.expressions.UnaryExpression; |
||||
import triangle.abstractSyntaxTrees.expressions.VnameExpression; |
||||
|
||||
public interface ExpressionVisitor<TArg, TResult> { |
||||
|
@ -1,7 +1,7 @@ |
||||
package Triangle.AbstractSyntaxTrees.Visitors; |
||||
package triangle.abstractSyntaxTrees.visitors; |
||||
|
||||
import Triangle.AbstractSyntaxTrees.Types.MultipleFieldTypeDenoter; |
||||
import Triangle.AbstractSyntaxTrees.Types.SingleFieldTypeDenoter; |
||||
import triangle.abstractSyntaxTrees.types.MultipleFieldTypeDenoter; |
||||
import triangle.abstractSyntaxTrees.types.SingleFieldTypeDenoter; |
||||
|
||||
public interface FieldTypeDenoterVisitor<TArg, TResult> { |
||||
|
@ -1,8 +1,8 @@ |
||||
package Triangle.AbstractSyntaxTrees.Visitors; |
||||
package triangle.abstractSyntaxTrees.visitors; |
||||
|
||||
import Triangle.AbstractSyntaxTrees.Formals.EmptyFormalParameterSequence; |
||||
import Triangle.AbstractSyntaxTrees.Formals.MultipleFormalParameterSequence; |
||||
import Triangle.AbstractSyntaxTrees.Formals.SingleFormalParameterSequence; |
||||
import triangle.abstractSyntaxTrees.formals.EmptyFormalParameterSequence; |
||||
import triangle.abstractSyntaxTrees.formals.MultipleFormalParameterSequence; |
||||
import triangle.abstractSyntaxTrees.formals.SingleFormalParameterSequence; |
||||
|
||||
public interface FormalParameterSequenceVisitor<TArg, TResult> { |
||||
|
@ -1,9 +1,9 @@ |
||||
package Triangle.AbstractSyntaxTrees.Visitors; |
||||
package triangle.abstractSyntaxTrees.visitors; |
||||
|
||||
import Triangle.AbstractSyntaxTrees.Formals.ConstFormalParameter; |
||||
import Triangle.AbstractSyntaxTrees.Formals.FuncFormalParameter; |
||||
import Triangle.AbstractSyntaxTrees.Formals.ProcFormalParameter; |
||||
import Triangle.AbstractSyntaxTrees.Formals.VarFormalParameter; |
||||
import triangle.abstractSyntaxTrees.formals.ConstFormalParameter; |
||||
import triangle.abstractSyntaxTrees.formals.FuncFormalParameter; |
||||
import triangle.abstractSyntaxTrees.formals.ProcFormalParameter; |
||||
import triangle.abstractSyntaxTrees.formals.VarFormalParameter; |
||||
|
||||
public interface FormalParameterVisitor<TArg, TResult> { |
||||
|
@ -1,6 +1,6 @@ |
||||
package Triangle.AbstractSyntaxTrees.Visitors; |
||||
package triangle.abstractSyntaxTrees.visitors; |
||||
|
||||
import Triangle.AbstractSyntaxTrees.Terminals.Identifier; |
||||
import triangle.abstractSyntaxTrees.terminals.Identifier; |
||||
|
||||
public interface IdentifierVisitor<TArg, TResult> { |
||||
|
@ -1,7 +1,7 @@ |
||||
package Triangle.AbstractSyntaxTrees.Visitors; |
||||
package triangle.abstractSyntaxTrees.visitors; |
||||
|
||||
import Triangle.AbstractSyntaxTrees.Terminals.CharacterLiteral; |
||||
import Triangle.AbstractSyntaxTrees.Terminals.IntegerLiteral; |
||||
import triangle.abstractSyntaxTrees.terminals.CharacterLiteral; |
||||
import triangle.abstractSyntaxTrees.terminals.IntegerLiteral; |
||||
|
||||
public interface LiteralVisitor<TArg, TResult> { |
||||
|
@ -1,6 +1,6 @@ |
||||
package Triangle.AbstractSyntaxTrees.Visitors; |
||||
package triangle.abstractSyntaxTrees.visitors; |
||||
|
||||
import Triangle.AbstractSyntaxTrees.Terminals.Operator; |
||||
import triangle.abstractSyntaxTrees.terminals.Operator; |
||||
|
||||
public interface OperatorVisitor<TArg, TResult> { |
||||
|
@ -1,6 +1,6 @@ |
||||
package Triangle.AbstractSyntaxTrees.Visitors; |
||||
package triangle.abstractSyntaxTrees.visitors; |
||||
|
||||
import Triangle.AbstractSyntaxTrees.Program; |
||||
import triangle.abstractSyntaxTrees.Program; |
||||
|
||||
public interface ProgramVisitor<TArg, TResult> { |
||||
|
@ -1,7 +1,7 @@ |
||||
package Triangle.AbstractSyntaxTrees.Visitors; |
||||
package triangle.abstractSyntaxTrees.visitors; |
||||
|
||||
import Triangle.AbstractSyntaxTrees.Aggregates.MultipleRecordAggregate; |
||||
import Triangle.AbstractSyntaxTrees.Aggregates.SingleRecordAggregate; |
||||
import triangle.abstractSyntaxTrees.aggregates.MultipleRecordAggregate; |
||||
import triangle.abstractSyntaxTrees.aggregates.SingleRecordAggregate; |
||||
|
||||
public interface RecordAggregateVisitor<TArg, TResult> { |
||||
|
@ -1,13 +1,13 @@ |
||||
package Triangle.AbstractSyntaxTrees.Visitors; |
||||
|
||||
import Triangle.AbstractSyntaxTrees.Types.AnyTypeDenoter; |
||||
import Triangle.AbstractSyntaxTrees.Types.ArrayTypeDenoter; |
||||
import Triangle.AbstractSyntaxTrees.Types.BoolTypeDenoter; |
||||
import Triangle.AbstractSyntaxTrees.Types.CharTypeDenoter; |
||||
import Triangle.AbstractSyntaxTrees.Types.ErrorTypeDenoter; |
||||
import Triangle.AbstractSyntaxTrees.Types.IntTypeDenoter; |
||||
import Triangle.AbstractSyntaxTrees.Types.RecordTypeDenoter; |
||||
import Triangle.AbstractSyntaxTrees.Types.SimpleTypeDenoter; |
||||
package triangle.abstractSyntaxTrees.visitors; |
||||
|
||||
import triangle.abstractSyntaxTrees.types.AnyTypeDenoter; |
||||
import triangle.abstractSyntaxTrees.types.ArrayTypeDenoter; |
||||
import triangle.abstractSyntaxTrees.types.BoolTypeDenoter; |
||||
import triangle.abstractSyntaxTrees.types.CharTypeDenoter; |
||||
import triangle.abstractSyntaxTrees.types.ErrorTypeDenoter; |
||||
import triangle.abstractSyntaxTrees.types.IntTypeDenoter; |
||||
import triangle.abstractSyntaxTrees.types.RecordTypeDenoter; |
||||
import triangle.abstractSyntaxTrees.types.SimpleTypeDenoter; |
||||
|
||||
public interface TypeDenoterVisitor<TArg, TResult> extends FieldTypeDenoterVisitor<TArg, TResult> { |
||||
|
@ -1,8 +1,8 @@ |
||||
package Triangle.AbstractSyntaxTrees.Visitors; |
||||
package triangle.abstractSyntaxTrees.visitors; |
||||
|
||||
import Triangle.AbstractSyntaxTrees.Vnames.DotVname; |
||||
import Triangle.AbstractSyntaxTrees.Vnames.SimpleVname; |
||||
import Triangle.AbstractSyntaxTrees.Vnames.SubscriptVname; |
||||
import triangle.abstractSyntaxTrees.vnames.DotVname; |
||||
import triangle.abstractSyntaxTrees.vnames.SimpleVname; |
||||
import triangle.abstractSyntaxTrees.vnames.SubscriptVname; |
||||
|
||||
public interface VnameVisitor<TArg, TResult> { |
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in new issue