Revision 301 trunk/src/nh99/tpl2cpp.lex

tpl2cpp.lex (revision 301)
2 2

  
3 3
%{
4 4
  /**
5
   * $Id: tpl2cpp.lex 956 2011-01-16 21:17:44Z jsibert $
6 5
   *
6
   * $Id: tpl2cpp.lex 945 2011-01-12 23:03:57Z johnoel $
7
   *
7 8
   * Author: David Fournier
8 9
   * Copyright (c) 2008-2011 Regents of the University of California
9
   *
10 10
   */
11 11

  
12 12
  #define   MAX_TMP_STRING  501
13 13
  #define   MAX_USER_CLASSES  501
14 14
  #define   MAX_USER_CLASSNAME_LENGTH  251
15
  #define   MAX_PRIOR_CHECK  1000
16
  #define   MAX_LIKE_CHECK  2000
15 17
  #include <stdlib.h>
16 18
  #include <string.h>
17 19
  #include <stdio.h>
18 20
  #if defined(_WIN32)
19
  #include <io.h>    /* fopen   */
21
  #include <io.h>  //fopen
20 22
  #include <ctype.h> /* isalnum */
21 23
  #endif
22 24
  char tmp_string[MAX_TMP_STRING];
......
25 27
  char tmp_string3[MAX_TMP_STRING];
26 28
  char tmp_string4[MAX_TMP_STRING];
27 29
  char tmp_string5[MAX_TMP_STRING];
30
  char objective_function_name_string[MAX_TMP_STRING];
28 31
  char reference_statements[MAX_USER_CLASSES][MAX_USER_CLASSNAME_LENGTH];
32

  
29 33
  char class_instances[MAX_USER_CLASSES][MAX_USER_CLASSNAME_LENGTH];
30 34
  char outcommand[100];
31 35
  char infile_name[1000];
......
33 37
  char name_string[100];
34 38
  char outfile_name[1000];
35 39
  char headerfile_name[100];
40
  
41

  
36 42
  int  num_spargs=0;
37 43
  int  pvmslaves_defined=0;
38 44
  int  splus_debug_flag=0;
......
44 50
  int makegaussdll=0;
45 51
  int no_userclass=0;
46 52
  int bound_flag=1;
47
  int  num_user_classes=0;
53
  int num_user_classes=0;
48 54
  int final_defined=0;
49 55
  int top_of_main_defined=0;
50 56
  int globals_section_defined=0;
51 57
  int in_define_parameters=0;
52 58
  int talk_to_splus=0;
53 59
  int initialization_defined=0;
60

  
61
  int priors_defined=0;
62
  int prior_done_once=0;
63
  int likelihood_defined=0;
64
  int likelihood_done_once=0;
65
  int procedure_done=0;
66
  int likelihood_done=0;
67
  int priors_done=0;
68
  int prior_function_toggle=0;
69
  char prior_checker[MAX_PRIOR_CHECK][100];//container hold all parameters which being used for check the prior
70
  int prior_counter=0; //index for prior_checker
71
  int prior_found=0;
72
  char likelihood_checker[MAX_LIKE_CHECK][100];
73
  int likelihood_counter=0; //index for likelihood_checker
74
  int likelihood_found=0;
75

  
54 76
  int objective_function_defined=0;
55 77
  int report_defined=0;
56 78
  int preliminary_calcs_defined=0;
......
90 112
  char * after_partb(char * d, char * s, char c);
91 113
  char * strip_leading_blanks(char * d, char * s);
92 114
  char * strip_leading_blanks_and_tabs(char * d, char * s);
115

  
93 116
  int count_paren(int num_paren,char * yytext);
94 117
  void add_references_to_user_classes(FILE * fall);  
95 118
  void call_destructors_for_user_classes(FILE * fall); 
96 119
  void marker(void);
97 120
  void write_unallocated(const char *);
121
  
122
  void add_prior_to_objective(void);
123
  void add_likelihood_to_objective(void);
124
  void setup_for_prior_likelihood(void);
125
  void trim(char * a); 
126
  int prior_check(char * parameter, char * prior);  
98 127

  
99 128
  int filename_index;
100 129
  int filename_size;
101 130
%}
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff