MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
parser.h
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/libraries/libmbutil/parser.h,v 1.52 2017/01/12 14:44:05 masarati Exp $ */
2 /*
3  * MBDyn (C) is a multibody analysis code.
4  * http://www.mbdyn.org
5  *
6  * Copyright (C) 1996-2017
7  *
8  * Pierangelo Masarati <masarati@aero.polimi.it>
9  * Paolo Mantegazza <mantegazza@aero.polimi.it>
10  *
11  * Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
12  * via La Masa, 34 - 20156 Milano, Italy
13  * http://www.aero.polimi.it
14  *
15  * Changing this copyright notice is forbidden.
16  *
17  * This program is free software; you can redistribute it and/or modify
18  * it under the terms of the GNU General Public License as published by
19  * the Free Software Foundation (version 2 of the License).
20  *
21  *
22  * This program is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  * GNU General Public License for more details.
26  *
27  * You should have received a copy of the GNU General Public License
28  * along with this program; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */
31 
32 /* Parser per l'ingresso dati - parte generale */
33 
34 /* Si compone di tre diverse strutture di scansione,
35  * piu' le strutture di memorizzazione di stringhe e variabili.
36  *
37  * La prima struttura e' data dal LowParser, che riconosce gli elementi
38  * della sintassi. E' data da:
39  * <statement_list>::=
40  * <statement> ; <statement_list>
41  * epsilon
42  * <statement>::=
43  * <description>
44  * <description> : <arg_list>
45  * <arg_list>::=
46  * <arg>
47  * <arg> , <arg_list>
48  * <arg>::=
49  * <word>
50  * <number>
51  * ecc. ecc.
52  *
53  * La seconda struttura e' data dall'HighParser, che riconosce la sintassi
54  * vera e propria. In alternativa al LowParser, qualora sia atteso un valore
55  * numerico esprimibile mediante un'espressione regolare
56  * (espressione matematica), e' possibile invocare la terza struttura,
57  * il MathParser. Questo analizza espressioni anche complesse e multiple,
58  * se correttamente racchiuse tra parentesi.
59  *
60  * L'HighParser deve necessariamente riconoscere una parola chiave nel campo
61  * <description>, mentre puo' trovare parole qualsiasi nel campo <arg>
62  * qualora sia attesa una stringa.
63  *
64  * Le parole chiave vengono fornite all'HighParser attraverso la KeyTable,
65  * ovvero una lista di parole impaccate (senza spazi). L'uso consigliato e':
66  *
67  * const char sKeyWords[] = { "keyword0",
68  * "keyword1",
69  * "...",
70  * "keywordN"};
71  *
72  * enum KeyWords { KEYWORD0 = 0,
73  * KEYWORD1,
74  * ...,
75  * KEYWORDN,
76  * LASTKEYWORD};
77  *
78  * KeyTable K((int)LASTKEYWORD, sKeyWords);
79  *
80  * Il MathParser usa una tabella di simboli, ovvero nomi (dotati di tipo)
81  * a cui e' associato un valore. La tabella e' esterna e quindi puo' essere
82  * conservata ed utilizzata in seguito conservando in memoria i nomi
83  * definiti in precedenza.
84  *
85  * A questo punto si puo' generare la tabella dei simboli:
86  *
87  * int iSymbolTableInitialSize = 10;
88  * Table T(iSymbolTableInitialSize);
89  *
90  * Quindi si crea il MathParser:
91  *
92  * MathParser Math(T);
93  *
94  * Infine si genera l'HighParser:
95  *
96  * HighParser HP(Math, K, StreamIn);
97  *
98  * dove StreamIn e' l'istream da cui avviene la lettura.
99  */
100 
101 
102 #ifndef PARSER_H
103 #define PARSER_H
104 
105 #include <iostream>
106 #include <fstream>
107 #include <limits>
108 #include <ac/f2c.h>
109 
110 #include <string.h>
111 #include <ctype.h>
112 
113 #include <cstdlib>
114 #include <unistd.h>
115 #include <typeinfo>
116 
117 #include "myassert.h"
118 #include "input.h"
119 #include "mathp.h"
120 #include "matvec3.h"
121 #include "matvec3n.h"
122 #include "matvec6.h"
123 #include "mbsleep.h"
124 #include "ltstrcase.h"
125 
126 
127 /* Classi dichiarate */
128 class LowParser;
129 class KeyTable;
130 class HighParser;
131 
132 
133 const unsigned int iDefaultBufSize =
134 #ifdef BUFSIZ
135  BUFSIZ
136 #else /* ! BUFSIZ */
137  8192
138 #endif /* ! BUFSIZ */
139 ;
140 
141 
142 /* LowParser - begin */
143 
144 class LowParser {
145  friend class HighParser;
146 
147 public:
148  enum Token {
150 
152  COMMA = ',',
153  COLON = ':',
154  SEMICOLON = ';',
157 
159  };
160 
161 private:
165  unsigned iBufSize;
167 
168  void PackWords(InputStream& In);
169 
170 public:
171  LowParser(HighParser& hp);
172  ~LowParser(void);
174  doublereal dGetReal(void) const;
175  integer iGetInt(void) const;
176  char* sGetWord(void);
177 };
178 
179 /* LowParser - end */
180 
181 
182 /* KeyTable - begin */
183 
184 class KeyTable {
185 private:
186  char* const* sKeyWords;
187  const KeyTable *oldKey;
189 
190 public:
191  KeyTable(HighParser& hp, const char* const sTable[]);
192  virtual ~KeyTable(void);
193  int Find(const char* sToFind) const;
194 };
195 
196 /* KeyTable - end */
197 
198 
199 /* DescRead - begin */
200 
201 /* prototype of the functional object: reads a description */
202 struct DescRead {
203 public:
204  virtual ~DescRead(void);
205  virtual bool Read(HighParser& HP) = 0;
206 };
207 
208 /* description registration function: call to register one */
209 extern bool
210 SetDescData(const std::string &s, DescRead *rf);
211 
212 /* function that reads a description */
213 extern bool
214 ReadDescription(HighParser& HP, const std::string& desc);
215 
216 /* DescRead - end */
217 
218 
219 /* HighParser - begin */
220 
221 class HighParser {
222 public:
224  public:
226  };
228  public:
230  };
232  public:
234  };
236  public:
238  };
240  public:
242  };
244  public:
246  };
247  class ErrRealExpected : public MBDynErrBase {
248  public:
250  };
252  public:
254  };
256  public:
258  };
259  template <class T>
261  protected:
263 
264  public:
266  virtual ~ErrValueOutOfRange(void) throw() { NO_OP; };
267  T Get(void) const { return m_value; };
268  };
269 
270 public:
271  enum Token {
272  UNKNOWN = -1,
273 
283 
285  };
286 
287  enum Delims {
289 
296 
298  };
299 
300  const char ESCAPE_CHAR;
301 
302 public:
303  struct ErrOut {
304  const char* sFileName;
305  const char* sPathName;
306  unsigned int iLineNumber;
307  };
308 
309  struct WordSet {
310  virtual ~WordSet(void) { NO_OP; };
311  virtual bool IsWord(const std::string &s) const = 0;
312  };
313 
314  enum {
315  NONE = 0x00U,
316  EATSPACES = 0x01U,
317  ESCAPE = 0x02U,
318  LOWER = 0x04U,
319  UPPER = 0x08U
320  };
321 
322  template <class T>
323  struct range_base {
324  virtual bool check(const T& value) const { return false; };
325  };
326 
327  template <class T>
328  struct range_any : public range_base<T> {
329  virtual bool check(const T& value) const { return true; };
330  };
331 
332  template<class T>
333  struct range_ge : public range_base<T> {
335  range_ge(const T& l) : m_lower(l) { NO_OP; };
336 
337  bool check(const T& value) const {
338  return (value >= m_lower);
339  };
340  };
341 
342  template<class T>
343  struct range_gt : public range_base<T> {
345  range_gt(const T& l) : m_lower(l) { NO_OP; };
346 
347  bool check(const T& value) const {
348  return (value > m_lower);
349  };
350  };
351 
352  template<class T>
353  struct range_le : public range_base<T> {
355  range_le(const T& u) : m_upper(u) { NO_OP; };
356 
357  bool check(const T& value) const {
358  return (value <= m_upper);
359  };
360  };
361 
362  template<class T>
363  struct range_lt : public range_base<T> {
365  range_lt(const T& u) : m_upper(u) { NO_OP; };
366 
367  bool check(const T& value) const {
368  return (value < m_upper);
369  };
370  };
371 
372  template<class T>
373  struct range_2_base : public range_base<T> {
375  range_2_base(const T& l, const T& u) : m_lower(l), m_upper(u) { NO_OP; };
376  };
377 
378  template<class T>
379  struct range_ge_le : public range_2_base<T> {
380  range_ge_le(const T& l, const T& u) : range_2_base<T>(l, u) { NO_OP; };
381 
382  bool check(const T& value) const {
383  return ((value >= range_2_base<T>::m_lower) && (value <= range_2_base<T>::m_upper));
384  };
385  };
386 
387  template<class T>
388  struct range_gt_le : public range_2_base<T> {
389  range_gt_le(const T& l, const T& u) : range_2_base<T>(l, u) { NO_OP; };
390 
391  bool check(const T& value) const {
392  return ((value > range_2_base<T>::m_lower) && (value <= range_2_base<T>::m_upper));
393  };
394  };
395 
396  template<class T>
397  struct range_ge_lt : public range_2_base<T> {
398  range_ge_lt(const T& l, const T& u) : range_2_base<T>(l, u) { NO_OP; };
399 
400  bool check(const T& value) const {
401  return ((value >= range_2_base<T>::m_lower) && (value < range_2_base<T>::m_upper));
402  };
403  };
404 
405  template<class T>
406  struct range_gt_lt : public range_2_base<T> {
407  range_gt_lt(const T& l, const T& u) : range_2_base<T>(l, u) { NO_OP; };
408 
409  bool check(const T& value) const {
410  return ((value > range_2_base<T>::m_lower) && (value < range_2_base<T>::m_upper));
411  };
412  };
413 
414 protected:
415  /* Parser di basso livello, per semplice lettura dei tipi piu' comuni */
417 
418  /* Stream in ingresso */
420  std::ifstream* pf;
421 
422  /* Buffer per le stringhe */
425 
426  /* Parser delle espressioni matematiche,
427  * usato per acquisire valori sicuramente numerici */
429 
430  /* Tabella dei simboli da riconoscere; puo' essere cambiata */
431  const KeyTable* KeyT;
432 
433  /* Token di basso ed alto livello */
436 
437  virtual HighParser::Token FirstToken(void);
438  virtual void NextToken(const char* sFuncName);
439 
440  int iGetDescription_int(const char* const s);
441  virtual void Eof(void);
442 
443  virtual void
444  SetDelims(enum Delims Del, char &cLdelim, char &cRdelim) const;
445 
446  int ParseWord(unsigned flags = HighParser::NONE);
447  void PutbackWord(void);
448 
449 public:
450  HighParser(MathParser& MP, InputStream& streamIn);
451  virtual ~HighParser(void);
452  /* Attacca una nuova KeyTable (e ritorna la vecchia) */
453  virtual const KeyTable* PutKeyTable(const KeyTable& KT);
454  /* Numero di linea corrente */
455  virtual int GetLineNumber(void) const;
456  /* Numero di nome file e linea corrente */
457  virtual HighParser::ErrOut GetLineData(void) const;
458  /* Restituisce il math parser */
459  virtual MathParser& GetMathParser(void);
460  /* "Chiude" i flussi */
461  virtual void Close(void);
462  /* verifica se il token successivo e' una description (ambiguo ...) */
463  bool IsDescription(void) const;
464  /* ha appena trovato una description */
465  Token GotDescription(void);
466  /* Legge una parola chiave */
467  int GetDescription(void);
468  /* si attende una descrizione */
469  virtual void ExpectDescription(void);
470  /* si attende una lista di argomenti */
471  virtual void ExpectArg(void);
472  /* 1 se trova la keyword sKeyWord */
473  virtual bool IsKeyWord(const char* sKeyWord);
474  /* numero della keyword trovata */
475  virtual int IsKeyWord(void);
476  /* 1 se e' atteso un argomento */
477  virtual bool IsArg(void);
478  /* 1 se e' atteso un argomento */
479  virtual bool IsStringWithDelims(enum Delims Del = DEFAULTDELIM);
480  /* se l'argomento successivo e' una parola in un WordSet, la ritorna */
481  virtual const char *IsWord(const HighParser::WordSet& ws);
482  /* Se ha letto un ";" lo rimette a posto */
483  virtual void PutBackSemicolon(void);
484  /* legge un booleano con il mathpar */
485  virtual bool GetBool(bool bDefval = false);
486  /* legge un "yes"/"no" */
487  virtual bool GetYesNo(bool& bRet);
488  /* legge un "yes"/"no" o booleano con il mathpar */
489  virtual bool GetYesNoOrBool(bool bDefval = false);
490  /* legge un intero con il mathpar */
491  virtual integer GetInt(integer iDefval = 0);
492  template <class Range>
493  integer GetInt(integer iDefval, Range r);
494  /* legge un reale con il mathpar */
495  virtual doublereal GetReal(const doublereal& dDefval = 0.0);
496  template <class Range>
497  doublereal GetReal(const doublereal& dDefval, Range r);
498  /* legge una string con il mathpar */
499  virtual std::string GetString(const std::string& sDefVal);
500  /* legge un valore tipizzato con il mathpar */
501  virtual TypedValue GetValue(const TypedValue& v);
502  template <class Range>
503  TypedValue GetValue(const TypedValue& v, Range r);
504  /* legge un timeout */
505  virtual mbsleep_t GetTimeout(const mbsleep_t& DefVal);
506  /* legge una keyword */
507  virtual int GetWord(void);
508  /* legge una stringa */
509  virtual const char* GetString(unsigned flags = HighParser::NONE);
510  /* stringa delimitata */
511  virtual const char* GetStringWithDelims(enum Delims Del = DEFAULTDELIM, bool escape = true);
512 };
513 
514 /* Le funzioni:
515  * ExpectDescription()
516  * ExpectArg()
517  * informano il parser di cio' che e' atteso; di default il costruttore
518  * setta ExpectDescription().
519  *
520  * Le funzioni:
521  * GetDescription()
522  * IsKeyWord()
523  * GetWord()
524  * restituiscono un intero che corrisponde alla posizione occupata nella
525  * KeyTable dalle parole corrispondenti, oppure -1 se la parola non e'
526  * trovata. Si noti che IsKeyWord(), in caso di esito negativo, ripristina
527  * l'istream. Tutte preparano poi il parser per la lettura successiva.
528  *
529  * La funzione
530  * IsKeyWord(const char*)
531  * restituisce 0 se non trova la parola e ripristina l'istream, altrimenti
532  * restituisce 1 e prepara il parser alla lettura successiva.
533  *
534  * Le funzioni
535  * GetInt(),
536  * GetReal(),
537  * GetString(),
538  * GetStringWithDelims(enum Delims)
539  * restituiscono i valori attesi e preparano il prser alla lettura successiva.
540  */
541 
542 /* HighParser - end */
543 
544 extern std::ostream&
545 operator << (std::ostream& out, const HighParser::ErrOut& err);
546 
547 extern HighParser::ErrOut
548 mbdyn_get_line_data(void);
549 
550 extern std::ostream&
551 mbdyn_print_line_data(std::ostream& out);
552 
553 template <class Range>
554 integer
555 HighParser::GetInt(int iDefVal, Range range)
556 {
557  TypedValue v(iDefVal);
558  v = GetValue(v);
559  integer val = v.GetInt();
560  if (!range.check(val)) {
562  }
563  return val;
564 }
565 
566 
567 template <class Range>
569 HighParser::GetReal(const doublereal& dDefVal, Range range)
570 {
571  TypedValue v(dDefVal);
572  v = GetValue(v);
573  doublereal val = v.GetReal();
574  if (!range.check(val)) {
576  }
577  return val;
578 }
579 
580 template <class Range>
582 HighParser::GetValue(const TypedValue& vDefVal, Range range)
583 {
584  const char sFuncName[] = "HighParser::GetValue()";
585 
586  if (CurrToken != HighParser::ARG) {
587  silent_cerr("Parser error in " << sFuncName << ", arg expected at line "
588  << GetLineData() << std::endl);
590  }
591 
592  TypedValue v(vDefVal);
593 
594  try {
595  v = MathP.Get(*pIn, v);
596  }
597  catch (TypedValue::ErrWrongType& e) {
598  silent_cerr(sFuncName << ": " << e.what() << " at line "
599  << GetLineData() << std::endl);
600  throw e;
601  }
602  catch (MathParser::ErrGeneric& e) {
603  silent_cerr(sFuncName << ": error return from MathParser at line "
604  << GetLineData() << std::endl);
605  throw e;
606  }
607  catch (...) {
608  throw;
609  }
610 
611  NextToken(sFuncName);
612 
613  if (!range.check(v)) {
615  }
616 
617  return v;
618 }
619 
620 #endif /* PARSER_H */
621 
char * sCurrWordBuf
Definition: parser.h:164
const char * sFileName
Definition: parser.h:304
const char ESCAPE_CHAR
Definition: parser.h:300
Real Get(Real d=0.)
Definition: mathp.cc:4496
range_ge_le(const T &l, const T &u)
Definition: parser.h:380
void PutbackWord(void)
Definition: parser.cc:899
Real GetReal(void) const
Definition: mathp.cc:1228
char * sGetWord(void)
Definition: parser.cc:244
bool check(const T &value) const
Definition: parser.h:391
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
virtual integer GetInt(integer iDefval=0)
Definition: parser.cc:1050
ErrIllegalDelimiter(const char *file, int line, const char *func, const std::string r=std::string())
Definition: parser.h:257
range_le(const T &u)
Definition: parser.h:355
range_ge(const T &l)
Definition: parser.h:335
bool IsDescription(void) const
Definition: parser.cc:692
#define MBDYN_EXCEPT_ARGS_PASSTHRU
Definition: except.h:55
virtual const char * IsWord(const HighParser::WordSet &ws)
Definition: parser.cc:977
virtual void ExpectArg(void)
Definition: parser.cc:798
unsigned int iLineNumber
Definition: parser.h:306
virtual bool check(const T &value) const
Definition: parser.h:324
const KeyTable * oldKey
Definition: parser.h:187
virtual ~KeyTable(void)
Definition: parser.cc:262
LowParser(HighParser &hp)
Definition: parser.cc:132
virtual bool GetBool(bool bDefval=false)
Definition: parser.cc:1010
unsigned long mbsleep_t
Definition: mbsleep.h:51
const char * what(void) const
Definition: except.cc:54
bool check(const T &value) const
Definition: parser.h:409
virtual HighParser::ErrOut GetLineData(void) const
Definition: parser.cc:681
ErrStringExpected(const char *file, int line, const char *func, const std::string r=std::string())
Definition: parser.h:253
bool check(const T &value) const
Definition: parser.h:400
std::ifstream * pf
Definition: parser.h:420
enum Token CurrToken
Definition: parser.h:163
#define MBDYN_EXCEPT_ARGS_DECL
Definition: except.h:43
HighParser(MathParser &MP, InputStream &streamIn)
Definition: parser.cc:622
ErrKeyWordExpected(const char *file, int line, const char *func, const std::string r=std::string())
Definition: parser.h:229
Token CurrToken
Definition: parser.h:435
virtual ~HighParser(void)
Definition: parser.cc:639
#define MBDYN_EXCEPT_ARGS_NOOPT_PASSTHRU
Definition: except.h:53
virtual void Close(void)
Definition: parser.cc:651
#define NO_OP
Definition: myassert.h:74
integer iGetInt(void) const
Definition: parser.cc:237
virtual ~WordSet(void)
Definition: parser.h:310
virtual void Eof(void)
Definition: parser.cc:724
ErrColonExpected(const char *file, int line, const char *func, const std::string r=std::string())
Definition: parser.h:237
char sStringBufWithSpaces[iDefaultBufSize]
Definition: parser.h:424
Token GotDescription(void)
Definition: parser.cc:698
~LowParser(void)
Definition: parser.cc:138
virtual bool GetYesNoOrBool(bool bDefval=false)
Definition: parser.cc:1038
bool check(const T &value) const
Definition: parser.h:382
virtual TypedValue GetValue(const TypedValue &v)
Definition: parser.cc:1004
ErrMissingSeparator(const char *file, int line, const char *func, const std::string r=std::string())
Definition: parser.h:241
bool check(const T &value) const
Definition: parser.h:357
virtual void ExpectDescription(void)
Definition: parser.cc:789
range_gt_le(const T &l, const T &u)
Definition: parser.h:389
bool SetDescData(const std::string &s, DescRead *rf)
Definition: parser.cc:301
std::ostream & operator<<(std::ostream &out, const HighParser::ErrOut &err)
Definition: parser.cc:1372
LowParser LowP
Definition: parser.h:416
bool check(const T &value) const
Definition: parser.h:337
virtual bool check(const T &value) const
Definition: parser.h:329
range_gt_lt(const T &l, const T &u)
Definition: parser.h:407
virtual const KeyTable * PutKeyTable(const KeyTable &KT)
Definition: parser.cc:658
int Find(const char *sToFind) const
Definition: parser.cc:271
Token GetToken(InputStream &In)
Definition: parser.cc:189
range_gt(const T &l)
Definition: parser.h:345
LowParser::Token CurrLowToken
Definition: parser.h:434
virtual bool Read(HighParser &HP)=0
int GetDescription(void)
Definition: parser.cc:730
virtual ~DescRead(void)
Definition: parser.cc:336
bool ReadDescription(HighParser &HP, const std::string &desc)
Definition: parser.cc:310
virtual const char * GetStringWithDelims(enum Delims Del=DEFAULTDELIM, bool escape=true)
Definition: parser.cc:1228
ErrSemicolonExpected(const char *file, int line, const char *func, const std::string r=std::string())
Definition: parser.h:233
HighParser & HP
Definition: parser.h:162
const KeyTable * KeyT
Definition: parser.h:431
bool check(const T &value) const
Definition: parser.h:347
const unsigned int iDefaultBufSize
Definition: parser.h:133
void PackWords(InputStream &In)
Definition: parser.cc:146
ErrInvalidCallToGetDescription(const char *file, int line, const char *func, const std::string r=std::string())
Definition: parser.h:225
virtual MathParser & GetMathParser(void)
Definition: parser.cc:668
virtual mbsleep_t GetTimeout(const mbsleep_t &DefVal)
Definition: parser.cc:1062
virtual HighParser::Token FirstToken(void)
Definition: parser.cc:767
unsigned iBufSize
Definition: parser.h:165
MathParser & MathP
Definition: parser.h:428
virtual bool IsWord(const std::string &s) const =0
range_ge_lt(const T &l, const T &u)
Definition: parser.h:398
ErrIntegerExpected(const char *file, int line, const char *func, const std::string r=std::string())
Definition: parser.h:245
ErrRealExpected(const char *file, int line, const char *func, const std::string r=std::string())
Definition: parser.h:249
KeyTable(HighParser &hp, const char *const sTable[])
Definition: parser.cc:254
virtual ~ErrValueOutOfRange(void)
Definition: parser.h:266
virtual std::string GetString(const std::string &sDefVal)
Definition: parser.cc:1074
virtual bool GetYesNo(bool &bRet)
Definition: parser.cc:1022
virtual bool IsArg(void)
Definition: parser.cc:807
virtual int IsKeyWord(void)
Definition: parser.cc:940
doublereal dGetReal(void) const
Definition: parser.cc:230
virtual void NextToken(const char *sFuncName)
Definition: parser.cc:822
HighParser & HP
Definition: parser.h:188
virtual bool IsStringWithDelims(enum Delims Del=DEFAULTDELIM)
Definition: parser.cc:1210
HighParser::ErrOut mbdyn_get_line_data(void)
Definition: parser.cc:603
virtual int GetWord(void)
Definition: parser.cc:1083
InputStream * pIn
Definition: parser.h:419
range_lt(const T &u)
Definition: parser.h:365
int iGetDescription_int(const char *const s)
Definition: parser.cc:704
ErrValueOutOfRange(const char *file, int line, const char *func, T value)
Definition: parser.h:265
doublereal dCurrNumber
Definition: parser.h:166
virtual int GetLineNumber(void) const
Definition: parser.cc:674
virtual void SetDelims(enum Delims Del, char &cLdelim, char &cRdelim) const
Definition: parser.cc:1173
range_2_base(const T &l, const T &u)
Definition: parser.h:375
char *const * sKeyWords
Definition: parser.h:186
char sStringBuf[iDefaultBufSize]
Definition: parser.h:423
#define MBDYN_EXCEPT_ARGS_DECL_NOOPT
Definition: except.h:41
Int GetInt(void) const
Definition: mathp.cc:1209
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
virtual void PutBackSemicolon(void)
Definition: parser.cc:813
int ParseWord(unsigned flags=HighParser::NONE)
Definition: parser.cc:843
bool check(const T &value) const
Definition: parser.h:367
const char * sPathName
Definition: parser.h:305
std::ostream & mbdyn_print_line_data(std::ostream &out)
Definition: parser.cc:613
virtual doublereal GetReal(const doublereal &dDefval=0.0)
Definition: parser.cc:1056