Otawa  0.10
ASTProcessor.h
Go to the documentation of this file.
1 /*
2  * ASTProcessor class interface
3  *
4  * This file is part of OTAWA
5  * Copyright (c) 2005, IRIT UPS.
6  *
7  * OTAWA is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * OTAWA is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with OTAWA; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 #ifndef OTAWA_PROC_ASTPROCESSOR_H_
22 #define OTAWA_PROC_ASTPROCESSOR_H_
23 
24 #include <otawa/proc/Processor.h>
25 #include <otawa/ast/FunProcessor.h>
26 #include <otawa/ast/FunAST.h>
27 #include <otawa/ast/AST.h>
28 
29 namespace otawa { namespace ast {
30 
31 // Processor class
32 class ASTProcessor: public FunProcessor {
33 public:
35  ~ASTProcessor(void);
36 
37 protected:
38  virtual void processAST(WorkSpace *ws, AST *ast)=0 ;
39  virtual void processFun(WorkSpace *ws, FunAST *fa);
40 };
41 
42 } } // otawa::ast
43 
44 #endif //OTAWA_PROC_ASTPROCESSOR_H_
This class represents functions in the AST representation.
Definition: FunAST.h:32
virtual void processAST(WorkSpace *ws, AST *ast)=0
Process the given AST.
Class to declare simple a processor.
Definition: Registration.h:213
static p::declare reg
Definition: FunProcessor.h:32
WorkSpace * ws
Definition: Processor.h:185
ASTProcessor(p::declare &r=FunProcessor::reg)
Definition: proc_ASTProcessor.cpp:38
This is a specialization of the processor class dedicated to AST processing.
Definition: ASTProcessor.h:32
This is a specialization of the processor class dedicated to function processing. ...
Definition: FunProcessor.h:30
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
~ASTProcessor(void)
Definition: proc_ASTProcessor.cpp:52
virtual void processFun(WorkSpace *ws, FunAST *fa)
Definition: proc_ASTProcessor.cpp:58
This is the base class for the representation of programs as Abstract Syntax Trees.
Definition: AST.h:53