#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_SUBMINOR_VERSION 39
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
-extern int yyleng;
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern yy_size_t yyleng;
extern FILE *yyin, *yyout;
#define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n)
+ #define YY_LINENO_REWIND_TO(ptr)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
#define unput(c) yyunput( c, (yytext_ptr) )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
-static int yy_n_chars; /* number of characters read into yy_ch_buf */
-int yyleng;
+static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
+yy_size_t yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
void *yyalloc (yy_size_t );
void *yyrealloc (void *,yy_size_t );
/* Begin user sect3 */
-#define yywrap(n) 1
+#define yywrap() 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[161] =
+static yyconst flex_int16_t yy_accept[159] =
{ 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 31, 29, 18, 18, 29, 29, 29, 29, 29, 29,
- 29, 29, 29, 29, 29, 29, 29, 29, 15, 16,
- 16, 29, 16, 10, 10, 18, 26, 0, 3, 0,
- 27, 12, 0, 0, 11, 0, 0, 0, 0, 0,
- 0, 0, 21, 23, 25, 24, 22, 0, 9, 28,
- 0, 0, 0, 14, 14, 16, 16, 16, 10, 10,
- 10, 0, 12, 0, 11, 0, 0, 0, 20, 0,
- 0, 0, 0, 0, 0, 0, 0, 16, 10, 10,
- 10, 0, 19, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 16, 13, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 16, 6, 0, 0, 0, 0, 0,
- 0, 2, 0, 0, 0, 0, 0, 0, 0, 0,
- 4, 17, 0, 0, 2, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
- 0, 0, 5, 8, 0, 0, 0, 0, 7, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 31, 29,
+ 18, 18, 29, 29, 29, 29, 29, 29, 29, 29,
+ 29, 29, 29, 29, 29, 29, 15, 16, 16, 29,
+ 16, 10, 10, 18, 26, 0, 3, 0, 27, 12,
+ 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,
+ 21, 23, 25, 24, 22, 0, 9, 28, 0, 0,
+ 0, 14, 14, 16, 16, 16, 10, 10, 10, 0,
+ 12, 0, 11, 0, 0, 0, 20, 0, 0, 0,
+ 0, 0, 0, 0, 0, 16, 10, 10, 10, 0,
+ 13, 19, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 0, 16, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 16, 6, 0, 0, 0, 0, 0, 0, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4, 17,
+ 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
+ 5, 8, 0, 0, 0, 0, 7, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
2, 2, 4, 5, 5, 5, 6, 1, 1, 1,
7, 8, 8, 8, 8, 1, 1, 7, 7, 7,
7, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 3, 1, 1
+ 8, 8, 8, 3, 1, 4
} ;
-static yyconst flex_int16_t yy_base[175] =
+static yyconst flex_int16_t yy_base[173] =
{ 0,
- 0, 385, 378, 40, 41, 383, 72, 382, 34, 44,
- 388, 393, 61, 117, 368, 116, 115, 115, 115, 48,
- 367, 107, 368, 339, 127, 120, 0, 147, 393, 0,
- 127, 0, 133, 156, 168, 153, 393, 125, 393, 380,
- 393, 0, 369, 127, 393, 160, 371, 377, 347, 21,
- 343, 346, 393, 393, 393, 393, 393, 359, 393, 393,
- 183, 343, 339, 393, 356, 0, 183, 340, 187, 348,
- 347, 0, 0, 0, 178, 359, 195, 365, 354, 326,
- 332, 325, 334, 328, 204, 326, 331, 324, 393, 335,
- 150, 311, 343, 342, 315, 322, 340, 179, 313, 207,
-
- 319, 316, 317, 393, 337, 333, 305, 302, 311, 301,
- 310, 190, 338, 337, 393, 307, 322, 301, 305, 277,
- 208, 311, 307, 278, 271, 270, 248, 246, 213, 130,
- 393, 393, 263, 235, 207, 221, 218, 229, 213, 213,
- 206, 234, 218, 210, 208, 193, 219, 393, 223, 204,
- 176, 157, 393, 393, 120, 106, 97, 119, 393, 393,
- 245, 251, 259, 263, 267, 273, 280, 284, 292, 300,
- 304, 310, 318, 326
+ 0, 383, 34, 382, 65, 381, 37, 105, 387, 391,
+ 54, 111, 367, 110, 109, 109, 112, 41, 366, 104,
+ 367, 338, 124, 117, 0, 144, 391, 0, 121, 0,
+ 135, 155, 140, 179, 391, 160, 391, 379, 391, 0,
+ 368, 141, 391, 167, 370, 376, 346, 103, 342, 345,
+ 391, 391, 391, 391, 391, 358, 391, 391, 175, 342,
+ 338, 391, 355, 0, 185, 339, 184, 347, 346, 0,
+ 0, 322, 175, 357, 175, 363, 352, 324, 330, 323,
+ 332, 326, 201, 324, 329, 322, 391, 333, 181, 309,
+ 391, 341, 340, 313, 320, 338, 178, 311, 146, 317,
+
+ 314, 315, 335, 331, 303, 300, 309, 299, 308, 188,
+ 336, 335, 391, 305, 320, 281, 283, 271, 203, 288,
+ 281, 271, 266, 264, 245, 242, 208, 104, 391, 391,
+ 244, 218, 204, 219, 206, 224, 201, 212, 204, 229,
+ 215, 208, 207, 200, 219, 391, 233, 221, 200, 181,
+ 391, 391, 149, 122, 86, 41, 391, 391, 245, 251,
+ 259, 263, 267, 273, 280, 284, 292, 300, 304, 310,
+ 318, 326
} ;
-static yyconst flex_int16_t yy_def[175] =
+static yyconst flex_int16_t yy_def[173] =
{ 0,
- 160, 1, 1, 1, 1, 5, 160, 7, 1, 1,
- 160, 160, 160, 160, 160, 161, 162, 163, 160, 160,
- 160, 160, 164, 160, 160, 160, 165, 164, 160, 166,
- 167, 166, 166, 160, 160, 160, 160, 161, 160, 161,
- 160, 168, 160, 163, 160, 163, 169, 170, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 164, 160, 160,
- 160, 160, 160, 160, 164, 166, 167, 166, 160, 160,
- 160, 171, 168, 172, 163, 169, 169, 170, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 166, 160, 160,
- 171, 172, 160, 160, 160, 160, 160, 160, 160, 160,
-
- 160, 160, 166, 160, 160, 160, 160, 160, 160, 160,
- 160, 173, 160, 166, 160, 160, 160, 160, 160, 160,
- 173, 160, 173, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 174, 160, 160, 160, 174, 160, 174, 160,
- 160, 160, 160, 160, 160, 160, 160, 160, 160, 0,
- 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160
+ 158, 1, 1, 3, 158, 5, 1, 1, 158, 158,
+ 158, 158, 158, 159, 160, 161, 158, 158, 158, 158,
+ 162, 158, 158, 158, 163, 162, 158, 164, 165, 164,
+ 164, 158, 158, 158, 158, 159, 158, 159, 158, 166,
+ 158, 161, 158, 161, 167, 168, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 162, 158, 158, 158, 158,
+ 158, 158, 162, 164, 165, 164, 158, 158, 158, 169,
+ 166, 170, 161, 167, 167, 168, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 164, 158, 158, 169, 170,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+
+ 158, 164, 158, 158, 158, 158, 158, 158, 158, 171,
+ 158, 164, 158, 158, 158, 158, 158, 158, 171, 158,
+ 171, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 172, 158, 158, 158, 172, 158, 172, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 0, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158
} ;
-static yyconst flex_int16_t yy_nxt[440] =
+static yyconst flex_int16_t yy_nxt[438] =
{ 0,
- 12, 13, 14, 13, 15, 16, 12, 17, 18, 12,
- 12, 12, 19, 12, 12, 12, 12, 20, 21, 22,
- 23, 23, 23, 23, 23, 12, 12, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 12, 24, 12, 25, 34, 35, 35,
- 25, 81, 26, 26, 27, 27, 27, 34, 35, 35,
- 82, 28, 36, 36, 36, 53, 54, 29, 28, 28,
- 28, 28, 12, 13, 14, 13, 15, 16, 30, 17,
- 18, 30, 30, 30, 26, 30, 30, 30, 12, 20,
- 21, 22, 31, 31, 31, 31, 31, 32, 12, 31,
-
- 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
- 31, 31, 31, 31, 31, 12, 24, 12, 36, 36,
- 36, 39, 41, 45, 47, 56, 57, 48, 61, 47,
- 39, 159, 48, 66, 61, 45, 66, 66, 66, 158,
- 46, 40, 49, 59, 50, 157, 51, 49, 52, 50,
- 40, 63, 46, 52, 36, 36, 36, 156, 43, 62,
- 65, 65, 65, 59, 136, 68, 137, 65, 75, 69,
- 69, 69, 70, 71, 65, 65, 65, 65, 70, 71,
- 72, 69, 69, 69, 61, 46, 45, 155, 154, 66,
- 70, 71, 66, 66, 66, 122, 85, 85, 85, 59,
-
- 69, 69, 69, 46, 77, 100, 109, 93, 100, 70,
- 71, 110, 112, 122, 129, 123, 153, 85, 85, 85,
- 135, 135, 135, 148, 148, 160, 135, 135, 135, 152,
- 142, 142, 142, 123, 143, 142, 142, 142, 151, 143,
- 150, 146, 145, 149, 149, 38, 38, 38, 38, 38,
- 38, 38, 38, 42, 144, 141, 140, 42, 42, 44,
- 44, 44, 44, 44, 44, 44, 44, 58, 58, 58,
- 58, 64, 139, 64, 66, 138, 134, 66, 133, 66,
- 66, 67, 132, 131, 67, 67, 67, 67, 73, 130,
- 73, 73, 76, 76, 76, 76, 76, 76, 76, 76,
-
- 78, 78, 78, 78, 78, 78, 78, 78, 91, 160,
- 91, 92, 129, 92, 92, 128, 92, 92, 121, 121,
- 121, 121, 121, 121, 121, 121, 147, 147, 147, 147,
- 147, 147, 147, 147, 127, 126, 125, 124, 61, 61,
- 120, 119, 118, 117, 116, 115, 47, 114, 110, 113,
- 111, 108, 107, 106, 48, 105, 104, 89, 103, 102,
- 101, 99, 98, 97, 96, 95, 94, 79, 77, 90,
- 89, 88, 59, 87, 86, 59, 84, 83, 80, 79,
- 77, 74, 160, 60, 59, 55, 37, 160, 33, 25,
- 26, 25, 11, 160, 160, 160, 160, 160, 160, 160,
-
- 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160, 160
+ 10, 11, 12, 11, 13, 14, 10, 15, 16, 10,
+ 10, 10, 17, 10, 10, 10, 10, 18, 19, 20,
+ 21, 21, 21, 21, 21, 10, 10, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 10, 22, 10, 24, 25, 25, 25,
+ 32, 33, 33, 157, 26, 34, 34, 34, 51, 52,
+ 27, 26, 26, 26, 26, 10, 11, 12, 11, 13,
+ 14, 28, 15, 16, 28, 28, 28, 24, 28, 28,
+ 28, 10, 18, 19, 20, 29, 29, 29, 29, 29,
+ 30, 10, 29, 29, 29, 29, 29, 29, 29, 29,
+
+ 29, 29, 29, 29, 29, 29, 29, 29, 10, 22,
+ 10, 23, 34, 34, 34, 37, 39, 43, 32, 33,
+ 33, 45, 54, 55, 46, 59, 45, 64, 156, 46,
+ 64, 64, 64, 79, 44, 38, 59, 57, 134, 47,
+ 135, 48, 80, 49, 47, 50, 48, 99, 61, 43,
+ 50, 110, 41, 67, 67, 67, 60, 63, 63, 63,
+ 57, 155, 68, 69, 63, 37, 44, 66, 67, 67,
+ 67, 63, 63, 63, 63, 73, 59, 68, 69, 70,
+ 34, 34, 34, 43, 75, 38, 154, 92, 83, 83,
+ 83, 64, 44, 120, 64, 64, 64, 67, 67, 67,
+
+ 44, 57, 99, 68, 69, 107, 68, 69, 120, 127,
+ 108, 153, 152, 121, 83, 83, 83, 133, 133, 133,
+ 146, 133, 133, 133, 146, 140, 140, 140, 121, 141,
+ 140, 140, 140, 151, 141, 158, 150, 149, 148, 144,
+ 147, 143, 142, 139, 147, 36, 36, 36, 36, 36,
+ 36, 36, 36, 40, 138, 137, 136, 40, 40, 42,
+ 42, 42, 42, 42, 42, 42, 42, 56, 56, 56,
+ 56, 62, 132, 62, 64, 131, 130, 64, 129, 64,
+ 64, 65, 128, 158, 65, 65, 65, 65, 71, 127,
+ 71, 71, 74, 74, 74, 74, 74, 74, 74, 74,
+
+ 76, 76, 76, 76, 76, 76, 76, 76, 89, 126,
+ 89, 90, 125, 90, 90, 124, 90, 90, 119, 119,
+ 119, 119, 119, 119, 119, 119, 145, 145, 145, 145,
+ 145, 145, 145, 145, 123, 122, 59, 59, 118, 117,
+ 116, 115, 114, 113, 45, 112, 108, 111, 109, 106,
+ 105, 104, 46, 103, 91, 87, 102, 101, 100, 98,
+ 97, 96, 95, 94, 93, 77, 75, 91, 88, 87,
+ 86, 57, 85, 84, 57, 82, 81, 78, 77, 75,
+ 72, 158, 58, 57, 53, 35, 158, 31, 23, 23,
+ 9, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158
} ;
-static yyconst flex_int16_t yy_chk[440] =
+static yyconst flex_int16_t yy_chk[438] =
{ 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, 4, 9, 9, 9,
- 10, 50, 4, 5, 5, 5, 5, 10, 10, 10,
- 50, 5, 13, 13, 13, 20, 20, 5, 5, 5,
- 5, 5, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 14, 14,
- 14, 16, 17, 18, 19, 22, 22, 19, 25, 26,
- 38, 158, 26, 31, 33, 44, 31, 31, 31, 157,
- 18, 16, 19, 31, 19, 156, 19, 26, 19, 26,
- 38, 26, 44, 26, 36, 36, 36, 155, 17, 25,
- 28, 28, 28, 28, 130, 33, 130, 28, 46, 34,
- 34, 34, 91, 91, 28, 28, 28, 28, 34, 34,
- 34, 35, 35, 35, 61, 46, 75, 152, 151, 67,
- 35, 35, 67, 67, 67, 112, 61, 61, 61, 67,
-
- 69, 69, 69, 75, 77, 85, 98, 77, 100, 69,
- 69, 98, 100, 121, 129, 112, 150, 85, 85, 85,
- 135, 135, 135, 143, 147, 149, 129, 129, 129, 146,
- 138, 138, 138, 121, 138, 142, 142, 142, 145, 142,
- 144, 141, 140, 143, 147, 161, 161, 161, 161, 161,
- 161, 161, 161, 162, 139, 137, 136, 162, 162, 163,
- 163, 163, 163, 163, 163, 163, 163, 164, 164, 164,
- 164, 165, 134, 165, 166, 133, 128, 166, 127, 166,
- 166, 167, 126, 125, 167, 167, 167, 167, 168, 124,
- 168, 168, 169, 169, 169, 169, 169, 169, 169, 169,
-
- 170, 170, 170, 170, 170, 170, 170, 170, 171, 123,
- 171, 172, 122, 172, 172, 120, 172, 172, 173, 173,
- 173, 173, 173, 173, 173, 173, 174, 174, 174, 174,
- 174, 174, 174, 174, 119, 118, 117, 116, 114, 113,
- 111, 110, 109, 108, 107, 106, 105, 103, 102, 101,
- 99, 97, 96, 95, 94, 93, 92, 90, 88, 87,
- 86, 84, 83, 82, 81, 80, 79, 78, 76, 71,
- 70, 68, 65, 63, 62, 58, 52, 51, 49, 48,
- 47, 43, 40, 24, 23, 21, 15, 11, 8, 6,
- 3, 2, 160, 160, 160, 160, 160, 160, 160, 160,
-
- 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160, 160
+ 1, 1, 1, 1, 1, 1, 3, 3, 3, 3,
+ 7, 7, 7, 156, 3, 11, 11, 11, 18, 18,
+ 3, 3, 3, 3, 3, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 8, 12, 12, 12, 14, 15, 16, 8, 8,
+ 8, 17, 20, 20, 17, 23, 24, 29, 155, 24,
+ 29, 29, 29, 48, 16, 14, 31, 29, 128, 17,
+ 128, 17, 48, 17, 24, 17, 24, 99, 24, 42,
+ 24, 99, 15, 33, 33, 33, 23, 26, 26, 26,
+ 26, 154, 33, 33, 26, 36, 42, 31, 32, 32,
+ 32, 26, 26, 26, 26, 44, 59, 32, 32, 32,
+ 34, 34, 34, 73, 75, 36, 153, 75, 59, 59,
+ 59, 65, 44, 110, 65, 65, 65, 67, 67, 67,
+
+ 73, 65, 83, 89, 89, 97, 67, 67, 119, 127,
+ 97, 150, 149, 110, 83, 83, 83, 133, 133, 133,
+ 141, 127, 127, 127, 145, 136, 136, 136, 119, 136,
+ 140, 140, 140, 148, 140, 147, 144, 143, 142, 139,
+ 141, 138, 137, 135, 145, 159, 159, 159, 159, 159,
+ 159, 159, 159, 160, 134, 132, 131, 160, 160, 161,
+ 161, 161, 161, 161, 161, 161, 161, 162, 162, 162,
+ 162, 163, 126, 163, 164, 125, 124, 164, 123, 164,
+ 164, 165, 122, 121, 165, 165, 165, 165, 166, 120,
+ 166, 166, 167, 167, 167, 167, 167, 167, 167, 167,
+
+ 168, 168, 168, 168, 168, 168, 168, 168, 169, 118,
+ 169, 170, 117, 170, 170, 116, 170, 170, 171, 171,
+ 171, 171, 171, 171, 171, 171, 172, 172, 172, 172,
+ 172, 172, 172, 172, 115, 114, 112, 111, 109, 108,
+ 107, 106, 105, 104, 103, 102, 101, 100, 98, 96,
+ 95, 94, 93, 92, 90, 88, 86, 85, 84, 82,
+ 81, 80, 79, 78, 77, 76, 74, 72, 69, 68,
+ 66, 63, 61, 60, 56, 50, 49, 47, 46, 45,
+ 41, 38, 22, 21, 19, 13, 9, 6, 4, 2,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158
} ;
static yy_state_type yy_last_accepting_state;
-
-#line 38 "dtc-lexer.l"
+#line 37 "dtc-lexer.l"
#include "dtc.h"
#include "srcpos.h"
#include "dtc-parser.tab.h"
YYLTYPE yylloc;
+extern bool treesource_error;
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
#define YY_USER_ACTION \
BEGIN(V1); \
static void push_input_file(const char *filename);
-static int pop_input_file(void);
-#line 664 "dtc-lexer.lex.c"
+static bool pop_input_file(void);
+static void lexical_error(const char *fmt, ...);
+#line 666 "dtc-lexer.lex.c"
#define INITIAL 0
-#define INCLUDE 1
-#define BYTESTRING 2
-#define PROPNODENAME 3
-#define V1 4
+#define BYTESTRING 1
+#define PROPNODENAME 2
+#define V1 3
#ifndef YY_NO_UNISTD_H
/* Special case for "unistd.h", since it is non-ANSI. We include it way
void yyset_out (FILE * out_str );
-int yyget_leng (void );
+yy_size_t yyget_leng (void );
char *yyget_text (void );
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 67 "dtc-lexer.l"
-
-#line 858 "dtc-lexer.lex.c"
-
if ( !(yy_init) )
{
(yy_init) = 1;
yy_load_buffer_state( );
}
+ {
+#line 68 "dtc-lexer.l"
+
+#line 886 "dtc-lexer.lex.c"
+
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
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 >= 161 )
+ if ( yy_current_state >= 159 )
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 != 160 );
+ while ( yy_current_state != 158 );
yy_cp = (yy_last_accepting_cpos);
yy_current_state = (yy_last_accepting_state);
case 1:
/* rule 1 can match eol */
YY_RULE_SETUP
-#line 68 "dtc-lexer.l"
+#line 69 "dtc-lexer.l"
{
char *name = strchr(yytext, '\"') + 1;
yytext[yyleng-1] = '\0';
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
-#line 74 "dtc-lexer.l"
+#line 75 "dtc-lexer.l"
{
char *line, *tmp, *fn;
/* skip text before line # */
line = yytext;
- while (!isdigit(*line))
+ while (!isdigit((unsigned char)*line))
line++;
/* skip digits in line # */
tmp = line;
- while (!isspace(*tmp))
+ while (!isspace((unsigned char)*tmp))
tmp++;
/* "NULL"-terminate line # */
*tmp = '\0';
}
YY_BREAK
case YY_STATE_EOF(INITIAL):
-case YY_STATE_EOF(INCLUDE):
case YY_STATE_EOF(BYTESTRING):
case YY_STATE_EOF(PROPNODENAME):
case YY_STATE_EOF(V1):
-#line 95 "dtc-lexer.l"
+#line 96 "dtc-lexer.l"
{
if (!pop_input_file()) {
yyterminate();
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
-#line 101 "dtc-lexer.l"
+#line 102 "dtc-lexer.l"
{
DPRINT("String: %s\n", yytext);
yylval.data = data_copy_escape_string(yytext+1,
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 108 "dtc-lexer.l"
+#line 109 "dtc-lexer.l"
{
DPRINT("Keyword: /dts-v1/\n");
dts_version = 1;
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 115 "dtc-lexer.l"
+#line 116 "dtc-lexer.l"
{
DPRINT("Keyword: /memreserve/\n");
BEGIN_DEFAULT();
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 121 "dtc-lexer.l"
+#line 122 "dtc-lexer.l"
{
DPRINT("Keyword: /bits/\n");
BEGIN_DEFAULT();
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 127 "dtc-lexer.l"
+#line 128 "dtc-lexer.l"
{
DPRINT("Keyword: /delete-property/\n");
DPRINT("<PROPNODENAME>\n");
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 134 "dtc-lexer.l"
+#line 135 "dtc-lexer.l"
{
DPRINT("Keyword: /delete-node/\n");
DPRINT("<PROPNODENAME>\n");
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 141 "dtc-lexer.l"
+#line 142 "dtc-lexer.l"
{
DPRINT("Label: %s\n", yytext);
yylval.labelref = xstrdup(yytext);
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 148 "dtc-lexer.l"
+#line 149 "dtc-lexer.l"
{
- yylval.literal = xstrdup(yytext);
- DPRINT("Literal: '%s'\n", yylval.literal);
+ char *e;
+ DPRINT("Integer Literal: '%s'\n", yytext);
+
+ errno = 0;
+ yylval.integer = strtoull(yytext, &e, 0);
+
+ assert(!(*e) || !e[strspn(e, "UL")]);
+
+ if (errno == ERANGE)
+ lexical_error("Integer literal '%s' out of range",
+ yytext);
+ else
+ /* ERANGE is the only strtoull error triggerable
+ * by strings matching the pattern */
+ assert(errno == 0);
return DT_LITERAL;
}
YY_BREAK
case 11:
/* rule 11 can match eol */
YY_RULE_SETUP
-#line 154 "dtc-lexer.l"
+#line 168 "dtc-lexer.l"
{
- yytext[yyleng-1] = '\0';
- yylval.literal = xstrdup(yytext+1);
- DPRINT("Character literal: %s\n", yylval.literal);
+ struct data d;
+ DPRINT("Character literal: %s\n", yytext);
+
+ d = data_copy_escape_string(yytext+1, yyleng-2);
+ if (d.len == 1) {
+ lexical_error("Empty character literal");
+ yylval.integer = 0;
+ return DT_CHAR_LITERAL;
+ }
+
+ yylval.integer = (unsigned char)d.val[0];
+
+ if (d.len > 2)
+ lexical_error("Character literal has %d"
+ " characters instead of 1",
+ d.len - 1);
+
return DT_CHAR_LITERAL;
}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 161 "dtc-lexer.l"
+#line 189 "dtc-lexer.l"
{ /* label reference */
DPRINT("Ref: %s\n", yytext+1);
yylval.labelref = xstrdup(yytext+1);
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 167 "dtc-lexer.l"
+#line 195 "dtc-lexer.l"
{ /* new-style path reference */
yytext[yyleng-1] = '\0';
DPRINT("Ref: %s\n", yytext+2);
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 174 "dtc-lexer.l"
+#line 202 "dtc-lexer.l"
{
yylval.byte = strtol(yytext, NULL, 16);
DPRINT("Byte: %02x\n", (int)yylval.byte);
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 180 "dtc-lexer.l"
+#line 208 "dtc-lexer.l"
{
DPRINT("/BYTESTRING\n");
BEGIN_DEFAULT();
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 186 "dtc-lexer.l"
+#line 214 "dtc-lexer.l"
{
DPRINT("PropNodeName: %s\n", yytext);
yylval.propnodename = xstrdup((yytext[0] == '\\') ?
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 194 "dtc-lexer.l"
+#line 222 "dtc-lexer.l"
{
DPRINT("Binary Include\n");
return DT_INCBIN;
case 18:
/* rule 18 can match eol */
YY_RULE_SETUP
-#line 199 "dtc-lexer.l"
+#line 227 "dtc-lexer.l"
/* eat whitespace */
YY_BREAK
case 19:
/* rule 19 can match eol */
YY_RULE_SETUP
-#line 200 "dtc-lexer.l"
+#line 228 "dtc-lexer.l"
/* eat C-style comments */
YY_BREAK
case 20:
/* rule 20 can match eol */
YY_RULE_SETUP
-#line 201 "dtc-lexer.l"
+#line 229 "dtc-lexer.l"
/* eat C++-style comments */
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 203 "dtc-lexer.l"
+#line 231 "dtc-lexer.l"
{ return DT_LSHIFT; };
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 204 "dtc-lexer.l"
+#line 232 "dtc-lexer.l"
{ return DT_RSHIFT; };
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 205 "dtc-lexer.l"
+#line 233 "dtc-lexer.l"
{ return DT_LE; };
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 206 "dtc-lexer.l"
+#line 234 "dtc-lexer.l"
{ return DT_GE; };
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 207 "dtc-lexer.l"
+#line 235 "dtc-lexer.l"
{ return DT_EQ; };
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 208 "dtc-lexer.l"
+#line 236 "dtc-lexer.l"
{ return DT_NE; };
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 209 "dtc-lexer.l"
+#line 237 "dtc-lexer.l"
{ return DT_AND; };
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 210 "dtc-lexer.l"
+#line 238 "dtc-lexer.l"
{ return DT_OR; };
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 212 "dtc-lexer.l"
+#line 240 "dtc-lexer.l"
{
DPRINT("Char: %c (\\x%02x)\n", yytext[0],
(unsigned)yytext[0]);
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 227 "dtc-lexer.l"
+#line 255 "dtc-lexer.l"
ECHO;
YY_BREAK
-#line 1211 "dtc-lexer.lex.c"
+#line 1239 "dtc-lexer.lex.c"
case YY_END_OF_BUFFER:
{
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
+ } /* end of user's declarations */
} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
else
{
- int num_to_read =
+ yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) ((yy_c_buf_p) - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
- int new_size = b->yy_buf_size * 2;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), (size_t) num_to_read );
+ (yy_n_chars), num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
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 >= 161 )
+ if ( yy_current_state >= 159 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
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 >= 161 )
+ if ( yy_current_state >= 159 )
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 == 160);
+ yy_is_jam = (yy_current_state == 158);
- return yy_is_jam ? 0 : yy_current_state;
+ return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_INPUT
else
{ /* need more input */
- int offset = (yy_c_buf_p) - (yytext_ptr);
+ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
*/
static void yyensure_buffer_stack (void)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
if (!(yy_buffer_stack)) {
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
+YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
- int i;
+ yy_size_t i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
/** Get the length of the current token.
*
*/
-int yyget_leng (void)
+yy_size_t yyget_leng (void)
{
return yyleng;
}
#define YYTABLES_NAME "yytables"
-#line 227 "dtc-lexer.l"
+#line 254 "dtc-lexer.l"
}
-static int pop_input_file(void)
+static bool pop_input_file(void)
{
if (srcfile_pop() == 0)
- return 0;
+ return false;
yypop_buffer_state();
yyin = current_srcfile->f;
- return 1;
+ return true;
+}
+
+static void lexical_error(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ srcpos_verror(&yylloc, "Lexical error", fmt, ap);
+ va_end(ap);
+
+ treesource_error = true;
}
-/* A Bison parser, made by GNU Bison 2.7.12-4996. */
+/* A Bison parser, made by GNU Bison 3.0.2. */
/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
-
+
+ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.7.12-4996"
+#define YYBISON_VERSION "3.0.2"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
/* Copy the first part of user declarations. */
-/* Line 371 of yacc.c */
-#line 21 "dtc-parser.y"
+#line 20 "dtc-parser.y" /* yacc.c:339 */
#include <stdio.h>
#include "dtc.h"
#include "srcpos.h"
-YYLTYPE yylloc;
-
extern int yylex(void);
-extern void print_error(char const *fmt, ...);
extern void yyerror(char const *s);
+#define ERROR(loc, ...) \
+ do { \
+ srcpos_error((loc), "Error", __VA_ARGS__); \
+ treesource_error = true; \
+ } while (0)
extern struct boot_info *the_boot_info;
-extern int treesource_error;
+extern bool treesource_error;
-static unsigned long long eval_literal(const char *s, int base, int bits);
-static unsigned char eval_char_literal(const char *s);
+#line 84 "dtc-parser.tab.c" /* yacc.c:339 */
-/* Line 371 of yacc.c */
-#line 87 "dtc-parser.tab.c"
-
-# ifndef YY_NULL
+# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
-# define YY_NULL nullptr
+# define YY_NULLPTR nullptr
# else
-# define YY_NULL 0
+# define YY_NULLPTR 0
# endif
# endif
by #include "dtc-parser.tab.h". */
#ifndef YY_YY_DTC_PARSER_TAB_H_INCLUDED
# define YY_YY_DTC_PARSER_TAB_H_INCLUDED
-/* Enabling traces. */
+/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
extern int yydebug;
#endif
-/* Tokens. */
+/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- DT_V1 = 258,
- DT_MEMRESERVE = 259,
- DT_LSHIFT = 260,
- DT_RSHIFT = 261,
- DT_LE = 262,
- DT_GE = 263,
- DT_EQ = 264,
- DT_NE = 265,
- DT_AND = 266,
- DT_OR = 267,
- DT_BITS = 268,
- DT_DEL_PROP = 269,
- DT_DEL_NODE = 270,
- DT_PROPNODENAME = 271,
- DT_LITERAL = 272,
- DT_CHAR_LITERAL = 273,
- DT_BASE = 274,
- DT_BYTE = 275,
- DT_STRING = 276,
- DT_LABEL = 277,
- DT_REF = 278,
- DT_INCBIN = 279
- };
+ enum yytokentype
+ {
+ DT_V1 = 258,
+ DT_MEMRESERVE = 259,
+ DT_LSHIFT = 260,
+ DT_RSHIFT = 261,
+ DT_LE = 262,
+ DT_GE = 263,
+ DT_EQ = 264,
+ DT_NE = 265,
+ DT_AND = 266,
+ DT_OR = 267,
+ DT_BITS = 268,
+ DT_DEL_PROP = 269,
+ DT_DEL_NODE = 270,
+ DT_PROPNODENAME = 271,
+ DT_LITERAL = 272,
+ DT_CHAR_LITERAL = 273,
+ DT_BYTE = 274,
+ DT_STRING = 275,
+ DT_LABEL = 276,
+ DT_REF = 277,
+ DT_INCBIN = 278
+ };
#endif
-
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+typedef union YYSTYPE YYSTYPE;
+union YYSTYPE
{
-/* Line 387 of yacc.c */
-#line 40 "dtc-parser.y"
+#line 38 "dtc-parser.y" /* yacc.c:355 */
char *propnodename;
- char *literal;
char *labelref;
- unsigned int cbase;
uint8_t byte;
struct data data;
struct reserve_info *re;
uint64_t integer;
-
-/* Line 387 of yacc.c */
-#line 176 "dtc-parser.tab.c"
-} YYSTYPE;
+#line 167 "dtc-parser.tab.c" /* yacc.c:355 */
+};
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
-extern YYSTYPE yylval;
-
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
+/* Location type. */
+#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
+typedef struct YYLTYPE YYLTYPE;
+struct YYLTYPE
+{
+ int first_line;
+ int first_column;
+ int last_line;
+ int last_column;
+};
+# define YYLTYPE_IS_DECLARED 1
+# define YYLTYPE_IS_TRIVIAL 1
#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
+
+
+extern YYSTYPE yylval;
+extern YYLTYPE yylloc;
int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
#endif /* !YY_YY_DTC_PARSER_TAB_H_INCLUDED */
/* Copy the second part of user declarations. */
-/* Line 390 of yacc.c */
-#line 204 "dtc-parser.tab.c"
+#line 196 "dtc-parser.tab.c" /* yacc.c:358 */
#ifdef short
# undef short
#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
#else
-typedef short int yytype_int8;
+typedef signed char yytype_int8;
#endif
#ifdef YYTYPE_UINT16
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# elif ! defined YYSIZE_T
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
# endif
#endif
-#ifndef __attribute__
-/* This feature is available in gcc versions 2.5 and later. */
-# if (! defined __GNUC__ || __GNUC__ < 2 \
- || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
-# define __attribute__(Spec) /* empty */
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
# endif
#endif
# define YYUSE(E) /* empty */
#endif
-
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(N) (N)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
#else
-static int
-YYID (yyi)
- int yyi;
+# define YY_INITIAL_VALUE(Value) Value
#endif
-{
- return yyi;
-}
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif
+
#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
# endif
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
+ && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
#if (! defined yyoverflow \
&& (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+ || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
+ && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
yytype_int16 yyss_alloc;
YYSTYPE yyvs_alloc;
+ YYLTYPE yyls_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
- + YYSTACK_GAP_MAXIMUM)
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ + 2 * YYSTACK_GAP_MAXIMUM)
# define YYCOPY_NEEDED 1
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
#endif
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
- while (YYID (0))
+ while (0)
# endif
# endif
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 4
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 133
+#define YYLAST 136
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 48
+#define YYNTOKENS 47
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 28
/* YYNRULES -- Number of rules. */
-#define YYNRULES 79
-/* YYNRULES -- Number of states. */
-#define YYNSTATES 141
+#define YYNRULES 80
+/* YYNSTATES -- Number of states. */
+#define YYNSTATES 144
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 279
+#define YYMAXUTOK 278
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, without out-of-bounds checking. */
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 47, 2, 2, 2, 45, 41, 2,
- 33, 35, 44, 42, 34, 43, 2, 26, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 38, 25,
- 36, 29, 30, 37, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 46, 2, 2, 2, 44, 40, 2,
+ 32, 34, 43, 41, 33, 42, 2, 25, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 37, 24,
+ 35, 28, 29, 36, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 31, 2, 32, 40, 2, 2, 2, 2, 2,
+ 2, 30, 2, 31, 39, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 27, 39, 28, 46, 2, 2, 2,
+ 2, 2, 2, 26, 38, 27, 45, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24
+ 15, 16, 17, 18, 19, 20, 21, 22, 23
};
#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint16 yyprhs[] =
-{
- 0, 0, 3, 8, 9, 12, 17, 20, 23, 27,
- 31, 36, 42, 43, 46, 51, 54, 58, 61, 64,
- 68, 73, 76, 86, 92, 95, 96, 99, 102, 106,
- 108, 111, 114, 117, 119, 121, 125, 127, 129, 135,
- 137, 141, 143, 147, 149, 153, 155, 159, 161, 165,
- 167, 171, 175, 177, 181, 185, 189, 193, 197, 201,
- 203, 207, 211, 213, 217, 221, 225, 227, 229, 232,
- 235, 238, 239, 242, 245, 246, 249, 252, 255, 259
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
-{
- 49, 0, -1, 3, 25, 50, 52, -1, -1, 51,
- 50, -1, 4, 59, 59, 25, -1, 22, 51, -1,
- 26, 53, -1, 52, 26, 53, -1, 52, 23, 53,
- -1, 52, 15, 23, 25, -1, 27, 54, 74, 28,
- 25, -1, -1, 54, 55, -1, 16, 29, 56, 25,
- -1, 16, 25, -1, 14, 16, 25, -1, 22, 55,
- -1, 57, 21, -1, 57, 58, 30, -1, 57, 31,
- 73, 32, -1, 57, 23, -1, 57, 24, 33, 21,
- 34, 59, 34, 59, 35, -1, 57, 24, 33, 21,
- 35, -1, 56, 22, -1, -1, 56, 34, -1, 57,
- 22, -1, 13, 17, 36, -1, 36, -1, 58, 59,
- -1, 58, 23, -1, 58, 22, -1, 17, -1, 18,
- -1, 33, 60, 35, -1, 61, -1, 62, -1, 62,
- 37, 60, 38, 61, -1, 63, -1, 62, 12, 63,
- -1, 64, -1, 63, 11, 64, -1, 65, -1, 64,
- 39, 65, -1, 66, -1, 65, 40, 66, -1, 67,
- -1, 66, 41, 67, -1, 68, -1, 67, 9, 68,
- -1, 67, 10, 68, -1, 69, -1, 68, 36, 69,
- -1, 68, 30, 69, -1, 68, 7, 69, -1, 68,
- 8, 69, -1, 69, 5, 70, -1, 69, 6, 70,
- -1, 70, -1, 70, 42, 71, -1, 70, 43, 71,
- -1, 71, -1, 71, 44, 72, -1, 71, 26, 72,
- -1, 71, 45, 72, -1, 72, -1, 59, -1, 43,
- 72, -1, 46, 72, -1, 47, 72, -1, -1, 73,
- 20, -1, 73, 22, -1, -1, 75, 74, -1, 75,
- 55, -1, 16, 53, -1, 15, 16, 25, -1, 22,
- 75, -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 109, 109, 118, 121, 128, 132, 140, 144, 148,
- 158, 172, 180, 183, 190, 194, 198, 202, 210, 214,
- 218, 222, 226, 243, 253, 261, 264, 268, 275, 290,
- 295, 315, 329, 336, 340, 344, 351, 355, 356, 360,
- 361, 365, 366, 370, 371, 375, 376, 380, 381, 385,
- 386, 387, 391, 392, 393, 394, 395, 399, 400, 401,
- 405, 406, 407, 411, 412, 413, 414, 418, 419, 420,
- 421, 426, 429, 433, 441, 444, 448, 456, 460, 464
+ 0, 104, 104, 113, 116, 123, 127, 135, 139, 144,
+ 155, 165, 180, 188, 191, 198, 202, 206, 210, 218,
+ 222, 226, 230, 234, 250, 260, 268, 271, 275, 282,
+ 298, 303, 322, 336, 343, 344, 345, 352, 356, 357,
+ 361, 362, 366, 367, 371, 372, 376, 377, 381, 382,
+ 386, 387, 388, 392, 393, 394, 395, 396, 400, 401,
+ 402, 406, 407, 408, 412, 413, 414, 415, 419, 420,
+ 421, 422, 427, 430, 434, 442, 445, 449, 457, 461,
+ 465
};
#endif
"$end", "error", "$undefined", "DT_V1", "DT_MEMRESERVE", "DT_LSHIFT",
"DT_RSHIFT", "DT_LE", "DT_GE", "DT_EQ", "DT_NE", "DT_AND", "DT_OR",
"DT_BITS", "DT_DEL_PROP", "DT_DEL_NODE", "DT_PROPNODENAME", "DT_LITERAL",
- "DT_CHAR_LITERAL", "DT_BASE", "DT_BYTE", "DT_STRING", "DT_LABEL",
- "DT_REF", "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='", "'>'", "'['",
- "']'", "'('", "','", "')'", "'<'", "'?'", "':'", "'|'", "'^'", "'&'",
- "'+'", "'-'", "'*'", "'%'", "'~'", "'!'", "$accept", "sourcefile",
+ "DT_CHAR_LITERAL", "DT_BYTE", "DT_STRING", "DT_LABEL", "DT_REF",
+ "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='", "'>'", "'['", "']'",
+ "'('", "','", "')'", "'<'", "'?'", "':'", "'|'", "'^'", "'&'", "'+'",
+ "'-'", "'*'", "'%'", "'~'", "'!'", "$accept", "sourcefile",
"memreserves", "memreserve", "devicetree", "nodedef", "proplist",
"propdef", "propdata", "propdataprefix", "arrayprefix", "integer_prim",
"integer_expr", "integer_trinary", "integer_or", "integer_and",
"integer_bitor", "integer_bitxor", "integer_bitand", "integer_eq",
"integer_rela", "integer_shift", "integer_add", "integer_mul",
- "integer_unary", "bytestring", "subnodes", "subnode", YY_NULL
+ "integer_unary", "bytestring", "subnodes", "subnode", YY_NULLPTR
};
#endif
# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
- 275, 276, 277, 278, 279, 59, 47, 123, 125, 61,
- 62, 91, 93, 40, 44, 41, 60, 63, 58, 124,
- 94, 38, 43, 45, 42, 37, 126, 33
+ 275, 276, 277, 278, 59, 47, 123, 125, 61, 62,
+ 91, 93, 40, 44, 41, 60, 63, 58, 124, 94,
+ 38, 43, 45, 42, 37, 126, 33
};
# endif
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
-{
- 0, 48, 49, 50, 50, 51, 51, 52, 52, 52,
- 52, 53, 54, 54, 55, 55, 55, 55, 56, 56,
- 56, 56, 56, 56, 56, 57, 57, 57, 58, 58,
- 58, 58, 58, 59, 59, 59, 60, 61, 61, 62,
- 62, 63, 63, 64, 64, 65, 65, 66, 66, 67,
- 67, 67, 68, 68, 68, 68, 68, 69, 69, 69,
- 70, 70, 70, 71, 71, 71, 71, 72, 72, 72,
- 72, 73, 73, 73, 74, 74, 74, 75, 75, 75
-};
+#define YYPACT_NINF -81
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-81)))
+
+#define YYTABLE_NINF -1
+
+#define yytable_value_is_error(Yytable_value) \
+ 0
+
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+static const yytype_int8 yypact[] =
{
- 0, 2, 4, 0, 2, 4, 2, 2, 3, 3,
- 4, 5, 0, 2, 4, 2, 3, 2, 2, 3,
- 4, 2, 9, 5, 2, 0, 2, 2, 3, 1,
- 2, 2, 2, 1, 1, 3, 1, 1, 5, 1,
- 3, 1, 3, 1, 3, 1, 3, 1, 3, 1,
- 3, 3, 1, 3, 3, 3, 3, 3, 3, 1,
- 3, 3, 1, 3, 3, 3, 1, 1, 2, 2,
- 2, 0, 2, 2, 0, 2, 2, 2, 3, 2
+ 16, -11, 21, 10, -81, 25, 10, 19, 10, -81,
+ -81, -9, 25, -81, 2, 51, -81, -9, -9, -9,
+ -81, 1, -81, -6, 50, 14, 28, 29, 36, 3,
+ 58, 44, -3, -81, 47, -81, -81, 65, 68, 2,
+ 2, -81, -81, -81, -81, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -81, 63, 69, 2, -81, -81,
+ 50, 57, 14, 28, 29, 36, 3, 3, 58, 58,
+ 58, 58, 44, 44, -3, -3, -81, -81, -81, 79,
+ 80, -8, 63, -81, 72, 63, -81, -81, -9, 76,
+ 77, -81, -81, -81, -81, -81, 78, -81, -81, -81,
+ -81, -81, 35, 4, -81, -81, -81, -81, 86, -81,
+ -81, -81, 73, -81, -81, 33, 71, 84, 39, -81,
+ -81, -81, -81, -81, 41, -81, -81, -81, 25, -81,
+ 74, 25, 75, -81
};
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 0, 0, 0, 3, 1, 0, 0, 0, 3, 33,
- 34, 0, 0, 6, 0, 2, 4, 0, 0, 0,
- 67, 0, 36, 37, 39, 41, 43, 45, 47, 49,
- 52, 59, 62, 66, 0, 12, 7, 0, 0, 0,
- 68, 69, 70, 35, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3, 1, 0, 0, 0, 3, 34,
+ 35, 0, 0, 6, 0, 2, 4, 0, 0, 0,
+ 68, 0, 37, 38, 40, 42, 44, 46, 48, 50,
+ 53, 60, 63, 67, 0, 13, 7, 0, 0, 0,
+ 0, 69, 70, 71, 36, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 5, 74, 0, 9, 8, 40, 0,
- 42, 44, 46, 48, 50, 51, 55, 56, 54, 53,
- 57, 58, 60, 61, 64, 63, 65, 0, 0, 0,
- 0, 13, 0, 74, 10, 0, 0, 0, 15, 25,
- 77, 17, 79, 0, 76, 75, 38, 16, 78, 0,
- 0, 11, 24, 14, 26, 0, 18, 27, 21, 0,
- 71, 29, 0, 0, 0, 0, 32, 31, 19, 30,
- 28, 0, 72, 73, 20, 0, 23, 0, 0, 0,
- 22
+ 0, 0, 0, 0, 5, 75, 0, 0, 10, 8,
+ 41, 0, 43, 45, 47, 49, 51, 52, 56, 57,
+ 55, 54, 58, 59, 61, 62, 65, 64, 66, 0,
+ 0, 0, 0, 14, 0, 75, 11, 9, 0, 0,
+ 0, 16, 26, 78, 18, 80, 0, 77, 76, 39,
+ 17, 79, 0, 0, 12, 25, 15, 27, 0, 19,
+ 28, 22, 0, 72, 30, 0, 0, 0, 0, 33,
+ 32, 20, 31, 29, 0, 73, 74, 21, 0, 24,
+ 0, 0, 0, 23
};
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int8 yydefgoto[] =
+ /* YYPGOTO[NTERM-NUM]. */
+static const yytype_int8 yypgoto[] =
{
- -1, 2, 7, 8, 15, 36, 64, 91, 109, 110,
- 122, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, 31, 32, 33, 125, 92, 93
+ -81, -81, 100, 104, -81, -38, -81, -80, -81, -81,
+ -81, -5, 66, 13, -81, 70, 67, 81, 64, 82,
+ 37, 27, 34, 38, -14, -81, 22, 24
};
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -78
-static const yytype_int8 yypact[] =
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
{
- 22, 11, 51, 10, -78, 23, 10, 2, 10, -78,
- -78, -9, 23, -78, 30, 38, -78, -9, -9, -9,
- -78, 35, -78, -6, 52, 29, 48, 49, 33, 3,
- 71, 36, 0, -78, 64, -78, -78, 68, 30, 30,
- -78, -78, -78, -78, -9, -9, -9, -9, -9, -9,
- -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
- -9, -9, -9, -78, 44, 67, -78, -78, 52, 55,
- 29, 48, 49, 33, 3, 3, 71, 71, 71, 71,
- 36, 36, 0, 0, -78, -78, -78, 78, 79, 42,
- 44, -78, 69, 44, -78, -9, 73, 74, -78, -78,
- -78, -78, -78, 75, -78, -78, -78, -78, -78, -7,
- -1, -78, -78, -78, -78, 84, -78, -78, -78, 63,
- -78, -78, 32, 66, 82, -3, -78, -78, -78, -78,
- -78, 46, -78, -78, -78, 23, -78, 70, 23, 72,
- -78
+ -1, 2, 7, 8, 15, 36, 65, 93, 112, 113,
+ 125, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 128, 94, 95
};
-/* YYPGOTO[NTERM-NUM]. */
-static const yytype_int8 yypgoto[] =
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
+static const yytype_uint8 yytable[] =
{
- -78, -78, 97, 100, -78, -37, -78, -77, -78, -78,
- -78, -5, 65, 13, -78, 76, 77, 62, 80, 83,
- 34, 20, 26, 28, -14, -78, 18, 24
+ 12, 68, 69, 41, 42, 43, 45, 34, 9, 10,
+ 53, 54, 104, 3, 5, 107, 101, 118, 35, 1,
+ 102, 4, 61, 11, 119, 120, 121, 122, 35, 97,
+ 46, 6, 55, 17, 123, 44, 18, 19, 56, 124,
+ 62, 63, 9, 10, 14, 51, 52, 86, 87, 88,
+ 9, 10, 48, 103, 129, 130, 115, 11, 135, 116,
+ 136, 47, 131, 57, 58, 11, 37, 49, 117, 50,
+ 137, 64, 38, 39, 138, 139, 40, 89, 90, 91,
+ 78, 79, 80, 81, 92, 59, 60, 66, 76, 77,
+ 67, 82, 83, 96, 98, 99, 100, 84, 85, 106,
+ 110, 111, 114, 126, 134, 127, 133, 141, 16, 143,
+ 13, 109, 71, 74, 72, 70, 105, 108, 0, 0,
+ 132, 0, 0, 0, 0, 0, 0, 0, 0, 73,
+ 0, 0, 75, 140, 0, 0, 142
};
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -1
-static const yytype_uint8 yytable[] =
+static const yytype_int16 yycheck[] =
{
- 12, 66, 67, 40, 41, 42, 44, 34, 9, 10,
- 52, 53, 115, 101, 5, 112, 104, 132, 113, 133,
- 116, 117, 118, 119, 11, 1, 60, 114, 14, 134,
- 120, 45, 6, 54, 17, 121, 3, 18, 19, 55,
- 9, 10, 50, 51, 61, 62, 84, 85, 86, 9,
- 10, 4, 100, 37, 126, 127, 11, 35, 87, 88,
- 89, 38, 128, 46, 39, 11, 90, 98, 47, 35,
- 43, 99, 76, 77, 78, 79, 56, 57, 58, 59,
- 135, 136, 80, 81, 74, 75, 82, 83, 48, 63,
- 49, 65, 94, 95, 96, 97, 124, 103, 107, 108,
- 111, 123, 130, 131, 138, 16, 13, 140, 106, 71,
- 69, 105, 0, 0, 102, 0, 0, 129, 0, 0,
- 68, 0, 0, 70, 0, 0, 0, 0, 72, 0,
- 137, 0, 73, 139
+ 5, 39, 40, 17, 18, 19, 12, 12, 17, 18,
+ 7, 8, 92, 24, 4, 95, 24, 13, 26, 3,
+ 28, 0, 25, 32, 20, 21, 22, 23, 26, 67,
+ 36, 21, 29, 42, 30, 34, 45, 46, 35, 35,
+ 43, 44, 17, 18, 25, 9, 10, 61, 62, 63,
+ 17, 18, 38, 91, 21, 22, 21, 32, 19, 24,
+ 21, 11, 29, 5, 6, 32, 15, 39, 33, 40,
+ 31, 24, 21, 22, 33, 34, 25, 14, 15, 16,
+ 53, 54, 55, 56, 21, 41, 42, 22, 51, 52,
+ 22, 57, 58, 24, 37, 16, 16, 59, 60, 27,
+ 24, 24, 24, 17, 20, 32, 35, 33, 8, 34,
+ 6, 98, 46, 49, 47, 45, 92, 95, -1, -1,
+ 125, -1, -1, -1, -1, -1, -1, -1, -1, 48,
+ -1, -1, 50, 138, -1, -1, 141
};
-#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-78)))
-
-#define yytable_value_is_error(Yytable_value) \
- YYID (0)
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint8 yystos[] =
+{
+ 0, 3, 48, 24, 0, 4, 21, 49, 50, 17,
+ 18, 32, 58, 50, 25, 51, 49, 42, 45, 46,
+ 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, 70, 71, 58, 26, 52, 15, 21, 22,
+ 25, 71, 71, 71, 34, 12, 36, 11, 38, 39,
+ 40, 9, 10, 7, 8, 29, 35, 5, 6, 41,
+ 42, 25, 43, 44, 24, 53, 22, 22, 52, 52,
+ 62, 59, 63, 64, 65, 66, 67, 67, 68, 68,
+ 68, 68, 69, 69, 70, 70, 71, 71, 71, 14,
+ 15, 16, 21, 54, 73, 74, 24, 52, 37, 16,
+ 16, 24, 28, 52, 54, 74, 27, 54, 73, 60,
+ 24, 24, 55, 56, 24, 21, 24, 33, 13, 20,
+ 21, 22, 23, 30, 35, 57, 17, 32, 72, 21,
+ 22, 29, 58, 35, 20, 19, 21, 31, 33, 34,
+ 58, 33, 58, 34
+};
-static const yytype_int16 yycheck[] =
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
{
- 5, 38, 39, 17, 18, 19, 12, 12, 17, 18,
- 7, 8, 13, 90, 4, 22, 93, 20, 25, 22,
- 21, 22, 23, 24, 33, 3, 26, 34, 26, 32,
- 31, 37, 22, 30, 43, 36, 25, 46, 47, 36,
- 17, 18, 9, 10, 44, 45, 60, 61, 62, 17,
- 18, 0, 89, 15, 22, 23, 33, 27, 14, 15,
- 16, 23, 30, 11, 26, 33, 22, 25, 39, 27,
- 35, 29, 52, 53, 54, 55, 5, 6, 42, 43,
- 34, 35, 56, 57, 50, 51, 58, 59, 40, 25,
- 41, 23, 25, 38, 16, 16, 33, 28, 25, 25,
- 25, 17, 36, 21, 34, 8, 6, 35, 95, 47,
- 45, 93, -1, -1, 90, -1, -1, 122, -1, -1,
- 44, -1, -1, 46, -1, -1, -1, -1, 48, -1,
- 135, -1, 49, 138
+ 0, 47, 48, 49, 49, 50, 50, 51, 51, 51,
+ 51, 51, 52, 53, 53, 54, 54, 54, 54, 55,
+ 55, 55, 55, 55, 55, 55, 56, 56, 56, 57,
+ 57, 57, 57, 57, 58, 58, 58, 59, 60, 60,
+ 61, 61, 62, 62, 63, 63, 64, 64, 65, 65,
+ 66, 66, 66, 67, 67, 67, 67, 67, 68, 68,
+ 68, 69, 69, 69, 70, 70, 70, 70, 71, 71,
+ 71, 71, 72, 72, 72, 73, 73, 73, 74, 74,
+ 74
};
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
-static const yytype_uint8 yystos[] =
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
{
- 0, 3, 49, 25, 0, 4, 22, 50, 51, 17,
- 18, 33, 59, 51, 26, 52, 50, 43, 46, 47,
- 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
- 69, 70, 71, 72, 59, 27, 53, 15, 23, 26,
- 72, 72, 72, 35, 12, 37, 11, 39, 40, 41,
- 9, 10, 7, 8, 30, 36, 5, 6, 42, 43,
- 26, 44, 45, 25, 54, 23, 53, 53, 63, 60,
- 64, 65, 66, 67, 68, 68, 69, 69, 69, 69,
- 70, 70, 71, 71, 72, 72, 72, 14, 15, 16,
- 22, 55, 74, 75, 25, 38, 16, 16, 25, 29,
- 53, 55, 75, 28, 55, 74, 61, 25, 25, 56,
- 57, 25, 22, 25, 34, 13, 21, 22, 23, 24,
- 31, 36, 58, 17, 33, 73, 22, 23, 30, 59,
- 36, 21, 20, 22, 32, 34, 35, 59, 34, 59,
- 35
+ 0, 2, 4, 0, 2, 4, 2, 2, 3, 4,
+ 3, 4, 5, 0, 2, 4, 2, 3, 2, 2,
+ 3, 4, 2, 9, 5, 2, 0, 2, 2, 3,
+ 1, 2, 2, 2, 1, 1, 3, 1, 1, 5,
+ 1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
+ 1, 3, 3, 1, 3, 3, 3, 3, 3, 3,
+ 1, 3, 3, 1, 3, 3, 3, 1, 1, 2,
+ 2, 2, 0, 2, 2, 0, 2, 2, 2, 3,
+ 2
};
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror. This remains here temporarily
- to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
-
-#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
#define YYRECOVERING() (!!yyerrstatus)
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
+ YYERROR; \
+ } \
+while (0)
/* Error token number */
-#define YYTERROR 1
-#define YYERRCODE 256
-
-
-/* This macro is provided for backward compatibility. */
-#ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (N) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (0)
#endif
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-/* YYLEX -- calling `yylex' with the right arguments. */
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
/* Enable debugging if requested. */
#if YYDEBUG
# define YYFPRINTF fprintf
# endif
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
+#ifndef YY_LOCATION_PRINT
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
+/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
+
+YY_ATTRIBUTE_UNUSED
+static unsigned
+yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
+{
+ unsigned res = 0;
+ int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
+ if (0 <= yylocp->first_line)
+ {
+ res += YYFPRINTF (yyo, "%d", yylocp->first_line);
+ if (0 <= yylocp->first_column)
+ res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
+ }
+ if (0 <= yylocp->last_line)
+ {
+ if (yylocp->first_line < yylocp->last_line)
+ {
+ res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
+ if (0 <= end_col)
+ res += YYFPRINTF (yyo, ".%d", end_col);
+ }
+ else if (0 <= end_col && yylocp->first_column < end_col)
+ res += YYFPRINTF (yyo, "-%d", end_col);
+ }
+ return res;
+ }
+
+# define YY_LOCATION_PRINT(File, Loc) \
+ yy_location_print_ (File, &(Loc))
+
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
#endif
+
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value, Location); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
+
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
{
FILE *yyo = yyoutput;
YYUSE (yyo);
+ YYUSE (yylocationp);
if (!yyvaluep)
return;
# ifdef YYPRINT
if (yytype < YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
# endif
YYUSE (yytype);
}
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+ YYFPRINTF (yyoutput, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
- yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+ YY_LOCATION_PRINT (yyoutput, *yylocationp);
+ YYFPRINTF (yyoutput, ": ");
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp);
YYFPRINTF (yyoutput, ")");
}
| TOP (included). |
`------------------------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
-#endif
{
YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
YYFPRINTF (stderr, "\n");
}
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
-#else
static void
-yy_reduce_print (yyvsp, yyrule)
- YYSTYPE *yyvsp;
- int yyrule;
-#endif
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
{
+ unsigned long int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
- unsigned long int yylno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
+ yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- );
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ , &(yylsp[(yyi + 1) - (yynrhs)]) );
YYFPRINTF (stderr, "\n");
}
}
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, Rule); \
-} while (YYID (0))
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \
+} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
+#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
{
YYSIZE_T yylen;
for (yylen = 0; yystr[yylen]; yylen++)
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
{
char *yyd = yydest;
const char *yys = yysrc;
char const *yyp = yystr;
for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
do_not_strip_quotes: ;
}
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken)
{
- YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
- const char *yyformat = YY_NULL;
+ const char *yyformat = YY_NULLPTR;
/* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per
int yycount = 0;
/* There are many possibilities here to consider:
- - Assume YYFAIL is not used. It's too flawed to consider. See
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- for details. YYERROR is fine as it does not invoke this
- function.
- If this state is a consistent state with a default action, then
the only way this function was invoked is if the default action
is an error action. In that case, don't check for expected
}
yyarg[yycount++] = yytname[yyx];
{
- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-#else
static void
-yydestruct (yymsg, yytype, yyvaluep)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
-#endif
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
{
YYUSE (yyvaluep);
-
+ YYUSE (yylocationp);
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
}
/* The lookahead symbol. */
int yychar;
-
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END
-#endif
-#ifndef YY_INITIAL_VALUE
-# define YY_INITIAL_VALUE(Value) /* Nothing. */
-#endif
-
/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
-
+YYSTYPE yylval;
+/* Location data for the lookahead symbol. */
+YYLTYPE yylloc
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+ = { 1, 1, 1, 1 }
+# endif
+;
/* Number of syntax errors so far. */
int yynerrs;
| yyparse. |
`----------*/
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
int
yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
{
int yystate;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
+ 'yyls': related to locations.
Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
YYSTYPE *yyvs;
YYSTYPE *yyvsp;
+ /* The location stack. */
+ YYLTYPE yylsa[YYINITDEPTH];
+ YYLTYPE *yyls;
+ YYLTYPE *yylsp;
+
+ /* The locations where the error started and ended. */
+ YYLTYPE yyerror_range[3];
+
YYSIZE_T yystacksize;
int yyn;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
+ YYLTYPE yyloc;
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
yyssp = yyss = yyssa;
yyvsp = yyvs = yyvsa;
+ yylsp = yyls = yylsa;
yystacksize = YYINITDEPTH;
YYDPRINTF ((stderr, "Starting parse\n"));
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
+ yylsp[0] = yylloc;
goto yysetstate;
/*------------------------------------------------------------.
#ifdef yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yystacksize);
-
- yyss = yyss1;
- yyvs = yyvs1;
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+ YYLTYPE *yyls1 = yyls;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yyls1, yysize * sizeof (*yylsp),
+ &yystacksize);
+
+ yyls = yyls1;
+ yyss = yyss1;
+ yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
+ yystacksize = YYMAXDEPTH;
{
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyls_alloc, yyls);
# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
+ yylsp = yyls + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
+ (unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
+ YYABORT;
}
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
+ yychar = yylex ();
}
if (yychar <= YYEOF)
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
-
+ *++yylsp = yylloc;
goto yynewstate;
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
+ '$$ = $1'.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
-
+ /* Default location. */
+ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
case 2:
-/* Line 1787 of yacc.c */
-#line 110 "dtc-parser.y"
+#line 105 "dtc-parser.y" /* yacc.c:1646 */
{
- the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node),
- guess_boot_cpuid((yyvsp[(4) - (4)].node)));
+ the_boot_info = build_boot_info((yyvsp[-1].re), (yyvsp[0].node),
+ guess_boot_cpuid((yyvsp[0].node)));
}
+#line 1472 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 3:
-/* Line 1787 of yacc.c */
-#line 118 "dtc-parser.y"
+#line 113 "dtc-parser.y" /* yacc.c:1646 */
{
(yyval.re) = NULL;
}
+#line 1480 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 4:
-/* Line 1787 of yacc.c */
-#line 122 "dtc-parser.y"
+#line 117 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
+ (yyval.re) = chain_reserve_entry((yyvsp[-1].re), (yyvsp[0].re));
}
+#line 1488 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 5:
-/* Line 1787 of yacc.c */
-#line 129 "dtc-parser.y"
+#line 124 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer));
+ (yyval.re) = build_reserve_entry((yyvsp[-2].integer), (yyvsp[-1].integer));
}
+#line 1496 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 6:
-/* Line 1787 of yacc.c */
-#line 133 "dtc-parser.y"
+#line 128 "dtc-parser.y" /* yacc.c:1646 */
{
- add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref));
- (yyval.re) = (yyvsp[(2) - (2)].re);
+ add_label(&(yyvsp[0].re)->labels, (yyvsp[-1].labelref));
+ (yyval.re) = (yyvsp[0].re);
}
+#line 1505 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 7:
-/* Line 1787 of yacc.c */
-#line 141 "dtc-parser.y"
+#line 136 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.node) = name_node((yyvsp[(2) - (2)].node), "");
+ (yyval.node) = name_node((yyvsp[0].node), "");
}
+#line 1513 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 8:
-/* Line 1787 of yacc.c */
-#line 145 "dtc-parser.y"
+#line 140 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ (yyval.node) = merge_nodes((yyvsp[-2].node), (yyvsp[0].node));
}
+#line 1521 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 9:
-/* Line 1787 of yacc.c */
-#line 149 "dtc-parser.y"
+#line 145 "dtc-parser.y" /* yacc.c:1646 */
{
- struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref));
+ struct node *target = get_node_by_ref((yyvsp[-3].node), (yyvsp[-1].labelref));
+ add_label(&target->labels, (yyvsp[-2].labelref));
if (target)
- merge_nodes(target, (yyvsp[(3) - (3)].node));
+ merge_nodes(target, (yyvsp[0].node));
else
- print_error("label or path, '%s', not found", (yyvsp[(2) - (3)].labelref));
- (yyval.node) = (yyvsp[(1) - (3)].node);
+ ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref));
+ (yyval.node) = (yyvsp[-3].node);
}
+#line 1536 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 10:
-/* Line 1787 of yacc.c */
-#line 159 "dtc-parser.y"
+#line 156 "dtc-parser.y" /* yacc.c:1646 */
{
- struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref));
+ struct node *target = get_node_by_ref((yyvsp[-2].node), (yyvsp[-1].labelref));
- if (!target)
- print_error("label or path, '%s', not found", (yyvsp[(3) - (4)].labelref));
+ if (target)
+ merge_nodes(target, (yyvsp[0].node));
else
- delete_node(target);
-
- (yyval.node) = (yyvsp[(1) - (4)].node);
+ ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref));
+ (yyval.node) = (yyvsp[-2].node);
}
+#line 1550 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 11:
-/* Line 1787 of yacc.c */
-#line 173 "dtc-parser.y"
+#line 166 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist));
+ struct node *target = get_node_by_ref((yyvsp[-3].node), (yyvsp[-1].labelref));
+
+ if (target)
+ delete_node(target);
+ else
+ ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref));
+
+
+ (yyval.node) = (yyvsp[-3].node);
}
+#line 1566 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 12:
-/* Line 1787 of yacc.c */
-#line 180 "dtc-parser.y"
+#line 181 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.proplist) = NULL;
+ (yyval.node) = build_node((yyvsp[-3].proplist), (yyvsp[-2].nodelist));
}
+#line 1574 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 13:
-/* Line 1787 of yacc.c */
-#line 184 "dtc-parser.y"
+#line 188 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist));
+ (yyval.proplist) = NULL;
}
+#line 1582 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 14:
-/* Line 1787 of yacc.c */
-#line 191 "dtc-parser.y"
+#line 192 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data));
+ (yyval.proplist) = chain_property((yyvsp[0].prop), (yyvsp[-1].proplist));
}
+#line 1590 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 15:
-/* Line 1787 of yacc.c */
-#line 195 "dtc-parser.y"
+#line 199 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data);
+ (yyval.prop) = build_property((yyvsp[-3].propnodename), (yyvsp[-1].data));
}
+#line 1598 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 16:
-/* Line 1787 of yacc.c */
-#line 199 "dtc-parser.y"
+#line 203 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.prop) = build_property_delete((yyvsp[(2) - (3)].propnodename));
+ (yyval.prop) = build_property((yyvsp[-1].propnodename), empty_data);
}
+#line 1606 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 17:
-/* Line 1787 of yacc.c */
-#line 203 "dtc-parser.y"
+#line 207 "dtc-parser.y" /* yacc.c:1646 */
{
- add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref));
- (yyval.prop) = (yyvsp[(2) - (2)].prop);
+ (yyval.prop) = build_property_delete((yyvsp[-1].propnodename));
}
+#line 1614 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 18:
-/* Line 1787 of yacc.c */
-#line 211 "dtc-parser.y"
+#line 211 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data));
+ add_label(&(yyvsp[0].prop)->labels, (yyvsp[-1].labelref));
+ (yyval.prop) = (yyvsp[0].prop);
}
+#line 1623 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 19:
-/* Line 1787 of yacc.c */
-#line 215 "dtc-parser.y"
+#line 219 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.data) = data_merge((yyvsp[(1) - (3)].data), (yyvsp[(2) - (3)].array).data);
+ (yyval.data) = data_merge((yyvsp[-1].data), (yyvsp[0].data));
}
+#line 1631 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 20:
-/* Line 1787 of yacc.c */
-#line 219 "dtc-parser.y"
+#line 223 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
+ (yyval.data) = data_merge((yyvsp[-2].data), (yyvsp[-1].array).data);
}
+#line 1639 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 21:
-/* Line 1787 of yacc.c */
-#line 223 "dtc-parser.y"
+#line 227 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref));
+ (yyval.data) = data_merge((yyvsp[-3].data), (yyvsp[-1].data));
}
+#line 1647 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 22:
-/* Line 1787 of yacc.c */
-#line 227 "dtc-parser.y"
+#line 231 "dtc-parser.y" /* yacc.c:1646 */
{
- FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL);
+ (yyval.data) = data_add_marker((yyvsp[-1].data), REF_PATH, (yyvsp[0].labelref));
+ }
+#line 1655 "dtc-parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 23:
+#line 235 "dtc-parser.y" /* yacc.c:1646 */
+ {
+ FILE *f = srcfile_relative_open((yyvsp[-5].data).val, NULL);
struct data d;
- if ((yyvsp[(6) - (9)].integer) != 0)
- if (fseek(f, (yyvsp[(6) - (9)].integer), SEEK_SET) != 0)
- print_error("Couldn't seek to offset %llu in \"%s\": %s",
- (unsigned long long)(yyvsp[(6) - (9)].integer),
- (yyvsp[(4) - (9)].data).val,
- strerror(errno));
+ if ((yyvsp[-3].integer) != 0)
+ if (fseek(f, (yyvsp[-3].integer), SEEK_SET) != 0)
+ die("Couldn't seek to offset %llu in \"%s\": %s",
+ (unsigned long long)(yyvsp[-3].integer), (yyvsp[-5].data).val,
+ strerror(errno));
- d = data_copy_file(f, (yyvsp[(8) - (9)].integer));
+ d = data_copy_file(f, (yyvsp[-1].integer));
- (yyval.data) = data_merge((yyvsp[(1) - (9)].data), d);
+ (yyval.data) = data_merge((yyvsp[-8].data), d);
fclose(f);
}
+#line 1675 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 23:
-/* Line 1787 of yacc.c */
-#line 244 "dtc-parser.y"
+ case 24:
+#line 251 "dtc-parser.y" /* yacc.c:1646 */
{
- FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL);
+ FILE *f = srcfile_relative_open((yyvsp[-1].data).val, NULL);
struct data d = empty_data;
d = data_copy_file(f, -1);
- (yyval.data) = data_merge((yyvsp[(1) - (5)].data), d);
+ (yyval.data) = data_merge((yyvsp[-4].data), d);
fclose(f);
}
+#line 1689 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 24:
-/* Line 1787 of yacc.c */
-#line 254 "dtc-parser.y"
+ case 25:
+#line 261 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
+ (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref));
}
+#line 1697 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 25:
-/* Line 1787 of yacc.c */
-#line 261 "dtc-parser.y"
+ case 26:
+#line 268 "dtc-parser.y" /* yacc.c:1646 */
{
(yyval.data) = empty_data;
}
+#line 1705 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 26:
-/* Line 1787 of yacc.c */
-#line 265 "dtc-parser.y"
+ case 27:
+#line 272 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.data) = (yyvsp[(1) - (2)].data);
+ (yyval.data) = (yyvsp[-1].data);
}
+#line 1713 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 27:
-/* Line 1787 of yacc.c */
-#line 269 "dtc-parser.y"
+ case 28:
+#line 276 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
+ (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref));
}
+#line 1721 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 28:
-/* Line 1787 of yacc.c */
-#line 276 "dtc-parser.y"
+ case 29:
+#line 283 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.array).data = empty_data;
- (yyval.array).bits = eval_literal((yyvsp[(2) - (3)].literal), 0, 7);
-
- if (((yyval.array).bits != 8) &&
- ((yyval.array).bits != 16) &&
- ((yyval.array).bits != 32) &&
- ((yyval.array).bits != 64))
- {
- print_error("Only 8, 16, 32 and 64-bit elements"
- " are currently supported");
- (yyval.array).bits = 32;
+ unsigned long long bits;
+
+ bits = (yyvsp[-1].integer);
+
+ if ((bits != 8) && (bits != 16) &&
+ (bits != 32) && (bits != 64)) {
+ ERROR(&(yylsp[-1]), "Array elements must be"
+ " 8, 16, 32 or 64-bits");
+ bits = 32;
}
+
+ (yyval.array).data = empty_data;
+ (yyval.array).bits = bits;
}
+#line 1741 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 29:
-/* Line 1787 of yacc.c */
-#line 291 "dtc-parser.y"
+ case 30:
+#line 299 "dtc-parser.y" /* yacc.c:1646 */
{
(yyval.array).data = empty_data;
(yyval.array).bits = 32;
}
+#line 1750 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 30:
-/* Line 1787 of yacc.c */
-#line 296 "dtc-parser.y"
+ case 31:
+#line 304 "dtc-parser.y" /* yacc.c:1646 */
{
- if ((yyvsp[(1) - (2)].array).bits < 64) {
- uint64_t mask = (1ULL << (yyvsp[(1) - (2)].array).bits) - 1;
+ if ((yyvsp[-1].array).bits < 64) {
+ uint64_t mask = (1ULL << (yyvsp[-1].array).bits) - 1;
/*
* Bits above mask must either be all zero
* (positive within range of mask) or all one
* within the mask to one (i.e. | in the
* mask), all bits are one.
*/
- if (((yyvsp[(2) - (2)].integer) > mask) && (((yyvsp[(2) - (2)].integer) | mask) != -1ULL))
- print_error(
- "integer value out of range "
- "%016lx (%d bits)", (yyvsp[(1) - (2)].array).bits);
+ if (((yyvsp[0].integer) > mask) && (((yyvsp[0].integer) | mask) != -1ULL))
+ ERROR(&(yylsp[0]), "Value out of range for"
+ " %d-bit array element", (yyvsp[-1].array).bits);
}
- (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, (yyvsp[(2) - (2)].integer), (yyvsp[(1) - (2)].array).bits);
+ (yyval.array).data = data_append_integer((yyvsp[-1].array).data, (yyvsp[0].integer), (yyvsp[-1].array).bits);
}
+#line 1773 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 31:
-/* Line 1787 of yacc.c */
-#line 316 "dtc-parser.y"
+ case 32:
+#line 323 "dtc-parser.y" /* yacc.c:1646 */
{
- uint64_t val = ~0ULL >> (64 - (yyvsp[(1) - (2)].array).bits);
+ uint64_t val = ~0ULL >> (64 - (yyvsp[-1].array).bits);
- if ((yyvsp[(1) - (2)].array).bits == 32)
- (yyvsp[(1) - (2)].array).data = data_add_marker((yyvsp[(1) - (2)].array).data,
+ if ((yyvsp[-1].array).bits == 32)
+ (yyvsp[-1].array).data = data_add_marker((yyvsp[-1].array).data,
REF_PHANDLE,
- (yyvsp[(2) - (2)].labelref));
+ (yyvsp[0].labelref));
else
- print_error("References are only allowed in "
+ ERROR(&(yylsp[0]), "References are only allowed in "
"arrays with 32-bit elements.");
- (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, val, (yyvsp[(1) - (2)].array).bits);
- }
- break;
-
- case 32:
-/* Line 1787 of yacc.c */
-#line 330 "dtc-parser.y"
- {
- (yyval.array).data = data_add_marker((yyvsp[(1) - (2)].array).data, LABEL, (yyvsp[(2) - (2)].labelref));
+ (yyval.array).data = data_append_integer((yyvsp[-1].array).data, val, (yyvsp[-1].array).bits);
}
+#line 1791 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 33:
-/* Line 1787 of yacc.c */
-#line 337 "dtc-parser.y"
- {
- (yyval.integer) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64);
- }
- break;
-
- case 34:
-/* Line 1787 of yacc.c */
-#line 341 "dtc-parser.y"
+#line 337 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.integer) = eval_char_literal((yyvsp[(1) - (1)].literal));
+ (yyval.array).data = data_add_marker((yyvsp[-1].array).data, LABEL, (yyvsp[0].labelref));
}
+#line 1799 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 35:
-/* Line 1787 of yacc.c */
-#line 345 "dtc-parser.y"
+ case 36:
+#line 346 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.integer) = (yyvsp[(2) - (3)].integer);
+ (yyval.integer) = (yyvsp[-1].integer);
}
+#line 1807 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 38:
-/* Line 1787 of yacc.c */
-#line 356 "dtc-parser.y"
- { (yyval.integer) = (yyvsp[(1) - (5)].integer) ? (yyvsp[(3) - (5)].integer) : (yyvsp[(5) - (5)].integer); }
- break;
-
- case 40:
-/* Line 1787 of yacc.c */
-#line 361 "dtc-parser.y"
- { (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); }
+ case 39:
+#line 357 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = (yyvsp[-4].integer) ? (yyvsp[-2].integer) : (yyvsp[0].integer); }
+#line 1813 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 42:
-/* Line 1787 of yacc.c */
-#line 366 "dtc-parser.y"
- { (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); }
+ case 41:
+#line 362 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = (yyvsp[-2].integer) || (yyvsp[0].integer); }
+#line 1819 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 44:
-/* Line 1787 of yacc.c */
-#line 371 "dtc-parser.y"
- { (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); }
+ case 43:
+#line 367 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = (yyvsp[-2].integer) && (yyvsp[0].integer); }
+#line 1825 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 46:
-/* Line 1787 of yacc.c */
-#line 376 "dtc-parser.y"
- { (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); }
+ case 45:
+#line 372 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = (yyvsp[-2].integer) | (yyvsp[0].integer); }
+#line 1831 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 48:
-/* Line 1787 of yacc.c */
-#line 381 "dtc-parser.y"
- { (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); }
+ case 47:
+#line 377 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = (yyvsp[-2].integer) ^ (yyvsp[0].integer); }
+#line 1837 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 50:
-/* Line 1787 of yacc.c */
-#line 386 "dtc-parser.y"
- { (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); }
+ case 49:
+#line 382 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = (yyvsp[-2].integer) & (yyvsp[0].integer); }
+#line 1843 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 51:
-/* Line 1787 of yacc.c */
-#line 387 "dtc-parser.y"
- { (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); }
+#line 387 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = (yyvsp[-2].integer) == (yyvsp[0].integer); }
+#line 1849 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 53:
-/* Line 1787 of yacc.c */
-#line 392 "dtc-parser.y"
- { (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); }
+ case 52:
+#line 388 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = (yyvsp[-2].integer) != (yyvsp[0].integer); }
+#line 1855 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 54:
-/* Line 1787 of yacc.c */
-#line 393 "dtc-parser.y"
- { (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); }
+#line 393 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = (yyvsp[-2].integer) < (yyvsp[0].integer); }
+#line 1861 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 55:
-/* Line 1787 of yacc.c */
-#line 394 "dtc-parser.y"
- { (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); }
+#line 394 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = (yyvsp[-2].integer) > (yyvsp[0].integer); }
+#line 1867 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 56:
-/* Line 1787 of yacc.c */
-#line 395 "dtc-parser.y"
- { (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); }
+#line 395 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = (yyvsp[-2].integer) <= (yyvsp[0].integer); }
+#line 1873 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 57:
-/* Line 1787 of yacc.c */
-#line 399 "dtc-parser.y"
- { (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); }
+#line 396 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = (yyvsp[-2].integer) >= (yyvsp[0].integer); }
+#line 1879 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 58:
-/* Line 1787 of yacc.c */
-#line 400 "dtc-parser.y"
- { (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); }
+#line 400 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = (yyvsp[-2].integer) << (yyvsp[0].integer); }
+#line 1885 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 60:
-/* Line 1787 of yacc.c */
-#line 405 "dtc-parser.y"
- { (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); }
+ case 59:
+#line 401 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = (yyvsp[-2].integer) >> (yyvsp[0].integer); }
+#line 1891 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 61:
-/* Line 1787 of yacc.c */
-#line 406 "dtc-parser.y"
- { (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); }
+#line 406 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = (yyvsp[-2].integer) + (yyvsp[0].integer); }
+#line 1897 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 63:
-/* Line 1787 of yacc.c */
-#line 411 "dtc-parser.y"
- { (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); }
+ case 62:
+#line 407 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = (yyvsp[-2].integer) - (yyvsp[0].integer); }
+#line 1903 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 64:
-/* Line 1787 of yacc.c */
-#line 412 "dtc-parser.y"
- { (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); }
+#line 412 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = (yyvsp[-2].integer) * (yyvsp[0].integer); }
+#line 1909 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 65:
-/* Line 1787 of yacc.c */
-#line 413 "dtc-parser.y"
- { (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); }
+#line 413 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = (yyvsp[-2].integer) / (yyvsp[0].integer); }
+#line 1915 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
- case 68:
-/* Line 1787 of yacc.c */
-#line 419 "dtc-parser.y"
- { (yyval.integer) = -(yyvsp[(2) - (2)].integer); }
+ case 66:
+#line 414 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = (yyvsp[-2].integer) % (yyvsp[0].integer); }
+#line 1921 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 69:
-/* Line 1787 of yacc.c */
-#line 420 "dtc-parser.y"
- { (yyval.integer) = ~(yyvsp[(2) - (2)].integer); }
+#line 420 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = -(yyvsp[0].integer); }
+#line 1927 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 70:
-/* Line 1787 of yacc.c */
-#line 421 "dtc-parser.y"
- { (yyval.integer) = !(yyvsp[(2) - (2)].integer); }
+#line 421 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = ~(yyvsp[0].integer); }
+#line 1933 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 71:
-/* Line 1787 of yacc.c */
-#line 426 "dtc-parser.y"
- {
- (yyval.data) = empty_data;
- }
+#line 422 "dtc-parser.y" /* yacc.c:1646 */
+ { (yyval.integer) = !(yyvsp[0].integer); }
+#line 1939 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 72:
-/* Line 1787 of yacc.c */
-#line 430 "dtc-parser.y"
+#line 427 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte));
+ (yyval.data) = empty_data;
}
+#line 1947 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 73:
-/* Line 1787 of yacc.c */
-#line 434 "dtc-parser.y"
+#line 431 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
+ (yyval.data) = data_append_byte((yyvsp[-1].data), (yyvsp[0].byte));
}
+#line 1955 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 74:
-/* Line 1787 of yacc.c */
-#line 441 "dtc-parser.y"
+#line 435 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.nodelist) = NULL;
+ (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref));
}
+#line 1963 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 75:
-/* Line 1787 of yacc.c */
-#line 445 "dtc-parser.y"
+#line 442 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist));
+ (yyval.nodelist) = NULL;
}
+#line 1971 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 76:
-/* Line 1787 of yacc.c */
-#line 449 "dtc-parser.y"
+#line 446 "dtc-parser.y" /* yacc.c:1646 */
{
- print_error("syntax error: properties must precede subnodes");
- YYERROR;
+ (yyval.nodelist) = chain_node((yyvsp[-1].node), (yyvsp[0].nodelist));
}
+#line 1979 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 77:
-/* Line 1787 of yacc.c */
-#line 457 "dtc-parser.y"
+#line 450 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename));
+ ERROR(&(yylsp[0]), "Properties must precede subnodes");
+ YYERROR;
}
+#line 1988 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 78:
-/* Line 1787 of yacc.c */
-#line 461 "dtc-parser.y"
+#line 458 "dtc-parser.y" /* yacc.c:1646 */
{
- (yyval.node) = name_node(build_node_delete(), (yyvsp[(2) - (3)].propnodename));
+ (yyval.node) = name_node((yyvsp[0].node), (yyvsp[-1].propnodename));
}
+#line 1996 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
case 79:
-/* Line 1787 of yacc.c */
-#line 465 "dtc-parser.y"
+#line 462 "dtc-parser.y" /* yacc.c:1646 */
+ {
+ (yyval.node) = name_node(build_node_delete(), (yyvsp[-1].propnodename));
+ }
+#line 2004 "dtc-parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 80:
+#line 466 "dtc-parser.y" /* yacc.c:1646 */
{
- add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref));
- (yyval.node) = (yyvsp[(2) - (2)].node);
+ add_label(&(yyvsp[0].node)->labels, (yyvsp[-1].labelref));
+ (yyval.node) = (yyvsp[0].node);
}
+#line 2013 "dtc-parser.tab.c" /* yacc.c:1646 */
break;
-/* Line 1787 of yacc.c */
-#line 2073 "dtc-parser.tab.c"
+#line 2017 "dtc-parser.tab.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
+ *++yylsp = yyloc;
- /* Now `shift' the result of the reduction. Determine what state
+ /* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
goto yynewstate;
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
#endif
}
-
+ yyerror_range[1] = yylloc;
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
- error, discard it. */
+ error, discard it. */
if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval);
- yychar = YYEMPTY;
- }
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval, &yylloc);
+ yychar = YYEMPTY;
+ }
}
/* Else will try to reuse lookahead token after shifting the error
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
- /* Do not reclaim the symbols of the rule which action triggered
+ yyerror_range[1] = yylsp[1-yylen];
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
{
yyn = yypact[yystate];
if (!yypact_value_is_default (yyn))
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
- YYABORT;
-
+ YYABORT;
+ yyerror_range[1] = *yylsp;
yydestruct ("Error: popping",
- yystos[yystate], yyvsp);
+ yystos[yystate], yyvsp, yylsp);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
+ yyerror_range[2] = yylloc;
+ /* Using YYLLOC is tempting, but would change the location of
+ the lookahead. YYLOC is available though. */
+ YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
+ *++yylsp = yyloc;
/* Shift the error token. */
YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
user semantic actions for why this is necessary. */
yytoken = YYTRANSLATE (yychar);
yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
+ yytoken, &yylval, &yylloc);
}
- /* Do not reclaim the symbols of the rule which action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp);
+ yystos[*yyssp], yyvsp, yylsp);
YYPOPSTACK (1);
}
#ifndef yyoverflow
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
+ return yyresult;
}
+#line 472 "dtc-parser.y" /* yacc.c:1906 */
-/* Line 2050 of yacc.c */
-#line 471 "dtc-parser.y"
-
-
-void print_error(char const *fmt, ...)
-{
- va_list va;
-
- va_start(va, fmt);
- srcpos_verror(&yylloc, fmt, va);
- va_end(va);
-
- treesource_error = 1;
-}
-
-void yyerror(char const *s) {
- print_error("%s", s);
-}
-
-static unsigned long long eval_literal(const char *s, int base, int bits)
-{
- unsigned long long val;
- char *e;
-
- errno = 0;
- val = strtoull(s, &e, base);
- if (*e) {
- size_t uls = strspn(e, "UL");
- if (e[uls])
- print_error("bad characters in literal");
- }
- if ((errno == ERANGE)
- || ((bits < 64) && (val >= (1ULL << bits))))
- print_error("literal out of range");
- else if (errno != 0)
- print_error("bad literal");
- return val;
-}
-
-static unsigned char eval_char_literal(const char *s)
+void yyerror(char const *s)
{
- int i = 1;
- char c = s[0];
-
- if (c == '\0')
- {
- print_error("empty character literal");
- return 0;
- }
-
- /*
- * If the first character in the character literal is a \ then process
- * the remaining characters as an escape encoding. If the first
- * character is neither an escape or a terminator it should be the only
- * character in the literal and will be returned.
- */
- if (c == '\\')
- c = get_escape_char(s, &i);
-
- if (s[i] != '\0')
- print_error("malformed character literal");
-
- return c;
+ ERROR(&yylloc, "%s", s);
}