Annotation of 43BSD/ingres/source/parser/scanner.h, revision 1.1.1.1

1.1       root        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: */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.