test-scanner.cc File Reference

#include "config.h"
#include "scanner.h"
#include "vypIO.h"

Include dependency graph for test-scanner.cc:

Go to the source code of this file.

Classes

struct  Test
 scanner test More...

Typedefs

typedef TokenTTokenList

Functions

bool operator== (const Token &a, const Token &b)
 compare tokens by value
bool operator!= (const Token &a, const Token &b)
 compare tokens by value
void run (const Test &test)
int main (int argc, char *argv[])

Variables

static int errorCode = 0


Typedef Documentation

typedef Token* TTokenList

Definition at line 34 of file test-scanner.cc.


Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 127 of file test-scanner.cc.

References ScannerFactory::createScanner(), errorCode, 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_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, ETOKEN_STRING, Test::hasError, IErrorSensitive::hasError(), Test::input, IScanner::readNext(), run(), STD_VECTOR, and Test::tokenList.

Here is the call graph for this function:

bool operator!= ( const Token a,
const Token b 
)

compare tokens by value

Definition at line 64 of file test-scanner.cc.

References operator==().

Here is the call graph for this function:

bool operator== ( const Token a,
const Token b 
)

compare tokens by value

Definition at line 46 of file test-scanner.cc.

References ETOKEN_ID, ETOKEN_NUMBER_DOUBLE, ETOKEN_NUMBER_INT, ETOKEN_STRING, Token::lineno, Token::numberDouble, Token::numberInt, Token::text, and Token::type.

Referenced by operator!=().

Here is the caller graph for this function:

void run ( const Test test  ) 

run test Print progress to std::cout and errors to std::cerr.

Note:
Global variable errorCode is set to 1 on test fail.

Definition at line 73 of file test-scanner.cc.

References ScannerFactory::createScanner(), errorCode, IErrorSensitive::hasError(), Test::hasError, Test::input, IScanner::readNext(), and Test::tokenList.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

int errorCode = 0 [static]

Definition at line 43 of file test-scanner.cc.

Referenced by main(), and run().


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