1 #include <stdio.h>
2 #include <string.h>
3 #include "PathInterpreter.h"
4
5 int main( int argc, char *argv[] )
6 {
7 if ( argc < 2 )
8 {
9 printf( "Usage: ExecuableFileName ScriptFileName [-DEBUG|-debug] \n" );
10 return 0;
11 }
12
13 if ( argc > 3 )
14 {
15 printf( "Warning: More parameters have expected, after the third has ignored!\n" );
16 return 0;
17 }
18
19 CPathInterpret Instance;
20 Instance.LoadScript( argv[1] );
21 if ( argc == 3 )
22 {
23 if ( strcmp( argv[2], "-DEBUG" ) == 0 || strcmp( argv[2], "-debug" ) == 0 )
24 Instance.Interpret( CPathInterpret::DEBUG );
25 else
26 printf( "Warning: Unknown about the third parameter!\n" );
27 }
28 else
29 Instance.Interpret();
30
31 return 0;
32 }
33
34