This is Unofficial EPICS BASE Doxygen Site
flex.c File Reference
#include "epicsTempFile.c"
+ Include dependency graph for flex.c:

Go to the source code of this file.

Macros

#define ENQUOTE(path)   #path
 

Functions

void flexinit (int, char **)
 
void readin (void)
 
void set_up_initial_allocations (void)
 
int main (int argc, char *argv[])
 
void flexend (int status)
 

Variables

char copyright []
 
int printstats
 
int syntaxerror
 
int eofseen
 
int ddebug
 
int trace
 
int spprdflt
 
int interactive
 
int caseins
 
int useecs
 
int fulltbl
 
int usemecs
 
int fullspd
 
int gen_line_dirs
 
int performance_report
 
int backtrack_report
 
int csize
 
int yymore_used
 
int reject
 
int real_reject
 
int continued_action
 
int yymore_really_used
 
int reject_really_used
 
int datapos
 
int dataline
 
int linenum
 
FILE * skelfile = NULL
 
char * infilename = NULL
 
int onestate [ONE_STACK_SIZE]
 
int onesym [ONE_STACK_SIZE]
 
int onenext [ONE_STACK_SIZE]
 
int onedef [ONE_STACK_SIZE]
 
int onesp
 
int current_mns
 
int num_rules
 
int current_max_rules
 
int lastnfa
 
int * firstst
 
int * lastst
 
int * finalst
 
int * transchar
 
int * trans1
 
int * trans2
 
int * accptnum
 
int * assoc_rule
 
int * state_type
 
int * rule_type
 
int * rule_linenum
 
int current_state_type
 
int variable_trailing_context_rules
 
int numtemps
 
int numprots
 
int protprev [MSP]
 
int protnext [MSP]
 
int prottbl [MSP]
 
int protcomst [MSP]
 
int firstprot
 
int lastprot
 
int protsave [PROT_SAVE_SIZE]
 
int numecs
 
int nextecm [CSIZE+1]
 
int ecgroup [CSIZE+1]
 
int nummecs
 
int tecfwd [CSIZE+1]
 
int tecbck [CSIZE+1]
 
int * xlation = (int *) 0
 
int num_xlations
 
int lastsc
 
int current_max_scs
 
int * scset
 
int * scbol
 
int * scxclu
 
int * sceof
 
int * actvsc
 
char ** scname
 
int current_max_dfa_size
 
int current_max_xpairs
 
int current_max_template_xpairs
 
int current_max_dfas
 
int lastdfa
 
int * nxt
 
int * chk
 
int * tnxt
 
int * base
 
int * def
 
int * nultrans
 
int NUL_ec
 
int tblend
 
int firstfree
 
int ** dss
 
int * dfasiz
 
union dfaacc_uniondfaacc
 
int * accsiz
 
int * dhash
 
int numas
 
int numsnpairs
 
int jambase
 
int jamstate
 
int lastccl
 
int current_maxccls
 
int * cclmap
 
int * ccllen
 
int * cclng
 
int cclreuse
 
int current_max_ccl_tbl_size
 
Charccltbl
 
char * starttime
 
char * endtime
 
char nmstr [MAXLINE]
 
int sectnum
 
int nummt
 
int hshcol
 
int dfaeql
 
int numeps
 
int eps2
 
int num_reallocs
 
int tmpuses
 
int totnst
 
int peakpairs
 
int numuniq
 
int numdup
 
int hshsave
 
int num_backtracking
 
int bol_needed
 
FILE * temp_action_file
 
FILE * backtrack_file
 
int end_of_buffer_state
 
char ** input_files
 
int num_input_files
 
char * program_name
 

Macro Definition Documentation

#define ENQUOTE (   path)    #path

Definition at line 37 of file flex.c.

Function Documentation

void flexend ( int  status)

Definition at line 196 of file flex.c.

197 {
198  int tblsiz;
199  char *flex_gettime();
200 
201  if ( skelfile != NULL )
202  {
203  if ( ferror( skelfile ) )
204  flexfatal( "error occurred when writing skeleton file" );
205 
206  else if ( fclose( skelfile ) )
207  flexfatal( "error occurred when closing skeleton file" );
208  }
209 
210  if ( temp_action_file )
211  {
212  if ( ferror( temp_action_file ) )
213  flexfatal( "error occurred when writing temporary action file" );
214 
215  else if ( fclose( temp_action_file ) )
216  flexfatal( "error occurred when closing temporary action file" );
217  }
218 
219  if ( status != 0 && outfile_created )
220  {
221  if ( ferror( stdout ) )
222  flexfatal( "error occurred when writing output file" );
223 
224  else if ( fclose( stdout ) )
225  flexfatal( "error occurred when closing output file" );
226 
227  else if ( unlink( outfile ) )
228  flexfatal( "error occurred when deleting output file" );
229  }
230 
232  {
233  if ( num_backtracking == 0 )
234  fprintf( backtrack_file, "No backtracking.\n" );
235  else if ( fullspd || fulltbl )
236  fprintf( backtrack_file,
237  "%d backtracking (non-accepting) states.\n",
239  else
240  fprintf( backtrack_file, "Compressed tables always backtrack.\n" );
241 
242  if ( ferror( backtrack_file ) )
243  flexfatal( "error occurred when writing backtracking file" );
244 
245  else if ( fclose( backtrack_file ) )
246  flexfatal( "error occurred when closing backtracking file" );
247  }
248 
249  if ( printstats )
250  {
251  endtime = flex_gettime();
252 
253  fprintf( stderr, "%s version %s usage statistics:\n", program_name,
254  flex_version );
255  fprintf( stderr, " started at %s, finished at %s\n",
256  starttime, endtime );
257 
258  fprintf( stderr, " scanner options: -" );
259 
260  if ( backtrack_report )
261  putc( 'b', stderr );
262  if ( ddebug )
263  putc( 'd', stderr );
264  if ( interactive )
265  putc( 'I', stderr );
266  if ( caseins )
267  putc( 'i', stderr );
268  if ( ! gen_line_dirs )
269  putc( 'L', stderr );
270  if ( performance_report )
271  putc( 'p', stderr );
272  if ( spprdflt )
273  putc( 's', stderr );
274  if ( use_stdout )
275  putc( 't', stderr );
276  if ( trace )
277  putc( 'T', stderr );
278  if ( printstats )
279  putc( 'v', stderr ); /* always true! */
280  if ( csize == 256 )
281  putc( '8', stderr );
282 
283  fprintf( stderr, " -C" );
284 
285  if ( fulltbl )
286  putc( 'f', stderr );
287  if ( fullspd )
288  putc( 'F', stderr );
289  if ( useecs )
290  putc( 'e', stderr );
291  if ( usemecs )
292  putc( 'm', stderr );
293 
294  if ( strcmp( skelname, ENQUOTE(DEFAULT_SKELETON_FILE) ) )
295  fprintf( stderr, " -S%s", skelname );
296 
297  putc( '\n', stderr );
298 
299  fprintf( stderr, " %d/%d NFA states\n", lastnfa, current_mns );
300  fprintf( stderr, " %d/%d DFA states (%d words)\n", lastdfa,
302  fprintf( stderr,
303  " %d rules\n", num_rules - 1 /* - 1 for def. rule */ );
304 
305  if ( num_backtracking == 0 )
306  fprintf( stderr, " No backtracking\n" );
307  else if ( fullspd || fulltbl )
308  fprintf( stderr, " %d backtracking (non-accepting) states\n",
310  else
311  fprintf( stderr, " compressed tables always backtrack\n" );
312 
313  if ( bol_needed )
314  fprintf( stderr, " Beginning-of-line patterns used\n" );
315 
316  fprintf( stderr, " %d/%d start conditions\n", lastsc,
317  current_max_scs );
318  fprintf( stderr, " %d epsilon states, %d double epsilon states\n",
319  numeps, eps2 );
320 
321  if ( lastccl == 0 )
322  fprintf( stderr, " no character classes\n" );
323  else
324  fprintf( stderr,
325  " %d/%d character classes needed %d/%d words of storage, %d reused\n",
329 
330  fprintf( stderr, " %d state/nextstate pairs created\n", numsnpairs );
331  fprintf( stderr, " %d/%d unique/duplicate transitions\n",
332  numuniq, numdup );
333 
334  if ( fulltbl )
335  {
336  tblsiz = lastdfa * numecs;
337  fprintf( stderr, " %d table entries\n", tblsiz );
338  }
339 
340  else
341  {
342  tblsiz = 2 * (lastdfa + numtemps) + 2 * tblend;
343 
344  fprintf( stderr, " %d/%d base-def entries created\n",
346  fprintf( stderr, " %d/%d (peak %d) nxt-chk entries created\n",
348  fprintf( stderr,
349  " %d/%d (peak %d) template nxt-chk entries created\n",
351  numtemps * numecs );
352  fprintf( stderr, " %d empty table entries\n", nummt );
353  fprintf( stderr, " %d protos created\n", numprots );
354  fprintf( stderr, " %d templates created, %d uses\n",
355  numtemps, tmpuses );
356  }
357 
358  if ( useecs )
359  {
360  tblsiz = tblsiz + csize;
361  fprintf( stderr, " %d/%d equivalence classes created\n",
362  numecs, csize );
363  }
364 
365  if ( usemecs )
366  {
367  tblsiz = tblsiz + numecs;
368  fprintf( stderr, " %d/%d meta-equivalence classes created\n",
369  nummecs, csize );
370  }
371 
372  fprintf( stderr, " %d (%d saved) hash collisions, %d DFAs equal\n",
373  hshcol, hshsave, dfaeql );
374  fprintf( stderr, " %d sets of reallocations needed\n", num_reallocs );
375  fprintf( stderr, " %d total table entries needed\n", tblsiz );
376  }
377 
378  exit( status );
379 }
int tmpuses
Definition: flex.c:101
int nummecs
Definition: flex.c:83
char * endtime
Definition: flex.c:99
pvd::Status status
int printstats
Definition: flex.c:66
int fullspd
Definition: flex.c:68
int numuniq
Definition: flex.c:101
int interactive
Definition: flex.c:67
int hshcol
Definition: flex.c:100
int tblend
Definition: flex.c:92
int nummt
Definition: flex.c:100
int ddebug
Definition: flex.c:66
int num_reallocs
Definition: flex.c:100
int current_maxccls
Definition: flex.c:96
int peakpairs
Definition: flex.c:101
int numsnpairs
Definition: flex.c:95
#define NULL
Definition: catime.c:38
int numeps
Definition: flex.c:100
char * starttime
Definition: flex.c:99
int csize
Definition: flex.c:68
FILE * backtrack_file
Definition: flex.c:104
char * flex_gettime(void)
Definition: misc.c:381
int caseins
Definition: flex.c:67
int dfaeql
Definition: flex.c:100
int num_rules
Definition: flex.c:76
int useecs
Definition: flex.c:67
int cclreuse
Definition: flex.c:96
int lastdfa
Definition: flex.c:91
int current_mns
Definition: flex.c:76
int numdup
Definition: flex.c:101
#define DEFAULT_SKELETON_FILE
Definition: flexdef.h:89
int numtemps
Definition: flex.c:81
int current_max_template_xpairs
Definition: flex.c:90
int usemecs
Definition: flex.c:67
int current_max_scs
Definition: flex.c:87
int performance_report
Definition: flex.c:68
int spprdflt
Definition: flex.c:66
int eps2
Definition: flex.c:100
#define stdout
Definition: epicsStdio.h:30
int gen_line_dirs
Definition: flex.c:68
int bol_needed
Definition: flex.c:102
int numprots
Definition: flex.c:81
char * program_name
Definition: flex.c:108
int hshsave
Definition: flex.c:101
void flexfatal(char[])
int trace
Definition: flex.c:66
int lastsc
Definition: flex.c:87
int * ccllen
Definition: flex.c:96
int * cclmap
Definition: flex.c:96
int current_max_dfas
Definition: flex.c:90
int lastnfa
Definition: flex.c:76
int num_backtracking
Definition: flex.c:102
FILE * temp_action_file
Definition: flex.c:103
int totnst
Definition: flex.c:101
FILE * skelfile
Definition: flex.c:72
#define stderr
Definition: epicsStdio.h:32
int numecs
Definition: flex.c:83
int fulltbl
Definition: flex.c:67
#define ENQUOTE(path)
Definition: flex.c:37
int backtrack_report
Definition: flex.c:68
int lastccl
Definition: flex.c:96
int current_max_ccl_tbl_size
Definition: flex.c:97
int current_max_xpairs
Definition: flex.c:89
void flexinit ( int  argc,
char **  argv 
)

Definition at line 390 of file flex.c.

391 {
392  int i, sawcmpflag;
393  char *arg, *flex_gettime(), *mktemp();
394 
397  yymore_used = continued_action = reject = false;
399  gen_line_dirs = usemecs = useecs = true;
400 
401  sawcmpflag = false;
402  use_stdout = false;
403 
405 
406  program_name = argv[0];
407 
408  /* read flags */
409  for ( --argc, ++argv; argc ; --argc, ++argv )
410  {
411  if ( argv[0][0] != '-' || argv[0][1] == '\0' )
412  break;
413 
414  arg = argv[0];
415 
416  for ( i = 1; arg[i] != '\0'; ++i )
417  switch ( arg[i] )
418  {
419  case 'b':
420  backtrack_report = true;
421  break;
422 
423  case 'c':
424  fprintf( stderr,
425  "%s: Assuming use of deprecated -c flag is really intended to be -C\n",
426  program_name );
427 
428  /* fall through */
429 
430  case 'C':
431  if ( i != 1 )
432  flexerror( "-C flag must be given separately" );
433 
434  if ( ! sawcmpflag )
435  {
436  useecs = false;
437  usemecs = false;
438  fulltbl = false;
439  sawcmpflag = true;
440  }
441 
442  for ( ++i; arg[i] != '\0'; ++i )
443  switch ( arg[i] )
444  {
445  case 'e':
446  useecs = true;
447  break;
448 
449  case 'F':
450  fullspd = true;
451  break;
452 
453  case 'f':
454  fulltbl = true;
455  break;
456 
457  case 'm':
458  usemecs = true;
459  break;
460 
461  default:
462  lerrif( "unknown -C option '%c'",
463  (int) arg[i] );
464  break;
465  }
466 
467  goto get_next_arg;
468 
469  case 'd':
470  ddebug = true;
471  break;
472 
473  case 'f':
474  useecs = usemecs = false;
475  fulltbl = true;
476  break;
477 
478  case 'F':
479  useecs = usemecs = false;
480  fullspd = true;
481  break;
482 
483  case 'I':
484  interactive = true;
485  break;
486 
487  case 'i':
488  caseins = true;
489  break;
490 
491  case 'L':
492  gen_line_dirs = false;
493  break;
494 
495  case 'n':
496  /* stupid do-nothing deprecated option */
497  break;
498 
499  case 'o':
500  if ( i != 1 )
501  flexerror( "-o flag must be given separately" );
502 
503  outfile = arg + i + 1;
504  goto get_next_arg;
505 
506  case 'p':
507  performance_report = true;
508  break;
509 
510  case 'S':
511  if ( i != 1 )
512  flexerror( "-S flag must be given separately" );
513 
514  skelname = arg + i + 1;
515  goto get_next_arg;
516 
517  case 's':
518  spprdflt = true;
519  break;
520 
521  case 't':
522  use_stdout = true;
523  break;
524 
525  case 'T':
526  trace = true;
527  break;
528 
529  case 'v':
530  printstats = true;
531  break;
532 
533  case '8':
534  csize = CSIZE;
535  break;
536 
537  default:
538  lerrif( "unknown flag '%c'", (int) arg[i] );
539  break;
540  }
541 
542 get_next_arg: /* used by -C and -S flags in lieu of a "continue 2" control */
543  ;
544  }
545 
546  if ( (fulltbl || fullspd) && usemecs )
547  flexerror( "full table and -Cm don't make sense together" );
548 
549  if ( (fulltbl || fullspd) && interactive )
550  flexerror( "full table and -I are (currently) incompatible" );
551 
552  if ( fulltbl && fullspd )
553  flexerror( "full table and -F are mutually exclusive" );
554 
555  if ( ! skelname )
556  {
557  static char skeleton_name_storage[400];
558 
559  skelname = skeleton_name_storage;
560  (void) strcpy( skelname, ENQUOTE(DEFAULT_SKELETON_FILE) );
561  }
562 
563  if ( ! use_stdout )
564  {
565  FILE *prev_stdout = freopen( outfile, "w", stdout );
566 
567  if ( prev_stdout == NULL )
568  lerrsf( "could not create %s", outfile );
569 
570  outfile_created = 1;
571  }
572 
573  num_input_files = argc;
574  input_files = argv;
576 
577  if ( backtrack_report )
578  {
579 #ifndef SHORT_FILE_NAMES
580  backtrack_file = fopen( "lex.backtrack", "w" );
581 #else
582  backtrack_file = fopen( "lex.bck", "w" );
583 #endif
584 
585  if ( backtrack_file == NULL )
586  flexerror( "could not create lex.backtrack" );
587  }
588 
589  else
591 
592 
593  lastccl = 0;
594  lastsc = 0;
595 
596  /* initialize the statistics */
598 
599  if ( (skelfile = fopen( skelname, "r" )) == NULL )
600  lerrsf( "can't open skeleton file %s", skelname );
601 
602  if ( ( temp_action_file = epicsTempFile () ) == NULL )
603  {
604  lerrsf( "can't create temporary action file", "" );
605  }
606 
612 
613  linenum = sectnum = 1;
614  firstprot = NIL;
615 
616  /* used in mkprot() so that the first proto goes in slot 1
617  * of the proto queue
618  */
619  lastprot = 1;
620 
621  if ( useecs )
622  { /* set up doubly-linked equivalence classes */
623  /* We loop all the way up to csize, since ecgroup[csize] is the
624  * position used for NUL characters
625  */
626  ecgroup[1] = NIL;
627 
628  for ( i = 2; i <= csize; ++i )
629  {
630  ecgroup[i] = i - 1;
631  nextecm[i - 1] = i;
632  }
633 
634  nextecm[csize] = NIL;
635  }
636 
637  else
638  { /* put everything in its own equivalence class */
639  for ( i = 1; i <= csize; ++i )
640  {
641  ecgroup[i] = i;
642  nextecm[i] = BAD_SUBSCRIPT; /* to catch errors */
643  }
644  }
645 
647 }
int lastprot
Definition: flex.c:82
int tmpuses
Definition: flex.c:101
char ** input_files
Definition: flex.c:106
int continued_action
Definition: flex.c:69
void set_up_initial_allocations(void)
Definition: flex.c:700
int ecgroup[CSIZE+1]
Definition: flex.c:83
int i
Definition: scan.c:967
LIBCOM_API FILE *epicsStdCall epicsTempFile(void)
Create and open a temporary file.
Definition: epicsTempFile.c:15
int printstats
Definition: flex.c:66
int fullspd
Definition: flex.c:68
int variable_trailing_context_rules
Definition: flex.c:80
int numuniq
Definition: flex.c:101
int interactive
Definition: flex.c:67
int hshcol
Definition: flex.c:100
#define BAD_SUBSCRIPT
Definition: flexdef.h:268
int ddebug
Definition: flex.c:66
int num_reallocs
Definition: flex.c:100
int numsnpairs
Definition: flex.c:95
int nextecm[CSIZE+1]
Definition: flex.c:83
#define NIL
Definition: flexdef.h:153
#define NULL
Definition: catime.c:38
int linenum
Definition: flex.c:71
int numeps
Definition: flex.c:100
char * starttime
Definition: flex.c:99
int csize
Definition: flex.c:68
FILE * backtrack_file
Definition: flex.c:104
char * flex_gettime(void)
Definition: misc.c:381
int caseins
Definition: flex.c:67
int dfaeql
Definition: flex.c:100
int num_rules
Definition: flex.c:76
int useecs
Definition: flex.c:67
int syntaxerror
Definition: flex.c:66
void set_input_file(char *)
Definition: scan.c:2233
int lastdfa
Definition: flex.c:91
int onesp
Definition: flex.c:75
void lerrsf(char[], char[])
int numdup
Definition: flex.c:101
void lerrif(char[], int)
#define DEFAULT_SKELETON_FILE
Definition: flexdef.h:89
int usemecs
Definition: flex.c:67
void flexerror(char[]) NORETURN
#define DEFAULT_CSIZE
Definition: flexdef.h:67
int num_input_files
Definition: flex.c:107
int performance_report
Definition: flex.c:68
int spprdflt
Definition: flex.c:66
int firstprot
Definition: flex.c:82
int eps2
Definition: flex.c:100
int datapos
Definition: flex.c:71
#define stdout
Definition: epicsStdio.h:30
int gen_line_dirs
Definition: flex.c:68
int bol_needed
Definition: flex.c:102
int numprots
Definition: flex.c:81
char * program_name
Definition: flex.c:108
int reject
Definition: flex.c:69
int hshsave
Definition: flex.c:101
int trace
Definition: flex.c:66
int lastsc
Definition: flex.c:87
int lastnfa
Definition: flex.c:76
int num_backtracking
Definition: flex.c:102
FILE * temp_action_file
Definition: flex.c:103
int totnst
Definition: flex.c:101
FILE * skelfile
Definition: flex.c:72
int dataline
Definition: flex.c:71
#define stderr
Definition: epicsStdio.h:32
int yymore_used
Definition: flex.c:69
int reject_really_used
Definition: flex.c:70
int numecs
Definition: flex.c:83
int fulltbl
Definition: flex.c:67
#define CSIZE
Definition: flexdef.h:58
#define ENQUOTE(path)
Definition: flex.c:37
int yymore_really_used
Definition: flex.c:70
int backtrack_report
Definition: flex.c:68
int eofseen
Definition: flex.c:66
int lastccl
Definition: flex.c:96
int numas
Definition: flex.c:94
int sectnum
Definition: flex.c:100
int main ( int  argc,
char *  argv[] 
)

Definition at line 120 of file flex.c.

121 {
122  flexinit( argc, argv );
123 
124  readin();
125 
126  if ( syntaxerror )
127  flexend( 1 );
128 
130  yymore_used = true;
131  else if ( yymore_really_used == REALLY_NOT_USED )
132  yymore_used = false;
133 
135  reject = true;
136  else if ( reject_really_used == REALLY_NOT_USED )
137  reject = false;
138 
139  if ( performance_report )
140  {
141  if ( interactive )
142  fprintf( stderr,
143  "-I (interactive) entails a minor performance penalty\n" );
144 
145  if ( yymore_used )
146  fprintf( stderr, "yymore() entails a minor performance penalty\n" );
147 
148  if ( reject )
149  fprintf( stderr, "REJECT entails a large performance penalty\n" );
150 
152  fprintf( stderr,
153 "Variable trailing context rules entail a large performance penalty\n" );
154  }
155 
156  if ( reject )
157  real_reject = true;
158 
160  reject = true;
161 
162  if ( (fulltbl || fullspd) && reject )
163  {
164  if ( real_reject )
165  flexerror( "REJECT cannot be used with -f or -F" );
166  else
167  flexerror(
168  "variable trailing context rules cannot be used with -f or -F" );
169  }
170 
171  ntod();
172 
173  /* generate the C state transition tables from the DFA */
174  make_tables();
175 
176  /* note, flexend does not return. It exits with its argument as status. */
177 
178  flexend( 0 );
179 
180  /*NOTREACHED*/
181 }
int real_reject
Definition: flex.c:69
int fullspd
Definition: flex.c:68
int variable_trailing_context_rules
Definition: flex.c:80
int interactive
Definition: flex.c:67
void flexinit(int, char **)
Definition: flex.c:390
int syntaxerror
Definition: flex.c:66
#define REALLY_USED
Definition: flexdef.h:340
void flexerror(char[]) NORETURN
int performance_report
Definition: flex.c:68
void ntod(void)
Definition: dfa.c:398
int reject
Definition: flex.c:69
#define REALLY_NOT_USED
Definition: flexdef.h:341
void flexend(int status)
Definition: flex.c:196
#define stderr
Definition: epicsStdio.h:32
void make_tables(void)
Definition: gen.c:994
int yymore_used
Definition: flex.c:69
int reject_really_used
Definition: flex.c:70
int fulltbl
Definition: flex.c:67
int yymore_really_used
Definition: flex.c:70
void readin(void)
Definition: flex.c:656
void readin ( void  )

Definition at line 656 of file flex.c.

657 {
658  skelout();
659 
660  if ( ddebug )
661  puts( "#define FLEX_DEBUG" );
662 
663  if ( csize == 256 )
664  puts( "#define YY_CHAR unsigned char" );
665  else
666  puts( "#define YY_CHAR char" );
667 
669 
670  if ( yyparse() )
671  {
672  pinpoint_message( "fatal parse error" );
673  flexend( 1 );
674  }
675 
676  if ( xlation )
677  {
679  useecs = true;
680  }
681 
682  else if ( useecs )
684 
685  else
686  numecs = csize;
687 
688  /* now map the equivalence class for NUL to its expected place */
689  ecgroup[0] = ecgroup[csize];
690  NUL_ec = abs( ecgroup[0] );
691 
692  if ( useecs )
693  ccl2ecl();
694 }
int cre8ecs(int fwd[], int bck[], int num)
Definition: ecs.c:115
int ecgroup[CSIZE+1]
Definition: flex.c:83
int * xlation
Definition: flex.c:85
int ddebug
Definition: flex.c:66
int nextecm[CSIZE+1]
Definition: flex.c:83
int ecs_from_xlation(int ecmap[])
Definition: ecs.c:150
void skelout(void)
Definition: misc.c:734
int csize
Definition: flex.c:68
int useecs
Definition: flex.c:67
#define puts
Definition: epicsStdio.h:46
int NUL_ec
Definition: flex.c:92
#define stdout
Definition: epicsStdio.h:30
void line_directive_out(FILE *)
Definition: misc.c:479
void flexend(int status)
Definition: flex.c:196
void ccl2ecl(void)
Definition: ecs.c:45
void pinpoint_message(char[])
int numecs
Definition: flex.c:83
void set_up_initial_allocations ( void  )

Definition at line 700 of file flex.c.

701 {
712 
716 
724 
729 
732 
734 
738 
741 
750 
751  nultrans = (int *) 0;
752 }
int * actvsc
Definition: flex.c:87
#define INITIAL_MAX_TEMPLATE_XPAIRS
Definition: flexdef.h:189
int ** dss
Definition: flex.c:92
int * rule_type
Definition: flex.c:78
char ** scname
Definition: flex.c:88
int * firstst
Definition: flex.c:77
int * scxclu
Definition: flex.c:87
int current_maxccls
Definition: flex.c:96
int * cclng
Definition: flex.c:96
union dfaacc_union * dfaacc
Definition: flex.c:93
#define allocate_int_ptr_array(size)
Definition: flexdef.h:587
int current_max_rules
Definition: flex.c:76
int * rule_linenum
Definition: flex.c:78
#define INITIAL_MNS
Definition: flexdef.h:170
int * accsiz
Definition: flex.c:94
#define allocate_integer_array(size)
Definition: flexdef.h:581
int * dfasiz
Definition: flex.c:92
int * finalst
Definition: flex.c:77
int current_mns
Definition: flex.c:76
int * scset
Definition: flex.c:87
#define INITIAL_MAX_DFA_SIZE
Definition: flexdef.h:128
int current_max_template_xpairs
Definition: flex.c:90
int * scbol
Definition: flex.c:87
int * tnxt
Definition: flex.c:91
int * accptnum
Definition: flex.c:78
int current_max_dfa_size
Definition: flex.c:89
#define INITIAL_MAX_DFAS
Definition: flexdef.h:173
int current_max_scs
Definition: flex.c:87
#define allocate_dfaacc_union(size)
Definition: flexdef.h:593
int * state_type
Definition: flex.c:78
#define INITIAL_MAX_CCL_TBL_SIZE
Definition: flexdef.h:164
#define allocate_character_array(size)
Definition: flexdef.h:607
#define INITIAL_MAX_RULES
Definition: flexdef.h:167
int * assoc_rule
Definition: flex.c:78
#define allocate_char_ptr_array(size)
Definition: flexdef.h:590
int * trans2
Definition: flex.c:77
#define INITIAL_MAX_CCLS
Definition: flexdef.h:160
int * trans1
Definition: flex.c:77
int * ccllen
Definition: flex.c:96
int * cclmap
Definition: flex.c:96
int * nultrans
Definition: flex.c:92
int current_max_dfas
Definition: flex.c:90
int * sceof
Definition: flex.c:87
int * nxt
Definition: flex.c:91
int * base
Definition: flex.c:92
int * def
Definition: flex.c:92
Char * ccltbl
Definition: flex.c:98
int * lastst
Definition: flex.c:77
int * transchar
Definition: flex.c:77
#define INITIAL_MAX_SCS
Definition: flexdef.h:194
int * dhash
Definition: flex.c:94
int current_max_ccl_tbl_size
Definition: flex.c:97
#define INITIAL_MAX_XPAIRS
Definition: flexdef.h:185
int * chk
Definition: flex.c:91
int current_max_xpairs
Definition: flex.c:89

Variable Documentation

int* accptnum

Definition at line 78 of file flex.c.

int* accsiz

Definition at line 94 of file flex.c.

int * actvsc

Definition at line 87 of file flex.c.

int * assoc_rule

Definition at line 78 of file flex.c.

FILE* backtrack_file

Definition at line 104 of file flex.c.

int backtrack_report

Definition at line 68 of file flex.c.

int* base

Definition at line 92 of file flex.c.

int bol_needed

Definition at line 102 of file flex.c.

int caseins

Definition at line 67 of file flex.c.

int * ccllen

Definition at line 96 of file flex.c.

int * cclmap

Definition at line 96 of file flex.c.

int * cclng

Definition at line 96 of file flex.c.

int cclreuse

Definition at line 96 of file flex.c.

Char* ccltbl

Definition at line 98 of file flex.c.

int * chk

Definition at line 91 of file flex.c.

int continued_action

Definition at line 69 of file flex.c.

char copyright[]
Initial value:
=
"@(#) Copyright (c) 1990 The Regents of the University of California.\n\
All rights reserved.\n"

Definition at line 40 of file flex.c.

int csize

Definition at line 68 of file flex.c.

int current_max_ccl_tbl_size

Definition at line 97 of file flex.c.

int current_max_dfa_size

Definition at line 89 of file flex.c.

int current_max_dfas

Definition at line 90 of file flex.c.

int current_max_rules

Definition at line 76 of file flex.c.

int current_max_scs

Definition at line 87 of file flex.c.

int current_max_template_xpairs

Definition at line 90 of file flex.c.

int current_max_xpairs

Definition at line 89 of file flex.c.

int current_maxccls

Definition at line 96 of file flex.c.

int current_mns

Definition at line 76 of file flex.c.

int current_state_type

Definition at line 79 of file flex.c.

int dataline

Definition at line 71 of file flex.c.

int datapos

Definition at line 71 of file flex.c.

int ddebug

Definition at line 66 of file flex.c.

int * def

Definition at line 92 of file flex.c.

union dfaacc_union* dfaacc

Definition at line 93 of file flex.c.

int dfaeql

Definition at line 100 of file flex.c.

int * dfasiz

Definition at line 92 of file flex.c.

int * dhash

Definition at line 94 of file flex.c.

int ** dss

Definition at line 92 of file flex.c.

int ecgroup[CSIZE+1]

Definition at line 83 of file flex.c.

int end_of_buffer_state

Definition at line 105 of file flex.c.

char * endtime

Definition at line 99 of file flex.c.

int eofseen

Definition at line 66 of file flex.c.

int eps2

Definition at line 100 of file flex.c.

int * finalst

Definition at line 77 of file flex.c.

int firstfree

Definition at line 92 of file flex.c.

int firstprot

Definition at line 82 of file flex.c.

int* firstst

Definition at line 77 of file flex.c.

int fullspd

Definition at line 68 of file flex.c.

int fulltbl

Definition at line 67 of file flex.c.

int gen_line_dirs

Definition at line 68 of file flex.c.

int hshcol

Definition at line 100 of file flex.c.

int hshsave

Definition at line 101 of file flex.c.

char* infilename = NULL

Definition at line 73 of file flex.c.

char** input_files

Definition at line 106 of file flex.c.

int interactive

Definition at line 67 of file flex.c.

int jambase

Definition at line 95 of file flex.c.

int jamstate

Definition at line 95 of file flex.c.

int lastccl

Definition at line 96 of file flex.c.

int lastdfa

Definition at line 91 of file flex.c.

int lastnfa

Definition at line 76 of file flex.c.

int lastprot

Definition at line 82 of file flex.c.

int lastsc

Definition at line 87 of file flex.c.

int * lastst

Definition at line 77 of file flex.c.

int linenum

Definition at line 71 of file flex.c.

int nextecm[CSIZE+1]

Definition at line 83 of file flex.c.

char nmstr[MAXLINE]

Definition at line 99 of file flex.c.

int NUL_ec

Definition at line 92 of file flex.c.

int * nultrans

Definition at line 92 of file flex.c.

int num_backtracking

Definition at line 102 of file flex.c.

int num_input_files

Definition at line 107 of file flex.c.

int num_reallocs

Definition at line 100 of file flex.c.

int num_rules

Definition at line 76 of file flex.c.

int num_xlations

Definition at line 86 of file flex.c.

int numas

Definition at line 94 of file flex.c.

int numdup

Definition at line 101 of file flex.c.

int numecs

Definition at line 83 of file flex.c.

int numeps

Definition at line 100 of file flex.c.

int nummecs

Definition at line 83 of file flex.c.

int nummt

Definition at line 100 of file flex.c.

int numprots

Definition at line 81 of file flex.c.

int numsnpairs

Definition at line 95 of file flex.c.

int numtemps

Definition at line 81 of file flex.c.

int numuniq

Definition at line 101 of file flex.c.

int * nxt

Definition at line 91 of file flex.c.

int onedef[ONE_STACK_SIZE]

Definition at line 75 of file flex.c.

int onenext[ONE_STACK_SIZE]

Definition at line 75 of file flex.c.

int onesp

Definition at line 75 of file flex.c.

int onestate[ONE_STACK_SIZE]

Definition at line 74 of file flex.c.

int onesym[ONE_STACK_SIZE]

Definition at line 74 of file flex.c.

int peakpairs

Definition at line 101 of file flex.c.

int performance_report

Definition at line 68 of file flex.c.

int printstats

Definition at line 66 of file flex.c.

char* program_name

Definition at line 108 of file flex.c.

int protcomst[MSP]

Definition at line 82 of file flex.c.

int protnext[MSP]

Definition at line 81 of file flex.c.

int protprev[MSP]

Definition at line 81 of file flex.c.

int protsave[PROT_SAVE_SIZE]

Definition at line 82 of file flex.c.

int prottbl[MSP]

Definition at line 81 of file flex.c.

int real_reject

Definition at line 69 of file flex.c.

int reject

Definition at line 69 of file flex.c.

int reject_really_used

Definition at line 70 of file flex.c.

int * rule_linenum

Definition at line 78 of file flex.c.

int * rule_type

Definition at line 78 of file flex.c.

int * scbol

Definition at line 87 of file flex.c.

int * sceof

Definition at line 87 of file flex.c.

char** scname

Definition at line 88 of file flex.c.

int * scset

Definition at line 87 of file flex.c.

int * scxclu

Definition at line 87 of file flex.c.

int sectnum

Definition at line 100 of file flex.c.

FILE* skelfile = NULL

Definition at line 72 of file flex.c.

int spprdflt

Definition at line 66 of file flex.c.

char* starttime

Definition at line 99 of file flex.c.

int * state_type

Definition at line 78 of file flex.c.

int syntaxerror

Definition at line 66 of file flex.c.

int tblend

Definition at line 92 of file flex.c.

int tecbck[CSIZE+1]

Definition at line 84 of file flex.c.

int tecfwd[CSIZE+1]

Definition at line 83 of file flex.c.

FILE* temp_action_file

Definition at line 103 of file flex.c.

int tmpuses

Definition at line 101 of file flex.c.

int * tnxt

Definition at line 91 of file flex.c.

int totnst

Definition at line 101 of file flex.c.

int trace

Definition at line 66 of file flex.c.

int * trans1

Definition at line 77 of file flex.c.

int * trans2

Definition at line 77 of file flex.c.

int * transchar

Definition at line 77 of file flex.c.

int useecs

Definition at line 67 of file flex.c.

int usemecs

Definition at line 67 of file flex.c.

int variable_trailing_context_rules

Definition at line 80 of file flex.c.

int* xlation = (int *) 0

Definition at line 85 of file flex.c.

int yymore_really_used

Definition at line 70 of file flex.c.

int yymore_used

Definition at line 69 of file flex.c.