Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Svc_Conf_y.cpp

Go to the documentation of this file.
00001 #include "ace_pch.h"
00002 /* A Bison parser, made from Svc_Conf.y
00003    by GNU bison 1.35.  */
00004 
00005 #define ACE_YYBISON 1  /* Identify Bison output.  */
00006 
00007 # define        ACE_DYNAMIC     257
00008 # define        ACE_STATIC      258
00009 # define        ACE_SUSPEND     259
00010 # define        ACE_RESUME      260
00011 # define        ACE_REMOVE      261
00012 # define        ACE_USTREAM     262
00013 # define        ACE_MODULE_T    263
00014 # define        ACE_STREAM_T    264
00015 # define        ACE_SVC_OBJ_T   265
00016 # define        ACE_ACTIVE      266
00017 # define        ACE_INACTIVE    267
00018 # define        ACE_PATHNAME    268
00019 # define        ACE_IDENT       269
00020 # define        ACE_STRING      270
00021 
00022 
00023 // $Id: Svc_Conf_y.cpp,v 1.1.1.4.2.1 2003/03/13 19:44:22 chad Exp $
00024 
00025 #include "ace/Svc_Conf.h"
00026 
00027 #if (ACE_USES_CLASSIC_SVC_CONF == 1)
00028 
00029 #include "ace/ARGV.h"
00030 #include "ace/Module.h"
00031 #include "ace/Stream.h"
00032 
00033 ACE_RCSID (ace,
00034            Svc_Conf_y,
00035            "$Id: Svc_Conf_y.cpp,v 1.1.1.4.2.1 2003/03/13 19:44:22 chad Exp $")
00036 
00037 // Prototypes.
00038 static ACE_Module_Type *ace_get_module (ACE_Static_Node *str_rec,
00039                                         ACE_Static_Node *svc_type,
00040                                         int & ace_yyerrno);
00041 static ACE_Module_Type *ace_get_module (ACE_Static_Node *str_rec,
00042                                         const ACE_TCHAR *svc_name,
00043                                         int & ace_yyerrno);
00044 
00045 #define ACE_YYDEBUG_LEXER_TEXT (ace_yytext[ace_yyleng] = '\0', ace_yytext)
00046 
00047 // Force the pretty debugging code to compile.
00048 // #define ACE_YYDEBUG 1
00049 
00050 #ifndef ACE_YYDEBUG
00051 # define ACE_YYDEBUG 0
00052 #endif
00053 
00054 
00055 
00056 #define ACE_YYFINAL             66
00057 #define ACE_YYFLAG              -32768
00058 #define ACE_YYNTBASE    23
00059 
00060 /* ACE_YYTRANSLATE(ACE_YYLEX) -- Bison token number corresponding to ACE_YYLEX. */
00061 #define ACE_YYTRANSLATE(x) ((unsigned)(x) <= 270 ? ace_yytranslate[x] : 43)
00062 
00063 /* ACE_YYTRANSLATE[ACE_YYLEX] -- Bison token number corresponding to ACE_YYLEX. */
00064 static const ACE_TCHAR ace_yytranslate[] =
00065 {
00066        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00067        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00068        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00069        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00070       20,    21,    22,     2,     2,     2,     2,     2,     2,     2,
00071        2,     2,     2,     2,     2,     2,     2,     2,    19,     2,
00072        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00073        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00074        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00075        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00076        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00077        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00078        2,     2,     2,    17,     2,    18,     2,     2,     2,     2,
00079        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00080        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00081        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00082        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00083        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00084        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00085        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00086        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00087        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00088        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00089        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00090        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00091        2,     2,     2,     2,     2,     2,     1,     3,     4,     5,
00092        6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
00093       16
00094 };
00095 
00096 #if ACE_YYDEBUG
00097 static const short ace_yyprhs[] =
00098 {
00099        0,     0,     3,     6,     7,     9,    11,    13,    15,    17,
00100       19,    23,    27,    30,    33,    36,    40,    41,    46,    48,
00101       50,    51,    56,    57,    60,    61,    63,    65,    67,    69,
00102       71,    76,    78,    80,    81,    85,    91,    96,    99,   102,
00103      105,   107,   108,   110,   112
00104 };
00105 static const short ace_yyrhs[] =
00106 {
00107       23,    24,     0,    23,     1,     0,     0,    25,     0,    26,
00108        0,    27,     0,    28,     0,    29,     0,    30,     0,     3,
00109       37,    41,     0,     4,    15,    41,     0,     5,    15,     0,
00110        6,    15,     0,     7,    15,     0,     8,    32,    33,     0,
00111        0,     8,    15,    31,    33,     0,    25,     0,    26,     0,
00112        0,    17,    34,    35,    18,     0,     0,    35,    36,     0,
00113        0,    25,     0,    26,     0,    27,     0,    28,     0,    29,
00114        0,    15,    40,    39,    38,     0,    12,     0,    13,     0,
00115        0,    42,    19,    15,     0,    42,    19,    15,    20,    21,
00116        0,    19,    15,    20,    21,     0,     9,    22,     0,    11,
00117       22,     0,    10,    22,     0,    16,     0,     0,    14,     0,
00118       15,     0,    16,     0
00119 };
00120 
00121 #endif
00122 
00123 #if ACE_YYDEBUG
00124 /* ACE_YYRLINE[ACE_YYN] -- source line where rule number ACE_YYN was defined. */
00125 static const short ace_yyrline[] =
00126 {
00127        0,    51,    59,    63,    67,    68,    69,    70,    71,    72,
00128       76,    86,    93,   100,   107,   114,   118,   118,   125,   128,
00129      134,   134,   143,   147,   155,   159,   186,   199,   207,   215,
00130      239,   276,   280,   284,   291,   295,   299,   306,   310,   314,
00131      321,   322,   326,   327,   328
00132 };
00133 #endif
00134 
00135 
00136 #if (ACE_YYDEBUG) || defined ACE_YYERROR_VERBOSE
00137 
00138 /* ACE_YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
00139 static const ACE_TCHAR *const ace_yytname[] =
00140 {
00141   ACE_LIB_TEXT ("$"),
00142   ACE_LIB_TEXT ("error"),
00143   ACE_LIB_TEXT ("$undefined."),
00144   ACE_LIB_TEXT ("ACE_DYNAMIC"),
00145   ACE_LIB_TEXT ("ACE_STATIC"),
00146   ACE_LIB_TEXT ("ACE_SUSPEND"),
00147   ACE_LIB_TEXT ("ACE_RESUME"),
00148   ACE_LIB_TEXT ("ACE_REMOVE"),
00149   ACE_LIB_TEXT ("ACE_USTREAM"),
00150   ACE_LIB_TEXT ("ACE_MODULE_T",)
00151   ACE_LIB_TEXT ("ACE_STREAM_T"),
00152   ACE_LIB_TEXT ("ACE_SVC_OBJ_T"),
00153   ACE_LIB_TEXT ("ACE_ACTIVE"),
00154   ACE_LIB_TEXT ("ACE_INACTIVE",)
00155   ACE_LIB_TEXT ("ACE_PATHNAME"),
00156   ACE_LIB_TEXT ("ACE_IDENT"),
00157   ACE_LIB_TEXT ("ACE_STRING"),
00158   ACE_LIB_TEXT ("'{'"),
00159   ACE_LIB_TEXT ("'}'"),
00160   ACE_LIB_TEXT ("':'"),
00161   ACE_LIB_TEXT ("'('"),
00162   ACE_LIB_TEXT ("')'"),
00163   ACE_LIB_TEXT ("'*'"),
00164   ACE_LIB_TEXT ("svc_config_entries"),
00165   ACE_LIB_TEXT ("svc_config_entry"),
00166   ACE_LIB_TEXT ("dynamic",)
00167   ACE_LIB_TEXT ("static"),
00168   ACE_LIB_TEXT ("suspend"),
00169   ACE_LIB_TEXT ("resume"),
00170   ACE_LIB_TEXT ("remove"),
00171   ACE_LIB_TEXT ("stream"),
00172   ACE_LIB_TEXT ("@1"),
00173   ACE_LIB_TEXT ("stream_ops",)
00174   ACE_LIB_TEXT ("stream_modules"),
00175   ACE_LIB_TEXT ("@2"),
00176   ACE_LIB_TEXT ("module_list"),
00177   ACE_LIB_TEXT ("module"),
00178   ACE_LIB_TEXT ("svc_location",)
00179   ACE_LIB_TEXT ("status"),
00180   ACE_LIB_TEXT ("svc_initializer"),
00181   ACE_LIB_TEXT ("type"),
00182   ACE_LIB_TEXT ("parameters_opt"),
00183   ACE_LIB_TEXT ("pathname"),
00184   0
00185 };
00186 #endif
00187 
00188 /* ACE_YYR1[ACE_YYN] -- Symbol number of symbol that rule ACE_YYN derives. */
00189 static const short ace_yyr1[] =
00190 {
00191        0,    23,    23,    23,    24,    24,    24,    24,    24,    24,
00192       25,    26,    27,    28,    29,    30,    31,    30,    32,    32,
00193       34,    33,    33,    35,    35,    36,    36,    36,    36,    36,
00194       37,    38,    38,    38,    39,    39,    39,    40,    40,    40,
00195       41,    41,    42,    42,    42
00196 };
00197 
00198 /* ACE_YYR2[ACE_YYN] -- Number of symbols composing right hand side of rule ACE_YYN. */
00199 static const short ace_yyr2[] =
00200 {
00201        0,     2,     2,     0,     1,     1,     1,     1,     1,     1,
00202        3,     3,     2,     2,     2,     3,     0,     4,     1,     1,
00203        0,     4,     0,     2,     0,     1,     1,     1,     1,     1,
00204        4,     1,     1,     0,     3,     5,     4,     2,     2,     2,
00205        1,     0,     1,     1,     1
00206 };
00207 
00208 /* ACE_YYDEFACT[S] -- default rule to reduce with in state S when ACE_YYTABLE
00209    doesn't specify something else to do.  Zero means the default is an
00210    error. */
00211 static const short ace_yydefact[] =
00212 {
00213        3,     0,     2,     0,     0,     0,     0,     0,     0,     1,
00214        4,     5,     6,     7,     8,     9,     0,    41,    41,    12,
00215       13,    14,    16,    18,    19,    22,     0,     0,     0,     0,
00216       40,    10,    11,    22,    20,    15,    37,    39,    38,    42,
00217       43,    44,     0,    33,     0,    17,    24,     0,    31,    32,
00218       30,     0,     0,     0,    34,    21,    25,    26,    27,    28,
00219       29,    23,    36,     0,    35,     0,     0
00220 };
00221 
00222 static const short ace_yydefgoto[] =
00223 {
00224        1,     9,    10,    11,    12,    13,    14,    15,    33,    25,
00225       35,    46,    52,    61,    17,    50,    43,    29,    31,    44
00226 };
00227 
00228 static const short ace_yypact[] =
00229 {
00230   -32768,    20,-32768,     1,     3,     7,    14,    18,     4,-32768,
00231   -32768,-32768,-32768,-32768,-32768,-32768,    21,    19,    19,-32768,
00232   -32768,-32768,-32768,-32768,-32768,    -2,    12,    15,    16,    -5,
00233   -32768,-32768,-32768,    -2,-32768,-32768,-32768,-32768,-32768,-32768,
00234   -32768,-32768,    24,     0,    17,-32768,-32768,    22,-32768,-32768,
00235   -32768,    25,    -1,    26,    23,-32768,-32768,-32768,-32768,-32768,
00236   -32768,-32768,-32768,    27,-32768,    41,-32768
00237 };
00238 
00239 static const short ace_yypgoto[] =
00240 {
00241   -32768,-32768,    -8,    -7,    -6,    -3,     2,-32768,-32768,-32768,
00242       28,-32768,-32768,-32768,-32768,-32768,-32768,-32768,    32,-32768
00243 };
00244 
00245 
00246 #define ACE_YYLAST              61
00247 
00248 
00249 static const short ace_yytable[] =
00250 {
00251       23,    24,     3,     4,     5,     6,     7,     3,     4,    39,
00252       40,    41,    48,    49,    42,    34,    16,    55,    18,    22,
00253       65,     2,    19,     3,     4,     5,     6,     7,     8,    20,
00254       26,    27,    28,    21,    36,    30,    51,    37,    38,    47,
00255       54,    66,    53,    63,    56,    57,    58,    62,    64,    59,
00256       32,     0,     0,     0,    60,     0,     0,     0,     0,     0,
00257        0,    45
00258 };
00259 
00260 static const short ace_yycheck[] =
00261 {
00262        8,     8,     3,     4,     5,     6,     7,     3,     4,    14,
00263       15,    16,    12,    13,    19,    17,    15,    18,    15,    15,
00264        0,     1,    15,     3,     4,     5,     6,     7,     8,    15,
00265        9,    10,    11,    15,    22,    16,    19,    22,    22,    15,
00266       15,     0,    20,    20,    52,    52,    52,    21,    21,    52,
00267       18,    -1,    -1,    -1,    52,    -1,    -1,    -1,    -1,    -1,
00268       -1,    33
00269 };
00270 #define ACE_YYPURE 1
00271 
00272 /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
00273 
00274 /* Skeleton output parser for bison,
00275 
00276    Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
00277    Foundation, Inc.
00278 
00279    This program is free software; you can redistribute it and/or modify
00280    it under the terms of the GNU General Public License as published by
00281    the Free Software Foundation; either version 2, or (at your option)
00282    any later version.
00283 
00284    This program is distributed in the hope that it will be useful,
00285    but WITHOUT ANY WARRANTY; without even the implied warranty of
00286    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00287    GNU General Public License for more details.
00288 
00289    You should have received a copy of the GNU General Public License
00290    along with this program; if not, write to the Free Software
00291    Foundation, Inc., 59 Temple Place - Suite 330,
00292    Boston, MA 02111-1307, USA.  */
00293 
00294 /* As a special exception, when this file is copied by Bison into a
00295    Bison output file, you may use that output file without restriction.
00296    This special exception was added by the Free Software Foundation
00297    in version 1.24 of Bison.  */
00298 
00299 /* This is the parser code that is written into each bison parser when
00300    the %semantic_parser declaration is not specified in the grammar.
00301    It was written by Richard Stallman by simplifying the hairy parser
00302    used when %semantic_parser is specified.  */
00303 
00304 /* All symbols defined below should begin with ace_yy or ACE_YY, to avoid
00305    infringing on user name space.  This should be done even for local
00306    variables, as they might otherwise be expanded by user macros.
00307    There are some unavoidable exceptions within include files to
00308    define necessary library symbols; they are noted "INFRINGES ON
00309    USER NAME SPACE" below.  */
00310 
00311 #if ! defined (ace_yyoverflow) || defined (ACE_YYERROR_VERBOSE)
00312 
00313 /* The parser invokes alloca or malloc; define the necessary symbols.  */
00314 
00315 # if ACE_YYSTACK_USE_ALLOCA
00316 #  define ACE_YYSTACK_ALLOC alloca
00317 # else
00318 #  ifndef ACE_YYSTACK_USE_ALLOCA
00319 #   if defined (alloca) || defined (_ALLOCA_H)
00320 #    define ACE_YYSTACK_ALLOC alloca
00321 #   else
00322 #    ifdef __GNUC__
00323 #     define ACE_YYSTACK_ALLOC __builtin_alloca
00324 #    endif
00325 #   endif
00326 #  endif
00327 # endif
00328 
00329 # ifdef ACE_YYSTACK_ALLOC
00330    /* Pacify GCC's `empty if-body' warning. */
00331 #  define ACE_YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
00332 # else
00333 #  if defined (__STDC__) || defined (__cplusplus)
00334 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
00335 #   define ACE_YYSIZE_T size_t
00336 #  endif
00337 #  define ACE_YYSTACK_ALLOC malloc
00338 #  define ACE_YYSTACK_FREE free
00339 # endif
00340 #endif /* ! defined (ace_yyoverflow) || defined (ACE_YYERROR_VERBOSE) */
00341 
00342 
00343 #if (! defined (ace_yyoverflow) \
00344      && (! defined (__cplusplus) \
00345          || (ACE_YYLTYPE_IS_TRIVIAL && ACE_YYSTYPE_IS_TRIVIAL)))
00346 
00347 /* A type that is properly aligned for any stack member.  */
00348 union ace_yyalloc
00349 {
00350   short ace_yyss;
00351   ACE_YYSTYPE ace_yyvs;
00352 # if ACE_YYLSP_NEEDED
00353   ACE_YYLTYPE ace_yyls;
00354 # endif
00355 };
00356 
00357 /* The size of the maximum gap between one aligned stack and the next.  */
00358 # define ACE_YYSTACK_GAP_MAX (sizeof (union ace_yyalloc) - 1)
00359 
00360 /* The size of an array large to enough to hold all stacks, each with
00361    N elements.  */
00362 # if ACE_YYLSP_NEEDED
00363 #  define ACE_YYSTACK_BYTES(N) \
00364      ((N) * (sizeof (short) + sizeof (ACE_YYSTYPE) + sizeof (ACE_YYLTYPE))      \
00365       + 2 * ACE_YYSTACK_GAP_MAX)
00366 # else
00367 #  define ACE_YYSTACK_BYTES(N) \
00368      ((N) * (sizeof (short) + sizeof (ACE_YYSTYPE))                             \
00369       + ACE_YYSTACK_GAP_MAX)
00370 # endif
00371 
00372 /* Copy COUNT objects from FROM to TO.  The source and destination do
00373    not overlap.  */
00374 # ifndef ACE_YYCOPY
00375 #  if 1 < __GNUC__
00376 #   define ACE_YYCOPY(To, From, Count) \
00377       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
00378 #  else
00379 #   define ACE_YYCOPY(To, From, Count)          \
00380       do                                        \
00381         {                                       \
00382           register ACE_YYSIZE_T ace_yyi;                \
00383           for (ace_yyi = 0; ace_yyi < (Count); ace_yyi++)       \
00384             (To)[ace_yyi] = (From)[ace_yyi];            \
00385         }                                       \
00386       while (0)
00387 #  endif
00388 # endif
00389 
00390 /* Relocate STACK from its old location to the new one.  The
00391    local variables ACE_YYSIZE and ACE_YYSTACKSIZE give the old and new number of
00392    elements in the stack, and ACE_YYPTR gives the new location of the
00393    stack.  Advance ACE_YYPTR to a properly aligned location for the next
00394    stack.  */
00395 # define ACE_YYSTACK_RELOCATE(Stack)                                    \
00396     do                                                                  \
00397       {                                                                 \
00398         ACE_YYSIZE_T ace_yynewbytes;                                            \
00399         ACE_YYCOPY (&ace_yyptr->Stack, Stack, ace_yysize);                              \
00400         Stack = &ace_yyptr->Stack;                                              \
00401         ace_yynewbytes = ace_yystacksize * sizeof (*Stack) + ACE_YYSTACK_GAP_MAX;       \
00402         ace_yyptr += ace_yynewbytes / sizeof (*ace_yyptr);                              \
00403       }                                                                 \
00404     while (0)
00405 
00406 #endif
00407 
00408 
00409 #if ! defined (ACE_YYSIZE_T) && defined (__SIZE_TYPE__)
00410 # define ACE_YYSIZE_T __SIZE_TYPE__
00411 #endif
00412 #if ! defined (ACE_YYSIZE_T) && defined (size_t)
00413 # define ACE_YYSIZE_T size_t
00414 #endif
00415 #if ! defined (ACE_YYSIZE_T)
00416 # if defined (__STDC__) || defined (__cplusplus)
00417 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
00418 #  define ACE_YYSIZE_T size_t
00419 # endif
00420 #endif
00421 #if ! defined (ACE_YYSIZE_T)
00422 # define ACE_YYSIZE_T unsigned int
00423 #endif
00424 
00425 #define ace_yyerrok             (ace_yyerrstatus = 0)
00426 #define ace_yyclearin   (ace_yychar = ACE_YYEMPTY)
00427 #define ACE_YYEMPTY             -2
00428 #define ACE_YYEOF               0
00429 #define ACE_YYACCEPT    goto ace_yyacceptlab
00430 #define ACE_YYABORT     goto ace_yyabortlab
00431 #define ACE_YYERROR             goto ace_yyerrlab1
00432 /* Like ACE_YYERROR except do call ace_yyerror.  This remains here temporarily
00433    to ease the transition to the new meaning of ACE_YYERROR, for GCC.
00434    Once GCC version 2 has supplanted version 1, this can go.  */
00435 #define ACE_YYFAIL              goto ace_yyerrlab
00436 #define ACE_YYRECOVERING()  (!!ace_yyerrstatus)
00437 #define ACE_YYBACKUP(Token, Value)                                      \
00438 do                                                              \
00439   if (ace_yychar == ACE_YYEMPTY && ace_yylen == 1)                              \
00440     {                                                           \
00441       ace_yychar = (Token);                                             \
00442       ace_yylval = (Value);                                             \
00443       ace_yychar1 = ACE_YYTRANSLATE (ace_yychar);                               \
00444       ACE_YYPOPSTACK;                                           \
00445       goto ace_yybackup;                                                \
00446     }                                                           \
00447   else                                                          \
00448     {                                                           \
00449       ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, ACE_LIB_TEXT ("syntax error: cannot back up"));                   \
00450       ACE_YYERROR;                                                      \
00451     }                                                           \
00452 while (0)
00453 
00454 #define ACE_YYTERROR    1
00455 #define ACE_YYERRCODE   256
00456 
00457 
00458 /* ACE_YYLLOC_DEFAULT -- Compute the default location (before the actions
00459    are run).
00460 
00461    When ACE_YYLLOC_DEFAULT is run, CURRENT is set the location of the
00462    first token.  By default, to implement support for ranges, extend
00463    its range to the last symbol.  */
00464 
00465 #ifndef ACE_YYLLOC_DEFAULT
00466 # define ACE_YYLLOC_DEFAULT(Current, Rhs, N)            \
00467    Current.last_line   = Rhs[N].last_line;      \
00468    Current.last_column = Rhs[N].last_column;
00469 #endif
00470 
00471 
00472 /* ACE_YYLEX -- calling `ace_yylex' with the right arguments.  */
00473 
00474 #if ACE_YYPURE
00475 # if ACE_YYLSP_NEEDED
00476 #  ifdef ACE_YYLEX_PARAM
00477 #   define ACE_YYLEX            ace_yylex (&ace_yylval, &ace_yylloc, ACE_YYLEX_PARAM)
00478 #  else
00479 #   define ACE_YYLEX            ace_yylex (&ace_yylval, &ace_yylloc)
00480 #  endif
00481 # else /* !ACE_YYLSP_NEEDED */
00482 #  ifdef ACE_YYLEX_PARAM
00483 #   define ACE_YYLEX            ace_yylex (&ace_yylval, ACE_YYLEX_PARAM)
00484 #  else
00485 #   define ACE_YYLEX            ace_yylex (&ace_yylval)
00486 #  endif
00487 # endif /* !ACE_YYLSP_NEEDED */
00488 #else /* !ACE_YYPURE */
00489 # define ACE_YYLEX                      ace_yylex ()
00490 #endif /* !ACE_YYPURE */
00491 
00492 
00493 /* Enable debugging if requested.  */
00494 #if ACE_YYDEBUG
00495 
00496 # ifndef ACE_YYFPRINTF
00497 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
00498 #  define ACE_YYFPRINTF ACE_OS::fprintf
00499 # endif
00500 
00501 # define ACE_YYDPRINTF(Args)                    \
00502 do {                                            \
00503   if (ace_yydebug)                                      \
00504     ACE_YYFPRINTF Args;                         \
00505 } while (0)
00506 /* Nonzero means print parse trace.  It is left uninitialized so that
00507    multiple parsers can coexist.  */
00508 int ace_yydebug;
00509 #else /* !ACE_YYDEBUG */
00510 # define ACE_YYDPRINTF(Args)
00511 #endif /* !ACE_YYDEBUG */
00512 
00513 /* ACE_YYINITDEPTH -- initial size of the parser's stacks.  */
00514 #ifndef ACE_YYINITDEPTH
00515 # define ACE_YYINITDEPTH 200
00516 #endif
00517 
00518 /* ACE_YYMAXDEPTH -- maximum size the stacks can grow to (effective only
00519    if the built-in stack extension method is used).
00520 
00521    Do not make this value too large; the results are undefined if
00522    SIZE_MAX < ACE_YYSTACK_BYTES (ACE_YYMAXDEPTH)
00523    evaluated with infinite-precision integer arithmetic.  */
00524 
00525 #if ACE_YYMAXDEPTH == 0
00526 # undef ACE_YYMAXDEPTH
00527 #endif
00528 
00529 #ifndef ACE_YYMAXDEPTH
00530 # define ACE_YYMAXDEPTH 10000
00531 #endif
00532 
00533 #ifdef ACE_YYERROR_VERBOSE
00534 
00535 # ifndef ace_yystrlen
00536 #  if defined (__GLIBC__) && defined (_STRING_H)
00537 #   define ace_yystrlen strlen
00538 #  else
00539 /* Return the length of ACE_YYSTR.  */
00540 static ACE_YYSIZE_T
00541 #   if defined (__STDC__) || defined (__cplusplus)
00542 ace_yystrlen (const ACE_TCHAR *ace_yystr)
00543 #   else
00544 ace_yystrlen (ace_yystr)
00545      const ACE_TCHAR *ace_yystr;
00546 #   endif
00547 {
00548   register const ACE_TCHAR *ace_yys = ace_yystr;
00549 
00550   while (*ace_yys++ != '\0')
00551     continue;
00552 
00553   return ace_yys - ace_yystr - 1;
00554 }
00555 #  endif
00556 # endif
00557 
00558 # ifndef ace_yystpcpy
00559 #  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
00560 #   define ace_yystpcpy stpcpy
00561 #  else
00562 /* Copy ACE_YYSRC to ACE_YYDEST, returning the address of the terminating '\0' in
00563    ACE_YYDEST.  */
00564 static char *
00565 #   if defined (__STDC__) || defined (__cplusplus)
00566 ace_yystpcpy (ACE_TCHAR *ace_yydest, const ACE_TCHAR *ace_yysrc)
00567 #   else
00568 ace_yystpcpy (ace_yydest, ace_yysrc)
00569      ACE_TCHAR *ace_yydest;
00570      const ACE_TCHAR *ace_yysrc;
00571 #   endif
00572 {
00573   register ACE_TCHAR *ace_yyd = ace_yydest;
00574   register const ACE_TCHAR *ace_yys = ace_yysrc;
00575 
00576   while ((*ace_yyd++ = *ace_yys++) != '\0')
00577     continue;
00578 
00579   return ace_yyd - 1;
00580 }
00581 #  endif
00582 # endif
00583 #endif
00584 
00585 
00586 
00587 /* The user can define ACE_YYPARSE_PARAM as the name of an argument to be passed
00588    into ace_yyparse.  The argument should have type void *.
00589    It should actually point to an object.
00590    Grammar actions can access the variable by casting it
00591    to the proper pointer type.  */
00592 
00593 #ifdef ACE_YYPARSE_PARAM
00594 # if defined (__STDC__) || defined (__cplusplus)
00595 #  define ACE_YYPARSE_PARAM_ARG void *ACE_YYPARSE_PARAM
00596 #  define ACE_YYPARSE_PARAM_DECL
00597 # else
00598 #  define ACE_YYPARSE_PARAM_ARG ACE_YYPARSE_PARAM
00599 #  define ACE_YYPARSE_PARAM_DECL void *ACE_YYPARSE_PARAM;
00600 # endif
00601 #else /* !ACE_YYPARSE_PARAM */
00602 # define ACE_YYPARSE_PARAM_ARG
00603 # define ACE_YYPARSE_PARAM_DECL
00604 #endif /* !ACE_YYPARSE_PARAM */
00605 
00606 /* Prevent warning if -Wstrict-prototypes.  */
00607 #ifdef __GNUC__
00608 # ifdef ACE_YYPARSE_PARAM
00609 int ace_yyparse (void *);
00610 # else
00611 int ace_yyparse (void);
00612 # endif
00613 #endif
00614 
00615 /* ACE_YY_DECL_VARIABLES -- depending whether we use a pure parser,
00616    variables are global, or local to ACE_YYPARSE.  */
00617 
00618 #define ACE_YY_DECL_NON_LSP_VARIABLES                   \
00619 /* The lookahead symbol.  */                            \
00620 int ace_yychar;                                         \
00621                                                         \
00622 /* The semantic value of the lookahead symbol. */       \
00623 ACE_YYSTYPE ace_yylval;                                         \
00624                                                         \
00625 /* Number of parse errors so far.  */                   \
00626 int ace_yynerrs;
00627 
00628 #if ACE_YYLSP_NEEDED
00629 # define ACE_YY_DECL_VARIABLES                  \
00630 ACE_YY_DECL_NON_LSP_VARIABLES                   \
00631                                                 \
00632 /* Location data for the lookahead symbol.  */  \
00633 ACE_YYLTYPE ace_yylloc;
00634 #else
00635 # define ACE_YY_DECL_VARIABLES                  \
00636 ACE_YY_DECL_NON_LSP_VARIABLES
00637 #endif
00638 
00639 
00640 /* If nonreentrant, generate the variables here. */
00641 
00642 #if !ACE_YYPURE
00643 ACE_YY_DECL_VARIABLES
00644 #endif  /* !ACE_YYPURE */
00645 
00646 int
00647 ace_yyparse (ACE_YYPARSE_PARAM_ARG)
00648      ACE_YYPARSE_PARAM_DECL
00649 {
00650   /* If reentrant, generate the variables here. */
00651 #if ACE_YYPURE
00652   ACE_YY_DECL_VARIABLES
00653 #endif  /* !ACE_YYPURE */
00654 
00655   register int ace_yystate;
00656   register int ace_yyn;
00657   int ace_yyresult;
00658   /* Number of tokens to shift before error messages enabled.  */
00659   int ace_yyerrstatus;
00660   /* Lookahead token as an internal (translated) token number.  */
00661   int ace_yychar1 = 0;
00662 
00663   /* Three stacks and their tools:
00664      `ace_yyss': related to states,
00665      `ace_yyvs': related to semantic values,
00666      `ace_yyls': related to locations.
00667 
00668      Refer to the stacks thru separate pointers, to allow ace_yyoverflow
00669      to reallocate them elsewhere.  */
00670 
00671   /* The state stack. */
00672   short ace_yyssa[ACE_YYINITDEPTH];
00673   short *ace_yyss = ace_yyssa;
00674   register short *ace_yyssp;
00675 
00676   /* The semantic value stack.  */
00677   ACE_YYSTYPE ace_yyvsa[ACE_YYINITDEPTH];
00678   ACE_YYSTYPE *ace_yyvs = ace_yyvsa;
00679   register ACE_YYSTYPE *ace_yyvsp;
00680 
00681 #if ACE_YYLSP_NEEDED
00682   /* The location stack.  */
00683   ACE_YYLTYPE ace_yylsa[ACE_YYINITDEPTH];
00684   ACE_YYLTYPE *ace_yyls = ace_yylsa;
00685   ACE_YYLTYPE *ace_yylsp;
00686 #endif
00687 
00688 #if ACE_YYLSP_NEEDED
00689 # define ACE_YYPOPSTACK   (ace_yyvsp--, ace_yyssp--, ace_yylsp--)
00690 #else
00691 # define ACE_YYPOPSTACK   (ace_yyvsp--, ace_yyssp--)
00692 #endif
00693 
00694   ACE_YYSIZE_T ace_yystacksize = ACE_YYINITDEPTH;
00695 
00696 
00697   /* The variables used to return semantic value and location from the
00698      action routines.  */
00699   ACE_YYSTYPE ace_yyval;
00700 #if ACE_YYLSP_NEEDED
00701   ACE_YYLTYPE ace_yyloc;
00702 #endif
00703 
00704   /* When reducing, the number of symbols on the RHS of the reduced
00705      rule. */
00706   int ace_yylen;
00707 
00708   ACE_YYDPRINTF ((stderr, ACE_LIB_TEXT ("Starting parse\n")));
00709 
00710   ace_yystate = 0;
00711   ace_yyerrstatus = 0;
00712   ace_yynerrs = 0;
00713   ace_yychar = ACE_YYEMPTY;             /* Cause a token to be read.  */
00714 
00715   /* Initialize stack pointers.
00716      Waste one element of value and location stack
00717      so that they stay on the same level as the state stack.
00718      The wasted elements are never initialized.  */
00719 
00720   ace_yyssp = ace_yyss;
00721   ace_yyvsp = ace_yyvs;
00722 #if ACE_YYLSP_NEEDED
00723   ace_yylsp = ace_yyls;
00724 #endif
00725   goto ace_yysetstate;
00726 
00727 /*------------------------------------------------------------.
00728 | ace_yynewstate -- Push a new state, which is found in ace_yystate.  |
00729 `------------------------------------------------------------*/
00730  ace_yynewstate:
00731   /* In all cases, when you get here, the value and location stacks
00732      have just been pushed. so pushing a state here evens the stacks.
00733      */
00734   ace_yyssp++;
00735 
00736  ace_yysetstate:
00737   *ace_yyssp = ace_yystate;
00738 
00739   if (ace_yyssp >= ace_yyss + ace_yystacksize - 1)
00740     {
00741       /* Get the current used size of the three stacks, in elements.  */
00742       ACE_YYSIZE_T ace_yysize = ace_yyssp - ace_yyss + 1;
00743 
00744 #ifdef ace_yyoverflow
00745       {
00746         /* Give user a chance to reallocate the stack. Use copies of
00747            these so that the &'s don't force the real ones into
00748            memory.  */
00749         ACE_YYSTYPE *ace_yyvs1 = ace_yyvs;
00750         short *ace_yyss1 = ace_yyss;
00751 
00752         /* Each stack pointer address is followed by the size of the
00753            data in use in that stack, in bytes.  */
00754 # if ACE_YYLSP_NEEDED
00755         ACE_YYLTYPE *ace_yyls1 = ace_yyls;
00756         /* This used to be a conditional around just the two extra args,
00757            but that might be undefined if ace_yyoverflow is a macro.  */
00758         ace_yyoverflow (ACE_LIB_TEXT ("parser stack overflow"),
00759                     &ace_yyss1, ace_yysize * sizeof (*ace_yyssp),
00760                     &ace_yyvs1, ace_yysize * sizeof (*ace_yyvsp),
00761                     &ace_yyls1, ace_yysize * sizeof (*ace_yylsp),
00762                     &ace_yystacksize);
00763         ace_yyls = ace_yyls1;
00764 # else
00765         ace_yyoverflow (ACE_LIB_TEXT ("parser stack overflow"),
00766                     &ace_yyss1, ace_yysize * sizeof (*ace_yyssp),
00767                     &ace_yyvs1, ace_yysize * sizeof (*ace_yyvsp),
00768                     &ace_yystacksize);
00769 # endif
00770         ace_yyss = ace_yyss1;
00771         ace_yyvs = ace_yyvs1;
00772       }
00773 #else /* no ace_yyoverflow */
00774 # ifndef ACE_YYSTACK_RELOCATE
00775       goto ace_yyoverflowlab;
00776 # else
00777       /* Extend the stack our own way.  */
00778       if (ace_yystacksize >= ACE_YYMAXDEPTH)
00779         goto ace_yyoverflowlab;
00780       ace_yystacksize *= 2;
00781       if (ace_yystacksize > ACE_YYMAXDEPTH)
00782         ace_yystacksize = ACE_YYMAXDEPTH;
00783 
00784       {
00785         short *ace_yyss1 = ace_yyss;
00786         union ace_yyalloc *ace_yyptr =
00787           (union ace_yyalloc *) ACE_YYSTACK_ALLOC (ACE_YYSTACK_BYTES (ace_yystacksize));
00788         if (! ace_yyptr)
00789           goto ace_yyoverflowlab;
00790         ACE_YYSTACK_RELOCATE (ace_yyss);
00791         ACE_YYSTACK_RELOCATE (ace_yyvs);
00792 # if ACE_YYLSP_NEEDED
00793         ACE_YYSTACK_RELOCATE (ace_yyls);
00794 # endif
00795 # undef ACE_YYSTACK_RELOCATE
00796         if (ace_yyss1 != ace_yyssa)
00797           ACE_YYSTACK_FREE (ace_yyss1);
00798       }
00799 # endif
00800 #endif /* no ace_yyoverflow */
00801 
00802       ace_yyssp = ace_yyss + ace_yysize - 1;
00803       ace_yyvsp = ace_yyvs + ace_yysize - 1;
00804 #if ACE_YYLSP_NEEDED
00805       ace_yylsp = ace_yyls + ace_yysize - 1;
00806 #endif
00807 
00808       ACE_YYDPRINTF ((stderr, ACE_LIB_TEXT ("Stack size increased to %lu\n"),
00809                   (unsigned long int) ace_yystacksize));
00810 
00811       if (ace_yyssp >= ace_yyss + ace_yystacksize - 1)
00812         ACE_YYABORT;
00813     }
00814 
00815   ACE_YYDPRINTF ((stderr, ACE_LIB_TEXT ("Entering state %d\n"), ace_yystate));
00816 
00817   goto ace_yybackup;
00818 
00819 
00820 /*-----------.
00821 | ace_yybackup.  |
00822 `-----------*/
00823 ace_yybackup:
00824 
00825 /* Do appropriate processing given the current state.  */
00826 /* Read a lookahead token if we need one and don't already have one.  */
00827 /* ace_yyresume: */
00828 
00829   /* First try to decide what to do without reference to lookahead token.  */
00830 
00831   ace_yyn = ace_yypact[ace_yystate];
00832   if (ace_yyn == ACE_YYFLAG)
00833     goto ace_yydefault;
00834 
00835   /* Not known => get a lookahead token if don't already have one.  */
00836 
00837   /* ace_yychar is either ACE_YYEMPTY or ACE_YYEOF
00838      or a valid token in external form.  */
00839 
00840   if (ace_yychar == ACE_YYEMPTY)
00841     {
00842       ACE_YYDPRINTF ((stderr, ACE_LIB_TEXT ("Reading a token: ")));
00843       ace_yychar = ACE_YYLEX;
00844     }
00845 
00846   /* Convert token to internal form (in ace_yychar1) for indexing tables with */
00847 
00848   if (ace_yychar <= 0)          /* This means end of input. */
00849     {
00850       ace_yychar1 = 0;
00851       ace_yychar = ACE_YYEOF;           /* Don't call ACE_YYLEX any more */
00852 
00853       ACE_YYDPRINTF ((stderr, ACE_LIB_TEXT ("Now at end of input.\n")));
00854     }
00855   else
00856     {
00857       ace_yychar1 = ACE_YYTRANSLATE (ace_yychar);
00858 
00859 #if ACE_YYDEBUG
00860      /* We have to keep this `#if ACE_YYDEBUG', since we use variables
00861         which are defined only if `ACE_YYDEBUG' is set.  */
00862       if (ace_yydebug)
00863         {
00864           ACE_YYFPRINTF (stderr, ACE_LIB_TEXT ("Next token is %d (%s"),
00865                      ace_yychar, ace_yytname[ace_yychar1]);
00866           /* Give the individual parser a way to print the precise
00867              meaning of a token, for further debugging info.  */
00868 # ifdef ACE_YYPRINT
00869           ACE_YYPRINT (stderr, ace_yychar, ace_yylval);
00870 # endif
00871           ACE_YYFPRINTF (stderr, ACE_LIB_TEXT (")\n"));
00872         }
00873 #endif
00874     }
00875 
00876   ace_yyn += ace_yychar1;
00877   if (ace_yyn < 0 || ace_yyn > ACE_YYLAST || ace_yycheck[ace_yyn] != ace_yychar1)
00878     goto ace_yydefault;
00879 
00880   ace_yyn = ace_yytable[ace_yyn];
00881 
00882   /* ace_yyn is what to do for this token type in this state.
00883      Negative => reduce, -ace_yyn is rule number.
00884      Positive => shift, ace_yyn is new state.
00885        New state is final state => don't bother to shift,
00886        just return success.
00887      0, or most negative number => error.  */
00888 
00889   if (ace_yyn < 0)
00890     {
00891       if (ace_yyn == ACE_YYFLAG)
00892         goto ace_yyerrlab;
00893       ace_yyn = -ace_yyn;
00894       goto ace_yyreduce;
00895     }
00896   else if (ace_yyn == 0)
00897     goto ace_yyerrlab;
00898 
00899   if (ace_yyn == ACE_YYFINAL)
00900     ACE_YYACCEPT;
00901 
00902   /* Shift the lookahead token.  */
00903   ACE_YYDPRINTF ((stderr, ACE_LIB_TEXT ("Shifting token %d (%s), "),
00904               ace_yychar, ace_yytname[ace_yychar1]));
00905 
00906   /* Discard the token being shifted unless it is eof.  */
00907   if (ace_yychar != ACE_YYEOF)
00908     ace_yychar = ACE_YYEMPTY;
00909 
00910   *++ace_yyvsp = ace_yylval;
00911 #if ACE_YYLSP_NEEDED
00912   *++ace_yylsp = ace_yylloc;
00913 #endif
00914 
00915   /* Count tokens shifted since error; after three, turn off error
00916      status.  */
00917   if (ace_yyerrstatus)
00918     ace_yyerrstatus--;
00919 
00920   ace_yystate = ace_yyn;
00921   goto ace_yynewstate;
00922 
00923 
00924 /*-----------------------------------------------------------.
00925 | ace_yydefault -- do the default action for the current state.  |
00926 `-----------------------------------------------------------*/
00927 ace_yydefault:
00928   ace_yyn = ace_yydefact[ace_yystate];
00929   if (ace_yyn == 0)
00930     goto ace_yyerrlab;
00931   goto ace_yyreduce;
00932 
00933 
00934 /*-----------------------------.
00935 | ace_yyreduce -- Do a reduction.  |
00936 `-----------------------------*/
00937 ace_yyreduce:
00938   /* ace_yyn is the number of a rule to reduce with.  */
00939   ace_yylen = ace_yyr2[ace_yyn];
00940 
00941   /* If ACE_YYLEN is nonzero, implement the default value of the action:
00942      `$$ = $1'.
00943 
00944      Otherwise, the following line sets ACE_YYVAL to the semantic value of
00945      the lookahead token.  This behavior is undocumented and Bison
00946      users should not rely upon it.  Assigning to ACE_YYVAL
00947      unconditionally makes the parser a bit smaller, and it avoids a
00948      GCC warning that ACE_YYVAL may be used uninitialized.  */
00949   ace_yyval = ace_yyvsp[1-ace_yylen];
00950 
00951 #if ACE_YYLSP_NEEDED
00952   /* Similarly for the default location.  Let the user run additional
00953      commands if for instance locations are ranges.  */
00954   ace_yyloc = ace_yylsp[1-ace_yylen];
00955   ACE_YYLLOC_DEFAULT (ace_yyloc, (ace_yylsp - ace_yylen), ace_yylen);
00956 #endif
00957 
00958 #if ACE_YYDEBUG
00959   /* We have to keep this `#if ACE_YYDEBUG', since we use variables which
00960      are defined only if `ACE_YYDEBUG' is set.  */
00961   if (ace_yydebug)
00962     {
00963       int ace_yyi;
00964 
00965       ACE_YYFPRINTF (stderr, ACE_LIB_TEXT ("Reducing via rule %d (line %d), "),
00966                  ace_yyn, ace_yyrline[ace_yyn]);
00967 
00968       /* Print the symbols being reduced, and their result.  */
00969       for (ace_yyi = ace_yyprhs[ace_yyn]; ace_yyrhs[ace_yyi] > 0; ace_yyi++)
00970         ACE_YYFPRINTF (stderr, ACE_LIB_TEXT ("%s "), ace_yytname[ace_yyrhs[ace_yyi]]);
00971       ACE_YYFPRINTF (stderr, ACE_LIB_TEXT (" -> %s\n"), ace_yytname[ace_yyr1[ace_yyn]]);
00972     }
00973 #endif
00974 
00975   switch (ace_yyn) {
00976 
00977 case 1:
00978 {
00979       if (ace_yyvsp[0].parse_node_ != 0)
00980       {
00981         ace_yyvsp[0].parse_node_->apply (ACE_SVC_CONF_PARAM->yyerrno); delete ace_yyvsp[0].parse_node_;
00982       }
00983       ACE_SVC_CONF_PARAM->obstack.release ();
00984     ;
00985     break;}
00986 case 2:
00987 {
00988       ACE_SVC_CONF_PARAM->obstack.release ();
00989     ;
00990     break;}
00991 case 10:
00992 {
00993       if (ace_yyvsp[-1].svc_record_ != 0)
00994         ace_yyval.parse_node_ = new ACE_Dynamic_Node (ace_yyvsp[-1].svc_record_, ace_yyvsp[0].ident_);
00995       else
00996         ace_yyval.parse_node_ = 0;
00997     ;
00998     break;}
00999 case 11:
01000 {
01001       ace_yyval.parse_node_ = new ACE_Static_Node (ace_yyvsp[-1].ident_, ace_yyvsp[0].ident_);
01002     ;
01003     break;}
01004 case 12:
01005 {
01006       ace_yyval.parse_node_ = new ACE_Suspend_Node (ace_yyvsp[0].ident_);
01007     ;
01008     break;}
01009 case 13:
01010 {
01011       ace_yyval.parse_node_ = new ACE_Resume_Node (ace_yyvsp[0].ident_);
01012     ;
01013     break;}
01014 case 14:
01015 {
01016       ace_yyval.parse_node_ = new ACE_Remove_Node (ace_yyvsp[0].ident_);
01017     ;
01018     break;}
01019 case 15:
01020 {
01021       ace_yyval.parse_node_ = new ACE_Stream_Node (ace_yyvsp[-1].static_node_, ace_yyvsp[0].parse_node_);
01022     ;
01023     break;}
01024 case 16:
01025 { ace_yyval.static_node_ = new ACE_Static_Node (ace_yyvsp[0].ident_); ;
01026     break;}
01027 case 17:
01028 {
01029       ace_yyval.parse_node_ = new ACE_Dummy_Node (ace_yyvsp[-1].static_node_, ace_yyvsp[0].parse_node_);
01030     ;
01031     break;}
01032 case 18:
01033 {
01034     ;
01035     break;}
01036 case 19:
01037 {
01038     ;
01039     break;}
01040 case 20:
01041 {
01042       // Initialize left context...
01043       ace_yyval.static_node_ = ace_yyvsp[-1].static_node_;
01044     ;
01045     break;}
01046 case 21:
01047 {
01048       ace_yyval.parse_node_ = ace_yyvsp[-1].parse_node_;
01049     ;
01050     break;}
01051 case 22:
01052 { ace_yyval.parse_node_ = 0; ;
01053     break;}
01054 case 23:
01055 {
01056       if (ace_yyvsp[0].parse_node_ != 0)
01057         {
01058           ace_yyvsp[0].parse_node_->link (ace_yyvsp[-1].parse_node_);
01059           ace_yyval.parse_node_ = ace_yyvsp[0].parse_node_;
01060         }
01061     ;
01062     break;}
01063 case 24:
01064 { ace_yyval.parse_node_ = 0; ;
01065     break;}
01066 case 25:
01067 {
01068       ACE_Static_Node *svc_type = ace_yyvsp[0].static_node_;
01069 
01070       if (svc_type != 0)
01071         {
01072           ACE_Static_Node *module = ace_yyvsp[-2].static_node_;
01073 
01074           ACE_ARGV args (svc_type->parameters ());
01075           ACE_Module_Type *mt = ace_get_module (module,
01076                                                 svc_type,
01077                                                 ACE_SVC_CONF_PARAM->yyerrno);
01078           ACE_Stream_Type *st =
01079             ACE_dynamic_cast (ACE_Stream_Type *,
01080                               ACE_const_cast (ACE_Service_Type_Impl *,
01081                                               module->record ()->type ()));
01082 
01083           if (mt->init (args.argc (), args.argv ()) == -1
01084               || st->push (mt) == -1)
01085             {
01086               ACE_ERROR ((LM_ERROR,
01087                           ACE_LIB_TEXT ("dynamic initialization failed for Module %s\n"),
01088                           svc_type->name ()));
01089               ACE_SVC_CONF_PARAM->yyerrno++;
01090             }
01091         }
01092     ;
01093     break;}
01094 case 26:
01095 {
01096       ACE_Module_Type *mt = ace_get_module (ace_yyvsp[-2].static_node_,
01097                                             ace_yyvsp[0].static_node_->name (),
01098                                             ACE_SVC_CONF_PARAM->yyerrno);
01099 
01100       if (((ACE_Stream_Type *) (ace_yyvsp[-2].static_node_)->record ()->type ())->push (mt) == -1)
01101         {
01102           ACE_ERROR ((LM_ERROR,
01103                       ACE_LIB_TEXT ("Problem with static\n")));
01104           ACE_SVC_CONF_PARAM->yyerrno++;
01105         }
01106     ;
01107     break;}
01108 case 27:
01109 {
01110       ACE_Module_Type *mt = ace_get_module (ace_yyvsp[-2].static_node_,
01111                                             ace_yyvsp[0].static_node_->name (),
01112                                             ACE_SVC_CONF_PARAM->yyerrno);
01113       if (mt != 0)
01114         mt->suspend ();
01115     ;
01116     break;}
01117 case 28:
01118 {
01119       ACE_Module_Type *mt = ace_get_module (ace_yyvsp[-2].static_node_,
01120                                             ace_yyvsp[0].static_node_->name (),
01121                                             ACE_SVC_CONF_PARAM->yyerrno);
01122       if (mt != 0)
01123         mt->resume ();
01124     ;
01125     break;}
01126 case 29:
01127 {
01128       ACE_Static_Node *stream = ace_yyvsp[-2].static_node_;
01129       ACE_Static_Node *module = ace_yyvsp[0].static_node_;
01130       ACE_Module_Type *mt = ace_get_module (stream,
01131                                             module->name (),
01132                                             ACE_SVC_CONF_PARAM->yyerrno);
01133 
01134       ACE_Stream_Type *st =
01135         ACE_dynamic_cast (ACE_Stream_Type *,
01136                           ACE_const_cast (ACE_Service_Type_Impl *,
01137                                           stream->record ()->type ()));
01138       if (mt != 0 && st->remove (mt) == -1)
01139         {
01140           ACE_ERROR ((LM_ERROR,
01141                       ACE_LIB_TEXT ("cannot remove Module_Type %s from STREAM_Type %s\n"),
01142                       module->name (),
01143                       stream->name ()));
01144           ACE_SVC_CONF_PARAM->yyerrno++;
01145         }
01146     ;
01147     break;}
01148 case 30:
01149 {
01150       u_int flags
01151         = ACE_Service_Type::DELETE_THIS
01152         | (ace_yyvsp[-1].location_node_->dispose () == 0 ? 0 : ACE_Service_Type::DELETE_OBJ);
01153       ACE_Service_Object_Exterminator gobbler = 0;
01154       void *sym = ace_yyvsp[-1].location_node_->symbol (ACE_SVC_CONF_PARAM->yyerrno, &gobbler);
01155 
01156       if (sym != 0)
01157         {
01158           ACE_Service_Type_Impl *stp
01159             = ACE_Service_Config::create_service_type_impl (ace_yyvsp[-3].ident_,
01160                                                             ace_yyvsp[-2].type_,
01161                                                             sym,
01162                                                             flags,
01163                                                             gobbler);
01164           if (stp == 0)
01165             ++ACE_SVC_CONF_PARAM->yyerrno;
01166 
01167           ace_yyval.svc_record_ = new ACE_Service_Type (ace_yyvsp[-3].ident_,
01168                                      stp,
01169                                      ace_yyvsp[-1].location_node_->dll (),
01170                                      ace_yyvsp[0].type_);
01171         }
01172       else
01173         {
01174           ACE_ERROR ((LM_ERROR,
01175                       ACE_LIB_TEXT ("Unable to find service: %s\n"),
01176                       ace_yyvsp[-3].ident_));
01177           ++ACE_SVC_CONF_PARAM->yyerrno;
01178           ace_yyval.svc_record_ = 0;
01179         }
01180       delete ace_yyvsp[-1].location_node_;
01181     ;
01182     break;}
01183 case 31:
01184 {
01185       ace_yyval.type_ = 1;
01186     ;
01187     break;}
01188 case 32:
01189 {
01190       ace_yyval.type_ = 0;
01191     ;
01192     break;}
01193 case 33:
01194 {
01195       ace_yyval.type_ = 1;
01196     ;
01197     break;}
01198 case 34:
01199 {
01200       ace_yyval.location_node_ = new ACE_Object_Node (ace_yyvsp[-2].ident_, ace_yyvsp[0].ident_);
01201     ;
01202     break;}
01203 case 35:
01204 {
01205       ace_yyval.location_node_ = new ACE_Function_Node (ace_yyvsp[-4].ident_, ace_yyvsp[-2].ident_);
01206     ;
01207     break;}
01208 case 36:
01209 {
01210       ace_yyval.location_node_ = new ACE_Static_Function_Node (ace_yyvsp[-2].ident_);
01211     ;
01212     break;}
01213 case 37:
01214 {
01215       ace_yyval.type_ = ACE_MODULE_T;
01216     ;
01217     break;}
01218 case 38:
01219 {
01220       ace_yyval.type_ = ACE_SVC_OBJ_T;
01221     ;
01222     break;}
01223 case 39:
01224 {
01225       ace_yyval.type_ = ACE_STREAM_T;
01226     ;
01227     break;}
01228 case 41:
01229 { ace_yyval.ident_ = 0; ;
01230     break;}
01231 }
01232 
01233 
01234 
01235   ace_yyvsp -= ace_yylen;
01236   ace_yyssp -= ace_yylen;
01237 #if ACE_YYLSP_NEEDED
01238   ace_yylsp -= ace_yylen;
01239 #endif
01240 
01241 #if ACE_YYDEBUG
01242   if (ace_yydebug)
01243     {
01244       short *ace_yyssp1 = ace_yyss - 1;
01245       ACE_YYFPRINTF (stderr, ACE_LIB_TEXT ("state stack now"));
01246       while (ace_yyssp1 != ace_yyssp)
01247         ACE_YYFPRINTF (stderr, ACE_LIB_TEXT (" %d"), *++ace_yyssp1);
01248       ACE_YYFPRINTF (stderr, ACE_LIB_TEXT ("\n"));
01249     }
01250 #endif
01251 
01252   *++ace_yyvsp = ace_yyval;
01253 #if ACE_YYLSP_NEEDED
01254   *++ace_yylsp = ace_yyloc;
01255 #endif
01256 
01257   /* Now `shift' the result of the reduction.  Determine what state
01258      that goes to, based on the state we popped back to and the rule
01259      number reduced by.  */
01260 
01261   ace_yyn = ace_yyr1[ace_yyn];
01262 
01263   ace_yystate = ace_yypgoto[ace_yyn - ACE_YYNTBASE] + *ace_yyssp;
01264   if (ace_yystate >= 0 && ace_yystate <= ACE_YYLAST && ace_yycheck[ace_yystate] == *ace_yyssp)
01265     ace_yystate = ace_yytable[ace_yystate];
01266   else
01267     ace_yystate = ace_yydefgoto[ace_yyn - ACE_YYNTBASE];
01268 
01269   goto ace_yynewstate;
01270 
01271 
01272 /*------------------------------------.
01273 | ace_yyerrlab -- here on detecting error |
01274 `------------------------------------*/
01275 ace_yyerrlab:
01276   /* If not already recovering from an error, report this error.  */
01277   if (!ace_yyerrstatus)
01278     {
01279       ++ace_yynerrs;
01280 
01281 #ifdef ACE_YYERROR_VERBOSE
01282       ace_yyn = ace_yypact[ace_yystate];
01283 
01284       if (ace_yyn > ACE_YYFLAG && ace_yyn < ACE_YYLAST)
01285         {
01286           ACE_YYSIZE_T ace_yysize = 0;
01287           ACE_TCHAR *ace_yymsg;
01288           int ace_yyx, ace_yycount;
01289 
01290           ace_yycount = 0;
01291           /* Start ACE_YYX at -ACE_YYN if negative to avoid negative indexes in
01292              ACE_YYCHECK.  */
01293           for (ace_yyx = ace_yyn < 0 ? -ace_yyn : 0;
01294                ace_yyx < (int) (sizeof (ace_yytname) / sizeof (ACE_TCHAR *)); ace_yyx++)
01295             if (ace_yycheck[ace_yyx + ace_yyn] == ace_yyx)
01296               ace_yysize += ace_yystrlen (ace_yytname[ace_yyx]) + 15, ace_yycount++;
01297           ace_yysize += ace_yystrlen (ACE_LIB_TEXT ("parse error, unexpected ")) + 1;
01298           ace_yysize += ace_yystrlen (ace_yytname[ACE_YYTRANSLATE (ace_yychar)]);
01299           ace_yymsg = (ACE_TCHAR *) ACE_YYSTACK_ALLOC (ace_yysize);
01300           if (ace_yymsg != 0)
01301             {
01302               ACE_TCHAR *ace_yyp = ace_yystpcpy (ace_yymsg, ACE_LIB_TEXT ("parse error, unexpected "));
01303               ace_yyp = ace_yystpcpy (ace_yyp, ace_yytname[ACE_YYTRANSLATE (ace_yychar)]);
01304 
01305               if (ace_yycount < 5)
01306                 {
01307                   ace_yycount = 0;
01308                   for (ace_yyx = ace_yyn < 0 ? -ace_yyn : 0;
01309                        ace_yyx < (int) (sizeof (ace_yytname) / sizeof (ACE_TCHAR *));
01310                        ace_yyx++)
01311                     if (ace_yycheck[ace_yyx + ace_yyn] == ace_yyx)
01312                       {
01313                         const ACE_TCHAR *ace_yyq = ! ace_yycount ? ACE_LIB_TEXT (", expecting ") : ACE_LIB_TEXT (" or ");
01314                         ace_yyp = ace_yystpcpy (ace_yyp, ace_yyq);
01315                         ace_yyp = ace_yystpcpy (ace_yyp, ace_yytname[ace_yyx]);
01316                         ace_yycount++;
01317                       }
01318                 }
01319               ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, ace_yymsg);
01320               ACE_YYSTACK_FREE (ace_yymsg);
01321             }
01322           else
01323             ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, ACE_LIB_TEXT ("parse error; also virtual memory exhausted"));
01324         }
01325       else
01326 #endif /* defined (ACE_YYERROR_VERBOSE) */
01327         ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, ACE_LIB_TEXT ("parse error"));
01328     }
01329   goto ace_yyerrlab1;
01330 
01331 
01332 /*--------------------------------------------------.
01333 | ace_yyerrlab1 -- error raised explicitly by an action |
01334 `--------------------------------------------------*/
01335 ace_yyerrlab1:
01336   if (ace_yyerrstatus == 3)
01337     {
01338       /* If just tried and failed to reuse lookahead token after an
01339          error, discard it.  */
01340 
01341       /* return failure if at end of input */
01342       if (ace_yychar == ACE_YYEOF)
01343         ACE_YYABORT;
01344       ACE_YYDPRINTF ((stderr, ACE_LIB_TEXT ("Discarding token %d (%s).\n"),
01345                   ace_yychar, ace_yytname[ace_yychar1]));
01346       ace_yychar = ACE_YYEMPTY;
01347     }
01348 
01349   /* Else will try to reuse lookahead token after shifting the error
01350      token.  */
01351 
01352   ace_yyerrstatus = 3;          /* Each real token shifted decrements this */
01353 
01354   goto ace_yyerrhandle;
01355 
01356 
01357 /*-------------------------------------------------------------------.
01358 | ace_yyerrdefault -- current state does not do anything special for the |
01359 | error token.                                                       |
01360 `-------------------------------------------------------------------*/
01361 ace_yyerrdefault:
01362 #if 0
01363   /* This is wrong; only states that explicitly want error tokens
01364      should shift them.  */
01365 
01366   /* If its default is to accept any token, ok.  Otherwise pop it.  */
01367   ace_yyn = ace_yydefact[ace_yystate];
01368   if (ace_yyn)
01369     goto ace_yydefault;
01370 #endif
01371 
01372 
01373 /*---------------------------------------------------------------.
01374 | ace_yyerrpop -- pop the current state because it cannot handle the |
01375 | error token                                                    |
01376 `---------------------------------------------------------------*/
01377 ace_yyerrpop:
01378   if (ace_yyssp == ace_yyss)
01379     ACE_YYABORT;
01380   ace_yyvsp--;
01381   ace_yystate = *--ace_yyssp;
01382 #if ACE_YYLSP_NEEDED
01383   ace_yylsp--;
01384 #endif
01385 
01386 #if ACE_YYDEBUG
01387   if (ace_yydebug)
01388     {
01389       short *ace_yyssp1 = ace_yyss - 1;
01390       ACE_YYFPRINTF (stderr, ACE_LIB_TEXT ("Error: state stack now"));
01391       while (ace_yyssp1 != ace_yyssp)
01392         ACE_YYFPRINTF (stderr, ACE_LIB_TEXT (" %d"), *++ace_yyssp1);
01393       ACE_YYFPRINTF (stderr, ACE_LIB_TEXT ("\n"));
01394     }
01395 #endif
01396 
01397 /*--------------.
01398 | ace_yyerrhandle.  |
01399 `--------------*/
01400 ace_yyerrhandle:
01401   ace_yyn = ace_yypact[ace_yystate];
01402   if (ace_yyn == ACE_YYFLAG)
01403     goto ace_yyerrdefault;
01404 
01405   ace_yyn += ACE_YYTERROR;
01406   if (ace_yyn < 0 || ace_yyn > ACE_YYLAST || ace_yycheck[ace_yyn] != ACE_YYTERROR)
01407     goto ace_yyerrdefault;
01408 
01409   ace_yyn = ace_yytable[ace_yyn];
01410   if (ace_yyn < 0)
01411     {
01412       if (ace_yyn == ACE_YYFLAG)
01413         goto ace_yyerrpop;
01414       ace_yyn = -ace_yyn;
01415       goto ace_yyreduce;
01416     }
01417   else if (ace_yyn == 0)
01418     goto ace_yyerrpop;
01419 
01420   if (ace_yyn == ACE_YYFINAL)
01421     ACE_YYACCEPT;
01422 
01423   ACE_YYDPRINTF ((stderr, ACE_LIB_TEXT ("Shifting error token, ")));
01424 
01425   *++ace_yyvsp = ace_yylval;
01426 #if ACE_YYLSP_NEEDED
01427   *++ace_yylsp = ace_yylloc;
01428 #endif
01429 
01430   ace_yystate = ace_yyn;
01431   goto ace_yynewstate;
01432 
01433 
01434 /*-------------------------------------.
01435 | ace_yyacceptlab -- ACE_YYACCEPT comes here.  |
01436 `-------------------------------------*/
01437 ace_yyacceptlab:
01438   ace_yyresult = 0;
01439   goto ace_yyreturn;
01440 
01441 /*-----------------------------------.
01442 | ace_yyabortlab -- ACE_YYABORT comes here.  |
01443 `-----------------------------------*/
01444 ace_yyabortlab:
01445   ace_yyresult = 1;
01446   goto ace_yyreturn;
01447 
01448 /*---------------------------------------------.
01449 | ace_yyoverflowab -- parser overflow comes here.  |
01450 `---------------------------------------------*/
01451 ace_yyoverflowlab:
01452   ace_yyerror (ACE_SVC_CONF_PARAM->yyerrno, ACE_SVC_CONF_PARAM->yylineno, ACE_LIB_TEXT ("parser stack overflow"));
01453   ace_yyresult = 2;
01454   /* Fall through.  */
01455 
01456 ace_yyreturn:
01457 #ifndef ace_yyoverflow
01458   if (ace_yyss != ace_yyssa)
01459     ACE_YYSTACK_FREE (ace_yyss);
01460 #endif
01461   return ace_yyresult;
01462 }
01463 
01464 // Prints the error string to standard output.  Cleans up the error
01465 // messages.
01466 
01467 void
01468 ace_yyerror (int ace_yyerrno, int ace_yylineno, const ACE_TCHAR *s)
01469 {
01470 #if defined (ACE_NLOGGING)
01471   ACE_UNUSED_ARG (ace_yyerrno);
01472   ACE_UNUSED_ARG (ace_yylineno);
01473   ACE_UNUSED_ARG (s);
01474 #endif /* ACE_NLOGGING */
01475 
01476   ACE_ERROR ((LM_ERROR,
01477               ACE_LIB_TEXT ("[error %d] on line %d: %s\n"),
01478               ace_yyerrno,
01479               ace_yylineno,
01480               s));
01481 }
01482 
01483 // Note that SRC_REC represents left context, which is the STREAM *
01484 // record.
01485 
01486 static ACE_Module_Type *
01487 ace_get_module (ACE_Static_Node *str_rec,
01488                 const ACE_TCHAR *svc_name,
01489                 int & ace_yyerrno)
01490 {
01491   const ACE_Service_Type *sr = str_rec->record ();
01492   const ACE_Service_Type_Impl *type = sr->type ();
01493   ACE_Stream_Type *st = sr == 0
01494     ? 0
01495     : ACE_dynamic_cast (ACE_Stream_Type *,
01496                         ACE_const_cast (ACE_Service_Type_Impl *,
01497                                         type));
01498   ACE_Module_Type *mt = st == 0 ? 0 : st->find (svc_name);
01499 
01500   if (sr == 0 || st == 0 || mt == 0)
01501     {
01502       ACE_ERROR ((LM_ERROR,
01503                   ACE_LIB_TEXT ("cannot locate Module_Type %s in STREAM_Type %s\n"),
01504                   svc_name,
01505                   str_rec->name ()));
01506       ace_yyerrno++;
01507     }
01508 
01509   return mt;
01510 }
01511 
01512 static ACE_Module_Type *
01513 ace_get_module (ACE_Static_Node *str_rec,
01514                 ACE_Static_Node *svc_type,
01515                 int & ace_yyerrno)
01516 {
01517   const ACE_Service_Type *sr = str_rec->record ();
01518   const ACE_Service_Type_Impl *type = sr->type ();
01519   ACE_Stream_Type *st = sr == 0 ? 0 : (ACE_Stream_Type *) type;
01520   const ACE_Service_Type *sv = svc_type->record ();
01521   type = sv->type ();
01522   ACE_Module_Type *mt = (ACE_Module_Type *) type;
01523   const ACE_TCHAR *module_type_name = svc_type->name ();
01524 
01525   if (sr == 0 || st == 0 || mt == 0)
01526     {
01527       ACE_ERROR ((LM_ERROR,
01528                   ACE_LIB_TEXT ("cannot locate Module_Type %s or STREAM_Type %s\n"),
01529                   module_type_name,
01530                   str_rec->name ()));
01531       ace_yyerrno++;
01532     }
01533 
01534   // Make sure that the Module has the same name as the
01535   // Module_Type object from the svc.conf file.
01536   ACE_Module<ACE_SYNCH> *mp = (ACE_Module<ACE_SYNCH> *) mt->object ();
01537 
01538   if (ACE_OS::strcmp (mp->name (), module_type_name) != 0)
01539     {
01540       ACE_DEBUG ((LM_DEBUG,
01541                   ACE_LIB_TEXT ("warning: assigning Module_Type name %s to Module %s since names differ\n"),
01542                   module_type_name,
01543                   mp->name ()));
01544       mp->name (module_type_name);
01545     }
01546 
01547   return mt;
01548 }
01549 
01550 #if defined (DEBUGGING)
01551 // Main driver program.
01552 
01553 int
01554 main (int argc, char *argv[])
01555 {
01556   ACE_Svc_Conf_Param param (stdin);
01557 
01558   // Try to reopen any filename argument to use ACE_YYIN.
01559   if (argc > 1 && (ace_yyin = freopen (argv[1], "r", stdin)) == 0)
01560     (void) ACE_OS::ACE_OS::fprintf (stderr, ACE_LIB_TEXT ("usage: %s [file]\n"), argv[0]), ACE_OS::exit (1);
01561 
01562   return ::ace_yyparse (&param);
01563 }
01564 #endif /* DEBUGGING */
01565 #endif  /* ACE_USES_CLASSIC_SVC_CONF == 1 */

Generated on Mon Jun 16 11:21:34 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002