scanner - bool seen_eof char lookahead void advance public...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// $Id: scanner.h,v 1.2 2010-01-21 18:22:36-08 - - $ / #ifndef __SCANNER_H__ #define __SCANNER_H__ # #include <iostream> #include <utility> # using namespace std; u #include "trace.h" # enum terminal_symbol {NUMBER, OPERATOR, SCANEOF}; struct token_t { terminal_symbol symbol; string lexinfo; }; } class scanner { private:
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: bool seen_eof; char lookahead; void advance(); public: scanner(); token_t scan (); }; } ostream &operator<< (ostream &, const terminal_symbol &); ostream &operator<< (ostream &, const token_t &); o RCSH(__scanner_h__, "$Id: scanner.h,v 1.2 2010-01-21 18:22:36-08 - - $") " #endif...
View Full Document

This note was uploaded on 01/26/2010 for the course CMPS 109 taught by Professor Bailey,d during the Spring '08 term at UCSC.

Ask a homework question - tutors are online