#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_SUBMINOR_VERSION 39
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
-extern int xbt_automaton_parser_leng;
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern yy_size_t xbt_automaton_parser_leng;
extern FILE *xbt_automaton_parser_in, *xbt_automaton_parser_out;
#define EOB_ACT_LAST_MATCH 2
#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) \
#define unput(c) yyunput( c, (yytext_ptr) )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t 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
/* yy_hold_char holds the character lost when xbt_automaton_parser_text is formed. */
static char yy_hold_char;
-static int yy_n_chars; /* number of characters read into yy_ch_buf */
-int xbt_automaton_parser_leng;
+static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
+yy_size_t xbt_automaton_parser_leng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
YY_BUFFER_STATE xbt_automaton_parser__scan_buffer (char *base,yy_size_t size );
YY_BUFFER_STATE xbt_automaton_parser__scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE xbt_automaton_parser__scan_bytes (yyconst char *bytes,int len );
+YY_BUFFER_STATE xbt_automaton_parser__scan_bytes (yyconst char *bytes,yy_size_t len );
void *xbt_automaton_parser_alloc (yy_size_t );
void *xbt_automaton_parser_realloc (void *,yy_size_t );
/* Begin user sect3 */
-#define xbt_automaton_parser_wrap(n) 1
+#define xbt_automaton_parser_wrap() 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
#define YY_RESTORE_YY_MORE_OFFSET
char *xbt_automaton_parser_text;
#line 1 "parserPromela.lex"
-#line 4 "parserPromela.lex"
+/* Copyright (c) 2012, 2014. The SimGrid Team.
+ * All rights reserved. */
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+#line 10 "parserPromela.lex"
#include <stdio.h>
extern YYSTYPE yylval;
-#line 533 "automaton_lexer.yy.c"
+#line 538 "automaton_lexer.yy.c"
#define INITIAL 0
void xbt_automaton_parser_set_out (FILE * out_str );
-int xbt_automaton_parser_get_leng (void );
+yy_size_t xbt_automaton_parser_get_leng (void );
char *xbt_automaton_parser_get_text (void );
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 28 "parserPromela.lex"
-
-
-#line 723 "automaton_lexer.yy.c"
-
if ( !(yy_init) )
{
(yy_init) = 1;
xbt_automaton_parser__load_buffer_state( );
}
+ {
+#line 34 "parserPromela.lex"
+
+
+#line 755 "automaton_lexer.yy.c"
+
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
case 1:
YY_RULE_SETUP
-#line 30 "parserPromela.lex"
-{ printf("%s", xbt_automaton_parser_text); return (NEVER); }
+#line 36 "parserPromela.lex"
+{ return (NEVER); }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 31 "parserPromela.lex"
-{ printf("%s", xbt_automaton_parser_text); return (IF); }
+#line 37 "parserPromela.lex"
+{ return (IF); }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 32 "parserPromela.lex"
-{ printf("%s", xbt_automaton_parser_text);
- return (FI); }
+#line 38 "parserPromela.lex"
+{ return (FI); }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 34 "parserPromela.lex"
-{ printf("%s", xbt_automaton_parser_text); return (IMPLIES); }
+#line 39 "parserPromela.lex"
+{ return (IMPLIES); }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 35 "parserPromela.lex"
-{ printf("%s", xbt_automaton_parser_text); return (GOTO); }
+#line 40 "parserPromela.lex"
+{ return (GOTO); }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 36 "parserPromela.lex"
-{ printf("%s", xbt_automaton_parser_text); return (AND); }
+#line 41 "parserPromela.lex"
+{ return (AND); }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 37 "parserPromela.lex"
-{ printf("%s", xbt_automaton_parser_text); return (OR); }
+#line 42 "parserPromela.lex"
+{ return (OR); }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 38 "parserPromela.lex"
-{ printf("%s", xbt_automaton_parser_text); return (NOT); }
+#line 43 "parserPromela.lex"
+{ return (NOT); }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 39 "parserPromela.lex"
-{ printf("%s", xbt_automaton_parser_text); return (LEFT_PAR); }
+#line 44 "parserPromela.lex"
+{ return (LEFT_PAR); }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 40 "parserPromela.lex"
-{ printf("%s", xbt_automaton_parser_text); return (RIGHT_PAR); }
+#line 45 "parserPromela.lex"
+{ return (RIGHT_PAR); }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 41 "parserPromela.lex"
-{ printf("%s", xbt_automaton_parser_text); return (CASE); }
+#line 46 "parserPromela.lex"
+{ return (CASE); }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 42 "parserPromela.lex"
-{ printf("%s", xbt_automaton_parser_text); return (COLON); }
+#line 47 "parserPromela.lex"
+{ return (COLON); }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 43 "parserPromela.lex"
-{ printf("%s", xbt_automaton_parser_text); return (SEMI_COLON); }
+#line 48 "parserPromela.lex"
+{ return (SEMI_COLON); }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 44 "parserPromela.lex"
-{ printf("%s", xbt_automaton_parser_text); return (CASE_TRUE); }
+#line 49 "parserPromela.lex"
+{ return (CASE_TRUE); }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 45 "parserPromela.lex"
-{ printf("%s", xbt_automaton_parser_text); return (LEFT_BRACE); }
+#line 50 "parserPromela.lex"
+{ return (LEFT_BRACE); }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 46 "parserPromela.lex"
-{ printf("%s", xbt_automaton_parser_text); return (RIGHT_BRACE); }
+#line 51 "parserPromela.lex"
+{ return (RIGHT_BRACE); }
YY_BREAK
case 17:
/* rule 17 can match eol */
YY_RULE_SETUP
-#line 49 "parserPromela.lex"
-{ printf(" ");}
+#line 54 "parserPromela.lex"
+{ }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 51 "parserPromela.lex"
-{ printf("%s",xbt_automaton_parser_text); }
+#line 56 "parserPromela.lex"
+{ }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 54 "parserPromela.lex"
-{ printf("%s",xbt_automaton_parser_text);
- sscanf(xbt_automaton_parser_text,"%lf",&yylval.real);
+#line 59 "parserPromela.lex"
+{ sscanf(xbt_automaton_parser_text,"%lf",&yylval.real);
return (LITT_REEL); }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 58 "parserPromela.lex"
-{ printf("%s",xbt_automaton_parser_text);
- sscanf(xbt_automaton_parser_text,"%d",&yylval.integer);
+#line 62 "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 62 "parserPromela.lex"
-{ printf("%s",xbt_automaton_parser_text);
- yylval.string=(char *)malloc(strlen(xbt_automaton_parser_text)+1);
+#line 65 "parserPromela.lex"
+{ yylval.string=(char *)malloc(strlen(xbt_automaton_parser_text)+1);
sscanf(xbt_automaton_parser_text,"%s",yylval.string);
return (LITT_CHAINE); }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 67 "parserPromela.lex"
-{ printf("%s",xbt_automaton_parser_text);
- yylval.string=(char *)malloc(strlen(xbt_automaton_parser_text)+1);
- sscanf(xbt_automaton_parser_text,"%s",yylval.string);
- return (ID); }
+#line 69 "parserPromela.lex"
+{ yylval.string=(char *)malloc(strlen(xbt_automaton_parser_text)+1);
+ sscanf(xbt_automaton_parser_text,"%s",yylval.string);
+ return (ID); }
YY_BREAK
case 23:
/* rule 23 can match eol */
YY_RULE_SETUP
-#line 72 "parserPromela.lex"
-{ printf("\n"); }
+#line 73 "parserPromela.lex"
+{ }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 74 "parserPromela.lex"
-{ printf("caractère inconnu\n"); }
+#line 75 "parserPromela.lex"
+{ }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 76 "parserPromela.lex"
+#line 77 "parserPromela.lex"
ECHO;
YY_BREAK
-#line 945 "automaton_lexer.yy.c"
+#line 946 "automaton_lexer.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
+ } /* end of user's declarations */
} /* end of xbt_automaton_parser_lex */
/* yy_get_next_buffer - try to read in a new buffer
else
{
- int num_to_read =
+ yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) ((yy_c_buf_p) - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
- int new_size = b->yy_buf_size * 2;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), (size_t) num_to_read );
+ (yy_n_chars), num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 53);
- return yy_is_jam ? 0 : yy_current_state;
+ return yy_is_jam ? 0 : yy_current_state;
}
static void yyunput (int c, register char * yy_bp )
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register int number_to_move = (yy_n_chars) + 2;
+ register yy_size_t number_to_move = (yy_n_chars) + 2;
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
register char *source =
else
{ /* need more input */
- int offset = (yy_c_buf_p) - (yytext_ptr);
+ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
xbt_automaton_parser_free((void *) b );
}
-#ifndef __cplusplus
-extern int isatty (int );
-#endif /* __cplusplus */
-
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a xbt_automaton_parser_restart() or at EOF.
*/
static void xbt_automaton_parser_ensure_buffer_stack (void)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
if (!(yy_buffer_stack)) {
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE xbt_automaton_parser__scan_bytes (yyconst char * yybytes, int _yybytes_len )
+YY_BUFFER_STATE xbt_automaton_parser__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
- int i;
+ yy_size_t i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
/** Get the length of the current token.
*
*/
-int xbt_automaton_parser_get_leng (void)
+yy_size_t xbt_automaton_parser_get_leng (void)
{
return xbt_automaton_parser_leng;
}
#define YYTABLES_NAME "yytables"
-#line 76 "parserPromela.lex"
+#line 77 "parserPromela.lex"