token_xsb.c File Reference

#include "xsb_config.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "auxlry.h"
#include "cell_xsb.h"
#include "context.h"
#include "token_xsb.h"
#include "psc_xsb.h"
#include "subp.h"
#include "register.h"
#include "error_xsb.h"
#include "memory_xsb.h"

Data Structures

struct  CHARS

Defines

#define exit_if_null(x)
#define Char   unsigned char
#define AlphabetSize   256
#define InRange(X, L, U)   ((unsigned)((X)-(L)) <= (unsigned)((U)-(L)))
#define IsLayout(X)   InRange(InType(X), SPACE, EOLN)
#define InType(c)   (intab.chtype+1)[c]
#define DigVal(c)   (digval+1)[c]

Functions

int intype (int c)
static void SyntaxError (char *description)
void unGetC (int d, FILE *card, STRFILE *instr)
static int read_character (CTXTdeclc register FILE *card, register STRFILE *instr, register int q)
static int com0plain (register FILE *card, register STRFILE *instr, register int endeol)
static int com2plain (register FILE *card, register STRFILE *instr, int astcom, int endcom)
void realloc_strbuff (CTXTdeclc char **pstrbuff, char **ps, int *pn)
token_tGetToken (CTXTdeclc FILE *card, STRFILE *instr, int prevch)

Variables

CHARS intab
char digval [AlphabetSize+1]
token_t res_str
token_ttoken = &res_str
int lastc = ' '
char * strbuff = NULL
int strbuff_len = InitStrLen
double double_v
long rad_int
char tok2long [] = "token too long"
char eofinrem [] = "end of file in comment"
char badexpt [] = "bad exponent"
char badradix [] = "radix not 0 or 2..36"
int token_too_long_warning = 1

Define Documentation

#define AlphabetSize   256
 

#define Char   unsigned char
 

#define DigVal  )     (digval+1)[c]
 

#define exit_if_null  ) 
 

Value:

{\
  if(x == NULL){\
   xsb_exit("Malloc Failed !\n");\
  }\
}

#define InRange X,
L,
 )     ((unsigned)((X)-(L)) <= (unsigned)((U)-(L)))
 

#define InType  )     (intab.chtype+1)[c]
 

#define IsLayout X   )     InRange(InType(X), SPACE, EOLN)
 


Function Documentation

static int com0plain register FILE *  card,
register STRFILE *  instr,
register int  endeol
[static]
 

static int com2plain register FILE *  card,
register STRFILE *  instr,
int  astcom,
int  endcom
[static]
 

struct token_t* GetToken CTXTdeclc FILE *  card,
STRFILE *  instr,
int  prevch
 

int intype int  c  ) 
 

static int read_character CTXTdeclc register FILE *  card,
register STRFILE *  instr,
register int  q
[static]
 

void realloc_strbuff CTXTdeclc char **  pstrbuff,
char **  ps,
int pn
 

static void SyntaxError char *  description  )  [static]
 

void unGetC int  d,
FILE *  card,
STRFILE *  instr
 


Variable Documentation

char badexpt[] = "bad exponent"
 

char badradix[] = "radix not 0 or 2..36"
 

char digval[AlphabetSize+1]
 

double double_v
 

char eofinrem[] = "end of file in comment"
 

struct CHARS intab
 

int lastc = ' '
 

long rad_int
 

struct token_t res_str
 

char* strbuff = NULL
 

int strbuff_len = InitStrLen
 

char tok2long[] = "token too long"
 

struct token_t* token = &res_str
 

int token_too_long_warning = 1
 


Generated on Wed Jul 26 13:26:54 2006 for XSB by  doxygen 1.4.5