39 : mtasklist(tasklist),
42 verbosity(rverbosity) {
71 <<
"Mixing positional and named arguments is not allowed.";
81 named_args.push_back(current_argument);
92 Index bracket_level = 0;
93 bool inside_quotes =
false;
98 while ((bracket_level || inside_quotes) ||
107 if (bracket_level < 0)
114 if (prev_char !=
'\\') inside_quotes = !inside_quotes;
123 }
catch (
const Eot& x) {
126 "Unexpectedly reached end of file.\nProbably a runaway argument.",
136 }
catch (
const Eot& x) {
158 os <<
"Expected ',' or ')' but found '" <<
msource.
Current() <<
"' after " 172 for (arg_index = 0; arg_index < (
Index)named_args.size(); arg_index++) {
173 if (named_args[(
size_t)arg_index].name == name)
return;
203 out3 <<
"\nParsing control text:\n";
217 if (
"Arts" !=
md_data[
id].Name() &&
"Arts2" !=
md_data[
id].Name()) {
219 os <<
"The outermost agenda must be Arts2!\n" 220 <<
"(But it seems to be " <<
md_data[id].Name() <<
".)\n";
230 }
catch (
const Eot&) {
235 os <<
"Unexpected character(s) at the end of the control file\n";
236 os <<
"after the main agenda was already closed.\n";
237 os <<
"File: " << x.
file() <<
'\n';
238 os <<
"Line: " << x.
line() <<
'\n';
239 os <<
"Column: " << x.
column() <<
'\n';
240 throw runtime_error(os.
str());
242 }
catch (
const Eot& x) {
245 os <<
"Unexpected end of control script.\n";
246 os <<
"File: " << x.
file() <<
'\n';
247 os <<
"Line: " << x.
line() <<
'\n';
248 throw runtime_error(os.
str());
252 os <<
"Unexpected character:\n";
253 os << x.what() <<
'\n';
254 os <<
"File: " << x.
file() <<
'\n';
255 os <<
"Line: " << x.
line() <<
'\n';
256 os <<
"Column: " << x.
column() <<
'\n';
257 throw runtime_error(os.
str());
261 os <<
"Illegal Line break:\n";
262 os << x.what() <<
'\n';
263 os <<
"File: " << x.
file() <<
'\n';
264 os <<
"Line: " << x.
line() <<
'\n';
265 throw runtime_error(os.
str());
271 os <<
"Unknown Method:\n";
272 os << x.what() <<
'\n';
273 os <<
"File: " << x.
file() <<
'\n';
274 os <<
"Line: " << x.
line() <<
'\n';
275 os <<
"Column: " << x.
column() <<
'\n';
276 throw runtime_error(os.
str());
282 os <<
"Unknown workspace variable:\n";
283 os << x.what() <<
'\n';
284 os <<
"File: " << x.
file() <<
'\n';
285 os <<
"Line: " << x.
line() <<
'\n';
286 os <<
"Column: " << x.
column() <<
'\n';
287 throw runtime_error(os.
str());
291 os <<
"Attempt to create a workspace variable that already exists:\n";
292 os << x.what() <<
'\n';
293 os <<
"File: " << x.
file() <<
'\n';
294 os <<
"Line: " << x.
line() <<
'\n';
295 os <<
"Column: " << x.
column() <<
'\n';
296 throw runtime_error(os.
str());
302 os <<
"Workspace variable belongs to the wrong group:\n";
303 os << x.what() <<
'\n';
304 os <<
"File: " << x.
file() <<
'\n';
305 os <<
"Line: " << x.
line() <<
'\n';
306 os <<
"Column: " << x.
column() <<
'\n';
307 throw runtime_error(os.
str());
311 os <<
"Parse error:\n";
312 os << x.what() <<
'\n';
313 os <<
"File: " << x.
file() <<
'\n';
314 os <<
"Line: " << x.
line() <<
'\n';
315 os <<
"Column: " << x.
column() <<
'\n';
316 throw runtime_error(os.
str());
357 id, output, input, tasks, auto_vars, auto_vars_values, include_file);
368 if (includedir.
nelem()) {
369 if (current_includepath.
nelem() && current_includepath[0] != includedir)
370 current_includepath.insert(current_includepath.begin(), includedir);
376 find_file(matching_files, include_file, current_includepath);
377 find_file(matching_files, include_file +
".arts", current_includepath);
379 if (!matching_files.
nelem()) {
381 os <<
"Cannot find include file " << include_file <<
".\n";
383 os <<
"Search path was: " << current_includepath <<
"\n";
388 include_file = matching_files[0];
389 out2 <<
"- Including control file " << include_file <<
"\n";
400 MRecord(
id, output, input, auto_vars_values[0], tasks));
414 if (mname.length() > 6 && mname.find(
"Create") == mname.length() - 6 &&
416 if (agenda_name !=
"Arts2") {
418 os << mname <<
" cannot be called inside an agenda.\n" 419 <<
"All workspace variables are global and must be created at the top level.";
428 map<String, Index>::const_iterator mdit;
429 mdit =
MdMap.find(method_name);
430 assert(mdit !=
MdMap.end());
441 out3 <<
"- " <<
md_data[id].Name() <<
"\n";
512 bool found_curly_brace =
false;
520 auto_vars_values.resize(0);
526 if (methodname ==
"INCLUDE") {
534 if (methodname ==
"Arts2") {
536 }
else if (methodname ==
"Arts") {
538 "Arts version 1 controlfiles are no longer supported.");
544 mdd,
id, methodname, output, input, auto_vars, auto_vars_values);
552 found_curly_brace =
true;
559 out3 <<
"- " << mdd->
Name() <<
"\n";
568 os <<
"Expected method name , but got `" <<
msource.
Current() <<
"'.";
578 if (found_curly_brace) {
581 }
catch (
const Eot& x) {
583 if (!no_eot)
throw Eot(x);
612 <<
"\nParse error in default value for generic input variable.\n" 613 <<
"This is not a user error but a bug in methods.cc.\n" 614 <<
"Please contact the ARTS developers.";
627 if (is.bad() || is.fail()) failed =
true;
633 if (is.bad() || is.fail()) failed =
true;
643 os << p.what() << os_default_error.
str();
656 os << p.what() << os_default_error.
str();
669 os << p.what() << os_default_error.
str();
676 os <<
"Default values for generic inputs with type " 678 <<
" are not supported.\n" 679 <<
"Either remove the default value for generic input '" 680 << mdd->
GIn()[gin_index] <<
"' in workspace method\n" 681 <<
"*" << mdd->
Name() <<
"* in methods.cc or discuss this " 682 <<
"issue on the arts-dev mailing list.\n";
693 name =
"auto_" + mdd->
Name() +
"_" +
"gin" + os.
str() +
"_" +
694 mdd->
GIn()[gin_index];
700 "Automatically allocated variable.",
704 wsvid = wsvit->second;
707 auto_vars.push_back(wsvid);
708 auto_vars_values.push_back(tv);
712 os <<
"Failed to assign default value for generic '" 713 << mdd->
GIn()[gin_index] <<
"'.\n" 714 <<
"Check the documentation of workspace method *" << mdd->
Name()
721 os <<
"Generic input '" << mdd->
GIn()[gin_index]
722 <<
"' omitted but no default value found.\n" 723 <<
"Check the documentation of workspace method *" << mdd->
Name()
758 bool still_supergeneric =
true;
763 const map<String, Index>::const_iterator md_raw_id =
771 id = md_raw_id->second;
782 const map<String, Index>::const_iterator i2 =
MdMap.find(methodname);
783 assert(i2 !=
MdMap.end());
788 still_supergeneric =
false;
793 Index supergeneric_index = -1;
795 Index this_method_end_line = -1;
796 Index this_method_end_column = -1;
797 bool call_by_name =
false;
828 bool is_first_arg =
true;
830 mdd, output, is_first_arg, named_arguments, call_by_name);
871 if (call_by_name && named_arguments.size()) {
874 os <<
"Error in arguments passed to " << mdd->
Name() <<
":\n";
875 for (
auto& argument_name : named_arguments) {
876 if (std::find(mdd->
GIn().begin(),
878 argument_name.name) == mdd->
GIn().end() &&
879 std::find(mdd->
GOut().begin(),
881 argument_name.name) == mdd->
GOut().end())
882 os <<
" Unkown argument: ";
884 os <<
" Duplicate argument: ";
885 os << argument_name.name << std::endl;
891 assert(!still_supergeneric);
896 os <<
"This method has generic output. " 897 <<
"You have to pass a variable!";
907 for (ArrayOfIndex::const_iterator outs = vo.begin(); outs < vo.end();
909 output.push_back(*outs);
913 for (ArrayOfIndex::const_iterator ins = vi.begin(); ins < vi.end(); ++ins) {
914 input.push_back(*ins);
920 bool all_gin_have_defaults =
true;
921 for (
Index gin = 0; all_gin_have_defaults && gin < mdd->
GIn().
nelem();
927 all_gin_have_defaults =
false;
933 const map<String, Index>::const_iterator wsvit =
942 wsvid = wsvit->second;
944 input.push_back(wsvid);
948 if (!all_gin_have_defaults) {
950 os <<
"Not all generic inputs of the method *" << methodname
951 <<
"* have default values, you have to specify them!";
984 bool& still_supergeneric,
985 String& supergeneric_args,
997 Index this_arg_index = 0;
1002 if (this_arg_index != -1) {
1004 named_args[this_arg_index].column);
1005 named_args.erase(named_args.begin() + this_arg_index);
1019 if ((call_by_name && this_arg_index == -1) ||
msource.
Current() ==
',' ||
1028 "generic" + os.
str(),
1034 "Unexpected '=' sign encountered.\n" 1035 "Mixing positional and named arguments is not allowed.",
1041 "Only constants can be passed to Set methods.\n" 1042 "You might want to use the *Copy* here.",
1052 const map<String, Index>::const_iterator wsvit =
1059 wsvid = wsvit->second;
1065 if (still_supergeneric) {
1068 supergeneric_args +=
1070 os << mdd->
Name() <<
"_sg_" << supergeneric_args;
1071 methodname = os.
str();
1074 const map<String, Index>::const_iterator mdit =
MdMap.find(methodname);
1075 if (mdit !=
MdMap.end()) {
1080 still_supergeneric =
false;
1091 if (supergeneric_index == -1) {
1092 bool wrong_group_id =
true;
1096 wrong_group_id =
false;
1097 supergeneric_index =
i;
1101 if (wrong_group_id) {
1103 bool firsttype =
true;
1113 "*" + mdd->
Name() +
"* is not defined for " +
1115 " input. Check the online docs.",
1124 wsvname +
" is not " +
1143 input.push_back(wsvid);
1168 bool& still_supergeneric,
1169 String& supergeneric_args,
1170 Index& supergeneric_index,
1172 bool call_by_name) {
1182 Index this_arg_index;
1186 if (this_arg_index == -1) {
1188 os <<
"This method has generic output. " 1189 <<
"You have to pass a variable!";
1195 named_args[this_arg_index].column);
1196 named_args.erase(named_args.begin() + this_arg_index);
1212 map<String, Index>::const_iterator wsvit =
1215 if (still_supergeneric) {
1217 os <<
"This might be either a typo or you have to create " 1218 <<
"the variable\nby calling TYPECreate(" << wsvname
1219 <<
") first. Replace TYPE with the\n" 1220 <<
"WSV group your variable should belong to.";
1225 if (mdd->
Name().length() <= 6 ||
1226 mdd->
Name().substr(mdd->
Name().length() - 6) !=
"Create") {
1228 os <<
"This might be either a typo or you have to create " 1229 <<
"the variable\nby calling " 1238 "Automatically allocated variable.",
1246 if (mdd->
Name().length() > 6 &&
1247 mdd->
Name().find(
"Create") == mdd->
Name().length() - 6) {
1250 <<
" already exists. A variable can only be created once.\n";
1254 wsvid = wsvit->second;
1262 if (still_supergeneric) {
1265 supergeneric_args +=
1267 os << mdd->
Name() <<
"_sg_" << supergeneric_args;
1268 methodname = os.
str();
1271 const map<String, Index>::const_iterator mdit =
MdMap.find(methodname);
1272 if (mdit !=
MdMap.end()) {
1277 still_supergeneric =
false;
1288 if (supergeneric_index == -1) {
1289 bool wrong_group_id =
true;
1293 wrong_group_id =
false;
1294 supergeneric_index =
i;
1298 if (wrong_group_id) {
1300 bool firsttype =
true;
1310 "*" + mdd->
Name() +
"* is not defined for " +
1312 " output. Check the online docs.",
1321 wsvname +
" is not " +
1340 output.push_back(wsvid);
1364 bool call_by_name) {
1374 for (ArrayOfIndex::const_iterator ins = vi.begin(); ins < vi.end(); ++ins) {
1378 Index this_arg_index;
1384 if (this_arg_index != -1) {
1386 named_args[this_arg_index].column);
1387 named_args.erase(named_args.begin() + this_arg_index);
1421 const map<String, Index>::const_iterator wsvit =
1427 wsvid = wsvit->second;
1434 wsvname +
" is not " +
1442 input.push_back(wsvid);
1462 bool call_by_name) {
1470 for (ArrayOfIndex::const_iterator outs = vo.begin(); outs < vo.end();
1475 Index this_arg_index = 0;
1481 if (this_arg_index != -1) {
1483 named_args[this_arg_index].column);
1484 named_args.erase(named_args.begin() + this_arg_index);
1511 map<String, Index>::const_iterator wsvit =
1514 if (mdd->
Name().length() > 6 &&
1515 mdd->
Name().substr(mdd->
Name().length() - 6) !=
"Create") {
1517 os <<
"This might be either a typo or you have to create " 1518 <<
"the variable\nby calling " 1520 <<
"Create( " << wsvname <<
" ) first.\n";
1527 "Automatically allocated variable.",
1533 if (wsvid == -1) wsvid = wsvit->second;
1540 wsvname +
" is not " +
1548 output.push_back(wsvid);
1570 const Index method_type,
1576 map<String, Index>::const_iterator mdit;
1578 TokVal auto_keyword_value;
1594 <<
" constant to a WSM is not supported!";
1600 switch (method_type) {
1602 auto_keyword_value = auto_vars_values[
i];
1603 auto_output_var.push_back(auto_vars[
i]);
1608 auto_input_var.push_back(auto_vars[i]);
1620 mdit =
MdMap.find(method_name);
1621 assert(mdit !=
MdMap.end());
1622 init_mdid = mdit->second;
1680 os <<
"Expected whitespace, but got `" << dummy <<
"'.";
1695 while (pos < str.length() &&
is_whitespace(str[pos])) pos++;
1715 os <<
"Workspace variable names must start with a letter!";
1723 if (isalnum(dummy) ||
'_' == dummy) {
1757 const String& default_name,
1759 const Index group) {
1769 os <<
"Passing constants as supergeneric arguments is not supported.";
1780 name =
"auto_" + mdd->
Name() +
"_" + default_name;
1784 name.c_str(),
"Automatically allocated variable.", group,
true));
1786 wsvid = wsvit->second;
1789 auto_vars.push_back(wsvid);
1796 auto_vars_values.push_back(dummy);
1800 auto_vars_values.push_back(n);
1804 auto_vars_values.push_back(n);
1808 auto_vars_values.push_back(dummy);
1812 auto_vars_values.push_back(dummy);
1816 auto_vars_values.push_back(dummy);
1820 auto_vars_values.push_back(dummy);
1841 os <<
"Expected '" << c <<
"', but got '" <<
msource.
Current() <<
"'.";
1908 if (
'+' == dummy ||
'-' == dummy) {
1920 os <<
"Expected digit or variable name, but got `" <<
msource.
Current()
1928 if (isdigit(chtmp)) {
1960 bool found_digit =
false;
1964 if (
'+' == dummy ||
'-' == dummy) {
1978 if (isdigit(chtmp)) {
2009 if (isdigit(chtmp)) {
2023 throw ParseError(
"Expected at least one digit.",
2030 if (
'e' == dummy ||
'E' == dummy) {
2107 res.push_back(dummy);
2148 res.push_back(dummy);
2193 tres.push_back(dummy);
2199 for (
int i = 0;
i < tres.
nelem();
i++) {
2233 Index cur_ncols = 0;
2246 if (ncols != -1 && cur_ncols > ncols) {
2249 <<
"'. Check Matrix dimensions.";
2259 }
else if (ncols != cur_ncols) {
2262 <<
"'. Check Matrix dimensions.";
2271 if (ncols > cur_ncols) c =
',';
2274 <<
"'. Check Matrix dimensions.";
2281 tres.push_back(dummy);
2285 if (ncols == -1) ncols = cur_ncols;
2286 if (ncols != cur_ncols) {
2287 throw ParseError(
"Missing element(s) in last row of matrix",
2294 res.
resize(nrows, ncols);
2296 for (
Index j = 0; j < ncols; j++) res(
i, j) = tres[
i * ncols + j];
2319 if (str[pos] !=
'[') {
2320 throw ParseError(
"No opening bracket found while parsing ArrayOfIndex.",
2332 while (pos < str.length() && str[pos] !=
']') {
2336 if (str[pos] !=
',') {
2346 if (is.bad() || is.fail())
return false;
2347 tres.push_back(dummy);
2348 while (pos < str.length() &&
2349 (isdigit(str[pos]) || str[pos] ==
'-' || str[pos] ==
'e'))
2355 res.resize(tres.
nelem());
2356 for (
int i = 0;
i < tres.
nelem();
i++) {
2381 if (str[pos] !=
'[') {
2382 throw ParseError(
"No opening bracket found while parsing Vector.",
2394 while (pos < str.length() && str[pos] !=
']') {
2398 if (str[pos] !=
',') {
2408 if (is.bad() || is.fail())
return false;
2409 tres.push_back(dummy);
2410 if (str[pos] ==
'N' && str.find(
"NaN", pos) == pos) {
2413 while (pos < str.length() && (isdigit(str[pos]) || str[pos] ==
'-' ||
2414 str[pos] ==
'.' || str[pos] ==
'e'))
2422 for (
int i = 0;
i < tres.
nelem();
i++) {
2449 if (str[pos] !=
'[') {
2450 throw ParseError(
"No opening bracket found while parsing ArrayOfString.",
2462 while (pos < str.length() && str[pos] !=
']') {
2466 if (str[pos] !=
',') {
2473 if (str[pos] !=
'"') {
2474 throw ParseError(
"Expected quotes while parsing ArrayOfString.",
2483 while (pos < str.length() && str[pos] !=
'"') {
2488 if (pos == str.length() || str[pos] !=
'"')
return false;
2490 tres.push_back(dummy);
2496 res.resize(tres.
nelem());
2497 for (
int i = 0;
i < tres.
nelem();
i++) {
const String & File()
Return the filename associated with the current position.
Index get_wsv_group_id(const String &name)
Returns the id of the given group.
INDEX Index
The type to use for all integer numbers and indices.
static Array< WsvRecord > wsv_data
Global WSV data.
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.
virtual Index line() const
bool parse_stringarray_from_string(ArrayOfString &res, String &str)
Read an Array of Strings from a String.
bool find_file(ArrayOfString &matches, const String &filename, const ArrayOfString &paths, const ArrayOfString &extensions)
Searches through paths for a file with a matching name.
void at_end_of_argument(const String &argname)
Check if current position in controlfile is at the end of an argument.
void find_named_arguments(vector< NamedArgument > &named_args)
Find named arguments.
Index nelem() const
Number of elements.
virtual String file() const
bool parse_numvector_from_string(Vector &res, String &str)
Read a vector of Numerics from a String.
bool AgendaMethod() const
void parse_tasklist()
Public interface to the main function of the parser.
void SetMark()
Mark current position.
const ArrayOfIndex & Out() const
Index MarkedLine()
Return the marked line number, but for the file that is associated with the current position...
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 resize(Index n)
Resize the method list.
void get_dirname(String &dirname, const String &path)
Return the parent directory of a path.
ArtsParser(Agenda &tasklist, String controlfile, const Verbosity &verbosity)
Constructs a new parser.
const map< String, Index > MdRawMap
The map associated with md_data_raw.
This file contains basic functions to handle ASCII files.
Structure to hold all command line Parameters.
All information for one workspace method.
bool Supergeneric() const
void AdvanceChar()
Advance position pointer by one character.
char Current()
Return the current character.
const String & Name() const
vector< NamedArgument > NamedArguments
ArrayOfString includepath
List of paths to search for include files.
void parse_String(String &res)
Reads a String, complete with quotation marks.
const map< String, Index > MdMap
The map associated with md_data.
void parse_numvector(Vector &res)
Read a vector of Numerics.
void parse_integer(Index &n)
Use a String stream to parse an integer number.
const ArrayOfString & GOut() const
This file contains the Workspace class.
ArrayOfString datapath
List of paths to search for data files.
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.
const Array< String > & GInDefault() const
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.
The global header file for ARTS.
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_numeric(Numeric &n)
Use a String stream to parse a floating point number.
Parameters parameters
Holds the command line parameters.
void parse_main()
The main function of the parser.
_CS_string_type str() const
void skip_to_next_argument()
Skips forward to the next argument.
void parse_agenda(Agenda &tasklist, const String &agenda_name)
Parse the Contents of text as ARTS control input.
void AppendFile(const String &name)
Appends contents of file to the source text.
void eat_whitespace_from_string(String &str, size_t &pos)
Eats whitespace from a String.
The declarations of all the exception classes.
void eat_whitespace()
Eats whitespace.
const ArrayOfArrayOfIndex & GInSpecType() const
NUMERIC Numeric
The type to use for all floating point numbers.
Index nelem() const
Number of elements.
void read_integer(String &res)
Reads an integer.
void Init()
This sets the pointer to the first existing character in the text.
void SetPosition(Index line, Index column)
Set current position.
Index nelem() const
Return the number of agenda elements.
bool & LineBreak()
Read the line break flag.
void assertain_character(char c)
Make sure that the current character is equal to c and go to the next character.
Index MarkedColumn()
Return the current marked column.
void parse_intvector(ArrayOfIndex &res)
Read a vector of integers.
const ArrayOfIndex & InOnly() const
void read_name(String &name)
Reads name of method, keyword, or workspace variable.
const ArrayOfIndex & GOutType() const
Index ColumnRaw()
Return the column index.
const ArrayOfString wsv_group_names
The names associated with Wsv groups as Strings.
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 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.
static map< String, Index > WsvMap
Global map associated with wsv_data.
void resize(Index n)
Resize function.
static Index add_wsv(const WsvRecord &wsv)
Append a new WSV to the workspace.
const Array< MRecord > & Methods() const
bool is_whitespace(const char c)
Returns true if this character is considered whitespace.
const Verbosity & verbosity
void parse_matrix(Matrix &res)
Read a Matrix.
Index nelem(const Lines &l)
Number of lines.
void get_argument_index_by_name(Index &arg_index, NamedArguments &named_args, String name)
Return the index of the argument with the given name.
virtual Index column() const
bool reachedEot()
Check if the current position reached the end.
const ArrayOfArrayOfIndex & GOutSpecType() const
const Array< MdRecord > md_data
Lookup information for workspace methods.
const ArrayOfIndex & GInType() const
Index LineRaw()
Return the line index.
This class contains all static information for one workspace variable.
This file contains header information for the dealing with command line parameters.
constexpr Rational end(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the largest M for a polarization type of this transition.
void AdvanceLine()
Advances position pointer by one line.
Index Column()
Return the current column.
void parse_Stringvector(ArrayOfString &res)
Read a vector of Strings.
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.
This stores arbitrary token values and remembers the type.
Index Line()
Return the line number, but for the file that is associated with the current position.
bool parse_intvector_from_string(ArrayOfIndex &res, String &str)
Read an array of integers 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.
void read_numeric(String &res)
Reads a floating point number.
Input manipulator class for doubles to enable nan and inf parsing.
Declaration of the class MdRecord.
const ArrayOfString & GIn() const
const Array< MdRecord > md_data_raw
Lookup information for workspace methods.
void resize(Index r, Index c)
Resize function.
Auxiliary header stuff related to workspace variable groups.
void push_back(const MRecord &n)
Append a new method to end of list.