2 * Copyright (C) 1994, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.1 1994-09-26 10:16:55 adam
8 * First version of dfa module in alex. This version uses yacc to parse
9 * regular expressions. This should be hand-made instead.
12 * Adam Dickmeiss. 1992-1993
13 * This module is actually very old...
30 void error( const char *format, ... )
33 va_start( argptr, format );
34 fprintf( stderr, "%s error: ", prog );
35 (void) vfprintf( stderr, format, argptr );
47 static int alex_options (int argc, char **argv);
49 static int alex_options (int argc, char **argv)
59 fprintf( stderr, "%s: %s %s\n", prog, __DATE__, __TIME__ );
85 debug_dfa_followpos = 1;
90 debug_dfa_followpos = 1;
95 fprintf( stderr, "%s: unknown option `-%s'\n", prog, *argv );
103 int main (int argc, char **argv )
115 i = alex_options( argc, argv );
121 fprintf( stderr, "%s: usage %s -cVvt -d[stf]\n", prog, prog );
124 else while( --argc > 0 )
125 if( **++argv != '-' && **argv )
128 i = read_file( *argv, &dfa );
131 dfas = mk_dfas( dfa, 2000 );
140 fprintf( stderr, "%s: no files specified\n", prog );