C:/Users/Dennis/src/lang/bertrand/BERTRAND/bertrand/scanner.c File Reference

#include "def.h"

Go to the source code of this file.

Defines

#define ST   0
#define SP   1
#define S2   2
#define SL   3
#define SN   4
#define SF   5
#define SI   6
#define SS   7
#define SE   8
#define SC   9
#define SX   10
#define TERM_STATE   50
#define XR   51
#define EC   55
#define EN   56
#define ES   57
#define TI   61
#define TN   62
#define TO   63
#define T2   64
#define TS   65
#define AU   0
#define AE   1
#define AA   2
#define AN   3
#define AF   4
#define AX   5
#define AS   6
#define AR   7
#define AP   8
#define AC   9

Functions

void preprocess ()
void char_free ()
int scan ()

Variables

double token_val
char token_prval [MAXTOKEN+1]
OPtoken_op
int lineno = 1
int charno = 0
FILE * infile
char * infilename
int filespushed = 0
FILE * infiles [MAXFILES]
char * infilenames [MAXFILES]
int inlinenos [MAXFILES]
int verboses [MAXFILES]
OPsingle_op
OPdouble_op
OPname_op
OPtype_op
static char transtab []
char * trans = transtab + 1
static char stab [11][13]
static char atab [11][13]


Define Documentation

#define AA   2

Definition at line 123 of file scanner.c.

Referenced by scan().

#define AC   9

Definition at line 130 of file scanner.c.

Referenced by scan().

#define AE   1

Definition at line 122 of file scanner.c.

Referenced by scan().

#define AF   4

Definition at line 125 of file scanner.c.

Referenced by scan().

#define AN   3

Definition at line 124 of file scanner.c.

Referenced by scan().

#define AP   8

Definition at line 129 of file scanner.c.

Referenced by scan().

#define AR   7

Definition at line 128 of file scanner.c.

Referenced by scan().

#define AS   6

Definition at line 127 of file scanner.c.

Referenced by scan().

#define AU   0

Definition at line 121 of file scanner.c.

Referenced by scan().

#define AX   5

Definition at line 126 of file scanner.c.

Referenced by scan().

#define EC   55

Definition at line 95 of file scanner.c.

Referenced by scan().

#define EN   56

Definition at line 96 of file scanner.c.

Referenced by scan().

#define ES   57

Definition at line 97 of file scanner.c.

Referenced by scan().

#define S2   2

Definition at line 81 of file scanner.c.

#define SC   9

Definition at line 88 of file scanner.c.

#define SE   8

Definition at line 87 of file scanner.c.

#define SF   5

Definition at line 84 of file scanner.c.

#define SI   6

Definition at line 85 of file scanner.c.

#define SL   3

Definition at line 82 of file scanner.c.

#define SN   4

Definition at line 83 of file scanner.c.

#define SP   1

Definition at line 80 of file scanner.c.

#define SS   7

Definition at line 86 of file scanner.c.

#define ST   0

Definition at line 79 of file scanner.c.

Referenced by scan().

#define SX   10

Definition at line 89 of file scanner.c.

#define T2   64

Definition at line 102 of file scanner.c.

Referenced by scan().

#define TERM_STATE   50

Definition at line 91 of file scanner.c.

Referenced by scan().

#define TI   61

Definition at line 99 of file scanner.c.

Referenced by scan().

#define TN   62

Definition at line 100 of file scanner.c.

Referenced by scan().

#define TO   63

Definition at line 101 of file scanner.c.

Referenced by scan().

#define TS   65

Definition at line 103 of file scanner.c.

Referenced by scan().

#define XR   51

Definition at line 93 of file scanner.c.

Referenced by scan().


Function Documentation

void char_free (  ) 

Referenced by scan().

void preprocess (  ) 

Definition at line 682 of file prep.c.

References C_NUM, error(), file_push(), lineno, load_file(), op_define(), primitive_define(), token_get(), token_pos, trans, type_define(), and verbose.

Referenced by scan().

int scan (  ) 

Definition at line 158 of file scanner.c.

References AA, AC, AE, AF, AN, AP, AR, AS, atab, AU, AX, C_NL, char_free(), charno, EC, EN, error(), ES, filespushed, IDENT, infile, infilename, infilenames, infiles, inlinenos, lineno, MAXTOKEN, op::next, NUMBER, OPER, op::pname, preprocess(), ST, stab, STRING, T2, TERM_STATE, TI, TN, TO, token_prval, token_val, trans, TS, TYPE, verbose, verboses, and XR.

Referenced by exp_parse(), and parse().


Variable Documentation

char atab[11][13] [static]

Initial value:

 {      

{AC, AA, AE, AE, AA, AN, AA, AA, AE, AA, AA, AA, AE},  
{AU, AU, AE, AE, AS, AU, AU, AU, AU, AU, AU, AU, AU},  
{AU, AU, AE, AE, AU, AU, AU, AU, AU, AU, AU, AU, AU},  
{AU, AU, AE, AE, AU, AF, AU, AE, AU, AU, AU, AU, AU},  
{AU, AU, AE, AE, AU, AN, AA, AA, AU, AU, AU, AU, AU},  
{AU, AU, AE, AE, AU, AF, AA, AA, AU, AU, AU, AU, AU},  
{AU, AU, AE, AE, AU, AA, AA, AU, AU, AU, AU, AU, AU},  
{AU, AA, AU, AA, AA, AA, AA, AA, AE, AE, AA, AA, AA},  
{AU, AX, AE, AX, AX, AX, AX, AX, AA, AA, AX, AX, AX},  
{AR, AE, AR, AE, AE, AE, AE, AE, AE, AE, AE, AE, AE},  
{AP, AP, AP, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA}}

Definition at line 131 of file scanner.c.

Referenced by scan().

int charno = 0

Definition at line 18 of file scanner.c.

Referenced by error(), init(), and scan().

OP* double_op

Definition at line 15 of file ops.c.

int filespushed = 0

Definition at line 25 of file scanner.c.

Referenced by file_push(), and scan().

FILE* infile

Definition at line 21 of file scanner.c.

Referenced by file_push(), main(), and scan().

char* infilename

Definition at line 22 of file scanner.c.

Referenced by error(), file_push(), main(), and scan().

char* infilenames[MAXFILES]

Definition at line 27 of file scanner.c.

Referenced by file_push(), and scan().

FILE* infiles[MAXFILES]

Definition at line 26 of file scanner.c.

Referenced by file_push(), and scan().

int inlinenos[MAXFILES]

Definition at line 28 of file scanner.c.

Referenced by file_push(), and scan().

int lineno = 1

Definition at line 17 of file scanner.c.

Referenced by error(), file_push(), init(), main(), preprocess(), and scan().

OP* name_op

Definition at line 16 of file ops.c.

Referenced by init().

OP* single_op

Definition at line 14 of file ops.c.

char stab[11][13] [static]

Initial value:

 {      

{ST, EC, ST, ST, SP, SN, SI, SL, SS, SI, SI, XR, SX},  
{TO, TO, TO, TO, S2, TO, TO, TO, TO, TO, TO, TO, TO},  
{T2, T2, T2, T2, T2, T2, T2, T2, T2, T2, T2, T2, T2},  
{XR, XR, XR, XR, XR, SF, XR, SC, XR, XR, XR, XR, XR},  
{TN, TN, TN, TN, TN, SN, EN, SF, TN, TN, TN, TN, TN},  
{TN, TN, TN, TN, TN, SF, EN, EN, TN, TN, TN, TN, TN},  
{TI, TI, TI, TI, TI, SI, SI, TI, TI, TI, TI, TI, TI},  
{ES, SS, ES, SS, SS, SS, SS, SS, TS, SE, SS, SS, SS},  
{ES, SS, SS, SS, SS, SS, SS, SS, SS, SS, SS, SS, SS},  
{ST, SC, ST, SC, SC, SC, SC, SC, SC, SC, SC, SC, SC},  
{ST, ST, ST, SX, SX, SX, SX, SX, SX, SX, SX, SX, SX}}

Definition at line 104 of file scanner.c.

Referenced by scan().

OP* token_op

Definition at line 14 of file scanner.c.

char token_prval[MAXTOKEN+1]

Definition at line 13 of file scanner.c.

Referenced by exp_parse(), scan(), and token_get().

double token_val

Definition at line 12 of file scanner.c.

Referenced by exp_parse(), and scan().

char* trans = transtab + 1

Definition at line 76 of file scanner.c.

Referenced by op_create(), op_define(), prec_conv(), preprocess(), primitive_define(), scan(), and token_get().

char transtab[] [static]

Initial value:


    {C_EOF, C_EOF, C_CTRL, C_CTRL, C_CTRL, C_CTRL, C_CTRL, C_CTRL, C_CTRL,
 C_CTRL,   C_WS,   C_NL, C_CTRL,   C_NL,   C_NL, C_CTRL, C_CTRL,
 C_CTRL, C_CTRL, C_CTRL, C_CTRL, C_CTRL, C_CTRL, C_CTRL, C_CTRL,
 C_CTRL, C_CTRL, C_CTRL, C_CTRL, C_CTRL, C_CTRL, C_CTRL, C_CTRL,
   C_WS,  C_SPC,   C_DQ,   C_LB,  C_SPC,  C_SPC,  C_SPC,   C_SQ,
  C_SPC,  C_SPC,  C_SPC,  C_SPC,  C_SPC,  C_SPC,  C_PER,  C_SPC,
  C_NUM,  C_NUM,  C_NUM,  C_NUM,  C_NUM,  C_NUM,  C_NUM,  C_NUM,
  C_NUM,  C_NUM,  C_SPC,  C_SPC,  C_SPC,  C_SPC,  C_SPC,  C_SPC,
  C_SPC, C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH,
 C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH,
 C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH,
 C_ALPH, C_ALPH, C_ALPH,  C_SPC,  C_SPC,  C_SPC,  C_SPC, C_ALPH,
   C_BQ, C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH,
 C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH,
 C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH, C_ALPH,
 C_ALPH, C_ALPH, C_ALPH,  C_BRC,  C_SPC,  C_BRC,  C_SPC, C_CTRL}

Definition at line 57 of file scanner.c.

OP* type_op

Definition at line 17 of file ops.c.

int verboses[MAXFILES]

Definition at line 29 of file scanner.c.

Referenced by file_push(), and scan().


Generated on Fri Jan 25 09:58:43 2008 for Bertrand by  doxygen 1.5.4