1: #
   2: /*
   3: **	SCANNER.H
   4: **	contains the global structures and variable declarations needed
   5: **	by the lexical analyzer.  This includes Manifest Constants and
   6: **	certain variables for internal communication purposes.  Therefore,
   7: **	extreme care should be exercised when modifying this file.
   8: */
   9: 
  10: 
  11: /* MANIFEST CONSTANTS */
  12: # define    SBUFSIZ     2000    /* max size of symbol table for */
  13: # define    MAXSTRING   255 /* max length of strings */
  14: # define    GOVAL       -1  /* semantic value for command names */
  15: 
  16: /* CHARACTER TYPES */
  17: # define    ALPHA       1
  18: # define    NUMBR       2
  19: # define    OPATR       3
  20: # define    PUNCT       4
  21: # define    CNTRL       5
  22: 
  23: /* Modes for input from EQUEL front end */
  24: # define    CVAR_I2     '\1'    /* 2 byte integer */
  25: # define    CVAR_F8     '\4'    /* 8 byte floating number */
  26: # define    CVAR_S      '\3'    /* string with null byte */
  27: # define    CVAR_I4     '\6'    /* 4 byte integer */
  28: 
  29: /* error number definitions */
  30: # define    SYMERR      2500    /* syntactic error */
  31: # define    STRTERM     2700    /* non term string */
  32: # define    STRLONG     2701    /* string too long */
  33: # define    BADOP       2702    /* can't find operator in tables */
  34: # define    NAMELONG    2703    /* name too long */
  35: # define    SBUFOFLO    2704    /* over flow symbol table */
  36: # define    COMMTERM    2705    /* non term comment */
  37: # define    FCONSTERR   2707    /* float constant error */
  38: # define    CNTRLCHR    2708    /* control char from equel */
  39: # define    NUMBUFOFLO  2709    /* buffer oflo in number.c */
  40: 
  41: /* KEYWORD and OPERATOR TABLE */
  42: struct optab                /* key word/operator tables */
  43: {
  44:     char    *term;          /* key word/operator body */
  45:     int token;          /* associated parser token */
  46:     int opcode;         /* associated parser opcode */
  47: };
  48: 
  49: /* SPECIAL TOKENS for scanner */
  50: struct special
  51: {
  52:     int sconst;
  53:     int bgncmnt;
  54:     int endcmnt;
  55:     int i2const;
  56:     int i4const;
  57:     int f4const;
  58:     int f8const;
  59:     int name;
  60: };
  61: 
  62: /* last token struct */
  63: struct lastok
  64: {
  65:     int toktyp;
  66:     char    *tok;
  67:     int tokop;
  68: };
  69: 
  70: /* declarations */
  71: struct special  Tokens;         /* special tokens table */
  72: struct optab    Optab[];        /* operator table */
  73: struct optab    Keyword[];      /* keyword table */
  74: struct lastok   Lastok;
  75: int     Opcode;         /* opcode for current token */
  76: int     Lcase;          /* UPPER->lower conversion flag */
  77: int     Pars;           /* flag for call to getcvar or not */
  78: int     Newline;        /* set if last char read was a newline */
  79: int     Cflag;          /* set if line of C-code recognized */
  80: int     Keyent;         /* number of entries in the Keyword table */
  81: 
  82: char        Sbuf[SBUFSIZ];      /* symbol table buffer */
  83: /*
  84: **	TRACE FLAG ASSIGNMENTS
  85: **	Comment, Expand		70
  86: **	Name, String		71
  87: **	Number, Yylex		72
  88: **	Operator		73
  89: **	Inout			74
  90: */

Defined variables

Cflag defined in line 79; never used
Keyent defined in line 80; used 1 times
Keyword defined in line 73; used 5 times
Newline defined in line 78; never used
Opcode defined in line 75; never used
Sbuf defined in line 82; used 2 times

Defined struct's

lastok defined in line 63; used 2 times
  • in line 74(2)
optab defined in line 42; used 10 times
special defined in line 50; used 2 times
  • in line 71(2)

Defined macros

ALPHA defined in line 17; used 54 times
BADOP defined in line 33; used 1 times
COMMTERM defined in line 36; used 2 times
CVAR_F8 defined in line 25; never used
CVAR_I2 defined in line 24; never used
CVAR_I4 defined in line 27; never used
CVAR_S defined in line 26; never used
FCONSTERR defined in line 37; used 1 times
NAMELONG defined in line 34; used 1 times
NUMBUFOFLO defined in line 39; used 4 times
OPATR defined in line 19; used 32 times
PUNCT defined in line 20; used 4 times
SBUFOFLO defined in line 35; used 1 times
SBUFSIZ defined in line 12; used 2 times
STRTERM defined in line 31; used 3 times
SYMERR defined in line 30; used 1 times

Usage of this include

Last modified: 1980-12-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1402
Valid CSS Valid XHTML 1.0 Strict