Search
SailfishOS Open Build Service
>
Projects
>
home:mike7b4
:
bbb
>
kernel-adaptation-bbb-v3.12
> 0023-dtc-Dynamic-symbols-fixup-support-shipped.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0023-dtc-Dynamic-symbols-fixup-support-shipped.patch of Package kernel-adaptation-bbb-v3.12
From 389477aa6b9b67dee1c52cd33227eaf8d402bb86 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou <panto@antoniou-consulting.com> Date: Wed, 26 Jun 2013 15:13:52 +0300 Subject: [PATCH 23/96] dtc: Dynamic symbols & fixup support (shipped) This commit adds the generated shipped files by the "dtc: Dynamic symbols & fixup support" commit Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com> --- scripts/dtc/dtc-lexer.lex.c_shipped | 431 +++++------ scripts/dtc/dtc-parser.tab.c_shipped | 1370 +++++++++++++++++----------------- scripts/dtc/dtc-parser.tab.h_shipped | 60 +- 3 files changed, 929 insertions(+), 932 deletions(-) diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped index 2d30f41..ecd115c 100644 --- a/scripts/dtc/dtc-lexer.lex.c_shipped +++ b/scripts/dtc/dtc-lexer.lex.c_shipped @@ -372,8 +372,8 @@ static void yy_fatal_error (yyconst char msg[] ); *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 30 -#define YY_END_OF_BUFFER 31 +#define YY_NUM_RULES 31 +#define YY_END_OF_BUFFER 32 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -381,25 +381,26 @@ struct yy_trans_info 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[168] = { 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 + 32, 30, 19, 19, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, 16, 17, + 17, 30, 17, 11, 11, 19, 27, 0, 3, 0, + 28, 13, 0, 0, 12, 0, 0, 0, 0, 0, + 0, 0, 0, 22, 24, 26, 25, 23, 0, 10, + 29, 0, 0, 0, 15, 15, 17, 17, 17, 11, + 11, 11, 0, 13, 0, 12, 0, 0, 0, 21, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, + 11, 11, 11, 0, 20, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 17, 14, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 17, 7, 0, + 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 18, 0, 0, + 5, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 6, + 9, 0, 0, 0, 0, 8, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -415,9 +416,9 @@ static yyconst flex_int32_t yy_ec[256] = 22, 22, 22, 22, 24, 22, 22, 25, 22, 22, 1, 26, 27, 1, 22, 1, 21, 28, 29, 30, - 31, 21, 22, 22, 32, 22, 22, 33, 34, 35, - 36, 37, 22, 38, 39, 40, 41, 42, 22, 25, - 43, 22, 44, 45, 46, 1, 1, 1, 1, 1, + 31, 21, 32, 22, 33, 22, 22, 34, 35, 36, + 37, 38, 22, 39, 40, 41, 42, 43, 22, 25, + 44, 22, 45, 46, 47, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -434,163 +435,167 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[47] = +static yyconst flex_int32_t yy_meta[48] = { 0, 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, 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, 8, 3, 1, 1 } ; -static yyconst flex_int16_t yy_base[175] = +static yyconst flex_int16_t yy_base[182] = { 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, 395, 388, 41, 42, 393, 73, 392, 35, 45, + 398, 403, 62, 119, 378, 118, 117, 117, 117, 49, + 377, 109, 378, 348, 129, 123, 0, 150, 403, 0, + 165, 0, 135, 169, 125, 184, 403, 128, 403, 390, + 403, 0, 379, 133, 403, 148, 381, 387, 356, 129, + 352, 356, 352, 403, 403, 403, 403, 403, 368, 403, + 403, 187, 351, 347, 403, 365, 0, 188, 348, 192, + 357, 356, 0, 0, 0, 164, 368, 122, 374, 363, + 334, 340, 333, 343, 336, 328, 195, 333, 339, 331, + 403, 343, 189, 318, 351, 350, 322, 330, 348, 186, + + 320, 326, 215, 326, 322, 324, 403, 344, 340, 311, + 308, 317, 307, 317, 314, 198, 344, 343, 403, 313, + 328, 306, 311, 300, 285, 212, 316, 312, 283, 276, + 275, 253, 251, 268, 217, 187, 403, 403, 265, 223, + 403, 212, 224, 221, 233, 205, 217, 209, 238, 223, + 214, 212, 196, 224, 403, 219, 183, 178, 137, 403, + 403, 107, 97, 18, 40, 403, 403, 250, 256, 264, + 268, 272, 278, 285, 289, 297, 305, 309, 315, 323, + 331 } ; -static yyconst flex_int16_t yy_def[175] = +static yyconst flex_int16_t yy_def[182] = { 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 + 167, 1, 1, 1, 1, 5, 167, 7, 1, 1, + 167, 167, 167, 167, 167, 168, 169, 170, 167, 167, + 167, 167, 171, 167, 167, 167, 172, 171, 167, 173, + 174, 173, 173, 167, 167, 167, 167, 168, 167, 168, + 167, 175, 167, 170, 167, 170, 176, 177, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 171, 167, + 167, 167, 167, 167, 167, 171, 173, 174, 173, 167, + 167, 167, 178, 175, 179, 170, 176, 176, 177, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 173, + 167, 167, 178, 179, 167, 167, 167, 167, 167, 167, + + 167, 167, 167, 167, 167, 173, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 180, 167, 173, 167, 167, + 167, 167, 167, 167, 167, 180, 167, 180, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 181, + 167, 167, 167, 181, 167, 181, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 0, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167 } ; -static yyconst flex_int16_t yy_nxt[440] = +static yyconst flex_int16_t yy_nxt[451] = { 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, + 23, 23, 23, 23, 12, 24, 12, 25, 34, 35, + 35, 25, 166, 26, 26, 27, 27, 27, 34, 35, + 35, 165, 28, 36, 36, 36, 54, 55, 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, 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 + 31, 31, 31, 31, 31, 31, 31, 12, 24, 12, + 36, 36, 36, 39, 41, 45, 47, 57, 58, 48, + 62, 78, 47, 39, 95, 48, 62, 164, 70, 70, + 70, 45, 46, 40, 49, 163, 50, 71, 72, 51, + 49, 52, 50, 40, 53, 64, 76, 52, 46, 82, + 53, 43, 63, 66, 66, 66, 60, 162, 69, 83, + 66, 67, 45, 46, 67, 67, 67, 66, 66, 66, + 66, 60, 70, 70, 70, 36, 36, 36, 62, 46, + 161, 71, 72, 73, 67, 160, 103, 67, 67, 67, + + 87, 87, 87, 127, 60, 70, 70, 70, 87, 87, + 87, 71, 72, 112, 71, 72, 103, 127, 135, 113, + 116, 167, 143, 128, 144, 142, 142, 142, 155, 155, + 142, 142, 142, 159, 149, 149, 149, 128, 150, 149, + 149, 149, 158, 150, 157, 153, 152, 151, 156, 156, + 38, 38, 38, 38, 38, 38, 38, 38, 42, 148, + 147, 146, 42, 42, 44, 44, 44, 44, 44, 44, + 44, 44, 59, 59, 59, 59, 65, 145, 65, 67, + 141, 140, 67, 139, 67, 67, 68, 138, 137, 68, + 68, 68, 68, 74, 136, 74, 74, 77, 77, 77, + + 77, 77, 77, 77, 77, 79, 79, 79, 79, 79, + 79, 79, 79, 93, 167, 93, 94, 135, 94, 94, + 134, 94, 94, 126, 126, 126, 126, 126, 126, 126, + 126, 154, 154, 154, 154, 154, 154, 154, 154, 133, + 132, 131, 130, 129, 62, 62, 125, 124, 123, 122, + 121, 120, 119, 47, 118, 113, 117, 115, 114, 111, + 110, 109, 48, 108, 107, 91, 106, 105, 104, 102, + 101, 100, 99, 98, 97, 96, 80, 78, 92, 91, + 90, 60, 89, 88, 60, 86, 85, 84, 81, 80, + 78, 75, 167, 61, 60, 56, 37, 167, 33, 25, + + 26, 25, 11, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167 } ; -static yyconst flex_int16_t yy_chk[440] = +static yyconst flex_int16_t yy_chk[451] = { 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, + 1, 1, 1, 1, 1, 1, 1, 4, 9, 9, + 9, 10, 165, 4, 5, 5, 5, 5, 10, 10, + 10, 164, 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, 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, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 14, 14, 14, 16, 17, 18, 19, 22, 22, 19, + 25, 78, 26, 38, 78, 26, 33, 163, 35, 35, + 35, 44, 18, 16, 19, 162, 19, 35, 35, 19, + 26, 19, 26, 38, 19, 26, 46, 26, 44, 50, + 26, 17, 25, 28, 28, 28, 28, 159, 33, 50, + 28, 31, 76, 46, 31, 31, 31, 28, 28, 28, + 28, 31, 34, 34, 34, 36, 36, 36, 62, 76, + 158, 34, 34, 34, 68, 157, 87, 68, 68, 68, + + 62, 62, 62, 116, 68, 70, 70, 70, 87, 87, + 87, 93, 93, 100, 70, 70, 103, 126, 135, 100, + 103, 156, 136, 116, 136, 142, 142, 142, 150, 154, + 135, 135, 135, 153, 145, 145, 145, 126, 145, 149, + 149, 149, 152, 149, 151, 148, 147, 146, 150, 154, + 168, 168, 168, 168, 168, 168, 168, 168, 169, 144, + 143, 140, 169, 169, 170, 170, 170, 170, 170, 170, + 170, 170, 171, 171, 171, 171, 172, 139, 172, 173, + 134, 133, 173, 132, 173, 173, 174, 131, 130, 174, + 174, 174, 174, 175, 129, 175, 175, 176, 176, 176, + + 176, 176, 176, 176, 176, 177, 177, 177, 177, 177, + 177, 177, 177, 178, 128, 178, 179, 127, 179, 179, + 125, 179, 179, 180, 180, 180, 180, 180, 180, 180, + 180, 181, 181, 181, 181, 181, 181, 181, 181, 124, + 123, 122, 121, 120, 118, 117, 115, 114, 113, 112, + 111, 110, 109, 108, 106, 105, 104, 102, 101, 99, + 98, 97, 96, 95, 94, 92, 90, 89, 88, 86, + 85, 84, 83, 82, 81, 80, 79, 77, 72, 71, + 69, 66, 64, 63, 59, 53, 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 + 3, 2, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167 } ; static yy_state_type yy_last_accepting_state; @@ -660,7 +665,7 @@ static int dts_version = 1; static void push_input_file(const char *filename); static int pop_input_file(void); -#line 664 "dtc-lexer.lex.c" +#line 669 "dtc-lexer.lex.c" #define INITIAL 0 #define INCLUDE 1 @@ -854,7 +859,7 @@ YY_DECL #line 67 "dtc-lexer.l" -#line 858 "dtc-lexer.lex.c" +#line 863 "dtc-lexer.lex.c" if ( !(yy_init) ) { @@ -908,13 +913,13 @@ yy_match: 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 >= 168 ) 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 != 167 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -1006,23 +1011,31 @@ case 5: YY_RULE_SETUP #line 115 "dtc-lexer.l" { + DPRINT("Keyword: /plugin/\n"); + return DT_PLUGIN; + } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 120 "dtc-lexer.l" +{ DPRINT("Keyword: /memreserve/\n"); BEGIN_DEFAULT(); return DT_MEMRESERVE; } YY_BREAK -case 6: +case 7: YY_RULE_SETUP -#line 121 "dtc-lexer.l" +#line 126 "dtc-lexer.l" { DPRINT("Keyword: /bits/\n"); BEGIN_DEFAULT(); return DT_BITS; } YY_BREAK -case 7: +case 8: YY_RULE_SETUP -#line 127 "dtc-lexer.l" +#line 132 "dtc-lexer.l" { DPRINT("Keyword: /delete-property/\n"); DPRINT("<PROPNODENAME>\n"); @@ -1030,9 +1043,9 @@ YY_RULE_SETUP return DT_DEL_PROP; } YY_BREAK -case 8: +case 9: YY_RULE_SETUP -#line 134 "dtc-lexer.l" +#line 139 "dtc-lexer.l" { DPRINT("Keyword: /delete-node/\n"); DPRINT("<PROPNODENAME>\n"); @@ -1040,9 +1053,9 @@ YY_RULE_SETUP return DT_DEL_NODE; } YY_BREAK -case 9: +case 10: YY_RULE_SETUP -#line 141 "dtc-lexer.l" +#line 146 "dtc-lexer.l" { DPRINT("Label: %s\n", yytext); yylval.labelref = xstrdup(yytext); @@ -1050,19 +1063,19 @@ YY_RULE_SETUP return DT_LABEL; } YY_BREAK -case 10: +case 11: YY_RULE_SETUP -#line 148 "dtc-lexer.l" +#line 153 "dtc-lexer.l" { yylval.literal = xstrdup(yytext); DPRINT("Literal: '%s'\n", yylval.literal); return DT_LITERAL; } YY_BREAK -case 11: -/* rule 11 can match eol */ +case 12: +/* rule 12 can match eol */ YY_RULE_SETUP -#line 154 "dtc-lexer.l" +#line 159 "dtc-lexer.l" { yytext[yyleng-1] = '\0'; yylval.literal = xstrdup(yytext+1); @@ -1070,18 +1083,18 @@ YY_RULE_SETUP return DT_CHAR_LITERAL; } YY_BREAK -case 12: +case 13: YY_RULE_SETUP -#line 161 "dtc-lexer.l" +#line 166 "dtc-lexer.l" { /* label reference */ DPRINT("Ref: %s\n", yytext+1); yylval.labelref = xstrdup(yytext+1); return DT_REF; } YY_BREAK -case 13: +case 14: YY_RULE_SETUP -#line 167 "dtc-lexer.l" +#line 172 "dtc-lexer.l" { /* new-style path reference */ yytext[yyleng-1] = '\0'; DPRINT("Ref: %s\n", yytext+2); @@ -1089,27 +1102,27 @@ YY_RULE_SETUP return DT_REF; } YY_BREAK -case 14: +case 15: YY_RULE_SETUP -#line 174 "dtc-lexer.l" +#line 179 "dtc-lexer.l" { yylval.byte = strtol(yytext, NULL, 16); DPRINT("Byte: %02x\n", (int)yylval.byte); return DT_BYTE; } YY_BREAK -case 15: +case 16: YY_RULE_SETUP -#line 180 "dtc-lexer.l" +#line 185 "dtc-lexer.l" { DPRINT("/BYTESTRING\n"); BEGIN_DEFAULT(); return ']'; } YY_BREAK -case 16: +case 17: YY_RULE_SETUP -#line 186 "dtc-lexer.l" +#line 191 "dtc-lexer.l" { DPRINT("PropNodeName: %s\n", yytext); yylval.propnodename = xstrdup((yytext[0] == '\\') ? @@ -1118,75 +1131,75 @@ YY_RULE_SETUP return DT_PROPNODENAME; } YY_BREAK -case 17: +case 18: YY_RULE_SETUP -#line 194 "dtc-lexer.l" +#line 199 "dtc-lexer.l" { DPRINT("Binary Include\n"); return DT_INCBIN; } YY_BREAK -case 18: -/* rule 18 can match eol */ -YY_RULE_SETUP -#line 199 "dtc-lexer.l" -/* eat whitespace */ - YY_BREAK case 19: /* rule 19 can match eol */ YY_RULE_SETUP -#line 200 "dtc-lexer.l" -/* eat C-style comments */ +#line 204 "dtc-lexer.l" +/* eat whitespace */ YY_BREAK case 20: /* rule 20 can match eol */ YY_RULE_SETUP -#line 201 "dtc-lexer.l" -/* eat C++-style comments */ +#line 205 "dtc-lexer.l" +/* eat C-style comments */ YY_BREAK case 21: +/* rule 21 can match eol */ YY_RULE_SETUP -#line 203 "dtc-lexer.l" -{ return DT_LSHIFT; }; +#line 206 "dtc-lexer.l" +/* eat C++-style comments */ YY_BREAK case 22: YY_RULE_SETUP -#line 204 "dtc-lexer.l" -{ return DT_RSHIFT; }; +#line 208 "dtc-lexer.l" +{ return DT_LSHIFT; }; YY_BREAK case 23: YY_RULE_SETUP -#line 205 "dtc-lexer.l" -{ return DT_LE; }; +#line 209 "dtc-lexer.l" +{ return DT_RSHIFT; }; YY_BREAK case 24: YY_RULE_SETUP -#line 206 "dtc-lexer.l" -{ return DT_GE; }; +#line 210 "dtc-lexer.l" +{ return DT_LE; }; YY_BREAK case 25: YY_RULE_SETUP -#line 207 "dtc-lexer.l" -{ return DT_EQ; }; +#line 211 "dtc-lexer.l" +{ return DT_GE; }; YY_BREAK case 26: YY_RULE_SETUP -#line 208 "dtc-lexer.l" -{ return DT_NE; }; +#line 212 "dtc-lexer.l" +{ return DT_EQ; }; YY_BREAK case 27: YY_RULE_SETUP -#line 209 "dtc-lexer.l" -{ return DT_AND; }; +#line 213 "dtc-lexer.l" +{ return DT_NE; }; YY_BREAK case 28: YY_RULE_SETUP -#line 210 "dtc-lexer.l" -{ return DT_OR; }; +#line 214 "dtc-lexer.l" +{ return DT_AND; }; YY_BREAK case 29: YY_RULE_SETUP -#line 212 "dtc-lexer.l" +#line 215 "dtc-lexer.l" +{ return DT_OR; }; + YY_BREAK +case 30: +YY_RULE_SETUP +#line 217 "dtc-lexer.l" { DPRINT("Char: %c (\\x%02x)\n", yytext[0], (unsigned)yytext[0]); @@ -1202,12 +1215,12 @@ YY_RULE_SETUP return yytext[0]; } YY_BREAK -case 30: +case 31: YY_RULE_SETUP -#line 227 "dtc-lexer.l" +#line 232 "dtc-lexer.l" ECHO; YY_BREAK -#line 1211 "dtc-lexer.lex.c" +#line 1224 "dtc-lexer.lex.c" case YY_END_OF_BUFFER: { @@ -1499,7 +1512,7 @@ static int yy_get_next_buffer (void) 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 >= 168 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1527,11 +1540,11 @@ static int yy_get_next_buffer (void) 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 >= 168 ) 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 == 167); return yy_is_jam ? 0 : yy_current_state; } @@ -2166,7 +2179,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 227 "dtc-lexer.l" +#line 232 "dtc-lexer.l" diff --git a/scripts/dtc/dtc-parser.tab.c_shipped b/scripts/dtc/dtc-parser.tab.c_shipped index ee1d8c3..2977268 100644 --- a/scripts/dtc/dtc-parser.tab.c_shipped +++ b/scripts/dtc/dtc-parser.tab.c_shipped @@ -1,8 +1,10 @@ -/* A Bison parser, made by GNU Bison 2.5. */ -/* Bison implementation for Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ + +/* Skeleton implementation for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + 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 @@ -44,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.5" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -65,10 +67,11 @@ /* Copy the first part of user declarations. */ -/* Line 268 of yacc.c */ +/* Line 189 of yacc.c */ #line 21 "dtc-parser.y" #include <stdio.h> +#include <inttypes.h> #include "dtc.h" #include "srcpos.h" @@ -86,8 +89,8 @@ static unsigned long long eval_literal(const char *s, int base, int bits); static unsigned char eval_char_literal(const char *s); -/* Line 268 of yacc.c */ -#line 91 "dtc-parser.tab.c" +/* Line 189 of yacc.c */ +#line 94 "dtc-parser.tab.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -115,27 +118,28 @@ static unsigned char eval_char_literal(const char *s); 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 + DT_PLUGIN = 259, + DT_MEMRESERVE = 260, + DT_LSHIFT = 261, + DT_RSHIFT = 262, + DT_LE = 263, + DT_GE = 264, + DT_EQ = 265, + DT_NE = 266, + DT_AND = 267, + DT_OR = 268, + DT_BITS = 269, + DT_DEL_PROP = 270, + DT_DEL_NODE = 271, + DT_PROPNODENAME = 272, + DT_LITERAL = 273, + DT_CHAR_LITERAL = 274, + DT_BASE = 275, + DT_BYTE = 276, + DT_STRING = 277, + DT_LABEL = 278, + DT_REF = 279, + DT_INCBIN = 280 }; #endif @@ -145,8 +149,8 @@ static unsigned char eval_char_literal(const char *s); typedef union YYSTYPE { -/* Line 293 of yacc.c */ -#line 40 "dtc-parser.y" +/* Line 214 of yacc.c */ +#line 41 "dtc-parser.y" char *propnodename; char *literal; @@ -166,11 +170,12 @@ typedef union YYSTYPE struct node *nodelist; struct reserve_info *re; uint64_t integer; + int is_plugin; -/* Line 293 of yacc.c */ -#line 174 "dtc-parser.tab.c" +/* Line 214 of yacc.c */ +#line 179 "dtc-parser.tab.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -181,8 +186,8 @@ typedef union YYSTYPE /* Copy the second part of user declarations. */ -/* Line 343 of yacc.c */ -#line 186 "dtc-parser.tab.c" +/* Line 264 of yacc.c */ +#line 191 "dtc-parser.tab.c" #ifdef short # undef short @@ -232,7 +237,7 @@ typedef short int yytype_int16; #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS +# if YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -285,11 +290,11 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 +# ifndef _STDLIB_H +# define _STDLIB_H 1 # endif # endif # endif @@ -312,24 +317,24 @@ YYID (yyi) # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ +# if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 +# ifndef _STDLIB_H +# define _STDLIB_H 1 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) 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__ \ +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif @@ -358,7 +363,23 @@ union yyalloc ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) -# define YYCOPY_NEEDED 1 +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of @@ -378,43 +399,23 @@ union yyalloc #endif -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (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 134 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 48 +#define YYNTOKENS 49 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 28 +#define YYNNTS 29 /* YYNRULES -- Number of rules. */ -#define YYNRULES 79 +#define YYNRULES 81 /* YYNRULES -- Number of states. */ -#define YYNSTATES 141 +#define YYNSTATES 144 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 279 +#define YYMAXUTOK 280 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -425,16 +426,16 @@ 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, 48, 2, 2, 2, 46, 42, 2, + 34, 36, 45, 43, 35, 44, 2, 27, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 39, 26, + 37, 30, 31, 38, 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, 32, 2, 33, 41, 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, 28, 40, 29, 47, 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, @@ -449,7 +450,8 @@ static const yytype_uint8 yytranslate[] = 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, 24, + 25 }; #if YYDEBUG @@ -457,59 +459,61 @@ static const yytype_uint8 yytranslate[] = 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 + 0, 0, 3, 9, 10, 13, 14, 17, 22, 25, + 28, 32, 36, 41, 47, 48, 51, 56, 59, 63, + 66, 69, 73, 78, 81, 91, 97, 100, 101, 104, + 107, 111, 113, 116, 119, 122, 124, 126, 130, 132, + 134, 140, 142, 146, 148, 152, 154, 158, 160, 164, + 166, 170, 172, 176, 180, 182, 186, 190, 194, 198, + 202, 206, 208, 212, 216, 218, 222, 226, 230, 232, + 234, 237, 240, 243, 244, 247, 250, 251, 254, 257, + 260, 264 }; /* 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 + 50, 0, -1, 3, 26, 51, 52, 54, -1, -1, + 4, 26, -1, -1, 53, 52, -1, 5, 61, 61, + 26, -1, 23, 53, -1, 27, 55, -1, 54, 27, + 55, -1, 54, 24, 55, -1, 54, 16, 24, 26, + -1, 28, 56, 76, 29, 26, -1, -1, 56, 57, + -1, 17, 30, 58, 26, -1, 17, 26, -1, 15, + 17, 26, -1, 23, 57, -1, 59, 22, -1, 59, + 60, 31, -1, 59, 32, 75, 33, -1, 59, 24, + -1, 59, 25, 34, 22, 35, 61, 35, 61, 36, + -1, 59, 25, 34, 22, 36, -1, 58, 23, -1, + -1, 58, 35, -1, 59, 23, -1, 14, 18, 37, + -1, 37, -1, 60, 61, -1, 60, 24, -1, 60, + 23, -1, 18, -1, 19, -1, 34, 62, 36, -1, + 63, -1, 64, -1, 64, 38, 62, 39, 63, -1, + 65, -1, 64, 13, 65, -1, 66, -1, 65, 12, + 66, -1, 67, -1, 66, 40, 67, -1, 68, -1, + 67, 41, 68, -1, 69, -1, 68, 42, 69, -1, + 70, -1, 69, 10, 70, -1, 69, 11, 70, -1, + 71, -1, 70, 37, 71, -1, 70, 31, 71, -1, + 70, 8, 71, -1, 70, 9, 71, -1, 71, 6, + 72, -1, 71, 7, 72, -1, 72, -1, 72, 43, + 73, -1, 72, 44, 73, -1, 73, -1, 73, 45, + 74, -1, 73, 27, 74, -1, 73, 46, 74, -1, + 74, -1, 61, -1, 44, 74, -1, 47, 74, -1, + 48, 74, -1, -1, 75, 21, -1, 75, 23, -1, + -1, 77, 76, -1, 77, 57, -1, 17, 55, -1, + 16, 17, 26, -1, 23, 77, -1 }; /* 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, 113, 113, 124, 127, 135, 138, 145, 149, 157, + 161, 165, 175, 189, 197, 200, 207, 211, 215, 219, + 227, 231, 235, 239, 243, 260, 270, 278, 281, 285, + 292, 307, 312, 332, 346, 353, 357, 361, 368, 372, + 373, 377, 378, 382, 383, 387, 388, 392, 393, 397, + 398, 402, 403, 404, 408, 409, 410, 411, 412, 416, + 417, 418, 422, 423, 424, 428, 429, 430, 431, 435, + 436, 437, 438, 443, 446, 450, 458, 461, 465, 473, + 477, 481 }; #endif @@ -518,19 +522,20 @@ static const yytype_uint16 yyrline[] = First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$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", - "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", 0 + "$end", "error", "$undefined", "DT_V1", "DT_PLUGIN", "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", "plugindecl", "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", 0 }; #endif @@ -541,163 +546,160 @@ 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, 279, 280, 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 + 0, 49, 50, 51, 51, 52, 52, 53, 53, 54, + 54, 54, 54, 55, 56, 56, 57, 57, 57, 57, + 58, 58, 58, 58, 58, 58, 58, 59, 59, 59, + 60, 60, 60, 60, 60, 61, 61, 61, 62, 63, + 63, 64, 64, 65, 65, 66, 66, 67, 67, 68, + 68, 69, 69, 69, 70, 70, 70, 70, 70, 71, + 71, 71, 72, 72, 72, 73, 73, 73, 73, 74, + 74, 74, 74, 75, 75, 75, 76, 76, 76, 77, + 77, 77 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { - 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 + 0, 2, 5, 0, 2, 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 }; -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't 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, 5, 4, 0, 0, + 0, 5, 35, 36, 0, 0, 8, 0, 2, 6, + 0, 0, 0, 69, 0, 38, 39, 41, 43, 45, + 47, 49, 51, 54, 61, 64, 68, 0, 14, 9, + 0, 0, 0, 70, 71, 72, 37, 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, 0, 0, 7, 76, 0, 11, + 10, 42, 0, 44, 46, 48, 50, 52, 53, 57, + 58, 56, 55, 59, 60, 62, 63, 66, 65, 67, + 0, 0, 0, 0, 15, 0, 76, 12, 0, 0, + 0, 17, 27, 79, 19, 81, 0, 78, 77, 40, + 18, 80, 0, 0, 13, 26, 16, 28, 0, 20, + 29, 23, 0, 73, 31, 0, 0, 0, 0, 34, + 33, 21, 32, 30, 0, 74, 75, 22, 0, 25, + 0, 0, 0, 24 }; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = +static const yytype_int16 yydefgoto[] = { - -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 + -1, 2, 6, 10, 11, 18, 39, 67, 94, 112, + 113, 125, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 128, 95, 96 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -78 +#define YYPACT_NINF -81 static const yytype_int8 yypact[] = { - 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 + 33, 44, 63, 47, -81, 46, 9, -81, 22, 9, + 55, 9, -81, -81, -10, 22, -81, -3, 37, -81, + -10, -10, -10, -81, 49, -81, -7, 76, 50, 48, + 52, 8, 2, 36, -15, -1, -81, 65, -81, -81, + 68, -3, -3, -81, -81, -81, -81, -10, -10, -10, + -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, + -10, -10, -10, -10, -10, -10, -81, 51, 67, -81, + -81, 76, 56, 50, 48, 52, 8, 2, 2, 36, + 36, 36, 36, -15, -15, -1, -1, -81, -81, -81, + 79, 80, 45, 51, -81, 69, 51, -81, -10, 73, + 74, -81, -81, -81, -81, -81, 75, -81, -81, -81, + -81, -81, 34, -2, -81, -81, -81, -81, 84, -81, + -81, -81, 70, -81, -81, 31, 66, 83, -6, -81, + -81, -81, -81, -81, 23, -81, -81, -81, 22, -81, + 71, 22, 72, -81 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -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 + -81, -81, -81, 96, 100, -81, -40, -81, -80, -81, + -81, -81, -8, 62, 13, -81, 77, 64, 78, 61, + 82, 27, 21, 24, 25, -17, -81, 18, 26 }; /* 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. */ + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 static const yytype_uint8 yytable[] = { - 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 + 15, 69, 70, 43, 44, 45, 47, 37, 12, 13, + 55, 56, 118, 104, 8, 135, 107, 136, 53, 54, + 119, 120, 121, 122, 14, 38, 63, 137, 61, 62, + 123, 48, 9, 57, 20, 124, 1, 21, 22, 58, + 12, 13, 59, 60, 64, 65, 87, 88, 89, 12, + 13, 5, 103, 40, 129, 130, 14, 115, 138, 139, + 116, 41, 131, 4, 42, 14, 90, 91, 92, 117, + 3, 101, 7, 38, 93, 102, 79, 80, 81, 82, + 77, 78, 17, 83, 84, 46, 85, 86, 49, 51, + 50, 66, 68, 97, 52, 98, 99, 100, 106, 110, + 111, 114, 126, 133, 127, 134, 141, 19, 143, 16, + 72, 109, 75, 73, 108, 0, 0, 132, 0, 105, + 0, 0, 0, 0, 71, 0, 0, 0, 74, 0, + 140, 0, 0, 142, 76 }; -#define yypact_value_is_default(yystate) \ - ((yystate) == (-78)) - -#define yytable_value_is_error(yytable_value) \ - YYID (0) - static const yytype_int16 yycheck[] = { - 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 + 8, 41, 42, 20, 21, 22, 13, 15, 18, 19, + 8, 9, 14, 93, 5, 21, 96, 23, 10, 11, + 22, 23, 24, 25, 34, 28, 27, 33, 43, 44, + 32, 38, 23, 31, 44, 37, 3, 47, 48, 37, + 18, 19, 6, 7, 45, 46, 63, 64, 65, 18, + 19, 4, 92, 16, 23, 24, 34, 23, 35, 36, + 26, 24, 31, 0, 27, 34, 15, 16, 17, 35, + 26, 26, 26, 28, 23, 30, 55, 56, 57, 58, + 53, 54, 27, 59, 60, 36, 61, 62, 12, 41, + 40, 26, 24, 26, 42, 39, 17, 17, 29, 26, + 26, 26, 18, 37, 34, 22, 35, 11, 36, 9, + 48, 98, 51, 49, 96, -1, -1, 125, -1, 93, + -1, -1, -1, -1, 47, -1, -1, -1, 50, -1, + 138, -1, -1, 141, 52 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 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, 3, 50, 26, 0, 4, 51, 26, 5, 23, + 52, 53, 18, 19, 34, 61, 53, 27, 54, 52, + 44, 47, 48, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 61, 28, 55, + 16, 24, 27, 74, 74, 74, 36, 13, 38, 12, + 40, 41, 42, 10, 11, 8, 9, 31, 37, 6, + 7, 43, 44, 27, 45, 46, 26, 56, 24, 55, + 55, 65, 62, 66, 67, 68, 69, 70, 70, 71, + 71, 71, 71, 72, 72, 73, 73, 74, 74, 74, + 15, 16, 17, 23, 57, 76, 77, 26, 39, 17, + 17, 26, 30, 55, 57, 77, 29, 57, 76, 63, + 26, 26, 58, 59, 26, 23, 26, 35, 14, 22, + 23, 24, 25, 32, 37, 60, 18, 34, 75, 23, + 24, 31, 61, 37, 22, 21, 23, 33, 35, 36, + 61, 35, 61, 36 }; #define yyerrok (yyerrstatus = 0) @@ -712,18 +714,9 @@ static const yytype_uint8 yystos[] = /* 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. */ + Once GCC version 2 has supplanted version 1, this can go. */ #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 YYRECOVERING() (!!yyerrstatus) @@ -733,6 +726,7 @@ do \ { \ yychar = (Token); \ yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ @@ -774,10 +768,19 @@ while (YYID (0)) #endif -/* This macro is provided for backward compatibility. */ +/* 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. */ #ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif #endif @@ -969,6 +972,7 @@ int yydebug; # define YYMAXDEPTH 10000 #endif + #if YYERROR_VERBOSE @@ -1071,142 +1075,115 @@ yytnamerr (char *yyres, const char *yystr) } # endif -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) { - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = 0; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - 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 - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } + int yyn = yypact[yystate]; - switch (yycount) + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } + if (yysize_overflow) + return YYSIZE_MAXIMUM; - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } } #endif /* YYERROR_VERBOSE */ + /*-----------------------------------------------. | Release the memory associated to this symbol. | @@ -1239,7 +1216,6 @@ yydestruct (yymsg, yytype, yyvaluep) } } - /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus @@ -1266,9 +1242,10 @@ YYSTYPE yylval; int yynerrs; -/*----------. -| yyparse. | -`----------*/ + +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1292,6 +1269,8 @@ yyparse () #endif #endif { + + int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; @@ -1446,7 +1425,7 @@ yybackup: /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) + if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ @@ -1477,8 +1456,8 @@ yybackup: yyn = yytable[yyn]; if (yyn <= 0) { - if (yytable_value_is_error (yyn)) - goto yyerrlab; + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; yyn = -yyn; goto yyreduce; } @@ -1533,73 +1512,93 @@ yyreduce: { case 2: -/* Line 1806 of yacc.c */ -#line 110 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 114 "dtc-parser.y" { - the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node), - guess_boot_cpuid((yyvsp[(4) - (4)].node))); - } + (yyvsp[(5) - (5)].node)->is_plugin = (yyvsp[(3) - (5)].is_plugin); + (yyvsp[(5) - (5)].node)->is_root = 1; + the_boot_info = build_boot_info((yyvsp[(4) - (5)].re), (yyvsp[(5) - (5)].node), + guess_boot_cpuid((yyvsp[(5) - (5)].node))); + ;} break; case 3: -/* Line 1806 of yacc.c */ -#line 118 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 124 "dtc-parser.y" { - (yyval.re) = NULL; - } + (yyval.is_plugin) = 0; + ;} break; case 4: -/* Line 1806 of yacc.c */ -#line 122 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 128 "dtc-parser.y" { - (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re)); - } + (yyval.is_plugin) = 1; + ;} break; case 5: -/* Line 1806 of yacc.c */ -#line 129 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 135 "dtc-parser.y" { - (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer)); - } + (yyval.re) = NULL; + ;} break; case 6: -/* Line 1806 of yacc.c */ -#line 133 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 139 "dtc-parser.y" + { + (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re)); + ;} + break; + + case 7: + +/* Line 1455 of yacc.c */ +#line 146 "dtc-parser.y" + { + (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer)); + ;} + break; + + case 8: + +/* Line 1455 of yacc.c */ +#line 150 "dtc-parser.y" { add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref)); (yyval.re) = (yyvsp[(2) - (2)].re); - } + ;} break; - case 7: + case 9: -/* Line 1806 of yacc.c */ -#line 141 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 158 "dtc-parser.y" { (yyval.node) = name_node((yyvsp[(2) - (2)].node), ""); - } + ;} break; - case 8: + case 10: -/* Line 1806 of yacc.c */ -#line 145 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 162 "dtc-parser.y" { (yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } + ;} break; - case 9: + case 11: -/* Line 1806 of yacc.c */ -#line 149 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 166 "dtc-parser.y" { struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref)); @@ -1608,13 +1607,13 @@ yyreduce: else print_error("label or path, '%s', not found", (yyvsp[(2) - (3)].labelref)); (yyval.node) = (yyvsp[(1) - (3)].node); - } + ;} break; - case 10: + case 12: -/* Line 1806 of yacc.c */ -#line 159 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 176 "dtc-parser.y" { struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref)); @@ -1624,113 +1623,113 @@ yyreduce: delete_node(target); (yyval.node) = (yyvsp[(1) - (4)].node); - } + ;} break; - case 11: + case 13: -/* Line 1806 of yacc.c */ -#line 173 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 190 "dtc-parser.y" { (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist)); - } + ;} break; - case 12: + case 14: -/* Line 1806 of yacc.c */ -#line 180 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 197 "dtc-parser.y" { (yyval.proplist) = NULL; - } + ;} break; - case 13: + case 15: -/* Line 1806 of yacc.c */ -#line 184 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 201 "dtc-parser.y" { (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist)); - } + ;} break; - case 14: + case 16: -/* Line 1806 of yacc.c */ -#line 191 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 208 "dtc-parser.y" { (yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data)); - } + ;} break; - case 15: + case 17: -/* Line 1806 of yacc.c */ -#line 195 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 212 "dtc-parser.y" { (yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data); - } + ;} break; - case 16: + case 18: -/* Line 1806 of yacc.c */ -#line 199 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 216 "dtc-parser.y" { (yyval.prop) = build_property_delete((yyvsp[(2) - (3)].propnodename)); - } + ;} break; - case 17: + case 19: -/* Line 1806 of yacc.c */ -#line 203 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 220 "dtc-parser.y" { add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref)); (yyval.prop) = (yyvsp[(2) - (2)].prop); - } + ;} break; - case 18: + case 20: -/* Line 1806 of yacc.c */ -#line 211 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 228 "dtc-parser.y" { (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data)); - } + ;} break; - case 19: + case 21: -/* Line 1806 of yacc.c */ -#line 215 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 232 "dtc-parser.y" { (yyval.data) = data_merge((yyvsp[(1) - (3)].data), (yyvsp[(2) - (3)].array).data); - } + ;} break; - case 20: + case 22: -/* Line 1806 of yacc.c */ -#line 219 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 236 "dtc-parser.y" { (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data)); - } + ;} break; - case 21: + case 23: -/* Line 1806 of yacc.c */ -#line 223 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 240 "dtc-parser.y" { (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref)); - } + ;} break; - case 22: + case 24: -/* Line 1806 of yacc.c */ -#line 227 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 244 "dtc-parser.y" { FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL); struct data d; @@ -1746,13 +1745,13 @@ yyreduce: (yyval.data) = data_merge((yyvsp[(1) - (9)].data), d); fclose(f); - } + ;} break; - case 23: + case 25: -/* Line 1806 of yacc.c */ -#line 244 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 261 "dtc-parser.y" { FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL); struct data d = empty_data; @@ -1761,49 +1760,49 @@ yyreduce: (yyval.data) = data_merge((yyvsp[(1) - (5)].data), d); fclose(f); - } + ;} break; - case 24: + case 26: -/* Line 1806 of yacc.c */ -#line 254 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 271 "dtc-parser.y" { (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); - } + ;} break; - case 25: + case 27: -/* Line 1806 of yacc.c */ -#line 261 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 278 "dtc-parser.y" { (yyval.data) = empty_data; - } + ;} break; - case 26: + case 28: -/* Line 1806 of yacc.c */ -#line 265 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 282 "dtc-parser.y" { (yyval.data) = (yyvsp[(1) - (2)].data); - } + ;} break; - case 27: + case 29: -/* Line 1806 of yacc.c */ -#line 269 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 286 "dtc-parser.y" { (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); - } + ;} break; - case 28: + case 30: -/* Line 1806 of yacc.c */ -#line 276 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 293 "dtc-parser.y" { (yyval.array).data = empty_data; (yyval.array).bits = eval_literal((yyvsp[(2) - (3)].literal), 0, 7); @@ -1817,23 +1816,23 @@ yyreduce: " are currently supported"); (yyval.array).bits = 32; } - } + ;} break; - case 29: + case 31: -/* Line 1806 of yacc.c */ -#line 291 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 308 "dtc-parser.y" { (yyval.array).data = empty_data; (yyval.array).bits = 32; - } + ;} break; - case 30: + case 32: -/* Line 1806 of yacc.c */ -#line 296 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 313 "dtc-parser.y" { if ((yyvsp[(1) - (2)].array).bits < 64) { uint64_t mask = (1ULL << (yyvsp[(1) - (2)].array).bits) - 1; @@ -1852,13 +1851,13 @@ yyreduce: } (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, (yyvsp[(2) - (2)].integer), (yyvsp[(1) - (2)].array).bits); - } + ;} break; - case 31: + case 33: -/* Line 1806 of yacc.c */ -#line 316 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 333 "dtc-parser.y" { uint64_t val = ~0ULL >> (64 - (yyvsp[(1) - (2)].array).bits); @@ -1871,299 +1870,288 @@ yyreduce: "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: + case 34: -/* Line 1806 of yacc.c */ -#line 330 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 347 "dtc-parser.y" { (yyval.array).data = data_add_marker((yyvsp[(1) - (2)].array).data, LABEL, (yyvsp[(2) - (2)].labelref)); - } + ;} break; - case 33: + case 35: -/* Line 1806 of yacc.c */ -#line 337 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 354 "dtc-parser.y" { (yyval.integer) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64); - } + ;} break; - case 34: + case 36: -/* Line 1806 of yacc.c */ -#line 341 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 358 "dtc-parser.y" { (yyval.integer) = eval_char_literal((yyvsp[(1) - (1)].literal)); - } + ;} break; - case 35: + case 37: -/* Line 1806 of yacc.c */ -#line 345 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 362 "dtc-parser.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); - } - break; - - case 38: - -/* Line 1806 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 1806 of yacc.c */ -#line 361 "dtc-parser.y" - { (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); } +/* Line 1455 of yacc.c */ +#line 373 "dtc-parser.y" + { (yyval.integer) = (yyvsp[(1) - (5)].integer) ? (yyvsp[(3) - (5)].integer) : (yyvsp[(5) - (5)].integer); ;} break; case 42: -/* Line 1806 of yacc.c */ -#line 366 "dtc-parser.y" - { (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); } +/* Line 1455 of yacc.c */ +#line 378 "dtc-parser.y" + { (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); ;} break; case 44: -/* Line 1806 of yacc.c */ -#line 371 "dtc-parser.y" - { (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); } +/* Line 1455 of yacc.c */ +#line 383 "dtc-parser.y" + { (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); ;} break; case 46: -/* Line 1806 of yacc.c */ -#line 376 "dtc-parser.y" - { (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); } +/* Line 1455 of yacc.c */ +#line 388 "dtc-parser.y" + { (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); ;} break; case 48: -/* Line 1806 of yacc.c */ -#line 381 "dtc-parser.y" - { (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); } +/* Line 1455 of yacc.c */ +#line 393 "dtc-parser.y" + { (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); ;} break; case 50: -/* Line 1806 of yacc.c */ -#line 386 "dtc-parser.y" - { (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); } +/* Line 1455 of yacc.c */ +#line 398 "dtc-parser.y" + { (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); ;} break; - case 51: + case 52: -/* Line 1806 of yacc.c */ -#line 387 "dtc-parser.y" - { (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); } +/* Line 1455 of yacc.c */ +#line 403 "dtc-parser.y" + { (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); ;} break; case 53: -/* Line 1806 of yacc.c */ -#line 392 "dtc-parser.y" - { (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); } - break; - - case 54: - -/* Line 1806 of yacc.c */ -#line 393 "dtc-parser.y" - { (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); } +/* Line 1455 of yacc.c */ +#line 404 "dtc-parser.y" + { (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); ;} break; case 55: -/* Line 1806 of yacc.c */ -#line 394 "dtc-parser.y" - { (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); } +/* Line 1455 of yacc.c */ +#line 409 "dtc-parser.y" + { (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); ;} break; case 56: -/* Line 1806 of yacc.c */ -#line 395 "dtc-parser.y" - { (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); } +/* Line 1455 of yacc.c */ +#line 410 "dtc-parser.y" + { (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); ;} break; case 57: -/* Line 1806 of yacc.c */ -#line 399 "dtc-parser.y" - { (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); } +/* Line 1455 of yacc.c */ +#line 411 "dtc-parser.y" + { (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); ;} break; case 58: -/* Line 1806 of yacc.c */ -#line 400 "dtc-parser.y" - { (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); } +/* Line 1455 of yacc.c */ +#line 412 "dtc-parser.y" + { (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); ;} break; - case 60: + case 59: -/* Line 1806 of yacc.c */ -#line 405 "dtc-parser.y" - { (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); } +/* Line 1455 of yacc.c */ +#line 416 "dtc-parser.y" + { (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); ;} break; - case 61: + case 60: -/* Line 1806 of yacc.c */ -#line 406 "dtc-parser.y" - { (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); } +/* Line 1455 of yacc.c */ +#line 417 "dtc-parser.y" + { (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); ;} break; - case 63: + case 62: -/* Line 1806 of yacc.c */ -#line 411 "dtc-parser.y" - { (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); } +/* Line 1455 of yacc.c */ +#line 422 "dtc-parser.y" + { (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); ;} break; - case 64: + case 63: -/* Line 1806 of yacc.c */ -#line 412 "dtc-parser.y" - { (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); } +/* Line 1455 of yacc.c */ +#line 423 "dtc-parser.y" + { (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); ;} break; case 65: -/* Line 1806 of yacc.c */ -#line 413 "dtc-parser.y" - { (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); } +/* Line 1455 of yacc.c */ +#line 428 "dtc-parser.y" + { (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); ;} break; - case 68: + case 66: -/* Line 1806 of yacc.c */ -#line 419 "dtc-parser.y" - { (yyval.integer) = -(yyvsp[(2) - (2)].integer); } +/* Line 1455 of yacc.c */ +#line 429 "dtc-parser.y" + { (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); ;} break; - case 69: + case 67: -/* Line 1806 of yacc.c */ -#line 420 "dtc-parser.y" - { (yyval.integer) = ~(yyvsp[(2) - (2)].integer); } +/* Line 1455 of yacc.c */ +#line 430 "dtc-parser.y" + { (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); ;} break; case 70: -/* Line 1806 of yacc.c */ -#line 421 "dtc-parser.y" - { (yyval.integer) = !(yyvsp[(2) - (2)].integer); } +/* Line 1455 of yacc.c */ +#line 436 "dtc-parser.y" + { (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;} break; case 71: -/* Line 1806 of yacc.c */ -#line 426 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 437 "dtc-parser.y" + { (yyval.integer) = ~(yyvsp[(2) - (2)].integer); ;} + break; + + case 72: + +/* Line 1455 of yacc.c */ +#line 438 "dtc-parser.y" + { (yyval.integer) = !(yyvsp[(2) - (2)].integer); ;} + break; + + case 73: + +/* Line 1455 of yacc.c */ +#line 443 "dtc-parser.y" { (yyval.data) = empty_data; - } + ;} break; - case 72: + case 74: -/* Line 1806 of yacc.c */ -#line 430 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 447 "dtc-parser.y" { (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte)); - } + ;} break; - case 73: + case 75: -/* Line 1806 of yacc.c */ -#line 434 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 451 "dtc-parser.y" { (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); - } + ;} break; - case 74: + case 76: -/* Line 1806 of yacc.c */ -#line 441 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 458 "dtc-parser.y" { (yyval.nodelist) = NULL; - } + ;} break; - case 75: + case 77: -/* Line 1806 of yacc.c */ -#line 445 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 462 "dtc-parser.y" { (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist)); - } + ;} break; - case 76: + case 78: -/* Line 1806 of yacc.c */ -#line 449 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 466 "dtc-parser.y" { print_error("syntax error: properties must precede subnodes"); YYERROR; - } + ;} break; - case 77: + case 79: -/* Line 1806 of yacc.c */ -#line 457 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 474 "dtc-parser.y" { (yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename)); - } + ;} break; - case 78: + case 80: -/* Line 1806 of yacc.c */ -#line 461 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 478 "dtc-parser.y" { (yyval.node) = name_node(build_node_delete(), (yyvsp[(2) - (3)].propnodename)); - } + ;} break; - case 79: + case 81: -/* Line 1806 of yacc.c */ -#line 465 "dtc-parser.y" +/* Line 1455 of yacc.c */ +#line 482 "dtc-parser.y" { add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref)); (yyval.node) = (yyvsp[(2) - (2)].node); - } + ;} break; -/* Line 1806 of yacc.c */ -#line 2154 "dtc-parser.tab.c" +/* Line 1455 of yacc.c */ +#line 2153 "dtc-parser.tab.c" default: break; } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); @@ -2191,10 +2179,6 @@ yyreduce: | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { @@ -2202,36 +2186,37 @@ yyerrlab: #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } } -# undef YYSYNTAX_ERROR #endif } @@ -2290,7 +2275,7 @@ yyerrlab1: for (;;) { yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) + if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) @@ -2349,13 +2334,8 @@ yyexhaustedlab: yyreturn: if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - } + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); @@ -2380,8 +2360,8 @@ yyreturn: -/* Line 2067 of yacc.c */ -#line 471 "dtc-parser.y" +/* Line 1675 of yacc.c */ +#line 488 "dtc-parser.y" void print_error(char const *fmt, ...) diff --git a/scripts/dtc/dtc-parser.tab.h_shipped b/scripts/dtc/dtc-parser.tab.h_shipped index 25d3b88..e4dfadf 100644 --- a/scripts/dtc/dtc-parser.tab.h_shipped +++ b/scripts/dtc/dtc-parser.tab.h_shipped @@ -1,8 +1,10 @@ -/* A Bison parser, made by GNU Bison 2.5. */ -/* Bison interface for Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ + +/* Skeleton interface for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + 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 @@ -38,27 +40,28 @@ 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 + DT_PLUGIN = 259, + DT_MEMRESERVE = 260, + DT_LSHIFT = 261, + DT_RSHIFT = 262, + DT_LE = 263, + DT_GE = 264, + DT_EQ = 265, + DT_NE = 266, + DT_AND = 267, + DT_OR = 268, + DT_BITS = 269, + DT_DEL_PROP = 270, + DT_DEL_NODE = 271, + DT_PROPNODENAME = 272, + DT_LITERAL = 273, + DT_CHAR_LITERAL = 274, + DT_BASE = 275, + DT_BYTE = 276, + DT_STRING = 277, + DT_LABEL = 278, + DT_REF = 279, + DT_INCBIN = 280 }; #endif @@ -68,8 +71,8 @@ typedef union YYSTYPE { -/* Line 2068 of yacc.c */ -#line 40 "dtc-parser.y" +/* Line 1676 of yacc.c */ +#line 41 "dtc-parser.y" char *propnodename; char *literal; @@ -89,11 +92,12 @@ typedef union YYSTYPE struct node *nodelist; struct reserve_info *re; uint64_t integer; + int is_plugin; -/* Line 2068 of yacc.c */ -#line 97 "dtc-parser.tab.h" +/* Line 1676 of yacc.c */ +#line 101 "dtc-parser.tab.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ -- 1.9.1