casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Public Attributes
casa::viewer::ds9parser Class Reference

#include <ds9parser.h>

List of all members.

Public Member Functions

 ds9parser ()
bool parse_stream (ds9context &base, std::istream &in, const std::string &sname="stream input")
 input stream, stream name for error messages, return true if successfully parsed
bool parse_string (ds9context &base, const std::string &input, const std::string &sname="string stream")
bool parse_file (ds9context &base, const std::string &filename)
void error (const class location &l, const std::string &m)
 To demonstrate pure handling of parse errors, instead of simply dumping them on the standard error output, we will pass them to the driver using the following two member functions.
void error (const std::string &m)
 General error handling.

Public Attributes

bool trace_scanning
 enable debug output in the flex scanner
bool trace_parsing
 enable debug output in the bison parser
std::string streamname
 stream name (file or input stream) used for error messages.
ds9lexlexer

Detailed Description

Definition at line 11 of file ds9parser.h.


Constructor & Destructor Documentation


Member Function Documentation

void casa::viewer::ds9parser::error ( const class location &  l,
const std::string &  m 
)

To demonstrate pure handling of parse errors, instead of simply dumping them on the standard error output, we will pass them to the driver using the following two member functions.

Error handling with associated line number. This can be modified to output the error e.g. to a dialog box.

void casa::viewer::ds9parser::error ( const std::string &  m)

General error handling.

This can be modified to output the error e.g. to a dialog box.

bool casa::viewer::ds9parser::parse_file ( ds9context base,
const std::string &  filename 
)
bool casa::viewer::ds9parser::parse_stream ( ds9context base,
std::istream &  in,
const std::string &  sname = "stream input" 
)

input stream, stream name for error messages, return true if successfully parsed

bool casa::viewer::ds9parser::parse_string ( ds9context base,
const std::string &  input,
const std::string &  sname = "string stream" 
)

Member Data Documentation

Definition at line 42 of file ds9parser.h.

stream name (file or input stream) used for error messages.

Definition at line 22 of file ds9parser.h.

enable debug output in the bison parser

Definition at line 19 of file ds9parser.h.

enable debug output in the flex scanner

Definition at line 16 of file ds9parser.h.


The documentation for this class was generated from the following file: