IMD 1.17: 19/01/2010 20:40:49 lex  >!<UniFLEX Backup timesRepeat: [file space]. file print: count; tab; print: nwords. totalWords _ totalWords + nwords. totalInstances _ totalInstances + count]. file cr; cr; print: totalInstances; tab; print: totalWords. file close! !  jTektronix 44042  !"#$%&'()*+,-./01234('&%$#"!  >3 ? >objectTally.st. _ڌ O<^@ T\-z-z 0SxʰCz5  >1Checkerclass-printInstanceCounts.st. _ڌ O<^@ T\W-z 0SxʰCz'From Tektronix Smalltalk-80 version TB2.2.2 of Nov 11, 1987, 09:00:13. on 18 November 1987 at 7:08:22 am'! !Behavior methodsFor: 'accessing'! methodDictionary ^methodDict! ! Object subclass: #ObjectTally instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'System-Support'! "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "! ObjectTally class instanceVariableNames: 'objectTally selectorText newMethods '! !ObjectTally class methodsFor: 'class initialization'!'From Tektronix Smalltalk-80 version TB2.2.2 of Nov 11, 1987, 09:00:13. on 18 November 1987 at 5:49:28 am'! !Checker class methodsFor: 'printing checks'! printInstanceCounts "Checker printInstanceCounts. (Disk file: 'Instance.counts') edit." | file totalWords totalInstances | file _ Disk file: 'Instance.counts'. Smalltalk timeStamp: file. totalWords _ totalInstances _ 0. Checker instanceCountsAndSpaceDo: [:class :count :nwords | file cr; nextPutAll: class name. (25 - class name size) initialize "ObjectTally initialize." objectTally _ nil. selectorText _ nil! ! !ObjectTally class methodsFor: 'instance creation'! spyOn: aBlock | returnValue | objectTally _ nil. self installMethods. aBlock value. self removeMethods. returnValue _ self objectTally copy. objectTally _ nil. ^returnValue! ! !ObjectTally class methodsFor: 'accessing'! newMethods newMethods == nil ifTrue: [newMethods _ self computeNewMethods]. ^newMethods! objectTally objectTally == nil ifTrue: [objectTally _ Dictionary new]. ^objectTally! selectorText selectorText == nil ifTrue: [selectorText _ self computeSelectorText]. ^selectorText! ! !ObjectTally class methodsFor: 'private'! computeNewMethods | dict | dict _ Dictionary new. dict at: #basicNew put: (Behavior methodDictionary at: #basicNew). dict at: #basicNew: put: (Behavior methodDictionary at: #basicNew:). ^dict! computeSelectorText | dict | dict _ Dictionary new. dict at: #objectTallyBasicNew put: 'objectTallyBasicNew 5ObjectTally.st. _ڌ O<^@ T\-z-z 0SxʰCzrimitive: 70> self isVariable ifTrue: [^self basicNew: 0]. self primitiveFailed'. dict at: #objectTallyBasicNew: put: 'objectTallyBasicNew: anInteger self primitiveFailed'. dict at: #basicNew put: 'basicNew objectDictionary _ ObjectTally objectTally. classCount _ objectDictionary at: self class ifAbsent: [objectDictionary at: self class put: 0]. objectDictionary at: self class put: classCount + 1. ^self objectTallyBasicNew'. dict at: #basicNew: put: 'basicNew: anInteger obj'From Tektronix Smalltalk-80 version TB2.2.2 of Nov 11, 1987, 09:00:13. on 18 November 1987 at 6:52:58 am'! Object subclass: #ObjectTally instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'System-Support'! "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "! ObjectTally class instanceVariableNames: 'objectTally selectorText '! !ObjectTally class methodsFor: 'class initialization'! initialize "ObjectTally initialize." objectTally _ nil. selectorText _ nil! ! ectDictionary _ ObjectTally objectTally. classCount _ objectDictionary at: self class ifAbsent: [objectDictionary at: self class put: 0]. objectDictionary at: self class put: classCount + 1. ^self objectTallyBasicNew: anInteger'. ^dict! installMethods self newMethods. self selectorText do: [ :string | Behavior compileUnchecked: string]! removeMethods self newMethods associationsDo: [:assoc | Behavior addSelectorUnchecked: assoc key withMethod: assoc value]. self selectorText keysDo: [:key | Behavi !ObjectTally class methodsFor: 'instance creation'! spyOn: aBlock | returnValue | objectTally _ nil. self installMethods. aBlock value. self removeMethods. returnValue _ self objectTally copy. objectTally _ nil. ^returnValue! ! !ObjectTally class methodsFor: 'accessing'! objectTally objectTally == nil ifTrue: [objectTally _ Dictionary new]. ^objectTally! selectorText selectorText == nil ifTrue: [selectorText _ self computeSelectorText]. ^selectorText! ! !ObjectTally class methodsFor removeSelectorUnchecked: key]! ! ObjectTally initialize! or: 'private'! computeSelectorText | dict | dict _ Dictionary new. dict at: #objectTallyBasicNew put: 'objectTallyBasicNew self isVariable ifTrue: [^self basicNew: 0]. self primitiveFailed'. dict at: #objectTallyBasicNew: put: 'objectTallyBasicNew: anInteger self primitiveFailed'. dict at: #fred put: 'fred objectDictionary _ ObjectTally objectTally. classCount _ objectDictionary at: self class ifAbsent: [objectDictionary at: self class put: 0]. objectDictionary at: self class put: classCount + 1. ^self objectTallyBasicNew'. ^dict! installMethods self selectorText do: [ :string | Behavior compileUnchecked: string]! removeMethods self selectorText keysDo: [ :key | Behavior removeSelectorUnchecked: key]! ! ObjectTally initialize! unt _ objectDictionary at: self class ifAbsent: [objectDictionary at: self class put: 0]. objectDictionary at: self class put: classCount + 1. ^self objectTallyBasicNew'. dict at: #basicNew: put: 'basicNew: anInteger objtag && *tag != '\0' && tag != NULL) { _doprnt (ERROR_pr_rtag, &tag, out_stream); } else { _doprnt (ERROR_pr_nl, NULL, out_stream); } if (srcfile) { _doprnt (ERROR_pr_line, &linenum, out_stream); _doprnt (ERROR_pr_file, &srcfile, out_stream); } (void) fflush (out_stream); if (out_stream == stderr) { out_stream->_cnt= 0; out_stream->_flag = _IOWRT | _IONBF; } abort (); break; default : /* Other error code. */ if (out_code != NO_PR && err_msg[0] != NULL) { _do#F-d\gټҝ4  >5ObjectTally.st.jectTally.stObjectTally.stprnt (ERROR_pr_pgm, &_pgmname, out_stream); _doprnt (err_msg, &args, out_stream); if (pr_tag && *tag != '\0' && tag != NULL) { _doprnt (ERROR_pr_rtag, &tag, out_stream); } else { _doprnt (ERROR_pr_nl, NULL, out_stream); } PLACE; (void) fflush (out_stream); if (out_stream == stderr) { out_stream->_cnt= 0; out_stream->_flag = _IOWRT | _IONBF; } } } } _doprnt(fmt,argv,stream) register char *fmt; unsigned int *argv; register FILE *stream; { fprintf(stream,"; } if (pr_tag) { if (tag == NULL || *tag == '\0') { _doprnt (" (sys%d)\n", &save_errno, out_stream); } else { _doprnt (ERROR_pr_rtag, &tag, out_stream); } } else { _doprnt (ERROR_pr_nl, NULL, out_stream); } PLACE; (void) fflush (out_stream); } if (out_stream == stderr) { out_stream->_cnt= 0; out_stream->_flag = _IOWRT | _IONBF; } if (exit_code == P_ERR) { exit (P_ERR); } break; case USAGE : /* Usage error, abort processing. */ if (out__doprint: %s\n",fmt); } ine_set = 0; /* Global verbose flag. */ register int pr_tag = 1; /* Global tag flag. */ /* * These are strings for sharing in messages. */ char *ERROR_pr_rtag = " (%s)\n"; char *ERROR_pr_nl = "\n"; char *ERROR_pr_line = "\tAt line %d "; char *ERROR_pr_file = "in Source file %s\n"; char *ERROR_pr_pgm = "%s : "; save_errno = errno; _last_err = exit_code; /* * Set the output stream depending upon the output code. */ if (out_code == PR_STDOUT) { out_stream = stcode != NO_PR) { _doprnt ("%s : usage : ", &_pgmname, out_stream); _doprnt ("%s ", &_pgmname, out_stream); _doprnt (err_msg, &args, out_stream); putc ('\n', out_stream); PLACE; (void) fflush (out_stream); } if (out_stream == stderr) { out_stream->_cnt= 0; out_stream->_flag = _IOWRT | _IONBF; } exit (USAGE); break; case INTERNAL: /* Internal error, dump core. */ _doprnt ("%s : INTERNAL ERROR : ", &_pgmname, out_stream); _doprnt (err_msg, &args, out_stream); if (pr_   5Makefile. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCze"# experimental Makefile # files needed in this directory: # ERROR.c Makefile Makefile.billw Makefile.hammer # errdefs.h extra.c header.c ldefs.c lmain.c ncform # parser.y sub1.c sub2.c CFORM = ncform RFORM = ncform DFORMS = '+DCFORM="$(CFORM)"' '+DRFORM="$(RFORM)"' # do NOT warn about duplicate definitions in CFLAGS CFLAGS = +Os OBJS = lmain.r parser.r sub1.r sub2.r header.r ERROR.r EXTRAOBJS= extra.r PGM = lex .SUFFIXES: .SUFFIXES: .c .r .y .l .null .c.r: $(CC) $(CFLAGS) +r $(DFORMS) $< .l.nullRMS) y.tab.c move y.tab.r $@ $(PGM): $(INCL) $(OBJS) $(CC) $(CFLAGS) $(DFORMS) +o=$(PGM) $(OBJS) all: $(PGM) main.r yywrap.r +r $(DFORMS) y.tab.c move y.tab.r $@ $(PGM): $(OBJS) $(CC) $(CFLAGS) $(DFORMS) +o=$(PGM) $(OBJS) all: $(PGM) extra.r (void) fflush (out_stream); if (out_stream == stderr) { out_stream->_cnt= 0; out_stream->_flag = _IOWRT | _IONBF; } abort (); break; default : /* Other error code. */ if (out_code != NO_PR && err_msg[0] != NULL) { _do: lex $*.l move lex.yy.c lex.$*.c $(CC) $(CFLAGS) +o=$*.null lex.$*.c extra.r copy $*.null $* .y.r: yacc $< $(CC) $(CFLAGS) +r $(DFORMS) y.tab.c move y.tab.r $@ $(PGM): $(OBJS) $(CC) $(CFLAGS) $(DFORMS) +o=$(PGM) $(OBJS) all: $(PGM) extra.r (void) fflush (out_stream); if (out_stream == stderr) { out_stream->_cnt= 0; out_stream->_flag = _IOWRT | _IONBF; } abort (); break; default : /* Other error code. */ if (out_code != NO_PR && err_msg[0] != NULL) { _doy z  5Makefile.old. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzd"   5Makefile.1. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCz1"# # Makefile template for utilities ported to Merlin. This form # is based on "ECS Mid-Range Software Standards", by Anne Jacko; # additions have been made for specific cases not covered by the # general rules. # Paul K. Hyder {tekecs!hyder} 14 June 1983 # $Header: Makefile,v 1.15 84/04/11 13:17:32 jimd Exp $ # $Locker: $ # # Standard variables defined. # DESTDIR - Destination directory, default is the vax/unix tree # EXTLIBS - External libraries. This is the whole path name of all # librar# see Makefile.old for documentation LIB = /sys/usr/lib/lex CFORM = $(LIB)/ncform RFORM = $(LIB)/nrform DFORMS = '+DCFORM="$(CFORM)"' '+DRFORM="$(RFORM)"' CFLAGS = +Osw DESTDIR = /bin HDRS = errdefs.h /usr/include/signal.h ldefs.c\ once.c INCL = ldefs.c once.c OBJS = lmain.r parser.r sub1.r sub2.r header.r ERROR.r PGM = lex SRCS = lmain.c parser.y sub1.c sub2.c header.c ERROR.c .SUFFIXES: .SUFFIXES: .c .r .y .c.r: $(CC) $(CFLAGS) +r $(DFORMS) $< .y.r: yacc $< $(CC) $(CFLAGS) +r $(DFOies used from other directories, it must use # the entire path name. # GROUP - The complete '-g groupname' option for the install script. # HDRS - Header files, .h files from this directory and other # directories. The use of 'make depend' inserts all # headers into this makefile. # INCL - Local include file listing. Used by clean and print # for specific files. Maintained manually. # IOPTS - compiler -I options listing. # LIBS - Libraries found in this directory. # LDFLAGS - Loader flags. Note that the full name of the -l* # libraries uses should be in either LIBS or EXTLIBS. # LPR - Line printer utility call. This is sometimes a # call to something other than 'lpr'. # OBJS - Names of compiled object files. # OLDDIR - Directory for relocation of the previous version. # OWNER - The complete '-o ownername' option for the install script. # PGM - The name of the utility being made. There are no # mixed multiple program makefiles in the utilities. # If multiple = pr SRCS = lmain.c parser.y sub1.c sub2.c header.c STATE = -sExp TESTDIR = ../../Tests TESTS = lex.1 WHICH = pathof XAS = /merlin/tools/bin/a16 XCC = /merlin/tools/bin/c16 XDESTDIR = /merlin/disks/current XTESTDIR = /merlin/disks/TESTS1.1 XCFLAGS = $(CFLAGS) -k .c.o: $(CC) $(CFLAGS) $(DFORMS) -c $< .c,v.o: $(CO) $(COFLAGS) $< $(CC) $(CFLAGS) $(DFORMS) -c $*.o $(PGM): $(INCL) rcsid.o $(OBJS) $(LIBS) $(EXTLIBS) $(CC) $(CFLAGS) $(DFORMS) -o $(PGM) $(OBJS) rcsid.o $(LDFLAGS) all programs are to be made use PGMS and # add explicit targets for the listed programs. # PREFIX - The complete '+p prefix' option for the install script. # PREV - Previous version make flag. # PRINT - Printing utility to be used. # SRCS - Names of the source files combined to make PGM. # STATE - State of the made version (RCS). # TESTS - Names of the test scripts. There must be at least # one test. # WHICH - Location utility in use on this system. # X* - Programs specific to cross code: $(PGM) clean: rcsin $(INCL) $(SRCS) rcsid.c $(PGM).tp $(TESTS) -rm -f $(SRCS) $(INCL) $(OBJS) $(PGM) documents \ $(PGM).tp testlog $(TESTS) rcsid.[co] depend: $(SRCS) $(INCL) # Compare SRCS includes to *HDRS and comment or correct # depending on option flag. makedepend -fix "$(IOPTS)" $(SRCS) documents: $(PGM).tp -ms $(PGM).tp > documents index: ctags -wx $(HDRS) $(SRCS) install: $(PGM) $(FORMS) # Use the new modified install script. # This should be without the copy (-c) option generation on the # vax. Use 'make xall' to make cross code binaries. # # Make defines these variables. (MAKE MUST INCLUDE RCS HANDLING.) #Consult make(1) for complete variable information. Those of #importance are annotated below. # AS - Assembler used by default rules. # CC - C compiler used by default rules. # CFLAGS - C compiler option flags. # CO - Version control checkout. # COFLAGS - Checkout option flags. # LFLAGS - Lex option flags. (N.B. this is not LDFLAGS.) # LOADLIBES - Berekely stand. -mv -f $(DESTDIR)/$(PGM) $(DESTDIR)/$(OLDDIR) -mv -f $(LIB)/ncform $(LIB)/$(OLDDIR) -mv -f $(LIB)/nrform $(LIB)/$(OLDDIR) install $(PREFIX) -s $(OWNER) $(GROUP) $(PGM) $(DESTDIR) install $(PREFIX) $(OWNER) $(GROUP) ncform $(LIB) install $(PREFIX) $(OWNER) $(GROUP) nrform $(LIB) prev: clean mkprev $(PREV) rcsid.c make $(PGM) print: $(SRCS) $(INCL) documents $(PRINT) documents $(SRCS) $(INCL) Makefile | $(LPR) touch printnew printnew: documents $(SRCS) $(INCL) $(PRINT) $? Makefilard keyword, this makefile uses *LIBS. # # XXFLAGS = DFORMS = '-DCFORM="$(CFORM)"' '-DRFORM="$(RFORM)"' CFLAGS = -O -w $(XXFLAGS) DESTDIR = /bin LIB = /usr/lib/lex CFORM = $(LIB)/ncform RFORM = $(LIB)/nrform FORMS = ncform nrform EXTLIBS = GROUP = HDRS = /usr/include/errdefs.h /usr/include/signal.h ldefs.c\ once.c INCL = ldefs.c once.c IOPTS = LIBS = LDFLAGS = LPR = lpr -Plpw OBJS = lmain.o parser.o sub1.o sub2.o header.o OLDDIR = OLD OWNER = -o sys PGM = lex PREFIX = +p mr- PREV = -r PRINTe | $(LPR) touch printnew rcsid.o: rcsid.c rcsid.c: $(SRCS) $(HDRS) $(LIBS) $(EXTLIBS) mklog -f "$(EXTLIBS) $(HDRS) `$(WHICH) $(CC)`" $(STATE) rcsid.c $(SRCS) $(INCL) $(LIBS) state: clean make all STATE=$(STATE) tags: $(HDRS) $(SRCS) @ctags -w $(HDRS) $(SRCS) update: $(DESTDIR)/$(PGM) $(DESTDIR)/$(PGM): $(SRCS) $(LIBS) $(HDRS) $(EXTLIBS) @make clean @make DESTDIR=$(DESTDIR) install xall: $(TESTS) $(FORMS) @make DESTDIR=$(XDESTDIR)$(DESTDIR) CC=$(XCC) AS=$(XAS) "CFLAGS=$(XCFLAGS)" -mv -f $(XDESTDIR)$(DESTDIR)/$(PGM) $(XDESTDIR)$(DESTDIR)/$(OLDDIR) -mv -f $(XDESTDIR)$(RFORM) $(XDESTDIR)$(LIB)/$(OLDDIR) -mv -f $(XDESTDIR)$(CFORM) $(XDESTDIR)$(LIB)/$(OLDDIR) install $(PREFIX) $(OWNER) $(GROUP) $(PGM) $(XDESTDIR)$(DESTDIR) install $(PREFIX) $(OWNER) $(GROUP) nrform $(XDESTDIR)$(LIB) install $(PREFIX) $(OWNER) $(GROUP) ncform $(XDESTDIR)$(LIB) # PGM - The name of the utility being made. There are no # mixed multiple program makefiles in the utilities. # If multipleD E  errdefs.h. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzh"    calloc.c. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzc"/* * errdefs.h - Exit codes, output codes, and macro definition for ERROR, * the error handling routine. * * David C. Elliott - ECS * * $Header: errdefs.h,v 1.8 85/12/09 15:51:12 davep Exp $ * */ #define NO_ERRS 0 /* Everything worked as expected. */ /* 1-9 Reserved for meaningful returns ala grep and cmp. */ #define NO_CMD 121 /* Shell could not find command. */ #define NP_WARN 122 /* non-perror warning, processing continued. */ #de/* @(#)calloc.c 4.1 (Berkeley) 12/21/80 */ /* * calloc * * $Header: calloc.c,v 1.4 86/09/02 17:18:05 julia Exp $ * $Locker: $ * * Modifications from Berkeley 4.2 BSD * Copyright (c) 1983, 1985 Tektronix Inc. * All Rights Reserved * */ /* calloc - allocate and clear memory block */ #include #define CHARPERINT (sizeof(int)/sizeof(char)) char * calloc(num, size) unsigned num, size; { register char *mp; char *malloc(); register int *q; register m; unsigned i; char nonzeroFlag = 0; fine NP_ERR 123 /* non-perror error occurred, processing aborted. */ #define P_WARN 124 /* Perror was called, processing continued. */ #define P_ERR 125 /* Perror was called, processing aborted. */ #define USAGE 126 /* Incorrect syntax, usage message issued. */ #define INTERNAL 127 /* Internal error, should not have occurred. */ #define MAXERRMSG 80 /* * Output codes : DO NOT USE ANYTHING OTHER THAN THESE FOR OUTPUT CODES! * These are used fprintf(stderr,"calloc,num,size = %d %d", num,size); num *= size; mp = malloc(num); fprintf(stderr," mp = 0x%x",mp); if(mp == NULL) return(NULL); /* bzero (mp, num); */ for(i=0; i< num; i++) { nonzeroFlag |= mp[i]; mp[i] = 0; } fprintf(stderr," nonzeroFlag = 0x%x\n", nonzeroFlag); return(mp); } cfree(p, num, size) char *p; unsigned num, size; { fprintf(stderr,"cfree: num,size,p = %d %d 0x%x\n",num,size,p); free(p); } ake DESTDIR=$(XDESTDIR)$(DESTDIR) CC=$(XCC) AS=$(XAS) "CFLAGS=$(XCFLAGS)" to pass the filename and linenumber to the * error handler. */ #ifdef ERROR_DEBUG #define O_ERR 0,__FILE__,__LINE__ /* Print message on stderr only. */ #define O_ERROUT 1,__FILE__,__LINE__ /* Print message on stderr and stdout.*/ #define NO_OUT -1,__FILE__,__LINE__ /* Don't print message;set error num. */ #else #define O_ERR 0,(char *) 0,(char *) 0 /* Print message on stderr only. */ #define O_ERROUT 1,(char *) 0,(char *) 0 /* Print message on stderr and stdout.*/ #define NO_OUT -1,(char *) 0,(char *) 0 /* Don't print message;set error num. */ #endif he listed programs. # PREFIX - The complete '+p prefix' option for the install script. # PREV - Previous version make flag. # PRINT - Printing utility to be used. # SRCS - Names of the source files combined to make PGM. # STATE - State of the made version (RCS). # TESTS - Names of the test scripts. There must be at least # one test. # WHICH - Location utility in use on this system. # X* - Programs specific to cross code# include "stdio.h" # define U(x) x # define NLSTATE yyprevious=YYNEWLINE # define BEGIN yybgin = yysvec + 1 + # define INITIAL 0 # define YYLERR yysvec # define YYSTATE (yyestate-yysvec-1) # define YYOPTIM 1 # define YYLMAX 200 # define output(c) putc(c,yyout) # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar) # define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;} # define yymore() (yymorfg=1) # define ECHO fprintf(yf g  extra.c. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzc"yout, "%s",yytext) # define REJECT { nstr = yyreject(); goto yyfussy;} int yyleng; extern char yytext[]; int yymorfg; extern char *yysptr, yysbuf[]; int yytchar; FILE *yyin ={stdin}, *yyout ={stdout}; extern int yylineno; struct yysvf { struct yywork *yystoff; struct yysvf *yyother; int *yystops;}; struct yysvf *yyestate; extern struct yysvf yysvec[], *yybgin; # define YYNEWLINE 10 yylex(){ int nstr; extern int yyprevious; while((nstr = yylook()) >= 0) yyfussy: switch(nstr){ case 0: if(yywrap()) return(#include "stdio.h" #include "errdefs.h" main() { yylex(); exit(NO_ERRS); } yywrap() { return(1); } g routine. * * David C. Elliott - ECS * * $Header: errdefs.h,v 1.8 85/12/09 15:51:12 davep Exp $ * */ #define NO_ERRS 0 /* Everything worked as expected. */ /* 1-9 Reserved for meaningful returns ala grep and cmp. */ #define NO_CMD 121 /* Shell could not find command. */ #define NP_WARN 122 /* non-perror warning, processing continued. */ #de0); break; case 1: printf("A"); break; case -1: break; default: fprintf(yyout,"bad switch yylook %d",nstr); } return(0); } /* end of yylex */ int yyvstop[] ={ 0, 1, 0, 0}; # define YYTYPE char struct yywork { YYTYPE verify, advance; } yycrank[] ={ 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0    hamlex.yy.c. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzc",0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,3, 0,0, 0,0}; struct yysvf yysvec[] ={ 0, 0, 0, yycrank+1, 0, 0, yycrank+0, yysvec+1, 0, yycrank+0, 0, yyvstop+1, 0, 0, 0}; struct yywork *yytop = yycrank+98; struct yysvf *yybgin = yysvec+1; char yymatch[] ={ 00 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01  ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 t)yyt > (int)yycrank){ yyt = yyr + yych; if (yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transitions */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } } # ifdef YYOPTIM else if((int)yyt < (int)yycrank) { /* r < yycrank */ yyt = yyr = yycrank+(yycrank-yyt); # ifdef LEXDEBUG if(debug)fprintf(yyout,"compressed state\n"); # endif yyt = yyt + yych; if(yyt <= yytop && yyt->v ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 0}; char yyextra[] ={ 0,0,0,0,0,0,0,0, 0}; /* * * Modifications from Berkeley 4.1c BSD * Copyright (c) 1983, Tektronix Inc. * All Rights Reserved * * * This file contains code which is included in output generated * by lex when C source is generated. */ int yylineno =1; # define YYU(x) x # define NLSTATE yyprevious=YYNEWLINE char yytext[YYLMAX]; struct yysvf *yylstate [YYLMAX], **yylsp, **yyolsp; cherify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transitions */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } yyt = yyr + YYU(yymatch[yych]); # ifdef LEXDEBUG if(debug){ fprintf(yyout,"try fall back character "); allprint(YYU(yymatch[yych])); putchar('\n'); } # endif if(yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transition */ {unput(*--ar yysbuf[YYLMAX]; char *yysptr = yysbuf; int *yyfnd; extern struct yysvf *yyestate; int yyprevious = YYNEWLINE; yylook(){ register struct yysvf *yystate, **lsp; register struct yywork *yyt; struct yysvf *yyz; register int yych; struct yywork *yyr; # ifdef LEXDEBUG register int debug; # endif char *yylastch; /* start off machines */ # ifdef LEXDEBUG debug = 0; # endif if (!yymorfg) yylastch = yytext; else { yymorfg=0; yylastch = yytext+yyleng; } for(;;){ lsp = yylstate; yyestate = yyyylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } } if ((yystate = yystate->yyother) && (yyt= yystate->yystoff) != yycrank){ # ifdef LEXDEBUG if(debug)fprintf(yyout,"fall back to state %d\n",yystate-yysvec-1); # endif goto tryagain; } # endif else {unput(*--yylastch);break;} contin: # ifdef LEXDEBUG if(debug){ fprintf(yyout,"state %d char ",yystate-yysvec-1); allprint(yych); putchar('\n'); } # endif ; } # ifdef LEXDEBstate = yybgin; if (yyprevious==YYNEWLINE) yystate++; for (;;){ # ifdef LEXDEBUG if(debug)fprintf(yyout,"state %d\n",yystate-yysvec-1); # endif yyt = yystate->yystoff; if(yyt == yycrank){ /* may not be any transitions */ yyz = yystate->yyother; if(yyz == 0)break; if(yyz->yystoff == yycrank)break; } *yylastch++ = yych = input(); tryagain: # ifdef LEXDEBUG if(debug){ fprintf(yyout,"char "); allprint(yych); putchar('\n'); } # endif yyr = yyt; if ( (inUG if(debug){ fprintf(yyout,"stopped at %d with ",*(lsp-1)-yysvec-1); allprint(yych); putchar('\n'); } # endif while (lsp-- > yylstate){ *yylastch-- = 0; if (*lsp != 0 && (yyfnd= (*lsp)->yystops) && *yyfnd > 0){ yyolsp = lsp; if(yyextra[*yyfnd]){ /* must backup */ while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate){ lsp--; unput(*yylastch--); } } yyprevious = YYU(*yylastch); yylsp = lsp; yyleng = yylastch-yytext+1; yytext[yyleng] = 0; # ifdef LEXDEBUG if(debug){ fprintf(yyout,"\nmatch "); sprint(yytext); fprintf(yyout," action %d\n",*yyfnd); } # endif return(*yyfnd++); } unput(*yylastch); } if (yytext[0] == 0 /* && feof(yyin) */) { yysptr=yysbuf; return(0); } yyprevious = yytext[0] = input(); if (yyprevious>0) output(yyprevious); yylastch=yytext; # ifdef LEXDEBUG if(debug)putchar('\n'); # endif } } yyback(p, m) register int *p; { if (p==0) return(0); while (*yout, "%s",yytext) # define REJECT { nstr = yyreject(); goto yyfussy;} int yyleng; extern char yytext[]; int yymorfg; extern char *yysptr, yysbuf[]; int yytchar; FILE *yyin ={stdin}, *yyout ={stdout}; extern int yylineno; struct yysvf { struct yywork *yystoff; struct yysvf *yyother; int *yystops;}; struct yysvf *yyestate; extern struct yysvf yysvec[], *yybgin; # define YYNEWLINE 10 main() { yylex(); exit(0); } yywrap() { return(1); } yylex(){ int nstr; extern int yyprevious; while((nstr = yylook())p) { if (*p++ == m) return(1); } return(0); } /* the following are only used in the lex library */ yyinput(){ return(input()); } yyoutput(c) int c; { output(c); } yyunput(c) int c; { unput(c); } Tektronix Inc. * All Rights Reserved * * * This file contains code which is included in output generated * by lex when C source is generated. */ int yylineno =1; # define YYU(x) x # define NLSTATE yyprevious=YYNEWLINE char yytext[YYLMAX]; struct yysvf *yylstate [YYLMAX], **yylsp, **yyolsp; ch >= 0) yyfussy: switch(nstr){ case 0: if(yywrap()) return(0); break; case 1: printf("A"); break; case -1: break; default: fprintf(yyout,"bad switch yylook %d",nstr); } return(0); } /* end of yylex */ int yyvstop[] ={ 0, 1, 0, 0}; # define YYTYPE char struct yywork { YYTYPE verify, advance; } yycrank[] ={ 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0=  >  hamprintlex.yy.c. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzc",0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,3, 0,0, 0,0}; struct yysvf yysvec[] ={ 0, 0, 0, yycrank+1, 0, 0, yycrank+0, yysvec+1, 0, yycrank+0, 0, yyvstop+1, 0, 0, 0}; struct yywork *yytop = yycrank+98; struct yysvf *yybgin = yysvec+1; char# include "stdio.h" # define U(x) x # define NLSTATE yyprevious=YYNEWLINE # define BEGIN yybgin = yysvec + 1 + # define INITIAL 0 # define YYLERR yysvec # define YYSTATE (yyestate-yysvec-1) # define YYOPTIM 1 # define YYLMAX 200 # define output(c) putc(c,yyout) # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar) # define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;} # define yymore() (yymorfg=1) # define ECHO fprintf(y yymatch[] ={ 00 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 0}; char yyextra[] ={ 0,0,0,0,0,0,0,0, 0}; /* * * Modifications from Berkeley 4.1c BSD * Copyright (c) 1983, Tektronix Inc. * All Rights Reserved * * * This file contains code which is included in output generated * by lex when C source is generated. */ int yylineno =1; # define YYU(x) x # define NLSTATE yyprevious=YYNEWLINE char yytext[YYLMAe+yysvec == YYLERR) /* error transition */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } } if ((yystate = yystate->yyother) && (yyt= yystate->yystoff) != yycrank){ goto tryagain; } else {unput(*--yylastch);break;} contin: ; } while (lsp-- > yylstate){ *yylastch-- = 0; if (*lsp != 0 && (yyfnd= (*lsp)->yystops) && *yyfnd>0){ yyolsp = lsp; if(yyextra[*yyfnd]){ /* must backup */ while(yyback((X]; struct yysvf *yylstate [YYLMAX], **yylsp, **yyolsp; char yysbuf[YYLMAX]; char *yysptr = yysbuf; int *yyfnd; extern struct yysvf *yyestate; int yyprevious = YYNEWLINE; yylook(){ register struct yysvf *yystate, **lsp; register struct yywork *yyt; struct yysvf *yyz; register int yych; struct yywork *yyr; char *yylastch; /* start off machines */ if (!yymorfg) yylastch = yytext; else { yymorfg=0; yylastch = yytext+yyleng; } for(;;){ lsp = yylstate; yyestate = yystate = yybgin; if (yyp*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate){ lsp--; unput(*yylastch--); } } yyprevious = YYU(*yylastch); yylsp = lsp; yyleng = yylastch-yytext+1; yytext[yyleng] = 0; return(*yyfnd++); } unput(*yylastch); } if (yytext[0] == 0 /* && feof(yyin) */) { yysptr=yysbuf; return(0); } yyprevious = yytext[0] = input(); if (yyprevious>0) output(yyprevious); yylastch=yytext; } } yyback(p, m) register int *p; { if (p==0) return(0revious==YYNEWLINE) yystate++; for (;;){ yyt = yystate->yystoff; if(yyt == yycrank){ /* may not be any transitions */ yyz = yystate->yyother; if(yyz == 0)break; if(yyz->yystoff == yycrank)break; } *yylastch++ = yych = input(); tryagain: yyr = yyt; if ( (int)yyt > (int)yycrank){ yyt = yyr + yych; if (yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transitions */ {unput(*--yylastch);break;} *lsp++); while (*p) { if (*p++ == m) return(1); } return(0); } 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,3, 0,0, 0,0}; struct yysvf yysvec[] ={ 0, 0, 0, yycrank+1, 0, 0, yycrank+0, yysvec+1, 0, yycrank+0, 0, yyvstop+1, 0, 0, 0}; struct yywork *yytop = yycrank+98; struct yysvf *yybgin = yysvec+1; char = yystate = yyt->advance+yysvec; goto contin; } } else if((int)yyt < (int)yycrank) { /* r < yycrank */ yyt = yyr = yycrank+(yycrank-yyt); yyt = yyt + yych; if(yyt<=yytop && yyt->verify+yysvec==yystate){ if(yyt->advance+yysvec == YYLERR) /* error transitions */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } yyt = yyr + YYU(yymatch[yych]); if(yyt<=yytop && yyt->verify+yysvec==yystate){ if(yyt->advanc   header.c. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzc"/* * LEX - header.c * * $Header: header.c,v 1.4 84/09/12 11:25:38 jimd Exp $ * $Locker: $ * * Modifications from Berkeley 4.1c BSD * Copyright (c) 1983, Tektronix Inc. * All Rights Reserved * */ # include "ldefs.c" phead1(){ ratfor ? rhd1() : chd1(); } chd1(){ FOUTCHK(); fprintf(fout,"# include \"stdio.h\"\n"); if (ZCH>NCH) fprintf(fout, "# define U(x) ((x)&0377)\n"); else fprintf(fout, "# define U(x) x\n"); fprintf(fout, "# define NLSTATE yyprevious=YYNEWLINE\n"); fprintf(fout,"# defytext,yyleng)\n"); fprintf(fout,"define REJECT nstr = yyrjct(yytext,yyleng);goto 30998\n"); fprintf(fout,"integer nstr,yylook,yywrap\n"); fprintf(fout,"integer yyleng, yytext(YYLMAX)\n"); fprintf(fout,"common /yyxel/ yyleng, yytext\n"); fprintf(fout,"common /yyldat/ yyfnd, yymorf, yyprev, yybgin, yylsp, yylsta\n"); fprintf(fout,"integer yyfnd, yymorf, yyprev, yybgin, yylsp, yylsta(YYLMAX)\n"); fprintf(fout,"for(;;){\n"); fprintf(fout,"\t30999 nstr = yylook(dummy)\n"); fprintf(fout,"\tgoto 30998\n")ine BEGIN yybgin = yysvec + 1 +\n"); fprintf(fout,"# define INITIAL 0\n"); fprintf(fout,"# define YYLERR yysvec\n"); fprintf(fout,"# define YYSTATE (yyestate-yysvec-1)\n"); if(optim) fprintf(fout,"# define YYOPTIM 1\n"); # ifdef DEBUG fprintf(fout,"# define LEXDEBUG 1\n"); # endif fprintf(fout,"# define YYLMAX BUFSIZ\n"); fprintf(fout,"# define output(c) putc(c,yyout)\n"); fprintf(fout, "%s%d%s\n", "# define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==", ctable['\n'], "?(yylinen; fprintf(fout,"\t30000 k = yywrap(dummy)\n"); fprintf(fout,"\tif(k .ne. 0){\n"); fprintf(fout,"\tyylex=0; return; }\n"); fprintf(fout,"\t\telse goto 30998\n"); } phead2(){ if(!ratfor)chd2(); } chd2(){ FOUTCHK(); fprintf(fout,"while((nstr = yylook()) >= 0)\n"); fprintf(fout,"yyfussy: switch(nstr){\n"); fprintf(fout,"case 0:\n"); fprintf(fout,"if(yywrap()) return(0); break;\n"); } ptail(){ if(!pflag) ratfor ? rtail() : ctail(); pflag = 1; } ctail(){ FOUTCHK(); fprintf(fout,"case -1:\no++,yytchar):yytchar)==EOF?0:yytchar)"); fprintf(fout, "# define unput(c) {yytchar= (c);if(yytchar=='\\n')yylineno--;*yysptr++=yytchar;}\n"); fprintf(fout,"# define yymore() (yymorfg=1)\n"); fprintf(fout,"# define ECHO fprintf(yyout, \"%%s\",yytext)\n"); fprintf(fout,"# define REJECT { nstr = yyreject(); goto yyfussy;}\n"); fprintf(fout,"int yyleng; extern char yytext[];\n"); fprintf(fout,"int yymorfg;\n"); fprintf(fout,"extern char *yysptr, yysbuf[];\n"); fprintf(fout,"int yytchar;\n"); fprintf(fobreak;\n"); /* for reject */ fprintf(fout,"default:\n"); fprintf(fout,"fprintf(yyout,\"bad switch yylook %%d\",nstr);\n"); fprintf(fout,"} return(0); }\n"); fprintf(fout,"/* end of yylex */\n"); } rtail(){ register int i; FOUTCHK(); fprintf(fout,"\n30998 if(nstr .lt. 0 .or. nstr .gt. %d)goto 30999\n",casecount); fprintf(fout,"nstr = nstr + 1\n"); fprintf(fout,"goto(\n"); for(i=0; i # define PP 1 # define ASCII 1 # define NCH 128 # define TOKENSIZE 1000 # define DEFSIZE 40 # define DEFCHAR 1000 # define STARTCHAR 100 # define STARTSIZE 256 # define CCLSIZE 1000 # ifdef SMALL # define TREESIZE 600 # define NTRANS 1500 # define NSTATES 300 # define MAXPOS 1500 # detern int casecount; extern int chset; /* 1 = char set modified */ extern FILE *fin, *fout, *fother, *errorf; extern int fptr; extern char *ratname, *cname; extern int prev; /* previous input character */ extern int pres; /* present input character */ extern int peek; /* next input character */ extern int *name; extern int *left; extern int *right; extern int *parent; extern char *nullstr; extern int tptr; extern char pushc[TOKENSIZE]; extern char *pushptr; extern char slist[STARTSIZE]; extern char *slptr; efine NOUTPUT 1500 # endif # ifndef SMALL # define TREESIZE 1000 # define NSTATES 500 # define MAXPOS 2500 # define NTRANS 2000 # define NOUTPUT 3000 # endif # define NACTIONS 100 # define ALITTLEEXTRA 30 # define RCCL NCH+90 # define RNCCL NCH+91 # define RSTR NCH+92 # define RSCON NCH+93 # define RNEWE NCH+94 # define FINAL NCH+95 # define RNULLS NCH+96 # define RCAT NCH+97 # define STAR NCH+98 # define PLUS NCH+99 # define QUEST NCH+100 # define DIV NCH+101 # define BAR NCH+102 # define CARAT NCH+103 #xtern char **def, **subs, *dchar; extern char **sname, *schar; extern char *ccl; extern char *ccptr; extern char *dp, *sp; extern int dptr, sptr; extern char *bptr; /* store input position */ extern char *tmpstat; extern int count; extern int **foll; extern int *nxtpos; extern int *positions; extern int *gotof; extern int *nexts; extern char *nchar; extern int **state; extern int *sfall; /* fallback state num */ extern char *cpackflg; /* true if state has been character packed */ extern int *atable, aptr define S1FINAL NCH+104 # define S2FINAL NCH+105 # define DEFSECTION 1 # define RULESECTION 2 # define ENDSECTION 5 #ifndef TRUE # define TRUE 1 # define FALSE 0 #endif # define PC 1 # define PS 1 # ifdef DEBUG # define LINESIZE 110 extern int yydebug; extern int debug; /* 1 = on */ extern int charc; # endif # ifndef DEBUG # define freturn(s) s # endif /* * The following macro is put at the beginning of subroutines which may * call fprintf (fout, ...) before fout has been opened. The file parser.y ; extern int nptr; extern char symbol[NCH]; extern char cindex[NCH]; extern int xstate; extern int stnum; extern int ctable[]; extern int ZCH; extern int ccount; extern char match[NCH]; extern char extra[NACTIONS]; extern char *pcptr, *pchar; extern int pchlen; extern int nstates, maxpos; extern int yytop; extern int report; extern int ntrans, treesize, outsize; extern long rcount; extern int optim; extern int *verify, *advance, *stoff; extern int scon; extern char *psave; extern char *calloc(), *myalloc(); extern int buserr(), segviol(); tatistics(){ fprintf(errorf,"%d/%d nodes(%%e), %d/%d positions(%%p), %d/%d (%%n), %ld transitions\n", tptr, treesize, nxtpos-positions, maxpos, stnum+1, nstates, rcount); fprintf(errorf, ", %d/%d packed char classes(%%k)", pcptr-pchar, pchlen); if(optim)fprintf(errorf,", %d/%d packed transitions(%%a)",nptr, ntrans); fprintf(errorf, ", %d/%d output slots(%%o)", yytop, outsize); putc('\n',errorf); } /* error transitions */ {unput(*--yylastch);break;} *lsp++aX##t.t(/aX#t.t(/aX#t./<aX##t./<aX#t.td/aX##Jg(Jg JgJgJgJf .]N)vN^NuNVt.t(//9aPt.t(//9aPt./</9aPN^NuNVHt./9aX# t./9aX#t./9aX#t./9aX#t./9aX#$t./9avX#t./9a`X# t.Թ/aHX#t.$9R/a.X#t./9aX# ?  -lex. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzx"#JgHJg@Jg8J g0Jg(Jg JgJ$gJgJ f .vN)v~`$ yr!(RoLN^NuNVt./9/9aBPt.Թ//9a*Pt.$9R//9aPt./9/9aPt./9/9aPt./9/9aPt./9/9aPt./9/9aPt./9/9aPt./</9avPt.td//9abPt./</9aLPN^NuNVt./9a\X#$t./9aHX#(t.$90T/a0X#,J$gJ(gJ,! @1g# TЏ#/Ho//N8OBNhNVH`~` n "h1xHH `##8`t#`t#`t#` n "h1xHH./<HnNxFPA./<t////<tz/NdO`T tgn Tgd vgr Vgh fgj Fg` ngb NgX`` n R"h1xfSX o n "h -g## oj.R$9 n /0(Nr0X#Jf*f .N)vN^NuNVH. /.a\X.Jf.N)` fp` LN^NuNV./<t////<t|/NdON^NuNVH0B.. /.NgX-@.Nx`*@ fp`(t-B`5(.$.B5(R$.e L0N^NuNV.NyN^NuNVH f H` 6 f*|.N(HH `-HH. `N+$9àf./9NpX./</9NpP$9àf./9NpXt#Xt./9NexX,t./NX.Jf .+N)v*Gt./HUNPt. n ./<t////<t}/NdOSX` #a./9Ni$X y ."Ni Rѹ yt!B.NtJg t.Nha4avNaNPRt#Jo$9S.N9lN@raaNP o #*.?$9àg y` yHPNr0X#Jf&$9àg y` y./<AN)vX`./NidX.NjH. f.Nq.Nq fNc.Nq.8Nqt.NhLN^NuNVt./<a0X##t./9/9NX#t./9NX#t./9NX#t./9NX#t./9NX#Jg JgJgJgJf .JN)v <``RgHH.N)TJg.N+# ft#`&`RgHH.N)TJg.N+# ft#``RgHH.N)TJg.N+# ft#``RgHH.N)TJg.N+# ft#`l`RgHH.N)TJg ft#.N+#`.`RgHH.N)TJg ft#t./9/9NP.N+#t./9NX##`$ T.Nz0# l # o .iN)vt#ü|`$ |r!(Rm`.N+-@oo./<N)X``RHH.N)(Jff`RHH.N)(Jf-M``A.N,4. |$0g0.N*Jg./<N)X`./<N)X`$ |!(R nf*|.N(Jg*.HUNif |\B0hJg./<\N/X,Jl.\/<N)X`$R y#$g >fl yB#-|`$./.Ni Pg4 ngh Ng^ eg Eg og Og ag Ag kg Kg tgt Tgj rgj Rg` cgX CgN {gp sg Sg`N+./<w/9NpP``RgHH.N)(JgJgHH#B$ R##<9HH.N)TJg .{N) <` %gj gb gX`t`Z*y`Rg`D \fN2..N..$R |\( o.N),<`N2.g "g f fSä.N)Rä |\B0hJf -| `4 f9\HH#<-|`#\<-|`D|` |,B0hR m-|N2. ^f-|N2.` \fN2..N.. |,tx-GN2. -f ]gN2. \fN2..N..-G$.o-n-n-n Am Zo, am zo 0m 9op`pf . N)$.R-B` |HH.N)(JfJf .N)./<\Ni$X#\JyoSy`>4HԂ |<0( FfRJla2#lt#$| RfjgX`` 4H´gXJRl<*lp` JFf49H `.zNRt3`l4HԂ |.40(H<JFm: F#l4HԂ |40(HԂ |" p(f4HԂ |>0(`N4HԂ |.<0(UYA$op` VJgt#`D b@0;NBTT4HԂ |40(HԂL$9LDo.P/9H/<N3P#HRD$-Dlz#H@`Jl.N)`nJf.N6#@`T#Ht#L`,.N8N./9H/<N3P#HRL$-Ll#H@`6Jl.%N)`Jf./<N5X#@` f./<N5X#@`#Ht#L`,.N8N./9H/<N3P#HRL$-Ln.N8N./<N5X#L.L/9H/<N3P#@`J.//<N3P#@`,./<N5X#@`t D*K4HԂ |40(HD#@=F4HԂ |<0(4H2Hҁ |20HԁR=B n#l(4DB2.Hҁ |>02Hҁ |"pg4HԂ |40(HԂ |>0(4.H ` `Z$9ôfNaft#ô`@`<./9Ni$X$9 y!(.Ni Rѹ./9Ni$X$9R y!( (m .N)v.Ni Rѹ y$9C贉m .N)v$9 y"9"yp#!(`dR`Z./-/<N3P#@`<#@`2 ðf./<N5X#.N6#D$9ðf^$9D./<N5X#H.H/-/<N3P#L.D/9L/<N3P#@`.D/-/<N3P#@t#ð`r#@`h.N6#@`TS bJ@0;N@@@@ $>Zvb 0`L|`$ y0(g Rm輹m$. n""n!(`SJl. /.aްXL N^NuNV$9àga`aN^NuNVJf".yt////<xt{/NdO./9NpX o./9$9JlDD`//9/9/</9NpO .$9r//NeP//<&/9NpO $9g"./9(/<G/9NpO ./9/<g/9NpO .t /NidXN^NuNV./. /./</<8NpO./././</<8NpO. /</<8NpPN^Nu///?< ONO\ _e\B#Nu///?<$ ONO\ _e:B#Nu/ /й/?< ONO\ _e/9# Nu#pNuHxL4H°f4H²fLNu(jDJjDD$&HCHA@HCBCԃJNpX`./9NpX./9NpX./9NpX. /9NpX.4/9NpX.L/9NpX$9g.r/9NpX./9NpX./9NpX. /9/</</9NpO./9NpX.^/9NpX.l/9NpX./9NpX./9NpX./9NpX./9NpX./9jD LNuH|"/g /`H|"/g~ /g6Höf iHL>Nu*jDDJjDDop`ⶁf(BDHD$4HB4HB`(&( dt4"HAHA؁lSJjD ` `H|"/g /`H|"/g~ /g6Höfi H@HL>NuJjDD*jDo$`Bf(BDHD$4BBHB`*&( dt4"HAHAԁ$lԄJjD ` `HpLt4f4fLNu$&HCHA@HCBCԃ LNuHx"/gt$/`Hx"/gd$/cp`p0f$i 0JLNu(BDHD 0H@0H@`&( dp0"HAHANpX./9NpX./9NpXN^NuNVJf".Bt////<At{/NdO.\/9NpX.{/9NpX./9NpX./9NpX./9NpX. /9NpX.,/9NpX.K/9NpX./9NpX./9NpX./9NpX./9NpX./9NpX./9NpX.%/9NpX.:/9NpXN^NuNV$9àfaN^NuNVJf".Nt////<Mt{/NdO.h/9NpX.؁lSJ` `Hx"/gv$/`Hx"/gf$/c `p0f$i HB0JLNu(BDHD 0B@H@`&( dp0"HAHA؁lք `NuJ`NVNO NO !NO,` /NO+eNuKJ g HUNqXKf /NOeVNu/// / ?< ONO\ _e:BNuNO,e0BNuNVH@NOe"/gÈY LN^Nu#p`#pNuNV nJf SN^NuNVLf n N^NuNV/ L$HfJfp` !HH$_N^NuNVH . *n $- ft#p`-g0-g $- fp`pft#/9NpX./9NpX./9NpXN^NuNV$9øf$9àga`a t#øN^NuNVJf".t////<t{/NdO./9NpX./9NpX./9NpX.,/9NpX..g-SX.g-SX.g./././NTO *@X`./././NO *@X 0fJfR.Ni *DЮ&lv .df$.f .f.gR$.Ԕ-Blt-B.f `.t /NidXR$.SJfJgL$.g.t-/NidXR`2.g.t+/NidXR`.g.t /NidXR.g.HH ``.t0/NidXR`d.t0/NidXR.tx/NidXR`>.t0/NidXR.tX/NidXR` og xg XgJo`.t0/NidXR$SJfJo`./HTNP L0N^NuNVH<*n n &X-H $n `0 %g`"-KA.N `xA-Ht -B~`vt-Bt -B~`dt-Bt-B.gp`p.`H-|L`-|]t-Bt-B~.g .gJg~`B.` Jg~`B.`-|n.g-RX.g-RX.g./././NTO (@X`./././NO (@X 0fJfR.Ni ,DЮ(lx .df$.f .f.gR$.Ԕ-Blt-B.f`t $.SJfJg"$.gt-`.gt+` .gt .g>.HH `t0`,t0tx`"t0/NidXRHH(f.g `.t /NidXR$.SJf`.g-SX.g-SX(X o $.S `p,Jo".f`.t /NidXR$SJf./NidXR.g`.t /NidXR$SJf`.g-SX.g-SX*SX.Ni &Jl `o .` ,o ` .*&o".f`.t /NidXR$SJf g `.HH/NidXR$SJfJo`.t /NidXR$SJf`4.g-SX.g-SX.t%/NidXR``.g-SX.g-SX-KA.Hn/.NPހ&n`*ntX` og xg XgJo`t0$SJfJo`HH*f.g`t $.SJf`.g-RX.g-RX*X o $.S `p.Jo.f`t $SJf.g`t $SJf`.g-RX.g-RX(RX.Ni (Jl `o .` .o ` .,(o.f`t $SJf g `$SJfJo`t $SJf`.g-RX.g-RXt%``.g-RX.g-RX-JA.HnHUNP*@$n`(n$.Д.`$SJf`` dg ug og xg X$.Д,`.HH/NidXR$SJf`` dgZ ugd ogj xg| Xg| cg sgZ %g g4 eg. Eg$ fg gg Gg`>(nHH(f n(gp` L8N^NuNVA ./.aFXN^NuNVH *n|-g-fJg l-g-g,.NhJft.t//-N{|P f| gBJm -`pD../-/-NzLPfp`p,*+|`|` t#| L N^NuNVH *n~$- gZ-g cgR sg %g4 gJ egD Eg: fg0 gg& Gg`R&nHH*fB$  L+|*R Un .NJgp@`p . .`~-g-g,.NhJft.t//-N{|P f~ Ae Zb7Bd|Ё.HGGfJg"HDBDJgD" gS"LN^Nu nRp`NVH~A./.N{?@ABCDEFGHIJKLMNOPQRSTUVWX*|`$- gR m fp` L N^NuNVH *n.. ,.+G+F t+Bt+Bt+B*L N^NuNV./. /.N PN^NuNVH8..,. *n(n m .Ni op`X gJl $D.t(`t(&|B*(Jf`*`$&./Ng^X(./NgXDЃ5Jf L8N^NuNV././. /.aVO N^Nu NVH?8LprxG`gf(Kf`z +g -Wfg|$ f& 0f(gt Xg xVf8tf2`mv$ot `"vf 0fgd Xg xVfgb 0e6 9b0`YZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~    ncformncform%cUnknown option %sr%sINITIALINITIAL/usr/lib/lex/ebcformrLex driver missing, file %sToo little core to beginToo little core for state generationToo little core for final packingOOPS - calloc returns a 0%s"-#+ %d: goto 30997 break; Executable statements should occur right after %%Start specifier required.%}%s Start specifier required.%d case %d: Definition %s not foundUndefined start condition %sToo many start conditions usedString too longNon-terminated stringNon-portable Character ClassToo many large character classesStart specifier required.%s yacc stack overflowsyntax errorToo many definitionsDefinitions too longToo many large character classesExtra slash removedIteration range mu" ). "  "  *$%&'(,!!!!st be positiveCan't have negative iterationCan't have negative iteration%d: (Error) %d: (Warning) lex.yy.%cwCan't open %s# EOF inside commentNon-terminated string or character constantEOF in string or character constantAction does not terminatePremature EOFrCannot open file %sParse tree too big %s Try using %e numParse tree too big %s Try using %e numParse tree too big %s Try using %e numToo many characters pushedToo many packed character classesadd: *nxtpos,n,array = %d %d 0! ,)&J.^( *+?|/$,})}}     # define YYNEWLx%x add: count,tptr,positions = %x %x %x add: state[2] = %x add: *state[2] = %x add: ctemp[i],TRUE = %x %x Too many positions %s Try using %p numStart specifier required.blockdata common /Lvstop/ vstop define Svstop %d integer vstop(Svstop) int yyvstop[] ={ 0, cgoto: tptr,state,stnum = %x %x %x A s,npos = %x %x bad state %d %oToo many states %s Try using %n numend 0}; bad transition %d %dToo many transitions %s Try using %a numStart specifier required.Too many positions for oneINE %d yylex(){ int nstr; extern int yyprevious; Too little core for parse treeToo little core for parse treech table needs redeclaration%T%tCharacter value %d out of rangeCharacter '%c' used twiceCharacter %o used twiceToo late for language specifier%}%s Premature eof , , ,# define %s %d Too many start conditionsStart conditions too longInvalid request %s%s Substitution strings may not begin with digitsNo translation given - null string assumedStart specifier required.%d case state - acomputeToo many right contextsdata vstop(%d)/%d/ %d, data vstop(%d)/%d/ %d, data vstop (%d)/0/ 0, Start specifier required.output table overflowj %d nchar %d ctable.nch %d output table overflowdefine YYTOPVAL %d verifadvanstoffsfallextramatchatable# define YYTYPE %s intcharstruct yywork { YYTYPE verify, advance; } yycrank[] ={ %d,%d, 0,0, 0,0}; struct yysvf yysvec[] ={ 0, 0, 0, yycrank+%d, yysvec+%d, 0, yyvstop+%d,0, 0, 0, 0}; struct yywork *yytop = yycrank+%d;  struct yysvf *yybgin = yysvec+1; char yymatch[] ={ '%c' ,0%-3o,No space for char table reverse0%-3o,0}; char yyextra[] ={ %d,0}; Start specifier required.block data common /L%s/ %s define S%s %d integer %s (S%s) data %s (%d)/%d/, end Start specifier required.block data common /L%s/ %s define S%s %d integer %s (S%s) data %s (%d)/%d/, %s (%d)/%d/end Start specifier required.# include "stdio.h" # define U(x) ((x)&0377) # define U(x) x # define NLSTATE yyprevious=YYNEWLINEult: fprintf(yyout,"bad switch yylook %%d",nstr); } return(0); } /* end of yylex */ Start specifier required. 30998 if(nstr .lt. 0 .or. nstr .gt. %d)goto 30999 nstr = nstr + 1 goto( %d, 30999),nstr 30997 continue } end %d/%d nodes(%%e), %d/%d positions(%%p), %d/%d (%%n), %ld transitions , %d/%d packed char classes(%%k), %d/%d packed transitions(%%a), %d/%d output slots(%%o)ERROR called with exit_code = %d , tag = <%s> , out_code = %d srcfile = <%s> , linenum = %d , err # define BEGIN yybgin = yysvec + 1 + # define INITIAL 0 # define YYLERR yysvec # define YYSTATE (yyestate-yysvec-1) # define YYOPTIM 1 # define YYLMAX BUFSIZ # define output(c) putc(c,yyout) %s%d%s # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)# define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;} # define yymore() (yymorfg=1) # define ECHO fprintf(yyout, "%%s",yytext) # define REJECT { nstr = yyrejec_msg = <%s> args = %d 0123456789abcdef0123456789ABCDEF01234567890123456789abcdef0123456789ABCDEF0123456789NO $$syscall ETEXT Startd _ERROR __allocfp1 __chcodesh __exit~L __fillbuf{ __flushbuf __fmtoutk __fprtf __fprtfp __fscnfp __itostrT __ltostr __setupfps __sprtf __sprtfp __sscnfp8 __strtoi __termot(); goto yyfussy;} int yyleng; extern char yytext[]; int yymorfg; extern char *yysptr, yysbuf[]; int yytchar; FILE *yyin ={stdin}, *yyout ={stdout}; extern int yylineno; struct yysvf { struct yywork *yystoff; struct yysvf *yyother; int *yystops;}; struct yysvf *yyestate; extern struct yysvf yysvec[], *yybgin; Start specifier required.integer function yylex(dummy) define YYLMAX BUFSIZ define ECHO call yyecho(yytext,yyleng) define REJECT nstr = yyrjct(yytext,yyleng);goto 30998 integer rpipeh\ _abortz _accessM _acompute; _addhr _alarm* _alphaz0 _atoi[D _bprintd _brkB _calloc-P _cclintere _cdata9l _cfoll _cfree@r _cgoto]h _chd1ax _chd2zx _close04 _cpyactz _creatz _create_contiguousb" _ctail,4 _ctrans)T _digit{ _dup{& _dup28N _dupl)v _error _etexth _exitq _fclosnstr,yylook,yywrap integer yyleng, yytext(YYLMAX) common /yyxel/ yyleng, yytext common /yyldat/ yyfnd, yymorf, yyprev, yybgin, yylsp, yylsta integer yyfnd, yymorf, yyprev, yybgin, yylsp, yylsta(YYLMAX) for(;;){ 30999 nstr = yylook(dummy) goto 30998 30000 k = yywrap(dummy) if(k .ne. 0){ yylex=0; return; } else goto 30998 Start specifier required.while((nstr = yylook()) >= 0) yyfussy: switch(nstr){ case 0: if(yywrap()) return(0); break; Start specifier required.case -1: break; defaep _fflushjH _fgetc>^ _first=N _followr0 _fopenp _fprintfid _fputcy _free _free1coreR _free2core{< _fstat2 _gch _get1core _get2coref _get3core( _getl* _indexh _isattyh _killP _layout+ _lgate/ _lookup{\ _lrec{| _lseek8 _mainx` _mallocL _memberPR _mkmatch6 _mn05 _mn13 _mn2 7 _munput _myallocD _nextstateE _notinz _openF@ _packtrans\ _paddh _pause]P _phead1af _phead2* _printablej _printfa _ptail _read_ _rhd1Y _rprintb _rtaile@ _sbrkZ _shiftr+ _siconv)( _spacexF _sprintf{ _statc _statisticsi< _strcmpi$ _strcpyi _strlen _strtol{ _truncf[ _upone{ _gotofD _iH _jL _k _leftì _lgatflg4 _match _name _nchar _nexts( _nptr _nullstr _nxtposT _p _parent _pchar _pcptrø _pflag _positions4 _psave _pushcà _ratfor _rcount _right _sargc _sargv _schar0 _scon _sfall _slist _sname _sp _state _urec. _usescapeh _wait) _warningzL _write _yyerror _yylext _yyparsee ldivf lmodex lmule lrdivfn lrmodg^ uldivg ulmodg ulmulgN ulrdivg ulrmod EDATA _ZCH ___msz| __allocp __iob __ioblst _aptr _casecount _ccount _cname _ctable _edata _environ _errno0 _stnum, _stoff _subs, _symbol _tmpstat _tptr$ _verify _wgwhack _wwc _wwc1 _wwc2 _wwc3 _wwc4 _wwc5 _wwcS _wwcS1 _wwcS2 _wwcS3 _wwcS4 _wwcS5Ѡ _wwiѤ _wwi1Ѩ _wwi2Ѭ _wwi3Ѱ _wwi4Ѵ _wwi5Ѹ _wwiSѼ _wwiS1 _wwiS2 _wwiS3 _wwiS4 _wwiS5, _xst _errorf _fout _maxpos _nstates _ntrans _optim _outsize _pchlen _peek _pres _prev _pushptr _ratname _report _sect _slptr _sptr _treesize _yyact _yychar" _yychk _yydef _yyerrflag _yyexca _yynerrs. _yypact _yypgo _yyr1 _yyr2 end_adr euidate8 _yydebugä _yyline< _yylval _yytopH _yyv@ _yyvalwrapper.a,v 2.0 86/09/10 12:02:06 rich Released B _calloc-P _cclintere _cdata9l _cfoll _cfree@r _cgoto]h _chd1ax _chd2zx _close04 _cpyactz _creatz _create_contiguousb" _ctail,4 _ctrans)T _digit{ _dup{& _dup28N _dupl)v _error _etexth _exitq _fclos pid8 stderr stdin stdout uid END __base( _advance$ _atable _bptr _buf _ccl _ccptr _charcü _chsetɬ _cindex _count _cpackflg _dchar _debug _defð _divflg _dp _dptr _endè _eofʴ _extra _fin _foll _fother _fptrô _funcflagP _g     lex.t2.c. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzc" # include "stdio.h" # define U(x) x # define NLSTATE yyprevious=YYNEWLINE # define BEGIN yybgin = yysvec + 1 + # define INITIAL 0 # define YYLERR yysvec # define YYSTATE (yyestate-yysvec-1) # define YYOPTIM 1 # define YYLMAX BUFSIZ # define output(c) putc(c,yyout) # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==13?(yylineno++,yytchar):yytchar)==EOF?0:yytchar) # define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;} # define yymore() (yymorfg=1) # define ECHO fprint ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 0f(yyout, "%s",yytext) # define REJECT { nstr = yyreject(); goto yyfussy;} int yyleng; extern char yytext[]; int yymorfg; extern char *yysptr, yysbuf[]; int yytchar; FILE *yyin ={stdin}, *yyout ={stdout}; extern int yylineno; struct yysvf { struct yywork *yystoff; struct yysvf *yyother; int *yystops;}; struct yysvf *yyestate; extern struct yysvf yysvec[], *yybgin; # define YYNEWLINE 13 yylex(){ int nstr; extern int yyprevious; while((nstr = yylook()) >= 0) yyfussy: switch(nstr){ case 0: if(yywrap()) retu1 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 0}; char yyextra[] ={ 0,0,0,0,0,0,0,0, 0}; /* * * Modifications from Berkeley 4.1c BSD * Copyright (c) 1983, Tektronix Inc. * All Rights Reserved * * * This file contains code which is included in output generated * by lex when C source is generated. */ int yylineno =1; # define YYU(x) x # define NLSTATE yyprevious=YYNEWLINE char yytext[YYLMAX]; struct yysvf *yylstate [YYLMAX],rn(0); break; case 1: printf("A"); break; case -1: break; default: fprintf(yyout,"bad switch yylook %d",nstr); } return(0); } /* end of yylex */ int yyvstop[] ={ 0, 1, 0, 0}; # define YYTYPE char struct yywork { YYTYPE verify, advance; } yycrank[] ={ 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0 **yylsp, **yyolsp; char yysbuf[YYLMAX]; char *yysptr = yysbuf; int *yyfnd; extern struct yysvf *yyestate; int yyprevious = YYNEWLINE; yylook(){ register struct yysvf *yystate, **lsp; register struct yywork *yyt; struct yysvf *yyz; register int yych; struct yywork *yyr; # ifdef LEXDEBUG register int debug; # endif char *yylastch; /* start off machines */ # ifdef LEXDEBUG debug = 0; # endif if (!yymorfg) yylastch = yytext; else { yymorfg=0; yylastch = yytext+yyleng; } for(;;){ lsp = yyl, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,3, 2,4, 0,0}; struct yysvf yysvec[] ={ 0, 0, 0, yycrank+1, 0, 0, yycrank+2, 0, 0, yycrank+0, 0, yyvstop+1, yycrank+0, yysvec+1, 0, 0, 0, 0}; struct yywork *yytop = yycrank+99; struct yysvf *yybgin = yysvec+1; char yymatch[] ={ 00 ,01 ,01 ,01 ,01state; yyestate = yystate = yybgin; if (yyprevious==YYNEWLINE) yystate++; for (;;){ # ifdef LEXDEBUG if(debug)fprintf(yyout,"state %d\n",yystate-yysvec-1); # endif yyt = yystate->yystoff; if(yyt == yycrank){ /* may not be any transitions */ yyz = yystate->yyother; if(yyz == 0)break; if(yyz->yystoff == yycrank)break; } *yylastch++ = yych = input(); tryagain: # ifdef LEXDEBUG if(debug){ fprintf(yyout,"char "); allprint(yych); putchar('\n'); } # endif  yyr = yyt; if ( (int)yyt > (int)yycrank){ yyt = yyr + yych; if (yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transitions */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } } # ifdef YYOPTIM else if((int)yyt < (int)yycrank) { /* r < yycrank */ yyt = yyr = yycrank+(yycrank-yyt); # ifdef LEXDEBUG if(debug)fprintf(yyout,"compressed state\n"); # endif yyt = yyt + yych; if(yytext+1; yytext[yyleng] = 0; # ifdef LEXDEBUG if(debug){ fprintf(yyout,"\nmatch "); sprint(yytext); fprintf(yyout," action %d\n",*yyfnd); } # endif return(*yyfnd++); } unput(*yylastch); } if (yytext[0] == 0 /* && feof(yyin) */) { yysptr=yysbuf; return(0); } yyprevious = yytext[0] = input(); if (yyprevious>0) output(yyprevious); yylastch=yytext; # ifdef LEXDEBUG if(debug)putchar('\n'); # endif } } yyback(p, m) register int *p; { if (p==yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transitions */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } yyt = yyr + YYU(yymatch[yych]); # ifdef LEXDEBUG if(debug){ fprintf(yyout,"try fall back character "); allprint(YYU(yymatch[yych])); putchar('\n'); } # endif if(yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transiti0) return(0); while (*p) { if (*p++ == m) return(1); } return(0); } /* the following are only used in the lex library */ yyinput(){ return(input()); } yyoutput(c) int c; { output(c); } yyunput(c) int c; { unput(c); } Tektronix Inc. * All Rights Reserved * * * This file contains code which is included in output generated * by lex when C source is generated. */ int yylineno =1; # define YYU(x) x # define NLSTATE yyprevious=YYNEWLINE char yytext[YYLMAX]; struct yysvf *yylstate [YYLMAX],on */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } } if ((yystate = yystate->yyother) && (yyt= yystate->yystoff) != yycrank){ # ifdef LEXDEBUG if(debug)fprintf(yyout,"fall back to state %d\n",yystate-yysvec-1); # endif goto tryagain; } # endif else {unput(*--yylastch);break;} contin: # ifdef LEXDEBUG if(debug){ fprintf(yyout,"state %d char ",yystate-yysvec-1); allprint(yych); putchar('\n'); } # endif s  t   lex.yy.c. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzc" ; } # ifdef LEXDEBUG if(debug){ fprintf(yyout,"stopped at %d with ",*(lsp-1)-yysvec-1); allprint(yych); putchar('\n'); } # endif while (lsp-- > yylstate){ *yylastch-- = 0; if (*lsp != 0 && (yyfnd= (*lsp)->yystops) && *yyfnd > 0){ yyolsp = lsp; if(yyextra[*yyfnd]){ /* must backup */ while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate){ lsp--; unput(*yylastch--); } } yyprevious = YYU(*yylastch); yylsp = lsp; yyleng = yylastch-# include "stdio.h" # define U(x) x # define NLSTATE yyprevious=YYNEWLINE # define BEGIN yybgin = yysvec + 1 + # define INITIAL 0 # define YYLERR yysvec # define YYSTATE (yyestate-yysvec-1) # define YYOPTIM 1 # define YYLMAX BUFSIZ # define output(c) putc(c,yyout) # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==13?(yylineno++,yytchar):yytchar)==EOF?0:yytchar) # define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;} # define yymore() (yymorfg=1) # define ECHO fprint f(yyout, "%s",yytext) # define REJECT { nstr = yyreject(); goto yyfussy;} int yyleng; extern char yytext[]; int yymorfg; extern char *yysptr, yysbuf[]; int yytchar; FILE *yyin ={stdin}, *yyout ={stdout}; extern int yylineno; struct yysvf { struct yywork *yystoff; struct yysvf *yyother; int *yystops;}; struct yysvf *yyestate; extern struct yysvf yysvec[], *yybgin; # define YYNEWLINE 13 yylex(){ int nstr; extern int yyprevious; while((nstr = yylook()) >= 0) yyfussy: switch(nstr){ case 0: if(yywrap()) returated. */ int yylineno =1; # define YYU(x) x # define NLSTATE yyprevious=YYNEWLINE char yytext[YYLMAX]; struct yysvf *yylstate [YYLMAX], **yylsp, **yyolsp; char yysbuf[YYLMAX]; char *yysptr = yysbuf; int *yyfnd; extern struct yysvf *yyestate; int yyprevious = YYNEWLINE; yylook(){ register struct yysvf *yystate, **lsp; register struct yywork *yyt; struct yysvf *yyz; register int yych; struct yywork *yyr; # ifdef LEXDEBUG register int debug; # endif char *yylastch; /* start off machines */ # ifdef Lrn(0); break; case 1: ; break; case -1: break; default: fprintf(yyout,"bad switch yylook %d",nstr); } return(0); } /* end of yylex */ int yyvstop[] ={ 0, 0}; # define YYTYPE char struct yywork { YYTYPE verify, advance; } yycrank[] ={ 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,3, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,3, 0,0, 0,0, 0,0}; struct yysvf yysvec[] ={ 0, 0, 0, yycrank+1, 0, 0, yycrank+0, yysvec+1, 0, yycraEXDEBUG debug = 0; # endif if (!yymorfg) yylastch = yytext; else { yymorfg=0; yylastch = yytext+yyleng; } for(;;){ lsp = yylstate; yyestate = yystate = yybgin; if (yyprevious==YYNEWLINE) yystate++; for (;;){ # ifdef LEXDEBUG if(debug)fprintf(yyout,"state %d\n",yystate-yysvec-1); # endif yyt = yystate->yystoff; if(yyt == yycrank){ /* may not be any transitions */ yyz = yystate->yyother; if(yyz == 0)break; if(yyz->yystoff == yycrank)break; } *yylastch++ = yych nk+0, yysvec+1, 0, 0, 0, 0}; struct yywork *yytop = yycrank+33; struct yysvf *yybgin = yysvec+1; char yymatch[] ={ 00 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,011 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 011 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01= input(); tryagain: # ifdef LEXDEBUG if(debug){ fprintf(yyout,"char "); allprint(yych); putchar('\n'); } # endif yyr = yyt; if ( (int)yyt > (int)yycrank){ yyt = yyr + yych; if (yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transitions */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } } # ifdef YYOPTIM else if((int)yyt < (int)yycrank) { /* r < yycrank */ y ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 0}; char yyextra[] ={ 0,0,0,0,0,0,0,0, 0}; /* * * Modifications from Berkeley 4.1c BSD * Copyright (c) 1983, Tektronix Inc. * All Rights Reserved * * * This file contains code which is included in output generated * by lex when C source is geneyt = yyr = yycrank+(yycrank-yyt); # ifdef LEXDEBUG if(debug)fprintf(yyout,"compressed state\n"); # endif yyt = yyt + yych; if(yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transitions */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } yyt = yyr + YYU(yymatch[yych]); # ifdef LEXDEBUG if(debug){ fprintf(yyout,"try fall back character "); allprint(YYU(yymatch[yych])); put char('\n'); } # endif if(yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transition */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } } if ((yystate = yystate->yyother) && (yyt= yystate->yystoff) != yycrank){ # ifdef LEXDEBUG if(debug)fprintf(yyout,"fall back to state %d\n",yystate-yysvec-1); # endif goto tryagain; } # endif else {unput(*--yylastch);break;} contin: #      lex.yy.t2.c. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzc"ifdef LEXDEBUG if(debug){ fprintf(yyout,"state %d char ",yystate-yysvec-1); allprint(yych); putchar('\n'); } # endif ; } # ifdef LEXDEBUG if(debug){ fprintf(yyout,"stopped at %d with ",*(lsp-1)-yysvec-1); allprint(yych); putchar('\n'); } # endif while (lsp-- > yylstate){ *yylastch-- = 0; if (*lsp != 0 && (yyfnd= (*lsp)->yystops) && *yyfnd > 0){ yyolsp = lsp; if(yyextra[*yyfnd]){ /* must backup */ while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp ># include "stdio.h" # define U(x) x # define NLSTATE yyprevious=YYNEWLINE # define BEGIN yybgin = yysvec + 1 + # define INITIAL 0 # define YYLERR yysvec # define YYSTATE (yyestate-yysvec-1) # define YYOPTIM 1 # define YYLMAX BUFSIZ # define output(c) putc(c,yyout) # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==13?(yylineno++,yytchar):yytchar)==EOF?0:yytchar) # define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;} # define yymore() (yymorfg=1) # define ECHO fprint yylstate){ lsp--; unput(*yylastch--); } } yyprevious = YYU(*yylastch); yylsp = lsp; yyleng = yylastch-yytext+1; yytext[yyleng] = 0; # ifdef LEXDEBUG if(debug){ fprintf(yyout,"\nmatch "); sprint(yytext); fprintf(yyout," action %d\n",*yyfnd); } # endif return(*yyfnd++); } unput(*yylastch); } if (yytext[0] == 0 /* && feof(yyin) */) { yysptr=yysbuf; return(0); } yyprevious = yytext[0] = input(); if (yyprevious>0) f(yyout, "%s",yytext) # define REJECT { nstr = yyreject(); goto yyfussy;} int yyleng; extern char yytext[]; int yymorfg; extern char *yysptr, yysbuf[]; int yytchar; FILE *yyin ={stdin}, *yyout ={stdout}; extern int yylineno; struct yysvf { struct yywork *yystoff; struct yysvf *yyother; int *yystops;}; struct yysvf *yyestate; extern struct yysvf yysvec[], *yybgin; # define YYNEWLINE 13 yylex(){ int nstr; extern int yyprevious; while((nstr = yylook()) >= 0) yyfussy: switch(nstr){ case 0: if(yywrap()) retu output(yyprevious); yylastch=yytext; # ifdef LEXDEBUG if(debug)putchar('\n'); # endif } } yyback(p, m) register int *p; { if (p==0) return(0); while (*p) { if (*p++ == m) return(1); } return(0); } /* the following are only used in the lex library */ yyinput(){ return(input()); } yyoutput(c) int c; { output(c); } yyunput(c) int c; { unput(c); } Tektronix Inc. * All Rights Reserved * * * This file contains code which is included in output generated * by lex when C source is genern(0); break; case 1: printf("A"); break; case -1: break; default: fprintf(yyout,"bad switch yylook %d",nstr); } return(0); } /* end of yylex */ int yyvstop[] ={ 0, 1, 0, 0}; # define YYTYPE char struct yywork { YYTYPE verify, advance; } yycrank[] ={ 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,3, 2,4, 0,0}; struct yysvf yysvec[] ={ 0, 0, 0, yycrank+1, 0, 0, yycrank+2, 0, 0, yycrank+0, 0, yyvstop+1, yycrank+0, yysvec+1, 0, 0, 0, 0}; struct yywork *yytop = yycrank+99; struct yysvf *yybgin = yysvec+1; char yymatch[] ={ 00 ,01 ,01 ,01 ,01state; yyestate = yystate = yybgin; if (yyprevious==YYNEWLINE) yystate++; for (;;){ # ifdef LEXDEBUG if(debug)fprintf(yyout,"state %d\n",yystate-yysvec-1); # endif yyt = yystate->yystoff; if(yyt == yycrank){ /* may not be any transitions */ yyz = yystate->yyother; if(yyz == 0)break; if(yyz->yystoff == yycrank)break; } *yylastch++ = yych = input(); tryagain: # ifdef LEXDEBUG if(debug){ fprintf(yyout,"char "); allprint(yych); putchar('\n'); } # endif  ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 0yyr = yyt; if ( (int)yyt > (int)yycrank){ yyt = yyr + yych; if (yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transitions */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } } # ifdef YYOPTIM else if((int)yyt < (int)yycrank) { /* r < yycrank */ yyt = yyr = yycrank+(yycrank-yyt); # ifdef LEXDEBUG if(debug)fprintf(yyout,"compressed state\n"); # endif yyt = yyt + yych; if(1 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 0}; char yyextra[] ={ 0,0,0,0,0,0,0,0, 0}; /* * * Modifications from Berkeley 4.1c BSD * Copyright (c) 1983, Tektronix Inc. * All Rights Reserved * * * This file contains code which is included in output generated * by lex when C source is generated. */ int yylineno =1; # define YYU(x) x # define NLSTATE yyprevious=YYNEWLINE char yytext[YYLMAX]; struct yysvf *yylstate [YYLMAX],yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transitions */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } yyt = yyr + YYU(yymatch[yych]); # ifdef LEXDEBUG if(debug){ fprintf(yyout,"try fall back character "); allprint(YYU(yymatch[yych])); putchar('\n'); } # endif if(yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transiti **yylsp, **yyolsp; char yysbuf[YYLMAX]; char *yysptr = yysbuf; int *yyfnd; extern struct yysvf *yyestate; int yyprevious = YYNEWLINE; yylook(){ register struct yysvf *yystate, **lsp; register struct yywork *yyt; struct yysvf *yyz; register int yych; struct yywork *yyr; # ifdef LEXDEBUG register int debug; # endif char *yylastch; /* start off machines */ # ifdef LEXDEBUG debug = 0; # endif if (!yymorfg) yylastch = yytext; else { yymorfg=0; yylastch = yytext+yyleng; } for(;;){ lsp = yylon */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } } if ((yystate = yystate->yyother) && (yyt= yystate->yystoff) != yycrank){ # ifdef LEXDEBUG if(debug)fprintf(yyout,"fall back to state %d\n",yystate-yysvec-1); # endif goto tryagain; } # endif else {unput(*--yylastch);break;} contin: # ifdef LEXDEBUG if(debug){ fprintf(yyout,"state %d char ",yystate-yysvec-1); allprint(yych); putchar('\n'); } # endif  ; } # ifdef LEXDEBUG if(debug){ fprintf(yyout,"stopped at %d with ",*(lsp-1)-yysvec-1); allprint(yych); putchar('\n'); } # endif while (lsp-- > yylstate){ *yylastch-- = 0; if (*lsp != 0 && (yyfnd= (*lsp)->yystops) && *yyfnd > 0){ yyolsp = lsp; if(yyextra[*yyfnd]){ /* must backup */ while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate){ lsp--; unput(*yylastch--); } } yyprevious = YYU(*yylastch); yylsp = lsp; yyleng = yylastch-# include "stdio.h" # define U(x) x # define NLSTATE yyprevious=YYNEWLINE # define BEGIN yybgin = yysvec + 1 + # define INITIAL 0 # define YYLERR yysvec # define YYSTATE (yyestate-yysvec-1) # define YYOPTIM 1 # define YYLMAX BUFSIZ # define output(c) putc(c,yyout) # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==13?(yylineno++,yytchar):yytchar)==EOF?0:yytchar) # define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;} # define yymore() (yymorfg=1) # define ECHO fprintyytext+1; yytext[yyleng] = 0; # ifdef LEXDEBUG if(debug){ fprintf(yyout,"\nmatch "); sprint(yytext); fprintf(yyout," action %d\n",*yyfnd); } # endif return(*yyfnd++); } unput(*yylastch); } if (yytext[0] == 0 /* && feof(yyin) */) { yysptr=yysbuf; return(0); } yyprevious = yytext[0] = input(); if (yyprevious>0) output(yyprevious); yylastch=yytext; # ifdef LEXDEBUG if(debug)putchar('\n'); # endif } } yyback(p, m) register int *p; { if (p==f(yyout, "%s",yytext) # define REJECT { nstr = yyreject(); goto yyfussy;} int yyleng; extern char yytext[]; int yymorfg; extern char *yysptr, yysbuf[]; int yytchar; FILE *yyin ={stdin}, *yyout ={stdout}; extern int yylineno; struct yysvf { struct yywork *yystoff; struct yysvf *yyother; int *yystops;}; struct yysvf *yyestate; extern struct yysvf yysvec[], *yybgin; # define YYNEWLINE 13 yylex(){ int nstr; extern int yyprevious; while((nstr = yylook()) >= 0) yyfussy: switch(nstr){ case 0: if(yywrap()) retu0) return(0); while (*p) { if (*p++ == m) return(1); } return(0); } /* the following are only used in the lex library */ yyinput(){ return(input()); } yyoutput(c) int c; { output(c); } yyunput(c) int c; { unput(c); } Tektronix Inc. * All Rights Reserved * * * This file contains code which is included in output generated * by lex when C source is generated. */ int yylineno =1; # define YYU(x) x # define NLSTATE yyprevious=YYNEWLINE char yytext[YYLMAX]; struct yysvf *yylstate [YYLMAX],rn(0); break; case 1: printf("A"); break; case -1: break; default: fprintf(yyout,"bad switch yylook %d",nstr); } return(0); } /* end of yylex */ int yyvstop[] ={ 0, 1, 0, 0}; # define YYTYPE char struct yywork { YYTYPE verify, advance; } yycrank[] ={ 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0     lex.yy1.c. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzc", 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,3, 2,4, 0,0}; struct yysvf yysvec[] ={ 0, 0, 0, yycrank+1, 0, 0, yycrank+2, 0, 0, yycrank+0, 0, yyvstop+1, yycrank+0, yysvec+1, 0, 0, 0, 0}; struct yywork *yytop = yycrank+99; struct yysvf *yybgin = yysvec+1; char yymatch[] ={ 00 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 0yyr = yyt; if ( (int)yyt > (int)yycrank){ yyt = yyr + yych; if (yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transitions */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } } # ifdef YYOPTIM else if((int)yyt < (int)yycrank) { /* r < yycrank */ yyt = yyr = yycrank+(yycrank-yyt); # ifdef LEXDEBUG if(debug)fprintf(yyout,"compressed state\n"); # endif yyt = yyt + yych; if(1 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 0}; char yyextra[] ={ 0,0,0,0,0,0,0,0, 0}; /* * * Modifications from Berkeley 4.1c BSD * Copyright (c) 1983, Tektronix Inc. * All Rights Reserved * * * This file contains code which is included in output generated * by lex when C source is generated. */ int yylineno =1; # define YYU(x) x # define NLSTATE yyprevious=YYNEWLINE char yytext[YYLMAX]; struct yysvf *yylstate [YYLMAX],yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transitions */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } yyt = yyr + YYU(yymatch[yych]); # ifdef LEXDEBUG if(debug){ fprintf(yyout,"try fall back character "); allprint(YYU(yymatch[yych])); putchar('\n'); } # endif if(yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transiti **yylsp, **yyolsp; char yysbuf[YYLMAX]; char *yysptr = yysbuf; int *yyfnd; extern struct yysvf *yyestate; int yyprevious = YYNEWLINE; yylook(){ register struct yysvf *yystate, **lsp; register struct yywork *yyt; struct yysvf *yyz; register int yych; struct yywork *yyr; # ifdef LEXDEBUG register int debug; # endif char *yylastch; /* start off machines */ # ifdef LEXDEBUG debug = 0; # endif if (!yymorfg) yylastch = yytext; else { yymorfg=0; yylastch = yytext+yyleng; } for(;;){ lsp = yylon */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } } if ((yystate = yystate->yyother) && (yyt= yystate->yystoff) != yycrank){ # ifdef LEXDEBUG if(debug)fprintf(yyout,"fall back to state %d\n",yystate-yysvec-1); # endif goto tryagain; } # endif else {unput(*--yylastch);break;} contin: # ifdef LEXDEBUG if(debug){ fprintf(yyout,"state %d char ",yystate-yysvec-1); allprint(yych); putchar('\n'); } # endif state; yyestate = yystate = yybgin; if (yyprevious==YYNEWLINE) yystate++; for (;;){ # ifdef LEXDEBUG if(debug)fprintf(yyout,"state %d\n",yystate-yysvec-1); # endif yyt = yystate->yystoff; if(yyt == yycrank){ /* may not be any transitions */ yyz = yystate->yyother; if(yyz == 0)break; if(yyz->yystoff == yycrank)break; } *yylastch++ = yych = input(); tryagain: # ifdef LEXDEBUG if(debug){ fprintf(yyout,"char "); allprint(yych); putchar('\n'); } # endif  ; } # ifdef LEXDEBUG if(debug){ fprintf(yyout,"stopped at %d with ",*(lsp-1)-yysvec-1); allprint(yych); putchar('\n'); } # endif while (lsp-- > yylstate){ *yylastch-- = 0; if (*lsp != 0 && (yyfnd= (*lsp)->yystops) && *yyfnd > 0){ yyolsp = lsp; if(yyextra[*yyfnd]){ /* must backup */ while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate){ lsp--; unput(*yylastch--); } } yyprevious = YYU(*yylastch); yylsp = lsp; yyleng = yylastch-yytext+1; yytext[yyleng] = 0; # ifdef LEXDEBUG if(debug){ fprintf(yyout,"\nmatch "); sprint(yytext); fprintf(yyout," action %d\n",*yyfnd); } # endif return(*yyfnd++); } unput(*yylastch); } if (yytext[0] == 0 /* && feof(yyin) */) { yysptr=yysbuf; return(0); } yyprevious = yytext[0] = input(); if (yyprevious>0) output(yyprevious); yylastch=yytext; # ifdef LEXDEBUG if(debug)putchar('\n'); # endif } } yyback(p, m) register int *p; { if (p==lation considerations go here. * * Usage: lex [-t] [-v] [-n] [-f] [file ...] * * Descripton: * * Lex generates programs to be used in the lexical * analysis of text. The input files (standard input is * the default) contain regular expressions to be searched * for and actions written in C or Ratfor to be executed * when expressions are found. * * The resulting program source is found in the file * lex.yy.c (for C source) or lex.yy.r (Ratfor source). * * * Flags: * Each of the f0) return(0); while (*p) { if (*p++ == m) return(1); } return(0); } /* the following are only used in the lex library */ yyinput(){ return(input()); } yyoutput(c) int c; { output(c); } yyunput(c) int c; { unput(c); } Tektronix Inc. * All Rights Reserved * * * This file contains code which is included in output generated * by lex when C source is generated. */ int yylineno =1; # define YYU(x) x # define NLSTATE yyprevious=YYNEWLINE char yytext[YYLMAX]; struct yysvf *yylstate [YYLMAX],ollowing flags may be specified as upper * or lower case. * * -t Place the resulting source code on the standard * output, instead of the file lex.yy.? * * -v Print a one-line summary of statistics of the * generated analyzer. * * -n Don't print the summary. This is the default. * * -f "Faster" compilation : don't bother to pack * the resulting tables. This is limited to * small programs. * * * Calling Structure: * * Changes to be made to version 1.1: * * Change some error " "   lmain.c. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzc"messages so that ERROR is used. * (many of the messages are formatted for use with * error(1) and will not be changed.) * * Log of Revisions: * * $Log: lmain.c,v $ * Revision 1.11 84/04/19 10:27:12 jimd * commented copy from tekecs. * * Revision 1.11 84/04/11 13:16:16 jimd * removed error tags references. * * Revision 1.10 84/03/01 09:25:04 jimd * fixed ERROR tag fields. * * Revision 1.9 84/01/25 11:24:08 jimd * fixed ERROR to include tags field. * * Revision 1.8 84/01//* * Copyright 1976, Bell Telephone Laboratories, Inc., * written by Eric Schmidt, August 27, 1976 */ /* * LEX * * $Header: lmain.c,v 1.11 84/04/19 10:27:12 jimd Exp $ * $Locker: $ * * Modifications from Berkeley 4.1c BSD * Copyright (c) 1983, Tektronix Inc. * All Rights Reserved * */ /* * Title of program: lex - generate lexical analysis programs * * Author: Eric Schmidt, August 27, 1976 * * Engineer: David Elliott - ECS * * Origin: Berkeley 4.1c UNIX * * Compile: Special compi06 10:56:04 joemu * removed the -r and -c flags (-r never worked in System V and did not exist * in Berkeley 4.2 and -c was the default in System V) * * Revision 1.7 83/09/26 09:23:55 dce * Made changes specified in the header. * * Revision 1.6 83/09/12 11:33:34 dce * Added include of . * * Revision 1.5 83/09/12 11:17:47 dce * Changed local string routines to system ones. * * Revision 1.4 83/09/12 10:26:13 dce * Chnaged exit(0) to exit (NO_ERRS). * * Revision 1.3 83/09/12 10:15:57 dce * * Changed some error messages to use ERROR. * * */ # include "ldefs.c" # include "once.c" main(argc,argv) int argc; char **argv; { register int i; char opt[2]; /* Character string for printing bad option. */ # ifdef DEBUG #include signal(SIGBUS,buserr); signal(SIGSEGV,segviol); # endif while (argc > 1 && argv[1][0] == '-' ){ i = 0; while(argv[1][++i]){ switch (argv[1][i]){ # ifdef DEBUG case 'd': debug++; break; case 'y': yydebug = TRUEdisposed of: verify, advance, stoff, nexts, nchar, gotof, atable, ccpackflg, sfall */ # ifdef DEBUG free3core(); # endif if (ZCH>NCH) cname="/usr/lib/lex/ebcform"; fother = fopen(ratfor?ratname:cname,"r"); if(fother == NULL) error("Lex driver missing, file %s",ratfor?ratname:cname); while ( (i=getc(fother)) != EOF) putc(i,fout); fclose(fother); fclose(fout); if( # ifdef DEBUG debug || # endif report == 1)statistics(); fclose(stdout); fclose(stderr); exit(NO_ERRS); /* success return; break; # endif case 't': case 'T': fout = stdout; errorf = stderr; break; case 'v': case 'V': report = 1; break; case 'f': case 'F': optim = FALSE; break; case 'n': case 'N': report = 0; break; default: sprintf (opt, "%c", argv[1][i]); ERROR (NP_WARN, "",O_ERR, "Unknown option %s", opt); } } argc--; argv++; } sargc = argc; sargv = argv; if (argc > 1){ fin = fopen(argv[++fptr], "r"); /* open argv[1] */ if ( code */ } get1core(){ ccptr = ccl = myalloc(CCLSIZE,sizeof(*ccl)); pcptr = pchar = myalloc(pchlen, sizeof(*pchar)); def = (char **)myalloc(DEFSIZE,sizeof(*def)); subs = (char **)myalloc(DEFSIZE,sizeof(*subs)); dp = dchar = myalloc(DEFCHAR,sizeof(*dchar)); sname = (char **)myalloc(STARTSIZE,sizeof(*sname)); sp = schar = myalloc(STARTCHAR,sizeof(*schar)); if(ccl == 0 || def == 0 || subs == 0 || dchar == 0 || sname == 0 || schar == 0) error("Too little core to begin"); } free1core(){ cfree(def,DEFSIfin == NULL) { ERROR (P_ERR, "",O_ERR, "%s", argv[1]); } sargc--; sargv++; } else fin = stdin; /* may be gotten: def, subs, sname, schar, ccl, dchar */ get1core(); /* may be gotten: name, left, right, nullstr, parent */ (void) strcpy(sp, "INITIAL"); sname[0] = sp; sp += strlen ("INITIAL") + 1; sname[1] = 0; if(yyparse(0)) exit(1); /* error return code */ /* may be disposed of: def, subs, dchar */ free1core(); /* may be gotten: tmpstat, foll, positions, gotof, nexts, nchar, state, atZE,sizeof(*def)); cfree(subs,DEFSIZE,sizeof(*subs)); cfree(dchar,DEFCHAR,sizeof(*dchar)); } get2core(){ register int i; gotof = (int *)myalloc(nstates,sizeof(*gotof)); nexts = (int *)myalloc(ntrans,sizeof(*nexts)); nchar = myalloc(ntrans,sizeof(*nchar)); state = (int **)myalloc(nstates,sizeof(*state)); atable = (int *)myalloc(nstates,sizeof(*atable)); sfall = (int *)myalloc(nstates,sizeof(*sfall)); cpackflg = myalloc(nstates,sizeof(*cpackflg)); tmpstat = myalloc(tptr+1,sizeof(*tmpstat)); foll =able, sfall, cpackflg */ get2core(); ptail(); mkmatch(); # ifdef DEBUG if(debug) pccl(); # endif sect = ENDSECTION; if(tptr>0)cfoll(tptr-1); # ifdef DEBUG if(debug)pfoll(); # endif cgoto(); # ifdef DEBUG if(debug){ printf("Print %d states:\n",stnum+1); for(i=0;i<=stnum;i++)stprt(i); } # endif /* may be disposed of: positions, tmpstat, foll, state, name, left, right, parent, ccl, schar, sname */ /* may be gotten: verify, advance, stoff */ free2core(); get3core(); layout(); /* may be  (int **)myalloc(tptr+1,sizeof(*foll)); nxtpos = positions = (int *)myalloc(maxpos,sizeof(*positions)); if(tmpstat == 0 || foll == 0 || positions == 0 || gotof == 0 || nexts == 0 || nchar == 0 || state == 0 || atable == 0 || sfall == 0 || cpackflg == 0 ) error ("Too little core for state generation"); for(i=0;i<=tptr;i++)foll[i] = 0; } free2core(){ cfree(positions,maxpos,sizeof(*positions)); cfree(tmpstat,tptr+1,sizeof(*tmpstat)); cfree(foll,tptr+1,sizeof(*foll)); cfree(name,treesize,sizeof(*name)); cfree(left,treesize,sizeof(*left)); cfree(right,treesize,sizeof(*right)); cfree(parent,treesize,sizeof(*parent)); cfree(nullstr,treesize,sizeof(*nullstr)); cfree(state,nstates,sizeof(*state)); cfree(sname,STARTSIZE,sizeof(*sname)); cfree(schar,STARTCHAR,sizeof(*schar)); cfree(ccl,CCLSIZE,sizeof(*ccl)); } get3core(){ verify = (int *)myalloc(outsize,sizeof(*verify)); advance = (int *)myalloc(outsize,sizeof(*advance)); stoff = (int *)myalloc(stnum+2,sizeof(*stoff)); if(verify == 0 || advance =; } cfree(p, num, size) char *p; unsigned num, size; { fprintf(stderr,"cfree: num,size,p = %d %d 0x%x\n",num,size,p); free(p); } H>NCH) cname="/usr/lib/lex/ebcform"; fother = fopen(ratfor?ratname:cname,"r"); if(fother == NULL) error("Lex driver missing, file %s",ratfor?ratname:cname); while ( (i=getc(fother)) != EOF) putc(i,fout); fclose(fother); fclose(fout); if( # ifdef DEBUG debug || # endif report == 1)statistics(); fclose(stdout); fclose(stderr); exit(NO_ERRS); /* success return= 0 || stoff == 0) error("Too little core for final packing"); } # ifdef DEBUG free3core(){ cfree(advance,outsize,sizeof(*advance)); cfree(verify,outsize,sizeof(*verify)); cfree(stoff,stnum+1,sizeof(*stoff)); cfree(gotof,nstates,sizeof(*gotof)); cfree(nexts,ntrans,sizeof(*nexts)); cfree(nchar,ntrans,sizeof(*nchar)); cfree(atable,nstates,sizeof(*atable)); cfree(sfall,nstates,sizeof(*sfall)); cfree(cpackflg,nstates,sizeof(*cpackflg)); } # endif char *myalloc(a,b) int a,b; { register int i; i 3  4   main.c. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzc"= (int)calloc(a, b); if(i==0) warning("OOPS - calloc returns a 0"); else if(i == -1){ # ifdef DEBUG warning("calloc returns a -1"); # endif return(0); } return((char *)i); } # ifdef DEBUG buserr(){ fflush(errorf); fflush(fout); fflush(stdout); fprintf(errorf,"Bus error\n"); if(report == 1)statistics(); fflush(errorf); } segviol(){ fflush(errorf); fflush(fout); fflush(stdout); fprintf(errorf,"Segmentation violation\n"); if(report == 1)statistics(); fflush(errorf); } # endif yyerror/* @@(#)main.c 4.1 12/25/82 */ /* * MAIN.C - yacc library file * * $Header: main.c,v 1.2 83/12/22 15:58:41 jimd Exp $ * $Locker: $ * * Modification from Berkeley 4.2 * Copyright (c) Tektronix Inc. * All Rights Reserved. * */ /* * Author: Not Listed. * * Engineer: Jim Dailey - ECS * * Origin: Berkeley 4.2 * * Calling Structure: * * Changes made to version 1.1: * * 1. Standard Changes * * o Added the above and following header information. * * Changes made to version 1.2: * * 1. (s) char *s; { ERROR (P_WARN, "",O_ERR, "%s", s); } char * calloc(num, size) unsigned num, size; { register char *mp; char *malloc(); register int *q; register m; unsigned i; char nonzeroFlag = 0; fprintf(stderr,"calloc,num,size = %d %d", num,size); num *= size; mp = malloc(num); fprintf(stderr," mp = 0x%x",mp); if(mp == NULL) return(NULL); /* bzero (mp, num); */ for(i=0; i< num; i++) { nonzeroFlag |= mp[i]; mp[i] = 0; } fprintf(stderr," nonzeroFlag = 0x%x\n", nonzeroFlag); return(mp)Standard Changes * * o Yet to be determined. * * 2. Nonstandard Changes * * o Yet to be determined. * * Log of Revisions: * * $Log: main.c,v $ * Revision 1.2 83/12/22 15:58:41 jimd * updated to standard. * * */ #include "stdio.h" #include "errdefs.h" main() { yylex(); exit(NO_ERRS); } c(fother)) != EOF) putc(i,fout); fclose(fother); fclose(fout); if( # ifdef DEBUG debug || # endif report == 1)statistics(); fclose(stdout); fclose(stderr); exit(NO_ERRS); /* success returnD E  ncform. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzm"error transitions */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } } # ifdef YYOPTIM else if((int)yyt < (int)yycrank) { /* r < yycrank */ yyt = yyr = yycrank+(yycrank-yyt); # ifdef LEXDEBUG if(debug)fprintf(yyout,"compressed state\n"); # endif yyt = yyt + yych; if(yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transitions */ {unput(*--yylastch);break;} *lsp++ = yystat/* * * Modifications from Berkeley 4.1c BSD * Copyright (c) 1983, Tektronix Inc. * All Rights Reserved * * * This file contains code which is included in output generated * by lex when C source is generated. */ int yylineno =1; # define YYU(x) x # define NLSTATE yyprevious=YYNEWLINE char yytext[YYLMAX]; struct yysvf *yylstate [YYLMAX], **yylsp, **yyolsp; char yysbuf[YYLMAX]; char *yysptr = yysbuf; int *yyfnd; extern struct yysvf *yyestate; int yyprevious = YYNEWLINE; yylook(){ register struct yyse = yyt->advance+yysvec; goto contin; } yyt = yyr + YYU(yymatch[yych]); # ifdef LEXDEBUG if(debug){ fprintf(yyout,"try fall back character "); allprint(YYU(yymatch[yych])); putchar('\n'); } # endif if(yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transition */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; goto contin; } } if ((yystate = yystate->yyother) && (yyt= yystvf *yystate, **lsp; register struct yywork *yyt; struct yysvf *yyz; register int yych; struct yywork *yyr; # ifdef LEXDEBUG register int debug; # endif char *yylastch; /* start off machines */ # ifdef LEXDEBUG debug = 0; # endif if (!yymorfg) yylastch = yytext; else { yymorfg=0; yylastch = yytext+yyleng; } for(;;){ lsp = yylstate; yyestate = yystate = yybgin; if (yyprevious==YYNEWLINE) yystate++; for (;;){ # ifdef LEXDEBUG if(debug)fprintf(yyout,"state %d\n",yystate-yysvec-1); ate->yystoff) != yycrank){ # ifdef LEXDEBUG if(debug)fprintf(yyout,"fall back to state %d\n",yystate-yysvec-1); # endif goto tryagain; } # endif else {unput(*--yylastch);break;} contin: # ifdef LEXDEBUG if(debug){ fprintf(yyout,"state %d char ",yystate-yysvec-1); allprint(yych); putchar('\n'); } # endif ; } # ifdef LEXDEBUG if(debug){ fprintf(yyout,"stopped at %d with ",*(lsp-1)-yysvec-1); allprint(yych); putchar('\n'); } # endif while (lsp-- > y# endif yyt = yystate->yystoff; if(yyt == yycrank){ /* may not be any transitions */ yyz = yystate->yyother; if(yyz == 0)break; if(yyz->yystoff == yycrank)break; } *yylastch++ = yych = input(); tryagain: # ifdef LEXDEBUG if(debug){ fprintf(yyout,"char "); allprint(yych); putchar('\n'); } # endif yyr = yyt; if ( (int)yyt > (int)yycrank){ yyt = yyr + yych; if (yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* ylstate){ *yylastch-- = 0; if (*lsp != 0 && (yyfnd= (*lsp)->yystops) && *yyfnd > 0){ yyolsp = lsp; if(yyextra[*yyfnd]){ /* must backup */ while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate){ lsp--; unput(*yylastch--); } } yyprevious = YYU(*yylastch); yylsp = lsp; yyleng = yylastch-yytext+1; yytext[yyleng] = 0; # ifdef LEXDEBUG if(debug){ fprintf(yyout,"\nmatch "); sprint(yytext); fprintf(yyout," action %d\n",*yyfnd);  } # endif return(*yyfnd++); } unput(*yylastch); } if (yytext[0] == 0 /* && feof(yyin) */) { yysptr=yysbuf; return(0); } yyprevious = yytext[0] = input(); if (yyprevious>0) output(yyprevious); yylastch=yytext; # ifdef LEXDEBUG if(debug)putchar('\n'); # endif } } yyback(p, m) register int *p; { if (p==0) return(0); while (*p) { if (*p++ == m) return(1); } return(0); } /* the following are only used in the lex library */ yyinput(){ return(input()); } yyoutp verif common /Ladvan/ advan common /Lstoff/ stoff common /Lsfall/ sfall common /Latable/ atable common /Lextra/ extra common /Lvstop/ vstop integer verif(Sverif), advan(Sadvan),stoff(Sstoff),match(Smatch) integer sfall(Ssfall),atable(Satable),extra(Sextra), vstop(Svstop) integer state, lsp, r integer ch, n common /yyldat/ yyfnd, yymorf, yyprev, yybgin, yytop, yylsp, yylsta(YYLMAX) common /yyxel/ yyleng, yytext integer yyfnd, yymorf, yylsta, yylsp, yytext, yyprev, yyleng, yytop integer lexshf, yytext(YYLMut(c) int c; { output(c); } yyunput(c) int c; { unput(c); } Tektronix Inc. * All Rights Reserved * * * This file contains code which is included in output generated * by lex when C source is generated. */ int yylineno =1; # define YYU(x) x # define NLSTATE yyprevious=YYNEWLINE char yytext[YYLMAX]; struct yysvf *yylstate [YYLMAX], **yylsp, **yyolsp; char yysbuf[YYLMAX]; char *yysptr = yysbuf; int *yyfnd; extern struct yysvf *yyestate; int yyprevious = YYNEWLINE; yylook(){ register struct yysAX), yyback, yybgin integer z, t if (yymorf .eq. 0) yyleng = 0 else yymorf=0 1776 lsp = 1 state = yybgin if (yyprev .eq. YYNEWLINE) state = state + 1 for (;;){ r = stoff(state) if (r .eq. 0){ z = sfall(state) if (z .eq. 0) break if(stoff(z) == 0) break } ch = input(dummy) ich = lexshf(ch) yyleng = yyleng+1 yytext(yyleng) = ch 1984 if(r .gt. 0){ t = r + ich if (t<= yytop){ if (verif(t) .eq. state){ if(advan(t) == YYERROR){ call unput(yytext(yyleng))    nrform. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzm" yyleng = yyleng - 1 break } state = advan(t) yylsta(lsp) = state lsp = lsp +1 goto 2001 } } } if(r < 0){ t = r + ich if (t <= yytop .and. verif(t) .eq. state){ if(advan(t) == YYERROR){ call unput(yytext(yyleng)) yyleng = yyleng - 1 break } state = advan(t) yylsta(lsp) = state lsp = lsp +1 goto 2001 } t = r + match(ich) if(t <= yytop && state == verif(t)){ if(advan(t) == YYERROR){ call unput(yytext(# # Modifications from Berkeley 4.1c BSD # Copyright (c) 1983, Tektronix Inc. # All Rights Reserved # # This code is added to the Ratfor source code created by lex with # the -r option. # block data integer cshift, csize, yynlin common /yyllib/ cshift, csize, yynlin data yynlin/YYNEWLINE/ end block data common /yyldat/ yyfnd, ymorf, yyprev, yybgin, yytop integer yyfnd, yymorf, yyprev, yybgin, yytop data yybgin/1/ data yyprev/YYNEWLINE/ data yytop/YYTOPVAL/ end integer function yylook(dummy) common /Lverif/yyleng)) yyleng = yyleng - 1 break } state = advan(t) yylsta(lsp) = state lsp = lsp + 1 goto 2001 } } else { if (state > 0) state = sfall(state) if (state .gt. 0) r = stoff(state) if (state .gt. 0 .and. r .ne. 0) goto 1984 call unput(yytext(yyleng)) yyleng = yyleng -1 break } 2001 continue } while (lsp .gt. 1){ lsp = lsp -1 ilsp = yylsta(lsp) yyfnd = atable(ilsp) if (yyfnd .gt. 0) if (vstop(yyfnd) .gt. 0){ r = vstop(yyfnd) if (extra(r) .ne. 0){ for(;;){ ilsp = yylsta(lsp) if (yyback(atable(ilsp), -r) .eq. 1) break lsp= lsp -1 call unput(yytext(yyleng)) yyleng = yyleng -1 } } yyprev = lexshf(yytext(yyleng)) yylsp = lsp yyfnd = yyfnd + 1 yylook = r yytext(yyleng+1) = 0 return } call unput(yytext(yyleng)) } if (yytext(1) .eq. 0){ yylook=0 return } yyprev = input(dummy) call output(yyprev) yyprev = lexshf(yyprev) yyleng = 0 goto 1776 end inte, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,101,102,103,104,105,106,107,108,109, 110,111,112,113,114,115,116,117,118,119, 120,121,122,123,124,125,126,127}; int ZCH = NCH; FILE *fout = NULL, *errorf = {stdout}; int sect = DEFSECTION; int prev = '\n'; /* previous input character */ int pres = '\n'; /* present input character */ int peekger function yyback (isub, n) common /Lvstop/ vstop integer vstop(Svstop) if (isub .ne. 0) while (vstop(isub) .ne. 0){ if (vstop(isub) .eq. m){ yyback = 1 return } isub = isub + 1 } yyback = 0 return end tate){ lsp--; unput(*yylastch--); } } yyprevious = YYU(*yylastch); yylsp = lsp; yyleng = yylastch-yytext+1; yytext[yyleng] = 0; # ifdef LEXDEBUG if(debug){ fprintf(yyout,"\nmatch "); sprint(yytext); fprintf(yyout," action %d\n",*yyfnd);  = '\n'; /* next input character */ char *pushptr = pushc; char *slptr = slist; char *cname = CFORM; char *ratname = RFORM; int ccount = 1; int casecount = 1; int aptr = 1; int nstates = NSTATES, maxpos = MAXPOS; int treesize = TREESIZE, ntrans = NTRANS; int yytop; int outsize = NOUTPUT; int sptr = 1; int optim = TRUE; int report = 2; int debug; /* 1 = on */ int charc; int sargc; char **sargv; char buf[520]; int ratfor; /* 1 = ratfor, 0 = C */ int yyline; /* line number of file */ int eof; int lgatflg; H  I   once.c. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzc" int divflg; int funcflag; int pflag; int chset; /* 1 = char set modified */ FILE *fin, *fother; int fptr; int *name; int *left; int *right; int *parent; char *nullstr; int tptr; char pushc[TOKENSIZE]; char slist[STARTSIZE]; char **def, **subs, *dchar; char **sname, *schar; char *ccl; char *ccptr; char *dp, *sp; int dptr; char *bptr; /* store input position */ char *tmpstat; int count; int **foll; int *nxtpos; int *positions; int *gotof; int *nexts; char *nchar; int **state; int *sfall; /* fallback state /* * LEX - once.c * * $Header: once.c,v 1.3 83/09/26 09:24:03 dce Exp $ * $Locker: $ * * Modifications from Berkeley 4.1c BSD * Copyright (c) 1983, Tektronix Inc. * All Rights Reserved * */ /* because of external definitions, this code should occur only once */ int wgwhack[8*NCH]; int ctable[2*NCH] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47num */ char *cpackflg; /* true if state has been character packed */ int *atable; int nptr; char symbol[NCH]; char cindex[NCH]; int xstate; int stnum; char match[NCH]; char extra[NACTIONS]; char *pchar, *pcptr; int pchlen = TOKENSIZE; long rcount; int *verify, *advance, *stoff; int scon; char *psave; int buserr(), segviol(); k } 2001 continue } while (lsp .gt. 1){ lsp = lsp -1 ilsp = yylsta(lsp) yyfnd = atable(ilsp) if (yyfnd .gt. 0) if (vstop(yyfnd) .gt. 0){ r = vstop(yyfnd) i= =  parser.y. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzy" i = mn0(*p++); while(*p) i = mn2(RSTR,i,*p++); $$ = i; } | '.' ={ symbol['\n'] = 0; if(psave == FALSE){ p = ccptr; psave = ccptr; for(i=1;i<'\n';i++){ symbol[i] = 1; *ccptr++ = i; } for(i='\n'+1;i ccl+CCLSIZE) error("Too many large character classes"); } else p = psave; $$ = mn1(RCCL,p); cclinter(1); } | CCL ={ $$ = mn1(RCCL,$1); } | NCCL ={ $$ = mn1(RNCCL,$1); } %token CHAR CCL NCCL STR DELIM SCON ITER NEWE NULLS %left SCON '/' NEWE %left '|' %left '$' '^' %left CHAR CCL NCCL '(' '.' STR NULLS %left ITER %left CAT %left '*' '+' '?' %{ /* * LEX - parser.y * * $Header: parser.y,v 1.5 83/09/26 09:24:09 dce Exp $ * $Locker: $ * * Modifications from Berkeley 4.1c BSD * Copyright (c) 1983, Tektronix Inc. * All Rights Reserved * */ # include "ldefs.c" %} %% %{ int i; int j,k; int g; char *p; %} acc : lexinput ={ # ifdef DEBUG if(debug) sect2dump(); # endi| r '*' ={ $$ = mn1(STAR,$1); } | r '+' ={ $$ = mn1(PLUS,$1); } | r '?' ={ $$ = mn1(QUEST,$1); } | r '|' r ={ $$ = mn2(BAR,$1,$3); } | r r %prec CAT ={ $$ = mn2(RCAT,$1,$2); } | r '/' r ={ if(!divflg){ j = mn1(S2FINAL,-casecount); i = mn2(RCAT,$1,j); $$ = mn2(DIV,i,$3); } else { $$ = mn2(RCAT,$1,$3); warning("Extra slash removed"); } divflg = TRUE; } | r ITER ',' ITER '}' ={ if($2 > $4){ i = $2; $2 = $4; $4 = i; } if($4 <= 0) warning("Iteration range f } ; lexinput: defns delim prods end | defns delim end ={ if(!funcflag)phead2(); funcflag = TRUE; } | error ={ # ifdef DEBUG if(debug) { sect1dump(); sect2dump(); } # endif } ; end: delim | ; defns: defns STR STR ={ (void) strcpy (dp, $2); def[dptr] = dp; dp += strlen ($2) + 1; (void) strcpy (dp, $3); subs[dptr++] = dp; if(dptr >= DEFSIZE) error("Too many definitions"); dp += strlen ($3) + 1; if(dp >= dchar+DEFCHAR) error("Definitions too long"); subs[dptr]=must be positive"); else { j = $1; for(k = 2; k<=$2;k++) j = mn2(RCAT,j,dupl($1)); for(i = $2+1; i<=$4; i++){ g = dupl($1); for(k=2;k<=i;k++) g = mn2(RCAT,g,dupl($1)); j = mn2(BAR,j,g); } $$ = j; } } | r ITER '}' ={ if($2 < 0)warning("Can't have negative iteration"); else if($2 == 0) $$ = mn0(RNULLS); else { j = $1; for(k=2;k<=$2;k++) j = mn2(RCAT,j,dupl($1)); $$ = j; } } | r ITER ',' '}' ={ /* from n to infinity */ if($2 < 0)warnidef[dptr]=0; /* for lookup - require ending null */ } | ; delim: DELIM ={ # ifdef DEBUG if(sect == DEFSECTION && debug) sect1dump(); # endif sect++; } ; prods: prods pr ={ $$ = mn2(RNEWE,$1,$2); } | pr ={ $$ = $1;} ; pr: r NEWE ={ if(divflg == TRUE) i = mn1(S1FINAL,casecount); else i = mn1(FINAL,casecount); $$ = mn2(RCAT,$1,i); divflg = FALSE; casecount++; } | error NEWE ={ # ifdef DEBUG if(debug) sect2dump(); # endif } r: CHAR ={ $$ = mn0($1); } | STR ={ p = $1; ng("Can't have negative iteration"); else if($2 == 0) $$ = mn1(STAR,$1); else if($2 == 1)$$ = mn1(PLUS,$1); else { /* >= 2 iterations minimum */ j = $1; for(k=2;k<$2;k++) j = mn2(RCAT,j,dupl($1)); k = mn1(PLUS,dupl($1)); $$ = mn2(RCAT,j,k); } } | SCON r ={ $$ = mn2(RSCON,$2,$1); } | '^' r ={ $$ = mn1(CARAT,$2); } | r '$' ={ i = mn0('\n'); if(!divflg){ j = mn1(S2FINAL,-casecount); k = mn2(RCAT,$1,j); $$ = mn2(DIV,k,i); } else $$ = mn2(RCAT,$1,i); divflg = TRUE; } | '(' r ')' ={ $$ = $2; } | NULLS ={ $$ = mn0(RNULLS); } ; %% yylex(){ register char *p; register int c, i; char *t, *xp; int n, j, k, x; static int sectbegin; static char token[TOKENSIZE]; static int iter; # ifdef DEBUG yylval = 0; # endif if(sect == DEFSECTION) { /* definitions section */ while(!eof) { if(prev == '\n'){ /* next char is at beginning of line */ getl(p=buf); switch(*p){ case '%': switch(c= *(p+1)){ case '%': lgate(); if(!ratfize); # endif if(report == 2)report = 1; continue; case 'o': case 'O': while (*p && !digit(*p))p++; outsize = siconv(p); if (report ==2) report=1; continue; case 'a': case 'A': /* has overridden number of transitions */ while(*p && !digit(*p))p++; if(report == 2)report = 1; ntrans = siconv(p); # ifdef DEBUG if (debug)printf("N. trans (%%a) now %d\n",ntrans); # endif continue; case 'k': case 'K': /* overriden packed char classeor)fprintf(fout,"# "); fprintf(fout,"define YYNEWLINE %d\n",ctable['\n']); if(!ratfor)fprintf(fout,"yylex(){\nint nstr; extern int yyprevious;\n"); sectbegin = TRUE; i = treesize*(sizeof(*name)+sizeof(*left)+ sizeof(*right)+sizeof(*nullstr)+sizeof(*parent))+ALITTLEEXTRA; c = myalloc(i,1); if(c == 0) error("Too little core for parse tree"); p = c; cfree(p,i,1); name = myalloc(treesize,sizeof(*name)); left = myalloc(treesize,sizeof(*lefs */ while (*p && !digit(*p))p++; if (report==2) report=1; cfree(pchar, pchlen, sizeof(*pchar)); pchlen = siconv(p); # ifdef DEBUG if (debug) printf( "Size classes (%%k) now %d\n",pchlen); # endif pchar=pcptr=myalloc(pchlen, sizeof(*pchar)); continue; case 't': case 'T': /* character set specifier */ ZCH = atoi(p+2); if (ZCH < NCH) ZCH = NCH; if (ZCH > 2*NCH) error("ch table needs redeclaration"); chset = TRUE; for(i = 0; i ZCH){ warning("Character value %d out of range",n); continue; } while(!space(*p) && *p) p++; while(space(*p)) p++; t = p; while(*t){ c = ctrans(&t); if(ctable[c]){ if (printable(c)) warning("Character '%c' used twice",c); else warning("Character %o used twice",c);  endif if(report == 2)report = 1; continue; case 'n': case 'N': /* has overridden number of states */ while(*p && !digit(*p))p++; nstates = siconv(p); # ifdef DEBUG if(debug)printf( " no. states (%%n) now %d\n",nstates); # endif if(report == 2)report = 1; continue; case 'e': case 'E': /* has overridden number of tree nodes */ while(*p && !digit(*p))p++; treesize = siconv(p); # ifdef DEBUG if (debug) printf("treesize (%%e) now %d\n",trees } else ctable[c] = n; t++; } p = buf; } { char chused[2*NCH]; int kr; for(i=0; i= 0) p++; t = p; while(*p && index(*p," \t,") < 0)p++;  FOUTCHK(); if(sectbegin == TRUE){ cpyact(); while((c=gch()) && c != '\n'); continue; } if(!funcflag)phead2(); funcflag = TRUE; if(ratfor)fprintf(fout,"%d\n",30000+casecount); else fprintf(fout,"case %d:\n",casecount); if(cpyact()){ if(ratfor)fprintf(fout,"goto 30997\n"); else fprintf(fout,"break;\n"); } while((c=gch()) && c != '\n'); if(peek == ' ' || peek == '\t' || sectbegin == TRUE){ warning("Executable statements should occur right if(!*p) n = FALSE; *p++ = 0; if (*t == 0) continue; i = sptr*2; if(!ratfor)fprintf(fout,"# "); fprintf(fout,"define %s %d\n",t,i); (void) strcpy (sp, t); sname[sptr++] = sp; sname[sptr] = 0; /* required by lookup */ if(sptr >= STARTSIZE) error("Too many start conditions"); sp += strlen (sp) + 1; if(sp >= schar+STARTCHAR) error("Start conditions too long"); } continue; default: warning("Inv after %%"); continue; } x = NEWE; break; case '%': FOUTCHK(); if(prev != '\n') goto character; if(peek == '{'){ /* included code */ getl(buf); while(!eof && getl(buf) && strcmp ("%}",buf) != 0) fprintf(fout,"%s\n",buf); continue; } if(peek == '%'){ c = gch(); c = gch(); x = DELIM; break; } goto character; case '|': FOUTCHK(); if(peek == ' ' || peek == '\t' || peek == '\n'){ if(ratfor)fprintf(fout,"%dalid request %s",p); continue; } /* end of switch after seeing '%' */ case ' ': case '\t': /* must be code */ lgate(); fprintf(fout, "%s\n",p); continue; default: /* definition */ while(*p && !space(*p)) p++; if(*p == 0) continue; prev = *p; *p = 0; bptr = p+1; yylval = buf; if(digit(buf[0])) warning("Substitution strings may not begin with digits"); return(freturn(STR)); } } /* still sect 1, but prev != '\n\n",30000+casecount++); else fprintf(fout,"case %d:\n",casecount++); continue; } x = '|'; break; case '$': if(peek == '\n' || peek == ' ' || peek == '\t' || peek == '|' || peek == '/'){ x = c; break; } goto character; case '^': if(prev != '\n' && scon != TRUE) goto character; /* valid only at line begin */ x = c; break; case '?': case '+': case '.': case '*': case '(': case ')': case ',': case '/': x = c; break; ' */ else { p = bptr; while(*p && space(*p)) p++; if(*p == 0) warning("No translation given - null string assumed"); (void) strcpy (token, p); yylval = token; prev = '\n'; return(freturn(STR)); } } /* end of section one processing */ } else if(sect == RULESECTION){ /* rules and actions */ while(!eof){ switch(c=gch()){ case '\0': return(freturn(0)); case '\n': if(prev == '\n') continue; x = NEWE; break; case ' ': case '\t':  case '}': iter = FALSE; x = c; break; case '{': /* either iteration or definition */ if(digit(c=gch())){ /* iteration */ iter = TRUE; ieval: i = 0; while(digit(c)){ token[i++] = c; c = gch(); } token[i] = 0; yylval = siconv(token); munput('c',c); x = ITER; break; } else { /* definition */ i = 0; while(c && c!='}'){ token[i++] = c; c = gch(); } token[i] = 0; i = lookup(token,def); if(i < 0) warning("Definition %s not found",token); else munput('s',subs[i]); continue; } case '<': /* start condition ? */ if(prev != '\n') /* not at line begin, not start */ goto character; t = slptr; do { i = 0; c = gch(); while(c != ',' && c && c != '>'){ token[i++] = c; c = gch(); } token[i] = 0; if(i == 0) goto character; i = lookup(token,sname); if(i < 0) { warning("Undefined star ('0' <= j && k <= '9'))) warning("Non-portable Character Class"); for(n=j+1;n<=k;n++) symbol[n] = 1; /* implementation dependent */ c = gch(); } } /* try to pack ccl's */ i = 0; for(j=0;j slist+STARTSIZE) /* note not packed ! */ error("Too many start conditions used"); yylval = t; x = SCON; break; case 'oken); ccptr += strlen (token) + 1; if(ccptr >= ccl+CCLSIZE) error("Too many large character classes"); } cclinter(x==CCL); break; case '\\': c = usescape(c=gch()); default: character: if(iter){ /* second part of an iteration */ iter = FALSE; if('0' <= c && c <= '9') goto ieval; } if(alpha(peek)){ i = 0; yylval = token; token[i++] = c; while(alpha(peek)) token[i++] = gch(); if(peek == '?' || peek == '*' || "': i = 0; while((c=gch()) && c != '"' && c != '\n'){ if(c == '\\') c = usescape(c=gch()); token[i++] = c; if(i > TOKENSIZE){ warning("String too long"); i = TOKENSIZE-1; break; } } if(c == '\n') { yyline--; warning("Non-terminated string"); yyline++; } token[i] = 0; if(i == 0)x = NULLS; else if(i == 1){ yylval = token[0]; x = CHAR; } else { yylval = token; x = STR; } break; case peek == '+') munput('c',token[--i]); token[i] = 0; if(i == 1){ yylval = token[0]; x = CHAR; } else x = STR; } else { yylval = c; x = CHAR; } } scon = FALSE; if(x == SCON)scon = TRUE; sectbegin = FALSE; return(freturn(x)); } } /* section three */ ptail(); FOUTCHK(); # ifdef DEBUG if(debug) fprintf(fout,"\n/*this comes from section three - debug */\n"); # endif while(getl(buf) && !eof) fprintf(fout,"%s\n",buf); retur'[': for(i=1;i k) { n = j; j = k; k = n; } if(!(('A' <= j && k <= 'Z') || ('a' <= j && k <= 'z') || n(freturn(0)); } /* end of yylex */ # ifdef DEBUG freturn(i) int i; { if(yydebug) { printf("now return "); if(i < NCH) allprint(i); else printf("%d",i); printf(" yylval = "); switch(i){ case STR: case CCL: case NCCL: strpt(yylval); break; case CHAR: allprint(yylval); break; default: printf("%d",yylval); break; } putchar('\n'); } return(i); } # endif & c!='}'){ token[i++] = c; c = gch(); } token[i] = 0; i = lookup(token,def@ A   rcsid.c. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzc"1 1  sub1.c. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzc"char _rcsid[] = "$Header: rcsid.c,v 1.87 86/11/17 16:33:40 hutch Exp $"; /* + lmain.c: * lmain.c,v 1.11 84/04/19 10:27:12 jimd Exp $Locker: $ + parser.y: * parser.y,v 1.5 83/09/26 09:24:09 dce Exp $Locker: $ + sub1.c: * sub1.c,v 1.5 83/09/26 09:24:28 dce Exp $Locker: $ + sub2.c: * sub2.c,v 1.4 83/09/26 09:24:54 dce Exp $Locker: $ + header.c: * header.c,v 1.4 84/09/12 11:25:38 jimd Exp $Locker: $ + ldefs.c: * ldefs.c,v 1.6 84/04/19 10:26:54 jimd Exp /* * LEX - sub1.c * * $Header: sub1.c,v 1.5 83/09/26 09:24:28 dce Exp $ * $Locker: $ * * Modifications from Berkeley 4.1c BSD * Copyright (c) 1983, Tektronix Inc. * All Rights Reserved * */ /* * Name of file: sub1.c - lex subroutines * * Engineer: David Elliott - ECS * * Origin: Berkeley 4.1c UNIX * * Changes to be made to version 1.1: * * Make more use of registers. * * Log of Revisions: * * $Log: sub1.c,v $ * Revision 1.5 83/09/26 09:24:28 dce * Made changes specified in th$Locker: $ + once.c: * once.c,v 1.3 83/09/26 09:24:03 dce Exp $Locker: $ + /usr/bin/cc: + rcsid.c,v 1.34 85/08/08 15:40:43 steveh Exp + /usr/bin/make: + rcsid.c,v 1.106 85/09/20 17:07:40 maynard Exp + /usr/include/errdefs.h: + errdefs.h,v 1.8 85/12/09 15:51:12 davep Exp + /usr/include/signal.h: + signal.h,v 31.7 86/09/04 17:22:52 patcl Exp $Locker: $ + ldefs.c: + ldefs.c,v 1.6 84/04/19 10:26:54 jimd Exp $Locker: $ + once.c: + once.c,v 1.3 83e header. * * Revision 1.4 83/09/13 15:14:46 dce * Added the subroutine printout, which gets rid of the segmentation * violation errors. * * Revision 1.3 83/09/12 10:56:13 dce * Made more use of registers. * * */ # include "ldefs.c" char * getl(p) /* return next line of input, throw away trailing '\n' */ /* returns 0 if eof is had immediately */ char *p; { register int c; register char *s, *t; t = s = p; while(((c = gch()) != 0) && c != '\n') *t++ = c; *t = 0; if(c == 0 && s =/09/26 09:24:03 dce Exp $Locker: $ + /UTek/tools/bin/cpeg: */ = gch()) == '^'){ x = NCCL; c = gch(); } while(c != ']' && c){ if(c == '\\') c = usescape(c=gch()); symbol[c] = 1; j = c; if((c=gch()) == '-' && peek != ']'){ /* range specified */ c = gch(); if(c == '\\') c = usescape(c=gch()); k = c; if(j > k) { n = j; j = k; k = n; } if(!(('A' <= j && k <= 'Z') || ('a' <= j && k <= 'z') || = t) return(0); prev = '\n'; pres = '\n'; return(s); } space(ch) { switch(ch) { case ' ': case '\t': case '\n': return(1); } return(0); } digit(c) { return(c>='0' && c <= '9'); } error(s,p,d) { if(!eof)fprintf(errorf,"%d: ",yyline); fprintf(errorf,"(Error) "); fprintf(errorf,s,p,d); putc('\n',errorf); # ifdef DEBUG if(debug && sect != ENDSECTION) { sect1dump(); sect2dump(); } # endif if( # ifdef DEBUG debug || # endif report == 1) statistics(); exit(1); /* error return code */ } warning(s,p,d) { if(!eof)fprintf(errorf,"%d: ",yyline); fprintf(errorf,"(Warning) "); fprintf(errorf,s,p,d); putc('\n',errorf); fflush(errorf); fflush(fout); fflush(stdout); } index(a,s) char *s; { register int k; for(k=0; s[k]; k++) if (s[k]== a) return(k); return(-1); } alpha(c) int c; { # ifdef ASCII return('a' <= c && c <= 'z' || 'A' <= c && c <= 'Z'); # endif # ifdef EBCDIC return(index(c,"abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") >= 0); # endif } printabcase '4': case '5': case '6': case '7': c -= '0'; while ((k = *(*ss+1)) >= '0' && k <= '7') { c = c*8 + k - '0'; (*ss)++; } break; } return(c); } cclinter(sw) int sw; { /* sw = 1 ==> ccl */ register int i, j, k; register int m; if(!sw){ /* is NCCL */ for(i=1;i= NCH) return; i = cindex[i]; /* see if ccl is already in our table */ j = 0; if(i){ for(j=1;j040 && c < 0177); # endif # ifdef EBCDIC return(index(c, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,;:><+*)('&%!-=\"")>=0); # endif } lgate() { char fname[20]; if (lgatflg) return; lgatflg=1; if(fout == NULL){ sprintf(fname, "lex.yy.%c", ratfor ? 'r' : 'c' ); fout = fopen(fname, "w"); } if(fout == NULL) error("Can't open %s",fname); if(ratfor) fprintf (fout, "#\n"); phead1(); } /* * The subroutine scopy has been deleted. It was strcpy wit(symbol[j] && cindex[j] != i) || (!symbol[j] && cindex[j] == i)) break; } } if(j >= NCH) return; /* already in */ m = 0; k = 0; for(i=1;i 0}. */ ctrans(ss) register char **ss; { register int c, k; if ((c = **ss) != '\\') return(c); switch(c= *++*ss) { case 'n': c = '\n'; break; case 't': c = '\t'; break; case 'r': c = '\r'; break; case 'b': c = '\b'; break; case 'f': c = 014; break; /* form feed for ascii */ case '\\': c = '\\'; break; case '0': case '1': case '2': case '3':  case '7': c -= '0'; while('0' <= (d=gch()) && d <= '7'){ c = c * 8 + (d-'0'); if(!('0' <= peek && peek <= '7')) break; } break; } return(c); } lookup(s,t) char *s; register char **t; { register int i; i = 0; while(*t){ if(strcmp (s,*t) == 0) return(i); i++; t++; } return(-1); } cpyact(){ /* copy C action to the next ; or closing } */ register int brac, c, mth; register int savline, sw; brac = 0; sw = TRUE; while(!eof){ c = gch(); swt: switch( c ){ case '|': if(brac == 0 && sw == TRUE){ if(peek == '|')gch(); /* eat up an extra '|' */ return(0); } break; case ';': if( brac == 0 ){ putc(c,fout); putc('\n',fout); return(1); } break; case '{': brac++; savline=yyline; break; case '}': brac--; if( brac == 0 ){ putc(c,fout); putc('\n',fout); return(1); } break; case '/': /* look for comments */ putc(c,fout); c = gch(); if( c != '*' ) goto swt; /* it really is a comment */ putc(c,fout); savline=yyline;llstr[d] && nullstr[c])nullstr[tptr] = TRUE; parent[d] = parent[c] = tptr; break; case RSCON: parent[d] = tptr; nullstr[tptr] = nullstr[d]; break; # ifdef DEBUG default: warning("bad switch mn2 %d %d",a,d); break; # endif } if(tptr > treesize) error("Parse tree too big %s",(treesize == TREESIZE?"\nTry using %e num":"")); return(tptr++); } mn1(a,d) int a,d; { name[tptr] = a; left[tptr] = d; parent[tptr] = 0; nullstr[tptr] = 0; switch(a){ case RCCL: case RNCCL: if(strlen (d) while( c=gch() ){ if( c=='*' ){ putc(c,fout); if( (c=gch()) == '/' ) goto loop; } putc(c,fout); } yyline=savline; error( "EOF inside comment" ); case '\'': /* character constant */ mth = '\''; goto string; case '"': /* character string */ mth = '"'; string: putc(c,fout); while( c=gch() ){ if( c=='\\' ){ putc(c,fout); c=gch(); } else if( c==mth ) goto loop; putc(c,fout); if (c == '\n') { yyline--; error( "Non-terminated string or  == 0) nullstr[tptr] = TRUE; break; case STAR: case QUEST: nullstr[tptr] = TRUE; parent[d] = tptr; break; case PLUS: case CARAT: nullstr[tptr] = nullstr[d]; parent[d] = tptr; break; case S2FINAL: nullstr[tptr] = TRUE; break; # ifdef DEBUG case FINAL: case S1FINAL: break; default: warning("bad switch mn1 %d %d",a,d); break; # endif } if(tptr > treesize) error("Parse tree too big %s",(treesize == TREESIZE?"\nTry using %e num":"")); return(tptr++); } mn0(a) int a; { ncharacter constant"); } } error( "EOF in string or character constant" ); case '\0': yyline = savline; error("Action does not terminate"); default: break; /* usual character */ } loop: if(c != ' ' && c != '\t' && c != '\n') sw = FALSE; putc(c,fout); } error("Premature EOF"); } gch(){ register int c; prev = pres; c = pres = peek; peek = pushptr > pushc ? *--pushptr : getc(fin); if(peek == EOF && sargc > 1){ fclose(fin); fin = fopen(sargv[++fptr],"r"); if(fin == NULL) errorame[tptr] = a; parent[tptr] = 0; nullstr[tptr] = 0; if(a >= NCH) switch(a){ case RNULLS: nullstr[tptr] = TRUE; break; # ifdef DEBUG default: warning("bad switch mn0 %d",a); break; # endif } if(tptr > treesize) error("Parse tree too big %s",(treesize == TREESIZE?"\nTry using %e num":"")); return(tptr++); } munput(t,p) /* implementation dependent */ char *p; int t; { register int i,j; if(t == 'c'){ *pushptr++ = peek; /* watch out for this */ peek = p; } else if(t == 's'){ *pushp("Cannot open file %s",sargv[fptr]); peek = getc(fin); sargc--; sargv++; } if(c == EOF) { eof = TRUE; fclose(fin); return(0); } if(c == '\n')yyline++; return(c); } mn2(a,d,c) register int a,d,c; { name[tptr] = a; left[tptr] = d; right[tptr] = c; parent[tptr] = 0; nullstr[tptr] = 0; switch(a){ case RSTR: parent[d] = tptr; break; case BAR: case RNEWE: if(nullstr[d] || nullstr[c]) nullstr[tptr] = TRUE; parent[d] = parent[c] = tptr; break; case RCAT: case DIV: if(nutr++ = peek; peek = p[0]; i = strlen (p); for(j = i-1; j>=1; j--) *pushptr++ = p[j]; } # ifdef DEBUG else error("Unrecognized munput option %c",t); # endif if(pushptr >= pushc+TOKENSIZE) error("Too many characters pushed"); return; } dupl(n) register int n; { /* duplicate the subtree whose root is n, return ptr to it */ register int i; i = name[n]; if(i < NCH) return(mn0(i)); switch(i){ case RNULLS: return(mn0(i)); case RCCL: case RNCCL: case FINAL: case S1FINAL: case S2FINAL:  return(mn1(i,left[n])); case STAR: case QUEST: case PLUS: case CARAT: return(mn1(i,dupl(left[n]))); case RSTR: case RSCON: return(mn2(i,dupl(left[n]),right[n])); case BAR: case RNEWE: case RCAT: case DIV: return(mn2(i,dupl(left[n]),dupl(right[n]))); # ifdef DEBUG default: warning("bad switch dupl %d",n); # endif } return(0); } # ifdef DEBUG allprint(c) char c; { switch(c){ case 014: printf("\\f"); charc++; break; case '\n': printf("\\n"); charc++; break; case '\t': case BAR: printf("| %d %d",left[t],right[t]); break; case RCAT: printf("cat %d %d",left[t],right[t]); break; case PLUS: printf("+ %d",left[t]); break; case STAR: printf("* %d",left[t]); break; case CARAT: printf("^ %d",left[t]); break; case QUEST: printf("? %d",left[t]); break; case RNULLS: printf("nullstring"); break; case FINAL: printf("final %d",left[t]); break; case S1FINAL: printf("s1final %d",left[t]);  printf("\\t"); charc++; break; case '\b': printf("\\b"); charc++; break; case ' ': printf("\\\bb"); break; default: if(!printable(c)){ printf("\\%-3o",c); charc =+ 3; } else putchar(c); break; } charc++; return; } strpt(s) register char *s; { charc = 0; while(*s){ allprint(*s++); if(charc > LINESIZE){ charc = 0; printf("\n\t"); } } return; } sect1dump(){ register int i; printf("Sect 1:\n"); if(def[0]){ printf("str trans\break; case S2FINAL: printf("s2final %d",left[t]); break; case RNEWE: printf("new %d %d",left[t],right[t]); break; case RSCON: p = right[t]; printf("start %s",sname[*p++-1]); while(*p) printf(", %s",sname[*p++-1]); printf(" %d",left[t]); break; default: printf("unknown %d %d %d",name[t],left[t],right[t]); break; } if(nullstr[t])printf("\t(null poss.)"); putchar('\n'); } } # endif ng %e num":"")); return(tptr++); } mn0(a) int a; { nn"); i = -1; while(def[++i]) printf("%s\t%s\n",def[i],subs[i]); } if(sname[0]){ printf("start names\n"); i = -1; while(sname[++i]) printf("%s\n",sname[i]); } if(chset == TRUE){ printf("char set changed\n"); for(i=1;i= positions+maxpos) error("Too many positions %s",(maxpos== MAXPOS?"\nTry using %p num":"")); return; } follow(v) int v; { register int p; if(v >= tptr-1)return; p = parent[v]; if(p == 0) return; switch(name[p]){ /* will not be CHAR RNULLS FINAL S1FINAL S2FINAL RCCL RNCCL */ case RSTR: if(tmpstat[p] == FALSE){ (i == RSTR) cfoll(left[v]); else if(i == RCCL || i == RNCCL){ /* compress ccl list */ for(j=1; j= pcptr)*pcptr++ = cindex[j]; } *pcptr++ = 0; if(pcptr > pchar + pchlen) error("Too many packed character classes"); left[v]  count++; tmpstat[p] = TRUE; } break; case STAR: case PLUS: first(v); follow(p); break; case BAR: case QUEST: case RNEWE: follow(p); break; case RCAT: case DIV: if(v == left[p]){ if(nullstr[right[p]]) follow(p); first(right[p]); } else follow(p); break; case RSCON: case CARAT: follow(p); break; # ifdef DEBUG default: warning("bad switch follow %d",p); # endif } return; } first(v) /* calculate set of positions with v as root which c= (int *)p; name[v] = RCCL; /* RNCCL eliminated */ # ifdef DEBUG if(debug && *p){ printf("ccl %d: %d",v,*p++); while(*p) printf(", %d",*p++); putchar('\n'); } # endif } break; case CARAT: cfoll(left[v]); break; case STAR: case PLUS: case QUEST: case RSCON: cfoll(left[v]); break; case BAR: case RCAT: case DIV: case RNEWE: cfoll(left[v]); cfoll(right[v]); break; # ifdef DEBUG case FINAL: case S1FINAL: case S2FINAL: break; default:an be active initially */ int v; { register int i; register char *p; i = name[v]; if(i < NCH)i = 1; switch(i){ case 1: case RCCL: case RNCCL: case RNULLS: case FINAL: case S1FINAL: case S2FINAL: if(tmpstat[v] == FALSE){ count++; tmpstat[v] = TRUE; } break; case BAR: case RNEWE: first(left[v]); first(right[v]); break; case CARAT: if(stnum % 2 == 1) first(left[v]); break; case RSCON: i = stnum/2 +1; p = (char *)right[v]; while(*p) if(*p++ == i){ warning("bad switch cfoll %d",v); # endif } return; } # ifdef DEBUG pfoll() { register int i,k,*p; register int j; /* print sets of chars which may follow positions */ printf("pos\tchars\n"); for(i=0;i= 1){ printf("%d:\t%d",i,*p++); for(k=2;k<=j;k++) printf(", %d",*p++); putchar('\n'); } } return; } # endif add(array,n) int **array; int n; { register int i, *temp; register char *ctemp; temp = nxtpos; ctemp = tm first(left[v]); break; } break; case STAR: case QUEST: case PLUS: case RSTR: first(left[v]); break; case RCAT: case DIV: first(left[v]); if(nullstr[left[v]]) first(right[v]); break; # ifdef DEBUG default: warning("bad switch first %d",v); # endif } return; } cgoto(){ register int i, j, s; register int npos, curpos, n; int tryit; char tch[NCH]; int tst[NCH]; char *q; /* generate initial state, for each start condition */ FOUTCHK(); if(ratfor){ fprintf(fout,"blockdata\n"); fprintf(fout,"common /Lvstop/ vstop\n"); fprintf(fout,"define Svstop %d\n",nstates+1); fprintf(fout,"integer vstop(Svstop)\n"); } else fprintf(fout,"int yyvstop[] ={\n0,\n"); while(stnum < 2 || stnum/2 < sptr){ for(i = 0; i 0)first(tptr-1); add(state,stnum); # ifdef DEBUG if(debug){ if(stnum > 1) printf("%s:\n",sname[stnum/2]); pstate(stnum); } # endif stnum++; } stnum--; /* even stnum = might nbug)pstate(stnum); # endif tch[n] = i; tst[n++] = stnum; } else { /* xstate >= 0 ==> state exists */ tch[n] = i; tst[n++] = xstate; } } } tch[n] = 0; tst[n] = -1; /* pack transitions into permanent array */ if(n > 0) packtrans(s,tch,tst,n,tryit); else gotof[s] = -1; } ratfor ? fprintf(fout,"end\n") : fprintf(fout,"0};\n"); return; } /* Beware -- 70% of total CPU time is spent in this subroutine - if you don't believe me - try it yourself ! */ nextsot be at line begin */ /* odd stnum = must be at line begin */ /* even states can occur anywhere, odd states only at line begin */ for(s = 0; s <= stnum; s++){ tryit = FALSE; cpackflg[s] = FALSE; sfall[s] = -1; acompute(s); for(i=0;i LINESIZE){= 0; tz = temp + tptr; while(temp < tz){ if(*temp == 2){ j++; *temp++ = 1; } else *temp++ = 0; } count = j; return; } notin(n) int n; { /* see if tmpstat occurs previously */ register int *j,k; register char *temp; register int i; if(count == 0) return(-2); temp = tmpstat; for(i=n;i>=0;i--){ /* for each state */ j = state[i]; if(count == *j++){ for(k=0;k= count) return(i); } } return(-1); } packtrans(st,tch,tst,cn charc = 0; printf("\n\t"); } } putchar('\n'); } # endif /* for each char, calculate next state */ n = 0; for(i = 1; i= nstates) error("Too many states %s",(nstates == NSTATES ? "\nTry using %n num":"")); add(state,++stnum); # ifdef DEBUG if(det,tryit) int st, *tst, cnt,tryit; char *tch; { /* pack transitions into nchar, nexts */ /* nchar is terminated by '\0', nexts uses cnt, followed by elements */ /* gotof[st] = index into nchr, nexts for state st */ /* sfall[st] = t implies t is fall back state for st */ /* == -1 implies no fall back */ int cmin, cval, diff, p; register int tcnt, *ast; register int i,j,k; char *ach; int go[NCH], temp[NCH], c; int swork[NCH]; char cwork[NCH]; int upper; rcount += cnt; cmin = -1;  cval = NCH; ast = tst; ach = tch; /* try to pack transitions using ccl's */ if(!optim)goto nopack; /* skip all compaction */ if(tryit){ /* ccl's used */ for(i=1;i nchar[p-1]){ warning("bad transition %d %d",st,cmin); goto nopack; } /* ach[j] == nchar[p-1] */ if(ast[j] != nexts[p] || ast[j] == ans */ /* count them */ k = 0; for(i=1;i cnt) continue; diff = 0; k = 0; j = 0; upper = p + tcnt; while(ach[j] && p < upper){ while(ach[j] < nchar[p] && ach[j]){diff++; j++; } if(ach[j] == 0)break; if(ach[j] > = -1; nptr--; } else if(nptr > ntrans) error("Too many transitions %s",(ntrans==NTRANS?"\nTry using %a num":"")); return; } # ifdef DEBUG pstate(s) int s; { register int *p,i,j; printf("State %d:\n",s); p = state[s]; i = *p++; if(i == 0) return; printf("%4d",*p++); for(j = 1; j= 0) printf("%d\t",nexts[p+1]); else printf("err\t"); allprint(nchar[p++]); while(nexts[p] == nexts[p+1] && nchar[p]){ if(charc > LINESIZE){ charc = 0; printf("\n\t"); } allprint(nchar[p++]); } putchar('\n'); } putchar('\n'); return; } # endif acompute(s) /* compute action list = set of poss. actions */ int s; { register int *p, i, j; register int cnt, m; int temp[300], k, neg[300], n; FOUTCHK(); k = 0; n = 0; p = state[s]; cnt = *p++; if(cnt > 300) error("Too many positions for one state - acompute"); for(i=0;i<if(cindex[j] == i){ allprint(j); if(charc > LINESIZE){ printf("\n\t"); charc = 0; } } putchar('\n'); } charc = 0; printf("match:\n"); for(i=0;i LINESIZE){ putchar('\n'); charc = 0; } } putchar('\n'); return; } # endif mkmatch(){ register int i; char tab[NCH]; for(i=0; iNACTIONS) error("Too many right contexts"); extra[left[*p]] = 1; } else if(name[*p] == S2FINAL)neg[n++] = left[*p]; p++; } atable[s] = -1; if(k < 1 && n < 1) return; # ifdef DEBUG if(debug) printf("final %d actions:",s); # endif /* sort action list */ for(i=0; i outsize - ZCH) error("output table overflow"); for(j = bot; j<= top; j++){ k=startup+ctable[nchar[j]]; if(verify[k])break; } } while (j <=  ratfor ? fprintf(fout,"data vstop(%d)/%d/\n",aptr,neg[i]) : fprintf(fout,"%d,\n",neg[i]); aptr++; # ifdef DEBUG if(debug)printf("%d ",neg[i]); # endif } # ifdef DEBUG if(debug)putchar('\n'); # endif ratfor ? fprintf(fout,"data vstop (%d)/0/\n",aptr) : fprintf(fout,"0,\n"); aptr++; return; } # ifdef DEBUG pccl() { /* print character class sets */ register int i, j; printf("char class intersection\n"); for(i=0; i< ccount; i++){ charc = 0; printf("class %d:\n\t",i); for(j=1;j outsize - ZCH) error("output table overflow"); for(j = bot; j<= top; j++){ k = startup + nchar[j]; if(verify[k])break; } } while (j <= top); /* have found place */ # ifdef DEBUG if (debug) printf(" startup going to be %d\n", startup); # endif for(j = bot; j<= top; j++){ k = startup + nchar[j]; verify[k] = i+1; /* state number + 1*/ advance[k] = nexts[j+1]+1; /* state number + 1*/ if(yytop < k) yytop = k; } } stoff[i] = startup; } /* stoff[i] = offset into verify, advance for trans for ={\n"); if (chset==0) /* no chset, put out in normal order */ { for(i=0; i NCH ? "int" : "char") for(i=0; i=0; i--) a[i+1]=a[i]; } upone(a,n) int *a; { register int i; for(i=0; i<=n ; i++) a[i]++; } bprint[i]); if(sfall[i] != -1) fprintf(fout,"yysvec+%d,\t", sfall[i]+1); /* state + 1 */ else fprintf(fout,"0,\t\t"); if(atable[i] != -1) fprintf(fout,"yyvstop+%d,",atable[i]); else fprintf(fout,"0,\t"); # ifdef DEBUG fprintf(fout,"\t\t/* state %d */",i); # endif putc('\n',fout); } fprintf(fout,"0,\t0,\t0};\n"); /* put out yymatch */ fprintf(fout,"struct yywork *yytop = yycrank+%d;\n",yytop); fprintf(fout,"struct yysvf *yybgin = yysvec+1;\n"); if(optim){ fprintf(fout,"char yymatch[] (a,s,n) char *s, *a; int n; { register int i, j, k; FOUTCHK(); fprintf(fout,"block data\n"); fprintf(fout,"common /L%s/ %s\n",s,s); fprintf(fout,"define S%s %d\n",s,n); fprintf(fout,"integer %s (S%s)\n",s,s); for(i=1;i=0;i--){ j = array[i]; if(j && *j++ == count){ for(k=0;k= count){ array[n] = array[i]; return; } } } add(array,n); return; } # endif char[j]; verify[k] = i+1; /* state number + 1*/ advance[k] = nexts[j+1]+1; /* state number + 1*/ if(yytop < k) yytop = k; } } stoff[i] = startup; } /* stoff[i] = offset into verify, advance for trans for %% a printf("A"); *a; int n; { register int i, j, k; FOUTCHK(); fprintf(fout,"block data\n"); fprintf(fout,"common /L%s/ %s\n",s,s); fprintf(fout,"define S%s %d\n",s,n); fprintf(fout,"integer %s (S%s)\n",s,s); for(i=1;i 2*NCH) error("ch table needs redeclaration"); chset = TRUE; for(i = 0; i ZCH){ warning("Character value %d out of range",n); continue; } while(!space(*p) && *p) p++; while(space(*p)) p++; t = p; while(*t){ c = ctrans(&t); if(ctable[c])positions */ while(*p && !digit(*p))p++; maxpos = siconv(p); # ifdef DEBUG if (debug) printf("positions (%%p) now %d\n",maxpos); # endif if(report == 2)report = 1; continue; case 'n': case 'N': /* has overridden number of states */ while(*p && !digit(*p))p++; nstates = siconv(p); # ifdef DEBUG if(debug)printf( " no. states (%%n) now %d\n",nstates); # endif if(report == 2)report = 1; continue; case 'e': case 'E': /* has overridden number { if (printable(c)) warning("Character '%c' used twice",c); else warning("Character %o used twice",c); } else ctable[c] = n; t++; } p = buf; } { char chused[2*NCH]; int kr; for(i=0; i= 0) p++; t = p; while(*p && index(*p," \t,") < 0)p++; if(!*p) n = FALSE; *p++ = 0; if (*t == 0) continue; i = sptr*2; if(!ratfor)fprintf(fout,"# "); fprintf(fout,"define %s %d\n",t,i); (void) strcpy (sp, t); sname[sptr++] = sp; sname[sptr] = 0; /* required by lookup */ if(sptr >= STARTSIZE) error("Too many start conditions"); sp += str while((c=gch()) && c != '\n'); if(peek == ' ' || peek == '\t' || sectbegin == TRUE){ warning("Executable statements should occur right after %%"); continue; } x = NEWE; break; case '%': FOUTCHK(); if(prev != '\n') goto character; if(peek == '{'){ /* included code */ getl(buf); while(!eof && getl(buf) && strcmp ("%}",buf) != 0) fprintf(fout,"%s\n",buf); continue; } if(peek == '%'){ c = gch(); c = gch(); x = DELIM; len (sp) + 1; if(sp >= schar+STARTCHAR) error("Start conditions too long"); } continue; default: warning("Invalid request %s",p); continue; } /* end of switch after seeing '%' */ case ' ': case '\t': /* must be code */ lgate(); fprintf(fout, "%s\n",p); continue; default: /* definition */ while(*p && !space(*p)) p++; if(*p == 0) continue; prev = *p; *p = 0; bptr = p+1; yylval = buf; if(digit(b break; } goto character; case '|': FOUTCHK(); if(peek == ' ' || peek == '\t' || peek == '\n'){ if(ratfor)fprintf(fout,"%d\n",30000+casecount++); else fprintf(fout,"case %d:\n",casecount++); continue; } x = '|'; break; case '$': if(peek == '\n' || peek == ' ' || peek == '\t' || peek == '|' || peek == '/'){ x = c; break; } goto character; case '^': if(prev != '\n' && scon != TRUE) goto character; /* valid only at line begin */ uf[0])) warning("Substitution strings may not begin with digits"); return(freturn(STR)); } } /* still sect 1, but prev != '\n' */ else { p = bptr; while(*p && space(*p)) p++; if(*p == 0) warning("No translation given - null string assumed"); (void) strcpy (token, p); yylval = token; prev = '\n'; return(freturn(STR)); } } /* end of section one processing */ } else if(sect == RULESECTION){ /* rules and actions */ while(!eof){ switch( x = c; break; case '?': case '+': case '.': case '*': case '(': case ')': case ',': case '/': x = c; break; case '}': iter = FALSE; x = c; break; case '{': /* either iteration or definition */ if(digit(c=gch())){ /* iteration */ iter = TRUE; ieval: i = 0; while(digit(c)){ token[i++] = c; c = gch(); } token[i] = 0; yylval = siconv(token); munput('c',c); x = ITER; break; } else c=gch()){ case '\0': return(freturn(0)); case '\n': if(prev == '\n') continue; x = NEWE; break; case ' ': case '\t': FOUTCHK(); if(sectbegin == TRUE){ cpyact(); while((c=gch()) && c != '\n'); continue; } if(!funcflag)phead2(); funcflag = TRUE; if(ratfor)fprintf(fout,"%d\n",30000+casecount); else fprintf(fout,"case %d:\n",casecount); if(cpyact()){ if(ratfor)fprintf(fout,"goto 30997\n"); else fprintf(fout,"break;\n"); }{ /* definition */ i = 0; while(c && c!='}'){ token[i++] = c; c = gch(); } token[i] = 0; i = lookup(token,def); if(i < 0) warning("Definition %s not found",token); else munput('s',subs[i]); continue; } case '<': /* start condition ? */ if(prev != '\n') /* not at line begin, not start */ goto character; t = slptr; do { i = 0; c = gch(); while(c != ',' && c && c != '>'){ token[i++] = c; c = gch(); } token[i] = 0; if(i == 0) goto character; i = lookup(token,sname); if(i < 0) { warning("Undefined start condition %s",token); continue; } *slptr++ = i+1; } while(c && c != '>'); *slptr++ = 0; /* check if previous value re-usable */ for (xp=slist; xp= ccl+CCLSIZE) error("Too many large character classes"); } cclinter(x==CCL); break; case '\\': c = usescape(c=gch()); default: character: if(iter){ /* second part of an iteration */ iter = FALSE; if('0' <= c && c <= '9') goto ieval; } if(alpha(pef(slptr > slist+STARTSIZE) /* note not packed ! */ error("Too many start conditions used"); yylval = t; x = SCON; break; case '"': i = 0; while((c=gch()) && c != '"' && c != '\n'){ if(c == '\\') c = usescape(c=gch()); token[i++] = c; if(i > TOKENSIZE){ warning("String too long"); i = TOKENSIZE-1; break; } } if(c == '\n') { yyline--; warning("Non-terminated string"); yyline++; } token[i] = 0; if(i == 0)x ek)){ i = 0; yylval = token; token[i++] = c; while(alpha(peek)) token[i++] = gch(); if(peek == '?' || peek == '*' || peek == '+') munput('c',token[--i]); token[i] = 0; if(i == 1){ yylval = token[0]; x = CHAR; } else x = STR; } else { yylval = c; x = CHAR; } } scon = FALSE; if(x == SCON)scon = TRUE; sectbegin = FALSE; return(freturn(x)); } } /* section three */ ptail(); FOUTCHK(); # ifdef DEB= NULLS; else if(i == 1){ yylval = token[0]; x = CHAR; } else { yylval = token; x = STR; } break; case '[': for(i=1;i k) { n = j; j = k; k = n; } if(!(('A' <= j && k <= 'Z') || ('a' <= j && k <= 'z') || ('0' <= j && k <= '9'))) warning("Non-portable Character Class"); for(n=j+1;n<=k;n++) symbol[n] = 1; /* implementation dependent */ c = gch(); } } /* try to pack ccl's */ i = 0; for(j=0;j &yys[YYMAXDEPTH] ) { yyerror( "yacc stack overflow" ); return(1); } *yyps = yystate; ++yypv; *yypv = yyval; yynewstate: yyn = yypact[yystate]; if( yyn<= YYFLAG ) goto yydefault; /* simple state */ if( yychar<0 ) if( (yychar=yylex())<0 ) yychar=0; if( (yyn += yychar)<0 || yyn >= YYLAST ) goto yydefault;  4, 5, 5, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 }; short yyr2[]={ 0, 1, 4, 3, 1, 1, 0, 3, 0, 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 3, 2, 3, 5, 3, 4, 2, 2, 2, 3, 1 }; short yychk[]={ -1000, -1, -2, -3, 256, -4, 260, 261, -5, -6, -7, -4, -8, 256, 257, 260, 46, 258, 259, 262, 94, 40, 265, 260, -6, -7, 264, 42, 43, 63, 124, -8, 47, 263, 36, 264if( yychk[ yyn=yyact[ yyn ] ] == yychar ){ /* valid shift */ yychar = -1; yyval = yylval; yystate = yyn; if( yyerrflag > 0 ) --yyerrflag; goto yystack; } yydefault: /* default state action */ if( (yyn=yydef[yystate]) == -2 ) { if( yychar<0 ) if( (yychar=yylex())<0 ) yychar = 0; /* look through exception table */ for( yyxi=yyexca; (*yyxi!= (-1)) || (yyxi[1]!=yystate) ; yyxi += 2 ) ; /* VOID */ while( *(yyxi+=2) >= 0 ){ if( *yyxi == yychar ) break; } if( (yyn = yyxi[1]) < 0 ) return(0); /* accept */ } if( yyn == 0 ){ /* error */ /* error ... attempt to resume parsing */ switch( yyerrflag ){ case 0: /* brand new error */ yyerrlab: yyerror( "syntax error" ); ++yynerrs; case 1: case 2: /* incompletely recovered error ... try again */ yyerrflag = 3; /* find a state where "error" is a legal shift action */ while ( yyps >= yys ) { yyn = yypact[*yyps] + YYERRCODE; if( yyn>= 0 && yyn < YYLAST && yychk[yyact[yyn]] == YYERRCODE ){ (void) strcpy (dp, yypvt[-0]); subs[dptr++] = dp; if(dptr >= DEFSIZE) error("Too many definitions"); dp += strlen (yypvt[-0]) + 1; if(dp >= dchar+DEFCHAR) error("Definitions too long"); subs[dptr]=def[dptr]=0; /* for lookup - require ending null */ } break; case 9: # line 72 "parser.y" { # ifdef DEBUG if(sect == DEFSECTION && debug) sect1dump(); # endif sect++; } break; case 10: # line 80 "parser.y" { yyval = mn2(RNEWE,yypvt[-1],yypvt[-0]); } break; case 11: # line 83 "parser.y" { y yystate = yyact[yyn]; /* simulate a shift of "error" */ goto yystack; } yyn = yypact[*yyps]; /* the current yyps has no shift onn "error", pop stack */ #ifdef YYDEBUG if( yydebug ) printf( "error recovery pops state %d, uncovers %d\n", *yyps, yyps[-1] ); #endif --yyps; --yypv; } /* there is no state on the stack with an error shift ... abort */ yyabort: return(1); case 3: /* no shift yet; clobber input char */ #ifdef YYDEBUG iyval = yypvt[-0];} break; case 12: # line 86 "parser.y" { if(divflg == TRUE) i = mn1(S1FINAL,casecount); else i = mn1(FINAL,casecount); yyval = mn2(RCAT,yypvt[-1],i); divflg = FALSE; casecount++; } break; case 13: # line 95 "parser.y" { # ifdef DEBUG if(debug) sect2dump(); # endif } break; case 14: # line 101 "parser.y" { yyval = mn0(yypvt[-0]); } break; case 15: # line 103 "parser.y" { p = yypvt[-0]; i = mn0(*p++); while(*p) i = mn2(RSTR,i,*p++); yyval = i; } break; case 16:f( yydebug ) printf( "error recovery discards char %d\n", yychar ); #endif if( yychar == 0 ) goto yyabort; /* don't discard EOF, quit */ yychar = -1; goto yynewstate; /* try again in the same state */ } } /* reduction by production yyn */ #ifdef YYDEBUG if( yydebug ) printf("reduce %d\n",yyn); #endif yyps -= yyr2[yyn]; yypvt = yypv; yypv -= yyr2[yyn]; yyval = yypv[1]; yym=yyn; /* consult goto table to find next state */ yyn = yyr1[yyn]; yyj = yypgo[yyn] + *yyps + 1;  # line 111 "parser.y" { symbol['\n'] = 0; if(psave == FALSE){ p = ccptr; psave = ccptr; for(i=1;i<'\n';i++){ symbol[i] = 1; *ccptr++ = i; } for(i='\n'+1;i ccl+CCLSIZE) error("Too many large character classes"); } else p = psave; yyval = mn1(RCCL,p); cclinter(1); } break; case 17: # line 133 "parser.y" { yyval = mn1(RCCL,yypvt[-0]); } break; case 18: # line 135 "parser.y" { yyval = if( yyj>=YYLAST || yychk[ yystate = yyact[yyj] ] != -yyn ) yystate = yyact[yypgo[yyn]]; switch(yym){ case 1: # line 33 "parser.y" { # ifdef DEBUG if(debug) sect2dump(); # endif } break; case 3: # line 41 "parser.y" { if(!funcflag)phead2(); funcflag = TRUE; } break; case 4: # line 46 "parser.y" { # ifdef DEBUG if(debug) { sect1dump(); sect2dump(); } # endif } break; case 7: # line 57 "parser.y" { (void) strcpy (dp, yypvt[-1]); def[dptr] = dp; dp += strlen (yypvt[-1]) + 1;  mn1(RNCCL,yypvt[-0]); } break; case 19: # line 137 "parser.y" { yyval = mn1(STAR,yypvt[-1]); } break; case 20: # line 139 "parser.y" { yyval = mn1(PLUS,yypvt[-1]); } break; case 21: # line 141 "parser.y" { yyval = mn1(QUEST,yypvt[-1]); } break; case 22: # line 143 "parser.y" { yyval = mn2(BAR,yypvt[-2],yypvt[-0]); } break; case 23: # line 145 "parser.y" { yyval = mn2(RCAT,yypvt[-1],yypvt[-0]); } break; case 24: # line 147 "parser.y" { if(!divflg){ j = mn1(S2FINAL,-casecount); i = mn2(RCAT,yypvt[-2],j); yyval = mn2(DIV,i,yypvt[-0]); } else { yyval = mn2(RCAT,yypvt[-2],yypvt[-0]); warning("Extra slash removed"); } divflg = TRUE; } break; case 25: # line 159 "parser.y" { if(yypvt[-3] > yypvt[-1]){ i = yypvt[-3]; yypvt[-3] = yypvt[-1]; yypvt[-1] = i; } if(yypvt[-1] <= 0) warning("Iteration range must be positive"); else { j = yypvt[-4]; for(k = 2; k<=yypvt[-3];k++) j = mn2(RCAT,j,dupl(yypvt[-4])); for(i = yypvt[-3]+1; i<=yypvt[-1]; i++){ g = dupl(yyp    yywrap.c. ڌt: ^L L-z-z SxԐ1-6-87 lex@LCzc"vt[-4]); for(k=2;k<=i;k++) g = mn2(RCAT,g,dupl(yypvt[-4])); j = mn2(BAR,j,g); } yyval = j; } } break; case 26: # line 180 "parser.y" { if(yypvt[-1] < 0)warning("Can't have negative iteration"); else if(yypvt[-1] == 0) yyval = mn0(RNULLS); else { j = yypvt[-2]; for(k=2;k<=yypvt[-1];k++) j = mn2(RCAT,j,dupl(yypvt[-2])); yyval = j; } } break; case 27: # line 191 "parser.y" { /* from n to infinity */ if(yypvt[-2] < 0)warning("Can't have negative iteration");/* @@(#)yywrap.c 4.1 12/25/82 */ /* * YYWRAP.C - yacc library file * * $Header: yywrap.c,v 1.2 83/12/22 15:58:52 jimd Exp $ * $Locker: $ * * Modification from Berkeley 4.2 * Copyright (c) Tektronix Inc. * All Rights Reserved. * */ /* * Author: Not Listed. * * Engineer: Jim Dailey - ECS * * Origin: Berkeley 4.2 * * Calling Structure: * * Changes made to version 1.1: * * 1. Standard Changes * * o Added the above and following header information. * * Changes made to version 1.2: *  else if(yypvt[-2] == 0) yyval = mn1(STAR,yypvt[-3]); else if(yypvt[-2] == 1)yyval = mn1(PLUS,yypvt[-3]); else { /* >= 2 iterations minimum */ j = yypvt[-3]; for(k=2;k #include #include #include #include #include /*#define LOGIN 1*/ #define RAW 1 /*#define REMOTE 1 /* seems to work best this way */ #define STDIN 0 #define STDOUT 1 #define STDERR 2 #define SLAVE 0 #define MASTER 1 int pty_master; char buf[BUFSIZ]; extern makeControlTerminal(); extern yieldCPU(); terminate(){fprintf(stderr, "Child Death, exit.\n"); exit(0);} main terminate even move.l #0,d0 sys term child_task even move.l master_FD,d0 sys close move.l slave_FD,d0 move.l #0,a0 sys dups move.l slave_FD,d0 move.l #1,a0 sys dups move.l slave_FD,d0 move.l #2,a0 sys dups sys exec,shell,shell_args trap #5 shell fcc '/bin/shell',0 shell_args even dc.l 10f dc.l 12f dc.l 0 10 fcc '+shell',0 12 fcc '+s',0 bell dc.b $07 data master_FD ds.l 1 slave_FD ds.l 1 tty_FD ds.l 1 master_FD_list ds.l NUM_WINDOWS open_tty dc.w open tty_name dc.l 0 dc.l(argc, argv, envp) int argc; char *argv[]; char *envp[]; { struct sgttyb b; int pid, s; int fds[2]; signal(SIGDEAD, terminate); signal(SIGHUP, terminate); #ifdef RAW gtty(STDIN, &b); b.sg_flag |= RAW; stty(STDIN, &b); #endif /* fds[0] == slave file-descriptor, fds[1] == master */ if (create_pty(fds) != 0) { perror("pty create"); exit(1); } #ifdef REMOTE printf("Setting pty REMOTE mode\n"); if (control_pty(fds[MASTER], PTY_SET_MODE, PTY_REMOTE_MODE) == -1) perror("master pty set mode"); #endif /* create the child who has pty-slave as STD{in, out, err} */ if ((pid = fork()) < 0) { perror("fork"); exit(1); } if (pid) {/* parent code */ close(fds[SLAVE]); /* close slave pty */ suckemUP(fds[MASTER]); exit(0);ENOINPUT) perror("stdin read"); if (pcc > 0) { if ( (write(pty_master, buf, pcc)) != pcc) perror("master write"); } } #endif signal(SIGINPUT, fakeIt); } pty_signal() { signal(SIGINPUT, pty_signal); } suckemUP(master) int master; { int pcc, pstat; pty_master = master; signal(SIGINPUT, pty_signal); fcntl(master, FNOBLOCK); wh /*NOTREACHED*/ } /* child code */ close(fds[MASTER]); /* force slave-pty to be STD{in, out & err} for the child */ close(0); close(1); close(2); makeControlTerminal(fds[SLAVE]); dup2(fds[SLAVE], 0); dup2(fds[SLAVE], 1); dup2(fds[SLAVE], 2); close(fds[SLAVE]); /* free this descriptor */ for(s=3; s<32; s++) close(s); /* be tidy */ #ifdef LOGIN execlp("/etc/loginile (TRUE) { yieldCPU(); /* * Something to read from the pty... */ while ((pcc = read(master, buf, sizeof(buf))) > 0) { write(STDOUT, buf, pcc); fflush(stdout); } if ( (pstat=control_pty(master, PTY_INQUIRY, 0 )) == -1) { perror("pty INQUIRY"); return; } if (pstat & P", "login", 0); #else execlp("/bin/shell", "/bin/shell", 0); execlp("/bin/TEKshell", "/bin/TEKshell", 0); #endif perror("child execlp"); exit(1); } statTTY(fd) int fd; { struct sgttyb tty; printf("my tty name '%s', ",ttyname(fd)); gtty(fd, &tty); printf("mode: "); if (tty.sg_flag & RAW) printf("RAW "); if (tty.sg_flag & ECHO) printf("ECHO "); if (tty.sg_flag & XTABS) TY_EOF) { fprintf(stderr, "EOF on pty\n"); close(master); return; } if ( (pcc=read(STDIN, buf, BUFSIZ)) == -1) { if (errno != ENOINPUT && errno != EINTR ) perror("stdin read"); } if (pcc > 0) { if ( (write(master, buf, pcc)) != pcc) perror("master write");  printf("XTABS "); if (tty.sg_flag & LCASE) printf("LCASE "); if (tty.sg_flag & CRMOD) printf("CRMOD "); if (tty.sg_flag & SCOPE) printf("SCOPE "); if (tty.sg_flag & CBREAK) printf("CBREAK "); if (tty.sg_flag & CNTRL) printf("CNTRL "); printf("\n"); } fakeIt() { int pcc; #ifdef TMP_RM if ( (pcc=read(STDIN, buf, BUFSIZ)) == -1) { if (errno !=  } } } int argc; char *argv[]; char *envp[]; { struct sgttyb b; int pid, s; int fds[2]; signal(SIGDEAD, terminate); signal(SIGHUP, terminate); #ifdef RAW gtty(STDIN, &b); b.sg_flag |= RAW; stty(STDIN, &b); #endif /* fds[0] == slave file-descriptor, fds[1] == master */ if (create_pty(fds) != 0) { perror("pty create"); exit(1); } #ifdef REM  E  2"pty_with_pty_int.r. ڌt:<^Ȣ ȶȾ-z-z ˒SxbCzr"it6A@_signalHAR_signalb_gttyx_stty _create_pty_perror_exit_fork_perrorƀ_exit؀_closeA_exit_close_close_close_close_makeControlTerminal&_dup26_dup2F_dup2R_closen_close|_execlp_execlp_perror_exitԀ_ttyname_printf_gtNV./<8NXBNN^NuNVH..t/NX.t/NXA.BNXA.BNXA.NJg.Nt.NN-@l.Nt.N$.g.N.N:BN.NBNt.Nt.N.NB/.NXt./.NXt./.NX.Nt-B l.NR`B/<//<$NPB/<H/<:NP.VNt.NN^NuNVty_printf _printf8>_printfV\_printftz_printf_printf_printfԀ_printf_printf_printf A_signal&A0_signalNTA^_signaln_fcntl~ _yieldCPU_read_write__iob_fflushЀ _control_pty_perror__iob_fprintf_close*H..N./<cNXA./.NX.vN.g.}N.g.N.g.N.g.N.g.N.g.N.g.N.g.N.NN^NuNV.t#/NXN^NuNV. t#/NXN^NuNVH.#. t#/NXt./.NX<tg,N./</.NP-@o&./<t/NP.N2_readN_errno\_errnofl_perror~_write_perror _pty_master _buf _terminate$ _main _statTTY _fakeIt _pty_signal: _suckemUPpty_with_pty_i printf("CBREAK "); if (tty.sg_flag & CNTRL) printf("CNTRL "); printf("\n"); } fakeIt() { int pcc; #ifdef TMP_RM if ( (pcc=read(STDIN, buf, BUFSIZ)) == -1) { if (errno != `BB/.NP-@ f.N`.g$./<8NX.N`./<BNP-@ f* %g g.N$.o,./</.NPg.N`N^NuChild Death, exit. pty createfork/bin/shell/bin/shell/bin/TEKshell/bin/TEKshellchild execlpmy tty name '%s', mode: RAW ECHO XTABS LCASE CRMOD SCOPE CBREAK CNTRL pty INQUIRYEOF on pty stdin readmaster write __iob_fprintf_exKo?K &ptyold. ڌt:<^Ȣ ȶȾ-z-z ˒SxbCzd"; D@ V@g#D TЏ#C/Ho//N^OBN NV.C/<@8NXt.N N^NuNVH.8t/N tX.8t/N tXA.t/NXA.t/N XA.NJg.CNPt.N N-@l.CNPt.N $.g .N .N>t.N .N t.N t.N t.N .N`t./.N ~Xt./.N ~Xt./.N ~X.N t-B l.N R`t./<Cg~$f Cft#CpLXN^Nu//9C` /A Jf/Ho//?<; ONO f>NOO#Cp _Nu//9C`///////?<; ONO f>NOO#Cp _NuNO`eZNupBCNu///?< ONO\ _e8pNu /NO@e*pNu /NO#epNuNO8`eNupBC//Nu#CpNu///?< ONO\ _eB#DNu///?<$ ONO\ _eB#DNu/ /йD/?< ONO\ _eX/9D#D NuNV/ O NOd #Cp`p _N^NuA|Db #DNOdNBNu#/<CNP.CNPt.N N^NuNV.N0./<CNXA./.NX.CN.g.CN.g.CN.g.DN.g.DN.g.DN.g.DN.g.DN.g.D$N.D+NN^NuNV.$t#/N tXN^NuNVH#GDt.t/NX./<GHt/N P-@ fl %Cg.D-NP`.$t#/N tX`8JCpNu/ /////?< ONOO _eNu#CpNu/ /////?< ONOO _eNu#CpNu /NOehBNu/// // ?< ONOO _eFNu/////////?<= ONOO _e Nu/// // ?< ONOO _eNu#CpNuNVNO NO !NO,` /NO+eNuK@J g HUNXKCf /NOeVNu/// / ?< ONO\ _e:BNuNO,e0BNuNVH@NOe"/gÈY LN^Nu#Cp`#CpNu/// // ?< ONOO _eBNu /NOeHNu/ o /NO _eNu/ /// ?< ONO\ _eBNu/// / ?<o,./<GH/.N Pg.D8NP`p<tgdNzt.//.NP-@ f.DENP`,.g$.DQ/<@8NX.N `.gp./<GH/.N P-@Jl"NP./<D]/<@8NP`Jo$./<GHt/N P.@N./<GHt/N P-@ f* %Cg Cg.DpNPJo,./<GH/.N Pg.D{NP`N^NuNVp".NO?dp`pN^NuNOKNuNO>d #CpNu"o""pNuLH`?<A ONOO d#CpNu/ ONO\ _eBNu/ /////?< ONOO _etNuHNOe"o H0H""LBNuL`L/// // ?< ONOO _e0BNuNV .NO7d #Cp`pN^Nu /NO0eBNu#CpNuH@ /"/A CD/1#Jg g 0///?< ONOO dL`Jg gJj.LNu  ,<L\l| ,<L\l| ,<L\l| ,<JXL/?<E ONO\d#CpNuNOENu/// / ?<- ONO\ _e*BNu/// / ?<. ONO\ _e BNuNO3eNu#CpNuNVH<.DN7(@ gt/./.N$XJg. /.NPX`d~t.N$,`8*L`RH |$I0 ft:.HUN$X(@ f.N$Ѝ&@~`$ R&BSnH |$I0 fl2. /.NPX CfA./.N X*`t$ ԆV.N2-@Jg$n`ݷlt/.HRN$X. /.NPX CfA./.N X*.N4 Cg$ Cg CfJf .ft/9D/<`/9D/<`/9D/<`/9D/<`/9D/<`/9D/<`/9D/<`|/9D/<`l/9D/<`\/9D/< `L/9D/< `` /9EDXN^NuNVH *n|-g-fJg l-g-g,.N7LJft.t//-N P f| gBJm -`pD../-/-N Pfp`p,*+|`|` t#C| L N^NuNVH *n~$- gZ-g-g-g-g.a..N Jg~-g .N4t*+B t+B` t#C~ L N^NuNVH8..A./N XJf.O g.O f4.H,.EN8T*@ g`4H¼f +tg +pf +tf +y/<?H o@//.t0/N%(nHH(f n(gp` L8N^NuNVA ./.a./N#X0t ./N#X*./N#X0t ./N#X*./N#X0.FtHn`N(X&@ g.t/t/HnN*`O fJng܆4.H´ot./HSN-8PJf.t/t/HnN*`O frt.4.H/HSN-8PJfX.t/t/HnN*`O f8 nn0.4.H/t/HnzN*`O JoIz4.AzB0 .N g.@8HTN(tX`Z.@8/<FvN(tXA./<Ft //N5O (@$.g.@8t-/N%Nu*jDDJjDDop`ⶁf(BDHD$4HB4HB`(&( dt4"HAHA؁lSJjD ` `H|"/g /`H|"/X. fLt ./.N 0X. fp`l g&.N t./.N tX. fp`@`t.t//N P`p`&N1|(@ f .N `./HTN1P L0N^NuNVH8*n.. ,.(nzJnp``$, ft#Cp`F,gt#Cp`*,g,ft)B g$SJo$,t)B$S(`dn &x`Jo ,`p&D؀t)B&T$g `$SJf($g".N+& f  `SJnz`l(`bn &x`Jo ,`p&D؀t)B&T$g `$SJf($g .N+& f g~ /g6Höfi H@HL>NuJjDD*jDo$`Bf(BDHD$4BBHB`*&( dt4"HAHAԁ$lԄJjD ` `0 HHHHHHHHHH BBBBBB DDDDDD NV nJf SN^NuNVLf n N^NuNV n . gfS` N^NuNVLJfSfS n N^NuNVH . *n $- ft#Cp`-g0-g $- fp`pft#Cp`x-fJg+|*S `SJnR$SJn L8N^NuNVH0*n$- g $- 0gt#Cp` -f:Jf4.N6Jg.N2+@f`-g.(|@`,g,g.NCm-g@t.Hn/-N P. f. `^Jfp`p p`L`J*.//-N P+@SmR U( ` fp`p pL0N^NuNVH *n.. ,.-g-g(-g-f-g$-  f-g6 f gS.//-N P gmR UG(HH `.HH/N& X, f-g.N f| L N^NuNVH *n -ft#Cp`(-g~~-g4-f,.N7LJft.t//-N P f~ g,t.Hn /-N P f . `p.t+B`Jf.N2+@f~-g4-f,.N7LJft.t//-N P f~ g,t.Hn /-N P f . `p.t+B`>+|*R Un .N6Jgp@`p . .`~-g-g,.z`z`.N7LJgt #Cz`t f@ gS-f$Jl $-l Jmn xߕz`xt`xt$g$t+B.//-N P fz`z`-g-g-g\-gT.N7LJf:.N g&.//-N P g t+Bz`z`z` t #Cz` t#Cz t+B f L N^NuNVH *n-g-g$-g-f-gD$-  f8t.t//-N P. g gS-f`Z-g-g-g8-g0t.t//-N P. g-f$ނ` t#C~ L N^NuNVt.//.aFPN^NuNVN^NuNVN^NuNVN^NuNVN^NuNVH8*n(Ut+B+B B-B-B-B-B-g< -fttB`, +fttB`  fttB` #fttB```H |$I0pHHg&t .Hn$ S/N5P+@(nB-` *gp`p@g .fZH |$I0pHHg"t .HnHTN5P+@ (nB-`R *gp`p@g`t+B `B- lgp`p@gGJf$ S B` L+H-HH L8N^NuNVH ~*|@`$- gR m fp` L .HSHUN7PJf 3=pf 4HԋR `&\ fpL8N^NuNV/ L Sm $Hf JWp` !HH$_N^NuNVH *n g.N .N4L N^NuNVH A./.N X g(.HHO f.TN2*@ fp`@+nt./.N tX* fp`t+BA +H+m+m L N^NuNVH<*nE.a-@fp` nJPg n4G n(HHft.HhHSN:PB+`T nIHHg`*4HChild Death, exit. pty createfork/bin/shell/bin/shellchild execlpmy tty name '%s', mode: RAW ECHO XTABS LCASE CRMOD SCOPE CBREAK CNTRL stdin readmaster writepty INQUIRYEOF on pty pty read err (%s) stdin readmaster writePATHZ  0123456789abcdef0123456789ABCDEF0123456789/dev/dev//gen/errors/systemr/gen/errors/systemr/gen/errors/errorfileXXXX: No message for errno = 0123456789/gen/errors/localr/gen/errors/errorfileXXXXrNo message for errno = 0123456789/gen/errors/errorfileXXXXNewinddir H _sbrk:v _seekdir t _signal v _stack  _stat _statTTY% _strcat$ _strchr$ _strcpy _strerror$ _strlen7 _strncmp: _strncpy5 _strtol _stty> _suckemUP: _telldir8 _terminate < _truncf0 _ttyname( _ttyslot Z _urec _vfork  _wait _writez _yieldCPU# ldiv# lmod" lmul# lrdivo message for error number = 0123456789-/gen/errors/localr/gen/errors/errorfileXXXXrNo message for error number = 0123456789-NO $$syscall; ETEXT Start1| __allocfp$I __chcodes __exit+ __fillbuf __fixstk __fixstk_A0& __flushbuf0 __fmtout __fprtf/ __fprtfp0 __fscnfp\ __ierrmsg5 __itostr58 __ltostr1 __setupfp0 __sprtfp0 __sscnfp5# lrmod3 uldiv4 ulmod3D ulmul3 ulrdiv4 ulrmodD CR_VALGD EDATAG@ ___mszG< __allocp@ __iobC __ioblstGD _edataC _environC _errnoE _sys_nerrD end_adrC euidC pidD stack_low_point@8 stderr@ stdin@ stdoutC uidZ ENDY __baseGH _bufZ _endGD _pty_masterXH _sys_errlist __strtoi6 __termorpipe _abort L _access _alarm _brk $ _cdata _close8( _closedir _control_pty 0 _creat N _create_contiguous _create_pty n _dup ~ _dup2; _etext _execl _execle _execlpP _execvZ _execve< _execvp _exit$ _fakeIt _fclose _fcntl _fflush( _fopen _fork _fprintf| } 5syspty. ڌt:<^Ȣ ȶȾ-z-z ˒SxbCzy"%< _fputc(t _fputs*` _fread4 _free-8 _fseek _fstat/ _ftell7 _getenv _gtty _idfd$ _index7L _isatty _kill _lock _lrec _lseek^ _main` _makeControlTerminal _make_realtime2 _malloc _nice t _open8T _opendir _pauseP _perror _pipe _printf _read8 _readdir/ _rewind:< _r sttl Pseudo-Terminal Control Structure pag * mode flags PTY_PACKET_MODE equ 0 PTY_REMOTE_MODE equ 1 PTY_READ_WAIT equ 2 Block on non-satisfied reads PTY_WRITE_WAIT equ 3 Don't block on writes PTY_HANDSHAKE_MODE equ 4 Remote writes not satisfied until consumed PTY_SLAVE_HOLD equ 7 * responses PTY_EOF equ 8 No more slave connections PTY_OUTPUT_QUEUED equ 9 Slave has some output queued PTY_INPUT_QUEUED equ 10 Slave has some input queued * control commands PTY_INQUIRY e qu 0 PTY_SET_MODE equ 1 PTY_FLUSH_READ equ 3 PTY_FLUSH_WRITE equ 4 PTY_STOP_OUTPUT equ 5 PTY_START_OUTPUT equ 6 3456789-NO $$syscall; ETEXT Start1| __allocfp$I __chcodes __exit+ __fillbuf __fixstk __fixstk_A0& __flushbuf0 __fmtout __fprtf/ __fprtfp0 __fscnfp\ __ierrmsg5 __itostr58 __ltostr1 __setupfp0 __sprtfp0 __sscnfp5#F-Fjd\}g}}} ~ } } 5syspty.sptysyspty!!~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"! ""##$$%%&&''