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

Scanner is a derived class to add some extra function to the scanner class. More...

#include <ds9lex.h>

Inheritance diagram for casa::viewer::ds9lex:

Public Member Functions

 ds9lex (std::istream *yyin=0, std::ostream *yyout=0)
 Create a new scanner object. More...
 
 ~ds9lex ()
 
virtual ds9parse::token_type lex (ds9parse::semantic_type *yylval, ds9parse::location_type *)
 This is the main lexing function. More...
 
void begin (int, int)
 
void set_debug (bool b)
 Enable debug output (via arg_yyout) if compiled into the scanner. More...
 
void discard (int)
 

Detailed Description

Scanner is a derived class to add some extra function to the scanner class.

Flex itself creates a class named yyFlexLexer, which is renamed using macros to ds9lex_FlexLexer. However we change the context of the generated yylex() function to be contained within the ds9lex class. This is required because the yylex() defined in ds9lex_display/ds9/ds9FlexLexer.has no parameters.

Definition at line 36 of file ds9lex.h.

Constructor & Destructor Documentation

casa::viewer::ds9lex::ds9lex ( std::istream *  yyin = 0,
std::ostream *  yyout = 0 
)
inline

Create a new scanner object.

The streams arg_yyin and arg_yyout default to cin and cout, but that assignment is only made when initializing in yylex().

Definition at line 41 of file ds9lex.h.

casa::viewer::ds9lex::~ds9lex ( )
inline

Definition at line 42 of file ds9lex.h.

Member Function Documentation

void casa::viewer::ds9lex::begin ( int  ,
int   
)
void casa::viewer::ds9lex::discard ( int  )
virtual ds9parse::token_type casa::viewer::ds9lex::lex ( ds9parse::semantic_type *  yylval,
ds9parse::location_type *   
)
virtual

This is the main lexing function.

It is generated by flex according to the macro declaration YY_DECL above. The generated bison parser then calls this virtual function to fetch new tokens.

void casa::viewer::ds9lex::set_debug ( bool  b)

Enable debug output (via arg_yyout) if compiled into the scanner.


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