Commit f478cd4b authored by Pascal Noisette's avatar Pascal Noisette
Browse files

option de compilation mode debug pour le parser : tappez make debug dans svn/source/parser

parent ae1621ba
......@@ -7,6 +7,7 @@ all:
debug:
@(cd ../bin && rm -f *.o)
@(cd $(DIR_TESTS) && make)
clean:
......
LD = g++
OBJ = Line.o ParserDefinitionDecoder.o Definition.o ParserPaje.o TokenSource.o ParserEventDecoder.o
OBJWPARSER = Line.o ParserDefinitionDecoder.o Definition.o TokenSource.o
OPT = -g -Wall -W
LIBS =
DIR_OBJ = ../../bin/
all: $(OBJ)
allbutparser : $(OBJWPARSER)
$(OBJ):%.o: %.cpp %.hpp
$(LD) -c $< $(OPT) -o $(DIR_OBJ)$@
......
......@@ -12,8 +12,11 @@
#include "../../trace/src/values/Integer.hpp"
#include "../../trace/src/values/Name.hpp"
#include "../../trace/src/values/String.hpp"
#ifdef DEBUG
#include "../tests/stub/trace.hpp"
#else
#include "../../trace/src/Trace.hpp"
#endif
/**
* \class ParserEventDecoder
* \brief Reads Hash Table to find fill the Str
......
......@@ -8,7 +8,11 @@
#include "ParserEventDecoder.hpp"
#include "Parser.hpp"
#include "Line.hpp"
#ifdef DEBUG
#include "../tests/stub/trace.hpp"
#else
#include "../../trace/src/Trace.hpp"
#endif
/*!
*
......
CC = g++
LD = g++
OBJ = ../../trace/src/values/*.o stub/*.o ../src/*.o
OBJ = ../../trace/src/values/*.o stub/*.o ../../bin/*.o
DIR_SRC = ../src
DIR_STUB = stub
DIR_VALUES = ../../trace/src/values
OPT = -g -Wall -W
all: test_token test_parser_definition test_parser_evenement test_parser_paje
OPT = -g -Wall -W -DDEBUG
all: ParserPaje.o ParserEventDecoder.o test_token test_parser_definition test_parser_evenement test_parser_paje
test_token: test_token.cpp $(OBJ)
$(CC) $(OPT) -o $@ $^
......@@ -20,8 +18,15 @@ test_parser_definition: test_parser_definition.cpp $(OBJ)
test_parser_evenement: test_parser_event.cpp $(OBJ)
$(CC) $(OPT) -o $@ $^
ParserPaje.o : ../src/ParserPaje.cpp ../src/ParserPaje.hpp
$(CC) -c $(OPT) ../src/ParserPaje.cpp -o ../../bin/ParserPaje.o
ParserEventDecoder.o : ../src/ParserEventDecoder.cpp ../src/ParserEventDecoder.hpp
$(CC) -c $(OPT) ../src/ParserEventDecoder.cpp -o ../../bin/ParserPaje.o
$(OBJ):
@(cd $(DIR_SRC) && make)
@(cd $(DIR_SRC) && make allbutparser)
@(cd $(DIR_STUB) && make)
@(cd $(DIR_VALUES) && make)
......
......@@ -36,7 +36,7 @@ void free_str(){
}
void Trace::define_container_type(Name alias, ContainerType *container_type_parent, const vector<Value*> &opt){
void Trace::define_container_type(Name alias, ContainerType *container_type_parent, vector<Value*> &opt){
cout << "define_container_type "
<< alias.to_string()
<< " "
......@@ -50,7 +50,7 @@ void Trace::define_container_type(Name alias, ContainerType *container_type_pare
void Trace::create_container(Date time, Name alias, ContainerType *type, Container *parent, const vector<Value*> &opt){
void Trace::create_container(Date time, Name alias, ContainerType *type, Container *parent, vector<Value*> &opt){
cout << "create_container "
<< time.to_string()
<< " "
......@@ -67,11 +67,11 @@ void Trace::create_container(Date time, Name alias, ContainerType *type, Contain
void Trace::destroy_container(Date time, Name alias, ContainerType *type, const vector<Value*> &opt){
void Trace::destroy_container(Date time, Container *cont, ContainerType *type, vector<Value*> &opt){
cout << "destroy_container "
<< time.to_string()
<< " "
<< alias.to_string()
<< *cont
<< " "
<< *type
<< " "
......@@ -81,7 +81,7 @@ void Trace::destroy_container(Date time, Name alias, ContainerType *type, const
}
void Trace::define_event_type(Name alias, ContainerType *container_type, const vector<Value*> &opt){
void Trace::define_event_type(Name alias, ContainerType *container_type, vector<Value*> &opt){
cout << "define_event_type "
<< alias.to_string()
<< " "
......@@ -94,7 +94,7 @@ void Trace::define_event_type(Name alias, ContainerType *container_type, const v
void Trace::define_state_type(Name alias, ContainerType *container_type, const vector<Value*> &opt){
void Trace::define_state_type(Name alias, ContainerType *container_type, vector<Value*> &opt){
cout << "define_state_type "
<< alias.to_string()
<< " "
......@@ -106,7 +106,7 @@ void Trace::define_state_type(Name alias, ContainerType *container_type, const v
}
void Trace::define_variable_type(Name alias, ContainerType *container_type, const vector<Value*> &opt){
void Trace::define_variable_type(Name alias, ContainerType *container_type, vector<Value*> &opt){
cout << "define_variable_type "
<< alias.to_string()
<< " "
......@@ -119,7 +119,7 @@ void Trace::define_variable_type(Name alias, ContainerType *container_type, cons
void Trace::define_link_type(Name alias, ContainerType *ancestor, ContainerType *source, ContainerType *destination, const vector<Value*> &opt){
void Trace::define_link_type(Name alias, ContainerType *ancestor, ContainerType *source, ContainerType *destination, vector<Value*> &opt){
cout << "define_link_type "
<< alias.to_string()
<< " "
......@@ -136,7 +136,7 @@ void Trace::define_link_type(Name alias, ContainerType *ancestor, ContainerType
void Trace::define_entity_value(Name alias, EntityType *entity_type, const vector<Value*> &opt){
void Trace::define_entity_value(Name alias, EntityType *entity_type, vector<Value*> &opt){
cout << "define_entity_value "
<< alias.to_string()
<< " "
......@@ -149,7 +149,7 @@ void Trace::define_entity_value(Name alias, EntityType *entity_type, const vecto
void Trace::set_state(Date time, StateType *type, Container *container, EntityValue *value, const vector<Value*> &op){
void Trace::set_state(Date time, StateType *type, Container *container, EntityValue *value, vector<Value*> &op){
cout << "set_state "
<< time.to_string()
<< " "
......@@ -166,7 +166,7 @@ void Trace::set_state(Date time, StateType *type, Container *container, EntityVa
void Trace::push_state(Date time, StateType *type, Container *container, EntityValue *value, const vector<Value*> &opt){
void Trace::push_state(Date time, StateType *type, Container *container, EntityValue *value, vector<Value*> &opt){
cout << "push_state "
<< time.to_string()
<< " "
......@@ -183,7 +183,7 @@ void Trace::push_state(Date time, StateType *type, Container *container, EntityV
void Trace::pop_state(Date time, StateType *type, Container *container, const vector<Value*> &opt){
void Trace::pop_state(Date time, StateType *type, Container *container, vector<Value*> &opt){
cout << "pop_state "
<< time.to_string()
......@@ -199,7 +199,7 @@ void Trace::pop_state(Date time, StateType *type, Container *container, const ve
void Trace::new_event(Date time, EventType *type, Container *container, EntityValue *value, const vector<Value*> &opt){
void Trace::new_event(Date time, EventType *type, Container *container, EntityValue *value, vector<Value*> &opt){
cout << "new_event "
<< time.to_string()
<< " "
......@@ -216,7 +216,7 @@ void Trace::new_event(Date time, EventType *type, Container *container, EntityVa
void Trace::set_variable(Date time, VariableType *type, Container *container, Double value, const vector<Value*> &opt){
void Trace::set_variable(Date time, VariableType *type, Container *container, Double value, vector<Value*> &opt){
cout << "set_variable "
<< time.to_string()
......@@ -233,7 +233,7 @@ void Trace::set_variable(Date time, VariableType *type, Container *container, Do
}
void Trace::add_variable(Date time, VariableType *type, Container *container, Double value, const vector<Value*> &opt){
void Trace::add_variable(Date time, VariableType *type, Container *container, Double value, vector<Value*> &opt){
cout << "add_variable "
<< time.to_string()
......@@ -251,7 +251,7 @@ void Trace::add_variable(Date time, VariableType *type, Container *container, Do
void Trace::sub_variable(Date time, VariableType *type, Container *container, Double value, const vector<Value*> &opt){
void Trace::sub_variable(Date time, VariableType *type, Container *container, Double value, vector<Value*> &opt){
cout << "sub_variable "
<< time.to_string()
......@@ -268,7 +268,7 @@ void Trace::sub_variable(Date time, VariableType *type, Container *container, Do
}
void Trace::start_link(Date time, LinkType *type, Container *ancestor, Container *source, EntityValue *value, String key, const vector<Value*> &opt){
void Trace::start_link(Date time, LinkType *type, Container *ancestor, Container *source, EntityValue *value, Integer key, vector<Value*> &opt){
cout << "start_link "
<< time.to_string()
......@@ -291,7 +291,7 @@ void Trace::start_link(Date time, LinkType *type, Container *ancestor, Container
void Trace::end_link(Date time, LinkType *type, Container *ancestor, Container *destination, EntityValue *value, String key, const vector<Value*> &opt){
void Trace::end_link(Date time, LinkType *type, Container *ancestor, Container *destination, EntityValue *value, Integer key, vector<Value*> &opt){
cout << "end_link "
<< time.to_string()
......
......@@ -44,7 +44,7 @@ public :
*\param Name : an object that can contain a name, an alias or both
*
*/
void define_container_type(Name alias, ContainerType *container_type_parent, const std::vector<Value*> &opt);
void define_container_type(Name alias, ContainerType *container_type_parent, std::vector<Value*> &opt);
/*!
*
......@@ -58,7 +58,7 @@ public :
*\param String : the parent of the container
*
*/
void create_container(Date time, Name alias, ContainerType *type, Container *parent, const std::vector<Value*> &opt);
void create_container(Date time, Name alias, ContainerType *type, Container *parent, std::vector<Value*> &opt);
/*!
*
......@@ -70,7 +70,7 @@ public :
*\param Sring : the type of the container
*
*/
void destroy_container(Date time, Name alias, ContainerType *type, const std::vector<Value*> &opt);
void destroy_container(Date time, Container *cont, ContainerType *type, std::vector<Value*> &opt);
/*!
......@@ -82,7 +82,7 @@ public :
*\param String : the type of the container
*
*/
void define_event_type(Name alias, ContainerType *container_type, const std::vector<Value*> &opt);
void define_event_type(Name alias, ContainerType *container_type, std::vector<Value*> &opt);
/*!
......@@ -95,7 +95,7 @@ public :
*
*
*/
void define_state_type(Name alias, ContainerType *container_type, const std::vector<Value*> &opt);
void define_state_type(Name alias, ContainerType *container_type, std::vector<Value*> &opt);
/*!
......@@ -107,7 +107,7 @@ public :
*\param String : the type of the container
*
*/
void define_variable_type(Name alias, ContainerType *container_type, const std::vector<Value*> &opt);
void define_variable_type(Name alias, ContainerType *container_type, std::vector<Value*> &opt);
/*!
......@@ -121,7 +121,7 @@ public :
*\param String : the type of the container where the link goes
*
*/
void define_link_type(Name alias, ContainerType *ancestor, ContainerType *source, ContainerType *destination, const std::vector<Value*> &opt);
void define_link_type(Name alias, ContainerType *ancestor, ContainerType *source, ContainerType *destination, std::vector<Value*> &opt);
/*!
......@@ -133,7 +133,7 @@ public :
*\param String : the type of the entity
*
*/
void define_entity_value(Name alias, EntityType *entity_type, const std::vector<Value*> &opt);
void define_entity_value(Name alias, EntityType *entity_type, std::vector<Value*> &opt);
/*!
......@@ -147,7 +147,7 @@ public :
*\param String : the new value of the state
*
*/
void set_state(Date time, StateType *type, Container *container, EntityValue *value, const std::vector<Value*> &opt);
void set_state(Date time, StateType *type, Container *container, EntityValue *value, std::vector<Value*> &opt);
/*!
......@@ -161,7 +161,7 @@ public :
*\param String : the new value of the state
*
*/
void push_state(Date time, StateType *type, Container *container, EntityValue *value, const std::vector<Value*> &opt);
void push_state(Date time, StateType *type, Container *container, EntityValue *value, std::vector<Value*> &opt);
/*!
......@@ -174,7 +174,7 @@ public :
*\param String : the container
*
*/
void pop_state(Date time, StateType *type, Container *container, const std::vector<Value*> &opt);
void pop_state(Date time, StateType *type, Container *container, std::vector<Value*> &opt);
/*!
......@@ -188,7 +188,7 @@ public :
*\param String : the value of the event
*
*/
void new_event(Date time, EventType *type, Container *container, EntityValue *value, const std::vector<Value*> &opt);
void new_event(Date time, EventType *type, Container *container, EntityValue *value, std::vector<Value*> &opt);
/*!
......@@ -202,7 +202,7 @@ public :
*\param double : the value of the variable
*
*/
void set_variable(Date time, VariableType *type, Container *container, Double value, const std::vector<Value*> &opt);
void set_variable(Date time, VariableType *type, Container *container, Double value, std::vector<Value*> &opt);
/*!
......@@ -216,7 +216,7 @@ public :
*\param double : the value of the variable
*
*/
void add_variable(Date time, VariableType *type, Container *container, Double value, const std::vector<Value*> &opt);
void add_variable(Date time, VariableType *type, Container *container, Double value, std::vector<Value*> &opt);
/*!
......@@ -230,7 +230,7 @@ public :
*\param double : the value of the variable
*
*/
void sub_variable(Date time, VariableType *type, Container *container, Double value, const std::vector<Value*> &opt);
void sub_variable(Date time, VariableType *type, Container *container, Double value, std::vector<Value*> &opt);
/*!
......@@ -245,7 +245,7 @@ public :
*\param String : the value of the variable
*
*/
void start_link(Date time, LinkType *type, Container *ancestor, Container *source, EntityValue *value, String key, const std::vector<Value*> &opt);
void start_link(Date time, LinkType *type, Container *ancestor, Container *source, EntityValue *value, Integer key, std::vector<Value*> &opt);
/*!
......@@ -260,7 +260,7 @@ public :
*\param String : the value of the variable
*
*/
void end_link(Date time, LinkType *type, Container *ancestor, Container *destination, EntityValue *value, String key, const std::vector<Value*> &opt);
void end_link(Date time, LinkType *type, Container *ancestor, Container *destination, EntityValue *value,Integer key, std::vector<Value*> &opt);
/*!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment