Cloudy
Spectral Synthesis Code for Astrophysics
Loading...
Searching...
No Matches
parser.cpp File Reference
#include "cddefines.h"
#include "parser.h"
#include "called.h"
#include "flux.h"
#include "input.h"
#include "elementnames.h"
#include "service.h"
#include "depth_table.h"
#include "lines.h"
#include <deque>
Include dependency graph for parser.cpp:

Typedefs

typedef std::map< string, double > symtab
 

Functions

STATIC bool ParseExpr (deque< Token > &chTokens, vector< double > &valstack, const symtab &tab)
 
STATIC bool matchKey (const string &read, const string &expected, size_t nmin=4)
 
const char * nWord (const char *chKey, const char *chCard)
 
bool isBoundaryChar (char c)
 
bool isSeparatorChar (char c)
 
STATIC bool ParseNumber (deque< Token > &chTokens, vector< double > &valstack, const symtab &tab)
 
STATIC bool doop (vector< double > &valstack, const string &op)
 
STATIC bool ParseExp (deque< Token > &chTokens, vector< double > &valstack, const symtab &tab)
 
STATIC bool ParseProduct (deque< Token > &chTokens, vector< double > &valstack, const symtab &tab)
 
string getCommandToken (const string &card)
 
Symbol maybeNumber (bool numOK, const Symbol &s)
 

Typedef Documentation

◆ symtab

typedef std::map<string,double> symtab

Function Documentation

◆ doop()

STATIC bool doop ( vector< double > & valstack,
const string & op )

References DEBUG_ENTRY, fprintf(), ioQQQ, pow(), and STATIC.

Referenced by ParseExp(), and ParseProduct().

Here is the call graph for this function:

◆ getCommandToken()

string getCommandToken ( const string & card)
inline

◆ isBoundaryChar()

bool isBoundaryChar ( char c)

Referenced by Parser::nMatch1(), and nWord().

◆ isSeparatorChar()

bool isSeparatorChar ( char c)

Referenced by Parser::nMatchSkip().

◆ matchKey()

STATIC bool matchKey ( const string & read,
const string & expected,
size_t nmin = 4 )

References max(), min(), and STATIC.

Referenced by DataParser::getLineID(), and Parser::nMatchSkip().

Here is the call graph for this function:

◆ maybeNumber()

Symbol maybeNumber ( bool numOK,
const Symbol & s )
inline

References DEBUG_ENTRY, Symbol::ERROR, fprintf(), ioQQQ, and Symbol::value.

Referenced by Parser::getSymbol().

Here is the call graph for this function:

◆ nWord()

const char * nWord ( const char * chKey,
const char * chCard )

nWord determine whether match to a keyword occurs on command line, return value is 0 if no match, and position of match within string if hit

Parameters
*chKey
*chCard

References ASSERT, DEBUG_ENTRY, isBoundaryChar(), and NULL.

Here is the call graph for this function:

◆ ParseExp()

STATIC bool ParseExp ( deque< Token > & chTokens,
vector< double > & valstack,
const symtab & tab )

References DEBUG_ENTRY, doop(), ParseNumber(), and STATIC.

Referenced by ParseProduct().

Here is the call graph for this function:

◆ ParseExpr()

STATIC bool ParseExpr ( deque< Token > & chTokens,
vector< double > & valstack,
const symtab & tab )

References DEBUG_ENTRY, ParseProduct(), and STATIC.

Referenced by Parser::FFmtRead().

Here is the call graph for this function:

◆ ParseNumber()

STATIC bool ParseNumber ( deque< Token > & chTokens,
vector< double > & valstack,
const symtab & tab )

References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), ioQQQ, and STATIC.

Referenced by ParseExp().

Here is the call graph for this function:

◆ ParseProduct()

STATIC bool ParseProduct ( deque< Token > & chTokens,
vector< double > & valstack,
const symtab & tab )

References DEBUG_ENTRY, doop(), ParseExp(), and STATIC.

Referenced by ParseExpr().

Here is the call graph for this function: