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  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 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 29 of file parsingI.H.

References Foam::isspace().

Referenced by Foam::readInt(), Foam::readInt32(), Foam::readInt64(), Foam::readUint32(), Foam::readUint64(), and Foam::ScalarRead().

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

Variable Documentation

◆ errorNames