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: **	Version:
  10: **		@(#)scanner.h	8.2	2/8/85
  11: */
  12: 
  13: 
  14: /* MANIFEST CONSTANTS */
  15: # define    SBUFSIZ     2000    /* max size of symbol table for */
  16: # define    MAXSTRING   255 /* max length of strings */
  17: # define    GOVAL       -1  /* semantic value for command names */
  18: 
  19: # ifndef    WARN
  20: # define    WARN        0
  21: # define    FATAL       1
  22: # endif
  23: 
  24: /* CONSTANTS FOR THE GET_SCANNER CALL */
  25: # define    NORMAL      0   /* get a character from front */
  26: # define    PRIME       1   /* prime the front end */
  27: # define    SYNC        2   /* sync the front end */
  28: 
  29: /* CHARACTER TYPES */
  30: # define    ALPHA       1
  31: # define    NUMBR       2
  32: # define    OPATR       3
  33: # define    PUNCT       4
  34: # define    CNTRL       5
  35: 
  36: /* Modes for input from EQUEL front end */
  37: # define    CVAR_I2     '\1'    /* 2 byte integer */
  38: # define    CVAR_F8     '\4'    /* 8 byte floating number */
  39: # define    CVAR_S      '\3'    /* string with null byte */
  40: # define    CVAR_I4     '\6'    /* 4 byte integer */
  41: 
  42: /* Number of PAT_SPEC indices allowed.	*/
  43: /* Already defined in ovqp.h.		*/
  44: /* Temporarily defining here too.	*/
  45: # define    PATNUM      10
  46: 
  47: /* Bits used with Patspec_flag[] */
  48: # define    TARGBIT     1   /* Set when index used in target list */
  49: # define    QUALBIT     2   /* Set when index used in qual list */
  50: 
  51: /* KEYWORD and OPERATOR TABLE */
  52: struct optab                /* key word/operator tables */
  53: {
  54:     char    *term;          /* key word/operator body */
  55:     int token;          /* associated parser token */
  56:     int opcode;         /* associated parser opcode */
  57: };
  58: 
  59: /* SPECIAL TOKENS for scanner */
  60: struct special
  61: {
  62:     int sconst;
  63:     int bgncmnt;
  64:     int endcmnt;
  65:     int i2const;
  66:     int i4const;
  67:     int f4const;
  68:     int f8const;
  69:     int name;
  70: };
  71: 
  72: /* last token struct */
  73: struct lastok
  74: {
  75:     int toktyp;
  76:     char    *tok;
  77:     int tokop;
  78: };
  79: 
  80: /* declarations */
  81: struct special  Tokens;         /* special tokens table */
  82: struct optab    Optab[];        /* operator table */
  83: struct optab    Keyword[];      /* keyword table */
  84: struct lastok   Lastok;
  85: int     Opcode;         /* opcode for current token */
  86: int     Lcase;          /* UPPER->lower conversion flag */
  87: int     Pars;           /* flag for call to getcvar or not */
  88: int     Newline;        /* set if last char read was a newline */
  89: int     Cflag;          /* set if line of C-code recognized */
  90: int     Keyent;         /* number of entries in the Keyword table */
  91: unsigned    Patspec_flag[PATNUM];   /* Flag array for determining correct */
  92:                     /* usage of PAT_SPEC indices.	      */
  93:                     /* Patspec_flag[0] is not used.	      */
  94: 
  95: char        Sbuf[SBUFSIZ];      /* symbol table buffer */
  96: /*
  97: **	TRACE FLAG ASSIGNMENTS
  98: **	Comment, Expand		70
  99: **	Name, String		71
 100: **	Number, Yylex		72
 101: **	Operator		73
 102: **	Inout			74
 103: */

Defined variables

Cflag defined in line 89; never used
Keyent defined in line 90; used 1 times
Keyword defined in line 83; used 4 times
Newline defined in line 88; never used
Opcode defined in line 85; never used
Patspec_flag defined in line 91; used 8 times
Sbuf defined in line 95; used 2 times

Defined struct's

lastok defined in line 73; used 4 times
special defined in line 60; used 4 times

Defined macros

ALPHA defined in line 30; used 54 times
CVAR_F8 defined in line 38; never used
CVAR_I2 defined in line 37; never used
CVAR_I4 defined in line 40; never used
CVAR_S defined in line 39; never used
OPATR defined in line 32; used 32 times
PATNUM defined in line 45; used 5 times
PRIME defined in line 26; used 1 times
PUNCT defined in line 33; used 4 times
QUALBIT defined in line 49; used 2 times
SBUFSIZ defined in line 15; used 3 times
SYNC defined in line 27; used 1 times
TARGBIT defined in line 48; used 2 times

Usage of this include

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