#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 39
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 0
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#define YY_LESS_LINENO(n)
#define YY_LINENO_REWIND_TO(ptr)
-
+
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- yy_size_t yy_n_chars;
+ int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
/* yy_hold_char holds the character lost when xbt_automaton_parser_text is formed. */
static char yy_hold_char;
-static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
yy_size_t xbt_automaton_parser_leng;
/* Points to current character in buffer. */
/* Begin user sect3 */
-#define xbt_automaton_parser_wrap() 1
+#define xbt_automaton_parser_wrap() (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
int xbt_automaton_parser_lineno = 1;
extern char *xbt_automaton_parser_text;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
#define yytext_ptr xbt_automaton_parser_text
static yy_state_type yy_get_previous_state (void );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
static int yy_get_next_buffer (void );
+#if defined(__GNUC__) && __GNUC__ >= 3
+__attribute__((__noreturn__))
+#endif
static void yy_fatal_error (yyconst char msg[] );
/* Done after the current pattern has been matched and before the
22, 1, 0
} ;
-static yyconst flex_int32_t yy_ec[256] =
+static yyconst YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[34] =
+static yyconst YY_CHAR yy_meta[34] =
{ 0,
1, 1, 2, 2, 1, 2, 1, 1, 1, 1,
1, 1, 3, 4, 4, 1, 1, 1, 4, 2,
1, 1, 1
} ;
-static yyconst flex_int16_t yy_base[57] =
+static yyconst flex_uint16_t yy_base[57] =
{ 0,
0, 0, 89, 90, 32, 90, 90, 34, 81, 90,
90, 69, 76, 27, 31, 69, 90, 0, 59, 56,
55, 55, 0, 53, 53, 53
} ;
-static yyconst flex_int16_t yy_nxt[124] =
+static yyconst flex_uint16_t yy_nxt[124] =
{ 0,
4, 5, 6, 5, 7, 8, 9, 10, 11, 4,
12, 4, 13, 14, 15, 16, 17, 4, 18, 4,
* under the terms of the license (GNU LGPL) which comes with this package. */
#line 10 "parserPromela.lex"
+#include "simgrid_config.h"
+#if !HAVE_UNISTD_H
+#define YY_NO_UNISTD_H /* hello Windows */
+#endif
#include <stdio.h>
#include "parserPromela.tab.hacc"
-
+
extern YYSTYPE yylval;
-
-#line 538 "automaton_lexer.yy.c"
+
+#line 548 "automaton_lexer.yy.c"
#define INITIAL 0
FILE *xbt_automaton_parser_get_in (void );
-void xbt_automaton_parser_set_in (FILE * in_str );
+void xbt_automaton_parser_set_in (FILE * _in_str );
FILE *xbt_automaton_parser_get_out (void );
-void xbt_automaton_parser_set_out (FILE * out_str );
+void xbt_automaton_parser_set_out (FILE * _out_str );
yy_size_t xbt_automaton_parser_get_leng (void );
int xbt_automaton_parser_get_lineno (void );
-void xbt_automaton_parser_set_lineno (int line_number );
+void xbt_automaton_parser_set_lineno (int _line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
#endif
#endif
+#ifndef YY_NO_UNPUT
+
static void yyunput (int c,char *buf_ptr );
+
+#endif
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK break;
+#define YY_BREAK /*LINTED*/break;
#endif
#define YY_RULE_SETUP \
yy_state_type yy_current_state;
char *yy_cp, *yy_bp;
int yy_act;
-
+
if ( !(yy_init) )
{
(yy_init) = 1;
}
{
-#line 34 "parserPromela.lex"
+#line 38 "parserPromela.lex"
-#line 755 "automaton_lexer.yy.c"
+#line 769 "automaton_lexer.yy.c"
- while ( 1 ) /* loops until end-of-file is reached */
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
case 1:
YY_RULE_SETUP
-#line 36 "parserPromela.lex"
+#line 40 "parserPromela.lex"
{ return (NEVER); }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 37 "parserPromela.lex"
+#line 41 "parserPromela.lex"
{ return (IF); }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 38 "parserPromela.lex"
+#line 42 "parserPromela.lex"
{ return (FI); }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 39 "parserPromela.lex"
+#line 43 "parserPromela.lex"
{ return (IMPLIES); }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 40 "parserPromela.lex"
+#line 44 "parserPromela.lex"
{ return (GOTO); }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 41 "parserPromela.lex"
+#line 45 "parserPromela.lex"
{ return (AND); }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 42 "parserPromela.lex"
+#line 46 "parserPromela.lex"
{ return (OR); }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 43 "parserPromela.lex"
+#line 47 "parserPromela.lex"
{ return (NOT); }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 44 "parserPromela.lex"
+#line 48 "parserPromela.lex"
{ return (LEFT_PAR); }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 45 "parserPromela.lex"
+#line 49 "parserPromela.lex"
{ return (RIGHT_PAR); }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 46 "parserPromela.lex"
+#line 50 "parserPromela.lex"
{ return (CASE); }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 47 "parserPromela.lex"
+#line 51 "parserPromela.lex"
{ return (COLON); }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 48 "parserPromela.lex"
+#line 52 "parserPromela.lex"
{ return (SEMI_COLON); }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 49 "parserPromela.lex"
+#line 53 "parserPromela.lex"
{ return (CASE_TRUE); }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 50 "parserPromela.lex"
+#line 54 "parserPromela.lex"
{ return (LEFT_BRACE); }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 51 "parserPromela.lex"
+#line 55 "parserPromela.lex"
{ return (RIGHT_BRACE); }
YY_BREAK
case 17:
/* rule 17 can match eol */
YY_RULE_SETUP
-#line 54 "parserPromela.lex"
+#line 58 "parserPromela.lex"
{ }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 56 "parserPromela.lex"
+#line 60 "parserPromela.lex"
{ }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 59 "parserPromela.lex"
-{ sscanf(xbt_automaton_parser_text,"%lf",&yylval.real);
+#line 63 "parserPromela.lex"
+{ sscanf(xbt_automaton_parser_text,"%lf",&yylval.real);
return (LITT_REEL); }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 62 "parserPromela.lex"
-{ sscanf(xbt_automaton_parser_text,"%d",&yylval.integer);
+#line 66 "parserPromela.lex"
+{ sscanf(xbt_automaton_parser_text,"%d",&yylval.integer);
return (LITT_ENT); }
YY_BREAK
case 21:
/* rule 21 can match eol */
YY_RULE_SETUP
-#line 65 "parserPromela.lex"
+#line 69 "parserPromela.lex"
{ yylval.string=(char *)malloc(strlen(xbt_automaton_parser_text)+1);
- sscanf(xbt_automaton_parser_text,"%s",yylval.string);
+ sscanf(xbt_automaton_parser_text,"%s",yylval.string);
return (LITT_CHAINE); }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 69 "parserPromela.lex"
+#line 73 "parserPromela.lex"
{ yylval.string=(char *)malloc(strlen(xbt_automaton_parser_text)+1);
sscanf(xbt_automaton_parser_text,"%s",yylval.string);
return (ID); }
case 23:
/* rule 23 can match eol */
YY_RULE_SETUP
-#line 73 "parserPromela.lex"
+#line 77 "parserPromela.lex"
{ }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 75 "parserPromela.lex"
+#line 79 "parserPromela.lex"
{ }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 77 "parserPromela.lex"
+#line 81 "parserPromela.lex"
ECHO;
YY_BREAK
-#line 946 "automaton_lexer.yy.c"
+#line 960 "automaton_lexer.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
{
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
char *source = (yytext_ptr);
- int number_to_move, i;
+ yy_size_t number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+ number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) xbt_automaton_parser_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
{
yy_state_type yy_current_state;
char *yy_cp;
-
+
yy_current_state = (yy_start);
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
return yy_is_jam ? 0 : yy_current_state;
}
+#ifndef YY_NO_UNPUT
+
static void yyunput (int c, char * yy_bp )
{
char *yy_cp;
-
+
yy_cp = (yy_c_buf_p);
/* undo effects of setting up xbt_automaton_parser_text */
(yy_c_buf_p) = yy_cp;
}
+#endif
+
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (void)
{
int c;
-
+
*(yy_c_buf_p) = (yy_hold_char);
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
/** Immediately switch to a different input stream.
* @param input_file A readable stream.
- *
+ *
* @note This function does not reset the start condition to @c INITIAL .
*/
void xbt_automaton_parser_restart (FILE * input_file )
{
-
+
if ( ! YY_CURRENT_BUFFER ){
xbt_automaton_parser_ensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
- *
+ *
*/
void xbt_automaton_parser__switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
-
+
/* TODO. We should be able to replace this entire function body
* with
* xbt_automaton_parser_pop_buffer_state();
/** Allocate and initialize an input buffer state.
* @param file A readable stream.
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- *
+ *
* @return the allocated buffer state.
*/
YY_BUFFER_STATE xbt_automaton_parser__create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
-
+
b = (YY_BUFFER_STATE) xbt_automaton_parser_alloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in xbt_automaton_parser__create_buffer()" );
- b->yy_buf_size = size;
+ b->yy_buf_size = (yy_size_t)size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
/** Destroy the buffer.
* @param b a buffer created with xbt_automaton_parser__create_buffer()
- *
+ *
*/
void xbt_automaton_parser__delete_buffer (YY_BUFFER_STATE b )
{
-
+
if ( ! b )
return;
{
int oerrno = errno;
-
+
xbt_automaton_parser__flush_buffer(b );
b->yy_input_file = file;
}
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-
+
errno = oerrno;
}
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- *
+ *
*/
void xbt_automaton_parser__flush_buffer (YY_BUFFER_STATE b )
{
* the current state. This function will allocate the stack
* if necessary.
* @param new_buffer The new state.
- *
+ *
*/
void xbt_automaton_parser_push_buffer_state (YY_BUFFER_STATE new_buffer )
{
/** Removes and deletes the top of the stack, if present.
* The next element becomes the new top.
- *
+ *
*/
void xbt_automaton_parser_pop_buffer_state (void)
{
static void xbt_automaton_parser_ensure_buffer_stack (void)
{
yy_size_t num_to_alloc;
-
+
if (!(yy_buffer_stack)) {
/* First allocation is just for 2 elements, since we don't know if this
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
- num_to_alloc = 1;
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
(yy_buffer_stack) = (struct yy_buffer_state**)xbt_automaton_parser_alloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
YY_FATAL_ERROR( "out of dynamic memory in xbt_automaton_parser_ensure_buffer_stack()" );
-
+
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
/* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
(yy_buffer_stack) = (struct yy_buffer_state**)xbt_automaton_parser_realloc
/** Setup the input buffer state to scan directly from a user-specified character buffer.
* @param base the character buffer
* @param size the size in bytes of the character buffer
- *
- * @return the newly allocated buffer state object.
+ *
+ * @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE xbt_automaton_parser__scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
-
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/** Setup the input buffer state to scan a string. The next call to xbt_automaton_parser_lex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
- *
+ *
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
* xbt_automaton_parser__scan_bytes() instead.
*/
YY_BUFFER_STATE xbt_automaton_parser__scan_string (yyconst char * yystr )
{
-
+
return xbt_automaton_parser__scan_bytes(yystr,strlen(yystr) );
}
* scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
- *
+ *
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE xbt_automaton_parser__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
char *buf;
yy_size_t n;
yy_size_t i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
buf = (char *) xbt_automaton_parser_alloc(n );
static void yy_fatal_error (yyconst char* msg )
{
- (void) fprintf( stderr, "%s\n", msg );
+ (void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* Accessor methods (get/set functions) to struct members. */
/** Get the current line number.
- *
+ *
*/
int xbt_automaton_parser_get_lineno (void)
{
-
+
return xbt_automaton_parser_lineno;
}
/** Get the input stream.
- *
+ *
*/
FILE *xbt_automaton_parser_get_in (void)
{
}
/** Get the output stream.
- *
+ *
*/
FILE *xbt_automaton_parser_get_out (void)
{
}
/** Get the length of the current token.
- *
+ *
*/
yy_size_t xbt_automaton_parser_get_leng (void)
{
}
/** Get the current token.
- *
+ *
*/
char *xbt_automaton_parser_get_text (void)
}
/** Set the current line number.
- * @param line_number
- *
+ * @param _line_number line number
+ *
*/
-void xbt_automaton_parser_set_lineno (int line_number )
+void xbt_automaton_parser_set_lineno (int _line_number )
{
-
- xbt_automaton_parser_lineno = line_number;
+
+ xbt_automaton_parser_lineno = _line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param in_str A readable stream.
- *
+ * @param _in_str A readable stream.
+ *
* @see xbt_automaton_parser__switch_to_buffer
*/
-void xbt_automaton_parser_set_in (FILE * in_str )
+void xbt_automaton_parser_set_in (FILE * _in_str )
{
- xbt_automaton_parser_in = in_str ;
+ xbt_automaton_parser_in = _in_str ;
}
-void xbt_automaton_parser_set_out (FILE * out_str )
+void xbt_automaton_parser_set_out (FILE * _out_str )
{
- xbt_automaton_parser_out = out_str ;
+ xbt_automaton_parser_out = _out_str ;
}
int xbt_automaton_parser_get_debug (void)
return xbt_automaton_parser__flex_debug;
}
-void xbt_automaton_parser_set_debug (int bdebug )
+void xbt_automaton_parser_set_debug (int _bdebug )
{
- xbt_automaton_parser__flex_debug = bdebug ;
+ xbt_automaton_parser__flex_debug = _bdebug ;
}
static int yy_init_globals (void)
/* xbt_automaton_parser_lex_destroy is for both reentrant and non-reentrant scanners. */
int xbt_automaton_parser_lex_destroy (void)
{
-
+
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
xbt_automaton_parser__delete_buffer(YY_CURRENT_BUFFER );
#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
{
+
int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
void *xbt_automaton_parser_alloc (yy_size_t size )
{
- return (void *) malloc( size );
+ return (void *) malloc( size );
}
void *xbt_automaton_parser_realloc (void * ptr, yy_size_t size )
{
+
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
void xbt_automaton_parser_free (void * ptr )
{
- free( (char *) ptr ); /* see xbt_automaton_parser_realloc() for (char *) cast */
+ free( (char *) ptr ); /* see xbt_automaton_parser_realloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
-#line 76 "parserPromela.lex"
+#line 81 "parserPromela.lex"