libdap++ Updated for version 3.8.2

parser-util.cc File Reference

#include "config.h"
#include <cerrno>
#include <cassert>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <sstream>
#include "debug.h"
#include "parser.h"
#include "dods-limits.h"
#include "util.h"
Include dependency graph for parser-util.cc:

Go to the source code of this file.

Namespaces

namespace  libdap

Functions

int libdap::check_byte (const char *val)
 Is the value a valid byte?
int libdap::check_float32 (const char *val)
 Is the value a valid float?
int libdap::check_float64 (const char *val)
int libdap::check_int16 (const char *val)
 Is the value a valid integer?
int libdap::check_int32 (const char *val)
int libdap::check_uint16 (const char *val)
int libdap::check_uint32 (const char *val)
int libdap::check_url (const char *val)
 Is the value a valid URL?
bool libdap::is_keyword (string id, const string &keyword)
void libdap::parse_error (const char *msg, const int line_num, const char *context)
void libdap::save_str (char *dst, const char *src, const int line_num)
 Save a string to a temporary variable during the parse.
void libdap::save_str (string &dst, const char *src, const int)
parse_error

Generate error messages for the various parsers.

parser_error() generates error messages for the various parsers used by libdap. There are two versions of the function, one which takes a const char *message and a const int line_num and writes the message and line number too stderr and a second which takes an additional parser_arg arg parameter and writes the error message into an Error object which is returned to the caller via the arg parameter.

Note:
{The second version of this function also accepts a third parameter (const char *context) which can be used to provide an additional line of information beyond what is in the string message.}
Returns:
void
void libdap::parse_error (parser_arg *arg, const char *msg, const int line_num, const char *context)
void libdap::parse_error (const string &msg, const int line_num, const char *context)