Code::Blocks  SVN r11506
Macros | Functions
sqlexer.cpp File Reference
#include "sqpcheader.h"
#include <ctype.h>
#include <stdlib.h>
#include "sqtable.h"
#include "sqstring.h"
#include "sqcompiler.h"
#include "sqlexer.h"
Include dependency graph for sqlexer.cpp:

Go to the source code of this file.

Macros

#define CUR_CHAR   (_currdata)
 
#define RETURN_TOKEN(t)   { _prevtoken = _curtoken; _curtoken = t; return t;}
 
#define IS_EOB()   (CUR_CHAR <= SQUIRREL_EOB)
 
#define NEXT()   {Next();_currentcolumn++;}
 
#define INIT_TEMP_STRING()   { _longstr.resize(0);}
 
#define APPEND_CHAR(c)   { _longstr.push_back(c);}
 
#define TERMINATE_BUFFER()   {_longstr.push_back(_SC('\0'));}
 
#define ADD_KEYWORD(key, id)   _keywords->NewSlot( SQString::Create(ss, _SC(#key)) ,SQInteger(id))
 
#define MAX_HEX_DIGITS   (sizeof(SQInteger)*2)
 
#define TINT   1
 
#define TFLOAT   2
 
#define THEX   3
 
#define TSCIENTIFIC   4
 
#define TOCTAL   5
 

Functions

void LexHexadecimal (const SQChar *s, SQUnsignedInteger *res)
 
void LexInteger (const SQChar *s, SQUnsignedInteger *res)
 
SQInteger scisodigit (SQInteger c)
 
void LexOctal (const SQChar *s, SQUnsignedInteger *res)
 
SQInteger isexponent (SQInteger c)
 

Macro Definition Documentation

◆ ADD_KEYWORD

#define ADD_KEYWORD (   key,
  id 
)    _keywords->NewSlot( SQString::Create(ss, _SC(#key)) ,SQInteger(id))

Definition at line 19 of file sqlexer.cpp.

◆ APPEND_CHAR

#define APPEND_CHAR (   c)    { _longstr.push_back(c);}

Definition at line 17 of file sqlexer.cpp.

◆ CUR_CHAR

#define CUR_CHAR   (_currdata)

Definition at line 12 of file sqlexer.cpp.

◆ INIT_TEMP_STRING

#define INIT_TEMP_STRING ( )    { _longstr.resize(0);}

Definition at line 16 of file sqlexer.cpp.

◆ IS_EOB

#define IS_EOB ( )    (CUR_CHAR <= SQUIRREL_EOB)

Definition at line 14 of file sqlexer.cpp.

◆ MAX_HEX_DIGITS

#define MAX_HEX_DIGITS   (sizeof(SQInteger)*2)

Definition at line 392 of file sqlexer.cpp.

◆ NEXT

#define NEXT ( )    {Next();_currentcolumn++;}

Definition at line 15 of file sqlexer.cpp.

◆ RETURN_TOKEN

#define RETURN_TOKEN (   t)    { _prevtoken = _curtoken; _curtoken = t; return t;}

Definition at line 13 of file sqlexer.cpp.

◆ TERMINATE_BUFFER

#define TERMINATE_BUFFER ( )    {_longstr.push_back(_SC('\0'));}

Definition at line 18 of file sqlexer.cpp.

◆ TFLOAT

#define TFLOAT   2

◆ THEX

#define THEX   3

◆ TINT

#define TINT   1

◆ TOCTAL

#define TOCTAL   5

◆ TSCIENTIFIC

#define TSCIENTIFIC   4

Function Documentation

◆ isexponent()

SQInteger isexponent ( SQInteger  c)

Definition at line 389 of file sqlexer.cpp.

◆ LexHexadecimal()

void LexHexadecimal ( const SQChar s,
SQUnsignedInteger *  res 
)

Definition at line 357 of file sqlexer.cpp.

◆ LexInteger()

void LexInteger ( const SQChar s,
SQUnsignedInteger *  res 
)

Definition at line 368 of file sqlexer.cpp.

◆ LexOctal()

void LexOctal ( const SQChar s,
SQUnsignedInteger *  res 
)

Definition at line 379 of file sqlexer.cpp.

References scisodigit().

◆ scisodigit()

SQInteger scisodigit ( SQInteger  c)

Definition at line 377 of file sqlexer.cpp.

Referenced by LexOctal().