summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-11-12 12:36:27 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-11-12 12:36:27 (GMT)
commit8202b54c5d3ce1fbc4f079918551f2f076a221cb (patch)
tree20ba167c6d87e66e2e2b13e62bde1c92a9925175 /src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp
parentc66fa34eb48f81da05966b947a2e37067318a09f (diff)
downloaduscxml-8202b54c5d3ce1fbc4f079918551f2f076a221cb.zip
uscxml-8202b54c5d3ce1fbc4f079918551f2f076a221cb.tar.gz
uscxml-8202b54c5d3ce1fbc4f079918551f2f076a221cb.tar.bz2
More work on PROMELA transformation
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.cpp1862
1 files changed, 959 insertions, 903 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 13085dc..c6e4573 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,8 +230,8 @@ typedef size_t yy_size_t;
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-#define YY_LESS_LINENO(n)
-
+ #define YY_LESS_LINENO(n)
+
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
@@ -250,13 +250,14 @@ 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 */
@@ -290,9 +291,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.
*/
@@ -314,7 +315,7 @@ struct yy_buffer_state {
*/
#define YY_BUFFER_EOF_PENDING 2
-};
+ };
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
/* %if-c-only Standard (non-C++) definition */
@@ -433,175 +434,174 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
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 47
-#define YY_END_OF_BUFFER 48
+#define YY_NUM_RULES 46
+#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[125] = {
- 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, 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, 30,
- 0, 42, 0, 0, 0, 44, 2, 44, 44, 44,
- 3, 44, 44, 44, 44, 44, 44, 44, 44, 0,
-
- 1, 44, 44, 44, 44, 44, 4, 44, 44, 44,
- 1, 44, 44, 44, 44, 44, 8, 5, 6, 44,
- 44, 7, 44, 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[130] = {
- 0,
- 0, 0, 170, 171, 49, 51, 149, 50, 171, 161,
- 48, 171, 171, 171, 155, 171, 152, 171, 154, 147,
- 171, 38, 143, 39, 0, 56, 171, 171, 171, 119,
- 28, 133, 121, 128, 114, 115, 33, 20, 117, 171,
- 107, 171, 171, 68, 171, 60, 171, 151, 171, 64,
- 171, 73, 171, 171, 142, 135, 171, 171, 171, 171,
- 171, 0, 74, 70, 108, 106, 109, 104, 110, 102,
- 106, 98, 108, 102, 106, 98, 94, 97, 94, 171,
- 72, 75, 79, 125, 75, 104, 0, 97, 102, 89,
- 0, 90, 91, 87, 87, 92, 95, 94, 89, 77,
-
- 171, 81, 91, 90, 76, 75, 0, 79, 87, 83,
- 104, 70, 52, 80, 72, 63, 0, 0, 0, 69,
- 65, 0, 64, 171, 104, 106, 90, 108, 110
-} ;
-
-static yyconst flex_int16_t yy_def[130] = {
- 0,
- 124, 1, 124, 124, 124, 124, 124, 125, 124, 124,
- 126, 124, 124, 124, 124, 124, 124, 124, 124, 124,
- 124, 124, 124, 124, 127, 127, 124, 124, 124, 127,
- 127, 127, 127, 127, 127, 127, 127, 127, 127, 124,
- 124, 124, 124, 124, 124, 125, 124, 125, 124, 126,
- 124, 128, 124, 124, 129, 124, 124, 124, 124, 124,
- 124, 127, 125, 126, 127, 127, 127, 127, 127, 127,
- 127, 127, 127, 127, 127, 127, 127, 127, 127, 124,
- 126, 126, 128, 129, 129, 127, 127, 127, 127, 127,
- 127, 127, 127, 127, 127, 127, 127, 127, 127, 129,
-
- 124, 127, 127, 127, 127, 127, 127, 127, 127, 127,
- 129, 127, 127, 127, 127, 127, 127, 127, 127, 127,
- 127, 127, 127, 0, 124, 124, 124, 124, 124
-} ;
-
-static yyconst flex_int16_t yy_nxt[222] = {
- 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, 77, 66, 64, 47, 78, 74, 67, 75, 44,
- 44, 51, 52, 68, 48, 50, 76, 51, 47, 51,
- 82, 50, 51, 118, 48, 100, 82, 85, 52, 119,
- 101, 62, 111, 87, 52, 123, 52, 83, 48, 52,
-
- 122, 121, 120, 83, 46, 46, 50, 50, 81, 81,
- 84, 84, 87, 117, 85, 116, 115, 114, 87, 113,
- 87, 107, 112, 110, 109, 107, 108, 107, 106, 105,
- 104, 103, 87, 87, 102, 85, 99, 98, 97, 96,
- 95, 94, 93, 92, 91, 87, 90, 89, 88, 87,
- 86, 56, 85, 124, 80, 79, 73, 72, 71, 70,
- 69, 65, 59, 56, 55, 54, 53, 49, 45, 124,
- 3, 124, 124, 124, 124, 124, 124, 124, 124, 124,
- 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
- 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
-
- 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
- 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
- 124
-} ;
-
-static yyconst flex_int16_t yy_chk[222] = {
- 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, 38, 31, 26, 46, 38, 37, 31, 37, 44,
- 44, 50, 11, 31, 8, 52, 37, 64, 63, 81,
- 52, 83, 82, 113, 46, 85, 83, 100, 50, 113,
- 85, 127, 100, 123, 64, 121, 81, 52, 63, 82,
-
- 120, 116, 115, 83, 125, 125, 126, 126, 128, 128,
- 129, 129, 114, 112, 111, 110, 109, 108, 106, 105,
- 104, 103, 102, 99, 98, 97, 96, 95, 94, 93,
- 92, 90, 89, 88, 86, 84, 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, 30, 23, 20, 19, 17, 15, 10, 7, 3,
- 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
- 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
- 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
-
- 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
- 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
- 124
-} ;
-
-static yyconst flex_int16_t yy_rule_linenum[47] = {
- 0,
- 27, 29, 34, 35, 36, 37, 38, 39, 41, 42,
- 43, 44, 46, 47, 48, 50, 51, 53, 54, 56,
- 57, 58, 59, 61, 62, 64, 65, 66, 69, 70,
- 72, 73, 74, 76, 77, 79, 80, 82, 83, 85,
- 87, 90, 95, 96, 98, 101
-} ;
+ };
+static yyconst flex_int16_t yy_accept[124] =
+ { 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, 29,
+ 0, 41, 0, 0, 0, 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[129] =
+ { 0,
+ 0, 0, 169, 170, 49, 51, 148, 50, 170, 160,
+ 48, 170, 170, 170, 154, 170, 151, 170, 153, 146,
+ 170, 38, 142, 39, 0, 56, 170, 170, 170, 118,
+ 28, 132, 120, 127, 113, 114, 33, 20, 116, 170,
+ 106, 170, 170, 68, 170, 60, 170, 150, 170, 64,
+ 170, 73, 170, 170, 141, 134, 170, 170, 170, 170,
+ 170, 0, 74, 70, 107, 105, 108, 103, 109, 101,
+ 105, 97, 107, 101, 105, 97, 93, 96, 93, 170,
+ 72, 75, 79, 124, 75, 103, 0, 96, 101, 88,
+ 0, 89, 90, 86, 86, 91, 94, 93, 88, 77,
+
+ 170, 80, 90, 89, 75, 74, 0, 78, 86, 82,
+ 103, 69, 71, 69, 70, 57, 0, 0, 62, 61,
+ 0, 60, 170, 104, 106, 82, 108, 110
+ } ;
+
+static yyconst flex_int16_t yy_def[129] =
+ { 0,
+ 123, 1, 123, 123, 123, 123, 123, 124, 123, 123,
+ 125, 123, 123, 123, 123, 123, 123, 123, 123, 123,
+ 123, 123, 123, 123, 126, 126, 123, 123, 123, 126,
+ 126, 126, 126, 126, 126, 126, 126, 126, 126, 123,
+ 123, 123, 123, 123, 123, 124, 123, 124, 123, 125,
+ 123, 127, 123, 123, 128, 123, 123, 123, 123, 123,
+ 123, 126, 124, 125, 126, 126, 126, 126, 126, 126,
+ 126, 126, 126, 126, 126, 126, 126, 126, 126, 123,
+ 125, 125, 127, 128, 128, 126, 126, 126, 126, 126,
+ 126, 126, 126, 126, 126, 126, 126, 126, 126, 128,
+
+ 123, 126, 126, 126, 126, 126, 126, 126, 126, 126,
+ 128, 126, 126, 126, 126, 126, 126, 126, 126, 126,
+ 126, 126, 0, 123, 123, 123, 123, 123
+ } ;
+
+static yyconst flex_int16_t yy_nxt[221] =
+ { 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, 77, 66, 64, 47, 78, 74, 67, 75, 44,
+ 44, 51, 52, 68, 48, 50, 76, 51, 47, 51,
+ 82, 50, 51, 62, 48, 100, 82, 85, 52, 87,
+ 101, 122, 111, 121, 52, 120, 52, 83, 48, 52,
+
+ 119, 87, 118, 83, 46, 46, 50, 50, 81, 81,
+ 84, 84, 117, 85, 116, 115, 114, 87, 113, 87,
+ 107, 112, 110, 109, 107, 108, 107, 106, 105, 104,
+ 103, 87, 87, 102, 85, 99, 98, 97, 96, 95,
+ 94, 93, 92, 91, 87, 90, 89, 88, 87, 86,
+ 56, 85, 123, 80, 79, 73, 72, 71, 70, 69,
+ 65, 59, 56, 55, 54, 53, 49, 45, 123, 3,
+ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
+ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
+ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
+
+ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
+ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123
+ } ;
+
+static yyconst flex_int16_t yy_chk[221] =
+ { 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, 38, 31, 26, 46, 38, 37, 31, 37, 44,
+ 44, 50, 11, 31, 8, 52, 37, 64, 63, 81,
+ 52, 83, 82, 126, 46, 85, 83, 100, 50, 122,
+ 85, 120, 100, 119, 64, 116, 81, 52, 63, 82,
+
+ 115, 114, 113, 83, 124, 124, 125, 125, 127, 127,
+ 128, 128, 112, 111, 110, 109, 108, 106, 105, 104,
+ 103, 102, 99, 98, 97, 96, 95, 94, 93, 92,
+ 90, 89, 88, 86, 84, 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,
+ 30, 23, 20, 19, 17, 15, 10, 7, 3, 123,
+ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
+ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
+ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
+
+ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
+ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123
+ } ;
+
+static yyconst flex_int16_t yy_rule_linenum[46] =
+ { 0,
+ 27, 29, 34, 35, 36, 37, 38, 40, 41, 42,
+ 43, 45, 46, 47, 49, 50, 52, 53, 55, 56,
+ 57, 58, 60, 61, 63, 64, 65, 68, 69, 71,
+ 72, 73, 75, 76, 78, 79, 81, 82, 84, 86,
+ 89, 94, 95, 97, 100
+ } ;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
@@ -615,12 +615,12 @@ static yyconst flex_int16_t yy_rule_linenum[47] = {
/* see: http://spinroot.com/spin/Man/operators.html */
#define YY_NO_UNISTD_H 1
#line 14 "promela.l"
-
+
#include "../PromelaParser.h"
#include "promela.tab.hpp"
#define YYSTYPE PROMELA_STYPE
-#line 626 "promela.lex.yy.cpp"
+#line 624 "promela.lex.yy.cpp"
#define INITIAL 0
@@ -644,39 +644,40 @@ static yyconst flex_int16_t yy_rule_linenum[47] = {
/* %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;
-
-}; /* 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;
+
+ }; /* end struct yyguts_t */
/* %if-c-only */
@@ -686,10 +687,10 @@ 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
-
+ /* This must go here because YYSTYPE and YYLTYPE are included
+ * from bison output in section 1.*/
+ # define yylval yyg->yylval_r
+
int promela_lex_init (yyscan_t* scanner);
int promela_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
@@ -749,8 +750,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 */
@@ -880,7 +881,7 @@ static int input (yyscan_t yyscanner );
/* %if-c-only Standard (non-C++) definition */
extern int promela_lex \
-(YYSTYPE * yylval_param ,yyscan_t yyscanner);
+ (YYSTYPE * yylval_param ,yyscan_t yyscanner);
#define YY_DECL int promela_lex \
(YYSTYPE * yylval_param , yyscan_t yyscanner)
@@ -909,21 +910,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 25 "promela.l"
-#line 927 "promela.lex.yy.cpp"
+#line 925 "promela.lex.yy.cpp"
- yylval = yylval_param;
+ yylval = yylval_param;
- if ( !yyg->yy_init ) {
+ if ( !yyg->yy_init )
+ {
yyg->yy_init = 1;
#ifdef YY_USER_INIT
@@ -934,30 +937,31 @@ 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. */
@@ -968,433 +972,440 @@ 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 >= 125 )
+ if ( yy_current_state >= 124 )
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 != 124 );
+ }
+ while ( yy_current_state != 123 );
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 */
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 < 47 )
+ 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 == 47 )
+ else if ( yy_act == 46 )
fprintf( stderr, "--accepting default rule (\"%s\")\n",
yytext );
- else if ( yy_act == 48 )
+ 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 */
+ 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 27 "promela.l"
- /* multiline comments */
- YY_BREAK
- case 2:
- YY_RULE_SETUP
+/* multiline comments */
+ YY_BREAK
+case 2:
+YY_RULE_SETUP
#line 29 "promela.l"
+{
+ yylval->value = strdup(yytext);
+ return PML_TYPE;
+}
+ YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 34 "promela.l"
+{ return PML_LEN; }
+ YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 35 "promela.l"
+{ yylval->value = strdup(yytext); return PML_CONST; }
+ YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 36 "promela.l"
+{ return PML_PRINT; }
+ YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 37 "promela.l"
+{ return PML_TYPEDEF; }
+ YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 38 "promela.l"
+{ return PML_ASSERT; }
+ YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 40 "promela.l"
+{ return PML_NEG; }
+ YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 41 "promela.l"
+{ return PML_COMPL; }
+ YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 42 "promela.l"
+{ return PML_INCR; }
+ YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 43 "promela.l"
+{ return PML_DECR; }
+ YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 45 "promela.l"
+{ return PML_TIMES; }
+ YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 46 "promela.l"
+{ return PML_DIVIDE; }
+ YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 47 "promela.l"
+{ return PML_MODULO; }
+ YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 49 "promela.l"
+{ return PML_PLUS; }
+ YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 50 "promela.l"
+{ return PML_MINUS; }
+ YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 52 "promela.l"
+{ return PML_LSHIFT; }
+ YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 53 "promela.l"
+{ return PML_RSHIFT; }
+ YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 55 "promela.l"
+{ return PML_LE; }
+ YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 56 "promela.l"
+{ return PML_GE; }
+ YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 57 "promela.l"
+{ return PML_LT; }
+ YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 58 "promela.l"
+{ return PML_GT; }
+ YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 60 "promela.l"
+{ return PML_NE; }
+ YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 61 "promela.l"
+{ return PML_EQ; }
+ YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 63 "promela.l"
+{ return PML_BITAND; }
+ YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 64 "promela.l"
+{ return PML_BITXOR; }
+ YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 65 "promela.l"
+{ return PML_BITOR; }
+ YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 68 "promela.l"
+{ return PML_AND; }
+ YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 69 "promela.l"
+{ return PML_OR; }
+ YY_BREAK
+case 30:
+YY_RULE_SETUP
+#line 71 "promela.l"
+{ return PML_DOT; }
+ YY_BREAK
+case 31:
+YY_RULE_SETUP
+#line 72 "promela.l"
+{ return PML_COMMA; }
+ YY_BREAK
+case 32:
+YY_RULE_SETUP
+#line 73 "promela.l"
+{ return PML_SEMI; }
+ YY_BREAK
+case 33:
+YY_RULE_SETUP
+#line 75 "promela.l"
+{ return '('; }
+ YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 76 "promela.l"
+{ return ')'; }
+ YY_BREAK
+case 35:
+YY_RULE_SETUP
+#line 78 "promela.l"
+{ return '['; }
+ YY_BREAK
+case 36:
+YY_RULE_SETUP
+#line 79 "promela.l"
+{ return ']'; }
+ YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 81 "promela.l"
+{ return '{'; }
+ YY_BREAK
+case 38:
+YY_RULE_SETUP
+#line 82 "promela.l"
+{ return '}'; }
+ YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 84 "promela.l"
+{ return PML_ASGN; }
+ YY_BREAK
+case 40:
+/* rule 40 can match eol */
+YY_RULE_SETUP
+#line 86 "promela.l"
+{ yylval->value = strdup(yytext); return(PML_STRING); }
+ YY_BREAK
+case 41:
+/* rule 41 can match eol */
+YY_RULE_SETUP
+#line 89 "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 94 "promela.l"
+{ yylval->value = strdup(yytext); return PML_CONST; }
+ YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 95 "promela.l"
+{ yylval->value = strdup(yytext); return PML_NAME; }
+ YY_BREAK
+case 44:
+/* rule 44 can match eol */
+YY_RULE_SETUP
+#line 97 "promela.l"
+/* eat up whitespace */
+ YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 100 "promela.l"
+{ /*printf( "Unrecognized character: %s\n", yytext ); */ }
+ YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 101 "promela.l"
+ECHO;
+ YY_BREAK
+#line 1277 "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 )
{
- yylval->value = strdup(yytext);
- return PML_TYPE;
- }
- YY_BREAK
- case 3:
- YY_RULE_SETUP
-#line 34 "promela.l"
- { return PML_LEN; }
- YY_BREAK
- case 4:
- YY_RULE_SETUP
-#line 35 "promela.l"
- { yylval->value = strdup(yytext); return PML_CONST; }
- YY_BREAK
- case 5:
- YY_RULE_SETUP
-#line 36 "promela.l"
- { return PML_PRINT; }
- YY_BREAK
- case 6:
- YY_RULE_SETUP
-#line 37 "promela.l"
- { return PML_PRINTM; }
- YY_BREAK
- case 7:
- YY_RULE_SETUP
-#line 38 "promela.l"
- { return PML_TYPEDEF; }
- YY_BREAK
- case 8:
- YY_RULE_SETUP
-#line 39 "promela.l"
- { return PML_ASSERT; }
- YY_BREAK
- case 9:
- YY_RULE_SETUP
-#line 41 "promela.l"
- { return PML_NEG; }
- YY_BREAK
- case 10:
- YY_RULE_SETUP
-#line 42 "promela.l"
- { return PML_COMPL; }
- YY_BREAK
- case 11:
- YY_RULE_SETUP
-#line 43 "promela.l"
- { return PML_INCR; }
- YY_BREAK
- case 12:
- YY_RULE_SETUP
-#line 44 "promela.l"
- { return PML_DECR; }
- YY_BREAK
- case 13:
- YY_RULE_SETUP
-#line 46 "promela.l"
- { return PML_TIMES; }
- YY_BREAK
- case 14:
- YY_RULE_SETUP
-#line 47 "promela.l"
- { return PML_DIVIDE; }
- YY_BREAK
- case 15:
- YY_RULE_SETUP
-#line 48 "promela.l"
- { return PML_MODULO; }
- YY_BREAK
- case 16:
- YY_RULE_SETUP
-#line 50 "promela.l"
- { return PML_PLUS; }
- YY_BREAK
- case 17:
- YY_RULE_SETUP
-#line 51 "promela.l"
- { return PML_MINUS; }
- YY_BREAK
- case 18:
- YY_RULE_SETUP
-#line 53 "promela.l"
- { return PML_LSHIFT; }
- YY_BREAK
- case 19:
- YY_RULE_SETUP
-#line 54 "promela.l"
- { return PML_RSHIFT; }
- YY_BREAK
- case 20:
- YY_RULE_SETUP
-#line 56 "promela.l"
- { return PML_LE; }
- YY_BREAK
- case 21:
- YY_RULE_SETUP
-#line 57 "promela.l"
- { return PML_GE; }
- YY_BREAK
- case 22:
- YY_RULE_SETUP
-#line 58 "promela.l"
- { return PML_LT; }
- YY_BREAK
- case 23:
- YY_RULE_SETUP
-#line 59 "promela.l"
- { return PML_GT; }
- YY_BREAK
- case 24:
- YY_RULE_SETUP
-#line 61 "promela.l"
- { return PML_NE; }
- YY_BREAK
- case 25:
- YY_RULE_SETUP
-#line 62 "promela.l"
- { return PML_EQ; }
- YY_BREAK
- case 26:
- YY_RULE_SETUP
-#line 64 "promela.l"
- { return PML_BITAND; }
- YY_BREAK
- case 27:
- YY_RULE_SETUP
-#line 65 "promela.l"
- { return PML_BITXOR; }
- YY_BREAK
- case 28:
- YY_RULE_SETUP
-#line 66 "promela.l"
- { return PML_BITOR; }
- YY_BREAK
- case 29:
- YY_RULE_SETUP
-#line 69 "promela.l"
- { return PML_AND; }
- YY_BREAK
- case 30:
- YY_RULE_SETUP
-#line 70 "promela.l"
- { return PML_OR; }
- YY_BREAK
- case 31:
- YY_RULE_SETUP
-#line 72 "promela.l"
- { return PML_DOT; }
- YY_BREAK
- case 32:
- YY_RULE_SETUP
-#line 73 "promela.l"
- { return PML_COMMA; }
- YY_BREAK
- case 33:
- YY_RULE_SETUP
-#line 74 "promela.l"
- { return PML_SEMI; }
- YY_BREAK
- case 34:
- YY_RULE_SETUP
-#line 76 "promela.l"
- { return '('; }
- YY_BREAK
- case 35:
- YY_RULE_SETUP
-#line 77 "promela.l"
- { return ')'; }
- YY_BREAK
- case 36:
- YY_RULE_SETUP
-#line 79 "promela.l"
- { return '['; }
- YY_BREAK
- case 37:
- YY_RULE_SETUP
-#line 80 "promela.l"
- { return ']'; }
- YY_BREAK
- case 38:
- YY_RULE_SETUP
-#line 82 "promela.l"
- { return '{'; }
- YY_BREAK
- case 39:
- YY_RULE_SETUP
-#line 83 "promela.l"
- { return '}'; }
- YY_BREAK
- case 40:
- YY_RULE_SETUP
-#line 85 "promela.l"
- { return PML_ASGN; }
- YY_BREAK
- case 41:
- /* rule 41 can match eol */
- YY_RULE_SETUP
-#line 87 "promela.l"
- { yylval->value = strdup(yytext); return(PML_STRING); }
- YY_BREAK
- case 42:
- /* rule 42 can match eol */
- YY_RULE_SETUP
-#line 90 "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 95 "promela.l"
- { yylval->value = strdup(yytext); return PML_CONST; }
- YY_BREAK
- case 44:
- YY_RULE_SETUP
-#line 96 "promela.l"
- { yylval->value = strdup(yytext); return PML_NAME; }
- YY_BREAK
- case 45:
- /* rule 45 can match eol */
- YY_RULE_SETUP
-#line 98 "promela.l"
- /* eat up whitespace */
- YY_BREAK
- case 46:
- YY_RULE_SETUP
-#line 101 "promela.l"
- { /*printf( "Unrecognized character: %s\n", yytext ); */ }
- YY_BREAK
- case 47:
- YY_RULE_SETUP
-#line 102 "promela.l"
- ECHO;
- YY_BREAK
-#line 1284 "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;
+ /* 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 */
@@ -1418,7 +1429,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;
@@ -1426,24 +1437,26 @@ 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. */
@@ -1459,20 +1472,22 @@ 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 )
@@ -1481,45 +1496,49 @@ 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;
@@ -1546,32 +1565,35 @@ 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 >= 125 )
+ if ( yy_current_state >= 124 )
yy_c = yy_meta[(unsigned int) yy_c];
- }
+ }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- }
+ }
return yy_current_state;
}
@@ -1582,55 +1604,57 @@ static yy_state_type yy_get_previous_state (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 >= 125 )
+ if ( yy_current_state >= 124 )
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 == 124);
+ yy_is_jam = (yy_current_state == 123);
return yy_is_jam ? 0 : yy_current_state;
}
/* %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;
@@ -1638,15 +1662,15 @@ 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 = 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 */
yyg->yytext_ptr = yy_bp;
yyg->yy_hold_char = *yy_cp;
@@ -1659,9 +1683,9 @@ static void yyunput (int c, register char * yy_bp , 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 */
@@ -1669,11 +1693,12 @@ static int input (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.
@@ -1682,53 +1707,55 @@ static int input (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 */
return c;
}
@@ -1742,17 +1769,17 @@ static int input (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);
@@ -1764,28 +1791,29 @@ void promela_restart (FILE * input_file , 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 );
@@ -1804,7 +1832,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;
@@ -1818,13 +1846,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()" );
@@ -1850,12 +1878,12 @@ YY_BUFFER_STATE promela__create_buffer (FILE * file, int size , yyscan_t yysca
* @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;
@@ -1881,36 +1909,36 @@ void promela__delete_buffer (YY_BUFFER_STATE b , 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-c-only */
+ /* 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;
+ }
- b->yy_is_interactive = 0;
+/* %if-c-only */
- /* %endif */
- /* %if-c++-only */
- /* %endif */
+ b->yy_is_interactive = 0;
+
+/* %endif */
+/* %if-c++-only */
+/* %endif */
errno = oerrno;
}
@@ -1919,12 +1947,12 @@ static void promela__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yy
* @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;
@@ -1959,19 +1987,20 @@ 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)
@@ -1995,7 +2024,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;
@@ -2022,38 +2051,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()" );
@@ -2069,14 +2098,15 @@ 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;
@@ -2109,8 +2139,9 @@ 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 */
@@ -2123,11 +2154,12 @@ 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 );
@@ -2157,8 +2189,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) {
- (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 */
@@ -2190,9 +2223,10 @@ 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 */
@@ -2200,58 +2234,64 @@ 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 */
@@ -2260,9 +2300,10 @@ 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 */
@@ -2271,28 +2312,30 @@ 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;
-
- /* lineno is only valid if an input buffer exists. */
- if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "promela_set_lineno called with no buffer" , yyscanner);
+void promela_set_lineno (int line_number , yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)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;
-
- /* column is only valid if an input buffer exists. */
- if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "promela_set_column called with no buffer" , yyscanner);
+void promela_set_column (int column_no , yyscan_t yyscanner)
+{
+ struct yyguts_t * yyg = (struct yyguts_t*)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
@@ -2301,24 +2344,28 @@ 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 */
@@ -2328,14 +2375,16 @@ 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;
}
/* %endif */
@@ -2350,22 +2399,22 @@ void promela_set_lval (YYSTYPE * yylval_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
@@ -2379,74 +2428,76 @@ 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);
@@ -2456,20 +2507,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 */
@@ -2478,7 +2529,8 @@ 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];
@@ -2486,7 +2538,8 @@ 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 )
;
@@ -2495,11 +2548,13 @@ 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
@@ -2510,7 +2565,8 @@ 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 */
}
@@ -2521,4 +2577,4 @@ void promela_free (void * ptr , yyscan_t yyscanner) {
/* %ok-for-header */
-#line 102 "promela.l"
+#line 101 "promela.l"