41#include "rheolef/basis.h"
42#include "rheolef/basis_get.h"
59# if _RHEOLEF_HAVE_ALLOCA_H
85 error_macro(
"invalid basis name: \"" << basis_input_string <<
"\"");
91static const std::string& symbol (
size_t i) {
return symbol_table[i]; }
92static size_t insert (
const std::string& str) {
93 size_t i = symbol_table.size();
94 symbol_table.push_back (str);
97#pragma GCC diagnostic push
98#pragma GCC diagnostic ignored "-Weffc++"
99#define YYMALLOC ::malloc
101#include "basis_yacc.cc"
106#include "basis_lex.cc"
107#pragma GCC diagnostic pop
113static void basis_get_pass_2 (std::string& str);
121internal_build_fio_from_string (
const std::string& str)
123 std::istringstream istrstr;
126 std::string str_eol = str +
";";
127 istrstr.str (str_eol);
128 input_basis.yyrestart(istrstr);
129 symbol_table.clear();
130 _current_fio = family_index_option_type();
133 basis_input_string = str;
134 if (basis_parse() != 0 || basis_n_error != 0) {
135 _current_fio = family_index_option_type();
136 error_macro (
"invalid basis name: \"" << str <<
"\"");
138 symbol_table.clear();
144 internal_build_fio_from_string (str);
156 internal_build_fio_from_string (str);
157 std::string name = _current_fio.
family + std::to_string(_current_fio.
index);
165#define _RHEOLEF_instanciate(T) \
166template void basis_raw_basic<T>::reset (std::string&); \
170#undef _RHEOLEF_instanciate
field::size_type size_type
see the Float page for the full documentation
void reset(std::string &name)
static std::vector< std::string > symbol_table
static family_index_option_type _current_fio
static size_type basis_line_no
static size_type basis_n_error
static yyFlexLexer input_basis
static std::string basis_input_string
#define _RHEOLEF_instanciate(T)
#define error_macro(message)
This file is part of Rheolef.
void basis_error(const char *msg)
void basis_parse_from_string(const std::string &str, family_index_option_type &fio)