1 diff -c ../Makefile ./Makefile
2 *** ../Makefile Thu Jun 28 00:44:07 1990
3 --- ./Makefile Mon Jul 16 13:57:26 1990
6 # AUXDIR, manual pages will be installed in MANDIR with extension MANEXT.
7 # Raw, unformatted troff source will be installed if INSTALLMAN=man, nroff
8 # preformatted versions will be installed if INSTALLMAN=cat.
11 LIBDIR = /usr/local/lib
12 AUXDIR = /usr/local/lib
13 MANDIR = /usr/man/manl
18 # AUXDIR, manual pages will be installed in MANDIR with extension MANEXT.
19 # Raw, unformatted troff source will be installed if INSTALLMAN=man, nroff
20 # preformatted versions will be installed if INSTALLMAN=cat.
21 ! DESTDIR = /projects/m751stereo/code/c/swl26
23 LIBDIR = /usr/local/lib
24 AUXDIR = /usr/local/lib
25 MANDIR = /usr/man/manl
33 SKELETON_FILE = $(DESTDIR)$(AUXDIR)/flex.skel
34 SKELFLAGS = -DDEFAULT_SKELETON_FILE=\"$(SKELETON_FILE)\"
41 SKELETON_FILE = $(DESTDIR)$(AUXDIR)/flex.skel
42 SKELFLAGS = -DDEFAULT_SKELETON_FILE=\"$(SKELETON_FILE)\"
43 ! CFLAGS = -O -DUSG -I$(INCLUDEDIR)
47 diff -c ../ccl.c ./ccl.c
48 *** ../ccl.c Thu Jun 28 00:44:07 1990
49 --- ./ccl.c Mon Jul 16 13:57:27 1990
55 ! "@(#) $Header$ (LBL)";
58 ! #include "flexdef.h"
60 /* ccladd - add a single character to a ccl
66 ! "@(#) $Header$ (LBL)";
69 ! #include <flexdef.h>
71 /* ccladd - add a single character to a ccl
73 diff -c ../dfa.c ./dfa.c
74 *** ../dfa.c Thu Jun 28 00:44:08 1990
75 --- ./dfa.c Mon Jul 16 13:57:28 1990
81 ! "@(#) $Header$ (LBL)";
84 ! #include "flexdef.h"
87 /* declare functions that have forward references */
92 ! "@(#) $Header$ (LBL)";
95 ! #include <flexdef.h>
99 /* declare functions that have forward references */
104 for ( i = 'A', j = 'a'; i <= 'Z'; ++i, ++j )
105 ! state[i] = state[j];
108 if ( ds > num_start_states )
112 for ( i = 'A', j = 'a'; i <= 'Z'; ++i, ++j )
115 ! state[i] = state[j];
119 if ( ds > num_start_states )
125 ! else if ( sym >= 'A' && sym <= 'Z' && caseins )
126 flexfatal( "consistency check failed in symfollowset" );
128 else if ( sym == SYM_EPSILON )
133 ! else if ( isupper ( sym ) && caseins )
134 flexfatal( "consistency check failed in symfollowset" );
136 else if ( sym == SYM_EPSILON )
139 diff -c ../ecs.c ./ecs.c
140 *** ../ecs.c Thu Jun 28 00:44:08 1990
141 --- ./ecs.c Mon Jul 16 13:57:28 1990
146 static char rcsid[] =
147 ! "@(#) $Header$ (LBL)";
150 ! #include "flexdef.h"
152 /* ccl2ecl - convert character classes to set of equivalence classes
157 static char rcsid[] =
158 ! "@(#) $Header$ (LBL)";
161 ! #include <flexdef.h>
163 /* ccl2ecl - convert character classes to set of equivalence classes
165 diff -c ../flex.skel ./flex.skel
166 *** ../flex.skel Thu Jun 28 00:44:27 1990
167 --- ./flex.skel Mon Jul 16 13:57:29 1990
170 /* A lexical scanner generated by flex */
172 /* scanner skeleton version:
178 /* A lexical scanner generated by flex */
180 /* scanner skeleton version:
185 diff -c ../flexdef.h ./flexdef.h
186 *** ../flexdef.h Thu Jun 28 00:44:27 1990
187 --- ./flexdef.h Mon Jul 16 13:57:30 1990
190 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
193 ! /* @(#) $Header$ (LBL) */
198 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
201 ! /* @(#) $Header$ (LBL) */
208 /* size of input alphabet - should be size of ASCII set */
209 #ifndef DEFAULT_CSIZE
210 ! #define DEFAULT_CSIZE 128
216 /* size of input alphabet - should be size of ASCII set */
217 #ifndef DEFAULT_CSIZE
218 ! #define DEFAULT_CSIZE 256
225 #define SHORT_FILE_NAMES
229 char *malloc(), *realloc();
233 /* maximum line length we'll have to deal with */
240 #ifndef DEFAULT_SKELETON_FILE
241 #define DEFAULT_SKELETON_FILE "flex.skel"
244 /* special chk[] values marking the slots taking by end-of-buffer and action
250 #ifndef DEFAULT_SKELETON_FILE
252 + #define DEFAULT_SKELETON_FILE "ctri01"
253 + #define SYSUT1 "sysut1"
254 + #define SYSUT2 "sysut2"
256 #define DEFAULT_SKELETON_FILE "flex.skel"
258 ! #endif /* DEFAULT_SKELETON_FILE */
260 /* special chk[] values marking the slots taking by end-of-buffer and action
264 #define INITIAL_MAX_SCS 40 /* maximum number of start conditions */
265 #define MAX_SCS_INCREMENT 40 /* amount to bump by if it's not enough */
267 ! #define ONE_STACK_SIZE 500 /* stack of states with only one out-transition */
268 ! #define SAME_TRANS -1 /* transition is the same as "default" entry for state */
270 /* the following percentages are used to tune table compression:
273 #define INITIAL_MAX_SCS 40 /* maximum number of start conditions */
274 #define MAX_SCS_INCREMENT 40 /* amount to bump by if it's not enough */
276 ! #define ONE_STACK_SIZE 500 /*stack of states with only one out-transition*/
277 ! #define SAME_TRANS -1 /*transition is the same as "default" entry for state */
279 /* the following percentages are used to tune table compression:
281 diff -c ../gen.c ./gen.c
282 *** ../gen.c Thu Jun 28 00:44:28 1990
283 --- ./gen.c Mon Jul 16 13:57:32 1990
288 static char rcsid[] =
289 ! "@(#) $Header$ (LBL)";
292 ! #include "flexdef.h"
295 /* declare functions that have forward references */
299 static char rcsid[] =
300 ! "@(#) $Header$ (LBL)";
303 ! #include <flexdef.h>
306 /* declare functions that have forward references */
312 ! indent_puts( "if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )" );
315 indent_puts( "yy_act = yy_acclist[yy_lp];" );
320 ! indent_puts("if( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )");
323 indent_puts( "yy_act = yy_acclist[yy_lp];" );
324 diff -c ../initscan.c ./initscan.c
325 *** ../initscan.c Thu Jun 28 00:44:51 1990
326 --- ./initscan.c Mon Jul 16 13:57:33 1990
329 /* A lexical scanner generated by flex */
331 /* scanner skeleton version:
337 /* A lexical scanner generated by flex */
339 /* scanner skeleton version:
348 static char rcsid[] =
349 ! "@(#) $Header$ (LBL)";
356 static char rcsid[] =
357 ! "@(#) $Header$ (LBL)";
361 diff -c ../libmain.c ./libmain.c
362 *** ../libmain.c Thu Jun 28 00:44:28 1990
363 --- ./libmain.c Mon Jul 16 13:57:34 1990
366 /* libmain - flex run-time support library "main" function */
373 /* libmain - flex run-time support library "main" function */
379 diff -c ../main.c ./main.c
380 *** ../main.c Thu Jun 28 00:44:29 1990
381 --- ./main.c Mon Jul 16 13:57:34 1990
386 static char rcsid[] =
387 ! "@(#) $Header$ (LBL)";
391 ! #include "flexdef.h"
393 static char flex_version[] = "2.3";
398 static char rcsid[] =
399 ! "@(#) $Header$ (LBL)";
403 ! #include <flexdef.h>
405 static char flex_version[] = "2.3";
411 #ifndef SHORT_FILE_NAMES
412 static char *outfile = "lex.yy.c";
414 static char *outfile = "lexyy.c";
416 static int outfile_created = 0;
417 static int use_stdout;
418 static char *skelname = NULL;
422 #ifndef SHORT_FILE_NAMES
424 + static char *outfile = "ctro01";
425 + #else /* not OSVS */
426 static char *outfile = "lex.yy.c";
427 ! #endif /* not OSVS */
428 ! #else /* SHORT_FILE_NAMES */
429 static char *outfile = "lexyy.c";
430 ! #endif /* SHORT_FILE_NAMES */
431 static int outfile_created = 0;
432 static int use_stdout;
433 static char *skelname = NULL;
437 else if ( fclose( temp_action_file ) )
438 flexfatal( "error occurred when closing temporary action file" );
441 else if ( unlink( action_file_name ) )
442 flexfatal( "error occurred when deleting temporary action file" );
446 if ( status != 0 && outfile_created )
450 else if ( fclose( stdout ) )
451 flexfatal( "error occurred when closing output file" );
454 else if ( unlink( outfile ) )
455 flexfatal( "error occurred when deleting output file" );
459 if ( backtrack_report && backtrack_file )
462 if ( backtrack_report )
464 #ifndef SHORT_FILE_NAMES
465 backtrack_file = fopen( "lex.backtrack", "w" );
467 backtrack_file = fopen( "lex.bck", "w" );
470 if ( backtrack_file == NULL )
471 flexerror( "could not create lex.backtrack" );
473 if ( backtrack_report )
475 #ifndef SHORT_FILE_NAMES
477 + backtrack_file = fopen( SYSUT2, "w");
478 + #else /* not OSVS */
479 backtrack_file = fopen( "lex.backtrack", "w" );
481 ! #else /* SHORT_FILE_NAMES */
482 backtrack_file = fopen( "lex.bck", "w" );
483 ! #endif /* SHORT_FILE_NAMES */
485 if ( backtrack_file == NULL )
486 flexerror( "could not create lex.backtrack" );
489 lerrsf( "can't open skeleton file %s", skelname );
492 action_file_name = tmpnam( NULL );
495 if ( action_file_name == NULL )
498 lerrsf( "can't open skeleton file %s", skelname );
502 action_file_name = tmpnam( NULL );
504 ! action_file_name = SYSUT1;
508 if ( action_file_name == NULL )
514 (void) strcpy( temp_action_file_name, "flexXXXXXX.tmp" );
517 (void) mktemp( temp_action_file_name );
519 + /* should never be executed in OSVS as IF should always be false */
520 + (void) strcpy( temp_action_file_name, SYSUT1 ) ;
523 action_file_name = temp_action_file_name;
525 diff -c ../misc.c ./misc.c
526 *** ../misc.c Thu Jun 28 00:44:40 1990
527 --- ./misc.c Mon Jul 16 13:57:35 1990
532 static char rcsid[] =
533 ! "@(#) $Header$ (LBL)";
537 ! #include "flexdef.h"
540 /* ANSI C does not guarantee that isascii() is defined */
544 static char rcsid[] =
545 ! "@(#) $Header$ (LBL)";
549 ! #include <flexdef.h>
552 /* ANSI C does not guarantee that isascii() is defined */
560 + if ( ! islower( *str ) )
562 if ( ! isascii( *str ) || ! islower( *str ) )
574 + if ( ! isupper( (char) *str ) )
576 if ( ! isascii( *str ) || ! isupper( (char) *str ) )
588 + return ( isupper( c ) ? (Char) tolower( c ) : (Char) c );
590 return ( (isascii( c ) && isupper( c )) ? tolower( c ) : c );
597 for ( c = str; *c; ++c )
600 ! copy = malloc( (unsigned) ((c - str + 1) * sizeof( char )) );
603 flexfatal( "dynamic memory failure in copy_string()" );
605 for ( c = str; *c; ++c )
608 ! copy = (char *) malloc( (unsigned) ((c - str + 1) * sizeof( char )) );
611 flexfatal( "dynamic memory failure in copy_string()" );
619 #include <sys/types.h>
636 if ( array[1] == 'x' )
640 + while ( isdigit( array[sptr] ) )
642 while ( isascii( array[sptr] ) && isdigit( array[sptr] ) )
644 /* don't increment inside loop control because if
645 * isdigit() is a macro it will expand it to two
648 diff -c ../nfa.c ./nfa.c
649 *** ../nfa.c Thu Jun 28 00:44:40 1990
650 --- ./nfa.c Mon Jul 16 13:57:36 1990
655 static char rcsid[] =
656 ! "@(#) $Header$ (LBL)";
659 ! #include "flexdef.h"
662 /* declare functions that have forward references */
666 static char rcsid[] =
667 ! "@(#) $Header$ (LBL)";
670 ! #include <flexdef.h>
673 /* declare functions that have forward references */
677 int sym, tsp1, tsp2, anum, ns;
679 ! fprintf( stderr, "\n\n********** beginning dump of nfa with start state %d\n",
682 /* we probably should loop starting at firstst[state1] and going to
685 int sym, tsp1, tsp2, anum, ns;
687 ! fprintf(stderr,"\n\n********* beginning dump of nfa with start state %d\n",
690 /* we probably should loop starting at firstst[state1] and going to
691 diff -c ../parse.y ./parse.y
692 *** ../parse.y Thu Jun 28 00:44:40 1990
693 --- ./parse.y Mon Jul 16 13:57:36 1990
698 static char rcsid[] =
699 ! "@(#) $Header$ (LBL)";
702 ! #include "flexdef.h"
704 int pat, scnum, eps, headcnt, trailcnt, anyccl, lastchar, i, actvp, rulelen;
705 int trlcontxt, xcluflg, cclsorted, varlength, variable_trail_rule;
708 static int madeany = false; /* whether we've made the '.' character class */
709 int previous_continued_action; /* whether the previous rule's action was '|' */
713 static char rcsid[] =
714 ! "@(#) $Header$ (LBL)";
717 ! #include <flexdef.h>
719 int pat, scnum, eps, headcnt, trailcnt, anyccl, lastchar, i, actvp, rulelen;
720 int trlcontxt, xcluflg, cclsorted, varlength, variable_trail_rule;
722 + void build_eof_action();
725 static int madeany = false; /* whether we've made the '.' character class */
726 int previous_continued_action; /* whether the previous rule's action was '|' */
727 diff -c ../scan.l ./scan.l
728 *** ../scan.l Thu Jun 28 00:44:41 1990
729 --- ./scan.l Mon Jul 16 13:57:37 1990
734 static char rcsid[] =
735 ! "@(#) $Header$ (LBL)";
740 ! #include "flexdef.h"
743 #define ACTION_ECHO fprintf( temp_action_file, "%s", yytext )
744 #define MARK_END_OF_PROLOG fprintf( temp_action_file, "%%%% end of prolog\n" );
748 static char rcsid[] =
749 ! "@(#) $Header$ (LBL)";
754 ! #include <flexdef.h>
757 #define ACTION_ECHO fprintf( temp_action_file, "%s", yytext )
758 #define MARK_END_OF_PROLOG fprintf( temp_action_file, "%%%% end of prolog\n" );
759 diff -c ../sym.c ./sym.c
760 *** ../sym.c Thu Jun 28 00:44:41 1990
761 --- ./sym.c Mon Jul 16 13:57:37 1990
766 static char rcsid[] =
767 ! "@(#) $Header$ (LBL)";
770 ! #include "flexdef.h"
773 /* declare functions that have forward references */
777 static char rcsid[] =
778 ! "@(#) $Header$ (LBL)";
781 ! #include <flexdef.h>
784 /* declare functions that have forward references */
785 diff -c ../tblcmp.c ./tblcmp.c
786 *** ../tblcmp.c Thu Jun 28 00:44:41 1990
787 --- ./tblcmp.c Mon Jul 16 13:57:38 1990
792 static char rcsid[] =
793 ! "@(#) $Header$ (LBL)";
796 ! #include "flexdef.h"
799 /* declarations for functions that have forward references */
803 static char rcsid[] =
804 ! "@(#) $Header$ (LBL)";
807 ! #include <flexdef.h>
810 /* declarations for functions that have forward references */
811 diff -c ../yylex.c ./yylex.c
812 *** ../yylex.c Thu Jun 28 00:44:41 1990
813 --- ./yylex.c Mon Jul 16 13:57:38 1990
818 static char rcsid[] =
819 ! "@(#) $Header$ (LBL)";
823 ! #include "flexdef.h"
827 /* ANSI C does not guarantee that isascii() is defined */
831 static char rcsid[] =
832 ! "@(#) $Header$ (LBL)";
836 ! #include <flexdef.h>
840 /* ANSI C does not guarantee that isascii() is defined */
848 + if ( ! isprint( yylval ) )
850 if ( ! isascii( yylval ) || ! isprint( yylval ) )
852 fprintf( stderr, "\\%.3o", yylval );
854 (void) putc( yylval, stderr );