Annotation of coherent/d/bin/lex/lex.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * lex.h
                      3:  */
                      4: #include <sys/mdata.h>
                      5: #include <stdio.h>
                      6: #include <ctype.h>
                      7: #include "lextype.h"
                      8: 
                      9: #ifdef MSDOS
                     10: #define OUTFILE "lex_yy.c"
                     11: #else
                     12: #define        OUTFILE "lex.yy.c"
                     13: #endif
                     14: 
                     15: /*
                     16:  * maximum size of automaton
                     17:  */
                     18: #define        ARRSZ   1000
                     19: 
                     20: /*
                     21:  * number of chars in a quantum of stringspace
                     22:  */
                     23: #define        NCBLK   16
                     24: 
                     25: /*
                     26:  * macros for manipulating bit-packed character classes
                     27:  */
                     28: #define        classindex(n)   ((n)/NBCHAR*(MAXUCHAR+1))
                     29: #define        classbit(n)     (1<<((n)&(NBCHAR-1)))
                     30: 
                     31: /*
                     32:  * check for octal digit
                     33:  */
                     34: #define        isoctl(c)       ('0'<=(c)&&(c)<='7')
                     35: 
                     36: /*
                     37:  * symbol storage
                     38:  */
                     39: struct def {
                     40:        struct  def *d_next;
                     41:        char    *d_name;
                     42:        int     d_data;
                     43: };
                     44: 
                     45: /*
                     46:  * types of input lines in the specification
                     47:  */
                     48: enum   {
                     49:        LN_DFLT,LN_LSPC,LN_CTXT,LN_SCON,
                     50:        LN_LCOM,LN_RCOM,LN_DLIM,LN_OPTN,LN_EOFL
                     51: };
                     52: 
                     53: /*
                     54:  * external declarations
                     55:  */
                     56: extern int     nxt;
                     57: extern int     yylval;
                     58: extern int     ltype;
                     59: extern int     inquotes;
                     60: extern int     indefs;
                     61: extern int     actn;
                     62: extern int     clas;
                     63: extern int     nfa[ARRSZ][2];
                     64: extern struct  def *defstart;
                     65: extern struct  def *ctxstart;
                     66: extern struct  def *scnstart;
                     67: extern unsigned char *classptr;
                     68: extern FILE    *filein;
                     69: extern FILE    *fileout;
                     70: extern char    opnerr[];
                     71: extern char    outmem[];
                     72: extern char    noactn[];
                     73: extern char    illchr[];
                     74: extern char    illnln[];
                     75: extern char    illrng[];
                     76: extern char    illoct[];
                     77: extern char    unddef[];
                     78: extern char    undctx[];
                     79: extern char    undstc[];
                     80: extern char    illstc[];
                     81: extern char    regsyn[];
                     82: extern char    rulsyn[];
                     83: extern char    actsyn[];
                     84: extern char    unmopr[];
                     85: extern char    reperr[];
                     86: extern char    eoferr[];
                     87: extern char    *alloc();
                     88: extern char    *ralloc();
                     89: extern char    *getident();
                     90: extern char    *malloc();
                     91: extern char    *realloc();

unix.superglobalmegacorp.com

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