scanner.h File Reference

#include "config.h"

Include dependency graph for scanner.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Token
class  IErrorSensitive
class  IScanner
class  ScannerFactory

Enumerations

enum  EToken {
  ETOKEN_NULL = 0, ETOKEN_ID, ETOKEN_NUMBER_INT, ETOKEN_NUMBER_DOUBLE,
  ETOKEN_STRING, ETOKEN_OP_LCBR, ETOKEN_OP_RCBR, ETOKEN_OP_LPAR,
  ETOKEN_OP_RPAR, ETOKEN_OP_STAR, ETOKEN_OP_SLASH, ETOKEN_OP_PLUS,
  ETOKEN_OP_MINUS, ETOKEN_OP_LESS, ETOKEN_OP_LESS_EQ, ETOKEN_OP_GREATER,
  ETOKEN_OP_GREATER_EQ, ETOKEN_OP_ASSIGN, ETOKEN_OP_COMMA, ETOKEN_OP_SEMICOLON,
  ETOKEN_KW_AND, ETOKEN_KW_DIV, ETOKEN_KW_DOUBLE, ETOKEN_KW_ELSE,
  ETOKEN_KW_EQ, ETOKEN_KW_IF, ETOKEN_KW_INT, ETOKEN_KW_NEQ,
  ETOKEN_KW_NOT, ETOKEN_KW_OR, ETOKEN_KW_STRING, ETOKEN_KW_VAR,
  ETOKEN_KW_VOID, ETOKEN_KW_WHILE
}

Functions

std::ostream & operator<< (std::ostream &, EToken)
 send token type to stream in human-readable form
std::ostream & operator<< (std::ostream &, const Token &)
 send token to stream in human-readable form


Enumeration Type Documentation

enum EToken

token type enumeration

Enumerator:
ETOKEN_NULL  null token (not valid)
ETOKEN_ID  identifier
ETOKEN_NUMBER_INT  integral literal
ETOKEN_NUMBER_DOUBLE  decimal literal
ETOKEN_STRING  string literal
ETOKEN_OP_LCBR  {
ETOKEN_OP_RCBR  }
ETOKEN_OP_LPAR  (
ETOKEN_OP_RPAR  )
ETOKEN_OP_STAR  *
ETOKEN_OP_SLASH  /
ETOKEN_OP_PLUS  +
ETOKEN_OP_MINUS 
ETOKEN_OP_LESS  <
ETOKEN_OP_LESS_EQ  <=
ETOKEN_OP_GREATER  >
ETOKEN_OP_GREATER_EQ  >=
ETOKEN_OP_ASSIGN  :=
ETOKEN_OP_COMMA  ,
ETOKEN_OP_SEMICOLON  ;
ETOKEN_KW_AND  and
ETOKEN_KW_DIV  div
ETOKEN_KW_DOUBLE  double
ETOKEN_KW_ELSE  else
ETOKEN_KW_EQ  eq
ETOKEN_KW_IF  if
ETOKEN_KW_INT  int
ETOKEN_KW_NEQ  neq
ETOKEN_KW_NOT  not
ETOKEN_KW_OR  or
ETOKEN_KW_STRING  string
ETOKEN_KW_VAR  var
ETOKEN_KW_VOID  void
ETOKEN_KW_WHILE  while

Definition at line 33 of file scanner.h.


Function Documentation

std::ostream& operator<< ( std::ostream &  ,
const Token  
)

send token to stream in human-readable form

Definition at line 272 of file scanner.cc.

References StreamDecorator::C_LIGHT_GREEN, StreamDecorator::C_LIGHT_RED, StreamDecorator::C_NO_COLOR, ETOKEN_ID, ETOKEN_NUMBER_DOUBLE, ETOKEN_NUMBER_INT, ETOKEN_STRING, Token::lineno, Token::numberDouble, Token::numberInt, Token::text, and Token::type.

std::ostream& operator<< ( std::ostream &  ,
EToken   
)

send token type to stream in human-readable form

Definition at line 182 of file scanner.cc.

References StreamDecorator::C_LIGHT_BLUE, StreamDecorator::C_NO_COLOR, StreamDecorator::C_YELLOW, ETOKEN_ID, ETOKEN_KW_AND, ETOKEN_KW_DIV, ETOKEN_KW_DOUBLE, ETOKEN_KW_ELSE, ETOKEN_KW_EQ, ETOKEN_KW_IF, ETOKEN_KW_INT, ETOKEN_KW_NEQ, ETOKEN_KW_NOT, ETOKEN_KW_OR, ETOKEN_KW_STRING, ETOKEN_KW_VAR, ETOKEN_KW_VOID, ETOKEN_KW_WHILE, ETOKEN_NULL, ETOKEN_NUMBER_DOUBLE, ETOKEN_NUMBER_INT, ETOKEN_OP_ASSIGN, ETOKEN_OP_COMMA, ETOKEN_OP_GREATER, ETOKEN_OP_GREATER_EQ, ETOKEN_OP_LCBR, ETOKEN_OP_LESS, ETOKEN_OP_LESS_EQ, ETOKEN_OP_LPAR, ETOKEN_OP_MINUS, ETOKEN_OP_PLUS, ETOKEN_OP_RCBR, ETOKEN_OP_RPAR, ETOKEN_OP_SEMICOLON, ETOKEN_OP_SLASH, ETOKEN_OP_STAR, and ETOKEN_STRING.


Generated on Sat Jul 4 18:33:01 2009 for vyp08 (compiler and interpreter of VYP08 language) by  doxygen 1.5.4