Project

General

Profile

root / trunk / compiler / cppAst / ast / IAstVisitor.hpp @ 5

1
/**
2
  *
3
  *                  OOAS Compiler - C++ AST
4
  *
5
  * Copyright 2015, AIT Austrian Institute of Technology.
6
  * All rights reserved.
7
  *
8
  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
9
  *
10
  * If you modify the file please update the list of contributors below to in-
11
  * clude your name. Please also stick to the coding convention of using TABs
12
  * to do the basic (block-level) indentation and spaces for anything after
13
  * that. (Enable the display of special chars and it should be pretty obvious
14
  * what this means.) Also, remove all trailing whitespace.
15
  *
16
  * Contributors:
17
  *               Willibald Krenn (AIT)
18
  *               Stephan Zimmerer (AIT)
19
  *               Christoph Czurda (AIT)
20
  *
21
  */
22

    
23

    
24

    
25

    
26

    
27
#pragma once
28

    
29
#include <string>
30
#include "Ast.hpp"
31

    
32
namespace Ast {
33

    
34
class IAstVisitor
35
{
36
public:
37
        virtual ~IAstVisitor() {};
38
        virtual std::string returnVisitorName() = 0;
39

    
40
        virtual void visit(TypeIdentifier* typeIdentifier) = 0;
41
        virtual void visit(EnumIdentifier* enumIdentifier) = 0;
42
//        virtual void visit(ValuedEnumIdentifier* enumIdentifier) = 0;
43
        virtual void visit(AttributeIdentifier* attributeIdentifier) = 0;
44
        virtual void visit(LocalVariableIdentifier* localVariableIdentifier) = 0;
45
        virtual void visit(ParameterIdentifier* parameterIdentifier) = 0;
46
        virtual void visit(ExpressionVariableIdentifier* expressionVariableIdentifier) = 0;
47
        virtual void visit(MethodIdentifier* methodIdentifier) = 0;
48
        virtual void visit(NamedActionIdentifier* namedActionIdentifier) = 0;
49
        virtual void visit(Module* module) = 0;
50
        virtual void visit(ConstantIdentifier* constantIdentifier) = 0;
51
        virtual void visit(UnspecIdentifierBlock* unspecIdentifierList) = 0;
52
        virtual void visit(SeqIdentifierBlock* seqIdentifierList) = 0;
53
        virtual void visit(NondetIdentifierBlock* nondetIdentifierList) = 0;
54
        virtual void visit(PrioIdentifierBlock* prioIdentifierList) = 0;
55
        virtual void visit(MainModule* mainModule) = 0;
56

    
57
        virtual void visit(IntType* intType) = 0;
58
        virtual void visit(BoolType* boolType) = 0;
59
        virtual void visit(EnumType* enumType) = 0;
60
        virtual void visit(ListType* listType) = 0;
61
        virtual void visit(TupleType* tupleType) = 0;
62
        virtual void visit(NullType* nullType) = 0;
63
        virtual void visit(FunctionType* functionType) = 0;
64
        virtual void visit(ActionSystemType* actionSystemType) = 0;
65
        virtual void visit(PointerType* pointerType) = 0;
66

    
67

    
68
        virtual void visit(GuardedCommand* guardedCommand) = 0;
69
        virtual void visit(Call* call) = 0;
70
        virtual void visit(Assignment* assignment) = 0;
71
        virtual void visit(SeqBlock* seqBlock) = 0;
72
        virtual void visit(NondetBlock* nondetBlock) = 0;
73
        virtual void visit(PrioBlock* prioBlock) = 0;
74
        virtual void visit(Skip* skipStatement) = 0;
75
        virtual void visit(Break* breakStatement) = 0;
76
        virtual void visit(Abort* abortStatement) = 0;
77

    
78
        virtual void visit(TernaryOperator* ternaryOperator) = 0;
79
        virtual void visit(BinaryOperator* binaryOperator) = 0;
80
        virtual void visit(UnaryOperator* unaryOperator) = 0;
81
        virtual void visit(ExistsQuantifier* quantifier) = 0;
82
        virtual void visit(ForallQuantifier* quantifier) = 0;
83
        virtual void visit(ListConstructor* listConstructor) = 0;
84
        virtual void visit(SetConstructor* setConstructor) = 0;
85
        virtual void visit(TupleConstructor* tupleConstructor) = 0;
86
        virtual void visit(ObjectConstructor* objectConstructor) = 0;
87
        virtual void visit(BoolValueExpression* identifierExpression) = 0;
88
        virtual void visit(IntValueExpression* identifierExpression) = 0;
89
        virtual void visit(RefValueExpression* identifierExpression) = 0;
90
        virtual void visit(IdentifierExpression* identifierExpression) = 0;
91
        virtual void visit(TypeExpression* typeExpression) = 0;
92
        virtual void visit(TupleMapAccessExpression* tupleMapAccessExpression) = 0;
93
        virtual void visit(CallExpression* callExpression) = 0;
94
        virtual void visit(AccessExpression* accessExpression) = 0;
95

    
96

    
97
/*
98
        virtual void visit(SelfTypeIdentifier& typeIdentifier) = 0;
99
        virtual void visit(KillStatement& killStatement) = 0;
100
        virtual void visit(UnresolvedIdentifierExpression& unresolvedIdentifierExpression) = 0;
101
        virtual void visit(MapConstructor& mapConstructor) = 0;
102
        virtual void visit(CharType& charType) = 0;
103
        virtual void visit(FloatType& floatType) = 0;
104
        virtual void visit(MapType& mapType) = 0;
105
        virtual void visit(AnyType& anyType) = 0;
106
*/
107
};
108

    
109
}