util/sconfig: Add support for discontiguous FW_CONFIG fields
Sooner or later, some board was going to need extra FW_CONFIG bits for a field that was already in production, so this patch adds support for adding extra (unused) bits to a field. The extra are appended via a syntax like: `field FIELD_NAME START0 END0 | START1 END1 | START2 END2 ...` and the suffixed bits are all treated as if they are contiguous when defining option values. BUG=b:185190978 TEST=Modified volteer fw_config to the following: field AUDIO 8 10 | 29 29 | 31 31 option NONE 0 option MAX98357_ALC5682I_I2S 1 option MAX98373_ALC5682I_I2S 2 option MAX98373_ALC5682_SNDW 3 option MAX98373_ALC5682I_I2S_UP4 4 option MAX98360_ALC5682I_I2S 5 option RT1011_ALC5682I_I2S 6 option AUDIO_FOO 7 option AUDIO_BAR 8 option AUDIO_QUUX 9 option AUDIO_BLAH1 10 option AUDIO_BLAH2 15 option AUDIO_BLAH3 16 option AUDIO_BLAH4 31 end which yielded (in static_fw_config.h): FW_CONFIG_FIELD_AUDIO_MASK 0xa0000700 FW_CONFIG_FIELD_AUDIO_OPTION_NONE_VALUE 0x0 FW_CONFIG_FIELD_AUDIO_OPTION_MAX98357_ALC5682I_I2S_VALUE 0x100 FW_CONFIG_FIELD_AUDIO_OPTION_MAX98373_ALC5682I_I2S_VALUE 0x200 FW_CONFIG_FIELD_AUDIO_OPTION_MAX98373_ALC5682_SNDW_VALUE 0x300 FW_CONFIG_FIELD_AUDIO_OPTION_MAX98373_ALC5682I_I2S_UP4_VALUE 0x400 FW_CONFIG_FIELD_AUDIO_OPTION_MAX98360_ALC5682I_I2S_VALUE 0x500 FW_CONFIG_FIELD_AUDIO_OPTION_RT1011_ALC5682I_I2S_VALUE 0x600 FW_CONFIG_FIELD_AUDIO_OPTION_AUDIO_FOO_VALUE 0x700 FW_CONFIG_FIELD_AUDIO_OPTION_AUDIO_BAR_VALUE 0x20000000 FW_CONFIG_FIELD_AUDIO_OPTION_AUDIO_QUUX_VALUE 0x20000100 FW_CONFIG_FIELD_AUDIO_OPTION_AUDIO_BLAH1_VALUE 0x20000200 FW_CONFIG_FIELD_AUDIO_OPTION_AUDIO_BLAH2_VALUE 0x20000700 FW_CONFIG_FIELD_AUDIO_OPTION_AUDIO_BLAH3_VALUE 0x80000000 FW_CONFIG_FIELD_AUDIO_OPTION_AUDIO_BLAH4_VALUE 0xa0000700 Change-Id: I5ed76706347ee9642198efc77139abdc3af1b8a6 Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/52747 Reviewed-by: Duncan Laurie <duncan@iceblink.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Patrick Georgi
parent
54c4ecb9f2
commit
13e240c602
@@ -31,7 +31,7 @@
|
||||
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
|
||||
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
|
||||
* if you want the limit (max/min) macros for int types.
|
||||
* if you want the limit (max/min) macros for int types.
|
||||
*/
|
||||
#ifndef __STDC_LIMIT_MACROS
|
||||
#define __STDC_LIMIT_MACROS 1
|
||||
@@ -48,7 +48,7 @@ typedef uint32_t flex_uint32_t;
|
||||
typedef signed char flex_int8_t;
|
||||
typedef short int flex_int16_t;
|
||||
typedef int flex_int32_t;
|
||||
typedef unsigned char flex_uint8_t;
|
||||
typedef unsigned char flex_uint8_t;
|
||||
typedef unsigned short int flex_uint16_t;
|
||||
typedef unsigned int flex_uint32_t;
|
||||
|
||||
@@ -159,10 +159,10 @@ extern FILE *yyin, *yyout;
|
||||
#define EOB_ACT_CONTINUE_SCAN 0
|
||||
#define EOB_ACT_END_OF_FILE 1
|
||||
#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) \
|
||||
do \
|
||||
@@ -349,8 +349,8 @@ static void yynoreturn yy_fatal_error ( const char* msg );
|
||||
(yy_hold_char) = *yy_cp; \
|
||||
*yy_cp = '\0'; \
|
||||
(yy_c_buf_p) = yy_cp;
|
||||
#define YY_NUM_RULES 50
|
||||
#define YY_END_OF_BUFFER 51
|
||||
#define YY_NUM_RULES 51
|
||||
#define YY_END_OF_BUFFER 52
|
||||
/* This struct is not used in this scanner,
|
||||
but its presence is necessary. */
|
||||
struct yy_trans_info
|
||||
@@ -358,31 +358,31 @@ struct yy_trans_info
|
||||
flex_int32_t yy_verify;
|
||||
flex_int32_t yy_nxt;
|
||||
};
|
||||
static const flex_int16_t yy_accept[206] =
|
||||
static const flex_int16_t yy_accept[207] =
|
||||
{ 0,
|
||||
0, 0, 51, 49, 1, 3, 49, 49, 49, 44,
|
||||
44, 42, 45, 49, 45, 45, 45, 45, 45, 49,
|
||||
49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
|
||||
1, 3, 49, 0, 49, 49, 0, 2, 44, 45,
|
||||
49, 49, 49, 9, 49, 49, 45, 49, 49, 49,
|
||||
49, 49, 49, 49, 49, 49, 49, 49, 36, 49,
|
||||
49, 49, 49, 49, 49, 15, 49, 49, 49, 49,
|
||||
49, 49, 49, 49, 49, 48, 48, 49, 0, 43,
|
||||
49, 49, 49, 25, 49, 49, 35, 40, 49, 49,
|
||||
49, 49, 49, 49, 22, 49, 49, 34, 49, 31,
|
||||
0, 0, 52, 50, 1, 3, 50, 50, 50, 45,
|
||||
45, 42, 46, 50, 46, 46, 46, 46, 46, 50,
|
||||
50, 50, 50, 50, 50, 50, 50, 50, 50, 43,
|
||||
50, 1, 3, 50, 0, 50, 50, 0, 2, 45,
|
||||
46, 50, 50, 50, 9, 50, 50, 46, 50, 50,
|
||||
50, 50, 50, 50, 50, 50, 50, 50, 50, 36,
|
||||
50, 50, 50, 50, 50, 50, 15, 50, 50, 50,
|
||||
50, 50, 50, 50, 50, 50, 49, 49, 50, 0,
|
||||
44, 50, 50, 50, 25, 50, 50, 35, 40, 50,
|
||||
50, 50, 50, 50, 50, 22, 50, 50, 34, 50,
|
||||
|
||||
49, 49, 16, 49, 19, 21, 49, 8, 49, 49,
|
||||
29, 49, 30, 7, 49, 0, 46, 49, 4, 49,
|
||||
49, 49, 32, 49, 49, 49, 33, 49, 49, 49,
|
||||
49, 49, 28, 49, 49, 49, 49, 49, 47, 47,
|
||||
6, 49, 49, 49, 12, 49, 49, 49, 49, 49,
|
||||
23, 49, 49, 14, 49, 49, 49, 49, 5, 26,
|
||||
49, 49, 17, 49, 20, 49, 13, 49, 49, 49,
|
||||
49, 49, 27, 38, 49, 49, 49, 49, 49, 49,
|
||||
49, 49, 49, 10, 49, 49, 49, 11, 49, 18,
|
||||
49, 49, 49, 37, 49, 49, 24, 49, 39, 49,
|
||||
31, 50, 50, 16, 50, 19, 21, 50, 8, 50,
|
||||
50, 29, 50, 30, 7, 50, 0, 47, 50, 4,
|
||||
50, 50, 50, 32, 50, 50, 50, 33, 50, 50,
|
||||
50, 50, 50, 28, 50, 50, 50, 50, 50, 48,
|
||||
48, 6, 50, 50, 50, 12, 50, 50, 50, 50,
|
||||
50, 23, 50, 50, 14, 50, 50, 50, 50, 5,
|
||||
26, 50, 50, 17, 50, 20, 50, 13, 50, 50,
|
||||
50, 50, 50, 27, 38, 50, 50, 50, 50, 50,
|
||||
50, 50, 50, 50, 10, 50, 50, 50, 11, 50,
|
||||
18, 50, 50, 50, 37, 50, 50, 24, 50, 39,
|
||||
|
||||
49, 49, 49, 41, 0
|
||||
50, 50, 50, 50, 41, 0
|
||||
} ;
|
||||
|
||||
static const YY_CHAR yy_ec[256] =
|
||||
@@ -400,7 +400,7 @@ static const YY_CHAR yy_ec[256] =
|
||||
|
||||
21, 22, 23, 24, 25, 1, 1, 26, 27, 28,
|
||||
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
|
||||
39, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
39, 1, 1, 40, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
@@ -417,146 +417,146 @@ static const YY_CHAR yy_ec[256] =
|
||||
1, 1, 1, 1, 1
|
||||
} ;
|
||||
|
||||
static const YY_CHAR yy_meta[40] =
|
||||
static const YY_CHAR yy_meta[41] =
|
||||
{ 0,
|
||||
1, 2, 2, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
||||
} ;
|
||||
|
||||
static const flex_int16_t yy_base[213] =
|
||||
static const flex_int16_t yy_base[214] =
|
||||
{ 0,
|
||||
0, 0, 278, 0, 275, 279, 273, 38, 42, 39,
|
||||
237, 0, 45, 260, 55, 59, 83, 65, 62, 54,
|
||||
248, 68, 25, 59, 73, 86, 251, 81, 238, 0,
|
||||
268, 279, 77, 264, 104, 117, 265, 279, 0, 114,
|
||||
117, 252, 241, 0, 240, 229, 123, 236, 231, 241,
|
||||
230, 238, 242, 229, 231, 235, 235, 229, 235, 220,
|
||||
220, 230, 220, 222, 224, 0, 211, 219, 213, 213,
|
||||
118, 223, 215, 221, 92, 0, 279, 140, 233, 0,
|
||||
226, 219, 205, 218, 208, 215, 0, 0, 206, 204,
|
||||
210, 207, 198, 206, 0, 204, 194, 0, 198, 0,
|
||||
0, 0, 279, 0, 276, 280, 274, 39, 43, 40,
|
||||
238, 0, 46, 261, 56, 60, 64, 67, 72, 56,
|
||||
249, 74, 26, 61, 77, 82, 252, 81, 239, 0,
|
||||
0, 269, 280, 89, 265, 110, 115, 266, 280, 0,
|
||||
112, 115, 253, 242, 0, 241, 230, 121, 237, 232,
|
||||
242, 231, 239, 243, 230, 232, 236, 236, 230, 236,
|
||||
221, 221, 231, 221, 223, 225, 0, 212, 220, 214,
|
||||
214, 116, 224, 216, 222, 122, 0, 280, 139, 234,
|
||||
0, 227, 220, 206, 219, 209, 216, 0, 0, 207,
|
||||
205, 211, 208, 199, 207, 0, 205, 195, 0, 199,
|
||||
|
||||
202, 192, 0, 195, 0, 0, 201, 0, 193, 192,
|
||||
0, 183, 0, 0, 210, 209, 0, 180, 0, 193,
|
||||
192, 185, 0, 189, 179, 175, 0, 185, 173, 179,
|
||||
184, 185, 0, 172, 179, 166, 169, 158, 0, 279,
|
||||
0, 170, 174, 166, 0, 165, 167, 163, 165, 170,
|
||||
0, 154, 159, 0, 152, 152, 151, 148, 0, 0,
|
||||
160, 162, 0, 146, 163, 149, 0, 156, 160, 141,
|
||||
141, 148, 0, 0, 147, 126, 125, 123, 134, 120,
|
||||
130, 120, 112, 0, 124, 122, 127, 0, 116, 0,
|
||||
117, 119, 101, 0, 93, 97, 0, 86, 0, 74,
|
||||
0, 203, 193, 0, 196, 0, 0, 202, 0, 194,
|
||||
193, 0, 184, 0, 0, 211, 210, 0, 181, 0,
|
||||
194, 193, 186, 0, 190, 180, 176, 0, 186, 174,
|
||||
180, 185, 186, 0, 173, 180, 167, 170, 159, 0,
|
||||
280, 0, 171, 175, 167, 0, 166, 168, 164, 166,
|
||||
171, 0, 155, 160, 0, 153, 153, 152, 149, 0,
|
||||
0, 161, 163, 0, 147, 164, 150, 0, 157, 161,
|
||||
142, 142, 149, 0, 0, 148, 140, 139, 137, 135,
|
||||
121, 131, 121, 113, 0, 125, 123, 128, 0, 117,
|
||||
0, 118, 121, 113, 0, 97, 105, 0, 88, 0,
|
||||
|
||||
64, 45, 46, 0, 279, 48, 159, 161, 163, 165,
|
||||
167, 169
|
||||
78, 66, 37, 47, 0, 280, 49, 157, 159, 161,
|
||||
163, 165, 167
|
||||
} ;
|
||||
|
||||
static const flex_int16_t yy_def[213] =
|
||||
static const flex_int16_t yy_def[214] =
|
||||
{ 0,
|
||||
205, 1, 205, 206, 205, 205, 206, 207, 208, 206,
|
||||
10, 206, 10, 206, 10, 10, 10, 10, 10, 206,
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
|
||||
205, 205, 207, 209, 210, 208, 211, 205, 10, 10,
|
||||
10, 206, 206, 206, 206, 206, 10, 206, 206, 206,
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
|
||||
206, 206, 206, 206, 206, 206, 205, 210, 212, 41,
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
|
||||
206, 1, 206, 207, 206, 206, 207, 208, 209, 207,
|
||||
10, 207, 10, 207, 10, 10, 10, 10, 10, 207,
|
||||
207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
|
||||
207, 206, 206, 208, 210, 211, 209, 212, 206, 10,
|
||||
10, 10, 207, 207, 207, 207, 207, 10, 207, 207,
|
||||
207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
|
||||
207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
|
||||
207, 207, 207, 207, 207, 207, 207, 206, 211, 213,
|
||||
42, 207, 207, 207, 207, 207, 207, 207, 207, 207,
|
||||
207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
|
||||
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
|
||||
206, 206, 206, 206, 206, 205, 206, 206, 206, 206,
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 205,
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
|
||||
207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
|
||||
207, 207, 207, 207, 207, 207, 206, 207, 207, 207,
|
||||
207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
|
||||
207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
|
||||
206, 207, 207, 207, 207, 207, 207, 207, 207, 207,
|
||||
207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
|
||||
207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
|
||||
207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
|
||||
207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
|
||||
207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
|
||||
|
||||
206, 206, 206, 206, 0, 205, 205, 205, 205, 205,
|
||||
205, 205
|
||||
207, 207, 207, 207, 207, 0, 206, 206, 206, 206,
|
||||
206, 206, 206
|
||||
} ;
|
||||
|
||||
static const flex_int16_t yy_nxt[319] =
|
||||
static const flex_int16_t yy_nxt[321] =
|
||||
{ 0,
|
||||
4, 5, 6, 7, 8, 9, 10, 11, 10, 12,
|
||||
13, 13, 14, 4, 4, 4, 15, 13, 16, 17,
|
||||
18, 19, 20, 21, 22, 23, 24, 4, 25, 26,
|
||||
4, 27, 28, 4, 29, 4, 4, 4, 4, 34,
|
||||
34, 61, 35, 37, 38, 39, 39, 39, 30, 40,
|
||||
40, 40, 40, 40, 62, 40, 40, 40, 40, 40,
|
||||
40, 40, 40, 40, 204, 40, 40, 40, 40, 40,
|
||||
40, 40, 40, 40, 54, 63, 57, 203, 34, 34,
|
||||
43, 76, 45, 55, 202, 64, 52, 44, 46, 40,
|
||||
40, 40, 50, 201, 65, 58, 59, 51, 53, 60,
|
||||
4, 27, 28, 4, 29, 4, 4, 4, 4, 30,
|
||||
35, 35, 62, 36, 38, 39, 40, 40, 40, 31,
|
||||
41, 41, 41, 41, 41, 63, 41, 41, 41, 41,
|
||||
41, 41, 41, 41, 41, 205, 41, 41, 41, 204,
|
||||
41, 41, 41, 41, 41, 41, 55, 64, 41, 41,
|
||||
41, 44, 58, 46, 48, 56, 203, 65, 45, 47,
|
||||
35, 35, 49, 77, 51, 50, 53, 202, 66, 52,
|
||||
|
||||
66, 200, 67, 47, 68, 79, 79, 72, 30, 113,
|
||||
73, 48, 114, 69, 49, 74, 199, 70, 37, 38,
|
||||
40, 40, 40, 80, 80, 80, 198, 80, 80, 40,
|
||||
40, 40, 197, 80, 80, 80, 80, 80, 80, 108,
|
||||
109, 79, 79, 196, 115, 195, 194, 193, 192, 191,
|
||||
190, 189, 188, 187, 186, 185, 184, 183, 85, 33,
|
||||
33, 36, 36, 34, 34, 78, 78, 37, 37, 79,
|
||||
79, 182, 181, 180, 179, 178, 177, 176, 175, 174,
|
||||
173, 172, 171, 170, 169, 168, 167, 166, 165, 164,
|
||||
163, 162, 161, 160, 159, 158, 157, 156, 155, 154,
|
||||
69, 59, 60, 201, 67, 61, 68, 73, 54, 70,
|
||||
74, 80, 80, 71, 31, 75, 38, 39, 41, 41,
|
||||
41, 81, 81, 81, 200, 81, 81, 41, 41, 41,
|
||||
199, 81, 81, 81, 81, 81, 81, 109, 110, 114,
|
||||
80, 80, 115, 116, 198, 197, 196, 195, 194, 193,
|
||||
192, 191, 190, 189, 188, 187, 86, 34, 34, 37,
|
||||
37, 35, 35, 79, 79, 38, 38, 80, 80, 186,
|
||||
185, 184, 183, 182, 181, 180, 179, 178, 177, 176,
|
||||
175, 174, 173, 172, 171, 170, 169, 168, 167, 166,
|
||||
165, 164, 163, 162, 161, 160, 159, 158, 157, 156,
|
||||
|
||||
153, 152, 151, 150, 149, 148, 147, 146, 145, 144,
|
||||
143, 142, 141, 140, 139, 138, 137, 136, 135, 134,
|
||||
133, 132, 131, 130, 129, 128, 127, 126, 125, 124,
|
||||
123, 122, 121, 120, 119, 118, 117, 116, 112, 111,
|
||||
110, 107, 106, 105, 104, 103, 102, 101, 100, 99,
|
||||
98, 97, 96, 95, 94, 93, 92, 91, 90, 89,
|
||||
88, 87, 86, 84, 83, 82, 81, 38, 77, 31,
|
||||
75, 71, 56, 42, 41, 32, 31, 205, 3, 205,
|
||||
205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
|
||||
205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
|
||||
155, 154, 153, 152, 151, 150, 149, 148, 147, 146,
|
||||
145, 144, 143, 142, 141, 140, 139, 138, 137, 136,
|
||||
135, 134, 133, 132, 131, 130, 129, 128, 127, 126,
|
||||
125, 124, 123, 122, 121, 120, 119, 118, 117, 113,
|
||||
112, 111, 108, 107, 106, 105, 104, 103, 102, 101,
|
||||
100, 99, 98, 97, 96, 95, 94, 93, 92, 91,
|
||||
90, 89, 88, 87, 85, 84, 83, 82, 39, 78,
|
||||
32, 76, 72, 57, 43, 42, 33, 32, 206, 3,
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
|
||||
|
||||
205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
|
||||
205, 205, 205, 205, 205, 205, 205, 205
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206
|
||||
} ;
|
||||
|
||||
static const flex_int16_t yy_chk[319] =
|
||||
static const flex_int16_t yy_chk[321] =
|
||||
{ 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, 8,
|
||||
8, 23, 8, 9, 9, 10, 10, 10, 206, 10,
|
||||
10, 13, 13, 13, 23, 10, 10, 10, 10, 10,
|
||||
10, 15, 15, 15, 203, 16, 16, 16, 19, 19,
|
||||
19, 18, 18, 18, 20, 24, 22, 202, 33, 33,
|
||||
15, 33, 16, 20, 201, 24, 19, 15, 16, 17,
|
||||
17, 17, 18, 200, 25, 22, 22, 18, 19, 22,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
8, 8, 23, 8, 9, 9, 10, 10, 10, 207,
|
||||
10, 10, 13, 13, 13, 23, 10, 10, 10, 10,
|
||||
10, 10, 15, 15, 15, 204, 16, 16, 16, 203,
|
||||
17, 17, 17, 18, 18, 18, 20, 24, 19, 19,
|
||||
19, 15, 22, 16, 17, 20, 202, 24, 15, 16,
|
||||
34, 34, 17, 34, 18, 17, 19, 201, 25, 18,
|
||||
|
||||
25, 198, 25, 17, 26, 35, 35, 28, 35, 75,
|
||||
28, 17, 75, 26, 17, 28, 196, 26, 36, 36,
|
||||
40, 40, 40, 41, 41, 41, 195, 41, 41, 47,
|
||||
47, 47, 193, 41, 41, 41, 41, 41, 41, 71,
|
||||
71, 78, 78, 192, 78, 191, 189, 187, 186, 185,
|
||||
183, 182, 181, 180, 179, 178, 177, 176, 47, 207,
|
||||
207, 208, 208, 209, 209, 210, 210, 211, 211, 212,
|
||||
212, 175, 172, 171, 170, 169, 168, 166, 165, 164,
|
||||
162, 161, 158, 157, 156, 155, 153, 152, 150, 149,
|
||||
148, 147, 146, 144, 143, 142, 138, 137, 136, 135,
|
||||
26, 22, 22, 199, 25, 22, 25, 28, 19, 26,
|
||||
28, 36, 36, 26, 36, 28, 37, 37, 41, 41,
|
||||
41, 42, 42, 42, 197, 42, 42, 48, 48, 48,
|
||||
196, 42, 42, 42, 42, 42, 42, 72, 72, 76,
|
||||
79, 79, 76, 79, 194, 193, 192, 190, 188, 187,
|
||||
186, 184, 183, 182, 181, 180, 48, 208, 208, 209,
|
||||
209, 210, 210, 211, 211, 212, 212, 213, 213, 179,
|
||||
178, 177, 176, 173, 172, 171, 170, 169, 167, 166,
|
||||
165, 163, 162, 159, 158, 157, 156, 154, 153, 151,
|
||||
150, 149, 148, 147, 145, 144, 143, 139, 138, 137,
|
||||
|
||||
134, 132, 131, 130, 129, 128, 126, 125, 124, 122,
|
||||
121, 120, 118, 116, 115, 112, 110, 109, 107, 104,
|
||||
102, 101, 99, 97, 96, 94, 93, 92, 91, 90,
|
||||
89, 86, 85, 84, 83, 82, 81, 79, 74, 73,
|
||||
72, 70, 69, 68, 67, 65, 64, 63, 62, 61,
|
||||
60, 59, 58, 57, 56, 55, 54, 53, 52, 51,
|
||||
50, 49, 48, 46, 45, 43, 42, 37, 34, 31,
|
||||
29, 27, 21, 14, 11, 7, 5, 3, 205, 205,
|
||||
205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
|
||||
205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
|
||||
136, 135, 133, 132, 131, 130, 129, 127, 126, 125,
|
||||
123, 122, 121, 119, 117, 116, 113, 111, 110, 108,
|
||||
105, 103, 102, 100, 98, 97, 95, 94, 93, 92,
|
||||
91, 90, 87, 86, 85, 84, 83, 82, 80, 75,
|
||||
74, 73, 71, 70, 69, 68, 66, 65, 64, 63,
|
||||
62, 61, 60, 59, 58, 57, 56, 55, 54, 53,
|
||||
52, 51, 50, 49, 47, 46, 44, 43, 38, 35,
|
||||
32, 29, 27, 21, 14, 11, 7, 5, 3, 206,
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
|
||||
|
||||
205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
|
||||
205, 205, 205, 205, 205, 205, 205, 205
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
|
||||
206, 206, 206, 206, 206, 206, 206, 206, 206, 206
|
||||
} ;
|
||||
|
||||
static yy_state_type yy_last_accepting_state;
|
||||
@@ -638,9 +638,9 @@ extern int yywrap ( void );
|
||||
#endif
|
||||
|
||||
#ifndef YY_NO_UNPUT
|
||||
|
||||
|
||||
static void yyunput ( int c, char *buf_ptr );
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef yytext_ptr
|
||||
@@ -767,7 +767,7 @@ YY_DECL
|
||||
yy_state_type yy_current_state;
|
||||
char *yy_cp, *yy_bp;
|
||||
int yy_act;
|
||||
|
||||
|
||||
if ( !(yy_init) )
|
||||
{
|
||||
(yy_init) = 1;
|
||||
@@ -821,13 +821,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 >= 206 )
|
||||
if ( yy_current_state >= 207 )
|
||||
yy_c = yy_meta[yy_c];
|
||||
}
|
||||
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
|
||||
++yy_cp;
|
||||
}
|
||||
while ( yy_base[yy_current_state] != 279 );
|
||||
while ( yy_base[yy_current_state] != 280 );
|
||||
|
||||
yy_find_action:
|
||||
yy_act = yy_accept[yy_current_state];
|
||||
@@ -1023,7 +1023,7 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 43:
|
||||
YY_RULE_SETUP
|
||||
{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
|
||||
{return(PIPE);}
|
||||
YY_BREAK
|
||||
case 44:
|
||||
YY_RULE_SETUP
|
||||
@@ -1035,12 +1035,11 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 46:
|
||||
YY_RULE_SETUP
|
||||
{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(PCIINT);}
|
||||
{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
|
||||
YY_BREAK
|
||||
case 47:
|
||||
/* rule 47 can match eol */
|
||||
YY_RULE_SETUP
|
||||
{yylval.string = malloc(yyleng-1); strncpy(yylval.string, yytext+1, yyleng-2); yylval.string[yyleng-2]='\0'; return(STRING);}
|
||||
{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(PCIINT);}
|
||||
YY_BREAK
|
||||
case 48:
|
||||
/* rule 48 can match eol */
|
||||
@@ -1048,10 +1047,15 @@ YY_RULE_SETUP
|
||||
{yylval.string = malloc(yyleng-1); strncpy(yylval.string, yytext+1, yyleng-2); yylval.string[yyleng-2]='\0'; return(STRING);}
|
||||
YY_BREAK
|
||||
case 49:
|
||||
/* rule 49 can match eol */
|
||||
YY_RULE_SETUP
|
||||
{yylval.string = malloc(yyleng-1); strncpy(yylval.string, yytext+1, yyleng-2); yylval.string[yyleng-2]='\0'; return(STRING);}
|
||||
YY_BREAK
|
||||
case 50:
|
||||
YY_RULE_SETUP
|
||||
{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(STRING);}
|
||||
YY_BREAK
|
||||
case 50:
|
||||
case 51:
|
||||
YY_RULE_SETUP
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
@@ -1337,7 +1341,7 @@ static int yy_get_next_buffer (void)
|
||||
{
|
||||
yy_state_type yy_current_state;
|
||||
char *yy_cp;
|
||||
|
||||
|
||||
yy_current_state = (yy_start);
|
||||
|
||||
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
|
||||
@@ -1351,7 +1355,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 >= 206 )
|
||||
if ( yy_current_state >= 207 )
|
||||
yy_c = yy_meta[yy_c];
|
||||
}
|
||||
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
|
||||
@@ -1379,11 +1383,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 >= 206 )
|
||||
if ( yy_current_state >= 207 )
|
||||
yy_c = yy_meta[yy_c];
|
||||
}
|
||||
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
|
||||
yy_is_jam = (yy_current_state == 205);
|
||||
yy_is_jam = (yy_current_state == 206);
|
||||
|
||||
return yy_is_jam ? 0 : yy_current_state;
|
||||
}
|
||||
@@ -1393,7 +1397,7 @@ static int yy_get_next_buffer (void)
|
||||
static void yyunput (int c, char * yy_bp )
|
||||
{
|
||||
char *yy_cp;
|
||||
|
||||
|
||||
yy_cp = (yy_c_buf_p);
|
||||
|
||||
/* undo effects of setting up yytext */
|
||||
@@ -1438,7 +1442,7 @@ static int yy_get_next_buffer (void)
|
||||
|
||||
{
|
||||
int c;
|
||||
|
||||
|
||||
*(yy_c_buf_p) = (yy_hold_char);
|
||||
|
||||
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
|
||||
@@ -1505,12 +1509,12 @@ static int yy_get_next_buffer (void)
|
||||
|
||||
/** Immediately switch to a different input stream.
|
||||
* @param input_file A readable stream.
|
||||
*
|
||||
*
|
||||
* @note This function does not reset the start condition to @c INITIAL .
|
||||
*/
|
||||
void yyrestart (FILE * input_file )
|
||||
{
|
||||
|
||||
|
||||
if ( ! YY_CURRENT_BUFFER ){
|
||||
yyensure_buffer_stack ();
|
||||
YY_CURRENT_BUFFER_LVALUE =
|
||||
@@ -1523,11 +1527,11 @@ static int yy_get_next_buffer (void)
|
||||
|
||||
/** Switch to a different input buffer.
|
||||
* @param new_buffer The new input buffer.
|
||||
*
|
||||
*
|
||||
*/
|
||||
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
|
||||
{
|
||||
|
||||
|
||||
/* TODO. We should be able to replace this entire function body
|
||||
* with
|
||||
* yypop_buffer_state();
|
||||
@@ -1567,13 +1571,13 @@ static void yy_load_buffer_state (void)
|
||||
/** Allocate and initialize an input buffer state.
|
||||
* @param file A readable stream.
|
||||
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
|
||||
*
|
||||
*
|
||||
* @return the allocated buffer state.
|
||||
*/
|
||||
YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
|
||||
{
|
||||
YY_BUFFER_STATE b;
|
||||
|
||||
|
||||
b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
|
||||
if ( ! b )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
||||
@@ -1596,11 +1600,11 @@ static void yy_load_buffer_state (void)
|
||||
|
||||
/** Destroy the buffer.
|
||||
* @param b a buffer created with yy_create_buffer()
|
||||
*
|
||||
*
|
||||
*/
|
||||
void yy_delete_buffer (YY_BUFFER_STATE b )
|
||||
{
|
||||
|
||||
|
||||
if ( ! b )
|
||||
return;
|
||||
|
||||
@@ -1621,7 +1625,7 @@ static void yy_load_buffer_state (void)
|
||||
|
||||
{
|
||||
int oerrno = errno;
|
||||
|
||||
|
||||
yy_flush_buffer( b );
|
||||
|
||||
b->yy_input_file = file;
|
||||
@@ -1637,13 +1641,13 @@ static void yy_load_buffer_state (void)
|
||||
}
|
||||
|
||||
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
||||
|
||||
|
||||
errno = oerrno;
|
||||
}
|
||||
|
||||
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
|
||||
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
|
||||
*
|
||||
*
|
||||
*/
|
||||
void yy_flush_buffer (YY_BUFFER_STATE b )
|
||||
{
|
||||
@@ -1672,7 +1676,7 @@ static void yy_load_buffer_state (void)
|
||||
* the current state. This function will allocate the stack
|
||||
* if necessary.
|
||||
* @param new_buffer The new state.
|
||||
*
|
||||
*
|
||||
*/
|
||||
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
|
||||
{
|
||||
@@ -1702,7 +1706,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
|
||||
|
||||
/** Removes and deletes the top of the stack, if present.
|
||||
* The next element becomes the new top.
|
||||
*
|
||||
*
|
||||
*/
|
||||
void yypop_buffer_state (void)
|
||||
{
|
||||
@@ -1726,7 +1730,7 @@ void yypop_buffer_state (void)
|
||||
static void yyensure_buffer_stack (void)
|
||||
{
|
||||
yy_size_t num_to_alloc;
|
||||
|
||||
|
||||
if (!(yy_buffer_stack)) {
|
||||
|
||||
/* First allocation is just for 2 elements, since we don't know if this
|
||||
@@ -1769,13 +1773,13 @@ static void yyensure_buffer_stack (void)
|
||||
/** Setup the input buffer state to scan directly from a user-specified character buffer.
|
||||
* @param base the character buffer
|
||||
* @param size the size in bytes of the character buffer
|
||||
*
|
||||
*
|
||||
* @return the newly allocated buffer state object.
|
||||
*/
|
||||
YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
|
||||
{
|
||||
YY_BUFFER_STATE b;
|
||||
|
||||
|
||||
if ( size < 2 ||
|
||||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
||||
base[size-1] != YY_END_OF_BUFFER_CHAR )
|
||||
@@ -1804,14 +1808,14 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
|
||||
/** Setup the input buffer state to scan a string. The next call to yylex() will
|
||||
* scan from a @e copy of @a str.
|
||||
* @param yystr a NUL-terminated string to scan
|
||||
*
|
||||
*
|
||||
* @return the newly allocated buffer state object.
|
||||
* @note If you want to scan bytes that may contain NUL values, then use
|
||||
* yy_scan_bytes() instead.
|
||||
*/
|
||||
YY_BUFFER_STATE yy_scan_string (const char * yystr )
|
||||
{
|
||||
|
||||
|
||||
return yy_scan_bytes( yystr, (int) strlen(yystr) );
|
||||
}
|
||||
|
||||
@@ -1819,7 +1823,7 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr )
|
||||
* scan from a @e copy of @a bytes.
|
||||
* @param yybytes the byte buffer to scan
|
||||
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
|
||||
*
|
||||
*
|
||||
* @return the newly allocated buffer state object.
|
||||
*/
|
||||
YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
|
||||
@@ -1828,7 +1832,7 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
|
||||
char *buf;
|
||||
yy_size_t n;
|
||||
int i;
|
||||
|
||||
|
||||
/* Get memory for full buffer, including space for trailing EOB's. */
|
||||
n = (yy_size_t) (_yybytes_len + 2);
|
||||
buf = (char *) yyalloc( n );
|
||||
@@ -1882,16 +1886,16 @@ static void yynoreturn yy_fatal_error (const char* msg )
|
||||
/* Accessor methods (get/set functions) to struct members. */
|
||||
|
||||
/** Get the current line number.
|
||||
*
|
||||
*
|
||||
*/
|
||||
int yyget_lineno (void)
|
||||
{
|
||||
|
||||
|
||||
return yylineno;
|
||||
}
|
||||
|
||||
/** Get the input stream.
|
||||
*
|
||||
*
|
||||
*/
|
||||
FILE *yyget_in (void)
|
||||
{
|
||||
@@ -1899,7 +1903,7 @@ FILE *yyget_in (void)
|
||||
}
|
||||
|
||||
/** Get the output stream.
|
||||
*
|
||||
*
|
||||
*/
|
||||
FILE *yyget_out (void)
|
||||
{
|
||||
@@ -1907,7 +1911,7 @@ FILE *yyget_out (void)
|
||||
}
|
||||
|
||||
/** Get the length of the current token.
|
||||
*
|
||||
*
|
||||
*/
|
||||
int yyget_leng (void)
|
||||
{
|
||||
@@ -1915,7 +1919,7 @@ int yyget_leng (void)
|
||||
}
|
||||
|
||||
/** Get the current token.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
char *yyget_text (void)
|
||||
@@ -1925,18 +1929,18 @@ char *yyget_text (void)
|
||||
|
||||
/** Set the current line number.
|
||||
* @param _line_number line number
|
||||
*
|
||||
*
|
||||
*/
|
||||
void yyset_lineno (int _line_number )
|
||||
{
|
||||
|
||||
|
||||
yylineno = _line_number;
|
||||
}
|
||||
|
||||
/** Set the input stream. This does not discard the current
|
||||
* input buffer.
|
||||
* @param _in_str A readable stream.
|
||||
*
|
||||
*
|
||||
* @see yy_switch_to_buffer
|
||||
*/
|
||||
void yyset_in (FILE * _in_str )
|
||||
@@ -1990,7 +1994,7 @@ static int yy_init_globals (void)
|
||||
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
|
||||
int yylex_destroy (void)
|
||||
{
|
||||
|
||||
|
||||
/* Pop the buffer stack, destroying each element. */
|
||||
while(YY_CURRENT_BUFFER){
|
||||
yy_delete_buffer( YY_CURRENT_BUFFER );
|
||||
@@ -2016,7 +2020,7 @@ int yylex_destroy (void)
|
||||
#ifndef yytext_ptr
|
||||
static void yy_flex_strncpy (char* s1, const char * s2, int n )
|
||||
{
|
||||
|
||||
|
||||
int i;
|
||||
for ( i = 0; i < n; ++i )
|
||||
s1[i] = s2[i];
|
||||
@@ -2041,7 +2045,7 @@ void *yyalloc (yy_size_t size )
|
||||
|
||||
void *yyrealloc (void * ptr, yy_size_t size )
|
||||
{
|
||||
|
||||
|
||||
/* The cast to (char *) in the following accommodates both
|
||||
* implementations that use char* generic pointers, and those
|
||||
* that use void* generic pointers. It works with the latter
|
||||
|
Reference in New Issue
Block a user