src/common/test_fison.cc

00001 
00002 #include <stdio.h>
00003 #include <string.h>
00004 #include "open_prospect.h"
00005 #include "feature_parse.tab.h"
00006 
00007 extern ProspectThreadingInfo *yy_parse_thread_info;
00008 extern float yy_parse_result_val;
00009 
00010 int yyparse (void);
00011 extern int yy_scan_string(const char *);
00012 
00013 
00014 int main(int argc, char **argv) {
00015         ProspectOutput my_output;       
00016         my_output.Load( argv[1] );      
00017         
00018         int i = 0;
00019         //for (int i = 0; i < my_output.GetThreadingCount(); i++) { 
00020                 ProspectThreadingInfo my_thread_info = my_output.GetThreadingInfo( i );
00021                 yy_parse_thread_info = &my_thread_info; 
00022                 yy_scan_string ( strdup(argv[2]) );
00023                 yyparse();
00024                 printf("%s\t%g\n", my_thread_info.template_name, yy_parse_result_val ); 
00025         //}
00026 }

Generated on Wed Apr 11 16:50:50 2007 for open_prospect by  doxygen 1.4.6