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 

 

posted on 2009-12-23 22:03 Reno 阅读(175) 评论(0)  编辑 收藏 引用 所属分类: 编译原理/脚本语言开发

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


统计