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

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

#include <ds9lex.h>

List of all members.

Public Member Functions

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

Definition at line 42 of file ds9lex.h.


Member Function Documentation

void casa::viewer::ds9lex::begin ( int  ,
int   
)
virtual ds9parse::token_type casa::viewer::ds9lex::lex ( ds9parse::semantic_type *  yylval,
ds9parse::location_type *  yylloc 
) [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.

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


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