// Lexical Scanner Definitions. // // File: scanner.h // Author: course // Version: 1 // Types of tokens. // typedef enum { LPAREN_TOKEN, // the left parenthesis ( RPAREN_TOKEN, // the right parenthesis ) RBRACKET_TOKEN, // the right bracket ] DOT_TOKEN, // the period . QUOTE_TOKEN, // the single quote mark ' FNQUOTE_TOKEN, // function quote #' NUMBER_TOKEN, // number atom SYMBOL_TOKEN, // symbol atom EOF_TOKEN, // end of file ERROR_TOKEN // signals an unrecognizable token } token_type; // The token structure. // class token { public: token_type type; // Type of the token. object * value; // For symbols and fixnums, // the value of the token. }; // Functions to get the next token and backup over it. // token get_token (istream& s); void backup_token();