40 : mtasklist(tasklist),
43 verbosity(rverbosity) {
72 <<
"Mixing positional and named arguments is not allowed.";
82 named_args.push_back(current_argument);
93 Index bracket_level = 0;
94 bool inside_quotes =
false;
99 while ((bracket_level || inside_quotes) ||
108 if (bracket_level < 0)
115 if (prev_char !=
'\\') inside_quotes = !inside_quotes;
124 }
catch (
const Eot& x) {
127 "Unexpectedly reached end of file.\nProbably a runaway argument.",
137 }
catch (
const Eot& x) {
159 os <<
"Expected ',' or ')' but found '" <<
msource.
Current() <<
"' after "
173 for (arg_index = 0; arg_index < (
Index)named_args.size(); arg_index++) {
174 if (named_args[(
size_t)arg_index].name == name)
return;
204 out3 <<
"\nParsing control text:\n";
218 if (
"Arts" !=
md_data[
id].Name() &&
"Arts2" !=
md_data[
id].Name()) {
220 os <<
"The outermost agenda must be Arts2!\n"
221 <<
"(But it seems to be " <<
md_data[id].Name() <<
".)\n";
231 }
catch (
const Eot&) {
236 os <<
"Unexpected character(s) at the end of the control file\n";
237 os <<
"after the main agenda was already closed.\n";
238 os <<
"File: " << x.
file() <<
'\n';
239 os <<
"Line: " << x.
line() <<
'\n';
240 os <<
"Column: " << x.
column() <<
'\n';
241 throw runtime_error(os.str());
243 }
catch (
const Eot& x) {
246 os <<
"Unexpected end of control script.\n";
247 os <<
"File: " << x.
file() <<
'\n';
248 os <<
"Line: " << x.
line() <<
'\n';
249 throw runtime_error(os.str());
253 os <<
"Unexpected character:\n";
254 os << x.what() <<
'\n';
255 os <<
"File: " << x.
file() <<
'\n';
256 os <<
"Line: " << x.
line() <<
'\n';
257 os <<
"Column: " << x.
column() <<
'\n';
258 throw runtime_error(os.str());
262 os <<
"Illegal Line break:\n";
263 os << x.what() <<
'\n';
264 os <<
"File: " << x.
file() <<
'\n';
265 os <<
"Line: " << x.
line() <<
'\n';
266 throw runtime_error(os.str());
272 os <<
"Unknown Method:\n";
273 os << x.what() <<
'\n';
274 os <<
"File: " << x.
file() <<
'\n';
275 os <<
"Line: " << x.
line() <<
'\n';
276 os <<
"Column: " << x.
column() <<
'\n';
277 throw runtime_error(os.str());
283 os <<
"Unknown workspace variable:\n";
284 os << x.what() <<
'\n';
285 os <<
"File: " << x.
file() <<
'\n';
286 os <<
"Line: " << x.
line() <<
'\n';
287 os <<
"Column: " << x.
column() <<
'\n';
288 throw runtime_error(os.str());
292 os <<
"Attempt to create a workspace variable that already exists:\n";
293 os << x.what() <<
'\n';
294 os <<
"File: " << x.
file() <<
'\n';
295 os <<
"Line: " << x.
line() <<
'\n';
296 os <<
"Column: " << x.
column() <<
'\n';
297 throw runtime_error(os.str());
303 os <<
"Workspace variable belongs to the wrong group:\n";
304 os << x.what() <<
'\n';
305 os <<
"File: " << x.
file() <<
'\n';
306 os <<
"Line: " << x.
line() <<
'\n';
307 os <<
"Column: " << x.
column() <<
'\n';
308 throw runtime_error(os.str());
312 os <<
"Parse error:\n";
313 os << x.what() <<
'\n';
314 os <<
"File: " << x.
file() <<
'\n';
315 os <<
"Line: " << x.
line() <<
'\n';
316 os <<
"Column: " << x.
column() <<
'\n';
317 throw runtime_error(os.str());
358 id, output, input, tasks, auto_vars, auto_vars_values, include_file);
369 if (includedir.
nelem()) {
370 if (current_includepath.
nelem() && current_includepath[0] != includedir)
371 current_includepath.insert(current_includepath.begin(), includedir);
377 find_file(matching_files, include_file, current_includepath);
378 find_file(matching_files, include_file +
".arts", current_includepath);
380 if (!matching_files.
nelem()) {
382 os <<
"Cannot find include file " << include_file <<
".\n";
384 os <<
"Search path was: " << current_includepath <<
"\n";
389 include_file = matching_files[0];
390 out2 <<
"- Including control file " << include_file <<
"\n";
401 MRecord(
id, output, input, auto_vars_values[0], tasks));
415 if (mname.length() > 6 && mname.find(
"Create") == mname.length() - 6 &&
417 if (agenda_name !=
"Arts2") {
419 os << mname <<
" cannot be called inside an agenda.\n"
420 <<
"All workspace variables are global and must be created at the top level.";
429 map<String, Index>::const_iterator mdit;
430 mdit =
MdMap.find(method_name);
442 out3 <<
"- " <<
md_data[id].Name() <<
"\n";
513 bool found_curly_brace =
false;
521 auto_vars_values.resize(0);
527 if (methodname ==
"INCLUDE") {
535 if (methodname ==
"Arts2") {
537 }
else if (methodname ==
"Arts") {
539 "Arts version 1 controlfiles are no longer supported.");
545 mdd,
id, methodname, output, input, auto_vars, auto_vars_values);
553 found_curly_brace =
true;
560 out3 <<
"- " << mdd->
Name() <<
"\n";
569 os <<
"Expected method name , but got `" <<
msource.
Current() <<
"'.";
579 if (found_curly_brace) {
582 }
catch (
const Eot& x) {
584 if (!no_eot)
throw Eot(x);
611 ostringstream os_default_error;
613 <<
"\nParse error in default value for generic input variable.\n"
614 <<
"This is not a user error but a bug in methods.cc.\n"
615 <<
"Please contact the ARTS developers.";
625 istringstream is(mdd->
GInDefault()[gin_index]);
628 if (is.bad() || is.fail()) failed =
true;
631 istringstream is(mdd->
GInDefault()[gin_index]);
634 if (is.bad() || is.fail()) failed =
true;
644 os << p.what() << os_default_error.str();
657 os << p.what() << os_default_error.str();
670 os << p.what() << os_default_error.str();
680 }
catch (std::exception& e) {
681 std::ostringstream os;
682 os << e.what() << os_default_error.str();
690 os <<
"Default values for generic inputs with type "
692 <<
" are not supported.\n"
693 <<
"Either remove the default value for generic input '"
694 << mdd->
GIn()[gin_index] <<
"' in workspace method\n"
695 <<
"*" << mdd->
Name() <<
"* in methods.cc or discuss this "
696 <<
"issue on the arts-dev mailing list.\n";
707 name =
"auto_" + mdd->
Name() +
"_" +
"gin" + os.str() +
"_" +
708 mdd->
GIn()[gin_index];
714 "Automatically allocated variable.",
718 wsvid = wsvit->second;
721 auto_vars.push_back(wsvid);
722 auto_vars_values.push_back(tv);
726 os <<
"Failed to assign default value for generic '"
727 << mdd->
GIn()[gin_index] <<
"'.\n"
728 <<
"Check the documentation of workspace method *" << mdd->
Name()
735 os <<
"Generic input '" << mdd->
GIn()[gin_index]
736 <<
"' omitted but no default value found.\n"
737 <<
"Check the documentation of workspace method *" << mdd->
Name()
772 bool still_supergeneric =
true;
777 const map<String, Index>::const_iterator md_raw_id =
785 id = md_raw_id->second;
796 const map<String, Index>::const_iterator i2 =
MdMap.find(methodname);
802 still_supergeneric =
false;
807 Index supergeneric_index = -1;
809 Index this_method_end_line = -1;
810 Index this_method_end_column = -1;
811 bool call_by_name =
false;
842 bool is_first_arg =
true;
844 mdd, output, is_first_arg, named_arguments, call_by_name);
885 if (call_by_name && named_arguments.size()) {
888 os <<
"Error in arguments passed to " << mdd->
Name() <<
":\n";
889 for (
auto& argument_name : named_arguments) {
890 if (std::find(mdd->
GIn().begin(),
892 argument_name.name) == mdd->
GIn().end() &&
893 std::find(mdd->
GOut().begin(),
895 argument_name.name) == mdd->
GOut().end())
896 os <<
" Unkown argument: ";
898 os <<
" Duplicate argument: ";
899 os << argument_name.name << std::endl;
910 os <<
"This method has generic output. "
911 <<
"You have to pass a variable!";
921 for (ArrayOfIndex::const_iterator outs = vo.begin(); outs < vo.end();
923 output.push_back(*outs);
927 for (ArrayOfIndex::const_iterator ins = vi.begin(); ins < vi.end(); ++ins) {
928 input.push_back(*ins);
934 bool all_gin_have_defaults =
true;
935 for (
Index gin = 0; all_gin_have_defaults && gin < mdd->
GIn().
nelem();
941 all_gin_have_defaults =
false;
947 const map<String, Index>::const_iterator wsvit =
956 wsvid = wsvit->second;
958 input.push_back(wsvid);
962 if (!all_gin_have_defaults) {
964 os <<
"Not all generic inputs of the method *" << methodname
965 <<
"* have default values, you have to specify them!";
998 bool& still_supergeneric,
999 String& supergeneric_args,
1002 bool call_by_name) {
1011 Index this_arg_index = 0;
1016 if (this_arg_index != -1) {
1018 named_args[this_arg_index].column);
1019 named_args.erase(named_args.begin() + this_arg_index);
1033 if ((call_by_name && this_arg_index == -1) ||
msource.
Current() ==
',' ||
1042 "generic" + os.str(),
1048 "Unexpected '=' sign encountered.\n"
1049 "Mixing positional and named arguments is not allowed.",
1055 "Only constants can be passed to Set methods.\n"
1056 "You might want to use the *Copy* here.",
1066 const map<String, Index>::const_iterator wsvit =
1073 wsvid = wsvit->second;
1079 if (still_supergeneric) {
1082 supergeneric_args +=
1084 os << mdd->
Name() <<
"_sg_" << supergeneric_args;
1085 methodname = os.str();
1088 const map<String, Index>::const_iterator mdit =
MdMap.find(methodname);
1089 if (mdit !=
MdMap.end()) {
1094 still_supergeneric =
false;
1105 if (supergeneric_index == -1) {
1106 bool wrong_group_id =
true;
1110 wrong_group_id =
false;
1111 supergeneric_index = i;
1115 if (wrong_group_id) {
1117 bool firsttype =
true;
1127 "*" + mdd->
Name() +
"* is not defined for " +
1129 " input. Check the online docs.",
1138 wsvname +
" is not " +
1157 input.push_back(wsvid);
1182 bool& still_supergeneric,
1183 String& supergeneric_args,
1184 Index& supergeneric_index,
1186 bool call_by_name) {
1196 Index this_arg_index;
1200 if (this_arg_index == -1) {
1202 os <<
"This method has generic output. "
1203 <<
"You have to pass a variable!";
1209 named_args[this_arg_index].column);
1210 named_args.erase(named_args.begin() + this_arg_index);
1228 if (still_supergeneric) {
1230 os <<
"This might be either a typo or you have to create "
1231 <<
"the variable\nby calling TYPECreate(" << wsvname
1232 <<
") first. Replace TYPE with the\n"
1233 <<
"WSV group your variable should belong to.";
1239 if (mdd->
Name().length() <= 6 ||
1240 mdd->
Name().substr(mdd->
Name().length() - 6) !=
"Create") {
1242 os <<
"This might be either a typo or you have to create "
1243 <<
"the variable\nby calling "
1253 "Automatically allocated variable.",
1259 if (mdd->
Name().length() > 6 &&
1260 mdd->
Name().find(
"Create") == mdd->
Name().length() - 6) {
1263 if (mdd->
Name().find(gn) not_eq 0) {
1267 " already exists of group ",
1269 ". A variable cannot be redefined as a different group.\n"),
1275 wsvid = wsvit->second;
1283 if (still_supergeneric) {
1286 supergeneric_args +=
1288 os << mdd->
Name() <<
"_sg_" << supergeneric_args;
1289 methodname = os.str();
1292 const map<String, Index>::const_iterator mdit =
MdMap.find(methodname);
1293 if (mdit !=
MdMap.end()) {
1298 still_supergeneric =
false;
1309 if (supergeneric_index == -1) {
1310 bool wrong_group_id =
true;
1314 wrong_group_id =
false;
1315 supergeneric_index = i;
1319 if (wrong_group_id) {
1321 bool firsttype =
true;
1331 "*" + mdd->
Name() +
"* is not defined for " +
1333 " output. Check the online docs.",
1342 wsvname +
" is not " +
1361 output.push_back(wsvid);
1385 bool call_by_name) {
1395 for (ArrayOfIndex::const_iterator ins = vi.begin(); ins < vi.end(); ++ins) {
1399 Index this_arg_index;
1405 if (this_arg_index != -1) {
1407 named_args[this_arg_index].column);
1408 named_args.erase(named_args.begin() + this_arg_index);
1442 const map<String, Index>::const_iterator wsvit =
1448 wsvid = wsvit->second;
1455 wsvname +
" is not " +
1463 input.push_back(wsvid);
1483 bool call_by_name) {
1491 for (ArrayOfIndex::const_iterator outs = vo.begin(); outs < vo.end();
1496 Index this_arg_index = 0;
1502 if (this_arg_index != -1) {
1504 named_args[this_arg_index].column);
1505 named_args.erase(named_args.begin() + this_arg_index);
1532 map<String, Index>::const_iterator wsvit =
1535 if (mdd->
Name().length() > 6 &&
1536 mdd->
Name().substr(mdd->
Name().length() - 6) !=
"Create") {
1538 os <<
"This might be either a typo or you have to create "
1539 <<
"the variable\nby calling "
1541 <<
"Create( " << wsvname <<
" ) first.\n";
1548 "Automatically allocated variable.",
1554 if (wsvid == -1) wsvid = wsvit->second;
1561 wsvname +
" is not " +
1569 output.push_back(wsvid);
1591 const Index method_type,
1596 for (
Index i = 0; i < auto_vars.
nelem(); i++) {
1597 map<String, Index>::const_iterator mdit;
1599 TokVal auto_keyword_value;
1616 <<
" constant to a WSM is not supported!";
1622 switch (method_type) {
1624 auto_keyword_value = auto_vars_values[i];
1625 auto_output_var.push_back(auto_vars[i]);
1630 auto_input_var.push_back(auto_vars[i]);
1642 mdit =
MdMap.find(method_name);
1644 init_mdid = mdit->second;
1702 os <<
"Expected whitespace, but got `" << dummy <<
"'.";
1717 while (pos < str.length() &&
is_whitespace(str[pos])) pos++;
1737 os <<
"Workspace variable names must start with a letter!";
1745 if (isalnum(dummy) ||
'_' == dummy) {
1779 const String& default_name,
1781 const Index group) {
1791 os <<
"Passing constants as supergeneric arguments is not supported.";
1802 name =
"auto_" + mdd->
Name() +
"_" + default_name;
1806 name.c_str(),
"Automatically allocated variable.", group,
true));
1808 wsvid = wsvit->second;
1811 auto_vars.push_back(wsvid);
1818 auto_vars_values.push_back(dummy);
1822 auto_vars_values.push_back(n);
1826 auto_vars_values.push_back(n);
1830 auto_vars_values.push_back(dummy);
1834 auto_vars_values.push_back(dummy);
1839 if (dummy.
nelem()) {
1842 auto_vars_values.push_back(aost);
1846 auto_vars_values.push_back(dummy);
1850 auto_vars_values.push_back(dummy);
1871 os <<
"Expected '" <<
c <<
"', but got '" <<
msource.
Current() <<
"'.";
1938 if (
'+' == dummy ||
'-' == dummy) {
1950 os <<
"Expected digit or variable name, but got `" <<
msource.
Current()
1990 bool found_digit =
false;
1994 if (
'+' == dummy ||
'-' == dummy) {
2053 throw ParseError(
"Expected at least one digit.",
2060 if (
'e' == dummy ||
'E' == dummy) {
2085 istringstream is(res);
2096 istringstream is(res);
2137 res.push_back(dummy);
2178 res.push_back(dummy);
2223 tres.push_back(dummy);
2229 for (
int i = 0; i < tres.
nelem(); i++) {
2263 Index cur_ncols = 0;
2276 if (ncols != -1 && cur_ncols > ncols) {
2279 <<
"'. Check Matrix dimensions.";
2289 }
else if (ncols != cur_ncols) {
2292 <<
"'. Check Matrix dimensions.";
2301 if (ncols > cur_ncols)
c =
',';
2304 <<
"'. Check Matrix dimensions.";
2311 tres.push_back(dummy);
2315 if (ncols == -1) ncols = cur_ncols;
2316 if (ncols != cur_ncols) {
2317 throw ParseError(
"Missing element(s) in last row of matrix",
2324 res.
resize(nrows, ncols);
2325 for (
Index i = 0; i < nrows; i++)
2326 for (
Index j = 0; j < ncols; j++) res(i, j) = tres[i * ncols + j];
2349 if (str[pos] !=
'[') {
2350 throw ParseError(
"No opening bracket found while parsing ArrayOfIndex.",
2362 while (pos < str.length() && str[pos] !=
']') {
2366 if (str[pos] !=
',') {
2374 istringstream is(str.substr(pos));
2376 if (is.bad() || is.fail())
return false;
2377 tres.push_back(dummy);
2378 while (pos < str.length() &&
2379 (
isdigit(str[pos]) || str[pos] ==
'-' || str[pos] ==
'e'))
2385 res.resize(tres.
nelem());
2386 for (
int i = 0; i < tres.
nelem(); i++) {
2411 if (str[pos] !=
'[') {
2412 throw ParseError(
"No opening bracket found while parsing Vector.",
2424 while (pos < str.length() && str[pos] !=
']') {
2428 if (str[pos] !=
',') {
2436 istringstream is(str.substr(pos));
2438 if (is.bad() || is.fail())
return false;
2439 tres.push_back(dummy);
2440 if (str[pos] ==
'N' && str.find(
"NaN", pos) == pos) {
2443 while (pos < str.length() && (
isdigit(str[pos]) || str[pos] ==
'-' ||
2444 str[pos] ==
'.' || str[pos] ==
'e'))
2452 for (
int i = 0; i < tres.
nelem(); i++) {
2479 if (str[pos] !=
'[') {
2480 throw ParseError(
"No opening bracket found while parsing ArrayOfString.",
2492 while (pos < str.length() && str[pos] !=
']') {
2496 if (str[pos] !=
',') {
2503 if (str[pos] !=
'"') {
2504 throw ParseError(
"Expected quotes while parsing ArrayOfString.",
2513 while (pos < str.length() && str[pos] !=
'"') {
2518 if (pos == str.length() || str[pos] !=
'"')
return false;
2520 tres.push_back(dummy);
2526 res.resize(tres.
nelem());
2527 for (
int i = 0; i < tres.
nelem(); i++) {
The global header file for ARTS.
void push_back(const MRecord &n)
Append a new method to end of list.
void resize(Index n)
Resize the method list.
const Array< MRecord > & Methods() const
Index nelem() const
Return the number of agenda elements.
Index nelem() const ARTS_NOEXCEPT
Number of elements.
bool parse_stringarray_from_string(ArrayOfString &res, String &str)
Read an Array of Strings from a String.
void parse_specific_output(const MdRecord *mdd, ArrayOfIndex &output, bool &first, NamedArguments &named_args, bool call_by_name)
Parse the output WSVs for current method from the controlfile.
const Verbosity & verbosity
void parse_numeric(Numeric &n)
Use a String stream to parse a floating point number.
void parse_tasklist()
Public interface to the main function of the parser.
void read_name(String &name)
Reads name of method, keyword, or workspace variable.
void tasklist_insert_set_delete(const ArrayOfIndex &auto_vars, const Array< TokVal > &auto_vars_values, const Index method_type, Agenda &tasklist)
Insert Set and Delete methods for automatically allocated output WSVs.
void parse_generic_input(const MdRecord *&mdd, Index &id, String &methodname, ArrayOfIndex &input, ArrayOfIndex &auto_vars, Array< TokVal > &auto_vars_values, bool &first, bool &still_supergeneric, String &supergeneric_args, Index &supergeneric_index, NamedArguments &named_args, bool call_by_name)
Parse the generic input WSVs for current method from the controlfile.
vector< NamedArgument > NamedArguments
void parse_Stringvector(ArrayOfString &res)
Read a vector of Strings.
void parse_integer(Index &n)
Use a String stream to parse an integer number.
void skip_to_next_argument()
Skips forward to the next argument.
void assertain_character(char c)
Make sure that the current character is equal to c and go to the next character.
void parse_specific_input(const MdRecord *mdd, ArrayOfIndex &input, ArrayOfIndex &auto_vars, Array< TokVal > &auto_vars_values, bool &first, NamedArguments &named_args, bool call_by_name)
Parse the specific input WSVs for current method from the controlfile.
Index read_name_or_value(String &name, ArrayOfIndex &auto_vars, Array< TokVal > &auto_vars_values, const String &default_name, const MdRecord *mdd, const Index group)
Reads name of a workspace variable or a value.
void find_named_arguments(vector< NamedArgument > &named_args)
Find named arguments.
bool parse_intvector_from_string(ArrayOfIndex &res, String &str)
Read an array of integers from a String.
ArtsParser(Agenda &tasklist, String controlfile, const Verbosity &verbosity)
Constructs a new parser.
bool parse_numvector_from_string(Vector &res, String &str)
Read a vector of Numerics from a String.
bool is_whitespace(const char c)
Returns true if this character is considered whitespace.
void parse_method(Index &id, ArrayOfIndex &output, ArrayOfIndex &input, Agenda &tasks, ArrayOfIndex &auto_vars, Array< TokVal > &auto_vars_values, String &include_file, bool no_eot=false)
Parse the Contents of text as ARTS control input.
void eat_whitespace_from_string(String &str, size_t &pos)
Eats whitespace from a String.
String set_gin_to_default(const MdRecord *mdd, ArrayOfIndex &auto_vars, Array< TokVal > &auto_vars_values, Index keyword_index)
Set generic input to default value.
void parse_agenda(Agenda &tasklist, const String &agenda_name)
Parse the Contents of text as ARTS control input.
void eat_whitespace()
Eats whitespace.
void parse_main()
The main function of the parser.
void parse_String(String &res)
Reads a String, complete with quotation marks.
void get_argument_index_by_name(Index &arg_index, NamedArguments &named_args, String name)
Return the index of the argument with the given name.
void read_numeric(String &res)
Reads a floating point number.
void parse_method_args(const MdRecord *&mdd, Index &id, String &methodname, ArrayOfIndex &output, ArrayOfIndex &input, ArrayOfIndex &auto_vars, Array< TokVal > &auto_vars_values)
Parse method's argument list.
void parse_generic_output(const MdRecord *&mdd, Index &id, String &methodname, ArrayOfIndex &output, bool &first, bool &still_supergeneric, String &supergeneric_args, Index &supergeneric_index, NamedArguments &named_args, bool call_by_name)
Parse the generic output WSVs for current method from the controlfile.
void parse_numvector(Vector &res)
Read a vector of Numerics.
void read_integer(String &res)
Reads an integer.
void parse_intvector(ArrayOfIndex &res)
Read a vector of integers.
void parse_matrix(Matrix &res)
Read a Matrix.
void at_end_of_argument(const String &argname)
Check if current position in controlfile is at the end of an argument.
void resize(Index r, Index c)
Resize function.
All information for one workspace method.
const String & Name() const
const ArrayOfIndex & InOnly() const
const ArrayOfIndex & GOutType() const
const Array< String > & GInDefault() const
const ArrayOfArrayOfIndex & GInSpecType() const
const ArrayOfString & GOut() const
bool AgendaMethod() const
bool Supergeneric() const
const ArrayOfArrayOfIndex & GOutSpecType() const
const ArrayOfIndex & Out() const
const ArrayOfIndex & GInType() const
const ArrayOfString & GIn() const
Structure to hold all command line Parameters.
ArrayOfString includepath
List of paths to search for include files.
ArrayOfString datapath
List of paths to search for data files.
virtual Index line() const
virtual String file() const
virtual Index column() const
Index MarkedLine()
Return the marked line number, but for the file that is associated with the current position.
void AdvanceChar()
Advance position pointer by one character.
void AdvanceLine()
Advances position pointer by one line.
Index Line()
Return the line number, but for the file that is associated with the current position.
const String & File()
Return the filename associated with the current position.
void SetMark()
Mark current position.
void AppendFile(const String &name)
Appends contents of file to the source text.
char Current()
Return the current character.
bool & LineBreak()
Read the line break flag.
Index MarkedColumn()
Return the current marked column.
bool reachedEot()
Check if the current position reached the end.
Index Column()
Return the current column.
void Init()
This sets the pointer to the first existing character in the text.
Index LineRaw()
Return the line index.
Index ColumnRaw()
Return the column index.
void SetPosition(Index line, Index column)
Set current position.
void resize(Index n)
Resize function.
static Index add_wsv(const WsvRecord &wsv)
Append a new WSV to the workspace.
static Array< WsvRecord > wsv_data
Global WSV data.
static map< String, Index > WsvMap
Global map associated with wsv_data.
This class contains all static information for one workspace variable.
Input manipulator class for doubles to enable nan and inf parsing.
Index nelem() const
Number of elements.
#define ARTS_ASSERT(condition,...)
std::string var_string(Args &&... args)
The declarations of all the exception classes.
void get_dirname(String &dirname, const String &path)
Return the parent directory of a path.
bool find_file(ArrayOfString &matches, const String &filename, const ArrayOfString &paths, const ArrayOfString &extensions)
Searches through paths for a file with a matching name.
This file contains basic functions to handle ASCII files.
Index get_wsv_group_id(const String &name)
Returns the id of the given group.
NUMERIC Numeric
The type to use for all floating point numbers.
INDEX Index
The type to use for all integer numbers and indices.
Declaration of the class MdRecord.
Index nelem(const Lines &l)
Number of lines.
constexpr Rational end(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the largest M for a polarization type of this transition.
const Array< MdRecord > md_data_raw
Lookup information for workspace methods.
const Array< MdRecord > md_data
Lookup information for workspace methods.
const map< String, Index > MdMap
The map associated with md_data.
const map< String, Index > MdRawMap
The map associated with md_data_raw.
const ArrayOfString wsv_group_names
The names associated with Wsv groups as Strings.
constexpr int isdigit(int ch) noexcept
Parameters parameters
Holds the command line parameters.
This file contains header information for the dealing with command line parameters.
This file contains the Workspace class.
Auxiliary header stuff related to workspace variable groups.