summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp')
-rw-r--r--src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp1271
1 files changed, 661 insertions, 610 deletions
diff --git a/src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp b/src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp
index 1f2fd72..96e44f7 100644
--- a/src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp
+++ b/src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp
@@ -1,6 +1,3 @@
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-register"
-
#line 2 "promela.lex.yy.cpp"
#line 4 "promela.lex.yy.cpp"
@@ -19,8 +16,8 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 1
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -74,7 +71,6 @@ typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
-typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
@@ -82,7 +78,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -113,6 +108,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
/* %endif */
@@ -120,25 +117,13 @@ typedef unsigned int flex_uint32_t;
/* %if-c++-only */
/* %endif */
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#endif
/* %not-for-header */
@@ -204,7 +189,15 @@ typedef void* yyscan_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -242,11 +235,18 @@ typedef size_t yy_size_t;
*/
#define YY_LESS_LINENO(n) \
do { \
- yy_size_t yyl;\
+ int yyl;\
for ( yyl = n; yyl < yyleng; ++yyl )\
if ( yytext[yyl] == '\n' )\
--yylineno;\
}while(0)
+#define YY_LINENO_REWIND_TO(dst) \
+ do {\
+ const char *p;\
+ for ( p = yy_cp-1; p >= (dst); --p)\
+ if ( *p == '\n' )\
+ --yylineno;\
+ }while(0)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
@@ -280,12 +280,12 @@ struct yy_buffer_state {
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* 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
@@ -382,7 +382,7 @@ static void promela__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscann
YY_BUFFER_STATE promela__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE promela__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE promela__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
+YY_BUFFER_STATE promela__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
/* %endif */
@@ -416,7 +416,7 @@ void promela_free (void * ,yyscan_t yyscanner );
/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
-#define promela_wrap(n) 1
+#define promela_wrap(yyscanner) (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
#define FLEX_DEBUG
@@ -427,12 +427,14 @@ typedef int yy_state_type;
#define yytext_ptr yytext_r
+/* %% [1.5] DFA */
+
/* %if-c-only Standard (non-C++) definition */
static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
static int yy_get_next_buffer (yyscan_t yyscanner );
-static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
+static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner );
/* %endif */
@@ -442,40 +444,41 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
#define YY_DO_BEFORE_ACTION \
yyg->yytext_ptr = yy_bp; \
/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
- yyleng = (yy_size_t) (yy_cp - yy_bp); \
+ yyleng = (int) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
yyg->yy_c_buf_p = yy_cp;
/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
-#define YY_NUM_RULES 46
-#define YY_END_OF_BUFFER 47
+#define YY_NUM_RULES 47
+#define YY_END_OF_BUFFER 48
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info {
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[126] = {
+static yyconst flex_int16_t yy_accept[132] = {
0,
- 0, 0, 47, 45, 44, 44, 8, 45, 14, 25,
- 45, 33, 34, 12, 15, 31, 16, 30, 13, 42,
- 32, 21, 39, 22, 43, 43, 35, 36, 26, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 37,
- 27, 38, 9, 44, 23, 0, 40, 0, 28, 0,
- 41, 0, 10, 11, 0, 42, 17, 19, 24, 20,
- 18, 43, 0, 0, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 29, 0, 41, 0, 0, 0, 43, 43, 2, 43,
- 43, 43, 3, 43, 43, 43, 43, 43, 43, 43,
-
- 43, 0, 1, 43, 43, 43, 43, 43, 4, 43,
- 43, 43, 1, 43, 43, 43, 43, 43, 7, 5,
- 43, 43, 6, 43, 0
+ 0, 0, 48, 46, 45, 45, 9, 46, 15, 26,
+ 46, 34, 35, 13, 16, 32, 17, 31, 14, 43,
+ 33, 22, 40, 23, 44, 44, 36, 37, 27, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 38, 28, 39, 10, 45, 24, 0, 41, 0, 29,
+ 0, 42, 0, 11, 12, 0, 43, 18, 20, 25,
+ 21, 19, 44, 0, 0, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 30, 0, 42, 0, 0, 0, 44, 44,
+ 2, 44, 44, 44, 3, 44, 44, 44, 44, 44,
+
+ 44, 44, 44, 44, 0, 1, 44, 44, 44, 44,
+ 44, 44, 4, 44, 44, 44, 1, 44, 44, 44,
+ 44, 44, 44, 7, 5, 8, 44, 44, 6, 44,
+ 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,
@@ -507,7 +510,7 @@ static yyconst flex_int32_t yy_ec[256] = {
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[51] = {
+static yyconst YY_CHAR yy_meta[51] = {
0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 2, 1, 1, 1,
@@ -516,72 +519,74 @@ static yyconst flex_int32_t yy_meta[51] = {
2, 2, 2, 2, 2, 2, 1, 1, 1, 1
} ;
-static yyconst flex_int16_t yy_base[131] = {
+static yyconst flex_uint16_t yy_base[137] = {
0,
- 0, 0, 172, 173, 49, 51, 151, 50, 173, 163,
- 48, 173, 173, 173, 157, 173, 154, 173, 156, 149,
- 173, 38, 145, 39, 0, 56, 173, 173, 173, 20,
- 31, 136, 124, 131, 117, 118, 34, 30, 120, 173,
- 110, 173, 173, 77, 173, 57, 173, 154, 173, 59,
- 173, 66, 173, 173, 145, 138, 173, 173, 173, 173,
- 173, 0, 76, 75, 111, 109, 108, 111, 106, 112,
- 104, 108, 100, 110, 104, 108, 100, 96, 99, 96,
- 173, 77, 78, 84, 127, 77, 106, 96, 0, 98,
- 103, 90, 0, 91, 92, 88, 88, 93, 96, 95,
-
- 90, 78, 173, 82, 92, 91, 77, 76, 0, 80,
- 88, 75, 96, 62, 73, 71, 68, 59, 0, 0,
- 65, 65, 0, 65, 173, 109, 111, 88, 113, 115
+ 0, 0, 177, 178, 49, 51, 156, 50, 178, 168,
+ 48, 178, 178, 178, 162, 178, 159, 178, 161, 154,
+ 178, 38, 150, 39, 0, 56, 178, 178, 178, 20,
+ 31, 141, 129, 136, 122, 123, 133, 34, 30, 124,
+ 178, 114, 178, 178, 77, 178, 57, 178, 158, 178,
+ 59, 178, 66, 178, 178, 149, 142, 178, 178, 178,
+ 178, 178, 0, 76, 75, 115, 113, 112, 115, 110,
+ 116, 108, 112, 104, 114, 104, 107, 111, 103, 99,
+ 102, 99, 178, 77, 78, 84, 130, 77, 109, 99,
+ 0, 101, 106, 93, 0, 94, 95, 88, 90, 90,
+
+ 95, 98, 97, 92, 78, 178, 84, 94, 93, 79,
+ 80, 77, 0, 81, 89, 85, 97, 63, 74, 66,
+ 71, 68, 59, 0, 0, 0, 65, 65, 0, 65,
+ 178, 109, 111, 88, 113, 115
} ;
-static yyconst flex_int16_t yy_def[131] = {
+static yyconst flex_int16_t yy_def[137] = {
0,
- 125, 1, 125, 125, 125, 125, 125, 126, 125, 125,
- 127, 125, 125, 125, 125, 125, 125, 125, 125, 125,
- 125, 125, 125, 125, 128, 128, 125, 125, 125, 128,
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 125,
- 125, 125, 125, 125, 125, 126, 125, 126, 125, 127,
- 125, 129, 125, 125, 130, 125, 125, 125, 125, 125,
- 125, 128, 126, 127, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
- 125, 127, 127, 129, 130, 130, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
-
- 128, 130, 125, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 130, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 0, 125, 125, 125, 125, 125
+ 131, 1, 131, 131, 131, 131, 131, 132, 131, 131,
+ 133, 131, 131, 131, 131, 131, 131, 131, 131, 131,
+ 131, 131, 131, 131, 134, 134, 131, 131, 131, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 131, 131, 131, 131, 131, 131, 132, 131, 132, 131,
+ 133, 131, 135, 131, 131, 136, 131, 131, 131, 131,
+ 131, 131, 134, 132, 133, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 131, 133, 133, 135, 136, 136, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+
+ 134, 134, 134, 134, 136, 131, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 136, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 0, 131, 131, 131, 131, 131
} ;
-static yyconst flex_int16_t yy_nxt[224] = {
+static yyconst flex_uint16_t yy_nxt[229] = {
0,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 4, 28, 29, 30, 31, 25,
25, 32, 25, 25, 33, 25, 34, 35, 25, 25,
- 36, 25, 37, 38, 39, 25, 40, 41, 42, 43,
- 44, 44, 44, 44, 47, 51, 57, 58, 60, 61,
- 63, 47, 65, 64, 66, 67, 51, 75, 50, 76,
- 68, 78, 52, 83, 48, 79, 69, 77, 44, 44,
- 47, 48, 51, 52, 51, 51, 50, 102, 86, 62,
- 84, 83, 103, 113, 89, 124, 123, 122, 121, 52,
-
- 48, 52, 52, 89, 120, 119, 86, 118, 84, 46,
- 46, 50, 50, 82, 82, 85, 85, 117, 116, 89,
- 115, 89, 109, 114, 112, 111, 109, 110, 109, 108,
- 107, 106, 105, 89, 89, 89, 104, 86, 101, 100,
- 99, 98, 97, 96, 95, 94, 93, 89, 92, 91,
- 90, 89, 88, 87, 56, 86, 125, 81, 80, 74,
- 73, 72, 71, 70, 59, 56, 55, 54, 53, 49,
- 45, 125, 3, 125, 125, 125, 125, 125, 125, 125,
- 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
- 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
-
- 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
- 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
- 125, 125, 125
+ 36, 37, 38, 39, 40, 25, 41, 42, 43, 44,
+ 45, 45, 45, 45, 48, 52, 58, 59, 61, 62,
+ 64, 48, 66, 65, 67, 68, 52, 77, 51, 78,
+ 69, 80, 53, 85, 49, 81, 70, 79, 45, 45,
+ 48, 49, 52, 53, 52, 52, 51, 105, 88, 63,
+ 86, 85, 106, 117, 91, 130, 129, 128, 127, 53,
+
+ 49, 53, 53, 91, 126, 125, 124, 88, 86, 47,
+ 47, 51, 51, 84, 84, 87, 87, 123, 122, 121,
+ 91, 120, 119, 91, 113, 118, 116, 115, 113, 114,
+ 113, 112, 111, 110, 109, 108, 91, 91, 91, 107,
+ 88, 104, 103, 102, 101, 100, 99, 98, 97, 96,
+ 95, 91, 94, 93, 92, 91, 90, 89, 57, 88,
+ 131, 83, 82, 76, 75, 74, 73, 72, 71, 60,
+ 57, 56, 55, 54, 50, 46, 131, 3, 131, 131,
+ 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
+ 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
+
+ 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
+ 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
+ 131, 131, 131, 131, 131, 131, 131, 131
} ;
-static yyconst flex_int16_t yy_chk[224] = {
+static yyconst flex_int16_t yy_chk[229] = {
0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -589,42 +594,42 @@ static yyconst flex_int16_t yy_chk[224] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5, 5, 6, 6, 8, 11, 22, 22, 24, 24,
- 26, 46, 30, 26, 30, 31, 50, 37, 52, 37,
- 31, 38, 11, 52, 8, 38, 31, 37, 44, 44,
- 63, 46, 64, 50, 82, 83, 84, 86, 102, 128,
- 52, 84, 86, 102, 124, 122, 121, 118, 117, 64,
-
- 63, 82, 83, 116, 115, 114, 113, 112, 84, 126,
- 126, 127, 127, 129, 129, 130, 130, 111, 110, 108,
- 107, 106, 105, 104, 101, 100, 99, 98, 97, 96,
- 95, 94, 92, 91, 90, 88, 87, 85, 80, 79,
- 78, 77, 76, 75, 74, 73, 72, 71, 70, 69,
- 68, 67, 66, 65, 56, 55, 48, 41, 39, 36,
- 35, 34, 33, 32, 23, 20, 19, 17, 15, 10,
- 7, 3, 125, 125, 125, 125, 125, 125, 125, 125,
- 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
- 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
-
- 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
- 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
- 125, 125, 125
+ 26, 47, 30, 26, 30, 31, 51, 38, 53, 38,
+ 31, 39, 11, 53, 8, 39, 31, 38, 45, 45,
+ 64, 47, 65, 51, 84, 85, 86, 88, 105, 134,
+ 53, 86, 88, 105, 130, 128, 127, 123, 122, 65,
+
+ 64, 84, 85, 121, 120, 119, 118, 117, 86, 132,
+ 132, 133, 133, 135, 135, 136, 136, 116, 115, 114,
+ 112, 111, 110, 109, 108, 107, 104, 103, 102, 101,
+ 100, 99, 98, 97, 96, 94, 93, 92, 90, 89,
+ 87, 82, 81, 80, 79, 78, 77, 76, 75, 74,
+ 73, 72, 71, 70, 69, 68, 67, 66, 57, 56,
+ 49, 42, 40, 37, 36, 35, 34, 33, 32, 23,
+ 20, 19, 17, 15, 10, 7, 3, 131, 131, 131,
+ 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
+ 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
+
+ 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
+ 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
+ 131, 131, 131, 131, 131, 131, 131, 131
} ;
/* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[47] = {
+static yyconst flex_int32_t yy_rule_can_match_eol[48] = {
0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 0, 0, 1, 0, 0,
+ 0, 1, 1, 0, 0, 1, 0, 0,
};
-static yyconst flex_int16_t yy_rule_linenum[46] = {
+static yyconst flex_int16_t yy_rule_linenum[47] = {
0,
- 44, 46, 51, 52, 53, 54, 55, 57, 58, 59,
- 60, 62, 63, 64, 66, 67, 69, 70, 72, 73,
- 74, 75, 77, 78, 80, 81, 82, 85, 86, 88,
- 89, 90, 92, 93, 95, 96, 98, 99, 101, 103,
- 106, 111, 112, 114, 117
+ 44, 46, 51, 52, 53, 54, 55, 56, 58, 59,
+ 60, 61, 63, 64, 65, 67, 68, 70, 71, 73,
+ 74, 75, 76, 78, 79, 81, 82, 83, 86, 87,
+ 89, 90, 91, 93, 94, 96, 97, 99, 100, 102,
+ 104, 107, 112, 113, 115, 118
} ;
/* The intent behind this definition is that it'll catch
@@ -659,7 +664,7 @@ static yyconst flex_int16_t yy_rule_linenum[46] = {
yycolumn = yycolumn + yyleng; \
}
-#line 661 "promela.lex.yy.cpp"
+#line 669 "promela.lex.yy.cpp"
#define INITIAL 0
@@ -694,8 +699,8 @@ struct yyguts_t {
size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char;
- yy_size_t yy_n_chars;
- yy_size_t yyleng_r;
+ int yy_n_chars;
+ int yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
@@ -756,19 +761,23 @@ void promela_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
FILE *promela_get_in (yyscan_t yyscanner );
-void promela_set_in (FILE * in_str ,yyscan_t yyscanner );
+void promela_set_in (FILE * _in_str ,yyscan_t yyscanner );
FILE *promela_get_out (yyscan_t yyscanner );
-void promela_set_out (FILE * out_str ,yyscan_t yyscanner );
+void promela_set_out (FILE * _out_str ,yyscan_t yyscanner );
-yy_size_t promela_get_leng (yyscan_t yyscanner );
+int promela_get_leng (yyscan_t yyscanner );
char *promela_get_text (yyscan_t yyscanner );
int promela_get_lineno (yyscan_t yyscanner );
-void promela_set_lineno (int line_number ,yyscan_t yyscanner );
+void promela_set_lineno (int _line_number ,yyscan_t yyscanner );
+
+int promela_get_column (yyscan_t yyscanner );
+
+void promela_set_column (int _column_no ,yyscan_t yyscanner );
/* %if-bison-bridge */
@@ -796,8 +805,11 @@ extern int promela_wrap (yyscan_t yyscanner );
/* %not-for-header */
+#ifndef YY_NO_UNPUT
+
static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
+#endif
/* %ok-for-header */
/* %endif */
@@ -830,7 +842,12 @@ static int input (yyscan_t yyscanner );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -839,7 +856,7 @@ static int input (yyscan_t yyscanner );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
@@ -854,7 +871,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- yy_size_t n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -867,7 +884,7 @@ static int input (yyscan_t yyscanner );
else \
{ \
errno=0; \
- while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
+ while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
@@ -945,7 +962,7 @@ extern int promela_lex \
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK break;
+#define YY_BREAK /*LINTED*/break;
#endif
/* %% [6.0] YY_RULE_SETUP definition goes here */
@@ -957,17 +974,11 @@ extern int promela_lex \
/** The main scanner function which does all the work.
*/
YY_DECL {
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- /* %% [7.0] user's declarations go here */
-#line 42 "promela.l"
-
-
-#line 970 "promela.lex.yy.cpp"
-
yylval = yylval_param;
yylloc = yylloc_param;
@@ -1005,452 +1016,469 @@ YY_DECL {
promela__load_buffer_state(yyscanner );
}
- while ( 1 ) { /* loops until end-of-file is reached */
- /* %% [8.0] yymore()-related code goes here */
- yy_cp = yyg->yy_c_buf_p;
+ {
+ /* %% [7.0] user's declarations go here */
+#line 42 "promela.l"
- /* Support of yytext. */
- *yy_cp = yyg->yy_hold_char;
- /* yy_bp points to the position in yy_ch_buf of the start of
- * the current run.
- */
- yy_bp = yy_cp;
+#line 1029 "promela.lex.yy.cpp"
- /* %% [9.0] code to set up and find next match goes here */
- yy_current_state = yyg->yy_start;
+ while ( /*CONSTCOND*/1 ) { /* loops until end-of-file is reached */
+ /* %% [8.0] yymore()-related code goes here */
+ yy_cp = yyg->yy_c_buf_p;
+
+ /* Support of yytext. */
+ *yy_cp = yyg->yy_hold_char;
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ /* %% [9.0] code to set up and find next match goes here */
+ yy_current_state = yyg->yy_start;
yy_match:
- do {
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
- if ( yy_accept[yy_current_state] ) {
- yyg->yy_last_accepting_state = yy_current_state;
- yyg->yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 126 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- ++yy_cp;
- } while ( yy_current_state != 125 );
- yy_cp = yyg->yy_last_accepting_cpos;
- yy_current_state = yyg->yy_last_accepting_state;
+ do {
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
+ if ( yy_accept[yy_current_state] ) {
+ yyg->yy_last_accepting_state = yy_current_state;
+ yyg->yy_last_accepting_cpos = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 132 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
+ ++yy_cp;
+ } while ( yy_current_state != 131 );
+ yy_cp = yyg->yy_last_accepting_cpos;
+ yy_current_state = yyg->yy_last_accepting_state;
yy_find_action:
- /* %% [10.0] code to find the action number goes here */
- yy_act = yy_accept[yy_current_state];
+ /* %% [10.0] code to find the action number goes here */
+ yy_act = yy_accept[yy_current_state];
- YY_DO_BEFORE_ACTION;
+ YY_DO_BEFORE_ACTION;
- /* %% [11.0] code for yylineno update goes here */
+ /* %% [11.0] code for yylineno update goes here */
- if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) {
- yy_size_t yyl;
- for ( yyl = 0; yyl < yyleng; ++yyl )
- if ( yytext[yyl] == '\n' )
+ if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) {
+ yy_size_t yyl;
+ for ( yyl = 0; yyl < yyleng; ++yyl )
+ if ( yytext[yyl] == '\n' )
- do {
- yylineno++;
- yycolumn=0;
- } while(0)
- ;
- }
+ do {
+ yylineno++;
+ yycolumn=0;
+ } while(0)
+ ;
+ }
do_action: /* This label is used only to access EOF actions. */
- /* %% [12.0] debug code goes here */
- if ( yy_flex_debug ) {
- if ( yy_act == 0 )
- fprintf( stderr, "--scanner backing up\n" );
- else if ( yy_act < 46 )
- fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
- (long)yy_rule_linenum[yy_act], yytext );
- else if ( yy_act == 46 )
- fprintf( stderr, "--accepting default rule (\"%s\")\n",
- yytext );
- else if ( yy_act == 47 )
- fprintf( stderr, "--(end of buffer or a NUL)\n" );
- else
- fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
- }
-
- switch ( yy_act ) {
- /* beginning of action switch */
- /* %% [13.0] actions go here */
- case 0: /* must back up */
- /* undo the effects of YY_DO_BEFORE_ACTION */
- *yy_cp = yyg->yy_hold_char;
- yy_cp = yyg->yy_last_accepting_cpos;
- yy_current_state = yyg->yy_last_accepting_state;
- goto yy_find_action;
+ /* %% [12.0] debug code goes here */
+ if ( yy_flex_debug ) {
+ if ( yy_act == 0 )
+ fprintf( stderr, "--scanner backing up\n" );
+ else if ( yy_act < 47 )
+ fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
+ (long)yy_rule_linenum[yy_act], yytext );
+ else if ( yy_act == 47 )
+ fprintf( stderr, "--accepting default rule (\"%s\")\n",
+ yytext );
+ else if ( yy_act == 48 )
+ fprintf( stderr, "--(end of buffer or a NUL)\n" );
+ else
+ fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
+ }
- case 1:
- /* rule 1 can match eol */
- YY_RULE_SETUP
+ switch ( yy_act ) {
+ /* beginning of action switch */
+ /* %% [13.0] actions go here */
+ case 0: /* must back up */
+ /* undo the effects of YY_DO_BEFORE_ACTION */
+ *yy_cp = yyg->yy_hold_char;
+ yy_cp = yyg->yy_last_accepting_cpos;
+ yy_current_state = yyg->yy_last_accepting_state;
+ goto yy_find_action;
+
+ case 1:
+ /* rule 1 can match eol */
+ YY_RULE_SETUP
#line 44 "promela.l"
- /* multiline comments */
- YY_BREAK
- case 2:
- YY_RULE_SETUP
+ /* multiline comments */
+ YY_BREAK
+ case 2:
+ YY_RULE_SETUP
#line 46 "promela.l"
- {
- yylval->value = strdup(yytext);
- return PML_TYPE;
- }
- YY_BREAK
- case 3:
- YY_RULE_SETUP
+ {
+ yylval->value = strdup(yytext);
+ return PML_TYPE;
+ }
+ YY_BREAK
+ case 3:
+ YY_RULE_SETUP
#line 51 "promela.l"
- { return PML_LEN; }
- YY_BREAK
- case 4:
- YY_RULE_SETUP
+ { return PML_LEN; }
+ YY_BREAK
+ case 4:
+ YY_RULE_SETUP
#line 52 "promela.l"
- { yylval->value = strdup(yytext); return PML_CONST; }
- YY_BREAK
- case 5:
- YY_RULE_SETUP
+ { yylval->value = strdup(yytext); return PML_CONST; }
+ YY_BREAK
+ case 5:
+ YY_RULE_SETUP
#line 53 "promela.l"
- { return PML_PRINT; }
- YY_BREAK
- case 6:
- YY_RULE_SETUP
+ { return PML_PRINT; }
+ YY_BREAK
+ case 6:
+ YY_RULE_SETUP
#line 54 "promela.l"
- { return PML_TYPEDEF; }
- YY_BREAK
- case 7:
- YY_RULE_SETUP
+ { return PML_TYPEDEF; }
+ YY_BREAK
+ case 7:
+ YY_RULE_SETUP
#line 55 "promela.l"
- { return PML_ASSERT; }
- YY_BREAK
- case 8:
- YY_RULE_SETUP
-#line 57 "promela.l"
- { return PML_NEG; }
- YY_BREAK
- case 9:
- YY_RULE_SETUP
+ { return PML_ASSERT; }
+ YY_BREAK
+ case 8:
+ YY_RULE_SETUP
+#line 56 "promela.l"
+ { return PML_RETURN; }
+ YY_BREAK
+ case 9:
+ YY_RULE_SETUP
#line 58 "promela.l"
- { return PML_COMPL; }
- YY_BREAK
- case 10:
- YY_RULE_SETUP
+ { return PML_NEG; }
+ YY_BREAK
+ case 10:
+ YY_RULE_SETUP
#line 59 "promela.l"
- { return PML_INCR; }
- YY_BREAK
- case 11:
- YY_RULE_SETUP
+ { return PML_COMPL; }
+ YY_BREAK
+ case 11:
+ YY_RULE_SETUP
#line 60 "promela.l"
- { return PML_DECR; }
- YY_BREAK
- case 12:
- YY_RULE_SETUP
-#line 62 "promela.l"
- { return PML_TIMES; }
- YY_BREAK
- case 13:
- YY_RULE_SETUP
+ { return PML_INCR; }
+ YY_BREAK
+ case 12:
+ YY_RULE_SETUP
+#line 61 "promela.l"
+ { return PML_DECR; }
+ YY_BREAK
+ case 13:
+ YY_RULE_SETUP
#line 63 "promela.l"
- { return PML_DIVIDE; }
- YY_BREAK
- case 14:
- YY_RULE_SETUP
+ { return PML_TIMES; }
+ YY_BREAK
+ case 14:
+ YY_RULE_SETUP
#line 64 "promela.l"
- { return PML_MODULO; }
- YY_BREAK
- case 15:
- YY_RULE_SETUP
-#line 66 "promela.l"
- { return PML_PLUS; }
- YY_BREAK
- case 16:
- YY_RULE_SETUP
+ { return PML_DIVIDE; }
+ YY_BREAK
+ case 15:
+ YY_RULE_SETUP
+#line 65 "promela.l"
+ { return PML_MODULO; }
+ YY_BREAK
+ case 16:
+ YY_RULE_SETUP
#line 67 "promela.l"
- { return PML_MINUS; }
- YY_BREAK
- case 17:
- YY_RULE_SETUP
-#line 69 "promela.l"
- { return PML_LSHIFT; }
- YY_BREAK
- case 18:
- YY_RULE_SETUP
+ { return PML_PLUS; }
+ YY_BREAK
+ case 17:
+ YY_RULE_SETUP
+#line 68 "promela.l"
+ { return PML_MINUS; }
+ YY_BREAK
+ case 18:
+ YY_RULE_SETUP
#line 70 "promela.l"
- { return PML_RSHIFT; }
- YY_BREAK
- case 19:
- YY_RULE_SETUP
-#line 72 "promela.l"
- { return PML_LE; }
- YY_BREAK
- case 20:
- YY_RULE_SETUP
+ { return PML_LSHIFT; }
+ YY_BREAK
+ case 19:
+ YY_RULE_SETUP
+#line 71 "promela.l"
+ { return PML_RSHIFT; }
+ YY_BREAK
+ case 20:
+ YY_RULE_SETUP
#line 73 "promela.l"
- { return PML_GE; }
- YY_BREAK
- case 21:
- YY_RULE_SETUP
+ { return PML_LE; }
+ YY_BREAK
+ case 21:
+ YY_RULE_SETUP
#line 74 "promela.l"
- { return PML_LT; }
- YY_BREAK
- case 22:
- YY_RULE_SETUP
+ { return PML_GE; }
+ YY_BREAK
+ case 22:
+ YY_RULE_SETUP
#line 75 "promela.l"
- { return PML_GT; }
- YY_BREAK
- case 23:
- YY_RULE_SETUP
-#line 77 "promela.l"
- { return PML_NE; }
- YY_BREAK
- case 24:
- YY_RULE_SETUP
+ { return PML_LT; }
+ YY_BREAK
+ case 23:
+ YY_RULE_SETUP
+#line 76 "promela.l"
+ { return PML_GT; }
+ YY_BREAK
+ case 24:
+ YY_RULE_SETUP
#line 78 "promela.l"
- { return PML_EQ; }
- YY_BREAK
- case 25:
- YY_RULE_SETUP
-#line 80 "promela.l"
- { return PML_BITAND; }
- YY_BREAK
- case 26:
- YY_RULE_SETUP
+ { return PML_NE; }
+ YY_BREAK
+ case 25:
+ YY_RULE_SETUP
+#line 79 "promela.l"
+ { return PML_EQ; }
+ YY_BREAK
+ case 26:
+ YY_RULE_SETUP
#line 81 "promela.l"
- { return PML_BITXOR; }
- YY_BREAK
- case 27:
- YY_RULE_SETUP
+ { return PML_BITAND; }
+ YY_BREAK
+ case 27:
+ YY_RULE_SETUP
#line 82 "promela.l"
- { return PML_BITOR; }
- YY_BREAK
- case 28:
- YY_RULE_SETUP
-#line 85 "promela.l"
- { return PML_AND; }
- YY_BREAK
- case 29:
- YY_RULE_SETUP
+ { return PML_BITXOR; }
+ YY_BREAK
+ case 28:
+ YY_RULE_SETUP
+#line 83 "promela.l"
+ { return PML_BITOR; }
+ YY_BREAK
+ case 29:
+ YY_RULE_SETUP
#line 86 "promela.l"
- { return PML_OR; }
- YY_BREAK
- case 30:
- YY_RULE_SETUP
-#line 88 "promela.l"
- { return PML_DOT; }
- YY_BREAK
- case 31:
- YY_RULE_SETUP
+ { return PML_AND; }
+ YY_BREAK
+ case 30:
+ YY_RULE_SETUP
+#line 87 "promela.l"
+ { return PML_OR; }
+ YY_BREAK
+ case 31:
+ YY_RULE_SETUP
#line 89 "promela.l"
- { return PML_COMMA; }
- YY_BREAK
- case 32:
- YY_RULE_SETUP
+ { return PML_DOT; }
+ YY_BREAK
+ case 32:
+ YY_RULE_SETUP
#line 90 "promela.l"
- { return PML_SEMI; }
- YY_BREAK
- case 33:
- YY_RULE_SETUP
-#line 92 "promela.l"
- { return '('; }
- YY_BREAK
- case 34:
- YY_RULE_SETUP
+ { return PML_COMMA; }
+ YY_BREAK
+ case 33:
+ YY_RULE_SETUP
+#line 91 "promela.l"
+ { return PML_SEMI; }
+ YY_BREAK
+ case 34:
+ YY_RULE_SETUP
#line 93 "promela.l"
- { return ')'; }
- YY_BREAK
- case 35:
- YY_RULE_SETUP
-#line 95 "promela.l"
- { return '['; }
- YY_BREAK
- case 36:
- YY_RULE_SETUP
+ { return '('; }
+ YY_BREAK
+ case 35:
+ YY_RULE_SETUP
+#line 94 "promela.l"
+ { return ')'; }
+ YY_BREAK
+ case 36:
+ YY_RULE_SETUP
#line 96 "promela.l"
- { return ']'; }
- YY_BREAK
- case 37:
- YY_RULE_SETUP
-#line 98 "promela.l"
- { return '{'; }
- YY_BREAK
- case 38:
- YY_RULE_SETUP
+ { return '['; }
+ YY_BREAK
+ case 37:
+ YY_RULE_SETUP
+#line 97 "promela.l"
+ { return ']'; }
+ YY_BREAK
+ case 38:
+ YY_RULE_SETUP
#line 99 "promela.l"
- { return '}'; }
- YY_BREAK
- case 39:
- YY_RULE_SETUP
-#line 101 "promela.l"
- { return PML_ASGN; }
- YY_BREAK
- case 40:
- /* rule 40 can match eol */
- YY_RULE_SETUP
-#line 103 "promela.l"
- { yylval->value = strdup(yytext); return(PML_STRING); }
- YY_BREAK
- case 41:
- /* rule 41 can match eol */
- YY_RULE_SETUP
-#line 106 "promela.l"
- {
- /* Non PROMELA extension for single quoted string literals */
- yylval->value = strdup(yytext);
- return(PML_STRING);
- }
- YY_BREAK
- case 42:
- YY_RULE_SETUP
-#line 111 "promela.l"
- { yylval->value = strdup(yytext); return PML_CONST; }
- YY_BREAK
- case 43:
- YY_RULE_SETUP
+ { return '{'; }
+ YY_BREAK
+ case 39:
+ YY_RULE_SETUP
+#line 100 "promela.l"
+ { return '}'; }
+ YY_BREAK
+ case 40:
+ YY_RULE_SETUP
+#line 102 "promela.l"
+ { return PML_ASGN; }
+ YY_BREAK
+ case 41:
+ /* rule 41 can match eol */
+ YY_RULE_SETUP
+#line 104 "promela.l"
+ { yylval->value = strdup(yytext); return(PML_STRING); }
+ YY_BREAK
+ case 42:
+ /* rule 42 can match eol */
+ YY_RULE_SETUP
+#line 107 "promela.l"
+ {
+ /* Non PROMELA extension for single quoted string literals */
+ yylval->value = strdup(yytext);
+ return(PML_STRING);
+ }
+ YY_BREAK
+ case 43:
+ YY_RULE_SETUP
#line 112 "promela.l"
- { yylval->value = strdup(yytext); return PML_NAME; }
- YY_BREAK
- case 44:
- /* rule 44 can match eol */
- YY_RULE_SETUP
-#line 114 "promela.l"
- /* eat up whitespace */
- YY_BREAK
- case 45:
- YY_RULE_SETUP
-#line 117 "promela.l"
- { /*printf( "Unrecognized character: %s\n", yytext ); */ }
- YY_BREAK
- case 46:
- YY_RULE_SETUP
-#line 118 "promela.l"
- ECHO;
- YY_BREAK
-#line 1336 "promela.lex.yy.cpp"
- case YY_STATE_EOF(INITIAL):
- yyterminate();
-
- case YY_END_OF_BUFFER: {
- /* Amount of text matched not including the EOB char. */
- int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
-
- /* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = yyg->yy_hold_char;
- YY_RESTORE_YY_MORE_OFFSET
-
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) {
- /* We're scanning a new file or input source. It's
- * possible that this happened because the user
- * just pointed yyin at a new source and called
- * promela_lex(). If so, then we have to assure
- * consistency between YY_CURRENT_BUFFER and our
- * globals. Here is the right place to do so, because
- * this is the first action (other than possibly a
- * back-up) that will match for the new input source.
- */
- yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
- }
-
- /* Note that here we test for yy_c_buf_p "<=" to the position
- * of the first EOB in the buffer, since yy_c_buf_p will
- * already have been incremented past the NUL character
- * (since all states make transitions on EOB to the
- * end-of-buffer state). Contrast this with the test
- * in input().
- */
- if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) {
- /* This was really a NUL. */
- yy_state_type yy_next_state;
-
- yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state( yyscanner );
+ { yylval->value = strdup(yytext); return PML_CONST; }
+ YY_BREAK
+ case 44:
+ YY_RULE_SETUP
+#line 113 "promela.l"
+ { yylval->value = strdup(yytext); return PML_NAME; }
+ YY_BREAK
+ case 45:
+ /* rule 45 can match eol */
+ YY_RULE_SETUP
+#line 115 "promela.l"
+ /* eat up whitespace */
+ YY_BREAK
+ case 46:
+ YY_RULE_SETUP
+#line 118 "promela.l"
+ { return PML_UNREC; }
+ YY_BREAK
+ case 47:
+ YY_RULE_SETUP
+#line 119 "promela.l"
+ ECHO;
+ YY_BREAK
+#line 1362 "promela.lex.yy.cpp"
+ case YY_STATE_EOF(INITIAL):
+ yyterminate();
+
+ case YY_END_OF_BUFFER: {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = yyg->yy_hold_char;
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed yyin at a new source and called
+ * promela_lex(). If so, then we have to assure
+ * consistency between YY_CURRENT_BUFFER and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ /* %if-c-only */
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+ /* %endif */
+ /* %if-c++-only */
+ /* %endif */
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
- /* Okay, we're now positioned to make the NUL
- * transition. We couldn't have
- * yy_get_previous_state() go ahead and do it
- * for us because it doesn't know how to deal
- * with the possibility of jamming (and we don't
- * want to build jamming into it because then it
- * will run more slowly).
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
*/
+ if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) {
+ /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
- yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
+ yy_current_state = yy_get_previous_state( yyscanner );
- yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
- if ( yy_next_state ) {
- /* Consume the NUL. */
- yy_cp = ++yyg->yy_c_buf_p;
- yy_current_state = yy_next_state;
- goto yy_match;
- }
+ yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
- else {
- /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
- yy_cp = yyg->yy_last_accepting_cpos;
- yy_current_state = yyg->yy_last_accepting_state;
- goto yy_find_action;
- }
- }
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
- else switch ( yy_get_next_buffer( yyscanner ) ) {
- case EOB_ACT_END_OF_FILE: {
- yyg->yy_did_buffer_switch_on_eof = 0;
-
- if ( promela_wrap(yyscanner ) ) {
- /* Note: because we've taken care in
- * yy_get_next_buffer() to have set up
- * yytext, we can now set up
- * yy_c_buf_p so that if some total
- * hoser (like flex itself) wants to
- * call the scanner after we return the
- * YY_NULL, it'll still work - another
- * YY_NULL will get returned.
- */
- yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
-
- yy_act = YY_STATE_EOF(YY_START);
- goto do_action;
+ if ( yy_next_state ) {
+ /* Consume the NUL. */
+ yy_cp = ++yyg->yy_c_buf_p;
+ yy_current_state = yy_next_state;
+ goto yy_match;
}
else {
- if ( ! yyg->yy_did_buffer_switch_on_eof )
- YY_NEW_FILE;
+ /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
+ yy_cp = yyg->yy_last_accepting_cpos;
+ yy_current_state = yyg->yy_last_accepting_state;
+ goto yy_find_action;
}
- break;
}
- case EOB_ACT_CONTINUE_SCAN:
- yyg->yy_c_buf_p =
- yyg->yytext_ptr + yy_amount_of_matched_text;
+ else switch ( yy_get_next_buffer( yyscanner ) ) {
+ case EOB_ACT_END_OF_FILE: {
+ yyg->yy_did_buffer_switch_on_eof = 0;
+
+ if ( promela_wrap(yyscanner ) ) {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * yytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else {
+ if ( ! yyg->yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+ }
+ break;
+ }
- yy_current_state = yy_get_previous_state( yyscanner );
+ case EOB_ACT_CONTINUE_SCAN:
+ yyg->yy_c_buf_p =
+ yyg->yytext_ptr + yy_amount_of_matched_text;
- yy_cp = yyg->yy_c_buf_p;
- yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
- goto yy_match;
+ yy_current_state = yy_get_previous_state( yyscanner );
- case EOB_ACT_LAST_MATCH:
- yyg->yy_c_buf_p =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
+ yy_cp = yyg->yy_c_buf_p;
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
+ goto yy_match;
- yy_current_state = yy_get_previous_state( yyscanner );
+ case EOB_ACT_LAST_MATCH:
+ yyg->yy_c_buf_p =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
- yy_cp = yyg->yy_c_buf_p;
- yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
- goto yy_find_action;
- }
- break;
- }
+ yy_current_state = yy_get_previous_state( yyscanner );
+
+ yy_cp = yyg->yy_c_buf_p;
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
- default:
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--no action found" );
- } /* end of action switch */
- } /* end of scanning one token */
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of user's declarations */
} /* end of promela_lex */
/* %ok-for-header */
@@ -1475,9 +1503,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* %endif */
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = yyg->yytext_ptr;
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = yyg->yytext_ptr;
+ yy_size_t number_to_move, i;
int ret_val;
if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
@@ -1504,7 +1532,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
+ number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
@@ -1516,20 +1544,20 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
else {
- yy_size_t num_to_read =
+ int 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) (yyg->yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer ) {
- yy_size_t new_size = b->yy_buf_size * 2;
+ int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -1541,7 +1569,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
promela_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
} else
/* Can't grow it, we don't own it. */
- b->yy_ch_buf = 0;
+ b->yy_ch_buf = NULL;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
@@ -1580,9 +1608,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if ((int) (yyg->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 = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
+ int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) promela_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
@@ -1607,8 +1635,8 @@ static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
/* %if-c++-only */
/* %endif */
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
+ yy_state_type yy_current_state;
+ char *yy_cp;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* %% [15.0] code to get the start state into yy_current_state goes here */
@@ -1616,17 +1644,17 @@ static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) {
/* %% [16.0] code to find the next state goes here */
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] ) {
yyg->yy_last_accepting_state = yy_current_state;
yyg->yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) {
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 126 )
+ if ( yy_current_state >= 132 )
yy_c = yy_meta[(unsigned int) yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
}
return yy_current_state;
@@ -1643,35 +1671,37 @@ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_
/* %if-c++-only */
/* %endif */
{
- register int yy_is_jam;
+ int yy_is_jam;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
/* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
- register char *yy_cp = yyg->yy_c_buf_p;
+ char *yy_cp = yyg->yy_c_buf_p;
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] ) {
yyg->yy_last_accepting_state = yy_current_state;
yyg->yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) {
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 126 )
+ if ( yy_current_state >= 132 )
yy_c = yy_meta[(unsigned int) yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 125);
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
+ yy_is_jam = (yy_current_state == 131);
+ (void)yyg;
return yy_is_jam ? 0 : yy_current_state;
}
+#ifndef YY_NO_UNPUT
/* %if-c-only */
-static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
+static void yyunput (int c, char * yy_bp , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
- register char *yy_cp;
+ char *yy_cp;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_cp = yyg->yy_c_buf_p;
@@ -1682,10 +1712,10 @@ static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) {
/* need to shift things up to make room */
/* +2 for EOB chars. */
- register yy_size_t number_to_move = yyg->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 =
+ int number_to_move = yyg->yy_n_chars + 2;
+ char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
+ char *source =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
@@ -1694,7 +1724,7 @@ static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
- yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+ yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
@@ -1715,6 +1745,7 @@ static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
/* %if-c-only */
/* %endif */
+#endif
/* %if-c-only */
#ifndef YY_NO_INPUT
@@ -1744,7 +1775,7 @@ static int input (yyscan_t yyscanner)
else {
/* need more input */
- yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) ) {
@@ -1826,6 +1857,9 @@ void promela_restart (FILE * input_file , yyscan_t yyscanner)
promela__load_buffer_state(yyscanner );
}
+/* %if-c++-only */
+/* %endif */
+
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
* @param yyscanner The scanner object.
@@ -1874,7 +1908,11 @@ static void promela__load_buffer_state (yyscan_t yyscanner)
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+ /* %if-c-only */
yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ /* %endif */
+ /* %if-c++-only */
+ /* %endif */
yyg->yy_hold_char = *yyg->yy_c_buf_p;
}
@@ -1896,7 +1934,7 @@ YY_BUFFER_STATE promela__create_buffer (FILE * file, int size , yyscan_t yysca
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in promela__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.
@@ -1912,6 +1950,9 @@ YY_BUFFER_STATE promela__create_buffer (FILE * file, int size , yyscan_t yysca
return b;
}
+/* %if-c++-only */
+/* %endif */
+
/** Destroy the buffer.
* @param b a buffer created with promela__create_buffer()
* @param yyscanner The scanner object.
@@ -1936,13 +1977,6 @@ void promela__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
promela_free((void *) b ,yyscanner );
}
-/* %if-c-only */
-
-/* %endif */
-
-/* %if-c++-only */
-/* %endif */
-
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a promela_restart() or at EOF.
@@ -1959,7 +1993,11 @@ static void promela__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yy
promela__flush_buffer(b ,yyscanner);
+ /* %if-c-only */
b->yy_input_file = file;
+ /* %endif */
+ /* %if-c++-only */
+ /* %endif */
b->yy_fill_buffer = 1;
/* If b is the current buffer, then promela__init_buffer was _probably_
@@ -2088,7 +2126,7 @@ static void promela_ensure_buffer_stack (yyscan_t yyscanner)
/* %if-c++-only */
/* %endif */
{
- yy_size_t num_to_alloc;
+ int num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@@ -2097,7 +2135,7 @@ static void promela_ensure_buffer_stack (yyscan_t yyscanner)
* 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... */
yyg->yy_buffer_stack = (struct yy_buffer_state**)promela_alloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
@@ -2114,7 +2152,7 @@ static void promela_ensure_buffer_stack (yyscan_t yyscanner)
if (yyg->yy_buffer_stack_top >= (yyg->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 = yyg->yy_buffer_stack_max + grow_size;
yyg->yy_buffer_stack = (struct yy_buffer_state**)promela_realloc
@@ -2145,7 +2183,7 @@ YY_BUFFER_STATE promela__scan_buffer (char * base, yy_size_t size , yyscan_t y
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
- return 0;
+ return NULL;
b = (YY_BUFFER_STATE) promela_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
if ( ! b )
@@ -2154,7 +2192,7 @@ YY_BUFFER_STATE promela__scan_buffer (char * base, yy_size_t size , yyscan_t y
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
+ b->yy_input_file = NULL;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
@@ -2178,25 +2216,26 @@ YY_BUFFER_STATE promela__scan_buffer (char * base, yy_size_t size , yyscan_t y
*/
YY_BUFFER_STATE promela__scan_string (yyconst char * yystr , yyscan_t yyscanner) {
- return promela__scan_bytes(yystr,strlen(yystr) ,yyscanner);
+ return promela__scan_bytes(yystr,(int) strlen(yystr) ,yyscanner);
}
/* %endif */
/* %if-c-only */
/** Setup the input buffer state to scan the given bytes. The next call to promela_lex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE promela__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) {
+YY_BUFFER_STATE promela__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) {
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n, i;
+ yy_size_t n;
+ yy_size_t i;
/* Get memory for full buffer, including space for trailing EOB's. */
- n = _yybytes_len + 2;
+ n = (yy_size_t) _yybytes_len + 2;
buf = (char *) promela_alloc(n ,yyscanner );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in promela__scan_bytes()" );
@@ -2224,7 +2263,9 @@ YY_BUFFER_STATE promela__scan_bytes (yyconst char * yybytes, yy_size_t _yybyte
#endif
/* %if-c-only */
-static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) {
+static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
@@ -2307,7 +2348,7 @@ FILE *promela_get_out (yyscan_t yyscanner) {
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-yy_size_t promela_get_leng (yyscan_t yyscanner) {
+int promela_get_leng (yyscan_t yyscanner) {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
}
@@ -2335,47 +2376,47 @@ void promela_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) {
/* %endif */
/** Set the current line number.
- * @param line_number
+ * @param _line_number line number
* @param yyscanner The scanner object.
*/
-void promela_set_lineno (int line_number , yyscan_t yyscanner) {
+void promela_set_lineno (int _line_number , yyscan_t yyscanner) {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* lineno is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "promela_set_lineno called with no buffer" , yyscanner);
+ YY_FATAL_ERROR( "promela_set_lineno called with no buffer" );
- yylineno = line_number;
+ yylineno = _line_number;
}
/** Set the current column.
- * @param line_number
+ * @param _column_no column number
* @param yyscanner The scanner object.
*/
-void promela_set_column (int column_no , yyscan_t yyscanner) {
+void promela_set_column (int _column_no , yyscan_t yyscanner) {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* column is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "promela_set_column called with no buffer" , yyscanner);
+ YY_FATAL_ERROR( "promela_set_column called with no buffer" );
- yycolumn = column_no;
+ yycolumn = _column_no;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param in_str A readable stream.
+ * @param _in_str A readable stream.
* @param yyscanner The scanner object.
* @see promela__switch_to_buffer
*/
-void promela_set_in (FILE * in_str , yyscan_t yyscanner) {
+void promela_set_in (FILE * _in_str , yyscan_t yyscanner) {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyin = in_str ;
+ yyin = _in_str ;
}
-void promela_set_out (FILE * out_str , yyscan_t yyscanner) {
+void promela_set_out (FILE * _out_str , yyscan_t yyscanner) {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyout = out_str ;
+ yyout = _out_str ;
}
int promela_get_debug (yyscan_t yyscanner) {
@@ -2383,9 +2424,9 @@ int promela_get_debug (yyscan_t yyscanner) {
return yy_flex_debug;
}
-void promela_set_debug (int bdebug , yyscan_t yyscanner) {
+void promela_set_debug (int _bdebug , yyscan_t yyscanner) {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yy_flex_debug = bdebug ;
+ yy_flex_debug = _bdebug ;
}
/* %endif */
@@ -2490,10 +2531,10 @@ static int yy_init_globals (yyscan_t yyscanner) {
* This function is called from promela_lex_destroy(), so don't allocate here.
*/
- yyg->yy_buffer_stack = 0;
+ yyg->yy_buffer_stack = NULL;
yyg->yy_buffer_stack_top = 0;
yyg->yy_buffer_stack_max = 0;
- yyg->yy_c_buf_p = (char *) 0;
+ yyg->yy_c_buf_p = NULL;
yyg->yy_init = 0;
yyg->yy_start = 0;
@@ -2506,8 +2547,8 @@ static int yy_init_globals (yyscan_t yyscanner) {
yyin = stdin;
yyout = stdout;
#else
- yyin = (FILE *) 0;
- yyout = (FILE *) 0;
+ yyin = NULL;
+ yyout = NULL;
#endif
/* For future reference: Set errno on error, since we are called by
@@ -2556,7 +2597,10 @@ int promela_lex_destroy (yyscan_t yyscanner) {
#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) {
- register int i;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+
+ int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
@@ -2564,7 +2608,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysca
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) {
- register int n;
+ int n;
for ( n = 0; s[n]; ++n )
;
@@ -2573,10 +2617,15 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) {
#endif
void *promela_alloc (yy_size_t size , yyscan_t yyscanner) {
- return (void *) malloc( size );
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+ return malloc(size);
}
void *promela_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+
/* 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
@@ -2584,10 +2633,12 @@ void *promela_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) {
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return (void *) realloc( (char *) ptr, size );
+ return realloc(ptr, size);
}
void promela_free (void * ptr , yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
free( (char *) ptr ); /* see promela_realloc() for (char *) cast */
}
@@ -2598,4 +2649,4 @@ void promela_free (void * ptr , yyscan_t yyscanner) {
/* %ok-for-header */
-#line 118 "promela.l"
+#line 119 "promela.l"