Annotation of Gnu-Mach/mig/parser.c, revision 1.1.1.1

1.1       root        1: 
                      2: /*  A Bison parser, made from ../gnumach/mig/parser.y
                      3:  by  Bison version A2.5 (Andrew Consortium)
                      4:   */
                      5: 
                      6: #define YYBISON 1  /* Identify Bison output.  */
                      7: 
                      8: #define        sySkip  258
                      9: #define        syRoutine       259
                     10: #define        sySimpleRoutine 260
                     11: #define        sySimpleProcedure       261
                     12: #define        syProcedure     262
                     13: #define        syFunction      263
                     14: #define        sySubsystem     264
                     15: #define        syKernelUser    265
                     16: #define        syKernelServer  266
                     17: #define        syMsgOption     267
                     18: #define        syMsgSeqno      268
                     19: #define        syWaitTime      269
                     20: #define        syNoWaitTime    270
                     21: #define        syErrorProc     271
                     22: #define        syServerPrefix  272
                     23: #define        syUserPrefix    273
                     24: #define        syServerDemux   274
                     25: #define        syRCSId 275
                     26: #define        syImport        276
                     27: #define        syUImport       277
                     28: #define        sySImport       278
                     29: #define        syIn    279
                     30: #define        syOut   280
                     31: #define        syInOut 281
                     32: #define        syRequestPort   282
                     33: #define        syReplyPort     283
                     34: #define        sySReplyPort    284
                     35: #define        syUReplyPort    285
                     36: #define        syType  286
                     37: #define        syArray 287
                     38: #define        syStruct        288
                     39: #define        syOf    289
                     40: #define        syInTran        290
                     41: #define        syOutTran       291
                     42: #define        syDestructor    292
                     43: #define        syCType 293
                     44: #define        syCUserType     294
                     45: #define        syCServerType   295
                     46: #define        syCString       296
                     47: #define        syColon 297
                     48: #define        sySemi  298
                     49: #define        syComma 299
                     50: #define        syPlus  300
                     51: #define        syMinus 301
                     52: #define        syStar  302
                     53: #define        syDiv   303
                     54: #define        syLParen        304
                     55: #define        syRParen        305
                     56: #define        syEqual 306
                     57: #define        syCaret 307
                     58: #define        syTilde 308
                     59: #define        syLAngle        309
                     60: #define        syRAngle        310
                     61: #define        syLBrack        311
                     62: #define        syRBrack        312
                     63: #define        syBar   313
                     64: #define        syError 314
                     65: #define        syNumber        315
                     66: #define        sySymbolicType  316
                     67: #define        syIdentifier    317
                     68: #define        syString        318
                     69: #define        syQString       319
                     70: #define        syFileName      320
                     71: #define        syIPCFlag       321
                     72: 
                     73: #line 117 "../gnumach/mig/parser.y"
                     74: 
                     75: 
                     76: #include <stdio.h>
                     77: 
                     78: #include "error.h"
                     79: #include "lexxer.h"
                     80: #include "global.h"
                     81: #include "mig_string.h"
                     82: #include "type.h"
                     83: #include "routine.h"
                     84: #include "statement.h"
                     85: 
                     86: static const char *import_name(statement_kind_t sk);
                     87: 
                     88: void
                     89: yyerror(const char *s)
                     90: {
                     91:     error(s);
                     92: }
                     93: 
                     94: #line 138 "../gnumach/mig/parser.y"
                     95: typedef union
                     96: {
                     97:     u_int number;
                     98:     identifier_t identifier;
                     99:     const_string_t string;
                    100:     statement_kind_t statement_kind;
                    101:     ipc_type_t *type;
                    102:     struct
                    103:     {
                    104:        u_int innumber;         /* msgt_name value, when sending */
                    105:        const_string_t instr;
                    106:        u_int outnumber;        /* msgt_name value, when receiving */
                    107:        const_string_t outstr;
                    108:        u_int size;             /* 0 means there is no default size */
                    109:     } symtype;
                    110:     routine_t *routine;
                    111:     arg_kind_t direction;
                    112:     argument_t *argument;
                    113:     ipc_flags_t flag;
                    114: } YYSTYPE;
                    115: #include <stdio.h>
                    116: 
                    117: #ifndef __cplusplus
                    118: #ifndef __STDC__
                    119: #define const
                    120: #endif
                    121: #endif
                    122: 
                    123: 
                    124: 
                    125: #define        YYFINAL         213
                    126: #define        YYFLAG          -32768
                    127: #define        YYNTBASE        67
                    128: 
                    129: #define YYTRANSLATE(x) ((unsigned)(x) <= 321 ? yytranslate[x] : 112)
                    130: 
                    131: static const char yytranslate[] = {     0,
                    132:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    133:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    134:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    135:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    136:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    137:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    138:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    139:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    140:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    141:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    142:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    143:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    144:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    145:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    146:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    147:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    148:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    149:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    150:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    151:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    152:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    153:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    154:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    155:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    156:      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    157:      2,     2,     2,     2,     2,     1,     2,     3,     4,     5,
                    158:      6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
                    159:     16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
                    160:     26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
                    161:     36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
                    162:     46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
                    163:     56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
                    164:     66
                    165: };
                    166: 
                    167: #if YYDEBUG != 0
                    168: static const short yyprhs[] = {     0,
                    169:      0,     1,     4,     7,    10,    13,    16,    19,    22,    25,
                    170:     28,    31,    34,    38,    41,    44,    46,    49,    54,    56,
                    171:     57,    60,    62,    64,    66,    68,    72,    76,    78,    81,
                    172:     84,    87,    90,    94,    96,    98,   100,   104,   107,   111,
                    173:    113,   122,   131,   139,   144,   149,   154,   156,   158,   161,
                    174:    164,   167,   170,   172,   174,   181,   182,   186,   192,   194,
                    175:    196,   198,   202,   204,   209,   215,   223,   229,   235,   240,
                    176:    247,   251,   255,   259,   263,   265,   269,   271,   273,   275,
                    177:    277,   279,   283,   287,   291,   295,   300,   303,   307,   309,
                    178:    313,   318,   319,   321,   323,   325,   327,   329,   331,   333,
                    179:    335,   337,   339,   342,   345,   346,   347
                    180: };
                    181: 
                    182: static const short yyrhs[] = {    -1,
                    183:     67,    68,     0,    69,    43,     0,    76,    43,     0,    75,
                    184:     43,     0,    77,    43,     0,    78,    43,     0,    79,    43,
                    185:      0,    80,    43,     0,    84,    43,     0,    98,    43,     0,
                    186:      3,    43,     0,     3,    60,    43,     0,    81,    43,     0,
                    187:     83,    43,     0,    43,     0,     1,    43,     0,    70,    71,
                    188:     73,    74,     0,     9,     0,     0,    71,    72,     0,    10,
                    189:      0,    11,     0,    62,     0,    60,     0,   109,    12,    63,
                    190:      0,   109,    14,    63,     0,    15,     0,    16,    62,     0,
                    191:     17,    62,     0,    18,    62,     0,    19,    62,     0,   110,
                    192:     82,    65,     0,    21,     0,    22,     0,    23,     0,   111,
                    193:     20,    64,     0,    31,    85,     0,    62,    51,    86,     0,
                    194:     87,     0,    86,    35,    42,    62,    62,    49,    62,    50,
                    195:      0,    86,    36,    42,    62,    62,    49,    62,    50,     0,
                    196:     86,    37,    42,    62,    49,    62,    50,     0,    86,    38,
                    197:     42,    62,     0,    86,    39,    42,    62,     0,    86,    40,
                    198:     42,    62,     0,    88,     0,    92,     0,    93,    87,     0,
                    199:     94,    87,     0,    52,    87,     0,    95,    87,     0,    96,
                    200:      0,    91,     0,    49,    91,    44,    97,    89,    50,     0,
                    201:      0,    89,    44,    66,     0,    89,    44,    66,    56,    57,
                    202:      0,    60,     0,    61,     0,    90,     0,    90,    58,    90,
                    203:      0,    62,     0,    32,    56,    57,    34,     0,    32,    56,
                    204:     47,    57,    34,     0,    32,    56,    47,    42,    97,    57,
                    205:     34,     0,    32,    56,    97,    57,    34,     0,    33,    56,
                    206:     97,    57,    34,     0,    41,    56,    97,    57,     0,    41,
                    207:     56,    47,    42,    97,    57,     0,    97,    45,    97,     0,
                    208:     97,    46,    97,     0,    97,    47,    97,     0,    97,    48,
                    209:     97,     0,    60,     0,    49,    97,    50,     0,    99,     0,
                    210:    100,     0,   101,     0,   102,     0,   103,     0,     4,    62,
                    211:    104,     0,     5,    62,   104,     0,     7,    62,   104,     0,
                    212:      6,    62,   104,     0,     8,    62,   104,   108,     0,    49,
                    213:     50,     0,    49,   105,    50,     0,   106,     0,   106,    43,
                    214:    105,     0,   107,    62,   108,    89,     0,     0,    24,     0,
                    215:     25,     0,    26,     0,    27,     0,    28,     0,    29,     0,
                    216:     30,     0,    14,     0,    12,     0,    13,     0,    42,    62,
                    217:      0,    42,    85,     0,     0,     0,     0
                    218: };
                    219: 
                    220: #endif
                    221: 
                    222: #if YYDEBUG != 0
                    223: static const short yyrline[] = { 0,
                    224:    161,   162,   165,   166,   167,   168,   169,   170,   171,   172,
                    225:    173,   183,   185,   187,   188,   189,   190,   194,   207,   219,
                    226:    220,   223,   229,   237,   240,   243,   260,   266,   274,   282,
                    227:    290,   298,   306,   317,   318,   319,   322,   332,   342,   346,
                    228:    348,   368,   388,   403,   417,   426,   438,   440,   442,   444,
                    229:    446,   448,   450,   454,   460,   469,   471,   478,   487,   493,
                    230:    497,   499,   523,   527,   529,   531,   536,   540,   544,   546,
                    231:    551,   553,   555,   557,   559,   561,   566,   567,   568,   569,
                    232:    570,   573,   577,   581,   585,   589,   593,   595,   600,   602,
                    233:    609,   619,   620,   621,   622,   623,   624,   625,   626,   627,
                    234:    628,   629,   632,   638,   642,   646,   650
                    235: };
                    236: #endif
                    237: 
                    238: 
                    239: #if YYDEBUG != 0
                    240: 
                    241: static const char * const yytname[] = {   "$","error","$undefined.","sySkip",
                    242: "syRoutine","sySimpleRoutine","sySimpleProcedure","syProcedure","syFunction",
                    243: "sySubsystem","syKernelUser","syKernelServer","syMsgOption","syMsgSeqno","syWaitTime",
                    244: "syNoWaitTime","syErrorProc","syServerPrefix","syUserPrefix","syServerDemux",
                    245: "syRCSId","syImport","syUImport","sySImport","syIn","syOut","syInOut","syRequestPort",
                    246: "syReplyPort","sySReplyPort","syUReplyPort","syType","syArray","syStruct","syOf",
                    247: "syInTran","syOutTran","syDestructor","syCType","syCUserType","syCServerType",
                    248: "syCString","syColon","sySemi","syComma","syPlus","syMinus","syStar","syDiv",
                    249: "syLParen","syRParen","syEqual","syCaret","syTilde","syLAngle","syRAngle","syLBrack",
                    250: "syRBrack","syBar","syError","syNumber","sySymbolicType","syIdentifier","syString",
                    251: "syQString","syFileName","syIPCFlag","Statements","Statement","Subsystem","SubsystemStart",
                    252: "SubsystemMods","SubsystemMod","SubsystemName","SubsystemBase","MsgOption","WaitTime",
                    253: "Error","ServerPrefix","UserPrefix","ServerDemux","Import","ImportIndicant",
                    254: "RCSDecl","TypeDecl","NamedTypeSpec","TransTypeSpec","TypeSpec","BasicTypeSpec",
                    255: "IPCFlags","PrimIPCType","IPCType","PrevTypeSpec","VarArrayHead","ArrayHead",
                    256: "StructHead","CStringSpec","IntExp","RoutineDecl","Routine","SimpleRoutine",
                    257: "Procedure","SimpleProcedure","Function","Arguments","ArgumentList","Argument",
                    258: "Direction","ArgumentType","LookString","LookFileName","LookQString", NULL
                    259: };
                    260: #endif
                    261: 
                    262: static const short yyr1[] = {     0,
                    263:     67,    67,    68,    68,    68,    68,    68,    68,    68,    68,
                    264:     68,    68,    68,    68,    68,    68,    68,    69,    70,    71,
                    265:     71,    72,    72,    73,    74,    75,    76,    76,    77,    78,
                    266:     79,    80,    81,    82,    82,    82,    83,    84,    85,    86,
                    267:     86,    86,    86,    86,    86,    86,    87,    87,    87,    87,
                    268:     87,    87,    87,    88,    88,    89,    89,    89,    90,    90,
                    269:     91,    91,    92,    93,    93,    93,    94,    95,    96,    96,
                    270:     97,    97,    97,    97,    97,    97,    98,    98,    98,    98,
                    271:     98,    99,   100,   101,   102,   103,   104,   104,   105,   105,
                    272:    106,   107,   107,   107,   107,   107,   107,   107,   107,   107,
                    273:    107,   107,   108,   108,   109,   110,   111
                    274: };
                    275: 
                    276: static const short yyr2[] = {     0,
                    277:      0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
                    278:      2,     2,     3,     2,     2,     1,     2,     4,     1,     0,
                    279:      2,     1,     1,     1,     1,     3,     3,     1,     2,     2,
                    280:      2,     2,     3,     1,     1,     1,     3,     2,     3,     1,
                    281:      8,     8,     7,     4,     4,     4,     1,     1,     2,     2,
                    282:      2,     2,     1,     1,     6,     0,     3,     5,     1,     1,
                    283:      1,     3,     1,     4,     5,     7,     5,     5,     4,     6,
                    284:      3,     3,     3,     3,     1,     3,     1,     1,     1,     1,
                    285:      1,     3,     3,     3,     3,     4,     2,     3,     1,     3,
                    286:      4,     0,     1,     1,     1,     1,     1,     1,     1,     1,
                    287:      1,     1,     2,     2,     0,     0,     0
                    288: };
                    289: 
                    290: static const short yydefact[] = {     1,
                    291:      0,     0,     0,     0,     0,     0,     0,     0,    19,    28,
                    292:      0,     0,     0,     0,     0,    16,     2,     0,    20,     0,
                    293:      0,     0,     0,     0,     0,     0,     0,     0,     0,    77,
                    294:     78,    79,    80,    81,     0,     0,     0,    17,    12,     0,
                    295:      0,     0,     0,     0,     0,    29,    30,    31,    32,     0,
                    296:     38,     3,     0,     5,     4,     6,     7,     8,     9,    14,
                    297:     15,    10,    11,     0,     0,    34,    35,    36,     0,     0,
                    298:     13,    92,    82,    83,    85,    84,     0,     0,    22,    23,
                    299:     24,    21,     0,    26,    27,    33,    37,   101,   102,   100,
                    300:     93,    94,    95,    96,    97,    98,    99,    87,     0,    89,
                    301:      0,     0,    86,     0,     0,     0,     0,     0,    59,    60,
                    302:     63,    39,    40,    47,    61,    54,    48,     0,     0,     0,
                    303:     53,    25,    18,    88,    92,     0,   103,   104,     0,     0,
                    304:      0,     0,    51,     0,     0,     0,     0,     0,     0,     0,
                    305:     49,    50,    52,    90,    56,     0,     0,     0,    75,     0,
                    306:      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
                    307:     62,    91,     0,     0,     0,    64,     0,     0,     0,     0,
                    308:      0,     0,     0,    69,    56,     0,     0,     0,    44,    45,
                    309:     46,     0,     0,    65,    76,    71,    72,    73,    74,    67,
                    310:     68,     0,     0,     0,     0,     0,    57,     0,    70,    55,
                    311:      0,     0,     0,     0,    66,     0,     0,    43,    58,    41,
                    312:     42,     0,     0
                    313: };
                    314: 
                    315: static const short yydefgoto[] = {     1,
                    316:     17,    18,    19,    53,    82,    83,   123,    20,    21,    22,
                    317:     23,    24,    25,    26,    69,    27,    28,    51,   112,   113,
                    318:    114,   162,   115,   116,   117,   118,   119,   120,   121,   150,
                    319:     29,    30,    31,    32,    33,    34,    73,    99,   100,   101,
                    320:    103,    35,    36,    37
                    321: };
                    322: 
                    323: static const short yypact[] = {-32768,
                    324:      2,    -5,   -31,   -16,    27,    28,    30,    33,-32768,-32768,
                    325:     35,    49,    71,    72,    89,-32768,-32768,     6,-32768,    60,
                    326:     67,   107,   109,   110,   111,   112,   113,   114,   115,-32768,
                    327: -32768,-32768,-32768,-32768,    56,     9,    51,-32768,-32768,   116,
                    328:    117,   117,   117,   117,   117,-32768,-32768,-32768,-32768,   118,
                    329: -32768,-32768,   -10,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
                    330: -32768,-32768,-32768,    98,    99,-32768,-32768,-32768,    95,   100,
                    331: -32768,    48,-32768,-32768,-32768,-32768,   121,    47,-32768,-32768,
                    332: -32768,-32768,   105,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
                    333: -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   120,   124,
                    334:    106,   119,-32768,   122,   123,   126,    -7,    47,-32768,-32768,
                    335: -32768,   101,-32768,-32768,   125,-32768,-32768,    47,    47,    47,
                    336: -32768,-32768,-32768,-32768,    88,   121,   118,-32768,   -13,   -45,
                    337:    -12,   127,-32768,   130,   131,   132,   133,   134,   135,    -7,
                    338: -32768,-32768,-32768,-32768,-32768,   -29,   -45,   146,-32768,    -6,
                    339:     10,   142,    36,   -45,   128,   129,   136,   137,   138,   139,
                    340: -32768,   141,   -45,   152,    82,-32768,   -45,   -45,   -45,   -45,
                    341:    153,   154,   -45,-32768,    97,   140,   143,   144,-32768,-32768,
                    342: -32768,   145,    74,-32768,-32768,    39,    39,-32768,-32768,-32768,
                    343: -32768,    78,    41,   147,   148,   150,   151,   155,-32768,-32768,
                    344:    156,   157,   158,   149,-32768,   159,   160,-32768,-32768,-32768,
                    345: -32768,   192,-32768
                    346: };
                    347: 
                    348: static const short yypgoto[] = {-32768,
                    349: -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
                    350: -32768,-32768,-32768,-32768,-32768,-32768,-32768,    92,-32768,   -14,
                    351: -32768,    20,    63,   108,-32768,-32768,-32768,-32768,-32768,  -104,
                    352: -32768,-32768,-32768,-32768,-32768,-32768,   104,    79,-32768,-32768,
                    353:     87,-32768,-32768,-32768
                    354: };
                    355: 
                    356: 
                    357: #define        YYLAST          219
                    358: 
                    359: 
                    360: static const short yytable[] = {    79,
                    361:     80,   212,     2,   147,     3,     4,     5,     6,     7,     8,
                    362:      9,    39,   163,  -105,   149,  -105,    10,    11,    12,    13,
                    363:     14,  -107,  -106,  -106,  -106,   151,   153,   164,    40,    66,
                    364:     67,    68,    15,   146,   152,   147,   147,    38,   167,   168,
                    365:    169,   170,   165,   148,    16,    41,   149,   149,    52,   175,
                    366:    171,    81,   109,   110,   167,   168,   169,   170,   183,    88,
                    367:     89,    90,   186,   187,   188,   189,   172,    64,   192,    65,
                    368:     70,    91,    92,    93,    94,    95,    96,    97,   104,   105,
                    369:    167,   168,   169,   170,   182,   169,   170,   106,    42,    43,
                    370:    200,    44,   174,   133,    45,   107,    46,    98,   108,    88,
                    371:     89,    90,    54,   141,   142,   143,   109,   110,   111,    55,
                    372:     47,    91,    92,    93,    94,    95,    96,    97,   167,   168,
                    373:    169,   170,   167,   168,   169,   170,   167,   168,   169,   170,
                    374:    198,   185,    48,    49,   199,   134,   135,   136,   137,   138,
                    375:    139,   167,   168,   169,   170,    74,    75,    76,    77,    56,
                    376:     50,    57,    58,    59,    60,    61,    62,    63,    71,    86,
                    377:     84,    85,   102,    87,   122,    72,   125,   126,    78,   124,
                    378:    154,   155,   156,   157,   158,   159,   160,   129,   130,   166,
                    379:    127,   131,   140,   173,   182,   184,   190,   191,   205,   176,
                    380:    177,   213,   196,   128,   193,   201,   202,   178,   179,   180,
                    381:    181,   194,   161,   144,   195,   209,   204,   208,   210,   211,
                    382:    197,   203,   145,     0,   132,     0,     0,   206,   207
                    383: };
                    384: 
                    385: static const short yycheck[] = {    10,
                    386:     11,     0,     1,    49,     3,     4,     5,     6,     7,     8,
                    387:      9,    43,    42,    12,    60,    14,    15,    16,    17,    18,
                    388:     19,    20,    21,    22,    23,   130,   131,    57,    60,    21,
                    389:     22,    23,    31,    47,    47,    49,    49,    43,    45,    46,
                    390:     47,    48,   147,    57,    43,    62,    60,    60,    43,   154,
                    391:     57,    62,    60,    61,    45,    46,    47,    48,   163,    12,
                    392:     13,    14,   167,   168,   169,   170,    57,    12,   173,    14,
                    393:     20,    24,    25,    26,    27,    28,    29,    30,    32,    33,
                    394:     45,    46,    47,    48,    44,    47,    48,    41,    62,    62,
                    395:     50,    62,    57,   108,    62,    49,    62,    50,    52,    12,
                    396:     13,    14,    43,   118,   119,   120,    60,    61,    62,    43,
                    397:     62,    24,    25,    26,    27,    28,    29,    30,    45,    46,
                    398:     47,    48,    45,    46,    47,    48,    45,    46,    47,    48,
                    399:     57,    50,    62,    62,    57,    35,    36,    37,    38,    39,
                    400:     40,    45,    46,    47,    48,    42,    43,    44,    45,    43,
                    401:     62,    43,    43,    43,    43,    43,    43,    43,    43,    65,
                    402:     63,    63,    42,    64,    60,    49,    43,    62,    51,    50,
                    403:     44,    42,    42,    42,    42,    42,    42,    56,    56,    34,
                    404:     62,    56,    58,    42,    44,    34,    34,    34,    34,    62,
                    405:     62,     0,    49,   102,   175,    49,    49,    62,    62,    62,
                    406:     62,    62,   140,   125,    62,    57,    56,    50,    50,    50,
                    407:     66,    62,   126,    -1,   107,    -1,    -1,    62,    62
                    408: };
                    409: /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
                    410: #line 3 "/usr/share/bison.simple"
                    411: 
                    412: /* Skeleton output parser for bison,
                    413:    Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
                    414: 
                    415:    This program is free software; you can redistribute it and/or modify
                    416:    it under the terms of the GNU General Public License as published by
                    417:    the Free Software Foundation; either version 2, or (at your option)
                    418:    any later version.
                    419: 
                    420:    This program is distributed in the hope that it will be useful,
                    421:    but WITHOUT ANY WARRANTY; without even the implied warranty of
                    422:    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                    423:    GNU General Public License for more details.
                    424: 
                    425:    You should have received a copy of the GNU General Public License
                    426:    along with this program; if not, write to the Free Software
                    427:    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
                    428: 
                    429: /* As a special exception, when this file is copied by Bison into a
                    430:    Bison output file, you may use that output file without restriction.
                    431:    This special exception was added by the Free Software Foundation
                    432:    in version 1.24 of Bison.  */
                    433: 
                    434: #ifndef alloca
                    435: #ifdef __GNUC__
                    436: #define alloca __builtin_alloca
                    437: #else /* not GNU C.  */
                    438: #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
                    439: #include <alloca.h>
                    440: #else /* not sparc */
                    441: #if defined (MSDOS) && !defined (__TURBOC__)
                    442: #include <malloc.h>
                    443: #else /* not MSDOS, or __TURBOC__ */
                    444: #if defined(_AIX)
                    445: #include <malloc.h>
                    446:  #pragma alloca
                    447: #else /* not MSDOS, __TURBOC__, or _AIX */
                    448: #ifdef __hpux
                    449: #ifdef __cplusplus
                    450: extern "C" {
                    451: void *alloca (unsigned int);
                    452: };
                    453: #else /* not __cplusplus */
                    454: void *alloca ();
                    455: #endif /* not __cplusplus */
                    456: #endif /* __hpux */
                    457: #endif /* not _AIX */
                    458: #endif /* not MSDOS, or __TURBOC__ */
                    459: #endif /* not sparc.  */
                    460: #endif /* not GNU C.  */
                    461: #endif /* alloca not defined.  */
                    462: 
                    463: /* This is the parser code that is written into each bison parser
                    464:   when the %semantic_parser declaration is not specified in the grammar.
                    465:   It was written by Richard Stallman by simplifying the hairy parser
                    466:   used when %semantic_parser is specified.  */
                    467: 
                    468: /* Note: there must be only one dollar sign in this file.
                    469:    It is replaced by the list of actions, each action
                    470:    as one case of the switch.  */
                    471: 
                    472: #define yyerrok                (yyerrstatus = 0)
                    473: #define yyclearin      (yychar = YYEMPTY)
                    474: #define YYEMPTY                -2
                    475: #define YYEOF          0
                    476: #define YYACCEPT       return(0)
                    477: #define YYABORT        return(1)
                    478: #define YYERROR                goto yyerrlab1
                    479: /* Like YYERROR except do call yyerror.
                    480:    This remains here temporarily to ease the
                    481:    transition to the new meaning of YYERROR, for GCC.
                    482:    Once GCC version 2 has supplanted version 1, this can go.  */
                    483: #define YYFAIL         goto yyerrlab
                    484: #define YYRECOVERING()  (!!yyerrstatus)
                    485: #define YYBACKUP(token, value) \
                    486: do                                                             \
                    487:   if (yychar == YYEMPTY && yylen == 1)                         \
                    488:     { yychar = (token), yylval = (value);                      \
                    489:       yychar1 = YYTRANSLATE (yychar);                          \
                    490:       YYPOPSTACK;                                              \
                    491:       goto yybackup;                                           \
                    492:     }                                                          \
                    493:   else                                                         \
                    494:     { yyerror ("syntax error: cannot back up"); YYERROR; }     \
                    495: while (0)
                    496: 
                    497: #define YYTERROR       1
                    498: #define YYERRCODE      256
                    499: 
                    500: #ifndef YYPURE
                    501: #define YYLEX          yylex()
                    502: #endif
                    503: 
                    504: #ifdef YYPURE
                    505: #ifdef YYLSP_NEEDED
                    506: #ifdef YYLEX_PARAM
                    507: #define YYLEX          yylex(&yylval, &yylloc, YYLEX_PARAM)
                    508: #else
                    509: #define YYLEX          yylex(&yylval, &yylloc)
                    510: #endif
                    511: #else /* not YYLSP_NEEDED */
                    512: #ifdef YYLEX_PARAM
                    513: #define YYLEX          yylex(&yylval, YYLEX_PARAM)
                    514: #else
                    515: #define YYLEX          yylex(&yylval)
                    516: #endif
                    517: #endif /* not YYLSP_NEEDED */
                    518: #endif
                    519: 
                    520: /* If nonreentrant, generate the variables here */
                    521: 
                    522: #ifndef YYPURE
                    523: 
                    524: int    yychar;                 /*  the lookahead symbol                */
                    525: YYSTYPE        yylval;                 /*  the semantic value of the           */
                    526:                                /*  lookahead symbol                    */
                    527: 
                    528: #ifdef YYLSP_NEEDED
                    529: YYLTYPE yylloc;                        /*  location data for the lookahead     */
                    530:                                /*  symbol                              */
                    531: #endif
                    532: 
                    533: int yynerrs;                   /*  number of parse errors so far       */
                    534: #endif  /* not YYPURE */
                    535: 
                    536: #if YYDEBUG != 0
                    537: int yydebug;                   /*  nonzero means print parse trace     */
                    538: /* Since this is uninitialized, it does not stop multiple parsers
                    539:    from coexisting.  */
                    540: #endif
                    541: 
                    542: /*  YYINITDEPTH indicates the initial size of the parser's stacks      */
                    543: 
                    544: #ifndef        YYINITDEPTH
                    545: #define YYINITDEPTH 200
                    546: #endif
                    547: 
                    548: /*  YYMAXDEPTH is the maximum size the stacks can grow to
                    549:     (effective only if the built-in stack extension method is used).  */
                    550: 
                    551: #if YYMAXDEPTH == 0
                    552: #undef YYMAXDEPTH
                    553: #endif
                    554: 
                    555: #ifndef YYMAXDEPTH
                    556: #define YYMAXDEPTH 10000
                    557: #endif
                    558: 
                    559: /* Prevent warning if -Wstrict-prototypes.  */
                    560: #ifdef __GNUC__
                    561: int yyparse (void);
                    562: #endif
                    563: 
                    564: #if __GNUC__ > 1               /* GNU C and GNU C++ define this.  */
                    565: #define __yy_memcpy(FROM,TO,COUNT)     __builtin_memcpy(TO,FROM,COUNT)
                    566: #else                          /* not GNU C or C++ */
                    567: #ifndef __cplusplus
                    568: 
                    569: /* This is the most reliable way to avoid incompatibilities
                    570:    in available built-in functions on various systems.  */
                    571: static void
                    572: __yy_memcpy (from, to, count)
                    573:      char *from;
                    574:      char *to;
                    575:      int count;
                    576: {
                    577:   register char *f = from;
                    578:   register char *t = to;
                    579:   register int i = count;
                    580: 
                    581:   while (i-- > 0)
                    582:     *t++ = *f++;
                    583: }
                    584: 
                    585: #else /* __cplusplus */
                    586: 
                    587: /* This is the most reliable way to avoid incompatibilities
                    588:    in available built-in functions on various systems.  */
                    589: static void
                    590: __yy_memcpy (char *from, char *to, int count)
                    591: {
                    592:   register char *f = from;
                    593:   register char *t = to;
                    594:   register int i = count;
                    595: 
                    596:   while (i-- > 0)
                    597:     *t++ = *f++;
                    598: }
                    599: 
                    600: #endif
                    601: #endif
                    602: 
                    603: #line 192 "/usr/share/bison.simple"
                    604: 
                    605: /* The user can define YYPARSE_PARAM as the name of an argument to be passed
                    606:    into yyparse.  The argument should have type void *.
                    607:    It should actually point to an object.
                    608:    Grammar actions can access the variable by casting it
                    609:    to the proper pointer type.  */
                    610: 
                    611: #ifdef YYPARSE_PARAM
                    612: #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
                    613: #else
                    614: #define YYPARSE_PARAM
                    615: #define YYPARSE_PARAM_DECL
                    616: #endif
                    617: 
                    618: int
                    619: yyparse(YYPARSE_PARAM)
                    620:      YYPARSE_PARAM_DECL
                    621: {
                    622:   register int yystate;
                    623:   register int yyn;
                    624:   register short *yyssp;
                    625:   register YYSTYPE *yyvsp;
                    626:   int yyerrstatus;     /*  number of tokens to shift before error messages enabled */
                    627:   int yychar1 = 0;             /*  lookahead token as an internal (translated) token number */
                    628: 
                    629:   short        yyssa[YYINITDEPTH];     /*  the state stack                     */
                    630:   YYSTYPE yyvsa[YYINITDEPTH];  /*  the semantic value stack            */
                    631: 
                    632:   short *yyss = yyssa;         /*  refer to the stacks thru separate pointers */
                    633:   YYSTYPE *yyvs = yyvsa;       /*  to allow yyoverflow to reallocate them elsewhere */
                    634: 
                    635: #ifdef YYLSP_NEEDED
                    636:   YYLTYPE yylsa[YYINITDEPTH];  /*  the location stack                  */
                    637:   YYLTYPE *yyls = yylsa;
                    638:   YYLTYPE *yylsp;
                    639: 
                    640: #define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
                    641: #else
                    642: #define YYPOPSTACK   (yyvsp--, yyssp--)
                    643: #endif
                    644: 
                    645:   int yystacksize = YYINITDEPTH;
                    646: 
                    647: #ifdef YYPURE
                    648:   int yychar;
                    649:   YYSTYPE yylval;
                    650:   int yynerrs;
                    651: #ifdef YYLSP_NEEDED
                    652:   YYLTYPE yylloc;
                    653: #endif
                    654: #endif
                    655: 
                    656:   YYSTYPE yyval;               /*  the variable used to return         */
                    657:                                /*  semantic values from the action     */
                    658:                                /*  routines                            */
                    659: 
                    660:   int yylen;
                    661: 
                    662: #if YYDEBUG != 0
                    663:   if (yydebug)
                    664:     fprintf(stderr, "Starting parse\n");
                    665: #endif
                    666: 
                    667:   yystate = 0;
                    668:   yyerrstatus = 0;
                    669:   yynerrs = 0;
                    670:   yychar = YYEMPTY;            /* Cause a token to be read.  */
                    671: 
                    672:   /* Initialize stack pointers.
                    673:      Waste one element of value and location stack
                    674:      so that they stay on the same level as the state stack.
                    675:      The wasted elements are never initialized.  */
                    676: 
                    677:   yyssp = yyss - 1;
                    678:   yyvsp = yyvs;
                    679: #ifdef YYLSP_NEEDED
                    680:   yylsp = yyls;
                    681: #endif
                    682: 
                    683: /* Push a new state, which is found in  yystate  .  */
                    684: /* In all cases, when you get here, the value and location stacks
                    685:    have just been pushed. so pushing a state here evens the stacks.  */
                    686: yynewstate:
                    687: 
                    688:   *++yyssp = yystate;
                    689: 
                    690:   if (yyssp >= yyss + yystacksize - 1)
                    691:     {
                    692:       /* Give user a chance to reallocate the stack */
                    693:       /* Use copies of these so that the &'s don't force the real ones into memory. */
                    694:       YYSTYPE *yyvs1 = yyvs;
                    695:       short *yyss1 = yyss;
                    696: #ifdef YYLSP_NEEDED
                    697:       YYLTYPE *yyls1 = yyls;
                    698: #endif
                    699: 
                    700:       /* Get the current used size of the three stacks, in elements.  */
                    701:       int size = yyssp - yyss + 1;
                    702: 
                    703: #ifdef yyoverflow
                    704:       /* Each stack pointer address is followed by the size of
                    705:         the data in use in that stack, in bytes.  */
                    706: #ifdef YYLSP_NEEDED
                    707:       /* This used to be a conditional around just the two extra args,
                    708:         but that might be undefined if yyoverflow is a macro.  */
                    709:       yyoverflow("parser stack overflow",
                    710:                 &yyss1, size * sizeof (*yyssp),
                    711:                 &yyvs1, size * sizeof (*yyvsp),
                    712:                 &yyls1, size * sizeof (*yylsp),
                    713:                 &yystacksize);
                    714: #else
                    715:       yyoverflow("parser stack overflow",
                    716:                 &yyss1, size * sizeof (*yyssp),
                    717:                 &yyvs1, size * sizeof (*yyvsp),
                    718:                 &yystacksize);
                    719: #endif
                    720: 
                    721:       yyss = yyss1; yyvs = yyvs1;
                    722: #ifdef YYLSP_NEEDED
                    723:       yyls = yyls1;
                    724: #endif
                    725: #else /* no yyoverflow */
                    726:       /* Extend the stack our own way.  */
                    727:       if (yystacksize >= YYMAXDEPTH)
                    728:        {
                    729:          yyerror("parser stack overflow");
                    730:          return 2;
                    731:        }
                    732:       yystacksize *= 2;
                    733:       if (yystacksize > YYMAXDEPTH)
                    734:        yystacksize = YYMAXDEPTH;
                    735:       yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
                    736:       __yy_memcpy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
                    737:       yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
                    738:       __yy_memcpy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
                    739: #ifdef YYLSP_NEEDED
                    740:       yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
                    741:       __yy_memcpy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
                    742: #endif
                    743: #endif /* no yyoverflow */
                    744: 
                    745:       yyssp = yyss + size - 1;
                    746:       yyvsp = yyvs + size - 1;
                    747: #ifdef YYLSP_NEEDED
                    748:       yylsp = yyls + size - 1;
                    749: #endif
                    750: 
                    751: #if YYDEBUG != 0
                    752:       if (yydebug)
                    753:        fprintf(stderr, "Stack size increased to %d\n", yystacksize);
                    754: #endif
                    755: 
                    756:       if (yyssp >= yyss + yystacksize - 1)
                    757:        YYABORT;
                    758:     }
                    759: 
                    760: #if YYDEBUG != 0
                    761:   if (yydebug)
                    762:     fprintf(stderr, "Entering state %d\n", yystate);
                    763: #endif
                    764: 
                    765:   goto yybackup;
                    766:  yybackup:
                    767: 
                    768: /* Do appropriate processing given the current state.  */
                    769: /* Read a lookahead token if we need one and don't already have one.  */
                    770: /* yyresume: */
                    771: 
                    772:   /* First try to decide what to do without reference to lookahead token.  */
                    773: 
                    774:   yyn = yypact[yystate];
                    775:   if (yyn == YYFLAG)
                    776:     goto yydefault;
                    777: 
                    778:   /* Not known => get a lookahead token if don't already have one.  */
                    779: 
                    780:   /* yychar is either YYEMPTY or YYEOF
                    781:      or a valid token in external form.  */
                    782: 
                    783:   if (yychar == YYEMPTY)
                    784:     {
                    785: #if YYDEBUG != 0
                    786:       if (yydebug)
                    787:        fprintf(stderr, "Reading a token: ");
                    788: #endif
                    789:       yychar = YYLEX;
                    790:     }
                    791: 
                    792:   /* Convert token to internal form (in yychar1) for indexing tables with */
                    793: 
                    794:   if (yychar <= 0)             /* This means end of input. */
                    795:     {
                    796:       yychar1 = 0;
                    797:       yychar = YYEOF;          /* Don't call YYLEX any more */
                    798: 
                    799: #if YYDEBUG != 0
                    800:       if (yydebug)
                    801:        fprintf(stderr, "Now at end of input.\n");
                    802: #endif
                    803:     }
                    804:   else
                    805:     {
                    806:       yychar1 = YYTRANSLATE(yychar);
                    807: 
                    808: #if YYDEBUG != 0
                    809:       if (yydebug)
                    810:        {
                    811:          fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
                    812:          /* Give the individual parser a way to print the precise meaning
                    813:             of a token, for further debugging info.  */
                    814: #ifdef YYPRINT
                    815:          YYPRINT (stderr, yychar, yylval);
                    816: #endif
                    817:          fprintf (stderr, ")\n");
                    818:        }
                    819: #endif
                    820:     }
                    821: 
                    822:   yyn += yychar1;
                    823:   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
                    824:     goto yydefault;
                    825: 
                    826:   yyn = yytable[yyn];
                    827: 
                    828:   /* yyn is what to do for this token type in this state.
                    829:      Negative => reduce, -yyn is rule number.
                    830:      Positive => shift, yyn is new state.
                    831:        New state is final state => don't bother to shift,
                    832:        just return success.
                    833:      0, or most negative number => error.  */
                    834: 
                    835:   if (yyn < 0)
                    836:     {
                    837:       if (yyn == YYFLAG)
                    838:        goto yyerrlab;
                    839:       yyn = -yyn;
                    840:       goto yyreduce;
                    841:     }
                    842:   else if (yyn == 0)
                    843:     goto yyerrlab;
                    844: 
                    845:   if (yyn == YYFINAL)
                    846:     YYACCEPT;
                    847: 
                    848:   /* Shift the lookahead token.  */
                    849: 
                    850: #if YYDEBUG != 0
                    851:   if (yydebug)
                    852:     fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
                    853: #endif
                    854: 
                    855:   /* Discard the token being shifted unless it is eof.  */
                    856:   if (yychar != YYEOF)
                    857:     yychar = YYEMPTY;
                    858: 
                    859:   *++yyvsp = yylval;
                    860: #ifdef YYLSP_NEEDED
                    861:   *++yylsp = yylloc;
                    862: #endif
                    863: 
                    864:   /* count tokens shifted since error; after three, turn off error status.  */
                    865:   if (yyerrstatus) yyerrstatus--;
                    866: 
                    867:   yystate = yyn;
                    868:   goto yynewstate;
                    869: 
                    870: /* Do the default action for the current state.  */
                    871: yydefault:
                    872: 
                    873:   yyn = yydefact[yystate];
                    874:   if (yyn == 0)
                    875:     goto yyerrlab;
                    876: 
                    877: /* Do a reduction.  yyn is the number of a rule to reduce with.  */
                    878: yyreduce:
                    879:   yylen = yyr2[yyn];
                    880:   if (yylen > 0)
                    881:     yyval = yyvsp[1-yylen]; /* implement default value of the action */
                    882: 
                    883: #if YYDEBUG != 0
                    884:   if (yydebug)
                    885:     {
                    886:       int i;
                    887: 
                    888:       fprintf (stderr, "Reducing via rule %d (line %d), ",
                    889:               yyn, yyrline[yyn]);
                    890: 
                    891:       /* Print the symbols being reduced, and their result.  */
                    892:       for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
                    893:        fprintf (stderr, "%s ", yytname[yyrhs[i]]);
                    894:       fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
                    895:     }
                    896: #endif
                    897: 
                    898: 
                    899:   switch (yyn) {
                    900: 
                    901: case 11:
                    902: #line 174 "../gnumach/mig/parser.y"
                    903: {
                    904:     register statement_t *st = stAlloc();
                    905: 
                    906:     st->stKind = skRoutine;
                    907:     st->stRoutine = yyvsp[-1].routine;
                    908:     rtCheckRoutine(yyvsp[-1].routine);
                    909:     if (BeVerbose)
                    910:        rtPrintRoutine(yyvsp[-1].routine);
                    911: ;
                    912:     break;}
                    913: case 12:
                    914: #line 184 "../gnumach/mig/parser.y"
                    915: { rtSkip(1); ;
                    916:     break;}
                    917: case 13:
                    918: #line 186 "../gnumach/mig/parser.y"
                    919: { rtSkip(yyvsp[-1].number); ;
                    920:     break;}
                    921: case 17:
                    922: #line 191 "../gnumach/mig/parser.y"
                    923: { yyerrok; ;
                    924:     break;}
                    925: case 18:
                    926: #line 196 "../gnumach/mig/parser.y"
                    927: {
                    928:     if (BeVerbose)
                    929:     {
                    930:        printf("Subsystem %s: base = %u%s%s\n\n",
                    931:               SubsystemName, SubsystemBase,
                    932:               IsKernelUser ? ", KernelUser" : "",
                    933:               IsKernelServer ? ", KernelServer" : "");
                    934:     }
                    935: ;
                    936:     break;}
                    937: case 19:
                    938: #line 208 "../gnumach/mig/parser.y"
                    939: {
                    940:     if (SubsystemName != strNULL)
                    941:     {
                    942:        warn("previous Subsystem decl (of %s) will be ignored", SubsystemName);
                    943:        IsKernelUser = FALSE;
                    944:        IsKernelServer = FALSE;
                    945:        strfree((string_t) SubsystemName);
                    946:     }
                    947: ;
                    948:     break;}
                    949: case 22:
                    950: #line 224 "../gnumach/mig/parser.y"
                    951: {
                    952:     if (IsKernelUser)
                    953:        warn("duplicate KernelUser keyword");
                    954:     IsKernelUser = TRUE;
                    955: ;
                    956:     break;}
                    957: case 23:
                    958: #line 230 "../gnumach/mig/parser.y"
                    959: {
                    960:     if (IsKernelServer)
                    961:        warn("duplicate KernelServer keyword");
                    962:     IsKernelServer = TRUE;
                    963: ;
                    964:     break;}
                    965: case 24:
                    966: #line 237 "../gnumach/mig/parser.y"
                    967: { SubsystemName = yyvsp[0].identifier; ;
                    968:     break;}
                    969: case 25:
                    970: #line 240 "../gnumach/mig/parser.y"
                    971: { SubsystemBase = yyvsp[0].number; ;
                    972:     break;}
                    973: case 26:
                    974: #line 244 "../gnumach/mig/parser.y"
                    975: {
                    976:     if (streql(yyvsp[0].string, "MACH_MSG_OPTION_NONE"))
                    977:     {
                    978:        MsgOption = strNULL;
                    979:        if (BeVerbose)
                    980:            printf("MsgOption: canceled\n\n");
                    981:     }
                    982:     else
                    983:     {
                    984:        MsgOption = yyvsp[0].string;
                    985:        if (BeVerbose)
                    986:            printf("MsgOption %s\n\n",yyvsp[0].string);
                    987:     }
                    988: ;
                    989:     break;}
                    990: case 27:
                    991: #line 261 "../gnumach/mig/parser.y"
                    992: {
                    993:     WaitTime = yyvsp[0].string;
                    994:     if (BeVerbose)
                    995:        printf("WaitTime %s\n\n", WaitTime);
                    996: ;
                    997:     break;}
                    998: case 28:
                    999: #line 267 "../gnumach/mig/parser.y"
                   1000: {
                   1001:     WaitTime = strNULL;
                   1002:     if (BeVerbose)
                   1003:        printf("NoWaitTime\n\n");
                   1004: ;
                   1005:     break;}
                   1006: case 29:
                   1007: #line 275 "../gnumach/mig/parser.y"
                   1008: {
                   1009:     ErrorProc = yyvsp[0].identifier;
                   1010:     if (BeVerbose)
                   1011:        printf("ErrorProc %s\n\n", ErrorProc);
                   1012: ;
                   1013:     break;}
                   1014: case 30:
                   1015: #line 283 "../gnumach/mig/parser.y"
                   1016: {
                   1017:     ServerPrefix = yyvsp[0].identifier;
                   1018:     if (BeVerbose)
                   1019:        printf("ServerPrefix %s\n\n", ServerPrefix);
                   1020: ;
                   1021:     break;}
                   1022: case 31:
                   1023: #line 291 "../gnumach/mig/parser.y"
                   1024: {
                   1025:     UserPrefix = yyvsp[0].identifier;
                   1026:     if (BeVerbose)
                   1027:        printf("UserPrefix %s\n\n", UserPrefix);
                   1028: ;
                   1029:     break;}
                   1030: case 32:
                   1031: #line 299 "../gnumach/mig/parser.y"
                   1032: {
                   1033:     ServerDemux = yyvsp[0].identifier;
                   1034:     if (BeVerbose)
                   1035:        printf("ServerDemux %s\n\n", ServerDemux);
                   1036: ;
                   1037:     break;}
                   1038: case 33:
                   1039: #line 307 "../gnumach/mig/parser.y"
                   1040: {
                   1041:     register statement_t *st = stAlloc();
                   1042:     st->stKind = yyvsp[-1].statement_kind;
                   1043:     st->stFileName = yyvsp[0].string;
                   1044: 
                   1045:     if (BeVerbose)
                   1046:        printf("%s %s\n\n", import_name(yyvsp[-1].statement_kind), yyvsp[0].string);
                   1047: ;
                   1048:     break;}
                   1049: case 34:
                   1050: #line 317 "../gnumach/mig/parser.y"
                   1051: { yyval.statement_kind = skImport; ;
                   1052:     break;}
                   1053: case 35:
                   1054: #line 318 "../gnumach/mig/parser.y"
                   1055: { yyval.statement_kind = skUImport; ;
                   1056:     break;}
                   1057: case 36:
                   1058: #line 319 "../gnumach/mig/parser.y"
                   1059: { yyval.statement_kind = skSImport; ;
                   1060:     break;}
                   1061: case 37:
                   1062: #line 323 "../gnumach/mig/parser.y"
                   1063: {
                   1064:     if (RCSId != strNULL)
                   1065:        warn("previous RCS decl will be ignored");
                   1066:     if (BeVerbose)
                   1067:        printf("RCSId %s\n\n", yyvsp[0].string);
                   1068:     RCSId = yyvsp[0].string;
                   1069: ;
                   1070:     break;}
                   1071: case 38:
                   1072: #line 333 "../gnumach/mig/parser.y"
                   1073: {
                   1074:     register identifier_t name = yyvsp[0].type->itName;
                   1075: 
                   1076:     if (itLookUp(name) != itNULL)
                   1077:        warn("overriding previous definition of %s", name);
                   1078:     itInsert(name, yyvsp[0].type);
                   1079: ;
                   1080:     break;}
                   1081: case 39:
                   1082: #line 343 "../gnumach/mig/parser.y"
                   1083: { itTypeDecl(yyvsp[-2].identifier, yyval.type = yyvsp[0].type); ;
                   1084:     break;}
                   1085: case 40:
                   1086: #line 347 "../gnumach/mig/parser.y"
                   1087: { yyval.type = itResetType(yyvsp[0].type); ;
                   1088:     break;}
                   1089: case 41:
                   1090: #line 350 "../gnumach/mig/parser.y"
                   1091: {
                   1092:     yyval.type = yyvsp[-7].type;
                   1093: 
                   1094:     if ((yyval.type->itTransType != strNULL) && !streql(yyval.type->itTransType, yyvsp[-4].identifier))
                   1095:        warn("conflicting translation types (%s, %s)",
                   1096:             yyval.type->itTransType, yyvsp[-4].identifier);
                   1097:     yyval.type->itTransType = yyvsp[-4].identifier;
                   1098: 
                   1099:     if ((yyval.type->itInTrans != strNULL) && !streql(yyval.type->itInTrans, yyvsp[-3].identifier))
                   1100:        warn("conflicting in-translation functions (%s, %s)",
                   1101:             yyval.type->itInTrans, yyvsp[-3].identifier);
                   1102:     yyval.type->itInTrans = yyvsp[-3].identifier;
                   1103: 
                   1104:     if ((yyval.type->itServerType != strNULL) && !streql(yyval.type->itServerType, yyvsp[-1].identifier))
                   1105:        warn("conflicting server types (%s, %s)",
                   1106:             yyval.type->itServerType, yyvsp[-1].identifier);
                   1107:     yyval.type->itServerType = yyvsp[-1].identifier;
                   1108: ;
                   1109:     break;}
                   1110: case 42:
                   1111: #line 370 "../gnumach/mig/parser.y"
                   1112: {
                   1113:     yyval.type = yyvsp[-7].type;
                   1114: 
                   1115:     if ((yyval.type->itServerType != strNULL) && !streql(yyval.type->itServerType, yyvsp[-4].identifier))
                   1116:        warn("conflicting server types (%s, %s)",
                   1117:             yyval.type->itServerType, yyvsp[-4].identifier);
                   1118:     yyval.type->itServerType = yyvsp[-4].identifier;
                   1119: 
                   1120:     if ((yyval.type->itOutTrans != strNULL) && !streql(yyval.type->itOutTrans, yyvsp[-3].identifier))
                   1121:        warn("conflicting out-translation functions (%s, %s)",
                   1122:             yyval.type->itOutTrans, yyvsp[-3].identifier);
                   1123:     yyval.type->itOutTrans = yyvsp[-3].identifier;
                   1124: 
                   1125:     if ((yyval.type->itTransType != strNULL) && !streql(yyval.type->itTransType, yyvsp[-1].identifier))
                   1126:        warn("conflicting translation types (%s, %s)",
                   1127:             yyval.type->itTransType, yyvsp[-1].identifier);
                   1128:     yyval.type->itTransType = yyvsp[-1].identifier;
                   1129: ;
                   1130:     break;}
                   1131: case 43:
                   1132: #line 390 "../gnumach/mig/parser.y"
                   1133: {
                   1134:     yyval.type = yyvsp[-6].type;
                   1135: 
                   1136:     if ((yyval.type->itDestructor != strNULL) && !streql(yyval.type->itDestructor, yyvsp[-3].identifier))
                   1137:        warn("conflicting destructor functions (%s, %s)",
                   1138:             yyval.type->itDestructor, yyvsp[-3].identifier);
                   1139:     yyval.type->itDestructor = yyvsp[-3].identifier;
                   1140: 
                   1141:     if ((yyval.type->itTransType != strNULL) && !streql(yyval.type->itTransType, yyvsp[-1].identifier))
                   1142:        warn("conflicting translation types (%s, %s)",
                   1143:             yyval.type->itTransType, yyvsp[-1].identifier);
                   1144:     yyval.type->itTransType = yyvsp[-1].identifier;
                   1145: ;
                   1146:     break;}
                   1147: case 44:
                   1148: #line 404 "../gnumach/mig/parser.y"
                   1149: {
                   1150:     yyval.type = yyvsp[-3].type;
                   1151: 
                   1152:     if ((yyval.type->itUserType != strNULL) && !streql(yyval.type->itUserType, yyvsp[0].identifier))
                   1153:        warn("conflicting user types (%s, %s)",
                   1154:             yyval.type->itUserType, yyvsp[0].identifier);
                   1155:     yyval.type->itUserType = yyvsp[0].identifier;
                   1156: 
                   1157:     if ((yyval.type->itServerType != strNULL) && !streql(yyval.type->itServerType, yyvsp[0].identifier))
                   1158:        warn("conflicting server types (%s, %s)",
                   1159:             yyval.type->itServerType, yyvsp[0].identifier);
                   1160:     yyval.type->itServerType = yyvsp[0].identifier;
                   1161: ;
                   1162:     break;}
                   1163: case 45:
                   1164: #line 418 "../gnumach/mig/parser.y"
                   1165: {
                   1166:     yyval.type = yyvsp[-3].type;
                   1167: 
                   1168:     if ((yyval.type->itUserType != strNULL) && !streql(yyval.type->itUserType, yyvsp[0].identifier))
                   1169:        warn("conflicting user types (%s, %s)",
                   1170:             yyval.type->itUserType, yyvsp[0].identifier);
                   1171:     yyval.type->itUserType = yyvsp[0].identifier;
                   1172: ;
                   1173:     break;}
                   1174: case 46:
                   1175: #line 428 "../gnumach/mig/parser.y"
                   1176: {
                   1177:     yyval.type = yyvsp[-3].type;
                   1178: 
                   1179:     if ((yyval.type->itServerType != strNULL) && !streql(yyval.type->itServerType, yyvsp[0].identifier))
                   1180:        warn("conflicting server types (%s, %s)",
                   1181:             yyval.type->itServerType, yyvsp[0].identifier);
                   1182:     yyval.type->itServerType = yyvsp[0].identifier;
                   1183: ;
                   1184:     break;}
                   1185: case 47:
                   1186: #line 439 "../gnumach/mig/parser.y"
                   1187: { yyval.type = yyvsp[0].type; ;
                   1188:     break;}
                   1189: case 48:
                   1190: #line 441 "../gnumach/mig/parser.y"
                   1191: { yyval.type = yyvsp[0].type; ;
                   1192:     break;}
                   1193: case 49:
                   1194: #line 443 "../gnumach/mig/parser.y"
                   1195: { yyval.type = itVarArrayDecl(yyvsp[-1].number, yyvsp[0].type); ;
                   1196:     break;}
                   1197: case 50:
                   1198: #line 445 "../gnumach/mig/parser.y"
                   1199: { yyval.type = itArrayDecl(yyvsp[-1].number, yyvsp[0].type); ;
                   1200:     break;}
                   1201: case 51:
                   1202: #line 447 "../gnumach/mig/parser.y"
                   1203: { yyval.type = itPtrDecl(yyvsp[0].type); ;
                   1204:     break;}
                   1205: case 52:
                   1206: #line 449 "../gnumach/mig/parser.y"
                   1207: { yyval.type = itStructDecl(yyvsp[-1].number, yyvsp[0].type); ;
                   1208:     break;}
                   1209: case 53:
                   1210: #line 451 "../gnumach/mig/parser.y"
                   1211: { yyval.type = yyvsp[0].type; ;
                   1212:     break;}
                   1213: case 54:
                   1214: #line 455 "../gnumach/mig/parser.y"
                   1215: {
                   1216:     yyval.type = itShortDecl(yyvsp[0].symtype.innumber, yyvsp[0].symtype.instr,
                   1217:                     yyvsp[0].symtype.outnumber, yyvsp[0].symtype.outstr,
                   1218:                     yyvsp[0].symtype.size);
                   1219: ;
                   1220:     break;}
                   1221: case 55:
                   1222: #line 462 "../gnumach/mig/parser.y"
                   1223: {
                   1224:     yyval.type = itLongDecl(yyvsp[-4].symtype.innumber, yyvsp[-4].symtype.instr,
                   1225:                    yyvsp[-4].symtype.outnumber, yyvsp[-4].symtype.outstr,
                   1226:                    yyvsp[-4].symtype.size, yyvsp[-2].number, yyvsp[-1].flag);
                   1227: ;
                   1228:     break;}
                   1229: case 56:
                   1230: #line 470 "../gnumach/mig/parser.y"
                   1231: { yyval.flag = flNone; ;
                   1232:     break;}
                   1233: case 57:
                   1234: #line 472 "../gnumach/mig/parser.y"
                   1235: {
                   1236:     if (yyvsp[-2].flag & yyvsp[0].flag)
                   1237:        warn("redundant IPC flag ignored");
                   1238:     else
                   1239:        yyval.flag = yyvsp[-2].flag | yyvsp[0].flag;
                   1240: ;
                   1241:     break;}
                   1242: case 58:
                   1243: #line 479 "../gnumach/mig/parser.y"
                   1244: {
                   1245:     if (yyvsp[-2].flag != flDealloc)
                   1246:        warn("only Dealloc is variable");
                   1247:     else
                   1248:        yyval.flag = yyvsp[-4].flag | flMaybeDealloc;
                   1249: ;
                   1250:     break;}
                   1251: case 59:
                   1252: #line 488 "../gnumach/mig/parser.y"
                   1253: {
                   1254:     yyval.symtype.innumber = yyval.symtype.outnumber = yyvsp[0].number;
                   1255:     yyval.symtype.instr = yyval.symtype.outstr = strNULL;
                   1256:     yyval.symtype.size = 0;
                   1257: ;
                   1258:     break;}
                   1259: case 60:
                   1260: #line 494 "../gnumach/mig/parser.y"
                   1261: { yyval.symtype = yyvsp[0].symtype; ;
                   1262:     break;}
                   1263: case 61:
                   1264: #line 498 "../gnumach/mig/parser.y"
                   1265: { yyval.symtype = yyvsp[0].symtype; ;
                   1266:     break;}
                   1267: case 62:
                   1268: #line 500 "../gnumach/mig/parser.y"
                   1269: {
                   1270:     if (yyvsp[-2].symtype.size != yyvsp[0].symtype.size)
                   1271:     {
                   1272:        if (yyvsp[-2].symtype.size == 0)
                   1273:            yyval.symtype.size = yyvsp[0].symtype.size;
                   1274:        else if (yyvsp[0].symtype.size == 0)
                   1275:            yyval.symtype.size = yyvsp[-2].symtype.size;
                   1276:        else
                   1277:        {
                   1278:            error("sizes in IPCTypes (%d, %d) aren't equal",
                   1279:                  yyvsp[-2].symtype.size, yyvsp[0].symtype.size);
                   1280:            yyval.symtype.size = 0;
                   1281:        }
                   1282:     }
                   1283:     else
                   1284:        yyval.symtype.size = yyvsp[-2].symtype.size;
                   1285:     yyval.symtype.innumber = yyvsp[-2].symtype.innumber;
                   1286:     yyval.symtype.instr = yyvsp[-2].symtype.instr;
                   1287:     yyval.symtype.outnumber = yyvsp[0].symtype.outnumber;
                   1288:     yyval.symtype.outstr = yyvsp[0].symtype.outstr;
                   1289: ;
                   1290:     break;}
                   1291: case 63:
                   1292: #line 524 "../gnumach/mig/parser.y"
                   1293: { yyval.type = itPrevDecl(yyvsp[0].identifier); ;
                   1294:     break;}
                   1295: case 64:
                   1296: #line 528 "../gnumach/mig/parser.y"
                   1297: { yyval.number = 0; ;
                   1298:     break;}
                   1299: case 65:
                   1300: #line 530 "../gnumach/mig/parser.y"
                   1301: { yyval.number = 0; ;
                   1302:     break;}
                   1303: case 66:
                   1304: #line 533 "../gnumach/mig/parser.y"
                   1305: { yyval.number = yyvsp[-2].number; ;
                   1306:     break;}
                   1307: case 67:
                   1308: #line 537 "../gnumach/mig/parser.y"
                   1309: { yyval.number = yyvsp[-2].number; ;
                   1310:     break;}
                   1311: case 68:
                   1312: #line 541 "../gnumach/mig/parser.y"
                   1313: { yyval.number = yyvsp[-2].number; ;
                   1314:     break;}
                   1315: case 69:
                   1316: #line 545 "../gnumach/mig/parser.y"
                   1317: { yyval.type = itCStringDecl(yyvsp[-1].number, FALSE); ;
                   1318:     break;}
                   1319: case 70:
                   1320: #line 548 "../gnumach/mig/parser.y"
                   1321: { yyval.type = itCStringDecl(yyvsp[-1].number, TRUE); ;
                   1322:     break;}
                   1323: case 71:
                   1324: #line 552 "../gnumach/mig/parser.y"
                   1325: { yyval.number = yyvsp[-2].number + yyvsp[0].number;   ;
                   1326:     break;}
                   1327: case 72:
                   1328: #line 554 "../gnumach/mig/parser.y"
                   1329: { yyval.number = yyvsp[-2].number - yyvsp[0].number;   ;
                   1330:     break;}
                   1331: case 73:
                   1332: #line 556 "../gnumach/mig/parser.y"
                   1333: { yyval.number = yyvsp[-2].number * yyvsp[0].number;   ;
                   1334:     break;}
                   1335: case 74:
                   1336: #line 558 "../gnumach/mig/parser.y"
                   1337: { yyval.number = yyvsp[-2].number / yyvsp[0].number;   ;
                   1338:     break;}
                   1339: case 75:
                   1340: #line 560 "../gnumach/mig/parser.y"
                   1341: { yyval.number = yyvsp[0].number;      ;
                   1342:     break;}
                   1343: case 76:
                   1344: #line 562 "../gnumach/mig/parser.y"
                   1345: { yyval.number = yyvsp[-1].number;     ;
                   1346:     break;}
                   1347: case 77:
                   1348: #line 566 "../gnumach/mig/parser.y"
                   1349: { yyval.routine = yyvsp[0].routine; ;
                   1350:     break;}
                   1351: case 78:
                   1352: #line 567 "../gnumach/mig/parser.y"
                   1353: { yyval.routine = yyvsp[0].routine; ;
                   1354:     break;}
                   1355: case 79:
                   1356: #line 568 "../gnumach/mig/parser.y"
                   1357: { yyval.routine = yyvsp[0].routine; ;
                   1358:     break;}
                   1359: case 80:
                   1360: #line 569 "../gnumach/mig/parser.y"
                   1361: { yyval.routine = yyvsp[0].routine; ;
                   1362:     break;}
                   1363: case 81:
                   1364: #line 570 "../gnumach/mig/parser.y"
                   1365: { yyval.routine = yyvsp[0].routine; ;
                   1366:     break;}
                   1367: case 82:
                   1368: #line 574 "../gnumach/mig/parser.y"
                   1369: { yyval.routine = rtMakeRoutine(yyvsp[-1].identifier, yyvsp[0].argument); ;
                   1370:     break;}
                   1371: case 83:
                   1372: #line 578 "../gnumach/mig/parser.y"
                   1373: { yyval.routine = rtMakeSimpleRoutine(yyvsp[-1].identifier, yyvsp[0].argument); ;
                   1374:     break;}
                   1375: case 84:
                   1376: #line 582 "../gnumach/mig/parser.y"
                   1377: { yyval.routine = rtMakeProcedure(yyvsp[-1].identifier, yyvsp[0].argument); ;
                   1378:     break;}
                   1379: case 85:
                   1380: #line 586 "../gnumach/mig/parser.y"
                   1381: { yyval.routine = rtMakeSimpleProcedure(yyvsp[-1].identifier, yyvsp[0].argument); ;
                   1382:     break;}
                   1383: case 86:
                   1384: #line 590 "../gnumach/mig/parser.y"
                   1385: { yyval.routine = rtMakeFunction(yyvsp[-2].identifier, yyvsp[-1].argument, yyvsp[0].type); ;
                   1386:     break;}
                   1387: case 87:
                   1388: #line 594 "../gnumach/mig/parser.y"
                   1389: { yyval.argument = argNULL; ;
                   1390:     break;}
                   1391: case 88:
                   1392: #line 596 "../gnumach/mig/parser.y"
                   1393: { yyval.argument = yyvsp[-1].argument; ;
                   1394:     break;}
                   1395: case 89:
                   1396: #line 601 "../gnumach/mig/parser.y"
                   1397: { yyval.argument = yyvsp[0].argument; ;
                   1398:     break;}
                   1399: case 90:
                   1400: #line 603 "../gnumach/mig/parser.y"
                   1401: {
                   1402:     yyval.argument = yyvsp[-2].argument;
                   1403:     yyval.argument->argNext = yyvsp[0].argument;
                   1404: ;
                   1405:     break;}
                   1406: case 91:
                   1407: #line 610 "../gnumach/mig/parser.y"
                   1408: {
                   1409:     yyval.argument = argAlloc();
                   1410:     yyval.argument->argKind = yyvsp[-3].direction;
                   1411:     yyval.argument->argName = yyvsp[-2].identifier;
                   1412:     yyval.argument->argType = yyvsp[-1].type;
                   1413:     yyval.argument->argFlags = yyvsp[0].flag;
                   1414: ;
                   1415:     break;}
                   1416: case 92:
                   1417: #line 619 "../gnumach/mig/parser.y"
                   1418: { yyval.direction = akNone; ;
                   1419:     break;}
                   1420: case 93:
                   1421: #line 620 "../gnumach/mig/parser.y"
                   1422: { yyval.direction = akIn; ;
                   1423:     break;}
                   1424: case 94:
                   1425: #line 621 "../gnumach/mig/parser.y"
                   1426: { yyval.direction = akOut; ;
                   1427:     break;}
                   1428: case 95:
                   1429: #line 622 "../gnumach/mig/parser.y"
                   1430: { yyval.direction = akInOut; ;
                   1431:     break;}
                   1432: case 96:
                   1433: #line 623 "../gnumach/mig/parser.y"
                   1434: { yyval.direction = akRequestPort; ;
                   1435:     break;}
                   1436: case 97:
                   1437: #line 624 "../gnumach/mig/parser.y"
                   1438: { yyval.direction = akReplyPort; ;
                   1439:     break;}
                   1440: case 98:
                   1441: #line 625 "../gnumach/mig/parser.y"
                   1442: { yyval.direction = akSReplyPort; ;
                   1443:     break;}
                   1444: case 99:
                   1445: #line 626 "../gnumach/mig/parser.y"
                   1446: { yyval.direction = akUReplyPort; ;
                   1447:     break;}
                   1448: case 100:
                   1449: #line 627 "../gnumach/mig/parser.y"
                   1450: { yyval.direction = akWaitTime; ;
                   1451:     break;}
                   1452: case 101:
                   1453: #line 628 "../gnumach/mig/parser.y"
                   1454: { yyval.direction = akMsgOption; ;
                   1455:     break;}
                   1456: case 102:
                   1457: #line 629 "../gnumach/mig/parser.y"
                   1458: { yyval.direction = akMsgSeqno; ;
                   1459:     break;}
                   1460: case 103:
                   1461: #line 633 "../gnumach/mig/parser.y"
                   1462: {
                   1463:     yyval.type = itLookUp(yyvsp[0].identifier);
                   1464:     if (yyval.type == itNULL)
                   1465:        error("type '%s' not defined", yyvsp[0].identifier);
                   1466: ;
                   1467:     break;}
                   1468: case 104:
                   1469: #line 639 "../gnumach/mig/parser.y"
                   1470: { yyval.type = yyvsp[0].type; ;
                   1471:     break;}
                   1472: case 105:
                   1473: #line 643 "../gnumach/mig/parser.y"
                   1474: { LookString(); ;
                   1475:     break;}
                   1476: case 106:
                   1477: #line 647 "../gnumach/mig/parser.y"
                   1478: { LookFileName(); ;
                   1479:     break;}
                   1480: case 107:
                   1481: #line 651 "../gnumach/mig/parser.y"
                   1482: { LookQString(); ;
                   1483:     break;}
                   1484: }
                   1485:    /* the action file gets copied in in place of this dollarsign */
                   1486: #line 487 "/usr/share/bison.simple"
                   1487: 
                   1488:   yyvsp -= yylen;
                   1489:   yyssp -= yylen;
                   1490: #ifdef YYLSP_NEEDED
                   1491:   yylsp -= yylen;
                   1492: #endif
                   1493: 
                   1494: #if YYDEBUG != 0
                   1495:   if (yydebug)
                   1496:     {
                   1497:       short *ssp1 = yyss - 1;
                   1498:       fprintf (stderr, "state stack now");
                   1499:       while (ssp1 != yyssp)
                   1500:        fprintf (stderr, " %d", *++ssp1);
                   1501:       fprintf (stderr, "\n");
                   1502:     }
                   1503: #endif
                   1504: 
                   1505:   *++yyvsp = yyval;
                   1506: 
                   1507: #ifdef YYLSP_NEEDED
                   1508:   yylsp++;
                   1509:   if (yylen == 0)
                   1510:     {
                   1511:       yylsp->first_line = yylloc.first_line;
                   1512:       yylsp->first_column = yylloc.first_column;
                   1513:       yylsp->last_line = (yylsp-1)->last_line;
                   1514:       yylsp->last_column = (yylsp-1)->last_column;
                   1515:       yylsp->text = 0;
                   1516:     }
                   1517:   else
                   1518:     {
                   1519:       yylsp->last_line = (yylsp+yylen-1)->last_line;
                   1520:       yylsp->last_column = (yylsp+yylen-1)->last_column;
                   1521:     }
                   1522: #endif
                   1523: 
                   1524:   /* Now "shift" the result of the reduction.
                   1525:      Determine what state that goes to,
                   1526:      based on the state we popped back to
                   1527:      and the rule number reduced by.  */
                   1528: 
                   1529:   yyn = yyr1[yyn];
                   1530: 
                   1531:   yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
                   1532:   if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
                   1533:     yystate = yytable[yystate];
                   1534:   else
                   1535:     yystate = yydefgoto[yyn - YYNTBASE];
                   1536: 
                   1537:   goto yynewstate;
                   1538: 
                   1539: yyerrlab:   /* here on detecting error */
                   1540: 
                   1541:   if (! yyerrstatus)
                   1542:     /* If not already recovering from an error, report this error.  */
                   1543:     {
                   1544:       ++yynerrs;
                   1545: 
                   1546: #ifdef YYERROR_VERBOSE
                   1547:       yyn = yypact[yystate];
                   1548: 
                   1549:       if (yyn > YYFLAG && yyn < YYLAST)
                   1550:        {
                   1551:          int size = 0;
                   1552:          char *msg;
                   1553:          int x, count;
                   1554: 
                   1555:          count = 0;
                   1556:          /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
                   1557:          for (x = (yyn < 0 ? -yyn : 0);
                   1558:               x < (sizeof(yytname) / sizeof(char *)); x++)
                   1559:            if (yycheck[x + yyn] == x)
                   1560:              size += strlen(yytname[x]) + 15, count++;
                   1561:          msg = (char *) malloc(size + 15);
                   1562:          if (msg != 0)
                   1563:            {
                   1564:              strcpy(msg, "parse error");
                   1565: 
                   1566:              if (count < 5)
                   1567:                {
                   1568:                  count = 0;
                   1569:                  for (x = (yyn < 0 ? -yyn : 0);
                   1570:                       x < (sizeof(yytname) / sizeof(char *)); x++)
                   1571:                    if (yycheck[x + yyn] == x)
                   1572:                      {
                   1573:                        strcat(msg, count == 0 ? ", expecting `" : " or `");
                   1574:                        strcat(msg, yytname[x]);
                   1575:                        strcat(msg, "'");
                   1576:                        count++;
                   1577:                      }
                   1578:                }
                   1579:              yyerror(msg);
                   1580:              free(msg);
                   1581:            }
                   1582:          else
                   1583:            yyerror ("parse error; also virtual memory exceeded");
                   1584:        }
                   1585:       else
                   1586: #endif /* YYERROR_VERBOSE */
                   1587:        yyerror("parse error");
                   1588:     }
                   1589: 
                   1590:   goto yyerrlab1;
                   1591: yyerrlab1:   /* here on error raised explicitly by an action */
                   1592: 
                   1593:   if (yyerrstatus == 3)
                   1594:     {
                   1595:       /* if just tried and failed to reuse lookahead token after an error, discard it.  */
                   1596: 
                   1597:       /* return failure if at end of input */
                   1598:       if (yychar == YYEOF)
                   1599:        YYABORT;
                   1600: 
                   1601: #if YYDEBUG != 0
                   1602:       if (yydebug)
                   1603:        fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
                   1604: #endif
                   1605: 
                   1606:       yychar = YYEMPTY;
                   1607:     }
                   1608: 
                   1609:   /* Else will try to reuse lookahead token
                   1610:      after shifting the error token.  */
                   1611: 
                   1612:   yyerrstatus = 3;             /* Each real token shifted decrements this */
                   1613: 
                   1614:   goto yyerrhandle;
                   1615: 
                   1616: yyerrdefault:  /* current state does not do anything special for the error token. */
                   1617: 
                   1618: #if 0
                   1619:   /* This is wrong; only states that explicitly want error tokens
                   1620:      should shift them.  */
                   1621:   yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
                   1622:   if (yyn) goto yydefault;
                   1623: #endif
                   1624: 
                   1625: yyerrpop:   /* pop the current state because it cannot handle the error token */
                   1626: 
                   1627:   if (yyssp == yyss) YYABORT;
                   1628:   yyvsp--;
                   1629:   yystate = *--yyssp;
                   1630: #ifdef YYLSP_NEEDED
                   1631:   yylsp--;
                   1632: #endif
                   1633: 
                   1634: #if YYDEBUG != 0
                   1635:   if (yydebug)
                   1636:     {
                   1637:       short *ssp1 = yyss - 1;
                   1638:       fprintf (stderr, "Error: state stack now");
                   1639:       while (ssp1 != yyssp)
                   1640:        fprintf (stderr, " %d", *++ssp1);
                   1641:       fprintf (stderr, "\n");
                   1642:     }
                   1643: #endif
                   1644: 
                   1645: yyerrhandle:
                   1646: 
                   1647:   yyn = yypact[yystate];
                   1648:   if (yyn == YYFLAG)
                   1649:     goto yyerrdefault;
                   1650: 
                   1651:   yyn += YYTERROR;
                   1652:   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
                   1653:     goto yyerrdefault;
                   1654: 
                   1655:   yyn = yytable[yyn];
                   1656:   if (yyn < 0)
                   1657:     {
                   1658:       if (yyn == YYFLAG)
                   1659:        goto yyerrpop;
                   1660:       yyn = -yyn;
                   1661:       goto yyreduce;
                   1662:     }
                   1663:   else if (yyn == 0)
                   1664:     goto yyerrpop;
                   1665: 
                   1666:   if (yyn == YYFINAL)
                   1667:     YYACCEPT;
                   1668: 
                   1669: #if YYDEBUG != 0
                   1670:   if (yydebug)
                   1671:     fprintf(stderr, "Shifting error token, ");
                   1672: #endif
                   1673: 
                   1674:   *++yyvsp = yylval;
                   1675: #ifdef YYLSP_NEEDED
                   1676:   *++yylsp = yylloc;
                   1677: #endif
                   1678: 
                   1679:   yystate = yyn;
                   1680:   goto yynewstate;
                   1681: }
                   1682: #line 654 "../gnumach/mig/parser.y"
                   1683: 
                   1684: 
                   1685: static const char *
                   1686: import_name(statement_kind_t sk)
                   1687: {
                   1688:     switch (sk)
                   1689:     {
                   1690:       case skImport:
                   1691:        return "Import";
                   1692:       case skSImport:
                   1693:        return "SImport";
                   1694:       case skUImport:
                   1695:        return "UImport";
                   1696:       default:
                   1697:        fatal("import_name(%d): not import statement", (int) sk);
                   1698:        /*NOTREACHED*/
                   1699:     }
                   1700: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.