Main Page   Data Structures   File List   Data Fields   Globals  

token.h File Reference

Go to the source code of this file.

Data Structures

struct  _Token
 A Token. More...


Defines

#define MAX_TOKEN   100
 Maximum number of tokens. More...


Typedefs

typedef _Token Token
 A Token. More...


Enumerations

enum  Tokens {
  TIdentifier, TStringLiteral, TNumericLiteral, TFloatLiteral,
  TDataType, TLeftBracket, TRightBracket, TLeftBrace,
  TRightBrace, TAdd, TSub, TDiv,
  TMul
}
 Token enum. More...


Functions

int tokenInit (void)
 Initialize Token System. More...

int tokenClose (void)
 Close the Token sytem. More...

int tokenize (void)
int tokenGet (Token *tok)
int tokenNew (Token *newTok)
int tokenDelete (Token *delTok)
int tokenAdd (Token *add, Token *where)
int tokenClear (void)


Define Documentation

#define MAX_TOKEN   100
 

Maximum number of tokens.

The token engine cannot evaluate above this many tokens/line (unless a linked list system is used).

Definition at line 25 of file token.h.


Typedef Documentation

typedef struct _Token Token
 

A Token.

Every source code element in InCode.


Enumeration Type Documentation

enum Tokens
 

Token enum.

Contains values for all the possible tokens from the InCode syntax.

Enumeration values:
TIdentifier  An Identifier, could be variable, function or object.
TStringLiteral  A string literal (encased in quotes).
TNumericLiteral  A numeric literal (of any base, specified in 'size').
TFloatLiteral  A floating point literal (of any size, specified in 'size').
TDataType  A datatype indentifier (char, word, dword, etc).
TLeftBracket  formatting character (.
TRightBracket  formatting character ).
TLeftBrace  formatting character {.
TRightBrace  formatting character }.
TAdd  operator+.
TSub  operator-.
TDiv  operator/.
TMul  operator *.

Definition at line 46 of file token.h.


Function Documentation

int tokenAdd Token   add,
Token   where
 

int tokenClear void   
 

int tokenClose void   
 

Close the Token sytem.

Removes any memory occupied by the token system, and releases any resources used.

Returns:
0 if okay, !0 on error.

Definition at line 50 of file token.c.

References TDataType, TFloatLiteral, TLeftBrace, TLeftBracket, and TRightBracket.

int tokenDelete Token   delTok
 

Definition at line 86 of file token.c.

Referenced by tokenize().

int tokenGet Token   tok
 

Definition at line 67 of file token.c.

Referenced by tokenize().

int tokenInit void   
 

Initialize Token System.

Initializes the token linked list, and any other setup procedures.

Returns:
0 if okay, !0 on error.

Definition at line 38 of file token.c.

int tokenize void   
 

Definition at line 55 of file token.c.

References TAdd, TDiv, TMul, TRightBrace, and TSub.

int tokenNew Token   newTok
 

Definition at line 81 of file token.c.

Referenced by tokenGet().


Generated on Thu Feb 14 09:15:11 2002 for InCode by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001