From 5d8cdfc854886bb069299ea3990bf48c24e5fc0a Mon Sep 17 00:00:00 2001 From: Yuriy Taraday Date: Mon, 26 Feb 2018 00:51:13 +0400 Subject: [PATCH] Capture comment before libvirt proc declaration It contains annotations that we can use to insert streams in proc arguments. --- internal/lvgen/lvlexer.go | 7 +- internal/lvgen/sunrpc.y | 8 + internal/lvgen/y.go | 283 ++++++------ internal/lvgen/y.output | 908 ++++++++++++++++++++------------------ 4 files changed, 632 insertions(+), 574 deletions(-) diff --git a/internal/lvgen/lvlexer.go b/internal/lvgen/lvlexer.go index 40dcbed..be133fc 100644 --- a/internal/lvgen/lvlexer.go +++ b/internal/lvgen/lvlexer.go @@ -259,12 +259,17 @@ func lexText(l *Lexer) stateFn { // lexBlockComment is used when we find a comment marker '/*' in the input. func lexBlockComment(l *Lexer) stateFn { + metadataComment := strings.HasPrefix(l.input[l.pos:], "/**") for { if strings.HasPrefix(l.input[l.pos:], "*/") { // Found the end. Advance past the '*/' and discard the comment body. l.next() l.next() - l.ignore() + if metadataComment { + l.emit(METADATACOMMENT) + } else { + l.ignore() + } return lexText } if l.next() == eof { diff --git a/internal/lvgen/sunrpc.y b/internal/lvgen/sunrpc.y index a8d2247..22665a3 100644 --- a/internal/lvgen/sunrpc.y +++ b/internal/lvgen/sunrpc.y @@ -56,6 +56,7 @@ import ( %token IDENTIFIER CONSTANT ERROR // RPCL additional tokens: %token PROGRAM VERSION +%token METADATACOMMENT %% @@ -99,6 +100,13 @@ enum_value return 1 } } + | METADATACOMMENT enum_value_ident '=' value { + err := AddEnumVal($2.val, $4.val) + if err != nil { + yylex.Error(err.Error()) + return 1 + } + } | enum_value_ident '=' value { err := AddEnumVal($1.val, $3.val) if err != nil { diff --git a/internal/lvgen/y.go b/internal/lvgen/y.go index 8dbf7c9..b6d1204 100644 --- a/internal/lvgen/y.go +++ b/internal/lvgen/y.go @@ -59,6 +59,7 @@ const CONSTANT = 57366 const ERROR = 57367 const PROGRAM = 57368 const VERSION = 57369 +const METADATACOMMENT = 57370 var yyToknames = [...]string{ "$end", @@ -88,6 +89,7 @@ var yyToknames = [...]string{ "ERROR", "PROGRAM", "VERSION", + "METADATACOMMENT", "';'", "'{'", "'}'", @@ -108,7 +110,7 @@ const yyEofCode = 1 const yyErrCode = 2 const yyInitialStackSize = 16 -//line sunrpc.y:259 +//line sunrpc.y:267 //line yacctab:1 var yyExca = [...]int{ @@ -119,106 +121,107 @@ var yyExca = [...]int{ const yyPrivate = 57344 -const yyLast = 148 +const yyLast = 153 var yyAct = [...]int{ - 84, 77, 36, 111, 103, 76, 61, 67, 32, 129, - 55, 126, 128, 100, 37, 117, 85, 86, 78, 63, - 98, 97, 73, 31, 74, 69, 131, 115, 71, 89, - 41, 94, 72, 62, 40, 10, 39, 43, 42, 13, - 30, 118, 14, 38, 107, 48, 49, 50, 51, 47, - 90, 11, 79, 64, 10, 70, 106, 96, 13, 54, - 12, 14, 52, 29, 134, 127, 119, 108, 91, 75, - 80, 15, 16, 110, 87, 88, 85, 86, 59, 60, - 63, 93, 83, 48, 49, 50, 51, 92, 95, 58, - 82, 27, 25, 23, 20, 102, 18, 99, 2, 105, - 101, 46, 8, 66, 45, 7, 109, 44, 4, 104, - 113, 105, 114, 116, 120, 28, 122, 81, 8, 68, - 123, 7, 26, 124, 4, 121, 125, 112, 130, 53, - 24, 132, 133, 65, 22, 35, 34, 33, 21, 19, - 57, 56, 17, 9, 6, 5, 3, 1, + 86, 79, 36, 115, 107, 78, 62, 32, 68, 55, + 57, 133, 130, 132, 104, 121, 87, 88, 80, 64, + 37, 102, 75, 31, 76, 101, 114, 135, 119, 72, + 92, 41, 97, 89, 63, 40, 10, 39, 43, 42, + 13, 73, 30, 14, 38, 122, 48, 49, 50, 51, + 47, 111, 93, 81, 71, 11, 110, 138, 10, 65, + 99, 54, 13, 52, 12, 14, 29, 131, 123, 74, + 77, 112, 94, 59, 82, 15, 90, 91, 58, 70, + 16, 64, 85, 96, 87, 88, 60, 61, 95, 84, + 100, 98, 48, 49, 50, 51, 113, 59, 106, 27, + 103, 25, 109, 105, 23, 20, 18, 67, 46, 8, + 108, 45, 7, 44, 4, 109, 2, 120, 124, 117, + 126, 118, 83, 69, 127, 8, 26, 128, 7, 125, + 4, 129, 134, 28, 116, 136, 137, 53, 24, 66, + 22, 35, 34, 33, 21, 19, 56, 17, 9, 6, + 5, 3, 1, } var yyPact = [...]int{ - 45, -1000, -1000, 44, -1000, -1000, -1000, -1000, -1000, -1000, - 73, 71, -1000, 70, 69, 68, 45, 34, -1000, 8, - -1000, 26, 33, -1000, -1000, -1000, 30, -1000, -1000, 66, - 55, -1000, -1000, -1000, -1000, -1000, -4, -1000, 64, -1000, + 49, -1000, -1000, 51, -1000, -1000, -1000, -1000, -1000, -1000, + 83, 82, -1000, 81, 78, 76, 49, 36, -1000, 9, + -1000, 27, 33, -1000, -1000, -1000, 31, -1000, -1000, 50, + 63, -1000, -1000, -1000, -1000, -1000, -4, -1000, 73, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, 89, -2, 25, -3, 0, -1000, -1000, - -1000, -11, 57, -1000, -1000, 26, -20, 22, 42, 67, - -1000, 66, 53, 53, -7, -1000, 20, 40, 26, -1, - -2, 28, -1000, -1000, -1000, -1000, -1000, -13, -16, -1000, - -1000, 26, -26, 57, 53, -1000, 26, -1000, -1000, -1000, - 27, -1000, -1000, 14, 39, 50, 105, -5, 26, -23, - -1000, 11, 38, 53, -1000, 53, -1000, 26, -1000, 105, - -1000, -29, 37, -27, -1000, -31, 26, -1000, -6, 26, - -1000, 53, -1000, 36, -1000, + -1000, -1000, -1000, 93, 52, 23, -3, 8, 74, -1000, + -1000, -1000, -12, 58, -1000, -1000, 27, -21, 22, 45, + 66, -1000, 50, 61, 0, 61, -7, -1000, 21, 43, + 27, -1, 52, 30, -1000, -1000, -1000, -1000, -1000, 61, + -10, -16, -1000, -1000, 27, -26, 58, 61, -1000, 27, + -1000, -1000, -1000, -1000, 26, -1000, -1000, 20, 42, 3, + 114, -5, 27, -24, -1000, 14, 39, 61, -1000, 61, + -1000, 27, -1000, 114, -1000, -29, 38, -27, -1000, -30, + 27, -1000, -6, 27, -1000, 61, -1000, 28, -1000, } var yyPgo = [...]int{ - 0, 147, 98, 0, 146, 107, 145, 144, 104, 101, - 143, 142, 10, 141, 140, 139, 138, 1, 8, 137, - 136, 135, 2, 6, 14, 134, 133, 5, 130, 129, - 3, 127, 126, 125, 122, 7, 119, 117, 4, 109, - 106, + 0, 152, 116, 0, 151, 113, 150, 149, 111, 108, + 148, 147, 9, 146, 10, 145, 144, 1, 7, 143, + 142, 141, 2, 6, 20, 140, 139, 5, 138, 137, + 3, 134, 131, 129, 126, 8, 123, 122, 4, 110, + 96, } var yyR1 = [...]int{ 0, 1, 3, 3, 2, 2, 4, 4, 4, 4, - 4, 4, 5, 12, 12, 13, 13, 11, 14, 6, - 6, 15, 16, 7, 17, 17, 17, 17, 18, 22, + 4, 4, 5, 12, 12, 13, 13, 13, 11, 14, + 6, 6, 15, 16, 7, 17, 17, 17, 17, 18, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 24, 24, 24, 24, 23, 19, 20, 20, 21, 26, - 8, 25, 27, 27, 29, 9, 28, 30, 30, 32, - 31, 33, 31, 10, 34, 35, 35, 36, 37, 38, - 38, 39, 40, + 22, 24, 24, 24, 24, 23, 19, 20, 20, 21, + 26, 8, 25, 27, 27, 29, 9, 28, 30, 30, + 32, 31, 33, 31, 10, 34, 35, 35, 36, 37, + 38, 38, 39, 40, } var yyR2 = [...]int{ 0, 1, 1, 1, 2, 3, 1, 1, 1, 1, - 1, 1, 5, 1, 3, 1, 3, 1, 1, 4, - 4, 1, 0, 3, 1, 1, 1, 1, 2, 1, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 5, 5, 4, 3, 0, - 6, 1, 2, 3, 0, 10, 1, 2, 3, 0, - 5, 0, 4, 7, 1, 2, 3, 8, 1, 2, - 3, 8, 1, + 1, 1, 5, 1, 3, 1, 4, 3, 1, 1, + 4, 4, 1, 0, 3, 1, 1, 1, 1, 2, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 5, 5, 4, 3, + 0, 6, 1, 2, 3, 0, 10, 1, 2, 3, + 0, 5, 0, 4, 7, 1, 2, 3, 8, 1, + 2, 3, 8, 1, } var yyChk = [...]int{ -1000, -1, -2, -4, -5, -6, -7, -8, -9, -10, - 9, 6, 15, 13, 16, 26, 28, -11, 23, -15, - 23, -16, -25, 23, -28, 23, -34, 23, -2, 29, - 32, -17, -18, -19, -20, -21, -22, -24, 17, 10, + 9, 6, 15, 13, 16, 26, 29, -11, 23, -15, + 23, -16, -25, 23, -28, 23, -34, 23, -2, 30, + 33, -17, -18, -19, -20, -21, -22, -24, 17, 10, 8, 4, 12, 11, -5, -8, -9, 23, 19, 20, - 21, 22, 29, -29, 29, -12, -13, -14, 23, 23, - 24, -23, 37, 23, -24, -26, 14, -35, -36, 27, - 30, 31, 32, 33, 35, -23, -27, -17, 38, 30, - 28, -37, 23, -12, -3, 23, 24, -3, -3, 36, - 30, 28, -18, -22, 32, -35, 29, 34, 36, -27, - 39, -23, -3, -38, -39, -22, 29, 30, 28, -40, - 23, -30, -31, 5, 7, 32, -38, 38, 30, 28, - -3, -33, -3, -22, -30, -32, 40, 28, 39, 40, - -17, 32, -17, -3, 28, + 21, 22, 30, -29, 30, -12, -13, -14, 28, 23, + 23, 24, -23, 38, 23, -24, -26, 14, -35, -36, + 27, 31, 32, 33, -14, 34, 36, -23, -27, -17, + 39, 31, 29, -37, 23, -12, -3, 23, 24, 33, + -3, -3, 37, 31, 29, -18, -22, 33, -35, 30, + -3, 35, 37, -27, 40, -23, -3, -38, -39, -22, + 30, 31, 29, -40, 23, -30, -31, 5, 7, 33, + -38, 39, 31, 29, -3, -33, -3, -22, -30, -32, + 41, 29, 40, 41, -17, 33, -17, -3, 29, } var yyDef = [...]int{ 0, -2, 1, 0, 6, 7, 8, 9, 10, 11, - 0, 0, 22, 0, 0, 0, 4, 0, 17, 0, - 21, 0, 0, 51, 54, 56, 0, 64, 5, 0, - 0, 23, 24, 25, 26, 27, 0, 29, 0, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 49, 0, 0, 0, 13, 15, 18, 19, - 20, 28, 0, 44, 30, 0, 0, 0, 0, 0, - 12, 0, 0, 0, 0, 48, 0, 0, 0, 0, - 65, 0, 68, 14, 16, 2, 3, 0, 0, 47, - 50, 52, 0, 0, 0, 66, 0, 45, 46, 53, - 0, 28, 63, 0, 0, 0, 0, 0, 69, 0, - 72, 0, 0, 0, 61, 0, 70, 0, 55, 57, - 59, 0, 0, 0, 58, 0, 0, 67, 0, 0, - 62, 0, 60, 0, 71, + 0, 0, 23, 0, 0, 0, 4, 0, 18, 0, + 22, 0, 0, 52, 55, 57, 0, 65, 5, 0, + 0, 24, 25, 26, 27, 28, 0, 30, 0, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 50, 0, 0, 0, 13, 15, 0, 19, + 20, 21, 29, 0, 45, 31, 0, 0, 0, 0, + 0, 12, 0, 0, 0, 0, 0, 49, 0, 0, + 0, 0, 66, 0, 69, 14, 17, 2, 3, 0, + 0, 0, 48, 51, 53, 0, 0, 0, 67, 0, + 16, 46, 47, 54, 0, 29, 64, 0, 0, 0, + 0, 0, 70, 0, 73, 0, 0, 0, 62, 0, + 71, 0, 56, 58, 60, 0, 0, 0, 59, 0, + 0, 68, 0, 0, 63, 0, 61, 0, 72, } var yyTok1 = [...]int{ @@ -226,21 +229,21 @@ var yyTok1 = [...]int{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 38, 39, 37, 3, 31, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 40, 28, - 35, 32, 36, 3, 3, 3, 3, 3, 3, 3, + 39, 40, 38, 3, 32, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 41, 29, + 36, 33, 37, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 33, 3, 34, 3, 3, 3, 3, 3, 3, + 3, 34, 3, 35, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 29, 3, 30, + 3, 3, 3, 30, 3, 31, } var yyTok2 = [...]int{ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, + 22, 23, 24, 25, 26, 27, 28, } var yyTok3 = [...]int{ 0, @@ -585,13 +588,13 @@ yydefault: case 12: yyDollar = yyS[yypt-5 : yypt+1] - //line sunrpc.y:86 + //line sunrpc.y:87 { StartEnum(yyDollar[2].val) } case 15: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:95 + //line sunrpc.y:96 { err := AddEnumAutoVal(yyDollar[1].val) if err != nil { @@ -600,8 +603,18 @@ yydefault: } } case 16: + yyDollar = yyS[yypt-4 : yypt+1] + //line sunrpc.y:103 + { + err := AddEnumVal(yyDollar[2].val, yyDollar[4].val) + if err != nil { + yylex.Error(err.Error()) + return 1 + } + } + case 17: yyDollar = yyS[yypt-3 : yypt+1] - //line sunrpc.y:102 + //line sunrpc.y:110 { err := AddEnumVal(yyDollar[1].val, yyDollar[3].val) if err != nil { @@ -609,9 +622,9 @@ yydefault: return 1 } } - case 20: + case 21: yyDollar = yyS[yypt-4 : yypt+1] - //line sunrpc.y:124 + //line sunrpc.y:132 { err := AddConst(yyDollar[2].val, yyDollar[4].val) if err != nil { @@ -619,147 +632,147 @@ yydefault: return 1 } } - case 22: + case 23: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:138 + //line sunrpc.y:146 { StartTypedef() } - case 28: + case 29: yyDollar = yyS[yypt-2 : yypt+1] - //line sunrpc.y:149 + //line sunrpc.y:157 { AddDeclaration(yyDollar[2].val, yyDollar[1].val) } - case 30: + case 31: yyDollar = yyS[yypt-2 : yypt+1] - //line sunrpc.y:154 + //line sunrpc.y:162 { yyVAL.val = "u" + yyDollar[2].val } - case 31: + case 32: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:155 + //line sunrpc.y:163 { yyVAL.val = "float32" } - case 32: + case 33: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:156 + //line sunrpc.y:164 { yyVAL.val = "float64" } - case 33: + case 34: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:157 + //line sunrpc.y:165 { yyVAL.val = "bool" } - case 34: + case 35: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:158 + //line sunrpc.y:166 { yyVAL.val = "string" } - case 35: - yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:159 - { - yyVAL.val = "byte" - } - case 40: + case 36: yyDollar = yyS[yypt-1 : yypt+1] //line sunrpc.y:167 { - yyVAL.val = "int64" + yyVAL.val = "byte" } case 41: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:168 + //line sunrpc.y:175 { - yyVAL.val = "int32" + yyVAL.val = "int64" } case 42: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:169 + //line sunrpc.y:176 { - yyVAL.val = "int16" + yyVAL.val = "int32" } case 43: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:170 + //line sunrpc.y:177 + { + yyVAL.val = "int16" + } + case 44: + yyDollar = yyS[yypt-1 : yypt+1] + //line sunrpc.y:178 { yyVAL.val = "int8" } - case 45: + case 46: yyDollar = yyS[yypt-5 : yypt+1] - //line sunrpc.y:178 + //line sunrpc.y:186 { AddFixedArray(yyDollar[2].val, yyDollar[1].val, yyDollar[4].val) } - case 46: + case 47: yyDollar = yyS[yypt-5 : yypt+1] - //line sunrpc.y:182 + //line sunrpc.y:190 { AddVariableArray(yyDollar[2].val, yyDollar[1].val, yyDollar[4].val) } - case 47: + case 48: yyDollar = yyS[yypt-4 : yypt+1] - //line sunrpc.y:183 + //line sunrpc.y:191 { AddVariableArray(yyDollar[2].val, yyDollar[1].val, "") } - case 48: + case 49: yyDollar = yyS[yypt-3 : yypt+1] - //line sunrpc.y:191 + //line sunrpc.y:199 { AddOptValue(yyDollar[3].val, yyDollar[1].val) } - case 49: + case 50: yyDollar = yyS[yypt-3 : yypt+1] - //line sunrpc.y:195 + //line sunrpc.y:203 { StartStruct(yyDollar[2].val) } - case 50: + case 51: yyDollar = yyS[yypt-6 : yypt+1] - //line sunrpc.y:195 + //line sunrpc.y:203 { AddStruct() } - case 54: + case 55: yyDollar = yyS[yypt-2 : yypt+1] - //line sunrpc.y:208 + //line sunrpc.y:216 { StartUnion(yyDollar[2].val) } - case 55: + case 56: yyDollar = yyS[yypt-10 : yypt+1] - //line sunrpc.y:208 + //line sunrpc.y:216 { AddUnion() } - case 59: + case 60: yyDollar = yyS[yypt-2 : yypt+1] - //line sunrpc.y:221 + //line sunrpc.y:229 { StartCase(yyDollar[2].val) } - case 60: + case 61: yyDollar = yyS[yypt-5 : yypt+1] - //line sunrpc.y:221 + //line sunrpc.y:229 { AddCase() } - case 61: + case 62: yyDollar = yyS[yypt-1 : yypt+1] - //line sunrpc.y:222 + //line sunrpc.y:230 { StartCase("default") } - case 62: + case 63: yyDollar = yyS[yypt-4 : yypt+1] - //line sunrpc.y:222 + //line sunrpc.y:230 { AddCase() } diff --git a/internal/lvgen/y.output b/internal/lvgen/y.output index f23bce4..3c010da 100644 --- a/internal/lvgen/y.output +++ b/internal/lvgen/y.output @@ -30,7 +30,7 @@ state 1 state 2 specification: definition_list. (1) - . reduce 1 (src line 62) + . reduce 1 (src line 63) state 3 @@ -44,37 +44,37 @@ state 3 state 4 definition: enum_definition. (6) - . reduce 6 (src line 76) + . reduce 6 (src line 77) state 5 definition: const_definition. (7) - . reduce 7 (src line 78) + . reduce 7 (src line 79) state 6 definition: typedef_definition. (8) - . reduce 8 (src line 79) + . reduce 8 (src line 80) state 7 definition: struct_definition. (9) - . reduce 9 (src line 80) + . reduce 9 (src line 81) state 8 definition: union_definition. (10) - . reduce 10 (src line 81) + . reduce 10 (src line 82) state 9 definition: program_definition. (11) - . reduce 11 (src line 82) + . reduce 11 (src line 83) state 10 @@ -95,15 +95,15 @@ state 11 const_ident goto 19 state 12 - typedef_definition: TYPEDEF.$$22 declaration - $$22: . (22) + typedef_definition: TYPEDEF.$$23 declaration + $$23: . (23) - . reduce 22 (src line 137) + . reduce 23 (src line 145) - $$22 goto 21 + $$23 goto 21 state 13 - struct_definition: STRUCT.struct_ident '{' $$49 declaration_list '}' + struct_definition: STRUCT.struct_ident '{' $$50 declaration_list '}' IDENTIFIER shift 23 . error @@ -111,7 +111,7 @@ state 13 struct_ident goto 22 state 14 - union_definition: UNION.union_ident $$54 SWITCH '(' simple_declaration ')' '{' case_list '}' + union_definition: UNION.union_ident $$55 SWITCH '(' simple_declaration ')' '{' case_list '}' IDENTIFIER shift 25 . error @@ -136,7 +136,7 @@ state 16 TYPEDEF shift 12 UNION shift 14 PROGRAM shift 15 - . reduce 4 (src line 71) + . reduce 4 (src line 72) definition_list goto 28 definition goto 3 @@ -155,9 +155,9 @@ state 17 state 18 - enum_ident: IDENTIFIER. (17) + enum_ident: IDENTIFIER. (18) - . reduce 17 (src line 111) + . reduce 18 (src line 119) state 19 @@ -169,13 +169,13 @@ state 19 state 20 - const_ident: IDENTIFIER. (21) + const_ident: IDENTIFIER. (22) - . reduce 21 (src line 133) + . reduce 22 (src line 141) state 21 - typedef_definition: TYPEDEF $$22.declaration + typedef_definition: TYPEDEF $$23.declaration BOOL shift 41 DOUBLE shift 40 @@ -205,30 +205,30 @@ state 21 int_spec goto 37 state 22 - struct_definition: STRUCT struct_ident.'{' $$49 declaration_list '}' + struct_definition: STRUCT struct_ident.'{' $$50 declaration_list '}' '{' shift 52 . error state 23 - struct_ident: IDENTIFIER. (51) + struct_ident: IDENTIFIER. (52) - . reduce 51 (src line 198) + . reduce 52 (src line 206) state 24 - union_definition: UNION union_ident.$$54 SWITCH '(' simple_declaration ')' '{' case_list '}' - $$54: . (54) + union_definition: UNION union_ident.$$55 SWITCH '(' simple_declaration ')' '{' case_list '}' + $$55: . (55) - . reduce 54 (src line 207) + . reduce 55 (src line 215) - $$54 goto 53 + $$55 goto 53 state 25 - union_ident: IDENTIFIER. (56) + union_ident: IDENTIFIER. (57) - . reduce 56 (src line 211) + . reduce 57 (src line 219) state 26 @@ -239,21 +239,22 @@ state 26 state 27 - program_ident: IDENTIFIER. (64) + program_ident: IDENTIFIER. (65) - . reduce 64 (src line 229) + . reduce 65 (src line 237) state 28 definition_list: definition ';' definition_list. (5) - . reduce 5 (src line 73) + . reduce 5 (src line 74) state 29 enum_definition: ENUM enum_ident '{'.enum_value_list '}' - IDENTIFIER shift 58 + IDENTIFIER shift 59 + METADATACOMMENT shift 58 . error enum_value_list goto 55 @@ -264,39 +265,39 @@ state 30 const_definition: CONST const_ident '='.IDENTIFIER const_definition: CONST const_ident '='.CONSTANT - IDENTIFIER shift 59 - CONSTANT shift 60 + IDENTIFIER shift 60 + CONSTANT shift 61 . error state 31 - typedef_definition: TYPEDEF $$22 declaration. (23) + typedef_definition: TYPEDEF $$23 declaration. (24) - . reduce 23 (src line 138) + . reduce 24 (src line 146) state 32 - declaration: simple_declaration. (24) + declaration: simple_declaration. (25) - . reduce 24 (src line 141) + . reduce 25 (src line 149) state 33 - declaration: fixed_array_declaration. (25) + declaration: fixed_array_declaration. (26) - . reduce 25 (src line 143) + . reduce 26 (src line 151) state 34 - declaration: variable_array_declaration. (26) + declaration: variable_array_declaration. (27) - . reduce 26 (src line 144) + . reduce 27 (src line 152) state 35 - declaration: pointer_declaration. (27) + declaration: pointer_declaration. (28) - . reduce 27 (src line 145) + . reduce 28 (src line 153) state 36 @@ -306,16 +307,16 @@ state 36 variable_array_declaration: type_specifier.variable_ident '<' '>' pointer_declaration: type_specifier.'*' variable_ident - IDENTIFIER shift 63 - '*' shift 62 + IDENTIFIER shift 64 + '*' shift 63 . error - variable_ident goto 61 + variable_ident goto 62 state 37 - type_specifier: int_spec. (29) + type_specifier: int_spec. (30) - . reduce 29 (src line 152) + . reduce 30 (src line 160) state 38 @@ -327,114 +328,114 @@ state 38 CHAR shift 51 . error - int_spec goto 64 + int_spec goto 65 state 39 - type_specifier: FLOAT. (31) + type_specifier: FLOAT. (32) - . reduce 31 (src line 155) + . reduce 32 (src line 163) state 40 - type_specifier: DOUBLE. (32) + type_specifier: DOUBLE. (33) - . reduce 32 (src line 156) + . reduce 33 (src line 164) state 41 - type_specifier: BOOL. (33) + type_specifier: BOOL. (34) - . reduce 33 (src line 157) + . reduce 34 (src line 165) state 42 - type_specifier: STRING. (34) + type_specifier: STRING. (35) - . reduce 34 (src line 158) + . reduce 35 (src line 166) state 43 - type_specifier: OPAQUE. (35) + type_specifier: OPAQUE. (36) - . reduce 35 (src line 159) + . reduce 36 (src line 167) state 44 - type_specifier: enum_definition. (36) + type_specifier: enum_definition. (37) - . reduce 36 (src line 160) + . reduce 37 (src line 168) state 45 - type_specifier: struct_definition. (37) + type_specifier: struct_definition. (38) - . reduce 37 (src line 161) + . reduce 38 (src line 169) state 46 - type_specifier: union_definition. (38) + type_specifier: union_definition. (39) - . reduce 38 (src line 162) + . reduce 39 (src line 170) state 47 - type_specifier: IDENTIFIER. (39) + type_specifier: IDENTIFIER. (40) - . reduce 39 (src line 163) + . reduce 40 (src line 171) state 48 - int_spec: HYPER. (40) + int_spec: HYPER. (41) - . reduce 40 (src line 166) + . reduce 41 (src line 174) state 49 - int_spec: INT. (41) + int_spec: INT. (42) - . reduce 41 (src line 168) + . reduce 42 (src line 176) state 50 - int_spec: SHORT. (42) + int_spec: SHORT. (43) - . reduce 42 (src line 169) + . reduce 43 (src line 177) state 51 - int_spec: CHAR. (43) + int_spec: CHAR. (44) - . reduce 43 (src line 170) + . reduce 44 (src line 178) state 52 - struct_definition: STRUCT struct_ident '{'.$$49 declaration_list '}' - $$49: . (49) + struct_definition: STRUCT struct_ident '{'.$$50 declaration_list '}' + $$50: . (50) - . reduce 49 (src line 194) + . reduce 50 (src line 202) - $$49 goto 65 + $$50 goto 66 state 53 - union_definition: UNION union_ident $$54.SWITCH '(' simple_declaration ')' '{' case_list '}' + union_definition: UNION union_ident $$55.SWITCH '(' simple_declaration ')' '{' case_list '}' - SWITCH shift 66 + SWITCH shift 67 . error state 54 program_definition: PROGRAM program_ident '{'.version_list '}' '=' value - VERSION shift 69 + VERSION shift 70 . error - version_list goto 67 - version goto 68 + version_list goto 68 + version goto 69 state 55 enum_definition: ENUM enum_ident '{' enum_value_list.'}' - '}' shift 70 + '}' shift 71 . error @@ -442,69 +443,77 @@ state 56 enum_value_list: enum_value. (13) enum_value_list: enum_value.',' enum_value_list - ',' shift 71 - . reduce 13 (src line 89) + ',' shift 72 + . reduce 13 (src line 90) state 57 enum_value: enum_value_ident. (15) enum_value: enum_value_ident.'=' value - '=' shift 72 - . reduce 15 (src line 94) + '=' shift 73 + . reduce 15 (src line 95) state 58 - enum_value_ident: IDENTIFIER. (18) + enum_value: METADATACOMMENT.enum_value_ident '=' value - . reduce 18 (src line 115) + IDENTIFIER shift 59 + . error + enum_value_ident goto 74 state 59 - const_definition: CONST const_ident '=' IDENTIFIER. (19) + enum_value_ident: IDENTIFIER. (19) - . reduce 19 (src line 122) + . reduce 19 (src line 123) state 60 - const_definition: CONST const_ident '=' CONSTANT. (20) + const_definition: CONST const_ident '=' IDENTIFIER. (20) - . reduce 20 (src line 124) + . reduce 20 (src line 130) state 61 - simple_declaration: type_specifier variable_ident. (28) + const_definition: CONST const_ident '=' CONSTANT. (21) + + . reduce 21 (src line 132) + + +state 62 + simple_declaration: type_specifier variable_ident. (29) fixed_array_declaration: type_specifier variable_ident.'[' value ']' variable_array_declaration: type_specifier variable_ident.'<' value '>' variable_array_declaration: type_specifier variable_ident.'<' '>' - '[' shift 73 - '<' shift 74 - . reduce 28 (src line 148) + '[' shift 75 + '<' shift 76 + . reduce 29 (src line 156) -state 62 - pointer_declaration: type_specifier '*'.variable_ident - - IDENTIFIER shift 63 - . error - - variable_ident goto 75 - state 63 - variable_ident: IDENTIFIER. (44) + pointer_declaration: type_specifier '*'.variable_ident - . reduce 44 (src line 173) + IDENTIFIER shift 64 + . error + variable_ident goto 77 state 64 - type_specifier: UNSIGNED int_spec. (30) + variable_ident: IDENTIFIER. (45) - . reduce 30 (src line 154) + . reduce 45 (src line 181) state 65 - struct_definition: STRUCT struct_ident '{' $$49.declaration_list '}' + type_specifier: UNSIGNED int_spec. (31) + + . reduce 31 (src line 162) + + +state 66 + struct_definition: STRUCT struct_ident '{' $$50.declaration_list '}' BOOL shift 41 DOUBLE shift 40 @@ -525,113 +534,121 @@ state 65 enum_definition goto 44 struct_definition goto 45 union_definition goto 46 - declaration goto 77 + declaration goto 79 simple_declaration goto 32 fixed_array_declaration goto 33 variable_array_declaration goto 34 pointer_declaration goto 35 type_specifier goto 36 int_spec goto 37 - declaration_list goto 76 - -state 66 - union_definition: UNION union_ident $$54 SWITCH.'(' simple_declaration ')' '{' case_list '}' - - '(' shift 78 - . error - + declaration_list goto 78 state 67 - program_definition: PROGRAM program_ident '{' version_list.'}' '=' value + union_definition: UNION union_ident $$55 SWITCH.'(' simple_declaration ')' '{' case_list '}' - '}' shift 79 + '(' shift 80 . error state 68 - version_list: version.';' - version_list: version.';' version_list + program_definition: PROGRAM program_ident '{' version_list.'}' '=' value - ';' shift 80 + '}' shift 81 . error state 69 - version: VERSION.version_ident '{' procedure_list '}' '=' value ';' + version_list: version.';' + version_list: version.';' version_list - IDENTIFIER shift 82 + ';' shift 82 . error - version_ident goto 81 state 70 - enum_definition: ENUM enum_ident '{' enum_value_list '}'. (12) + version: VERSION.version_ident '{' procedure_list '}' '=' value ';' - . reduce 12 (src line 85) - - -state 71 - enum_value_list: enum_value ','.enum_value_list - - IDENTIFIER shift 58 + IDENTIFIER shift 84 . error - enum_value_list goto 83 + version_ident goto 83 + +state 71 + enum_definition: ENUM enum_ident '{' enum_value_list '}'. (12) + + . reduce 12 (src line 86) + + +state 72 + enum_value_list: enum_value ','.enum_value_list + + IDENTIFIER shift 59 + METADATACOMMENT shift 58 + . error + + enum_value_list goto 85 enum_value goto 56 enum_value_ident goto 57 -state 72 +state 73 enum_value: enum_value_ident '='.value - IDENTIFIER shift 85 - CONSTANT shift 86 + IDENTIFIER shift 87 + CONSTANT shift 88 . error - value goto 84 - -state 73 - fixed_array_declaration: type_specifier variable_ident '['.value ']' - - IDENTIFIER shift 85 - CONSTANT shift 86 - . error - - value goto 87 + value goto 86 state 74 + enum_value: METADATACOMMENT enum_value_ident.'=' value + + '=' shift 89 + . error + + +state 75 + fixed_array_declaration: type_specifier variable_ident '['.value ']' + + IDENTIFIER shift 87 + CONSTANT shift 88 + . error + + value goto 90 + +state 76 variable_array_declaration: type_specifier variable_ident '<'.value '>' variable_array_declaration: type_specifier variable_ident '<'.'>' - IDENTIFIER shift 85 - CONSTANT shift 86 - '>' shift 89 - . error - - value goto 88 - -state 75 - pointer_declaration: type_specifier '*' variable_ident. (48) - - . reduce 48 (src line 190) - - -state 76 - struct_definition: STRUCT struct_ident '{' $$49 declaration_list.'}' - - '}' shift 90 + IDENTIFIER shift 87 + CONSTANT shift 88 + '>' shift 92 . error + value goto 91 state 77 - declaration_list: declaration.';' - declaration_list: declaration.';' declaration_list + pointer_declaration: type_specifier '*' variable_ident. (49) - ';' shift 91 - . error + . reduce 49 (src line 198) state 78 - union_definition: UNION union_ident $$54 SWITCH '('.simple_declaration ')' '{' case_list '}' + struct_definition: STRUCT struct_ident '{' $$50 declaration_list.'}' + + '}' shift 93 + . error + + +state 79 + declaration_list: declaration.';' + declaration_list: declaration.';' declaration_list + + ';' shift 94 + . error + + +state 80 + union_definition: UNION union_ident $$55 SWITCH '('.simple_declaration ')' '{' case_list '}' BOOL shift 41 DOUBLE shift 40 @@ -652,92 +669,101 @@ state 78 enum_definition goto 44 struct_definition goto 45 union_definition goto 46 - simple_declaration goto 92 - type_specifier goto 93 + simple_declaration goto 95 + type_specifier goto 96 int_spec goto 37 -state 79 +state 81 program_definition: PROGRAM program_ident '{' version_list '}'.'=' value - '=' shift 94 - . error - - -state 80 - version_list: version ';'. (65) - version_list: version ';'.version_list - - VERSION shift 69 - . reduce 65 (src line 233) - - version_list goto 95 - version goto 68 - -state 81 - version: VERSION version_ident.'{' procedure_list '}' '=' value ';' - - '{' shift 96 + '=' shift 97 . error state 82 - version_ident: IDENTIFIER. (68) + version_list: version ';'. (66) + version_list: version ';'.version_list - . reduce 68 (src line 242) + VERSION shift 70 + . reduce 66 (src line 241) + version_list goto 98 + version goto 69 state 83 - enum_value_list: enum_value ',' enum_value_list. (14) + version: VERSION version_ident.'{' procedure_list '}' '=' value ';' - . reduce 14 (src line 91) + '{' shift 99 + . error state 84 - enum_value: enum_value_ident '=' value. (16) + version_ident: IDENTIFIER. (69) - . reduce 16 (src line 102) + . reduce 69 (src line 250) state 85 - value: IDENTIFIER. (2) + enum_value_list: enum_value ',' enum_value_list. (14) - . reduce 2 (src line 66) + . reduce 14 (src line 92) state 86 - value: CONSTANT. (3) + enum_value: enum_value_ident '=' value. (17) - . reduce 3 (src line 68) + . reduce 17 (src line 110) state 87 - fixed_array_declaration: type_specifier variable_ident '[' value.']' + value: IDENTIFIER. (2) - ']' shift 97 - . error + . reduce 2 (src line 67) state 88 - variable_array_declaration: type_specifier variable_ident '<' value.'>' + value: CONSTANT. (3) - '>' shift 98 - . error + . reduce 3 (src line 69) state 89 - variable_array_declaration: type_specifier variable_ident '<' '>'. (47) + enum_value: METADATACOMMENT enum_value_ident '='.value - . reduce 47 (src line 183) + IDENTIFIER shift 87 + CONSTANT shift 88 + . error + value goto 100 state 90 - struct_definition: STRUCT struct_ident '{' $$49 declaration_list '}'. (50) + fixed_array_declaration: type_specifier variable_ident '[' value.']' - . reduce 50 (src line 195) + ']' shift 101 + . error state 91 - declaration_list: declaration ';'. (52) + variable_array_declaration: type_specifier variable_ident '<' value.'>' + + '>' shift 102 + . error + + +state 92 + variable_array_declaration: type_specifier variable_ident '<' '>'. (48) + + . reduce 48 (src line 191) + + +state 93 + struct_definition: STRUCT struct_ident '{' $$50 declaration_list '}'. (51) + + . reduce 51 (src line 203) + + +state 94 + declaration_list: declaration ';'. (53) declaration_list: declaration ';'.declaration_list BOOL shift 41 @@ -754,51 +780,51 @@ state 91 SHORT shift 50 CHAR shift 51 IDENTIFIER shift 47 - . reduce 52 (src line 202) + . reduce 53 (src line 210) enum_definition goto 44 struct_definition goto 45 union_definition goto 46 - declaration goto 77 + declaration goto 79 simple_declaration goto 32 fixed_array_declaration goto 33 variable_array_declaration goto 34 pointer_declaration goto 35 type_specifier goto 36 int_spec goto 37 - declaration_list goto 99 - -state 92 - union_definition: UNION union_ident $$54 SWITCH '(' simple_declaration.')' '{' case_list '}' - - ')' shift 100 - . error - - -state 93 - simple_declaration: type_specifier.variable_ident - - IDENTIFIER shift 63 - . error - - variable_ident goto 101 - -state 94 - program_definition: PROGRAM program_ident '{' version_list '}' '='.value - - IDENTIFIER shift 85 - CONSTANT shift 86 - . error - - value goto 102 + declaration_list goto 103 state 95 - version_list: version ';' version_list. (66) + union_definition: UNION union_ident $$55 SWITCH '(' simple_declaration.')' '{' case_list '}' - . reduce 66 (src line 235) + ')' shift 104 + . error state 96 + simple_declaration: type_specifier.variable_ident + + IDENTIFIER shift 64 + . error + + variable_ident goto 105 + +state 97 + program_definition: PROGRAM program_ident '{' version_list '}' '='.value + + IDENTIFIER shift 87 + CONSTANT shift 88 + . error + + value goto 106 + +state 98 + version_list: version ';' version_list. (67) + + . reduce 67 (src line 243) + + +state 99 version: VERSION version_ident '{'.procedure_list '}' '=' value ';' BOOL shift 41 @@ -820,90 +846,96 @@ state 96 enum_definition goto 44 struct_definition goto 45 union_definition goto 46 - type_specifier goto 105 + type_specifier goto 109 int_spec goto 37 - procedure_list goto 103 - procedure goto 104 - -state 97 - fixed_array_declaration: type_specifier variable_ident '[' value ']'. (45) - - . reduce 45 (src line 177) - - -state 98 - variable_array_declaration: type_specifier variable_ident '<' value '>'. (46) - - . reduce 46 (src line 181) - - -state 99 - declaration_list: declaration ';' declaration_list. (53) - - . reduce 53 (src line 204) - + procedure_list goto 107 + procedure goto 108 state 100 - union_definition: UNION union_ident $$54 SWITCH '(' simple_declaration ')'.'{' case_list '}' + enum_value: METADATACOMMENT enum_value_ident '=' value. (16) - '{' shift 106 - . error + . reduce 16 (src line 103) state 101 - simple_declaration: type_specifier variable_ident. (28) + fixed_array_declaration: type_specifier variable_ident '[' value ']'. (46) - . reduce 28 (src line 148) + . reduce 46 (src line 185) state 102 - program_definition: PROGRAM program_ident '{' version_list '}' '=' value. (63) + variable_array_declaration: type_specifier variable_ident '<' value '>'. (47) - . reduce 63 (src line 225) + . reduce 47 (src line 189) state 103 - version: VERSION version_ident '{' procedure_list.'}' '=' value ';' + declaration_list: declaration ';' declaration_list. (54) - '}' shift 107 - . error + . reduce 54 (src line 212) state 104 - procedure_list: procedure.';' - procedure_list: procedure.';' procedure_list + union_definition: UNION union_ident $$55 SWITCH '(' simple_declaration ')'.'{' case_list '}' - ';' shift 108 + '{' shift 110 . error state 105 - procedure: type_specifier.procedure_ident '(' type_specifier ')' '=' value ';' + simple_declaration: type_specifier variable_ident. (29) - IDENTIFIER shift 110 - . error + . reduce 29 (src line 156) - procedure_ident goto 109 state 106 - union_definition: UNION union_ident $$54 SWITCH '(' simple_declaration ')' '{'.case_list '}' + program_definition: PROGRAM program_ident '{' version_list '}' '=' value. (64) - CASE shift 113 - DEFAULT shift 114 - . error + . reduce 64 (src line 233) - case_list goto 111 - case goto 112 state 107 - version: VERSION version_ident '{' procedure_list '}'.'=' value ';' + version: VERSION version_ident '{' procedure_list.'}' '=' value ';' - '=' shift 115 + '}' shift 111 . error state 108 - procedure_list: procedure ';'. (69) + procedure_list: procedure.';' + procedure_list: procedure.';' procedure_list + + ';' shift 112 + . error + + +state 109 + procedure: type_specifier.procedure_ident '(' type_specifier ')' '=' value ';' + + IDENTIFIER shift 114 + . error + + procedure_ident goto 113 + +state 110 + union_definition: UNION union_ident $$55 SWITCH '(' simple_declaration ')' '{'.case_list '}' + + CASE shift 117 + DEFAULT shift 118 + . error + + case_list goto 115 + case goto 116 + +state 111 + version: VERSION version_ident '{' procedure_list '}'.'=' value ';' + + '=' shift 119 + . error + + +state 112 + procedure_list: procedure ';'. (70) procedure_list: procedure ';'.procedure_list BOOL shift 41 @@ -920,77 +952,77 @@ state 108 SHORT shift 50 CHAR shift 51 IDENTIFIER shift 47 - . reduce 69 (src line 246) + . reduce 70 (src line 254) enum_definition goto 44 struct_definition goto 45 union_definition goto 46 - type_specifier goto 105 + type_specifier goto 109 int_spec goto 37 - procedure_list goto 116 - procedure goto 104 + procedure_list goto 120 + procedure goto 108 -state 109 +state 113 procedure: type_specifier procedure_ident.'(' type_specifier ')' '=' value ';' - '(' shift 117 + '(' shift 121 . error -state 110 - procedure_ident: IDENTIFIER. (72) +state 114 + procedure_ident: IDENTIFIER. (73) - . reduce 72 (src line 255) + . reduce 73 (src line 263) -state 111 - union_definition: UNION union_ident $$54 SWITCH '(' simple_declaration ')' '{' case_list.'}' +state 115 + union_definition: UNION union_ident $$55 SWITCH '(' simple_declaration ')' '{' case_list.'}' - '}' shift 118 + '}' shift 122 . error -state 112 +state 116 case_list: case.';' case_list: case.';' case_list - ';' shift 119 + ';' shift 123 . error -state 113 - case: CASE.value $$59 ':' declaration - - IDENTIFIER shift 85 - CONSTANT shift 86 - . error - - value goto 120 - -state 114 - case: DEFAULT.$$61 ':' declaration - $$61: . (61) - - . reduce 61 (src line 222) - - $$61 goto 121 - -state 115 - version: VERSION version_ident '{' procedure_list '}' '='.value ';' - - IDENTIFIER shift 85 - CONSTANT shift 86 - . error - - value goto 122 - -state 116 - procedure_list: procedure ';' procedure_list. (70) - - . reduce 70 (src line 248) - - state 117 + case: CASE.value $$60 ':' declaration + + IDENTIFIER shift 87 + CONSTANT shift 88 + . error + + value goto 124 + +state 118 + case: DEFAULT.$$62 ':' declaration + $$62: . (62) + + . reduce 62 (src line 230) + + $$62 goto 125 + +state 119 + version: VERSION version_ident '{' procedure_list '}' '='.value ';' + + IDENTIFIER shift 87 + CONSTANT shift 88 + . error + + value goto 126 + +state 120 + procedure_list: procedure ';' procedure_list. (71) + + . reduce 71 (src line 256) + + +state 121 procedure: type_specifier procedure_ident '('.type_specifier ')' '=' value ';' BOOL shift 41 @@ -1012,113 +1044,70 @@ state 117 enum_definition goto 44 struct_definition goto 45 union_definition goto 46 - type_specifier goto 123 + type_specifier goto 127 int_spec goto 37 -state 118 - union_definition: UNION union_ident $$54 SWITCH '(' simple_declaration ')' '{' case_list '}'. (55) - - . reduce 55 (src line 208) - - -state 119 - case_list: case ';'. (57) - case_list: case ';'.case_list - - CASE shift 113 - DEFAULT shift 114 - . reduce 57 (src line 215) - - case_list goto 124 - case goto 112 - -state 120 - case: CASE value.$$59 ':' declaration - $$59: . (59) - - . reduce 59 (src line 220) - - $$59 goto 125 - -state 121 - case: DEFAULT $$61.':' declaration - - ':' shift 126 - . error - - state 122 - version: VERSION version_ident '{' procedure_list '}' '=' value.';' + union_definition: UNION union_ident $$55 SWITCH '(' simple_declaration ')' '{' case_list '}'. (56) - ';' shift 127 - . error + . reduce 56 (src line 216) state 123 - procedure: type_specifier procedure_ident '(' type_specifier.')' '=' value ';' + case_list: case ';'. (58) + case_list: case ';'.case_list - ')' shift 128 - . error + CASE shift 117 + DEFAULT shift 118 + . reduce 58 (src line 223) + case_list goto 128 + case goto 116 state 124 - case_list: case ';' case_list. (58) + case: CASE value.$$60 ':' declaration + $$60: . (60) - . reduce 58 (src line 217) + . reduce 60 (src line 228) + $$60 goto 129 state 125 - case: CASE value $$59.':' declaration + case: DEFAULT $$62.':' declaration - ':' shift 129 + ':' shift 130 . error state 126 - case: DEFAULT $$61 ':'.declaration + version: VERSION version_ident '{' procedure_list '}' '=' value.';' - BOOL shift 41 - DOUBLE shift 40 - ENUM shift 10 - FLOAT shift 39 - OPAQUE shift 43 - STRING shift 42 - STRUCT shift 13 - UNION shift 14 - UNSIGNED shift 38 - HYPER shift 48 - INT shift 49 - SHORT shift 50 - CHAR shift 51 - IDENTIFIER shift 47 + ';' shift 131 . error - enum_definition goto 44 - struct_definition goto 45 - union_definition goto 46 - declaration goto 130 - simple_declaration goto 32 - fixed_array_declaration goto 33 - variable_array_declaration goto 34 - pointer_declaration goto 35 - type_specifier goto 36 - int_spec goto 37 state 127 - version: VERSION version_ident '{' procedure_list '}' '=' value ';'. (67) + procedure: type_specifier procedure_ident '(' type_specifier.')' '=' value ';' - . reduce 67 (src line 238) + ')' shift 132 + . error state 128 - procedure: type_specifier procedure_ident '(' type_specifier ')'.'=' value ';' + case_list: case ';' case_list. (59) - '=' shift 131 - . error + . reduce 59 (src line 225) state 129 - case: CASE value $$59 ':'.declaration + case: CASE value $$60.':' declaration + + ':' shift 133 + . error + + +state 130 + case: DEFAULT $$62 ':'.declaration BOOL shift 41 DOUBLE shift 40 @@ -1139,7 +1128,7 @@ state 129 enum_definition goto 44 struct_definition goto 45 union_definition goto 46 - declaration goto 132 + declaration goto 134 simple_declaration goto 32 fixed_array_declaration goto 33 variable_array_declaration goto 34 @@ -1147,49 +1136,92 @@ state 129 type_specifier goto 36 int_spec goto 37 -state 130 - case: DEFAULT $$61 ':' declaration. (62) - - . reduce 62 (src line 222) - - state 131 - procedure: type_specifier procedure_ident '(' type_specifier ')' '='.value ';' + version: VERSION version_ident '{' procedure_list '}' '=' value ';'. (68) - IDENTIFIER shift 85 - CONSTANT shift 86 - . error + . reduce 68 (src line 246) - value goto 133 state 132 - case: CASE value $$59 ':' declaration. (60) + procedure: type_specifier procedure_ident '(' type_specifier ')'.'=' value ';' - . reduce 60 (src line 221) + '=' shift 135 + . error state 133 + case: CASE value $$60 ':'.declaration + + BOOL shift 41 + DOUBLE shift 40 + ENUM shift 10 + FLOAT shift 39 + OPAQUE shift 43 + STRING shift 42 + STRUCT shift 13 + UNION shift 14 + UNSIGNED shift 38 + HYPER shift 48 + INT shift 49 + SHORT shift 50 + CHAR shift 51 + IDENTIFIER shift 47 + . error + + enum_definition goto 44 + struct_definition goto 45 + union_definition goto 46 + declaration goto 136 + simple_declaration goto 32 + fixed_array_declaration goto 33 + variable_array_declaration goto 34 + pointer_declaration goto 35 + type_specifier goto 36 + int_spec goto 37 + +state 134 + case: DEFAULT $$62 ':' declaration. (63) + + . reduce 63 (src line 230) + + +state 135 + procedure: type_specifier procedure_ident '(' type_specifier ')' '='.value ';' + + IDENTIFIER shift 87 + CONSTANT shift 88 + . error + + value goto 137 + +state 136 + case: CASE value $$60 ':' declaration. (61) + + . reduce 61 (src line 229) + + +state 137 procedure: type_specifier procedure_ident '(' type_specifier ')' '=' value.';' - ';' shift 134 + ';' shift 138 . error -state 134 - procedure: type_specifier procedure_ident '(' type_specifier ')' '=' value ';'. (71) +state 138 + procedure: type_specifier procedure_ident '(' type_specifier ')' '=' value ';'. (72) - . reduce 71 (src line 251) + . reduce 72 (src line 259) -40 terminals, 41 nonterminals -73 grammar rules, 135/8000 states +41 terminals, 41 nonterminals +74 grammar rules, 139/8000 states 0 shift/reduce, 0 reduce/reduce conflicts reported 90 working sets used -memory: parser 155/120000 +memory: parser 157/120000 40 extra closures -212 shift entries, 1 exceptions -69 goto entries +218 shift entries, 1 exceptions +71 goto entries 62 entries saved by goto default -Optimizer space used: output 148/120000 -148 table entries, 0 zero -maximum spread: 40, maximum offset: 131 +Optimizer space used: output 153/120000 +153 table entries, 0 zero +maximum spread: 41, maximum offset: 135