00001 #line 2 "include/pomdp_spec.yy.cc"
00002
00003
00004
00005
00006
00007
00008 #define FLEX_SCANNER
00009 #define YY_FLEX_MAJOR_VERSION 2
00010 #define YY_FLEX_MINOR_VERSION 5
00011
00012 #include "mdpCassandra.h"
00013
00014 #include <stdio.h>
00015 #ifdef _MSC_VER
00016 #include <io.h>
00017 #else
00018 #include <unistd.h>
00019 #endif
00020
00021
00022
00023
00024 #ifdef c_plusplus
00025 #ifndef __cplusplus
00026 #define __cplusplus
00027 #endif
00028 #endif
00029
00030
00031 #ifdef __cplusplus
00032
00033 #include <stdlib.h>
00034
00035
00036
00037 #define YY_USE_PROTOS
00038
00039
00040 #define YY_USE_CONST
00041
00042 #else
00043
00044 #if __STDC__
00045
00046 #define YY_USE_PROTOS
00047 #define YY_USE_CONST
00048
00049 #endif
00050 #endif
00051
00052 #ifdef __TURBOC__
00053 #pragma warn -rch
00054 #pragma warn -use
00055 #include <io.h>
00056 #include <stdlib.h>
00057 #define YY_USE_CONST
00058 #define YY_USE_PROTOS
00059 #endif
00060
00061 #ifdef YY_USE_CONST
00062 #define yyconst const
00063 #else
00064 #define yyconst
00065 #endif
00066
00067
00068 #ifdef YY_USE_PROTOS
00069 #define YY_PROTO(proto) proto
00070 #else
00071 #define YY_PROTO(proto) ()
00072 #endif
00073
00074
00075 #define YY_NULL 0
00076
00077
00078
00079
00080
00081
00082 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00083
00084
00085
00086
00087
00088 #define BEGIN yy_start = 1 + 2 *
00089
00090
00091
00092
00093
00094 #define YY_START ((yy_start - 1) / 2)
00095 #define YYSTATE YY_START
00096
00097
00098 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00099
00100
00101 #define YY_NEW_FILE yyrestart( yyin )
00102
00103 #define YY_END_OF_BUFFER_CHAR 0
00104
00105
00106 #define YY_BUF_SIZE 16384
00107
00108 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00109
00110 extern int yyleng;
00111 extern FILE *yyin, *yyout;
00112
00113 #define EOB_ACT_CONTINUE_SCAN 0
00114 #define EOB_ACT_END_OF_FILE 1
00115 #define EOB_ACT_LAST_MATCH 2
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133 #define yyless(n) \
00134 do \
00135 { \
00136 \
00137 *yy_cp = yy_hold_char; \
00138 YY_RESTORE_YY_MORE_OFFSET \
00139 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
00140 YY_DO_BEFORE_ACTION; \
00141 } \
00142 while ( 0 )
00143
00144 #define unput(c) yyunput( c, yytext_ptr )
00145
00146
00147
00148
00149 #ifdef __GNUC__
00150 #define YY_MAY_BE_UNUSED __attribute__((unused))
00151 #else
00152 #define YY_MAY_BE_UNUSED
00153 #endif
00154
00155
00156
00157
00158
00159 typedef unsigned int yy_size_t;
00160
00161
00162 struct yy_buffer_state
00163 {
00164 FILE *yy_input_file;
00165
00166 char *yy_ch_buf;
00167 char *yy_buf_pos;
00168
00169
00170
00171
00172 yy_size_t yy_buf_size;
00173
00174
00175
00176
00177 int yy_n_chars;
00178
00179
00180
00181
00182
00183 int yy_is_our_buffer;
00184
00185
00186
00187
00188
00189
00190 int yy_is_interactive;
00191
00192
00193
00194
00195
00196 int yy_at_bol;
00197
00198
00199
00200
00201 int yy_fill_buffer;
00202
00203 int yy_buffer_status;
00204 #define YY_BUFFER_NEW 0
00205 #define YY_BUFFER_NORMAL 1
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216 #define YY_BUFFER_EOF_PENDING 2
00217 };
00218
00219 static YY_BUFFER_STATE yy_current_buffer = 0;
00220
00221
00222
00223
00224
00225 #define YY_CURRENT_BUFFER yy_current_buffer
00226
00227
00228
00229 static char yy_hold_char;
00230
00231 static int yy_n_chars;
00232
00233
00234 int yyleng;
00235
00236
00237 static char *yy_c_buf_p = (char *) 0;
00238 static int yy_init = 1;
00239 static int yy_start = 0;
00240
00241
00242
00243
00244 static int yy_did_buffer_switch_on_eof;
00245
00246 void yyrestart YY_PROTO(( FILE *input_file ));
00247
00248 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
00249 void yy_load_buffer_state YY_PROTO(( void ));
00250 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
00251 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
00252 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
00253 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
00254 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
00255
00256 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
00257 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
00258 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
00259
00260 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
00261 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED;
00262 static void yy_flex_free YY_PROTO(( void * ));
00263
00264 #define yy_new_buffer yy_create_buffer
00265
00266 #define yy_set_interactive(is_interactive) \
00267 { \
00268 if ( ! yy_current_buffer ) \
00269 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
00270 yy_current_buffer->yy_is_interactive = is_interactive; \
00271 }
00272
00273 #define yy_set_bol(at_bol) \
00274 { \
00275 if ( ! yy_current_buffer ) \
00276 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
00277 yy_current_buffer->yy_at_bol = at_bol; \
00278 }
00279
00280 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
00281
00282 typedef unsigned char YY_CHAR;
00283 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
00284 typedef int yy_state_type;
00285 extern char *yytext;
00286 #define yytext_ptr yytext
00287
00288 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
00289 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
00290 static int yy_get_next_buffer YY_PROTO(( void ));
00291 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
00292
00293
00294
00295
00296 #define YY_DO_BEFORE_ACTION \
00297 yytext_ptr = yy_bp; \
00298 yyleng = (int) (yy_cp - yy_bp); \
00299 yy_hold_char = *yy_cp; \
00300 *yy_cp = '\0'; \
00301 yy_c_buf_p = yy_cp;
00302
00303 #define YY_NUM_RULES 14
00304 #define YY_END_OF_BUFFER 15
00305 static yyconst long int yy_accept[28] =
00306 { 0,
00307 0, 0, 15, 13, 10, 12, 11, 9, 4, 5,
00308 7, 6, 1, 8, 3, 4, 2, 1, 0, 3,
00309 2, 0, 0, 2, 0, 2, 0
00310 } ;
00311
00312 static yyconst long int yy_base[31] =
00313 { 0,
00314 0, 114, 1, 965, 965, 965, 965, 965, 0, 965,
00315 965, 965, 191, 965, 0, 0, 201, 225, 83, 0,
00316 255, 280, 265, 290, 309, 319, 965, 376, 631, 842
00317 } ;
00318
00319 static yyconst long int yy_def[31] =
00320 { 0,
00321 28, 28, 27, 27, 27, 27, 27, 27, 29, 27,
00322 27, 27, 27, 27, 30, 29, 27, 27, 27, 30,
00323 27, 27, 27, 27, 27, 27, 0, 27, 27, 27
00324 } ;
00325
00326 static yyconst long int yy_nxt[1222] =
00327 { 0,
00328 27, 27, 27, 27, 27, 27, 27, 27, 5, 6,
00329 27, 27, 7, 27, 27, 27, 27, 27, 27, 27,
00330 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00331 27, 8, 27, 27, 9, 27, 27, 27, 27, 27,
00332 27, 10, 11, 27, 12, 27, 27, 13, 13, 13,
00333 13, 13, 13, 13, 13, 13, 13, 14, 27, 27,
00334 27, 27, 27, 27, 15, 15, 15, 15, 15, 15,
00335 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
00336 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
00337 27, 27, 27, 27, 27, 27, 15, 15, 15, 15,
00338
00339 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
00340 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
00341 15, 15, 5, 6, 27, 23, 7, 23, 27, 27,
00342 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
00343 27, 27, 27, 27, 27, 8, 27, 27, 9, 27,
00344 27, 27, 27, 27, 27, 10, 11, 27, 12, 27,
00345 27, 13, 13, 13, 13, 13, 13, 13, 13, 13,
00346 13, 14, 27, 27, 27, 27, 27, 27, 15, 15,
00347 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
00348 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
00349
00350 15, 15, 15, 15, 27, 27, 27, 27, 27, 27,
00351 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
00352 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
00353 15, 15, 15, 15, 15, 15, 17, 27, 18, 18,
00354 18, 18, 18, 18, 18, 18, 18, 18, 21, 21,
00355 21, 21, 21, 21, 21, 21, 21, 21, 27, 19,
00356 27, 27, 27, 27, 27, 27, 27, 27, 27, 22,
00357 17, 27, 18, 18, 18, 18, 18, 18, 18, 18,
00358 18, 18, 27, 27, 27, 27, 27, 27, 27, 27,
00359 27, 19, 27, 19, 27, 27, 27, 27, 27, 27,
00360
00361 27, 22, 21, 21, 21, 21, 21, 21, 21, 21,
00362 21, 21, 24, 24, 24, 24, 24, 24, 24, 24,
00363 24, 24, 25, 22, 25, 19, 27, 26, 26, 26,
00364 26, 26, 26, 26, 26, 26, 26, 24, 24, 24,
00365 24, 24, 24, 24, 24, 24, 24, 27, 27, 27,
00366 27, 27, 27, 27, 27, 22, 26, 26, 26, 26,
00367 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
00368 26, 26, 26, 26, 26, 26, 4, 4, 4, 4,
00369 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00370 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00371
00372 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00373 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00374 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00375 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00376 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00377 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00378 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00379 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00380 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00381 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00382
00383 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00384 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00385 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00386 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00387 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00388 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00389 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00390 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00391 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00392 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00393
00394 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00395 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00396 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
00397 4, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00398 27, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00399 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00400 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00401 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00402 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00403 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00404
00405 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00406 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00407 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00408 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00409 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00410 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00411 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00412 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00413 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00414 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00415
00416 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00417 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00418 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00419 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00420 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00421 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00422 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00423 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00424 16, 16, 16, 16, 16, 16, 20, 27, 27, 20,
00425 20, 20, 20, 20, 20, 20, 20, 20, 20, 27,
00426
00427 27, 27, 27, 27, 27, 27, 20, 20, 20, 20,
00428 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
00429 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
00430 20, 20, 27, 27, 27, 27, 20, 27, 20, 20,
00431 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
00432 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
00433 20, 20, 20, 20, 3, 27, 27, 27, 27, 27,
00434 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00435 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00436 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00437
00438 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00439 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00440 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00441 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00442 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00443 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00444 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00445 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00446 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00447 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00448
00449 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00450 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00451 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00452 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00453 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00454 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00455 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00456 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00457 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00458 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00459
00460 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00461 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00462 27
00463 } ;
00464
00465 static yyconst long int yy_chk[1222] =
00466 { 0,
00467 3, 0, 0, 0, 0, 0, 0, 0, 1, 1,
00468 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
00469 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00470 0, 1, 0, 0, 1, 0, 0, 0, 0, 0,
00471 0, 1, 1, 0, 1, 0, 0, 1, 1, 1,
00472 1, 1, 1, 1, 1, 1, 1, 1, 0, 0,
00473 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
00474 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00475 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00476 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
00477
00478 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00479 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00480 1, 1, 2, 2, 0, 19, 2, 19, 0, 0,
00481 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
00482 0, 0, 0, 0, 0, 2, 0, 0, 2, 0,
00483 0, 0, 0, 0, 0, 2, 2, 0, 2, 0,
00484 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00485 2, 2, 0, 0, 0, 0, 0, 0, 2, 2,
00486 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00487 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00488
00489 2, 2, 2, 2, 0, 0, 0, 0, 0, 0,
00490 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00491 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00492 2, 2, 2, 2, 2, 2, 13, 0, 13, 13,
00493 13, 13, 13, 13, 13, 13, 13, 13, 17, 17,
00494 17, 17, 17, 17, 17, 17, 17, 17, 0, 13,
00495 0, 0, 0, 0, 0, 0, 0, 0, 0, 17,
00496 18, 0, 18, 18, 18, 18, 18, 18, 18, 18,
00497 18, 18, 0, 0, 0, 0, 0, 0, 0, 0,
00498 0, 13, 0, 18, 0, 0, 0, 0, 0, 0,
00499
00500 0, 17, 21, 21, 21, 21, 21, 21, 21, 21,
00501 21, 21, 23, 23, 23, 23, 23, 23, 23, 23,
00502 23, 23, 22, 21, 22, 18, 0, 22, 22, 22,
00503 22, 22, 22, 22, 22, 22, 22, 24, 24, 24,
00504 24, 24, 24, 24, 24, 24, 24, 0, 0, 0,
00505 0, 0, 0, 0, 0, 21, 25, 25, 25, 25,
00506 25, 25, 25, 25, 25, 25, 26, 26, 26, 26,
00507 26, 26, 26, 26, 26, 26, 28, 28, 28, 28,
00508 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00509 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00510
00511 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00512 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00513 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00514 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00515 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00516 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00517 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00518 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00519 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00520 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00521
00522 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00523 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00524 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00525 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00526 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00527 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00528 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00529 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00530 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00531 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00532
00533 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00534 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00535 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
00536 28, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00537 0, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00538 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00539 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00540 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00541 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00542 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00543
00544 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00545 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00546 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00547 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00548 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00549 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00550 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00551 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00552 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00553 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00554
00555 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00556 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00557 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00558 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00559 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00560 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00561 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00562 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
00563 29, 29, 29, 29, 29, 29, 30, 0, 0, 30,
00564 30, 30, 30, 30, 30, 30, 30, 30, 30, 0,
00565
00566 0, 0, 0, 0, 0, 0, 30, 30, 30, 30,
00567 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
00568 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
00569 30, 30, 0, 0, 0, 0, 30, 0, 30, 30,
00570 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
00571 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
00572 30, 30, 30, 30, 27, 27, 27, 27, 27, 27,
00573 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00574 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00575 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00576
00577 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00578 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00579 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00580 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00581 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00582 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00583 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00584 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00585 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00586 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00587
00588 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00589 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00590 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00591 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00592 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00593 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00594 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00595 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00596 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00597 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00598
00599 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00600 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
00601 27
00602 } ;
00603
00604 static yy_state_type yy_last_accepting_state;
00605 static char *yy_last_accepting_cpos;
00606
00607 static yyconst yy_state_type yy_NUL_trans[27] =
00608 { 0,
00609 4, 4, 0, 0, 0, 0, 0, 0, 16, 0,
00610 0, 0, 0, 0, 0, 16, 0, 0, 0, 0,
00611 0, 0, 0, 0, 0, 0
00612 } ;
00613
00614
00615
00616
00617 #define REJECT reject_used_but_not_detected
00618 #define yymore() yymore_used_but_not_detected
00619 #define YY_MORE_ADJ 0
00620 #define YY_RESTORE_YY_MORE_OFFSET
00621 char *yytext;
00622 #line 1 "pomdp_spec.l"
00623 #define INITIAL 0
00624 #line 2 "pomdp_spec.l"
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638
00639
00640
00641
00642
00643
00644
00645
00646
00647
00648
00649
00650
00651
00652
00653 #include <stdio.h>
00654 #include <ctype.h>
00655 #include <stdlib.h>
00656 #include <string.h>
00657
00658 #include "parse_err.h"
00659 #include "parse_hash.h"
00660 #include "parse_constant.h"
00661 #include "include/pomdp_spec.tab.hh"
00662
00663 #define NUM_LETTERS 26
00664 #define MAX_IDENT_LENGTH 32
00665
00666 #define TO_UPPER_CASE 1
00667 #define NORMAL 0
00668
00669 extern long currentLineNumber;
00670 extern void ERR_enter();
00671
00672
00673
00674
00675
00676 #define NUM_RESERVED_WORDS 16
00677 static char *reserved_str[] = {
00678 "discount",
00679 "values",
00680 "states",
00681 "actions",
00682 "observations",
00683 "T",
00684 "O",
00685 "R",
00686 "uniform",
00687 "identity",
00688 "reward",
00689 "cost",
00690 "start",
00691 "include",
00692 "exclude",
00693 "reset"
00694 };
00695 static int reserved_token[] = {
00696 DISCOUNTTOK,
00697 VALUESTOK,
00698 STATETOK,
00699 ACTIONTOK,
00700 OBSTOK,
00701 TTOK,
00702 OTOK,
00703 RTOK,
00704 UNIFORMTOK,
00705 IDENTITYTOK,
00706 REWARDTOK,
00707 COSTTOK,
00708 STARTTOK,
00709 INCLUDETOK,
00710 EXCLUDETOK,
00711 RESETTOK
00712 };
00713
00714
00715
00716 void IntToYylval()
00717 {
00718 Constant_Block *aConst;
00719
00720 aConst = (Constant_Block *) malloc(sizeof(Constant_Block));
00721 checkAllocatedPointer((void *) aConst);
00722
00723 aConst->theTag = CONST_INT;
00724 aConst->theValue.theInt = atoi(yytext);
00725
00726 yylval.constBlk = aConst;
00727 }
00728
00729 void FloatToYylval()
00730 {
00731 Constant_Block *aConst;
00732
00733 aConst = (Constant_Block *) malloc(sizeof(Constant_Block));
00734 checkAllocatedPointer((void *) aConst);
00735
00736 aConst->theTag = CONST_FLOAT;
00737 aConst->theValue.theFloat = atof(yytext);
00738
00739 yylval.constBlk = aConst;
00740 }
00741
00742 void StringToYylval()
00743
00744
00745
00746 {
00747 Constant_Block *aConst;
00748 char *tempString;
00749 int i;
00750
00751 tempString = (char *) calloc(strlen(yytext)+1, sizeof(char));
00752
00753 for (i = 0; i < yyleng; i++)
00754 tempString[i] = yytext[i];
00755
00756 tempString[i] = '\0';
00757
00758 aConst = (Constant_Block *) malloc(sizeof(Constant_Block));
00759 checkAllocatedPointer((void *) aConst);
00760
00761 aConst->theTag = CONST_STRING;
00762 aConst->theValue.theString = tempString;
00763
00764 yylval.constBlk = aConst;
00765
00766 }
00767
00768 int CheckReserved() {
00769 int i;
00770
00771 for( i = 0; i < NUM_RESERVED_WORDS; i++ )
00772 if( strcmp( reserved_str[i], yytext ) == 0 )
00773 return( reserved_token[ i ] );
00774
00775 return( -1 );
00776
00777 }
00778
00779
00780 #line 767 "include/pomdp_spec.yy.cc"
00781
00782
00783
00784
00785
00786 #ifndef YY_SKIP_YYWRAP
00787 #ifdef __cplusplus
00788 extern "C" int yywrap YY_PROTO(( void ));
00789 #else
00790 extern int yywrap YY_PROTO(( void ));
00791 #endif
00792 #endif
00793
00794 #ifndef YY_NO_UNPUT
00795 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
00796 #endif
00797
00798 #ifndef yytext_ptr
00799 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
00800 #endif
00801
00802 #ifdef YY_NEED_STRLEN
00803 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
00804 #endif
00805
00806 #ifndef YY_NO_INPUT
00807 #ifdef __cplusplus
00808 static int yyinput YY_PROTO(( void ));
00809 #else
00810 static int input YY_PROTO(( void ));
00811 #endif
00812 #endif
00813
00814 #if YY_STACK_USED
00815 static int yy_start_stack_ptr = 0;
00816 static int yy_start_stack_depth = 0;
00817 static int *yy_start_stack = 0;
00818 #ifndef YY_NO_PUSH_STATE
00819 static void yy_push_state YY_PROTO(( int new_state ));
00820 #endif
00821 #ifndef YY_NO_POP_STATE
00822 static void yy_pop_state YY_PROTO(( void ));
00823 #endif
00824 #ifndef YY_NO_TOP_STATE
00825 static int yy_top_state YY_PROTO(( void ));
00826 #endif
00827
00828 #else
00829 #define YY_NO_PUSH_STATE 1
00830 #define YY_NO_POP_STATE 1
00831 #define YY_NO_TOP_STATE 1
00832 #endif
00833
00834 #ifdef YY_MALLOC_DECL
00835 YY_MALLOC_DECL
00836 #else
00837 #if __STDC__
00838 #ifndef __cplusplus
00839 #include <stdlib.h>
00840 #endif
00841 #else
00842
00843
00844
00845
00846 #endif
00847 #endif
00848
00849
00850 #ifndef YY_READ_BUF_SIZE
00851 #define YY_READ_BUF_SIZE 8192
00852 #endif
00853
00854
00855
00856 #ifndef ECHO
00857
00858
00859
00860 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
00861 #endif
00862
00863
00864
00865
00866 #ifndef YY_INPUT
00867 #define YY_INPUT(buf,result,max_size) \
00868 if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
00869 YY_FATAL_ERROR( "input in flex scanner failed" );
00870 #endif
00871
00872
00873
00874
00875
00876 #ifndef yyterminate
00877 #define yyterminate() return YY_NULL
00878 #endif
00879
00880
00881 #ifndef YY_START_STACK_INCR
00882 #define YY_START_STACK_INCR 25
00883 #endif
00884
00885
00886 #ifndef YY_FATAL_ERROR
00887 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
00888 #endif
00889
00890
00891
00892
00893 #ifndef YY_DECL
00894 #define YY_DECL int yylex YY_PROTO(( void ))
00895 #endif
00896
00897
00898
00899
00900 #ifndef YY_USER_ACTION
00901 #define YY_USER_ACTION
00902 #endif
00903
00904
00905 #ifndef YY_BREAK
00906 #define YY_BREAK break;
00907 #endif
00908
00909 #define YY_RULE_SETUP \
00910 YY_USER_ACTION
00911
00912 YY_DECL
00913 {
00914 register yy_state_type yy_current_state;
00915 register char *yy_cp = NULL, *yy_bp = NULL;
00916 register int yy_act;
00917
00918 #line 162 "pomdp_spec.l"
00919
00920 #line 907 "include/pomdp_spec.yy.cc"
00921
00922 if ( yy_init )
00923 {
00924 yy_init = 0;
00925
00926 #ifdef YY_USER_INIT
00927 YY_USER_INIT;
00928 #endif
00929
00930 if ( ! yy_start )
00931 yy_start = 1;
00932
00933 if ( ! yyin )
00934 yyin = stdin;
00935
00936 if ( ! yyout )
00937 yyout = stdout;
00938
00939 if ( ! yy_current_buffer )
00940 yy_current_buffer =
00941 yy_create_buffer( yyin, YY_BUF_SIZE );
00942
00943 yy_load_buffer_state();
00944 }
00945
00946 while ( 1 )
00947 {
00948 yy_cp = yy_c_buf_p;
00949
00950
00951 *yy_cp = yy_hold_char;
00952
00953
00954
00955
00956 yy_bp = yy_cp;
00957
00958 yy_current_state = yy_start;
00959 yy_match:
00960 do
00961 {
00962 register YY_CHAR yy_c = YY_SC_TO_UI(*yy_cp);
00963 if ( yy_accept[yy_current_state] )
00964 {
00965 yy_last_accepting_state = yy_current_state;
00966 yy_last_accepting_cpos = yy_cp;
00967 }
00968 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00969 {
00970 yy_current_state = (int) yy_def[yy_current_state];
00971 }
00972 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
00973 ++yy_cp;
00974 }
00975 while ( yy_base[yy_current_state] != 965 );
00976
00977 yy_find_action:
00978 yy_act = yy_accept[yy_current_state];
00979 if ( yy_act == 0 )
00980 {
00981 yy_cp = yy_last_accepting_cpos;
00982 yy_current_state = yy_last_accepting_state;
00983 yy_act = yy_accept[yy_current_state];
00984 }
00985
00986 YY_DO_BEFORE_ACTION;
00987
00988
00989 do_action:
00990
00991
00992 switch ( yy_act )
00993 {
00994 case 0:
00995
00996 *yy_cp = yy_hold_char;
00997 yy_cp = yy_last_accepting_cpos;
00998 yy_current_state = yy_last_accepting_state;
00999 goto yy_find_action;
01000
01001 case 1:
01002 YY_RULE_SETUP
01003 #line 163 "pomdp_spec.l"
01004 {
01005 IntToYylval();
01006 return (INTTOK);
01007 }
01008 YY_BREAK
01009 case 2:
01010 YY_RULE_SETUP
01011 #line 168 "pomdp_spec.l"
01012 {
01013 FloatToYylval();
01014 return (FLOATTOK);
01015 }
01016 YY_BREAK
01017 case 3:
01018 YY_RULE_SETUP
01019 #line 173 "pomdp_spec.l"
01020 {
01021 int tok_val;
01022 tok_val = CheckReserved();
01023 if( tok_val < 0 ) {
01024 StringToYylval();
01025 return (STRINGTOK);
01026 }
01027 else
01028 return( tok_val );
01029 }
01030 YY_BREAK
01031 case 4:
01032 YY_RULE_SETUP
01033 #line 184 "pomdp_spec.l"
01034 ;
01035 YY_BREAK
01036 case 5:
01037 YY_RULE_SETUP
01038 #line 187 "pomdp_spec.l"
01039 {
01040 return (ASTERICKTOK);
01041 }
01042 YY_BREAK
01043 case 6:
01044 YY_RULE_SETUP
01045 #line 190 "pomdp_spec.l"
01046 {
01047 return (MINUSTOK);
01048 }
01049 YY_BREAK
01050 case 7:
01051 YY_RULE_SETUP
01052 #line 193 "pomdp_spec.l"
01053 {
01054 return (PLUSTOK);
01055 }
01056 YY_BREAK
01057 case 8:
01058 YY_RULE_SETUP
01059 #line 196 "pomdp_spec.l"
01060 {
01061 return (COLONTOK);
01062 }
01063 YY_BREAK
01064 case 9:
01065 YY_RULE_SETUP
01066 #line 200 "pomdp_spec.l"
01067 ;
01068 YY_BREAK
01069 case 10:
01070 YY_RULE_SETUP
01071 #line 202 "pomdp_spec.l"
01072 ;
01073 YY_BREAK
01074 case 11:
01075 YY_RULE_SETUP
01076 #line 204 "pomdp_spec.l"
01077 ;
01078 YY_BREAK
01079 case 12:
01080 YY_RULE_SETUP
01081 #line 206 "pomdp_spec.l"
01082 {
01083 currentLineNumber++;
01084 }
01085 YY_BREAK
01086 case 13:
01087 YY_RULE_SETUP
01088 #line 211 "pomdp_spec.l"
01089 {
01090
01091 ERR_enter("Scanner<yylex>",currentLineNumber,
01092 ILL_CHAR_ERR, yytext);
01093 }
01094 YY_BREAK
01095 case 14:
01096 YY_RULE_SETUP
01097 #line 217 "pomdp_spec.l"
01098 ECHO;
01099 YY_BREAK
01100 #line 1087 "include/pomdp_spec.yy.cc"
01101 case YY_STATE_EOF(INITIAL):
01102 yyterminate();
01103
01104 case YY_END_OF_BUFFER:
01105 {
01106
01107 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
01108
01109
01110 *yy_cp = yy_hold_char;
01111 YY_RESTORE_YY_MORE_OFFSET
01112
01113 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
01114 {
01115
01116
01117
01118
01119
01120
01121
01122
01123
01124 yy_n_chars = yy_current_buffer->yy_n_chars;
01125 yy_current_buffer->yy_input_file = yyin;
01126 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
01127 }
01128
01129
01130
01131
01132
01133
01134
01135
01136 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
01137 {
01138 yy_state_type yy_next_state;
01139
01140 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
01141
01142 yy_current_state = yy_get_previous_state();
01143
01144
01145
01146
01147
01148
01149
01150
01151
01152
01153 yy_next_state = yy_try_NUL_trans( yy_current_state );
01154
01155 yy_bp = yytext_ptr + YY_MORE_ADJ;
01156
01157 if ( yy_next_state )
01158 {
01159
01160 yy_cp = ++yy_c_buf_p;
01161 yy_current_state = yy_next_state;
01162 goto yy_match;
01163 }
01164
01165 else
01166 {
01167 yy_cp = yy_c_buf_p;
01168 goto yy_find_action;
01169 }
01170 }
01171
01172 else switch ( yy_get_next_buffer() )
01173 {
01174 case EOB_ACT_END_OF_FILE:
01175 {
01176 yy_did_buffer_switch_on_eof = 0;
01177
01178 if ( yywrap() )
01179 {
01180
01181
01182
01183
01184
01185
01186
01187
01188
01189 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
01190
01191 yy_act = YY_STATE_EOF(YY_START);
01192 goto do_action;
01193 }
01194
01195 else
01196 {
01197 if ( ! yy_did_buffer_switch_on_eof )
01198 YY_NEW_FILE;
01199 }
01200 break;
01201 }
01202
01203 case EOB_ACT_CONTINUE_SCAN:
01204 yy_c_buf_p =
01205 yytext_ptr + yy_amount_of_matched_text;
01206
01207 yy_current_state = yy_get_previous_state();
01208
01209 yy_cp = yy_c_buf_p;
01210 yy_bp = yytext_ptr + YY_MORE_ADJ;
01211 goto yy_match;
01212
01213 case EOB_ACT_LAST_MATCH:
01214 yy_c_buf_p =
01215 &yy_current_buffer->yy_ch_buf[yy_n_chars];
01216
01217 yy_current_state = yy_get_previous_state();
01218
01219 yy_cp = yy_c_buf_p;
01220 yy_bp = yytext_ptr + YY_MORE_ADJ;
01221 goto yy_find_action;
01222 }
01223 break;
01224 }
01225
01226 default:
01227 YY_FATAL_ERROR(
01228 "fatal flex scanner internal error--no action found" );
01229 }
01230 }
01231 }
01232
01233
01234
01235
01236
01237
01238
01239
01240
01241
01242 static int yy_get_next_buffer()
01243 {
01244 register char *dest = yy_current_buffer->yy_ch_buf;
01245 register char *source = yytext_ptr;
01246 register int number_to_move, i;
01247 int ret_val;
01248
01249 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
01250 YY_FATAL_ERROR(
01251 "fatal flex scanner internal error--end of buffer missed" );
01252
01253 if ( yy_current_buffer->yy_fill_buffer == 0 )
01254 {
01255 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
01256 {
01257
01258
01259
01260 return EOB_ACT_END_OF_FILE;
01261 }
01262
01263 else
01264 {
01265
01266
01267
01268 return EOB_ACT_LAST_MATCH;
01269 }
01270 }
01271
01272
01273
01274
01275 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
01276
01277 for ( i = 0; i < number_to_move; ++i )
01278 *(dest++) = *(source++);
01279
01280 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
01281
01282
01283
01284 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
01285
01286 else
01287 {
01288 int num_to_read =
01289 yy_current_buffer->yy_buf_size - number_to_move - 1;
01290
01291 while ( num_to_read <= 0 )
01292 {
01293 #ifdef YY_USES_REJECT
01294 YY_FATAL_ERROR(
01295 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
01296 #else
01297
01298
01299 YY_BUFFER_STATE b = yy_current_buffer;
01300
01301 int yy_c_buf_p_offset =
01302 (int) (yy_c_buf_p - b->yy_ch_buf);
01303
01304 if ( b->yy_is_our_buffer )
01305 {
01306 int new_size = b->yy_buf_size * 2;
01307
01308 if ( new_size <= 0 )
01309 b->yy_buf_size += b->yy_buf_size / 8;
01310 else
01311 b->yy_buf_size *= 2;
01312
01313 b->yy_ch_buf = (char *)
01314
01315 yy_flex_realloc( (void *) b->yy_ch_buf,
01316 b->yy_buf_size + 2 );
01317 }
01318 else
01319
01320 b->yy_ch_buf = 0;
01321
01322 if ( ! b->yy_ch_buf )
01323 YY_FATAL_ERROR(
01324 "fatal error - scanner input buffer overflow" );
01325
01326 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
01327
01328 num_to_read = yy_current_buffer->yy_buf_size -
01329 number_to_move - 1;
01330 #endif
01331 }
01332
01333 if ( num_to_read > YY_READ_BUF_SIZE )
01334 num_to_read = YY_READ_BUF_SIZE;
01335
01336
01337 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
01338 yy_n_chars, num_to_read );
01339
01340 yy_current_buffer->yy_n_chars = yy_n_chars;
01341 }
01342
01343 if ( yy_n_chars == 0 )
01344 {
01345 if ( number_to_move == YY_MORE_ADJ )
01346 {
01347 ret_val = EOB_ACT_END_OF_FILE;
01348 yyrestart( yyin );
01349 }
01350
01351 else
01352 {
01353 ret_val = EOB_ACT_LAST_MATCH;
01354 yy_current_buffer->yy_buffer_status =
01355 YY_BUFFER_EOF_PENDING;
01356 }
01357 }
01358
01359 else
01360 ret_val = EOB_ACT_CONTINUE_SCAN;
01361
01362 yy_n_chars += number_to_move;
01363 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
01364 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
01365
01366 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
01367
01368 return ret_val;
01369 }
01370
01371
01372
01373
01374 static yy_state_type yy_get_previous_state()
01375 {
01376 register yy_state_type yy_current_state;
01377 register char *yy_cp;
01378
01379 yy_current_state = yy_start;
01380
01381 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
01382 {
01383 if ( yy_accept[yy_current_state] )
01384 {
01385 yy_last_accepting_state = yy_current_state;
01386 yy_last_accepting_cpos = yy_cp;
01387 }
01388 if ( *yy_cp )
01389 {
01390 register YY_CHAR yy_c = YY_SC_TO_UI(*yy_cp);
01391 if ( yy_accept[yy_current_state] )
01392 {
01393 yy_last_accepting_state = yy_current_state;
01394 yy_last_accepting_cpos = yy_cp;
01395 }
01396 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01397 {
01398 yy_current_state = (int) yy_def[yy_current_state];
01399 }
01400 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01401 }
01402 else
01403 yy_current_state = yy_NUL_trans[yy_current_state];
01404 }
01405
01406 return yy_current_state;
01407 }
01408
01409
01410
01411
01412
01413
01414
01415
01416 #ifdef YY_USE_PROTOS
01417 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
01418 #else
01419 static yy_state_type yy_try_NUL_trans( yy_current_state )
01420 yy_state_type yy_current_state;
01421 #endif
01422 {
01423 register int yy_is_jam;
01424
01425 yy_current_state = yy_NUL_trans[yy_current_state];
01426 yy_is_jam = (yy_current_state == 0);
01427
01428 return yy_is_jam ? 0 : yy_current_state;
01429 }
01430
01431
01432 #ifndef YY_NO_UNPUT
01433 #ifdef YY_USE_PROTOS
01434 static void yyunput( int c, register char *yy_bp )
01435 #else
01436 static void yyunput( c, yy_bp )
01437 int c;
01438 register char *yy_bp;
01439 #endif
01440 {
01441 register char *yy_cp = yy_c_buf_p;
01442
01443
01444 *yy_cp = yy_hold_char;
01445
01446 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01447 {
01448
01449 register int number_to_move = yy_n_chars + 2;
01450 register char *dest = &yy_current_buffer->yy_ch_buf[
01451 yy_current_buffer->yy_buf_size + 2];
01452 register char *source =
01453 &yy_current_buffer->yy_ch_buf[number_to_move];
01454
01455 while ( source > yy_current_buffer->yy_ch_buf )
01456 *--dest = *--source;
01457
01458 yy_cp += (int) (dest - source);
01459 yy_bp += (int) (dest - source);
01460 yy_current_buffer->yy_n_chars =
01461 yy_n_chars = yy_current_buffer->yy_buf_size;
01462
01463 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01464 YY_FATAL_ERROR( "flex scanner push-back overflow" );
01465 }
01466
01467 *--yy_cp = (char) c;
01468
01469
01470 yytext_ptr = yy_bp;
01471 yy_hold_char = *yy_cp;
01472 yy_c_buf_p = yy_cp;
01473 }
01474 #endif
01475
01476
01477 #ifndef YY_NO_INPUT
01478 #ifdef __cplusplus
01479 static int yyinput()
01480 #else
01481 static int input()
01482 #endif
01483 {
01484 int c;
01485
01486 *yy_c_buf_p = yy_hold_char;
01487
01488 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
01489 {
01490
01491
01492
01493
01494 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
01495
01496 *yy_c_buf_p = '\0';
01497
01498 else
01499 {
01500 int offset = yy_c_buf_p - yytext_ptr;
01501 ++yy_c_buf_p;
01502
01503 switch ( yy_get_next_buffer() )
01504 {
01505 case EOB_ACT_LAST_MATCH:
01506
01507
01508
01509
01510
01511
01512
01513
01514
01515
01516
01517 yyrestart( yyin );
01518
01519
01520
01521 case EOB_ACT_END_OF_FILE:
01522 {
01523 if ( yywrap() )
01524 return EOF;
01525
01526 if ( ! yy_did_buffer_switch_on_eof )
01527 YY_NEW_FILE;
01528 #ifdef __cplusplus
01529 return yyinput();
01530 #else
01531 return input();
01532 #endif
01533 }
01534
01535 case EOB_ACT_CONTINUE_SCAN:
01536 yy_c_buf_p = yytext_ptr + offset;
01537 break;
01538 }
01539 }
01540 }
01541
01542 c = *(unsigned char *) yy_c_buf_p;
01543 *yy_c_buf_p = '\0';
01544 yy_hold_char = *++yy_c_buf_p;
01545
01546
01547 return c;
01548 }
01549 #endif
01550
01551 #ifdef YY_USE_PROTOS
01552 void yyrestart( FILE *input_file )
01553 #else
01554 void yyrestart( input_file )
01555 FILE *input_file;
01556 #endif
01557 {
01558 if ( ! yy_current_buffer )
01559 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
01560
01561 yy_init_buffer( yy_current_buffer, input_file );
01562 yy_load_buffer_state();
01563 }
01564
01565
01566 #ifdef YY_USE_PROTOS
01567 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
01568 #else
01569 void yy_switch_to_buffer( new_buffer )
01570 YY_BUFFER_STATE new_buffer;
01571 #endif
01572 {
01573 if ( yy_current_buffer == new_buffer )
01574 return;
01575
01576 if ( yy_current_buffer )
01577 {
01578
01579 *yy_c_buf_p = yy_hold_char;
01580 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
01581 yy_current_buffer->yy_n_chars = yy_n_chars;
01582 }
01583
01584 yy_current_buffer = new_buffer;
01585 yy_load_buffer_state();
01586
01587
01588
01589
01590
01591
01592 yy_did_buffer_switch_on_eof = 1;
01593 }
01594
01595
01596 #ifdef YY_USE_PROTOS
01597 void yy_load_buffer_state( void )
01598 #else
01599 void yy_load_buffer_state()
01600 #endif
01601 {
01602 yy_n_chars = yy_current_buffer->yy_n_chars;
01603 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
01604 yyin = yy_current_buffer->yy_input_file;
01605 yy_hold_char = *yy_c_buf_p;
01606 }
01607
01608
01609 #ifdef YY_USE_PROTOS
01610 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
01611 #else
01612 YY_BUFFER_STATE yy_create_buffer( file, size )
01613 FILE *file;
01614 int size;
01615 #endif
01616 {
01617 YY_BUFFER_STATE b;
01618
01619 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
01620 if ( ! b )
01621 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01622
01623 b->yy_buf_size = size;
01624
01625
01626
01627
01628 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
01629 if ( ! b->yy_ch_buf )
01630 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01631
01632 b->yy_is_our_buffer = 1;
01633
01634 yy_init_buffer( b, file );
01635
01636 return b;
01637 }
01638
01639
01640 #ifdef YY_USE_PROTOS
01641 void yy_delete_buffer( YY_BUFFER_STATE b )
01642 #else
01643 void yy_delete_buffer( b )
01644 YY_BUFFER_STATE b;
01645 #endif
01646 {
01647 if ( ! b )
01648 return;
01649
01650 if ( b == yy_current_buffer )
01651 yy_current_buffer = (YY_BUFFER_STATE) 0;
01652
01653 if ( b->yy_is_our_buffer )
01654 yy_flex_free( (void *) b->yy_ch_buf );
01655
01656 yy_flex_free( (void *) b );
01657 }
01658
01659
01660
01661 #ifdef YY_USE_PROTOS
01662 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
01663 #else
01664 void yy_init_buffer( b, file )
01665 YY_BUFFER_STATE b;
01666 FILE *file;
01667 #endif
01668
01669
01670 {
01671 yy_flush_buffer( b );
01672
01673 b->yy_input_file = file;
01674 b->yy_fill_buffer = 1;
01675
01676 #if YY_ALWAYS_INTERACTIVE
01677 b->yy_is_interactive = 1;
01678 #else
01679 #if YY_NEVER_INTERACTIVE
01680 b->yy_is_interactive = 0;
01681 #else
01682 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
01683 #endif
01684 #endif
01685 }
01686
01687
01688 #ifdef YY_USE_PROTOS
01689 void yy_flush_buffer( YY_BUFFER_STATE b )
01690 #else
01691 void yy_flush_buffer( b )
01692 YY_BUFFER_STATE b;
01693 #endif
01694
01695 {
01696 if ( ! b )
01697 return;
01698
01699 b->yy_n_chars = 0;
01700
01701
01702
01703
01704
01705 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
01706 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
01707
01708 b->yy_buf_pos = &b->yy_ch_buf[0];
01709
01710 b->yy_at_bol = 1;
01711 b->yy_buffer_status = YY_BUFFER_NEW;
01712
01713 if ( b == yy_current_buffer )
01714 yy_load_buffer_state();
01715 }
01716
01717
01718 #ifndef YY_NO_SCAN_BUFFER
01719 #ifdef YY_USE_PROTOS
01720 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
01721 #else
01722 YY_BUFFER_STATE yy_scan_buffer( base, size )
01723 char *base;
01724 yy_size_t size;
01725 #endif
01726 {
01727 YY_BUFFER_STATE b;
01728
01729 if ( size < 2 ||
01730 base[size-2] != YY_END_OF_BUFFER_CHAR ||
01731 base[size-1] != YY_END_OF_BUFFER_CHAR )
01732
01733 return 0;
01734
01735 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
01736 if ( ! b )
01737 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
01738
01739 b->yy_buf_size = size - 2;
01740 b->yy_buf_pos = b->yy_ch_buf = base;
01741 b->yy_is_our_buffer = 0;
01742 b->yy_input_file = 0;
01743 b->yy_n_chars = b->yy_buf_size;
01744 b->yy_is_interactive = 0;
01745 b->yy_at_bol = 1;
01746 b->yy_fill_buffer = 0;
01747 b->yy_buffer_status = YY_BUFFER_NEW;
01748
01749 yy_switch_to_buffer( b );
01750
01751 return b;
01752 }
01753 #endif
01754
01755
01756 #ifndef YY_NO_SCAN_STRING
01757 #ifdef YY_USE_PROTOS
01758 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
01759 #else
01760 YY_BUFFER_STATE yy_scan_string( yy_str )
01761 yyconst char *yy_str;
01762 #endif
01763 {
01764 int len;
01765 for ( len = 0; yy_str[len]; ++len )
01766 ;
01767
01768 return yy_scan_bytes( yy_str, len );
01769 }
01770 #endif
01771
01772
01773 #ifndef YY_NO_SCAN_BYTES
01774 #ifdef YY_USE_PROTOS
01775 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
01776 #else
01777 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
01778 yyconst char *bytes;
01779 int len;
01780 #endif
01781 {
01782 YY_BUFFER_STATE b;
01783 char *buf;
01784 yy_size_t n;
01785 int i;
01786
01787
01788 n = len + 2;
01789 buf = (char *) yy_flex_alloc( n );
01790 if ( ! buf )
01791 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
01792
01793 for ( i = 0; i < len; ++i )
01794 buf[i] = bytes[i];
01795
01796 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
01797
01798 b = yy_scan_buffer( buf, n );
01799 if ( ! b )
01800 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
01801
01802
01803
01804
01805 b->yy_is_our_buffer = 1;
01806
01807 return b;
01808 }
01809 #endif
01810
01811
01812 #ifndef YY_NO_PUSH_STATE
01813 #ifdef YY_USE_PROTOS
01814 static void yy_push_state( int new_state )
01815 #else
01816 static void yy_push_state( new_state )
01817 int new_state;
01818 #endif
01819 {
01820 if ( yy_start_stack_ptr >= yy_start_stack_depth )
01821 {
01822 yy_size_t new_size;
01823
01824 yy_start_stack_depth += YY_START_STACK_INCR;
01825 new_size = yy_start_stack_depth * sizeof( int );
01826
01827 if ( ! yy_start_stack )
01828 yy_start_stack = (int *) yy_flex_alloc( new_size );
01829
01830 else
01831 yy_start_stack = (int *) yy_flex_realloc(
01832 (void *) yy_start_stack, new_size );
01833
01834 if ( ! yy_start_stack )
01835 YY_FATAL_ERROR(
01836 "out of memory expanding start-condition stack" );
01837 }
01838
01839 yy_start_stack[yy_start_stack_ptr++] = YY_START;
01840
01841 BEGIN(new_state);
01842 }
01843 #endif
01844
01845
01846 #ifndef YY_NO_POP_STATE
01847 static void yy_pop_state()
01848 {
01849 if ( --yy_start_stack_ptr < 0 )
01850 YY_FATAL_ERROR( "start-condition stack underflow" );
01851
01852 BEGIN(yy_start_stack[yy_start_stack_ptr]);
01853 }
01854 #endif
01855
01856
01857 #ifndef YY_NO_TOP_STATE
01858 static int yy_top_state()
01859 {
01860 return yy_start_stack[yy_start_stack_ptr - 1];
01861 }
01862 #endif
01863
01864 #ifndef YY_EXIT_FAILURE
01865 #define YY_EXIT_FAILURE 2
01866 #endif
01867
01868 #ifdef YY_USE_PROTOS
01869 static void yy_fatal_error( yyconst char msg[] )
01870 #else
01871 static void yy_fatal_error( msg )
01872 char msg[];
01873 #endif
01874 {
01875 (void) fprintf( stderr, "%s\n", msg );
01876 exit( YY_EXIT_FAILURE );
01877 }
01878
01879
01880
01881
01882
01883 #undef yyless
01884 #define yyless(n) \
01885 do \
01886 { \
01887 \
01888 yytext[yyleng] = yy_hold_char; \
01889 yy_c_buf_p = yytext + n; \
01890 yy_hold_char = *yy_c_buf_p; \
01891 *yy_c_buf_p = '\0'; \
01892 yyleng = n; \
01893 } \
01894 while ( 0 )
01895
01896
01897
01898
01899 #ifndef yytext_ptr
01900 #ifdef YY_USE_PROTOS
01901 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
01902 #else
01903 static void yy_flex_strncpy( s1, s2, n )
01904 char *s1;
01905 yyconst char *s2;
01906 int n;
01907 #endif
01908 {
01909 register int i;
01910 for ( i = 0; i < n; ++i )
01911 s1[i] = s2[i];
01912 }
01913 #endif
01914
01915 #ifdef YY_NEED_STRLEN
01916 #ifdef YY_USE_PROTOS
01917 static int yy_flex_strlen( yyconst char *s )
01918 #else
01919 static int yy_flex_strlen( s )
01920 yyconst char *s;
01921 #endif
01922 {
01923 register int n;
01924 for ( n = 0; s[n]; ++n )
01925 ;
01926
01927 return n;
01928 }
01929 #endif
01930
01931
01932 #ifdef YY_USE_PROTOS
01933 static void *yy_flex_alloc( yy_size_t size )
01934 #else
01935 static void *yy_flex_alloc( size )
01936 yy_size_t size;
01937 #endif
01938 {
01939 void * temp = (void *) malloc( size );
01940
01941 checkAllocatedPointer((void *) temp);
01942 return temp;
01943 }
01944
01945 #ifdef YY_USE_PROTOS
01946 static void *yy_flex_realloc( void *ptr, yy_size_t size )
01947 #else
01948 static void *yy_flex_realloc( ptr, size )
01949 void *ptr;
01950 yy_size_t size;
01951 #endif
01952 {
01953
01954
01955
01956
01957
01958
01959
01960 return (void *) realloc( (char *) ptr, size );
01961 }
01962
01963 #ifdef YY_USE_PROTOS
01964 static void yy_flex_free( void *ptr )
01965 #else
01966 static void yy_flex_free( ptr )
01967 void *ptr;
01968 #endif
01969 {
01970 free( ptr );
01971 }
01972
01973 #if YY_MAIN
01974 int main()
01975 {
01976 yylex();
01977 return 0;
01978 }
01979 #endif
01980 #line 217 "pomdp_spec.l"
01981
01982
01983
01984
01985 int yywrap(void)
01986 {
01987 return (1);
01988 }
01989
01990
01991
01992
01993
01994
01995