diff options
author | Nico Huber <nico.huber@secunet.com> | 2020-06-03 10:20:07 -0700 |
---|---|---|
committer | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2020-09-11 17:34:01 +0000 |
commit | 8e1ea525d1ea25634db37bf93690e1479a1d748e (patch) | |
tree | ddc994a698ad9d28de4d8df7c2fd7b9c3521053e /util/sconfig/lex.yy.c_shipped | |
parent | ad7c8ffba97b74d70e139b3745ce02ae513d2ef2 (diff) | |
download | coreboot-8e1ea525d1ea25634db37bf93690e1479a1d748e.tar.xz |
sconfig: Allow to link devices to other device's drivers
Rarely, the driver of one device needs to know about another device
that can be anywhere in the device hierarchy. Current applications
boil down to EEPROMs that store information that is consumed by some
code (e.g. MAC address).
The idea is to give device nodes in the `devicetree.cb` an alias that
can later be used to link it to a device driver's `config` structure.
The driver has to declare a field of type `struct device *`, e.g.
struct some_chip_driver_config {
DEVTREE_CONST struct device *needed_eeprom;
};
In the devicetree, the referenced device gets an alias, e.g.
device i2c 0x50 alias my_eeprom on end
The author of the devicetree is free to choose any alias name that
is unique in the devicetree. Later, when configuring the driver the
alias can be used to link the device with the field of a driver's
config:
chip some/chip/driver
use my_eeprom as needed_eeprom
end
Override devices can add an alias if it does not exist, but cannot
change the alias for a device that already exists.
Alias names are checked for conflicts both in the base tree and in the
override tree.
References are resolved after the tree is parsed so aliases and
references do not need to be in a specific order in the tree.
Change-Id: I058a319f9b968924fbef9485a96c9e3f900a3ee8
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35456
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util/sconfig/lex.yy.c_shipped')
-rw-r--r-- | util/sconfig/lex.yy.c_shipped | 383 |
1 files changed, 199 insertions, 184 deletions
diff --git a/util/sconfig/lex.yy.c_shipped b/util/sconfig/lex.yy.c_shipped index 998505e69b..fcf5c3ed4f 100644 --- a/util/sconfig/lex.yy.c_shipped +++ b/util/sconfig/lex.yy.c_shipped @@ -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 45 -#define YY_END_OF_BUFFER 46 +#define YY_NUM_RULES 48 +#define YY_END_OF_BUFFER 49 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -358,30 +358,31 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[195] = +static const flex_int16_t yy_accept[202] = { 0, - 0, 0, 46, 44, 1, 3, 44, 44, 44, 39, - 39, 37, 40, 44, 40, 40, 40, 40, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 1, - 3, 44, 0, 44, 44, 0, 2, 39, 40, 44, - 44, 44, 44, 40, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 31, 44, 44, 44, 44, 44, - 44, 11, 44, 44, 44, 44, 44, 44, 44, 44, - 44, 43, 43, 44, 0, 38, 44, 44, 21, 44, - 44, 30, 35, 44, 44, 44, 44, 44, 18, 44, - 44, 29, 44, 27, 44, 44, 12, 44, 15, 17, - - 44, 44, 44, 25, 44, 26, 44, 0, 41, 4, - 44, 44, 44, 28, 44, 44, 44, 44, 44, 44, - 44, 44, 24, 44, 44, 44, 44, 44, 42, 42, - 44, 44, 44, 8, 44, 44, 44, 44, 44, 19, - 44, 44, 10, 44, 44, 44, 44, 5, 22, 44, - 44, 13, 44, 16, 44, 9, 44, 44, 44, 44, - 44, 23, 33, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 6, 44, 44, 44, 7, 44, 14, 44, - 44, 44, 32, 44, 44, 20, 44, 34, 44, 44, - 44, 44, 36, 0 - + 0, 0, 49, 47, 1, 3, 47, 47, 47, 42, + 42, 40, 43, 47, 43, 43, 43, 43, 43, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 1, 3, 47, 0, 47, 47, 0, 2, 42, 43, + 47, 47, 47, 8, 47, 47, 43, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 34, 47, 47, + 47, 47, 47, 47, 14, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 46, 46, 47, 0, 41, 47, + 47, 47, 24, 47, 47, 33, 38, 47, 47, 47, + 47, 47, 21, 47, 47, 32, 47, 30, 47, 47, + + 15, 47, 18, 20, 47, 47, 47, 28, 47, 29, + 7, 47, 0, 44, 47, 4, 47, 47, 47, 31, + 47, 47, 47, 47, 47, 47, 47, 47, 27, 47, + 47, 47, 47, 47, 45, 45, 6, 47, 47, 47, + 11, 47, 47, 47, 47, 47, 22, 47, 47, 13, + 47, 47, 47, 47, 5, 25, 47, 47, 16, 47, + 19, 47, 12, 47, 47, 47, 47, 47, 26, 36, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 9, + 47, 47, 47, 10, 47, 17, 47, 47, 47, 35, + 47, 47, 23, 47, 37, 47, 47, 47, 47, 39, + + 0 } ; static const YY_CHAR yy_ec[256] = @@ -424,134 +425,136 @@ static const YY_CHAR yy_meta[40] = 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; -static const flex_int16_t yy_base[202] = +static const flex_int16_t yy_base[209] = { 0, - 0, 0, 265, 0, 262, 266, 260, 38, 42, 39, - 224, 0, 45, 247, 55, 79, 61, 58, 239, 234, - 46, 54, 55, 68, 73, 237, 46, 224, 0, 254, - 266, 101, 250, 107, 111, 251, 266, 0, 108, 111, - 238, 227, 216, 117, 223, 218, 228, 217, 225, 229, - 216, 223, 223, 217, 223, 208, 208, 218, 208, 210, - 212, 0, 199, 207, 201, 201, 206, 210, 202, 208, - 207, 0, 266, 132, 219, 0, 212, 192, 205, 195, - 202, 0, 0, 193, 191, 197, 194, 194, 0, 192, - 182, 0, 186, 0, 190, 180, 0, 183, 0, 0, - - 189, 181, 180, 0, 171, 0, 198, 197, 0, 0, - 182, 181, 174, 0, 178, 168, 164, 174, 162, 168, - 173, 174, 0, 161, 168, 155, 158, 147, 0, 266, - 159, 163, 155, 0, 154, 156, 152, 154, 159, 0, - 143, 148, 0, 141, 141, 140, 137, 0, 0, 149, - 151, 0, 135, 152, 138, 0, 145, 136, 117, 117, - 124, 0, 0, 123, 115, 114, 112, 123, 109, 119, - 109, 101, 0, 113, 111, 115, 0, 96, 0, 92, - 82, 70, 0, 65, 77, 0, 77, 0, 71, 59, - 44, 30, 0, 266, 41, 153, 155, 157, 159, 161, - - 163 + 0, 0, 274, 0, 271, 275, 269, 38, 42, 39, + 233, 0, 45, 256, 55, 59, 83, 65, 62, 248, + 243, 68, 25, 48, 54, 75, 246, 75, 233, 0, + 263, 275, 106, 259, 111, 76, 260, 275, 0, 110, + 113, 247, 236, 0, 235, 224, 119, 231, 226, 236, + 225, 233, 237, 224, 231, 231, 225, 231, 216, 216, + 226, 216, 218, 220, 0, 207, 215, 209, 209, 214, + 218, 210, 216, 118, 0, 275, 135, 228, 0, 221, + 214, 200, 213, 203, 210, 0, 0, 201, 199, 205, + 202, 202, 0, 200, 190, 0, 194, 0, 198, 188, + + 0, 191, 0, 0, 197, 189, 188, 0, 179, 0, + 0, 206, 205, 0, 176, 0, 189, 188, 181, 0, + 185, 175, 171, 181, 169, 175, 180, 181, 0, 168, + 175, 162, 165, 154, 0, 275, 0, 166, 170, 162, + 0, 161, 163, 159, 161, 166, 0, 150, 155, 0, + 148, 148, 147, 144, 0, 0, 156, 158, 0, 142, + 159, 145, 0, 152, 156, 137, 137, 144, 0, 0, + 143, 122, 121, 119, 130, 116, 126, 116, 108, 0, + 120, 118, 123, 0, 112, 0, 113, 116, 97, 0, + 89, 86, 0, 85, 0, 75, 65, 52, 61, 0, + + 275, 48, 155, 157, 159, 161, 163, 165 } ; -static const flex_int16_t yy_def[202] = +static const flex_int16_t yy_def[209] = { 0, - 194, 1, 194, 195, 194, 194, 195, 196, 197, 195, - 10, 195, 10, 195, 10, 10, 10, 10, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 194, - 194, 196, 198, 199, 197, 200, 194, 10, 10, 10, - 195, 195, 195, 10, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 194, 199, 201, 40, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - - 195, 195, 195, 195, 195, 195, 195, 194, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 194, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 0, 194, 194, 194, 194, 194, 194, - - 194 + 201, 1, 201, 202, 201, 201, 202, 203, 204, 202, + 10, 202, 10, 202, 10, 10, 10, 10, 10, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 201, 201, 203, 205, 206, 204, 207, 201, 10, 10, + 10, 202, 202, 202, 202, 202, 10, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 201, 206, 208, 41, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 201, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 201, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + + 0, 201, 201, 201, 201, 201, 201, 201 } ; -static const flex_int16_t yy_nxt[306] = +static const flex_int16_t yy_nxt[315] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 10, 12, - 13, 13, 14, 4, 4, 4, 13, 13, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 4, 24, 25, - 4, 26, 27, 4, 28, 4, 4, 4, 4, 33, - 33, 29, 34, 36, 37, 38, 38, 38, 193, 39, - 39, 39, 39, 39, 53, 39, 39, 39, 39, 39, - 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, - 57, 59, 68, 54, 55, 69, 192, 56, 42, 191, - 70, 60, 49, 58, 43, 39, 39, 39, 47, 61, - 190, 64, 189, 48, 50, 62, 188, 63, 187, 44, - - 65, 186, 33, 33, 66, 72, 185, 45, 75, 75, - 46, 29, 36, 37, 39, 39, 39, 76, 76, 76, - 184, 76, 76, 39, 39, 39, 183, 76, 76, 76, - 76, 76, 76, 75, 75, 182, 107, 181, 180, 179, - 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, - 168, 167, 80, 32, 32, 35, 35, 33, 33, 74, - 74, 36, 36, 75, 75, 166, 165, 164, 163, 162, - 161, 160, 159, 158, 157, 156, 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, 116, 115, 114, 113, 112, - 111, 110, 109, 108, 106, 105, 104, 103, 102, 101, - 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, - 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, - 79, 78, 77, 37, 73, 30, 71, 67, 52, 51, - 41, 40, 31, 30, 194, 3, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - - 194, 194, 194, 194, 194 + 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, 60, 35, 37, 38, 39, 39, 39, 30, 40, + 40, 40, 40, 40, 61, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 62, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 63, 64, 56, 37, 38, 200, + 43, 65, 45, 66, 199, 198, 52, 44, 46, 40, + 40, 40, 50, 67, 197, 57, 58, 51, 53, 59, + + 196, 71, 68, 47, 72, 195, 69, 34, 34, 73, + 75, 48, 78, 78, 49, 30, 40, 40, 40, 79, + 79, 79, 194, 79, 79, 40, 40, 40, 193, 79, + 79, 79, 79, 79, 79, 110, 78, 78, 111, 112, + 192, 191, 190, 189, 188, 187, 186, 185, 184, 183, + 182, 181, 180, 179, 84, 33, 33, 36, 36, 34, + 34, 77, 77, 37, 37, 78, 78, 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, 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, + 115, 114, 113, 109, 108, 107, 106, 105, 104, 103, + 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, + 92, 91, 90, 89, 88, 87, 86, 85, 83, 82, + 81, 80, 38, 76, 31, 74, 70, 55, 54, 42, + 41, 32, 31, 201, 3, 201, 201, 201, 201, 201, + 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, + 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, + + 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, + 201, 201, 201, 201 } ; -static const flex_int16_t yy_chk[306] = +static const flex_int16_t yy_chk[315] = { 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, 195, 8, 9, 9, 10, 10, 10, 192, 10, - 10, 13, 13, 13, 21, 10, 10, 10, 10, 10, - 10, 15, 15, 15, 18, 18, 18, 17, 17, 17, - 22, 23, 27, 21, 21, 27, 191, 21, 15, 190, - 27, 23, 18, 22, 15, 16, 16, 16, 17, 24, - 189, 25, 187, 17, 18, 24, 185, 24, 184, 16, - - 25, 182, 32, 32, 25, 32, 181, 16, 34, 34, - 16, 34, 35, 35, 39, 39, 39, 40, 40, 40, - 180, 40, 40, 44, 44, 44, 178, 40, 40, 40, - 40, 40, 40, 74, 74, 176, 74, 175, 174, 172, - 171, 170, 169, 168, 167, 166, 165, 164, 161, 160, - 159, 158, 44, 196, 196, 197, 197, 198, 198, 199, - 199, 200, 200, 201, 201, 157, 155, 154, 153, 151, - 150, 147, 146, 145, 144, 142, 141, 139, 138, 137, - 136, 135, 133, 132, 131, 128, 127, 126, 125, 124, - 122, 121, 120, 119, 118, 117, 116, 115, 113, 112, - - 111, 108, 107, 105, 103, 102, 101, 98, 96, 95, - 93, 91, 90, 88, 87, 86, 85, 84, 81, 80, - 79, 78, 77, 75, 71, 70, 69, 68, 67, 66, - 65, 64, 63, 61, 60, 59, 58, 57, 56, 55, - 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, - 43, 42, 41, 36, 33, 30, 28, 26, 20, 19, - 14, 11, 7, 5, 3, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - - 194, 194, 194, 194, 194 + 8, 23, 8, 9, 9, 10, 10, 10, 202, 10, + 10, 13, 13, 13, 23, 10, 10, 10, 10, 10, + 10, 15, 15, 15, 24, 16, 16, 16, 19, 19, + 19, 18, 18, 18, 24, 25, 22, 36, 36, 199, + 15, 25, 16, 25, 198, 197, 19, 15, 16, 17, + 17, 17, 18, 26, 196, 22, 22, 18, 19, 22, + + 194, 28, 26, 17, 28, 192, 26, 33, 33, 28, + 33, 17, 35, 35, 17, 35, 40, 40, 40, 41, + 41, 41, 191, 41, 41, 47, 47, 47, 189, 41, + 41, 41, 41, 41, 41, 74, 77, 77, 74, 77, + 188, 187, 185, 183, 182, 181, 179, 178, 177, 176, + 175, 174, 173, 172, 47, 203, 203, 204, 204, 205, + 205, 206, 206, 207, 207, 208, 208, 171, 168, 167, + 166, 165, 164, 162, 161, 160, 158, 157, 154, 153, + 152, 151, 149, 148, 146, 145, 144, 143, 142, 140, + 139, 138, 134, 133, 132, 131, 130, 128, 127, 126, + + 125, 124, 123, 122, 121, 119, 118, 117, 115, 113, + 112, 109, 107, 106, 105, 102, 100, 99, 97, 95, + 94, 92, 91, 90, 89, 88, 85, 84, 83, 82, + 81, 80, 78, 73, 72, 71, 70, 69, 68, 67, + 66, 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, 20, 14, + 11, 7, 5, 3, 201, 201, 201, 201, 201, 201, + 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, + 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, + + 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, + 201, 201, 201, 201 } ; static yy_state_type yy_last_accepting_state; @@ -816,13 +819,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 >= 195 ) + if ( yy_current_state >= 202 ) 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] != 266 ); + while ( yy_base[yy_current_state] != 275 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -870,163 +873,175 @@ YY_RULE_SETUP YY_BREAK case 6: YY_RULE_SETUP -{return(REGISTER);} +{return(ALIAS);} YY_BREAK case 7: YY_RULE_SETUP -{return(FW_CONFIG_TABLE);} +{return(REFERENCE);} YY_BREAK case 8: YY_RULE_SETUP -{return(FW_CONFIG_FIELD);} +{return(ASSOCIATION);} YY_BREAK case 9: YY_RULE_SETUP -{return(FW_CONFIG_OPTION);} +{return(REGISTER);} YY_BREAK case 10: YY_RULE_SETUP -{return(FW_CONFIG_PROBE);} +{return(FW_CONFIG_TABLE);} YY_BREAK case 11: YY_RULE_SETUP -{yylval.number=1; return(BOOL);} +{return(FW_CONFIG_FIELD);} YY_BREAK case 12: YY_RULE_SETUP -{yylval.number=0; return(BOOL);} +{return(FW_CONFIG_OPTION);} YY_BREAK case 13: YY_RULE_SETUP -{yylval.number=3; return(STATUS);} +{return(FW_CONFIG_PROBE);} YY_BREAK case 14: YY_RULE_SETUP -{yylval.number=5; return(STATUS);} +{yylval.number=1; return(BOOL);} YY_BREAK case 15: YY_RULE_SETUP -{yylval.number=PCI; return(BUS);} +{yylval.number=0; return(BOOL);} YY_BREAK case 16: YY_RULE_SETUP -{yylval.number=IOAPIC; return(BUS);} +{yylval.number=3; return(STATUS);} YY_BREAK case 17: YY_RULE_SETUP -{yylval.number=PNP; return(BUS);} +{yylval.number=5; return(STATUS);} YY_BREAK case 18: YY_RULE_SETUP -{yylval.number=I2C; return(BUS);} +{yylval.number=PCI; return(BUS);} YY_BREAK case 19: YY_RULE_SETUP -{yylval.number=APIC; return(BUS);} +{yylval.number=IOAPIC; return(BUS);} YY_BREAK case 20: YY_RULE_SETUP -{yylval.number=CPU_CLUSTER; return(BUS);} +{yylval.number=PNP; return(BUS);} YY_BREAK case 21: YY_RULE_SETUP -{yylval.number=CPU; return(BUS);} +{yylval.number=I2C; return(BUS);} YY_BREAK case 22: YY_RULE_SETUP -{yylval.number=DOMAIN; return(BUS);} +{yylval.number=APIC; return(BUS);} YY_BREAK case 23: YY_RULE_SETUP -{yylval.number=GENERIC; return(BUS);} +{yylval.number=CPU_CLUSTER; return(BUS);} YY_BREAK case 24: YY_RULE_SETUP -{yylval.number=MMIO; return(BUS);} +{yylval.number=CPU; return(BUS);} YY_BREAK case 25: YY_RULE_SETUP -{yylval.number=SPI; return(BUS);} +{yylval.number=DOMAIN; return(BUS);} YY_BREAK case 26: YY_RULE_SETUP -{yylval.number=USB; return(BUS);} +{yylval.number=GENERIC; return(BUS);} YY_BREAK case 27: YY_RULE_SETUP -{yylval.number=LPC; return(BUS);} +{yylval.number=MMIO; return(BUS);} YY_BREAK case 28: YY_RULE_SETUP -{yylval.number=ESPI; return(BUS);} +{yylval.number=SPI; return(BUS);} YY_BREAK case 29: YY_RULE_SETUP -{yylval.number=IRQ; return(RESOURCE);} +{yylval.number=USB; return(BUS);} YY_BREAK case 30: YY_RULE_SETUP -{yylval.number=DRQ; return(RESOURCE);} +{yylval.number=LPC; return(BUS);} YY_BREAK case 31: YY_RULE_SETUP -{yylval.number=IO; return(RESOURCE);} +{yylval.number=ESPI; return(BUS);} YY_BREAK case 32: YY_RULE_SETUP -{return(IOAPIC_IRQ);} +{yylval.number=IRQ; return(RESOURCE);} YY_BREAK case 33: YY_RULE_SETUP -{return(INHERIT);} +{yylval.number=DRQ; return(RESOURCE);} YY_BREAK case 34: YY_RULE_SETUP -{return(SUBSYSTEMID);} +{yylval.number=IO; return(RESOURCE);} YY_BREAK case 35: YY_RULE_SETUP -{return(END);} +{return(IOAPIC_IRQ);} YY_BREAK case 36: YY_RULE_SETUP -{return(SLOT_DESC);} +{return(INHERIT);} YY_BREAK case 37: YY_RULE_SETUP -{return(EQUALS);} +{return(SUBSYSTEMID);} YY_BREAK case 38: YY_RULE_SETUP -{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);} +{return(END);} YY_BREAK case 39: YY_RULE_SETUP -{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);} +{return(SLOT_DESC);} YY_BREAK case 40: YY_RULE_SETUP -{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);} +{return(EQUALS);} YY_BREAK case 41: 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 42: -/* rule 42 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(NUMBER);} YY_BREAK case 43: -/* rule 43 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(NUMBER);} YY_BREAK case 44: YY_RULE_SETUP -{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(STRING);} +{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(PCIINT);} YY_BREAK case 45: +/* rule 45 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 46: +/* rule 46 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 47: +YY_RULE_SETUP +{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(STRING);} + YY_BREAK +case 48: YY_RULE_SETUP ECHO; YY_BREAK @@ -1326,7 +1341,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 >= 195 ) + if ( yy_current_state >= 202 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1354,11 +1369,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 >= 195 ) + if ( yy_current_state >= 202 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 194); + yy_is_jam = (yy_current_state == 201); return yy_is_jam ? 0 : yy_current_state; } |