casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
casa::viewer::ds9parser Class Reference

#include <ds9parser.h>

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 More...
 
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. More...
 
void error (const std::string &m)
 General error handling. More...
 

Public Attributes

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

Detailed Description

Definition at line 11 of file ds9parser.h.

Constructor & Destructor Documentation

casa::viewer::ds9parser::ds9parser ( )

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

ds9lex* casa::viewer::ds9parser::lexer

Definition at line 42 of file ds9parser.h.

std::string casa::viewer::ds9parser::streamname

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

Definition at line 22 of file ds9parser.h.

bool casa::viewer::ds9parser::trace_parsing

enable debug output in the bison parser

Definition at line 19 of file ds9parser.h.

bool casa::viewer::ds9parser::trace_scanning

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: