#include "teca_common.h"
#include <vector>
#include <set>
#include <string>
#include <iostream>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <sstream>
#include <cmath>
#include <cstdio>
Go to the source code of this file.
|
| #define | TECA_PARSER_ERROR(_descr, _expr, _pos) |
| |
|
#define | TECA_SYNTAX_ERROR(_expr, _pos) TECA_PARSER_ERROR("Syntax error. ", _expr, _pos) |
| |
| #define | TECA_NAME_RESOLUTION_ERROR(_name, _expr, _pos) |
| |
| #define | TECA_INVALID_OPERATION_ERROR(_op, _expr, _pos) |
| |
| #define | TECA_OPERATION_FAILED_ERROR(_op, _expr, _pos) |
| |
| #define | TECA_NUM_OPERANDS_ERROR(_op, _nreq, _ngive, _expr, _pos) |
| |
|
| template<typename tokenizer_t = teca_parser::tokenizer> |
| char * | teca_parser::infix_to_postfix (const char *iexpr, std::set< std::string > *variables) |
| |
| template<typename work_t , typename arg_t , typename operand_resolver_t , typename operator_resolver_t , typename tokenizer_t = teca_parser::tokenizer> |
| int | teca_parser::eval_postfix (arg_t &iexpr_result, const char *iexpr, operand_resolver_t &operands) |
| |
◆ TECA_INVALID_OPERATION_ERROR
| #define TECA_INVALID_OPERATION_ERROR |
( |
|
_op, |
|
|
|
_expr, |
|
|
|
_pos |
|
) |
| |
Value: TECA_PARSER_ERROR("Invalid operation \"" \
<< _op << "\". ", _expr, _pos)
◆ TECA_NAME_RESOLUTION_ERROR
| #define TECA_NAME_RESOLUTION_ERROR |
( |
|
_name, |
|
|
|
_expr, |
|
|
|
_pos |
|
) |
| |
Value: TECA_PARSER_ERROR("Name resolution error \"" \
<< _name << "\". ", _expr, _pos)
◆ TECA_NUM_OPERANDS_ERROR
| #define TECA_NUM_OPERANDS_ERROR |
( |
|
_op, |
|
|
|
_nreq, |
|
|
|
_ngive, |
|
|
|
_expr, |
|
|
|
_pos |
|
) |
| |
Value: TECA_PARSER_ERROR("Operation \"" << _op \
<< "\" requires " << _nreq << " operands, given " \
<< _ngive << ". ", _expr, _pos)
◆ TECA_OPERATION_FAILED_ERROR
| #define TECA_OPERATION_FAILED_ERROR |
( |
|
_op, |
|
|
|
_expr, |
|
|
|
_pos |
|
) |
| |
Value: TECA_PARSER_ERROR("Operation \"" << _op \
<< "\" failed. " , _expr, _pos)
◆ TECA_PARSER_ERROR
| #define TECA_PARSER_ERROR |
( |
|
_descr, |
|
|
|
_expr, |
|
|
|
_pos |
|
) |
| |
Value:
<< "" _descr \
<< "at position " << (_pos) << " in \"" \
<< std::string(_expr, _expr+(_pos)) << END_HL \
<< BEGIN_HL(ANSI_RED) << (_expr+(_pos))[0] << END_HL \
<< BEGIN_HL(ANSI_WHITE) << std::string(_expr+(_pos)+1) << "\"")