Loading...
Searching...
No Matches
space_constitution_old_get.cc
Go to the documentation of this file.
// old format input space_constitution files:
// space_constitution_old_get (idiststream& ids, space_constitution<T,M>& constit)
//
// author: Pierre.Saramito@imag.fr
//
// date: 19 dec 2011
//
#include "space_constitution_get.icc"
// ================================================================================
// part 1 : read from idiststeam and build as tree_type* result_ptr
// ================================================================================
/* AIX requires this to be the first thing in the file. */
#ifndef __GNUC__
# if _RHEOLEF_HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# endif
#endif
namespace rheolef {
using namespace std;
typedef size_t size_type;
static size_type space_constitution_old_line_no = 1;
static size_type space_constitution_old_n_error = 0;
extern int space_constitution_old_lex();
void space_constitution_old_error (const char* msg) {
std::string near;
error_macro("space constitution_old input:" << space_constitution_old_line_no << ": " << msg);
space_constitution_old_n_error++;
}
int space_constitution_old_wrap () { return 1; }
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#define YYMALLOC ::malloc
#define YYFREE ::free
#include "space_constitution_old_yacc.cc"
// avoid re-definition of YY_NULL within flex
#ifdef YY_NULL
#undef YY_NULL
#endif
#include "space_constitution_old_lex.cc"
#pragma GCC diagnostic pop
static yyFlexLexer input_space_constitution_old;
int space_constitution_old_lex() { return input_space_constitution_old.yylex(); }
// ================================================================================
// part 2 : main call
// ================================================================================
template<class T, class M>
void
space_constitution_old_get (idiststream& ids, space_constitution<T,M>& constit)
{
space_constitution_get_pass_1_2 (ids, space_constitution_old_parse,
input_space_constitution_old, space_constitution_old_line_no, space_constitution_old_n_error);
// convert tree_type result_ptr to space_constitution
const tree_type* ptr = result_ptr;
constit = build_from_tree<T,M> (*ptr);
delete_macro (result_ptr); result_ptr = 0;
}
// ----------------------------------------------------------------------------
// instanciation in library
// ----------------------------------------------------------------------------
template void space_constitution_old_get (idiststream&, space_constitution<Float,sequential>&);
#ifdef _RHEOLEF_HAVE_MPI
template void space_constitution_old_get (idiststream&, space_constitution<Float,distributed>&);
#endif // _RHEOLEF_HAVE_MPI
} // namespace rheolef
yyFlexLexer
#define yyFlexLexer
rheolef::idiststream
idiststream: see the diststream page for the full documentation
Definition diststream.h:336
rheolef::space_constitution
Definition space_constitution.h:405
rheolef::space_constitution_old_line_no
static size_type space_constitution_old_line_no
Definition space_constitution_old_get.cc:54
rheolef::space_constitution_old_n_error
static size_type space_constitution_old_n_error
Definition space_constitution_old_get.cc:55
error_macro
#define error_macro(message)
Definition dis_macros.h:49
rheolef
This file is part of Rheolef.
Definition compiler_eigen.h:39
rheolef::space_constitution_old_get
void space_constitution_old_get(idiststream &ids, space_constitution< T, M > &constit)
Definition space_constitution_old_get.cc:1675
rheolef::space_constitution_old_lex
int space_constitution_old_lex()
Definition space_constitution_old_get.cc:1668
rheolef::space_constitution_old_error
void space_constitution_old_error(const char *msg)
Definition space_constitution_old_get.cc:58
rheolef::space_constitution_old_wrap
int space_constitution_old_wrap()
Definition space_constitution_old_get.cc:63
rheolef::space_constitution_old_parse
int space_constitution_old_parse(void)
space_constitution_get.icc