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.cpp1921
1 files changed, 929 insertions, 992 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 2cd66f2..50e9776 100644
--- a/src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp
+++ b/src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp
@@ -26,7 +26,7 @@
/* %endif */
/* %if-c-only */
-
+
/* %endif */
/* %if-c-only */
@@ -58,7 +58,7 @@
#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
@@ -76,7 +76,7 @@ typedef uint64_t flex_uint64_t;
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;
#endif /* ! C99 */
@@ -230,21 +230,21 @@ typedef size_t yy_size_t;
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
- /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
- * access to the local variable yy_act. Since yyless() is a macro, it would break
- * existing scanners that call yyless() from OUTSIDE promela_lex.
- * One obvious solution it to make yy_act a global. I tried that, and saw
- * a 5% performance hit in a non-yylineno scanner, because yy_act is
- * normally declared as a register variable-- so it is not worth it.
- */
- #define YY_LESS_LINENO(n) \
+/* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
+ * access to the local variable yy_act. Since yyless() is a macro, it would break
+ * existing scanners that call yyless() from OUTSIDE promela_lex.
+ * One obvious solution it to make yy_act a global. I tried that, and saw
+ * a 5% performance hit in a non-yylineno scanner, because yy_act is
+ * normally declared as a register variable-- so it is not worth it.
+ */
+#define YY_LESS_LINENO(n) \
do { \
yy_size_t yyl;\
for ( yyl = n; yyl < yyleng; ++yyl )\
if ( yytext[yyl] == '\n' )\
--yylineno;\
}while(0)
-
+
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
@@ -263,14 +263,13 @@ typedef size_t yy_size_t;
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
-struct yy_buffer_state
- {
-/* %if-c-only */
+struct yy_buffer_state {
+ /* %if-c-only */
FILE *yy_input_file;
-/* %endif */
+ /* %endif */
-/* %if-c++-only */
-/* %endif */
+ /* %if-c++-only */
+ /* %endif */
char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */
@@ -304,9 +303,9 @@ struct yy_buffer_state
*/
int yy_at_bol;
- int yy_bs_lineno; /**< The line count. */
- int yy_bs_column; /**< The column count. */
-
+ 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.
*/
@@ -328,7 +327,7 @@ struct yy_buffer_state
*/
#define YY_BUFFER_EOF_PENDING 2
- };
+};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
/* %if-c-only Standard (non-C++) definition */
@@ -451,179 +450,179 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
#define YY_END_OF_BUFFER 47
/* This struct is not used in this scanner,
but its presence is necessary. */
-struct yy_trans_info
- {
+struct yy_trans_info {
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
- };
-static yyconst flex_int16_t yy_accept[126] =
- { 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
- } ;
-
-static yyconst flex_int32_t 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, 1, 1, 1, 1, 1,
- 1, 2, 4, 5, 1, 1, 6, 7, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 1, 18, 19,
- 20, 21, 1, 1, 22, 22, 22, 22, 22, 22,
- 22, 22, 22, 22, 22, 23, 22, 22, 22, 22,
- 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
- 24, 25, 26, 27, 22, 1, 28, 29, 22, 30,
-
- 31, 32, 33, 34, 35, 22, 36, 37, 38, 39,
- 40, 41, 22, 42, 43, 44, 45, 22, 22, 22,
- 46, 22, 47, 48, 49, 50, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1
- } ;
-
-static yyconst flex_int32_t yy_meta[51] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 2, 1, 1, 1,
- 1, 2, 2, 1, 1, 1, 1, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 1, 1, 1, 1
- } ;
-
-static yyconst flex_int16_t yy_base[131] =
- { 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
- } ;
-
-static yyconst flex_int16_t yy_def[131] =
- { 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
- } ;
-
-static yyconst flex_int16_t yy_nxt[224] =
- { 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
- } ;
-
-static yyconst flex_int16_t yy_chk[224] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 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
- } ;
+};
+static yyconst flex_int16_t yy_accept[126] = {
+ 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
+} ;
+
+static yyconst flex_int32_t 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, 1, 1, 1, 1, 1,
+ 1, 2, 4, 5, 1, 1, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 1, 18, 19,
+ 20, 21, 1, 1, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 23, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 24, 25, 26, 27, 22, 1, 28, 29, 22, 30,
+
+ 31, 32, 33, 34, 35, 22, 36, 37, 38, 39,
+ 40, 41, 22, 42, 43, 44, 45, 22, 22, 22,
+ 46, 22, 47, 48, 49, 50, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1
+} ;
+
+static yyconst flex_int32_t yy_meta[51] = {
+ 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 2, 1, 1, 1,
+ 1, 2, 2, 1, 1, 1, 1, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 1, 1, 1
+} ;
+
+static yyconst flex_int16_t yy_base[131] = {
+ 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
+} ;
+
+static yyconst flex_int16_t yy_def[131] = {
+ 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
+} ;
+
+static yyconst flex_int16_t yy_nxt[224] = {
+ 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
+} ;
+
+static yyconst flex_int16_t yy_chk[224] = {
+ 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 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
+} ;
/* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[47] =
- { 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, };
-
-static yyconst flex_int16_t yy_rule_linenum[46] =
- { 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
- } ;
+static yyconst flex_int32_t yy_rule_can_match_eol[47] = {
+ 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,
+};
+
+static yyconst flex_int16_t yy_rule_linenum[46] = {
+ 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
+} ;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
@@ -637,7 +636,7 @@ static yyconst flex_int16_t yy_rule_linenum[46] =
/* see: http://spinroot.com/spin/Man/operators.html */
#define YY_NO_UNISTD_H 1
#line 16 "promela.l"
-
+
#include "../PromelaParser.h"
#include "promela.tab.hpp"
#define YYSTYPE PROMELA_STYPE
@@ -645,7 +644,7 @@ static yyconst flex_int16_t yy_rule_linenum[46] =
#define YY_USER_INIT \
yycolumn = yylloc->first_line = yylloc->first_column = 0; \
yylineno = yylloc->last_line = yylloc->last_column = 0; \
-
+
//int yycolumn = 1;
#define YY_USER_ACTION \
@@ -681,42 +680,41 @@ static yyconst flex_int16_t yy_rule_linenum[46] =
/* %if-reentrant */
/* Holds the entire state of the reentrant scanner. */
-struct yyguts_t
- {
-
- /* User-defined. Not touched by flex. */
- YY_EXTRA_TYPE yyextra_r;
-
- /* The rest are the same as the globals declared in the non-reentrant scanner. */
- FILE *yyin_r, *yyout_r;
- size_t yy_buffer_stack_top; /**< index of top of stack. */
- 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;
- char *yy_c_buf_p;
- int yy_init;
- int yy_start;
- int yy_did_buffer_switch_on_eof;
- int yy_start_stack_ptr;
- int yy_start_stack_depth;
- int *yy_start_stack;
- yy_state_type yy_last_accepting_state;
- char* yy_last_accepting_cpos;
-
- int yylineno_r;
- int yy_flex_debug_r;
-
- char *yytext_r;
- int yy_more_flag;
- int yy_more_len;
-
- YYSTYPE * yylval_r;
-
- YYLTYPE * yylloc_r;
-
- }; /* end struct yyguts_t */
+struct yyguts_t {
+
+ /* User-defined. Not touched by flex. */
+ YY_EXTRA_TYPE yyextra_r;
+
+ /* The rest are the same as the globals declared in the non-reentrant scanner. */
+ FILE *yyin_r, *yyout_r;
+ size_t yy_buffer_stack_top; /**< index of top of stack. */
+ 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;
+ char *yy_c_buf_p;
+ int yy_init;
+ int yy_start;
+ int yy_did_buffer_switch_on_eof;
+ int yy_start_stack_ptr;
+ int yy_start_stack_depth;
+ int *yy_start_stack;
+ yy_state_type yy_last_accepting_state;
+ char* yy_last_accepting_cpos;
+
+ int yylineno_r;
+ int yy_flex_debug_r;
+
+ char *yytext_r;
+ int yy_more_flag;
+ int yy_more_len;
+
+ YYSTYPE * yylval_r;
+
+ YYLTYPE * yylloc_r;
+
+}; /* end struct yyguts_t */
/* %if-c-only */
@@ -726,12 +724,12 @@ static int yy_init_globals (yyscan_t yyscanner );
/* %if-reentrant */
- /* This must go here because YYSTYPE and YYLTYPE are included
- * from bison output in section 1.*/
- # define yylval yyg->yylval_r
-
- # define yylloc yyg->yylloc_r
-
+/* This must go here because YYSTYPE and YYLTYPE are included
+ * from bison output in section 1.*/
+# define yylval yyg->yylval_r
+
+# define yylloc yyg->yylloc_r
+
int promela_lex_init (yyscan_t* scanner);
int promela_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
@@ -775,10 +773,10 @@ YYSTYPE * promela_get_lval (yyscan_t yyscanner );
void promela_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
- YYLTYPE *promela_get_lloc (yyscan_t yyscanner );
-
- void promela_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
-
+YYLTYPE *promela_get_lloc (yyscan_t yyscanner );
+
+void promela_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
+
/* %endif */
/* Macros after this point can all be overridden by user definitions in
@@ -795,8 +793,8 @@ extern int promela_wrap (yyscan_t yyscanner );
/* %not-for-header */
- static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
-
+static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
+
/* %ok-for-header */
/* %endif */
@@ -926,7 +924,7 @@ static int input (yyscan_t yyscanner );
/* %if-c-only Standard (non-C++) definition */
extern int promela_lex \
- (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
+(YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
#define YY_DECL int promela_lex \
(YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
@@ -955,25 +953,23 @@ extern int promela_lex \
/** The main scanner function which does all the work.
*/
-YY_DECL
-{
+YY_DECL {
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-/* %% [7.0] user's declarations go here */
+ /* %% [7.0] user's declarations go here */
#line 42 "promela.l"
#line 970 "promela.lex.yy.cpp"
- yylval = yylval_param;
+ yylval = yylval_param;
- yylloc = yylloc_param;
+ yylloc = yylloc_param;
- if ( !yyg->yy_init )
- {
+ if ( !yyg->yy_init ) {
yyg->yy_init = 1;
#ifdef YY_USER_INIT
@@ -984,31 +980,30 @@ YY_DECL
yyg->yy_start = 1; /* first start state */
if ( ! yyin )
-/* %if-c-only */
+ /* %if-c-only */
yyin = stdin;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
+ /* %endif */
+ /* %if-c++-only */
+ /* %endif */
if ( ! yyout )
-/* %if-c-only */
+ /* %if-c-only */
yyout = stdout;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
+ /* %endif */
+ /* %if-c++-only */
+ /* %endif */
if ( ! YY_CURRENT_BUFFER ) {
promela_ensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE =
- promela__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ promela__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
}
promela__load_buffer_state(yyscanner );
- }
+ }
- while ( 1 ) /* loops until end-of-file is reached */
- {
-/* %% [8.0] yymore()-related code goes here */
+ while ( 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. */
@@ -1019,55 +1014,50 @@ YY_DECL
*/
yy_bp = yy_cp;
-/* %% [9.0] code to set up and find next match goes here */
+ /* %% [9.0] code to set up and find next match goes here */
yy_current_state = yyg->yy_start;
yy_match:
- do
- {
+ do {
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
- if ( yy_accept[yy_current_state] )
- {
+ 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 )
- {
+ }
+ 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 );
+ } while ( yy_current_state != 125 );
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 */
+ /* %% [10.0] code to find the action number goes here */
yy_act = yy_accept[yy_current_state];
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] )
- {
+ 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 )
- {
+ /* %% [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 )
@@ -1080,391 +1070,384 @@ do_action: /* This label is used only to access EOF actions. */
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 */
+ 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
+ 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
-#line 51 "promela.l"
-{ 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
-#line 53 "promela.l"
-{ return PML_PRINT; }
- YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 54 "promela.l"
-{ 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
-#line 58 "promela.l"
-{ return PML_COMPL; }
- YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 59 "promela.l"
-{ return PML_INCR; }
- 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
-#line 63 "promela.l"
-{ return PML_DIVIDE; }
- 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
-#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
-#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
-#line 73 "promela.l"
-{ return PML_GE; }
- YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 74 "promela.l"
-{ return PML_LT; }
- 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
-#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
-#line 81 "promela.l"
-{ return PML_BITXOR; }
- 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
-#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
-#line 89 "promela.l"
-{ return PML_COMMA; }
- 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
-#line 93 "promela.l"
-{ return ')'; }
- YY_BREAK
-case 35:
-YY_RULE_SETUP
-#line 95 "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
-#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
+ {
+ 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
+#line 52 "promela.l"
+ { 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
+#line 54 "promela.l"
+ { 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
+#line 58 "promela.l"
+ { return PML_COMPL; }
+ YY_BREAK
+ case 10:
+ YY_RULE_SETUP
+#line 59 "promela.l"
+ { return PML_INCR; }
+ 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
+#line 63 "promela.l"
+ { return PML_DIVIDE; }
+ 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
+#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
+#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
+#line 73 "promela.l"
+ { return PML_GE; }
+ YY_BREAK
+ case 21:
+ YY_RULE_SETUP
+#line 74 "promela.l"
+ { return PML_LT; }
+ 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
+#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
+#line 81 "promela.l"
+ { return PML_BITXOR; }
+ 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
+#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
+#line 89 "promela.l"
+ { return PML_COMMA; }
+ 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
+#line 93 "promela.l"
+ { return ')'; }
+ YY_BREAK
+ case 35:
+ YY_RULE_SETUP
+#line 95 "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
+#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
-#line 112 "promela.l"
-{ yylval->value = strdup(yytext); return PML_NAME; }
- YY_BREAK
-case 44:
-/* rule 44 can match eol */
-YY_RULE_SETUP
+ {
+ /* 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
+#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
+ /* 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
+ 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;
+ case YY_STATE_EOF(INITIAL):
+ yyterminate();
- /* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = yyg->yy_hold_char;
- YY_RESTORE_YY_MORE_OFFSET
+ 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;
- 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;
+ /* 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;
+ /* 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;
+ yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state( yyscanner );
+ yy_current_state = yy_get_previous_state( yyscanner );
- /* 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).
- */
+ /* 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).
+ */
- yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
+ yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
- yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
- if ( yy_next_state )
- {
- /* Consume the NUL. */
- yy_cp = ++yyg->yy_c_buf_p;
- yy_current_state = yy_next_state;
- goto yy_match;
+ if ( yy_next_state ) {
+ /* Consume the NUL. */
+ yy_cp = ++yyg->yy_c_buf_p;
+ yy_current_state = yy_next_state;
+ goto yy_match;
}
- 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;
+ 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;
}
}
- 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 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;
+ else {
+ if ( ! yyg->yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
}
- break;
+ break;
}
- case EOB_ACT_CONTINUE_SCAN:
- yyg->yy_c_buf_p =
- yyg->yytext_ptr + yy_amount_of_matched_text;
+ case EOB_ACT_CONTINUE_SCAN:
+ yyg->yy_c_buf_p =
+ yyg->yytext_ptr + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state( yyscanner );
+ 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_match;
+ yy_cp = yyg->yy_c_buf_p;
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
+ goto yy_match;
- case EOB_ACT_LAST_MATCH:
- yyg->yy_c_buf_p =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
+ case EOB_ACT_LAST_MATCH:
+ yyg->yy_c_buf_p =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
- yy_current_state = yy_get_previous_state( yyscanner );
+ 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;
+ 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 promela_lex */
/* %ok-for-header */
@@ -1488,7 +1471,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* %if-c++-only */
/* %endif */
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ 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;
@@ -1496,26 +1479,24 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
YY_FATAL_ERROR(
- "fatal flex scanner internal error--end of buffer missed" );
+ "fatal flex scanner internal error--end of buffer missed" );
- if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
- { /* Don't try to fill the buffer, so this is an EOF. */
- if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
- {
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) {
+ /* Don't try to fill the buffer, so this is an EOF. */
+ if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) {
/* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
- }
+ }
- else
- {
+ else {
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
- }
}
+ }
/* Try to read more data. */
@@ -1531,22 +1512,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 =
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+ else {
+ 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. */
+ 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;
int yy_c_buf_p_offset =
- (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
+ (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
- if ( b->yy_is_our_buffer )
- {
+ if ( b->yy_is_our_buffer ) {
yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
@@ -1555,49 +1534,45 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
b->yy_buf_size *= 2;
b->yy_ch_buf = (char *)
- /* Include room in for 2 EOB chars. */
- promela_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
- }
- else
+ /* Include room in for 2 EOB chars. */
+ 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;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
- "fatal error - scanner input buffer overflow" );
+ "fatal error - scanner input buffer overflow" );
yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
- number_to_move - 1;
+ number_to_move - 1;
- }
+ }
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, num_to_read );
+ yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
- }
+ }
- if ( yyg->yy_n_chars == 0 )
- {
- if ( number_to_move == YY_MORE_ADJ )
- {
+ if ( yyg->yy_n_chars == 0 ) {
+ if ( number_to_move == YY_MORE_ADJ ) {
ret_val = EOB_ACT_END_OF_FILE;
promela_restart(yyin ,yyscanner);
- }
+ }
- else
- {
+ else {
ret_val = EOB_ACT_LAST_MATCH;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
- YY_BUFFER_EOF_PENDING;
- }
+ YY_BUFFER_EOF_PENDING;
}
+ }
else
ret_val = EOB_ACT_CONTINUE_SCAN;
@@ -1624,35 +1599,32 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* %if-c-only */
/* %not-for-header */
- static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
+static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
register yy_state_type yy_current_state;
register char *yy_cp;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-/* %% [15.0] code to get the start state into yy_current_state goes here */
+ /* %% [15.0] code to get the start state into yy_current_state goes here */
yy_current_state = yyg->yy_start;
- 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 */
+ 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);
- if ( yy_accept[yy_current_state] )
- {
+ 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 )
- {
+ }
+ 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_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ }
return yy_current_state;
}
@@ -1663,28 +1635,26 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
* next_state = yy_try_NUL_trans( current_state );
*/
/* %if-c-only */
- static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
+static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
register 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 */
+ 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;
register YY_CHAR yy_c = 1;
- if ( yy_accept[yy_current_state] )
- {
+ 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 )
- {
+ }
+ 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_is_jam = (yy_current_state == 125);
@@ -1693,27 +1663,27 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* %if-c-only */
- static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
+static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
register char *yy_cp;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yy_cp = yyg->yy_c_buf_p;
+ yy_cp = yyg->yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yyg->yy_hold_char;
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
- { /* need to shift things up to make room */
+ 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];
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
register char *source =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
*--dest = *--source;
@@ -1721,19 +1691,19 @@ static int yy_get_next_buffer (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 = 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" );
- }
+ }
*--yy_cp = (char) c;
-/* %% [18.0] update yylineno here */
+ /* %% [18.0] update yylineno here */
- if ( c == '\n' ){
- --yylineno;
- }
+ if ( c == '\n' ) {
+ --yylineno;
+ }
yyg->yytext_ptr = yy_bp;
yyg->yy_hold_char = *yy_cp;
@@ -1746,9 +1716,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* %if-c-only */
#ifndef YY_NO_INPUT
#ifdef __cplusplus
- static int yyinput (yyscan_t yyscanner)
+static int yyinput (yyscan_t yyscanner)
#else
- static int input (yyscan_t yyscanner)
+static int input (yyscan_t yyscanner)
#endif
/* %endif */
@@ -1756,12 +1726,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* %endif */
{
int c;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
*yyg->yy_c_buf_p = yyg->yy_hold_char;
- if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
- {
+ if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) {
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
@@ -1770,61 +1739,60 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* This was really a NUL. */
*yyg->yy_c_buf_p = '\0';
- else
- { /* need more input */
+ else {
+ /* need more input */
yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
- switch ( yy_get_next_buffer( yyscanner ) )
- {
- case EOB_ACT_LAST_MATCH:
- /* This happens because yy_g_n_b()
- * sees that we've accumulated a
- * token and flags that we need to
- * try matching the token before
- * proceeding. But for input(),
- * there's no matching to consider.
- * So convert the EOB_ACT_LAST_MATCH
- * to EOB_ACT_END_OF_FILE.
- */
-
- /* Reset buffer status. */
- promela_restart(yyin ,yyscanner);
-
- /*FALLTHROUGH*/
-
- case EOB_ACT_END_OF_FILE:
- {
- if ( promela_wrap(yyscanner ) )
- return 0;
-
- if ( ! yyg->yy_did_buffer_switch_on_eof )
- YY_NEW_FILE;
+ switch ( yy_get_next_buffer( yyscanner ) ) {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ promela_restart(yyin ,yyscanner);
+
+ /*FALLTHROUGH*/
+
+ case EOB_ACT_END_OF_FILE: {
+ if ( promela_wrap(yyscanner ) )
+ return 0;
+
+ if ( ! yyg->yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
#ifdef __cplusplus
- return yyinput(yyscanner);
+ return yyinput(yyscanner);
#else
- return input(yyscanner);
+ return input(yyscanner);
#endif
- }
+ }
- case EOB_ACT_CONTINUE_SCAN:
- yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
- break;
- }
+ case EOB_ACT_CONTINUE_SCAN:
+ yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
+ break;
}
}
+ }
c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
*yyg->yy_c_buf_p = '\0'; /* preserve yytext */
yyg->yy_hold_char = *++yyg->yy_c_buf_p;
-/* %% [19.0] update BOL and yylineno */
+ /* %% [19.0] update BOL and yylineno */
if ( c == '\n' )
-
- do{ yylineno++;
- yycolumn=0;
- }while(0)
-;
+
+ do {
+ yylineno++;
+ yycolumn=0;
+ } while(0)
+ ;
return c;
}
@@ -1838,17 +1806,17 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
* @note This function does not reset the start condition to @c INITIAL .
*/
/* %if-c-only */
- void promela_restart (FILE * input_file , yyscan_t yyscanner)
+void promela_restart (FILE * input_file , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- if ( ! YY_CURRENT_BUFFER ){
- promela_ensure_buffer_stack (yyscanner);
+ if ( ! YY_CURRENT_BUFFER ) {
+ promela_ensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE =
- promela__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ promela__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
}
promela__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
@@ -1860,29 +1828,28 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
* @param yyscanner The scanner object.
*/
/* %if-c-only */
- void promela__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
+void promela__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* TODO. We should be able to replace this entire function body
* with
* promela_pop_buffer_state();
* promela_push_buffer_state(new_buffer);
- */
+ */
promela_ensure_buffer_stack (yyscanner);
if ( YY_CURRENT_BUFFER == new_buffer )
return;
- if ( YY_CURRENT_BUFFER )
- {
+ if ( YY_CURRENT_BUFFER ) {
/* Flush out information for old buffer. */
*yyg->yy_c_buf_p = yyg->yy_hold_char;
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
- }
+ }
YY_CURRENT_BUFFER_LVALUE = new_buffer;
promela__load_buffer_state(yyscanner );
@@ -1901,7 +1868,7 @@ static void promela__load_buffer_state (yyscan_t yyscanner)
/* %if-c++-only */
/* %endif */
{
- struct yyguts_t * yyg = (struct yyguts_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;
yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
@@ -1915,13 +1882,13 @@ static void promela__load_buffer_state (yyscan_t yyscanner)
* @return the allocated buffer state.
*/
/* %if-c-only */
- YY_BUFFER_STATE promela__create_buffer (FILE * file, int size , yyscan_t yyscanner)
+YY_BUFFER_STATE promela__create_buffer (FILE * file, int size , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
YY_BUFFER_STATE b;
-
+
b = (YY_BUFFER_STATE) promela_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in promela__create_buffer()" );
@@ -1947,12 +1914,12 @@ static void promela__load_buffer_state (yyscan_t yyscanner)
* @param yyscanner The scanner object.
*/
/* %if-c-only */
- void promela__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
+void promela__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! b )
return;
@@ -1978,36 +1945,36 @@ static void promela__load_buffer_state (yyscan_t yyscanner)
* such as during a promela_restart() or at EOF.
*/
/* %if-c-only */
- static void promela__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
+static void promela__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
int oerrno = errno;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
promela__flush_buffer(b ,yyscanner);
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then promela__init_buffer was _probably_
- * called from promela_restart() or through yy_get_next_buffer.
- * In that case, we don't want to reset the lineno or column.
- */
- if (b != YY_CURRENT_BUFFER){
- b->yy_bs_lineno = 1;
- b->yy_bs_column = 0;
- }
+ /* If b is the current buffer, then promela__init_buffer was _probably_
+ * called from promela_restart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != YY_CURRENT_BUFFER) {
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
-/* %if-c-only */
+ /* %if-c-only */
- b->yy_is_interactive = 0;
-
-/* %endif */
-/* %if-c++-only */
-/* %endif */
+ b->yy_is_interactive = 0;
+
+ /* %endif */
+ /* %if-c++-only */
+ /* %endif */
errno = oerrno;
}
@@ -2016,12 +1983,12 @@ static void promela__load_buffer_state (yyscan_t yyscanner)
* @param yyscanner The scanner object.
*/
/* %if-c-only */
- void promela__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
+void promela__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! b )
return;
@@ -2056,20 +2023,19 @@ void promela_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
/* %if-c++-only */
/* %endif */
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (new_buffer == NULL)
return;
promela_ensure_buffer_stack(yyscanner);
/* This block is copied from promela__switch_to_buffer. */
- if ( YY_CURRENT_BUFFER )
- {
+ if ( YY_CURRENT_BUFFER ) {
/* Flush out information for old buffer. */
*yyg->yy_c_buf_p = yyg->yy_hold_char;
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
- }
+ }
/* Only push if top exists. Otherwise, replace top. */
if (YY_CURRENT_BUFFER)
@@ -2093,7 +2059,7 @@ void promela_pop_buffer_state (yyscan_t yyscanner)
/* %if-c++-only */
/* %endif */
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!YY_CURRENT_BUFFER)
return;
@@ -2120,38 +2086,38 @@ static void promela_ensure_buffer_stack (yyscan_t yyscanner)
/* %endif */
{
yy_size_t num_to_alloc;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->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;
yyg->yy_buffer_stack = (struct yy_buffer_state**)promela_alloc
- (num_to_alloc * sizeof(struct yy_buffer_state*)
- , yyscanner);
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ , yyscanner);
if ( ! yyg->yy_buffer_stack )
YY_FATAL_ERROR( "out of dynamic memory in promela_ensure_buffer_stack()" );
-
+
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
yyg->yy_buffer_stack_max = num_to_alloc;
yyg->yy_buffer_stack_top = 0;
return;
}
- if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
+ 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 */;
num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
yyg->yy_buffer_stack = (struct yy_buffer_state**)promela_realloc
- (yyg->yy_buffer_stack,
- num_to_alloc * sizeof(struct yy_buffer_state*)
- , yyscanner);
+ (yyg->yy_buffer_stack,
+ num_to_alloc * sizeof(struct yy_buffer_state*)
+ , yyscanner);
if ( ! yyg->yy_buffer_stack )
YY_FATAL_ERROR( "out of dynamic memory in promela_ensure_buffer_stack()" );
@@ -2167,15 +2133,14 @@ static void promela_ensure_buffer_stack (yyscan_t yyscanner)
* @param base the character buffer
* @param size the size in bytes of the character buffer
* @param yyscanner The scanner object.
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE promela__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
-{
+YY_BUFFER_STATE promela__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) {
YY_BUFFER_STATE b;
-
+
if ( size < 2 ||
- base[size-2] != YY_END_OF_BUFFER_CHAR ||
- base[size-1] != YY_END_OF_BUFFER_CHAR )
+ 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;
@@ -2208,9 +2173,8 @@ YY_BUFFER_STATE promela__scan_buffer (char * base, yy_size_t size , yyscan_t y
* @note If you want to scan bytes that may contain NUL values, then use
* promela__scan_bytes() instead.
*/
-YY_BUFFER_STATE promela__scan_string (yyconst char * yystr , yyscan_t yyscanner)
-{
-
+YY_BUFFER_STATE promela__scan_string (yyconst char * yystr , yyscan_t yyscanner) {
+
return promela__scan_bytes(yystr,strlen(yystr) ,yyscanner);
}
/* %endif */
@@ -2223,12 +2187,11 @@ YY_BUFFER_STATE promela__scan_string (yyconst char * yystr , yyscan_t yyscanner)
* @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, yy_size_t _yybytes_len , yyscan_t yyscanner) {
YY_BUFFER_STATE b;
char *buf;
yy_size_t n, i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
buf = (char *) promela_alloc(n ,yyscanner );
@@ -2258,9 +2221,8 @@ 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)
-{
- (void) fprintf( stderr, "%s\n", msg );
+static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) {
+ (void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* %endif */
@@ -2292,10 +2254,9 @@ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
/** Get the user-defined data for this scanner.
* @param yyscanner The scanner object.
*/
-YY_EXTRA_TYPE promela_get_extra (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyextra;
+YY_EXTRA_TYPE promela_get_extra (yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yyextra;
}
/* %endif */
@@ -2303,64 +2264,58 @@ YY_EXTRA_TYPE promela_get_extra (yyscan_t yyscanner)
/** Get the current line number.
* @param yyscanner The scanner object.
*/
-int promela_get_lineno (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- if (! YY_CURRENT_BUFFER)
- return 0;
-
- return yylineno;
+int promela_get_lineno (yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+ if (! YY_CURRENT_BUFFER)
+ return 0;
+
+ return yylineno;
}
/** Get the current column number.
* @param yyscanner The scanner object.
*/
-int promela_get_column (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- if (! YY_CURRENT_BUFFER)
- return 0;
-
- return yycolumn;
+int promela_get_column (yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+ if (! YY_CURRENT_BUFFER)
+ return 0;
+
+ return yycolumn;
}
/** Get the input stream.
* @param yyscanner The scanner object.
*/
-FILE *promela_get_in (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyin;
+FILE *promela_get_in (yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yyin;
}
/** Get the output stream.
* @param yyscanner The scanner object.
*/
-FILE *promela_get_out (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyout;
+FILE *promela_get_out (yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yyout;
}
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-yy_size_t promela_get_leng (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyleng;
+yy_size_t promela_get_leng (yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yyleng;
}
/** Get the current token.
* @param yyscanner The scanner object.
*/
-char *promela_get_text (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yytext;
+char *promela_get_text (yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yytext;
}
/* %if-reentrant */
@@ -2369,10 +2324,9 @@ char *promela_get_text (yyscan_t yyscanner)
* @param user_defined The data to be associated with this scanner.
* @param yyscanner The scanner object.
*/
-void promela_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyextra = user_defined ;
+void promela_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yyextra = user_defined ;
}
/* %endif */
@@ -2381,30 +2335,28 @@ void promela_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
* @param line_number
* @param yyscanner The scanner object.
*/
-void promela_set_lineno (int line_number , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_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);
-
- yylineno = line_number;
+ /* lineno is only valid if an input buffer exists. */
+ if (! YY_CURRENT_BUFFER )
+ yy_fatal_error( "promela_set_lineno called with no buffer" , yyscanner);
+
+ yylineno = line_number;
}
/** Set the current column.
* @param line_number
* @param yyscanner The scanner object.
*/
-void promela_set_column (int column_no , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_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);
-
- yycolumn = column_no;
+ /* column is only valid if an input buffer exists. */
+ if (! YY_CURRENT_BUFFER )
+ yy_fatal_error( "promela_set_column called with no buffer" , yyscanner);
+
+ yycolumn = column_no;
}
/** Set the input stream. This does not discard the current
@@ -2413,28 +2365,24 @@ void promela_set_column (int column_no , yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @see promela__switch_to_buffer
*/
-void promela_set_in (FILE * in_str , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyin = in_str ;
+void promela_set_in (FILE * in_str , yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yyin = in_str ;
}
-void promela_set_out (FILE * out_str , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyout = out_str ;
+void promela_set_out (FILE * out_str , yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yyout = out_str ;
}
-int promela_get_debug (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yy_flex_debug;
+int promela_get_debug (yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yy_flex_debug;
}
-void promela_set_debug (int bdebug , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yy_flex_debug = bdebug ;
+void promela_set_debug (int bdebug , yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yy_flex_debug = bdebug ;
}
/* %endif */
@@ -2444,30 +2392,26 @@ void promela_set_debug (int bdebug , yyscan_t yyscanner)
/* %if-bison-bridge */
-YYSTYPE * promela_get_lval (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yylval;
+YYSTYPE * promela_get_lval (yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yylval;
}
-void promela_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yylval = yylval_param;
+void promela_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yylval = yylval_param;
}
-YYLTYPE *promela_get_lloc (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yylloc;
+YYLTYPE *promela_get_lloc (yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yylloc;
}
-
-void promela_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yylloc = yylloc_param;
+
+void promela_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yylloc = yylloc_param;
}
-
+
/* %endif */
/* User-visible API */
@@ -2480,22 +2424,22 @@ void promela_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
int promela_lex_init(yyscan_t* ptr_yy_globals)
{
- if (ptr_yy_globals == NULL){
- errno = EINVAL;
- return 1;
- }
+ if (ptr_yy_globals == NULL) {
+ errno = EINVAL;
+ return 1;
+ }
- *ptr_yy_globals = (yyscan_t) promela_alloc ( sizeof( struct yyguts_t ), NULL );
+ *ptr_yy_globals = (yyscan_t) promela_alloc ( sizeof( struct yyguts_t ), NULL );
- if (*ptr_yy_globals == NULL){
- errno = ENOMEM;
- return 1;
- }
+ if (*ptr_yy_globals == NULL) {
+ errno = ENOMEM;
+ return 1;
+ }
- /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
- memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
+ /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
+ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
- return yy_init_globals ( *ptr_yy_globals );
+ return yy_init_globals ( *ptr_yy_globals );
}
/* promela_lex_init_extra has the same functionality as promela_lex_init, but follows the
@@ -2509,76 +2453,74 @@ int promela_lex_init(yyscan_t* ptr_yy_globals)
int promela_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
{
- struct yyguts_t dummy_yyguts;
-
- promela_set_extra (yy_user_defined, &dummy_yyguts);
-
- if (ptr_yy_globals == NULL){
- errno = EINVAL;
- return 1;
- }
-
- *ptr_yy_globals = (yyscan_t) promela_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
-
- if (*ptr_yy_globals == NULL){
- errno = ENOMEM;
- return 1;
- }
-
- /* By setting to 0xAA, we expose bugs in
- yy_init_globals. Leave at 0x00 for releases. */
- memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
-
- promela_set_extra (yy_user_defined, *ptr_yy_globals);
-
- return yy_init_globals ( *ptr_yy_globals );
+ struct yyguts_t dummy_yyguts;
+
+ promela_set_extra (yy_user_defined, &dummy_yyguts);
+
+ if (ptr_yy_globals == NULL) {
+ errno = EINVAL;
+ return 1;
+ }
+
+ *ptr_yy_globals = (yyscan_t) promela_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
+
+ if (*ptr_yy_globals == NULL) {
+ errno = ENOMEM;
+ return 1;
+ }
+
+ /* By setting to 0xAA, we expose bugs in
+ yy_init_globals. Leave at 0x00 for releases. */
+ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
+
+ promela_set_extra (yy_user_defined, *ptr_yy_globals);
+
+ return yy_init_globals ( *ptr_yy_globals );
}
/* %endif if-c-only */
/* %if-c-only */
-static int yy_init_globals (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- /* Initialization is the same as for the non-reentrant scanner.
- * This function is called from promela_lex_destroy(), so don't allocate here.
- */
-
- yyg->yy_buffer_stack = 0;
- yyg->yy_buffer_stack_top = 0;
- yyg->yy_buffer_stack_max = 0;
- yyg->yy_c_buf_p = (char *) 0;
- yyg->yy_init = 0;
- yyg->yy_start = 0;
-
- yyg->yy_start_stack_ptr = 0;
- yyg->yy_start_stack_depth = 0;
- yyg->yy_start_stack = NULL;
-
-/* Defined in main.c */
+static int yy_init_globals (yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ /* Initialization is the same as for the non-reentrant scanner.
+ * This function is called from promela_lex_destroy(), so don't allocate here.
+ */
+
+ yyg->yy_buffer_stack = 0;
+ yyg->yy_buffer_stack_top = 0;
+ yyg->yy_buffer_stack_max = 0;
+ yyg->yy_c_buf_p = (char *) 0;
+ yyg->yy_init = 0;
+ yyg->yy_start = 0;
+
+ yyg->yy_start_stack_ptr = 0;
+ yyg->yy_start_stack_depth = 0;
+ yyg->yy_start_stack = NULL;
+
+ /* Defined in main.c */
#ifdef YY_STDINIT
- yyin = stdin;
- yyout = stdout;
+ yyin = stdin;
+ yyout = stdout;
#else
- yyin = (FILE *) 0;
- yyout = (FILE *) 0;
+ yyin = (FILE *) 0;
+ yyout = (FILE *) 0;
#endif
- /* For future reference: Set errno on error, since we are called by
- * promela_lex_init()
- */
- return 0;
+ /* For future reference: Set errno on error, since we are called by
+ * promela_lex_init()
+ */
+ return 0;
}
/* %endif */
/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
/* promela_lex_destroy is for both reentrant and non-reentrant scanners. */
-int promela_lex_destroy (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+int promela_lex_destroy (yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- /* Pop the buffer stack, destroying each element. */
- while(YY_CURRENT_BUFFER){
+ /* Pop the buffer stack, destroying each element. */
+ while(YY_CURRENT_BUFFER) {
promela__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
YY_CURRENT_BUFFER_LVALUE = NULL;
promela_pop_buffer_state(yyscanner);
@@ -2588,20 +2530,20 @@ int promela_lex_destroy (yyscan_t yyscanner)
promela_free(yyg->yy_buffer_stack ,yyscanner);
yyg->yy_buffer_stack = NULL;
- /* Destroy the start condition stack. */
- promela_free(yyg->yy_start_stack ,yyscanner );
- yyg->yy_start_stack = NULL;
+ /* Destroy the start condition stack. */
+ promela_free(yyg->yy_start_stack ,yyscanner );
+ yyg->yy_start_stack = NULL;
- /* Reset the globals. This is important in a non-reentrant scanner so the next time
- * promela_lex() is called, initialization will occur. */
- yy_init_globals( yyscanner);
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * promela_lex() is called, initialization will occur. */
+ yy_init_globals( yyscanner);
-/* %if-reentrant */
- /* Destroy the main struct (reentrant only). */
- promela_free ( yyscanner , yyscanner );
- yyscanner = NULL;
-/* %endif */
- return 0;
+ /* %if-reentrant */
+ /* Destroy the main struct (reentrant only). */
+ promela_free ( yyscanner , yyscanner );
+ yyscanner = NULL;
+ /* %endif */
+ return 0;
}
/* %endif */
@@ -2610,8 +2552,7 @@ 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)
-{
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) {
register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
@@ -2619,8 +2560,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysca
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
-{
+static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) {
register int n;
for ( n = 0; s[n]; ++n )
;
@@ -2629,13 +2569,11 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
}
#endif
-void *promela_alloc (yy_size_t size , yyscan_t yyscanner)
-{
+void *promela_alloc (yy_size_t size , yyscan_t yyscanner) {
return (void *) malloc( size );
}
-void *promela_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
-{
+void *promela_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) {
/* 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
@@ -2646,8 +2584,7 @@ void *promela_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
return (void *) realloc( (char *) ptr, size );
}
-void promela_free (void * ptr , yyscan_t yyscanner)
-{
+void promela_free (void * ptr , yyscan_t yyscanner) {
free( (char *) ptr ); /* see promela_realloc() for (char *) cast */
}