Foam::parsing Namespace Reference

Collection of static functions and data related to parsing and an isolated namespace for lexers, parsers, scanners. More...

Classes

class  genericRagelLemonDriver
 Generic interface code for Ragel/Lemon combination Subclasses should implement one or more process() methods. More...
 

Enumerations

enum class  errorType { NONE = 0 , GENERAL = 1 , RANGE = 2 , TRAILING = 3 }
 Enumeration for possible parsing error. More...
 

Functions

errorType checkConversion (const char *buf, char *endptr)
 Sanity check after strtof, strtod, etc. More...
 

Variables

const Foam::Enum< errorTypeerrorNames
 Strings corresponding to the errorType. More...
 

Detailed Description

Collection of static functions and data related to parsing and an isolated namespace for lexers, parsers, scanners.

Source files

Enumeration Type Documentation

◆ errorType

enum class errorType
strong

Enumeration for possible parsing error.

Enumerator
NONE 

No error encountered.

GENERAL 

General parsing error.

RANGE 

Range error.

TRAILING 

Trailing content detected.

Definition at line 57 of file parsing.H.

Function Documentation

◆ checkConversion()

Foam::parsing::errorType checkConversion ( const char *  buf,
char *  endptr 
)
inline

Sanity check after strtof, strtod, etc.

Should set errno = 0 prior to the conversion.

Definition at line 28 of file parsingI.H.

References Foam::isspace().

Referenced by Foam::ScalarRead().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ errorNames

const Foam::Enum< Foam::parsing::errorType > errorNames
extern

Strings corresponding to the errorType.

Referenced by NASCore::readNasScalar(), and Foam::ScalarRead().