Annotation of coherent/g/usr/lib/libl/auto.c, revision 1.1

1.1     ! root        1: #include "lexlib.h"
        !             2: #include "lextype.h"
        !             3: 
        !             4: char   yytext[YYTSIZE];
        !             5: struct ll_queue ll_tq;
        !             6: int *ll_ctxt = yy_lextab;
        !             7: int    ll_cc;
        !             8: int    ll_lc = '\n';
        !             9: int    ll_tf;
        !            10: int    ll_lf;
        !            11: int    ll_tokn;
        !            12: int    ll_tlen;
        !            13: int    ll_more;
        !            14: int    yyscon;
        !            15: int    yyleng;
        !            16: int    yyline;
        !            17: 
        !            18: char   inpovf[] = "input buffer overflow";
        !            19: char   yytovf[] = "yytext overflow";
        !            20: 
        !            21: _lltk()
        !            22: {
        !            23:        ll_tlen = 0;
        !            24:        ll_tokn = MAXINT;
        !            25:        {
        !            26:                register int **clist, **nlist, **llist;
        !            27:                register int **tlist;
        !            28:                register c;
        !            29: 
        !            30:                clist = yy_clist;
        !            31:                nlist = yy_nlist;
        !            32:                llist = yy_llist;
        !            33:        loop:
        !            34:                ll_cc = 0;
        !            35:                *clist++ = ll_ctxt;
        !            36:                *clist-- = NULL;
        !            37:                do {
        !            38:                        _llex(ll_cc, clist, nlist, llist);
        !            39:                        tlist = nlist;
        !            40:                        nlist = clist;
        !            41:                        clist = tlist;
        !            42:                        *nlist = NULL;
        !            43:                        if (*llist != NULL) {
        !            44:                                c = ll_cc;
        !            45:                                do {
        !            46:                                        _llex(c, llist, nlist, llist);
        !            47:                                        tlist = nlist;
        !            48:                                        nlist = llist;
        !            49:                                        llist = tlist;
        !            50:                                        *nlist = NULL;
        !            51:                                        ++c;
        !            52:                                } while (*llist != NULL);
        !            53:                        }
        !            54:                        ++ll_cc;
        !            55:                } while (*clist != NULL);
        !            56:                ll_tf = 0;
        !            57:                if (ll_tokn == MAXINT) {
        !            58:                        if ((c=(qct(ll_tq)?qgt(ll_tq):_llic())) == EOF) {
        !            59:                                ll_lc = '\n';
        !            60:                                return (0);
        !            61:                        }
        !            62:                        ll_lc = c;
        !            63:                        _lloc(c);
        !            64:                        goto loop;
        !            65:                }
        !            66:        }
        !            67:        {
        !            68:                register char *pc;
        !            69:                register i;
        !            70: 
        !            71:                pc = yytext;
        !            72:                if (ll_more) {
        !            73:                        pc += yyleng;
        !            74:                        ll_more = 0;
        !            75:                } else {
        !            76:                        yyleng = 0;
        !            77:                }
        !            78:                i = ll_tlen;
        !            79:                if ((yyleng += i) > sizeof(yytext))
        !            80:                                error(yytovf);
        !            81:                while (i--)
        !            82:                        *pc++ = qgt(ll_tq);
        !            83:                *pc = '\0';
        !            84:                if (pc-- > yytext)
        !            85:                        ll_lc = *pc;
        !            86:        }
        !            87:        return (ll_tokn);
        !            88: }
        !            89: 
        !            90: _llex(n, clist, nlist, llist)
        !            91: int **clist, **nlist, **llist;
        !            92: {
        !            93:        register int **listp, *statep;
        !            94:        register int c;
        !            95:        register int **clistp;
        !            96: 
        !            97:        c = MAXUCHAR + 1;
        !            98:        clistp = clist;
        !            99:        while ((statep=*clistp++) != NULL) {
        !           100:                switch (*statep & LR_MASK) {
        !           101:                _list:
        !           102:                        while (*listp != statep)
        !           103:                                if (*listp++ == NULL) {
        !           104:                                        *listp-- = NULL;
        !           105:                                        *listp = statep;
        !           106:                                        break;
        !           107:                                }
        !           108:                        break;
        !           109:                _look:
        !           110:                        --clistp;
        !           111:                        if (qct(ll_tq) <= n)
        !           112:                                if (n >= QSIZE)
        !           113:                                        error(inpovf);
        !           114:                                else
        !           115:                                        qpt(ll_tq, c=_llic());
        !           116:                        else
        !           117:                                c = qlk(ll_tq, n);
        !           118:                        break;
        !           119:                case LX_STOP:
        !           120:                        break;
        !           121:                case LX_LINK:
        !           122:                        ++statep;
        !           123:                        listp = clist;
        !           124:                        while (*listp != statep)
        !           125:                                if (*listp++ == NULL) {
        !           126:                                        *listp-- = NULL;
        !           127:                                        *listp = statep;
        !           128:                                        break;
        !           129:                                }
        !           130:                        --statep;
        !           131:                case LX_JUMP:
        !           132:                        statep += *statep >> LR_SHFT;
        !           133:                        listp = clist;
        !           134:                        goto _list;
        !           135:                case LX_LOOK:
        !           136:                        ++statep;
        !           137:                        listp = llist;
        !           138:                        goto _list;
        !           139:                case LX_ACPT:
        !           140:                        if ((*statep>>LR_SHFT)<ll_tokn || ll_cc>ll_tlen)
        !           141:                                if (ll_tf == 0
        !           142:                                ||  ll_cc < ll_lf
        !           143:                                ||  ll_tf > *statep
        !           144:                                   ){
        !           145:                                        ll_tokn = (*statep>>LR_SHFT);
        !           146:                                        ll_tlen = ll_cc;
        !           147:                                }
        !           148:                        break;
        !           149:                case LX_CHAR:
        !           150:                        if (c > MAXUCHAR)
        !           151:                                goto _look;
        !           152:                        if (c == (*statep++>>LR_SHFT)) {
        !           153:                                listp = nlist;
        !           154:                                goto _list;
        !           155:                        }
        !           156:                        break;
        !           157:                case LX_CLAS:
        !           158:                        if (c > MAXUCHAR)
        !           159:                                goto _look;
        !           160:                        if (c & ~MAXUCHAR)
        !           161:                                break;
        !           162:                        if (yy_lxctab[(*statep>>LR_SHFT)*((MAXUCHAR+1)/NBINT)
        !           163:                            +(c/NBINT)] & yy_lxbtab[c&((1<<LOGINT)-1)]) {
        !           164:                                ++statep;
        !           165:                                listp = nlist;
        !           166:                                goto _list;
        !           167:                        }
        !           168:                        break;
        !           169:                case LX_BLIN:
        !           170:                        if (ll_lc == '\n') {
        !           171:                                ++statep;
        !           172:                                listp = clist;
        !           173:                                goto _list;
        !           174:                        }
        !           175:                        break;
        !           176:                case LX_ELIN:
        !           177:                        if (c > MAXUCHAR)
        !           178:                                goto _look;
        !           179:                        if (c=='\n' || c==EOF) {
        !           180:                                ++statep;
        !           181:                                listp = clist;
        !           182:                                goto _list;
        !           183:                        }
        !           184:                        break;
        !           185:                case LX_ANYC:
        !           186:                        if (c > MAXUCHAR)
        !           187:                                goto _look;
        !           188:                        if (c!='\n' && c!=EOF) {
        !           189:                                ++statep;
        !           190:                                listp = nlist;
        !           191:                                goto _list;
        !           192:                        }
        !           193:                        break;
        !           194:                case LX_SCON:
        !           195:                        if (yyscon == (*statep++>>LR_SHFT)) {
        !           196:                                listp = clist;
        !           197:                                goto _list;
        !           198:                        }
        !           199:                        break;
        !           200:                }
        !           201:        }
        !           202: }

unix.superglobalmegacorp.com

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