Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

token.h

Go to the documentation of this file.
00001 /*
00002  * InCode - [ token.h ]
00003  * (c) 2002, J. Weeks
00004  * jweeks@mailandnews.com
00005  *
00006  */
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 
00017 #ifndef __TOKEN_H__
00018 #define __TOKEN_H__
00019 
00025 #define MAX_TOKEN   100
00026 
00031 typedef struct {
00032   struct Token *next;       
00033   char name[32];                
00034   long type;                        
00035   long value;                       
00036   double fvalue;                
00037   long size;                        
00038 } Token;
00039 
00044 enum Tokens {
00045   TIdentifier,          
00046   TStringLiteral,       
00047   TNumericLiteral,  
00048   TFloatLiteral,        
00049   TDataType,                
00050   TLeftBracket,         
00051   TRightBracket,        
00052   TLeftBrace,               
00053   TRightBrace,          
00054   TAdd,                         
00055   TSub,                         
00056   TDiv,                         
00057   TMul                          
00058 };
00059 
00060 int tokenInit(void);
00061 int tokenClose(void);
00062 int tokenize(void);
00063 int tokenGet(void);
00064 Token *tokenNew(void);
00065 int tokenDelete(Token *delTok);
00066 int tokenAdd(Token *add, Token *where);
00067 int tokenClear(void);
00068 
00069 #endif

Generated on Sun Mar 3 15:36:27 2002 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001