[openib-general] [PATCH 4/6] osm: QoS parser Yacc-generated C and H grammar files

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Wed Jan 17 07:19:01 PST 2007


Hi Hal

This patch is a QoS parser Yacc-generated C and H grammar files

Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
---
 osm/include/opensm/osm_qos_parser_y.h |  214 +++
 osm/opensm/osm_qos_parser_y.c         | 3215 +++++++++++++++++++++++++++++++++
 2 files changed, 3429 insertions(+), 0 deletions(-)

diff --git a/osm/include/opensm/osm_qos_parser_y.h b/osm/include/opensm/osm_qos_parser_y.h
new file mode 100644
index 0000000..40e9205
--- /dev/null
+++ b/osm/include/opensm/osm_qos_parser_y.h
@@ -0,0 +1,214 @@
+/* A Bison parser, made by GNU Bison 1.875.  */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+/* As a special exception, when this file is copied by Bison into a
+   Bison output file, you may use that output file without restriction.
+   This special exception was added by the Free Software Foundation
+   in version 1.24 of Bison.  */
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     TK_HEX_NUMBER = 258,
+     TK_DEC_NUMBER = 259,
+     TK_WHITE = 260,
+     TK_DASH = 261,
+     TK_DOTDOT = 262,
+     TK_COMMA = 263,
+     TK_TEXT = 264,
+     TK_XML_VERSION_START = 265,
+     TK_XML_VERSION_END = 266,
+     TK_QOS_POLICY_START = 267,
+     TK_QOS_POLICY_END = 268,
+     TK_PORT_GROUPS_START = 269,
+     TK_PORT_GROUPS_END = 270,
+     TK_PORT_GROUP_START = 271,
+     TK_PORT_GROUP_END = 272,
+     TK_NAME_START = 273,
+     TK_NAME_END = 274,
+     TK_USE_START = 275,
+     TK_USE_END = 276,
+     TK_PORT_GUID_START = 277,
+     TK_PORT_GUID_END = 278,
+     TK_PORT_NAME_START = 279,
+     TK_PORT_NAME_END = 280,
+     TK_PARTITION_START = 281,
+     TK_PARTITION_END = 282,
+     TK_NODE_TYPE_START = 283,
+     TK_NODE_TYPE_END = 284,
+     TK_QOS_SETUP_START = 285,
+     TK_QOS_SETUP_END = 286,
+     TK_SL2VL_TABLES_START = 287,
+     TK_SL2VL_TABLES_END = 288,
+     TK_SL2VL_SCOPE_START = 289,
+     TK_SL2VL_SCOPE_END = 290,
+     TK_GROUP_START = 291,
+     TK_GROUP_END = 292,
+     TK_FROM_START = 293,
+     TK_FROM_END = 294,
+     TK_TO_START = 295,
+     TK_TO_END = 296,
+     TK_SL2VL_TABLE_START = 297,
+     TK_SL2VL_TABLE_END = 298,
+     TK_ACROSS_START = 299,
+     TK_ACROSS_END = 300,
+     TK_ACROSS_FROM_START = 301,
+     TK_ACROSS_FROM_END = 302,
+     TK_ACROSS_TO_START = 303,
+     TK_ACROSS_TO_END = 304,
+     TK_VLARB_TABLES_START = 305,
+     TK_VLARB_TABLES_END = 306,
+     TK_VLARB_SCOPE_START = 307,
+     TK_VLARB_SCOPE_END = 308,
+     TK_VLARB_HIGH_START = 309,
+     TK_VLARB_HIGH_END = 310,
+     TK_VLARB_LOW_START = 311,
+     TK_VLARB_LOW_END = 312,
+     TK_VLARB_HIGH_LIMIT_START = 313,
+     TK_VLARB_HIGH_LIMIT_END = 314,
+     TK_QOS_LEVELS_START = 315,
+     TK_QOS_LEVELS_END = 316,
+     TK_QOS_LEVEL_START = 317,
+     TK_QOS_LEVEL_END = 318,
+     TK_SN_START = 319,
+     TK_SN_END = 320,
+     TK_SL_START = 321,
+     TK_SL_END = 322,
+     TK_CLASS_START = 323,
+     TK_CLASS_END = 324,
+     TK_MTU_LIMIT_START = 325,
+     TK_MTU_LIMIT_END = 326,
+     TK_RATE_LIMIT_START = 327,
+     TK_RATE_LIMIT_END = 328,
+     TK_QOS_MATCH_RULES_START = 329,
+     TK_QOS_MATCH_RULES_END = 330,
+     TK_QOS_MATCH_RULE_START = 331,
+     TK_QOS_MATCH_RULE_END = 332,
+     TK_QOS_LEVEL_SN_START = 333,
+     TK_QOS_LEVEL_SN_END = 334,
+     TK_SOURCE_START = 335,
+     TK_SOURCE_END = 336,
+     TK_DESTINATION_START = 337,
+     TK_DESTINATION_END = 338,
+     TK_SERVICE_START = 339,
+     TK_SERVICE_END = 340
+   };
+#endif
+#define TK_HEX_NUMBER 258
+#define TK_DEC_NUMBER 259
+#define TK_WHITE 260
+#define TK_DASH 261
+#define TK_DOTDOT 262
+#define TK_COMMA 263
+#define TK_TEXT 264
+#define TK_XML_VERSION_START 265
+#define TK_XML_VERSION_END 266
+#define TK_QOS_POLICY_START 267
+#define TK_QOS_POLICY_END 268
+#define TK_PORT_GROUPS_START 269
+#define TK_PORT_GROUPS_END 270
+#define TK_PORT_GROUP_START 271
+#define TK_PORT_GROUP_END 272
+#define TK_NAME_START 273
+#define TK_NAME_END 274
+#define TK_USE_START 275
+#define TK_USE_END 276
+#define TK_PORT_GUID_START 277
+#define TK_PORT_GUID_END 278
+#define TK_PORT_NAME_START 279
+#define TK_PORT_NAME_END 280
+#define TK_PARTITION_START 281
+#define TK_PARTITION_END 282
+#define TK_NODE_TYPE_START 283
+#define TK_NODE_TYPE_END 284
+#define TK_QOS_SETUP_START 285
+#define TK_QOS_SETUP_END 286
+#define TK_SL2VL_TABLES_START 287
+#define TK_SL2VL_TABLES_END 288
+#define TK_SL2VL_SCOPE_START 289
+#define TK_SL2VL_SCOPE_END 290
+#define TK_GROUP_START 291
+#define TK_GROUP_END 292
+#define TK_FROM_START 293
+#define TK_FROM_END 294
+#define TK_TO_START 295
+#define TK_TO_END 296
+#define TK_SL2VL_TABLE_START 297
+#define TK_SL2VL_TABLE_END 298
+#define TK_ACROSS_START 299
+#define TK_ACROSS_END 300
+#define TK_ACROSS_FROM_START 301
+#define TK_ACROSS_FROM_END 302
+#define TK_ACROSS_TO_START 303
+#define TK_ACROSS_TO_END 304
+#define TK_VLARB_TABLES_START 305
+#define TK_VLARB_TABLES_END 306
+#define TK_VLARB_SCOPE_START 307
+#define TK_VLARB_SCOPE_END 308
+#define TK_VLARB_HIGH_START 309
+#define TK_VLARB_HIGH_END 310
+#define TK_VLARB_LOW_START 311
+#define TK_VLARB_LOW_END 312
+#define TK_VLARB_HIGH_LIMIT_START 313
+#define TK_VLARB_HIGH_LIMIT_END 314
+#define TK_QOS_LEVELS_START 315
+#define TK_QOS_LEVELS_END 316
+#define TK_QOS_LEVEL_START 317
+#define TK_QOS_LEVEL_END 318
+#define TK_SN_START 319
+#define TK_SN_END 320
+#define TK_SL_START 321
+#define TK_SL_END 322
+#define TK_CLASS_START 323
+#define TK_CLASS_END 324
+#define TK_MTU_LIMIT_START 325
+#define TK_MTU_LIMIT_END 326
+#define TK_RATE_LIMIT_START 327
+#define TK_RATE_LIMIT_END 328
+#define TK_QOS_MATCH_RULES_START 329
+#define TK_QOS_MATCH_RULES_END 330
+#define TK_QOS_MATCH_RULE_START 331
+#define TK_QOS_MATCH_RULE_END 332
+#define TK_QOS_LEVEL_SN_START 333
+#define TK_QOS_LEVEL_SN_END 334
+#define TK_SOURCE_START 335
+#define TK_SOURCE_END 336
+#define TK_DESTINATION_START 337
+#define TK_DESTINATION_END 338
+#define TK_SERVICE_START 339
+#define TK_SERVICE_END 340
+
+
+
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+typedef int YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+extern YYSTYPE yylval;
+
+
+
diff --git a/osm/opensm/osm_qos_parser_y.c b/osm/opensm/osm_qos_parser_y.c
new file mode 100644
index 0000000..2b16ccc
--- /dev/null
+++ b/osm/opensm/osm_qos_parser_y.c
@@ -0,0 +1,3215 @@
+/* A Bison parser, made by GNU Bison 1.875.  */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+/* As a special exception, when this file is copied by Bison into a
+   Bison output file, you may use that output file without restriction.
+   This special exception was added by the Free Software Foundation
+   in version 1.24 of Bison.  */
+
+/* Written by Richard Stallman by simplifying the original so called
+   ``semantic'' parser.  */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers.  */
+#define YYPURE 0
+
+/* Using locations.  */
+#define YYLSP_NEEDED 0
+
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     TK_HEX_NUMBER = 258,
+     TK_DEC_NUMBER = 259,
+     TK_WHITE = 260,
+     TK_DASH = 261,
+     TK_DOTDOT = 262,
+     TK_COMMA = 263,
+     TK_TEXT = 264,
+     TK_XML_VERSION_START = 265,
+     TK_XML_VERSION_END = 266,
+     TK_QOS_POLICY_START = 267,
+     TK_QOS_POLICY_END = 268,
+     TK_PORT_GROUPS_START = 269,
+     TK_PORT_GROUPS_END = 270,
+     TK_PORT_GROUP_START = 271,
+     TK_PORT_GROUP_END = 272,
+     TK_NAME_START = 273,
+     TK_NAME_END = 274,
+     TK_USE_START = 275,
+     TK_USE_END = 276,
+     TK_PORT_GUID_START = 277,
+     TK_PORT_GUID_END = 278,
+     TK_PORT_NAME_START = 279,
+     TK_PORT_NAME_END = 280,
+     TK_PARTITION_START = 281,
+     TK_PARTITION_END = 282,
+     TK_NODE_TYPE_START = 283,
+     TK_NODE_TYPE_END = 284,
+     TK_QOS_SETUP_START = 285,
+     TK_QOS_SETUP_END = 286,
+     TK_SL2VL_TABLES_START = 287,
+     TK_SL2VL_TABLES_END = 288,
+     TK_SL2VL_SCOPE_START = 289,
+     TK_SL2VL_SCOPE_END = 290,
+     TK_GROUP_START = 291,
+     TK_GROUP_END = 292,
+     TK_FROM_START = 293,
+     TK_FROM_END = 294,
+     TK_TO_START = 295,
+     TK_TO_END = 296,
+     TK_SL2VL_TABLE_START = 297,
+     TK_SL2VL_TABLE_END = 298,
+     TK_ACROSS_START = 299,
+     TK_ACROSS_END = 300,
+     TK_ACROSS_FROM_START = 301,
+     TK_ACROSS_FROM_END = 302,
+     TK_ACROSS_TO_START = 303,
+     TK_ACROSS_TO_END = 304,
+     TK_VLARB_TABLES_START = 305,
+     TK_VLARB_TABLES_END = 306,
+     TK_VLARB_SCOPE_START = 307,
+     TK_VLARB_SCOPE_END = 308,
+     TK_VLARB_HIGH_START = 309,
+     TK_VLARB_HIGH_END = 310,
+     TK_VLARB_LOW_START = 311,
+     TK_VLARB_LOW_END = 312,
+     TK_VLARB_HIGH_LIMIT_START = 313,
+     TK_VLARB_HIGH_LIMIT_END = 314,
+     TK_QOS_LEVELS_START = 315,
+     TK_QOS_LEVELS_END = 316,
+     TK_QOS_LEVEL_START = 317,
+     TK_QOS_LEVEL_END = 318,
+     TK_SN_START = 319,
+     TK_SN_END = 320,
+     TK_SL_START = 321,
+     TK_SL_END = 322,
+     TK_CLASS_START = 323,
+     TK_CLASS_END = 324,
+     TK_MTU_LIMIT_START = 325,
+     TK_MTU_LIMIT_END = 326,
+     TK_RATE_LIMIT_START = 327,
+     TK_RATE_LIMIT_END = 328,
+     TK_QOS_MATCH_RULES_START = 329,
+     TK_QOS_MATCH_RULES_END = 330,
+     TK_QOS_MATCH_RULE_START = 331,
+     TK_QOS_MATCH_RULE_END = 332,
+     TK_QOS_LEVEL_SN_START = 333,
+     TK_QOS_LEVEL_SN_END = 334,
+     TK_SOURCE_START = 335,
+     TK_SOURCE_END = 336,
+     TK_DESTINATION_START = 337,
+     TK_DESTINATION_END = 338,
+     TK_SERVICE_START = 339,
+     TK_SERVICE_END = 340
+   };
+#endif
+#define TK_HEX_NUMBER 258
+#define TK_DEC_NUMBER 259
+#define TK_WHITE 260
+#define TK_DASH 261
+#define TK_DOTDOT 262
+#define TK_COMMA 263
+#define TK_TEXT 264
+#define TK_XML_VERSION_START 265
+#define TK_XML_VERSION_END 266
+#define TK_QOS_POLICY_START 267
+#define TK_QOS_POLICY_END 268
+#define TK_PORT_GROUPS_START 269
+#define TK_PORT_GROUPS_END 270
+#define TK_PORT_GROUP_START 271
+#define TK_PORT_GROUP_END 272
+#define TK_NAME_START 273
+#define TK_NAME_END 274
+#define TK_USE_START 275
+#define TK_USE_END 276
+#define TK_PORT_GUID_START 277
+#define TK_PORT_GUID_END 278
+#define TK_PORT_NAME_START 279
+#define TK_PORT_NAME_END 280
+#define TK_PARTITION_START 281
+#define TK_PARTITION_END 282
+#define TK_NODE_TYPE_START 283
+#define TK_NODE_TYPE_END 284
+#define TK_QOS_SETUP_START 285
+#define TK_QOS_SETUP_END 286
+#define TK_SL2VL_TABLES_START 287
+#define TK_SL2VL_TABLES_END 288
+#define TK_SL2VL_SCOPE_START 289
+#define TK_SL2VL_SCOPE_END 290
+#define TK_GROUP_START 291
+#define TK_GROUP_END 292
+#define TK_FROM_START 293
+#define TK_FROM_END 294
+#define TK_TO_START 295
+#define TK_TO_END 296
+#define TK_SL2VL_TABLE_START 297
+#define TK_SL2VL_TABLE_END 298
+#define TK_ACROSS_START 299
+#define TK_ACROSS_END 300
+#define TK_ACROSS_FROM_START 301
+#define TK_ACROSS_FROM_END 302
+#define TK_ACROSS_TO_START 303
+#define TK_ACROSS_TO_END 304
+#define TK_VLARB_TABLES_START 305
+#define TK_VLARB_TABLES_END 306
+#define TK_VLARB_SCOPE_START 307
+#define TK_VLARB_SCOPE_END 308
+#define TK_VLARB_HIGH_START 309
+#define TK_VLARB_HIGH_END 310
+#define TK_VLARB_LOW_START 311
+#define TK_VLARB_LOW_END 312
+#define TK_VLARB_HIGH_LIMIT_START 313
+#define TK_VLARB_HIGH_LIMIT_END 314
+#define TK_QOS_LEVELS_START 315
+#define TK_QOS_LEVELS_END 316
+#define TK_QOS_LEVEL_START 317
+#define TK_QOS_LEVEL_END 318
+#define TK_SN_START 319
+#define TK_SN_END 320
+#define TK_SL_START 321
+#define TK_SL_END 322
+#define TK_CLASS_START 323
+#define TK_CLASS_END 324
+#define TK_MTU_LIMIT_START 325
+#define TK_MTU_LIMIT_END 326
+#define TK_RATE_LIMIT_START 327
+#define TK_RATE_LIMIT_END 328
+#define TK_QOS_MATCH_RULES_START 329
+#define TK_QOS_MATCH_RULES_END 330
+#define TK_QOS_MATCH_RULE_START 331
+#define TK_QOS_MATCH_RULE_END 332
+#define TK_QOS_LEVEL_SN_START 333
+#define TK_QOS_LEVEL_SN_END 334
+#define TK_SOURCE_START 335
+#define TK_SOURCE_END 336
+#define TK_DESTINATION_START 337
+#define TK_DESTINATION_END 338
+#define TK_SERVICE_START 339
+#define TK_SERVICE_END 340
+
+
+
+
+/* Copy the first part of user declarations.  */
+#line 1 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+
+/*
+ * Copyright (c) 2004-2006 Voltaire, Inc. All rights reserved.
+ * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ */
+
+/*
+ * Abstract:
+ *    Grammar of OSM QoS parser.
+ *
+ * Environment:
+ *    Linux User Mode
+ *
+ * Author:
+ *    Yevgeny Kliteynik, Mellanox
+ */
+
+#include <opensm/osm_qos_parser.h>
+#include <opensm/osm_qos_parser_y.h>
+
+static void __osm_qos_parse_tree_init();
+
+static char * __osm_qos_parser_strip_white(char * str);
+
+static void __osm_qos_parser_str2uint64(uint64_t * p_val, char * str);
+
+static void __osm_qos_parser_port_group_start();
+static void __osm_qos_parser_port_group_end();
+
+static void __osm_qos_parser_sl2vl_scope_start();
+static void __osm_qos_parser_sl2vl_scope_end();
+
+static void __osm_qos_parser_vlarb_scope_start();
+static void __osm_qos_parser_vlarb_scope_end();
+
+static void __osm_qos_parser_qos_level_start();
+static void __osm_qos_parser_qos_level_end();
+
+static void __osm_qos_parser_match_rule_start();
+static void __osm_qos_parser_match_rule_end();
+
+extern char * yytext;
+extern void yyerror (char *s);
+extern int yylex (void);
+extern FILE * yyin;
+
+#define OSM_QOS_MAX_LINE_LEN 10000
+char str_buffer[OSM_QOS_MAX_LINE_LEN];
+#define RESET_BUFFER  str_buffer[0] = '\0'
+
+int column_num;
+int line_num;
+
+osm_qos_parse_tree_t   * p_qos_parse_tree = NULL;
+osm_qos_port_group_t   * p_current_port_group = NULL;
+osm_qos_sl2vl_scope_t  * p_current_sl2vl_scope = NULL;
+osm_qos_vlarb_scope_t  * p_current_vlarb_scope = NULL;
+osm_qos_level_t        * p_current_qos_level = NULL;
+osm_qos_match_rule_t   * p_current_qos_match_rule = NULL;
+
+osm_log_t * p_osm_log = NULL;
+
+/***************************************************/
+
+
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+typedef int YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+/* Copy the second part of user declarations.  */
+
+
+/* Line 214 of yacc.c.  */
+#line 352 "y.tab.c"
+
+#if ! defined (yyoverflow) || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# if YYSTACK_USE_ALLOCA
+#  define YYSTACK_ALLOC alloca
+# else
+#  ifndef YYSTACK_USE_ALLOCA
+#   if defined (alloca) || defined (_ALLOCA_H)
+#    define YYSTACK_ALLOC alloca
+#   else
+#    ifdef __GNUC__
+#     define YYSTACK_ALLOC __builtin_alloca
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning. */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# else
+#  if defined (__STDC__) || defined (__cplusplus)
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   define YYSIZE_T size_t
+#  endif
+#  define YYSTACK_ALLOC malloc
+#  define YYSTACK_FREE free
+# endif
+#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
+
+
+#if (! defined (yyoverflow) \
+     && (! defined (__cplusplus) \
+	 || (YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yyalloc
+{
+  short yyss;
+  YYSTYPE yyvs;
+  };
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (short) + sizeof (YYSTYPE))				\
+      + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  register YYSIZE_T yyi;		\
+	  for (yyi = 0; yyi < (Count); yyi++)	\
+	    (To)[yyi] = (From)[yyi];		\
+	}					\
+      while (0)
+#  endif
+# endif
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack)					\
+    do									\
+      {									\
+	YYSIZE_T yynewbytes;						\
+	YYCOPY (&yyptr->Stack, Stack, yysize);				\
+	Stack = &yyptr->Stack;						\
+	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+	yyptr += yynewbytes / sizeof (*yyptr);				\
+      }									\
+    while (0)
+
+#endif
+
+#if defined (__STDC__) || defined (__cplusplus)
+   typedef signed char yysigned_char;
+#else
+   typedef short yysigned_char;
+#endif
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL  5
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   308
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS  86
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS  120
+/* YYNRULES -- Number of rules. */
+#define YYNRULES  185
+/* YYNRULES -- Number of states. */
+#define YYNSTATES  271
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+#define YYUNDEFTOK  2
+#define YYMAXUTOK   340
+
+#define YYTRANSLATE(YYX) 						\
+  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+static const unsigned char yytranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
+       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
+      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
+      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
+      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
+      85
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+   YYRHS.  */
+static const unsigned short yyprhs[] =
+{
+       0,     0,     3,     6,     7,    11,    12,    17,    19,    21,
+      22,    25,    27,    29,    31,    33,    37,    39,    41,    43,
+      46,    50,    52,    54,    55,    58,    60,    62,    64,    66,
+      68,    70,    74,    76,    78,    79,    82,    85,    89,    91,
+      93,    94,    97,   101,   103,   105,   106,   109,   111,   113,
+     115,   117,   119,   121,   123,   127,   129,   131,   132,   135,
+     139,   141,   143,   144,   147,   149,   151,   153,   155,   157,
+     161,   163,   165,   166,   171,   173,   175,   176,   179,   181,
+     183,   185,   187,   189,   191,   195,   197,   199,   200,   205,
+     207,   209,   210,   213,   215,   217,   219,   221,   223,   225,
+     229,   231,   235,   237,   241,   243,   247,   249,   253,   255,
+     259,   261,   265,   267,   271,   273,   277,   279,   283,   285,
+     289,   291,   295,   297,   305,   307,   311,   313,   317,   319,
+     323,   325,   329,   331,   335,   337,   341,   343,   351,   353,
+     361,   363,   367,   369,   373,   375,   383,   385,   393,   395,
+     399,   401,   402,   405,   407,   409,   411,   413,   415,   417,
+     419,   421,   424,   427,   430,   433,   435,   438,   441,   444,
+     447,   450,   452,   455,   458,   461,   464,   467,   469,   471,
+     473,   475,   477,   479,   481,   482
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const short yyrhs[] =
+{
+      87,     0,    -1,    88,    89,    -1,    -1,    10,   193,    11,
+      -1,    -1,    89,    90,    92,    91,    -1,    12,    -1,    13,
+      -1,    -1,    92,    93,    -1,    94,    -1,   103,    -1,   125,
+      -1,   133,    -1,    95,    97,    96,    -1,    14,    -1,    15,
+      -1,    98,    -1,    97,    98,    -1,    99,   101,   100,    -1,
+      16,    -1,    17,    -1,    -1,   101,   102,    -1,   141,    -1,
+     143,    -1,   147,    -1,   145,    -1,   149,    -1,   151,    -1,
+     104,   106,   105,    -1,    30,    -1,    31,    -1,    -1,   106,
+     107,    -1,   106,   116,    -1,   108,   110,   109,    -1,    32,
+      -1,    33,    -1,    -1,   110,   111,    -1,   112,   114,   113,
+      -1,    34,    -1,    35,    -1,    -1,   114,   115,    -1,   153,
+      -1,   155,    -1,   157,    -1,   159,    -1,   161,    -1,   163,
+      -1,   165,    -1,   117,   119,   118,    -1,    50,    -1,    51,
+      -1,    -1,   119,   120,    -1,   121,   123,   122,    -1,    52,
+      -1,    53,    -1,    -1,   123,   124,    -1,   153,    -1,   155,
+      -1,   179,    -1,   181,    -1,   177,    -1,   126,   128,   127,
+      -1,    60,    -1,    61,    -1,    -1,   128,   129,   131,   130,
+      -1,    62,    -1,    63,    -1,    -1,   131,   132,    -1,   167,
+      -1,   143,    -1,   169,    -1,   175,    -1,   171,    -1,   173,
+      -1,   134,   136,   135,    -1,    74,    -1,    75,    -1,    -1,
+     136,   137,   139,   138,    -1,    76,    -1,    77,    -1,    -1,
+     139,   140,    -1,   143,    -1,   187,    -1,   183,    -1,   185,
+      -1,   189,    -1,   191,    -1,   142,   193,    19,    -1,    18,
+      -1,   144,   193,    21,    -1,    20,    -1,   146,   193,    25,
+      -1,    24,    -1,   148,   204,    23,    -1,    22,    -1,   150,
+     193,    27,    -1,    26,    -1,   152,   193,    29,    -1,    28,
+      -1,   154,   193,    37,    -1,    36,    -1,   156,   193,    45,
+      -1,    44,    -1,   158,   193,    47,    -1,    46,    -1,   160,
+     193,    49,    -1,    48,    -1,   162,   193,    39,    -1,    38,
+      -1,   164,   193,    41,    -1,    40,    -1,   166,   205,   202,
+     196,   202,   205,    43,    -1,    42,    -1,   168,   202,    65,
+      -1,    64,    -1,   170,   202,    67,    -1,    66,    -1,   172,
+     202,    71,    -1,    70,    -1,   174,   202,    73,    -1,    72,
+      -1,   176,   202,    69,    -1,    68,    -1,   178,   202,    59,
+      -1,    58,    -1,   180,   205,   202,   197,   202,   205,    55,
+      -1,    54,    -1,   182,   205,   202,   197,   202,   205,    57,
+      -1,    56,    -1,   184,   193,    81,    -1,    80,    -1,   186,
+     193,    83,    -1,    82,    -1,   188,   205,   202,   198,   202,
+     205,    69,    -1,    68,    -1,   190,   205,   202,   196,   202,
+     205,    85,    -1,    84,    -1,   192,   202,    79,    -1,    78,
+      -1,    -1,   193,   194,    -1,   195,    -1,   202,    -1,     9,
+      -1,     5,    -1,     6,    -1,     7,    -1,     8,    -1,   205,
+      -1,   196,   205,    -1,   196,   203,    -1,   196,   204,    -1,
+     196,   199,    -1,   205,    -1,   197,   205,    -1,   197,   203,
+      -1,   197,   204,    -1,   197,   199,    -1,   197,   200,    -1,
+     205,    -1,   198,   205,    -1,   198,   203,    -1,   198,   204,
+      -1,   198,   199,    -1,   198,   201,    -1,     8,    -1,     7,
+      -1,     6,    -1,   203,    -1,   204,    -1,     4,    -1,     3,
+      -1,    -1,     5,    -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+static const unsigned short yyrline[] =
+{
+       0,   186,   186,   189,   190,   193,   194,   197,   200,   203,
+     204,   207,   208,   209,   210,   243,   246,   249,   252,   253,
+     256,   259,   264,   269,   270,   273,   274,   275,   276,   277,
+     278,   314,   317,   320,   323,   324,   325,   337,   340,   343,
+     346,   347,   350,   353,   358,   363,   364,   367,   368,   369,
+     370,   371,   372,   373,   385,   388,   391,   394,   395,   398,
+     401,   406,   411,   412,   415,   416,   417,   418,   419,   448,
+     451,   454,   457,   458,   461,   466,   471,   472,   475,   476,
+     477,   478,   479,   480,   504,   507,   510,   513,   514,   517,
+     522,   527,   528,   531,   532,   533,   534,   535,   536,   543,
+     549,   560,   573,   607,   619,   626,   638,   645,   657,   664,
+     691,   698,   718,   725,   750,   757,   770,   778,   791,   799,
+     812,   820,   833,   841,   882,   888,   894,   901,   907,   914,
+     920,   927,   933,   940,   946,   953,   959,   966,  1002,  1009,
+    1045,  1052,  1058,  1065,  1071,  1078,  1146,  1152,  1184,  1191,
+    1204,  1216,  1217,  1220,  1221,  1224,  1228,  1232,  1236,  1240,
+    1246,  1247,  1248,  1249,  1250,  1253,  1254,  1255,  1256,  1257,
+    1258,  1261,  1262,  1263,  1264,  1265,  1266,  1269,  1275,  1281,
+    1287,  1288,  1291,  1297,  1303,  1304
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE
+/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+  "$end", "error", "$undefined", "TK_HEX_NUMBER", "TK_DEC_NUMBER", 
+  "TK_WHITE", "TK_DASH", "TK_DOTDOT", "TK_COMMA", "TK_TEXT", 
+  "TK_XML_VERSION_START", "TK_XML_VERSION_END", "TK_QOS_POLICY_START", 
+  "TK_QOS_POLICY_END", "TK_PORT_GROUPS_START", "TK_PORT_GROUPS_END", 
+  "TK_PORT_GROUP_START", "TK_PORT_GROUP_END", "TK_NAME_START", 
+  "TK_NAME_END", "TK_USE_START", "TK_USE_END", "TK_PORT_GUID_START", 
+  "TK_PORT_GUID_END", "TK_PORT_NAME_START", "TK_PORT_NAME_END", 
+  "TK_PARTITION_START", "TK_PARTITION_END", "TK_NODE_TYPE_START", 
+  "TK_NODE_TYPE_END", "TK_QOS_SETUP_START", "TK_QOS_SETUP_END", 
+  "TK_SL2VL_TABLES_START", "TK_SL2VL_TABLES_END", "TK_SL2VL_SCOPE_START", 
+  "TK_SL2VL_SCOPE_END", "TK_GROUP_START", "TK_GROUP_END", "TK_FROM_START", 
+  "TK_FROM_END", "TK_TO_START", "TK_TO_END", "TK_SL2VL_TABLE_START", 
+  "TK_SL2VL_TABLE_END", "TK_ACROSS_START", "TK_ACROSS_END", 
+  "TK_ACROSS_FROM_START", "TK_ACROSS_FROM_END", "TK_ACROSS_TO_START", 
+  "TK_ACROSS_TO_END", "TK_VLARB_TABLES_START", "TK_VLARB_TABLES_END", 
+  "TK_VLARB_SCOPE_START", "TK_VLARB_SCOPE_END", "TK_VLARB_HIGH_START", 
+  "TK_VLARB_HIGH_END", "TK_VLARB_LOW_START", "TK_VLARB_LOW_END", 
+  "TK_VLARB_HIGH_LIMIT_START", "TK_VLARB_HIGH_LIMIT_END", 
+  "TK_QOS_LEVELS_START", "TK_QOS_LEVELS_END", "TK_QOS_LEVEL_START", 
+  "TK_QOS_LEVEL_END", "TK_SN_START", "TK_SN_END", "TK_SL_START", 
+  "TK_SL_END", "TK_CLASS_START", "TK_CLASS_END", "TK_MTU_LIMIT_START", 
+  "TK_MTU_LIMIT_END", "TK_RATE_LIMIT_START", "TK_RATE_LIMIT_END", 
+  "TK_QOS_MATCH_RULES_START", "TK_QOS_MATCH_RULES_END", 
+  "TK_QOS_MATCH_RULE_START", "TK_QOS_MATCH_RULE_END", 
+  "TK_QOS_LEVEL_SN_START", "TK_QOS_LEVEL_SN_END", "TK_SOURCE_START", 
+  "TK_SOURCE_END", "TK_DESTINATION_START", "TK_DESTINATION_END", 
+  "TK_SERVICE_START", "TK_SERVICE_END", "$accept", "head", "xml_version", 
+  "qos_policy", "qos_policy_start", "qos_policy_end", 
+  "qos_policy_entries", "qos_policy_entry", "port_groups", 
+  "port_groups_start", "port_groups_end", "port_group", 
+  "single_port_group", "port_group_start", "port_group_end", 
+  "port_group_entries", "port_group_entry", "qos_setup", 
+  "qos_setup_start", "qos_setup_end", "qos_setup_items", "sl2vl_tables", 
+  "sl2vl_tables_start", "sl2vl_tables_end", "sl2vl_scope_items", 
+  "sl2vl_scope", "sl2vl_scope_start", "sl2vl_scope_end", 
+  "sl2vl_scope_entries", "sl2vl_scope_entry", "vlarb_tables", 
+  "vlarb_tables_start", "vlarb_tables_end", "vlarb_scope_items", 
+  "vlarb_scope", "vlarb_scope_start", "vlarb_scope_end", 
+  "vlarb_scope_entries", "vlarb_scope_entry", "qos_levels", 
+  "qos_levels_start", "qos_levels_end", "qos_level_items", 
+  "qos_level_start", "qos_level_end", "qos_level_entries", 
+  "qos_level_entry", "qos_match_rules", "qos_match_rules_start", 
+  "qos_match_rules_end", "qos_match_rule_items", "qos_match_rule_start", 
+  "qos_match_rule_end", "qos_match_rule_entries", "qos_match_rule_entry", 
+  "name", "name_start", "use", "use_start", "port_name", 
+  "port_name_start", "port_guid", "port_guid_start", "partition", 
+  "partition_start", "node_type", "node_type_start", "group", 
+  "group_start", "across", "across_start", "across_from", 
+  "across_from_start", "across_to", "across_to_start", "from", 
+  "from_start", "to", "to_start", "sl2vl_table", "sl2vl_table_start", 
+  "sn", "sn_start", "sl", "sl_start", "mtu_limit", "mtu_limit_start", 
+  "rate_limit", "rate_limit_start", "qos_level_class", 
+  "qos_level_class_start", "vlarb_high_limit", "vlarb_high_limit_start", 
+  "vlarb_high", "vlarb_high_start", "vlarb_low", "vlarb_low_start", 
+  "source", "source_start", "destination", "destination_start", 
+  "match_rule_class", "match_rule_class_start", "service", 
+  "service_start", "qos_level_sn", "qos_level_sn_start", "any_text", 
+  "text", "pure_text", "num_list_wo_whites", 
+  "num_list_with_dotdot_wo_whites", "num_list_with_dash_wo_whites", 
+  "comma", "dotdot", "dash", "any_number", "dec_number", "hex_number", 
+  "whitespace", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+   token YYLEX-NUM.  */
+static const unsigned short yytoknum[] =
+{
+       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
+     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
+     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
+     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+     295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
+     305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
+     315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
+     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
+     335,   336,   337,   338,   339,   340
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const unsigned char yyr1[] =
+{
+       0,    86,    87,    88,    88,    89,    89,    90,    91,    92,
+      92,    93,    93,    93,    93,    94,    95,    96,    97,    97,
+      98,    99,   100,   101,   101,   102,   102,   102,   102,   102,
+     102,   103,   104,   105,   106,   106,   106,   107,   108,   109,
+     110,   110,   111,   112,   113,   114,   114,   115,   115,   115,
+     115,   115,   115,   115,   116,   117,   118,   119,   119,   120,
+     121,   122,   123,   123,   124,   124,   124,   124,   124,   125,
+     126,   127,   128,   128,   129,   130,   131,   131,   132,   132,
+     132,   132,   132,   132,   133,   134,   135,   136,   136,   137,
+     138,   139,   139,   140,   140,   140,   140,   140,   140,   141,
+     142,   143,   144,   145,   146,   147,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+     162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
+     172,   173,   174,   175,   176,   177,   178,   179,   180,   181,
+     182,   183,   184,   185,   186,   187,   188,   189,   190,   191,
+     192,   193,   193,   194,   194,   195,   195,   195,   195,   195,
+     196,   196,   196,   196,   196,   197,   197,   197,   197,   197,
+     197,   198,   198,   198,   198,   198,   198,   199,   200,   201,
+     202,   202,   203,   204,   205,   205
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+static const unsigned char yyr2[] =
+{
+       0,     2,     2,     0,     3,     0,     4,     1,     1,     0,
+       2,     1,     1,     1,     1,     3,     1,     1,     1,     2,
+       3,     1,     1,     0,     2,     1,     1,     1,     1,     1,
+       1,     3,     1,     1,     0,     2,     2,     3,     1,     1,
+       0,     2,     3,     1,     1,     0,     2,     1,     1,     1,
+       1,     1,     1,     1,     3,     1,     1,     0,     2,     3,
+       1,     1,     0,     2,     1,     1,     1,     1,     1,     3,
+       1,     1,     0,     4,     1,     1,     0,     2,     1,     1,
+       1,     1,     1,     1,     3,     1,     1,     0,     4,     1,
+       1,     0,     2,     1,     1,     1,     1,     1,     1,     3,
+       1,     3,     1,     3,     1,     3,     1,     3,     1,     3,
+       1,     3,     1,     3,     1,     3,     1,     3,     1,     3,
+       1,     3,     1,     7,     1,     3,     1,     3,     1,     3,
+       1,     3,     1,     3,     1,     3,     1,     7,     1,     7,
+       1,     3,     1,     3,     1,     7,     1,     7,     1,     3,
+       1,     0,     2,     1,     1,     1,     1,     1,     1,     1,
+       1,     2,     2,     2,     2,     1,     2,     2,     2,     2,
+       2,     1,     2,     2,     2,     2,     2,     1,     1,     1,
+       1,     1,     1,     1,     0,     1
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+   means the default is an error.  */
+static const unsigned char yydefact[] =
+{
+       3,   151,     0,     5,     0,     1,     2,   183,   182,   156,
+     157,   158,   159,   155,     4,   152,   153,   154,   180,   181,
+       7,     9,     0,     8,    16,    32,    70,    85,     6,    10,
+      11,     0,    12,    34,    13,    72,    14,    87,    21,     0,
+      18,    23,     0,     0,     0,    17,    15,    19,     0,    33,
+      38,    55,    31,    35,    40,    36,    57,    71,    74,    69,
+      76,    86,    89,    84,    91,    22,   100,   102,   106,   104,
+     108,   110,    20,    24,    25,   151,    26,   151,    28,   151,
+      27,     0,    29,   151,    30,   151,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    39,    43,    37,    41,
+      45,    56,    60,    54,    58,    62,    75,   126,   128,   134,
+     130,   132,    73,    77,    79,    78,     0,    80,     0,    82,
+       0,    83,     0,    81,     0,   146,    90,   150,   142,   144,
+     148,    88,    92,    93,    95,   151,    96,   151,    94,   184,
+      97,   184,    98,     0,    99,   101,   103,   105,   107,   109,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   185,
+       0,     0,     0,    44,   112,   120,   122,   124,   114,   116,
+     118,    42,    46,    47,   151,    48,   151,    49,   151,    50,
+     151,    51,   151,    52,   151,    53,   184,    61,   138,   140,
+     136,    59,    63,    64,    65,    68,     0,    66,   184,    67,
+     184,   125,   127,   129,   131,   133,   141,   143,   184,   184,
+     149,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   171,     0,   160,   111,   113,   115,   117,   119,
+     121,   184,   135,   184,   184,   179,   177,   175,   176,   184,
+     173,   174,   172,   164,   184,   162,   163,   161,     0,     0,
+     165,     0,     0,     0,   184,   178,   169,   170,   184,   167,
+     168,   166,   184,   145,   147,     0,     0,     0,   123,   137,
+     139
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const short yydefgoto[] =
+{
+      -1,     2,     3,     6,    21,    28,    22,    29,    30,    31,
+      46,    39,    40,    41,    72,    48,    73,    32,    33,    52,
+      42,    53,    54,    98,    86,    99,   100,   171,   150,   172,
+      55,    56,   103,    87,   104,   105,   191,   151,   192,    34,
+      35,    59,    43,    60,   112,    88,   113,    36,    37,    63,
+      44,    64,   131,    89,   132,    74,    75,    76,    77,    78,
+      79,    80,    81,    82,    83,    84,    85,   173,   174,   175,
+     176,   177,   178,   179,   180,   181,   182,   183,   184,   185,
+     186,   115,   116,   117,   118,   119,   120,   121,   122,   123,
+     124,   195,   196,   197,   198,   199,   200,   134,   135,   136,
+     137,   138,   139,   140,   141,   142,   143,     4,    15,    16,
+     223,   249,   221,   243,   257,   238,    17,    18,    19,   224
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF -180
+static const short yypact[] =
+{
+      -6,  -180,     8,  -180,   297,  -180,     2,  -180,  -180,  -180,
+    -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,
+    -180,  -180,    13,  -180,  -180,  -180,  -180,  -180,  -180,  -180,
+    -180,     1,  -180,  -180,  -180,  -180,  -180,  -180,  -180,    17,
+    -180,  -180,   -20,     6,    14,  -180,  -180,  -180,   271,  -180,
+    -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,
+    -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,
+    -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,
+    -180,    38,  -180,  -180,  -180,  -180,    80,    72,    81,   -18,
+     263,   241,   233,    30,   226,   199,  -180,  -180,  -180,  -180,
+    -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,
+    -180,  -180,  -180,  -180,  -180,  -180,   126,  -180,   126,  -180,
+     126,  -180,   126,  -180,   126,  -180,  -180,  -180,  -180,  -180,
+    -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,    51,
+    -180,    51,  -180,   126,  -180,  -180,  -180,  -180,  -180,  -180,
+     239,   207,    -7,    -2,   -10,     3,     5,    31,    16,  -180,
+     126,   126,    -8,  -180,  -180,  -180,  -180,  -180,  -180,  -180,
+    -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,
+    -180,  -180,  -180,  -180,  -180,  -180,    51,  -180,  -180,  -180,
+    -180,  -180,  -180,  -180,  -180,  -180,   126,  -180,    51,  -180,
+      51,  -180,  -180,  -180,  -180,  -180,  -180,  -180,    51,    51,
+    -180,   189,   168,   154,    88,   182,   175,   126,    27,   126,
+     126,   114,  -180,    75,  -180,  -180,  -180,  -180,  -180,  -180,
+    -180,    51,  -180,    51,    51,  -180,  -180,  -180,  -180,    51,
+      19,    34,  -180,  -180,    51,   -37,   -33,  -180,    75,   215,
+    -180,   215,    46,    42,    51,  -180,  -180,  -180,    51,   -42,
+     -26,  -180,    51,  -180,  -180,    89,    83,    84,  -180,  -180,
+    -180
+};
+
+/* YYPGOTO[NTERM-NUM].  */
+static const short yypgoto[] =
+{
+    -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,
+    -180,  -180,   104,  -180,  -180,  -180,  -180,  -180,  -180,  -180,
+    -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,
+    -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,
+    -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,
+    -180,  -180,  -180,  -180,  -180,  -180,  -180,    76,  -180,  -180,
+    -180,  -180,  -180,  -180,  -180,  -180,  -180,     4,  -180,    15,
+    -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,
+    -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,
+    -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,  -180,
+    -180,  -180,  -180,  -180,  -180,  -180,  -180,   -28,  -180,  -180,
+     -62,   -35,  -180,  -167,  -180,  -180,  -115,  -179,   -81,  -123
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If zero, do what YYDEFACT says.
+   If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -182
+static const short yytable[] =
+{
+      93,   152,    67,   153,     1,   154,  -180,   155,     5,   156,
+    -181,    49,    50,  -180,    20,  -180,   160,    38,   161,     7,
+       8,     9,    10,    11,    12,    13,    23,    24,   162,  -181,
+      51,  -181,    45,    38,     7,     8,     9,    10,    11,    12,
+      13,     7,   240,    25,   245,   208,   209,    90,  -180,    91,
+     125,    92,  -181,   147,   237,    94,   159,    95,   201,   126,
+     127,   203,   128,   217,   129,   202,   130,    57,    58,   245,
+     259,   210,   259,    26,   205,   219,   204,   220,     7,     8,
+     159,   218,   256,   236,   256,   222,   232,    27,  -180,    61,
+      62,     7,     8,     9,    10,    11,    12,    13,   242,   207,
+     247,    67,   231,  -181,   233,   234,   239,   157,   244,   158,
+     250,   250,   206,    96,    97,   263,   252,     7,     8,   159,
+     235,   253,   236,   101,   102,   247,   261,   264,   261,     7,
+       8,   265,   268,   254,   258,   266,   262,   228,   269,   267,
+     241,   270,   246,    47,   106,   107,   211,   108,   212,   109,
+     213,   110,   214,   111,   215,   193,   216,     7,     8,     9,
+      10,    11,    12,    13,   114,   133,   194,   246,   260,   248,
+     260,     7,     8,     9,    10,    11,    12,    13,     7,     8,
+       9,    10,    11,    12,    13,     7,     8,     9,    10,    11,
+      12,    13,     7,     8,     9,    10,    11,    12,    13,   251,
+       0,   227,     7,     8,     9,    10,    11,    12,    13,     0,
+       0,     0,     0,   226,     0,     0,   230,     0,     7,     8,
+     159,   229,   255,   236,     0,     0,   225,     0,   149,     7,
+       8,     9,    10,    11,    12,    13,     7,     8,     9,    10,
+      11,    12,    13,   164,     7,     8,     9,    10,    11,    12,
+      13,   168,     0,   148,     0,     0,     0,     0,   146,     0,
+     187,   188,   145,   189,     0,   190,     7,     8,     9,    10,
+      11,    12,    13,     0,   163,   164,     0,   165,     0,   166,
+       0,   167,   144,   168,     0,   169,     0,   170,    65,    66,
+       0,    67,     0,    68,     0,    69,     0,    70,     0,    71,
+       7,     8,     9,    10,    11,    12,    13,     0,    14
+};
+
+static const short yycheck[] =
+{
+      81,   116,    20,   118,    10,   120,    43,   122,     0,   124,
+      43,    31,    32,    55,    12,    57,   139,    16,   141,     3,
+       4,     5,     6,     7,     8,     9,    13,    14,   143,    55,
+      50,    57,    15,    16,     3,     4,     5,     6,     7,     8,
+       9,     3,   221,    30,   223,   160,   161,    75,    85,    77,
+      68,    79,    85,    23,   221,    83,     5,    85,    65,    77,
+      78,    71,    80,   186,    82,    67,    84,    61,    62,   248,
+     249,    79,   251,    60,    69,   198,    73,   200,     3,     4,
+       5,   196,   249,     8,   251,   208,    59,    74,    69,    75,
+      76,     3,     4,     5,     6,     7,     8,     9,   221,    83,
+     223,    20,   217,    69,   219,   220,   221,   135,   223,   137,
+     233,   234,    81,    33,    34,    69,   239,     3,     4,     5,
+       6,   244,     8,    51,    52,   248,   249,    85,   251,     3,
+       4,   254,    43,   248,   249,   258,   251,    49,    55,   262,
+     221,    57,   223,    39,    63,    64,   174,    66,   176,    68,
+     178,    70,   180,    72,   182,   151,   184,     3,     4,     5,
+       6,     7,     8,     9,    88,    89,   151,   248,   249,   231,
+     251,     3,     4,     5,     6,     7,     8,     9,     3,     4,
+       5,     6,     7,     8,     9,     3,     4,     5,     6,     7,
+       8,     9,     3,     4,     5,     6,     7,     8,     9,   234,
+      -1,    47,     3,     4,     5,     6,     7,     8,     9,    -1,
+      -1,    -1,    -1,    45,    -1,    -1,    41,    -1,     3,     4,
+       5,    39,     7,     8,    -1,    -1,    37,    -1,    29,     3,
+       4,     5,     6,     7,     8,     9,     3,     4,     5,     6,
+       7,     8,     9,    36,     3,     4,     5,     6,     7,     8,
+       9,    44,    -1,    27,    -1,    -1,    -1,    -1,    25,    -1,
+      53,    54,    21,    56,    -1,    58,     3,     4,     5,     6,
+       7,     8,     9,    -1,    35,    36,    -1,    38,    -1,    40,
+      -1,    42,    19,    44,    -1,    46,    -1,    48,    17,    18,
+      -1,    20,    -1,    22,    -1,    24,    -1,    26,    -1,    28,
+       3,     4,     5,     6,     7,     8,     9,    -1,    11
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+   symbol of state STATE-NUM.  */
+static const unsigned char yystos[] =
+{
+       0,    10,    87,    88,   193,     0,    89,     3,     4,     5,
+       6,     7,     8,     9,    11,   194,   195,   202,   203,   204,
+      12,    90,    92,    13,    14,    30,    60,    74,    91,    93,
+      94,    95,   103,   104,   125,   126,   133,   134,    16,    97,
+      98,    99,   106,   128,   136,    15,    96,    98,   101,    31,
+      32,    50,   105,   107,   108,   116,   117,    61,    62,   127,
+     129,    75,    76,   135,   137,    17,    18,    20,    22,    24,
+      26,    28,   100,   102,   141,   142,   143,   144,   145,   146,
+     147,   148,   149,   150,   151,   152,   110,   119,   131,   139,
+     193,   193,   193,   204,   193,   193,    33,    34,   109,   111,
+     112,    51,    52,   118,   120,   121,    63,    64,    66,    68,
+      70,    72,   130,   132,   143,   167,   168,   169,   170,   171,
+     172,   173,   174,   175,   176,    68,    77,    78,    80,    82,
+      84,   138,   140,   143,   183,   184,   185,   186,   187,   188,
+     189,   190,   191,   192,    19,    21,    25,    23,    27,    29,
+     114,   123,   202,   202,   202,   202,   202,   193,   193,     5,
+     205,   205,   202,    35,    36,    38,    40,    42,    44,    46,
+      48,   113,   115,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,   162,   163,   164,   165,   166,    53,    54,    56,
+      58,   122,   124,   153,   155,   177,   178,   179,   180,   181,
+     182,    65,    67,    71,    73,    69,    81,    83,   202,   202,
+      79,   193,   193,   193,   193,   193,   193,   205,   202,   205,
+     205,   198,   205,   196,   205,    37,    45,    47,    49,    39,
+      41,   202,    59,   202,   202,     6,     8,   199,   201,   202,
+     203,   204,   205,   199,   202,   203,   204,   205,   196,   197,
+     205,   197,   205,   205,   202,     7,   199,   200,   202,   203,
+     204,   205,   202,    69,    85,   205,   205,   205,    43,    55,
+      57
+};
+
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# if defined (__STDC__) || defined (__cplusplus)
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# endif
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
+
+#define yyerrok		(yyerrstatus = 0)
+#define yyclearin	(yychar = YYEMPTY)
+#define YYEMPTY		(-2)
+#define YYEOF		0
+
+#define YYACCEPT	goto yyacceptlab
+#define YYABORT		goto yyabortlab
+#define YYERROR		goto yyerrlab1
+
+/* Like YYERROR except do call yyerror.  This remains here temporarily
+   to ease the transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  */
+
+#define YYFAIL		goto yyerrlab
+
+#define YYRECOVERING()  (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value)					\
+do								\
+  if (yychar == YYEMPTY && yylen == 1)				\
+    {								\
+      yychar = (Token);						\
+      yylval = (Value);						\
+      yytoken = YYTRANSLATE (yychar);				\
+      YYPOPSTACK;						\
+      goto yybackup;						\
+    }								\
+  else								\
+    { 								\
+      yyerror ("syntax error: cannot back up");\
+      YYERROR;							\
+    }								\
+while (0)
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+/* YYLLOC_DEFAULT -- Compute the default location (before the actions
+   are run).  */
+
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)         \
+  Current.first_line   = Rhs[1].first_line;      \
+  Current.first_column = Rhs[1].first_column;    \
+  Current.last_line    = Rhs[N].last_line;       \
+  Current.last_column  = Rhs[N].last_column;
+#endif
+
+/* YYLEX -- calling `yylex' with the right arguments.  */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (YYLEX_PARAM)
+#else
+# define YYLEX yylex ()
+#endif
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)			\
+do {						\
+  if (yydebug)					\
+    YYFPRINTF Args;				\
+} while (0)
+
+# define YYDSYMPRINT(Args)			\
+do {						\
+  if (yydebug)					\
+    yysymprint Args;				\
+} while (0)
+
+# define YYDSYMPRINTF(Title, Token, Value, Location)		\
+do {								\
+  if (yydebug)							\
+    {								\
+      YYFPRINTF (stderr, "%s ", Title);				\
+      yysymprint (stderr, 					\
+                  Token, Value);	\
+      YYFPRINTF (stderr, "\n");					\
+    }								\
+} while (0)
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (cinluded).                                                   |
+`------------------------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_stack_print (short *bottom, short *top)
+#else
+static void
+yy_stack_print (bottom, top)
+    short *bottom;
+    short *top;
+#endif
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (/* Nothing. */; bottom <= top; ++bottom)
+    YYFPRINTF (stderr, " %d", *bottom);
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)				\
+do {								\
+  if (yydebug)							\
+    yy_stack_print ((Bottom), (Top));				\
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_reduce_print (int yyrule)
+#else
+static void
+yy_reduce_print (yyrule)
+    int yyrule;
+#endif
+{
+  int yyi;
+  unsigned int yylineno = yyrline[yyrule];
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
+             yyrule - 1, yylineno);
+  /* Print the symbols being reduced, and their result.  */
+  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
+    YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
+  YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
+}
+
+# define YY_REDUCE_PRINT(Rule)		\
+do {					\
+  if (yydebug)				\
+    yy_reduce_print (Rule);		\
+} while (0)
+
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YYDSYMPRINT(Args)
+# define YYDSYMPRINTF(Title, Token, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef	YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#if YYMAXDEPTH == 0
+# undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+

+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+#  if defined (__GLIBC__) && defined (_STRING_H)
+#   define yystrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+static YYSIZE_T
+#   if defined (__STDC__) || defined (__cplusplus)
+yystrlen (const char *yystr)
+#   else
+yystrlen (yystr)
+     const char *yystr;
+#   endif
+{
+  register const char *yys = yystr;
+
+  while (*yys++ != '\0')
+    continue;
+
+  return yys - yystr - 1;
+}
+#  endif
+# endif
+
+# ifndef yystpcpy
+#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+static char *
+#   if defined (__STDC__) || defined (__cplusplus)
+yystpcpy (char *yydest, const char *yysrc)
+#   else
+yystpcpy (yydest, yysrc)
+     char *yydest;
+     const char *yysrc;
+#   endif
+{
+  register char *yyd = yydest;
+  register const char *yys = yysrc;
+
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
+
+  return yyd - 1;
+}
+#  endif
+# endif
+
+#endif /* !YYERROR_VERBOSE */
+
+

+
+#if YYDEBUG
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yysymprint (yyoutput, yytype, yyvaluep)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE *yyvaluep;
+#endif
+{
+  /* Pacify ``unused variable'' warnings.  */
+  (void) yyvaluep;
+
+  if (yytype < YYNTOKENS)
+    {
+      YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+# ifdef YYPRINT
+      YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+    }
+  else
+    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+  switch (yytype)
+    {
+      default:
+        break;
+    }
+  YYFPRINTF (yyoutput, ")");
+}
+
+#endif /* ! YYDEBUG */
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yydestruct (int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yytype, yyvaluep)
+    int yytype;
+    YYSTYPE *yyvaluep;
+#endif
+{
+  /* Pacify ``unused variable'' warnings.  */
+  (void) yyvaluep;
+
+  switch (yytype)
+    {
+
+      default:
+        break;
+    }
+}
+

+
+/* Prevent warnings from -Wmissing-prototypes.  */
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM);
+# else
+int yyparse ();
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+/* The lookahead symbol.  */
+int yychar;
+
+/* The semantic value of the lookahead symbol.  */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far.  */
+int yynerrs;
+
+
+
+/*----------.
+| yyparse.  |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM)
+# else
+int yyparse (YYPARSE_PARAM)
+  void *YYPARSE_PARAM;
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+
+#endif
+#endif
+{
+  
+  register int yystate;
+  register int yyn;
+  int yyresult;
+  /* Number of tokens to shift before error messages enabled.  */
+  int yyerrstatus;
+  /* Lookahead token as an internal (translated) token number.  */
+  int yytoken = 0;
+
+  /* Three stacks and their tools:
+     `yyss': related to states,
+     `yyvs': related to semantic values,
+     `yyls': related to locations.
+
+     Refer to the stacks thru separate pointers, to allow yyoverflow
+     to reallocate them elsewhere.  */
+
+  /* The state stack.  */
+  short	yyssa[YYINITDEPTH];
+  short *yyss = yyssa;
+  register short *yyssp;
+
+  /* The semantic value stack.  */
+  YYSTYPE yyvsa[YYINITDEPTH];
+  YYSTYPE *yyvs = yyvsa;
+  register YYSTYPE *yyvsp;
+
+
+
+#define YYPOPSTACK   (yyvsp--, yyssp--)
+
+  YYSIZE_T yystacksize = YYINITDEPTH;
+
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+
+
+  /* When reducing, the number of symbols on the RHS of the reduced
+     rule.  */
+  int yylen;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY;		/* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+
+  yyssp = yyss;
+  yyvsp = yyvs;
+
+  goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate.  |
+`------------------------------------------------------------*/
+ yynewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed. so pushing a state here evens the stacks.
+     */
+  yyssp++;
+
+ yysetstate:
+  *yyssp = yystate;
+
+  if (yyss + yystacksize - 1 <= yyssp)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      {
+	/* Give user a chance to reallocate the stack. Use copies of
+	   these so that the &'s don't force the real ones into
+	   memory.  */
+	YYSTYPE *yyvs1 = yyvs;
+	short *yyss1 = yyss;
+
+
+	/* Each stack pointer address is followed by the size of the
+	   data in use in that stack, in bytes.  This used to be a
+	   conditional around just the two extra args, but that might
+	   be undefined if yyoverflow is a macro.  */
+	yyoverflow ("parser stack overflow",
+		    &yyss1, yysize * sizeof (*yyssp),
+		    &yyvs1, yysize * sizeof (*yyvsp),
+
+		    &yystacksize);
+
+	yyss = yyss1;
+	yyvs = yyvs1;
+      }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto yyoverflowlab;
+# else
+      /* Extend the stack our own way.  */
+      if (YYMAXDEPTH <= yystacksize)
+	goto yyoverflowlab;
+      yystacksize *= 2;
+      if (YYMAXDEPTH < yystacksize)
+	yystacksize = YYMAXDEPTH;
+
+      {
+	short *yyss1 = yyss;
+	union yyalloc *yyptr =
+	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+	if (! yyptr)
+	  goto yyoverflowlab;
+	YYSTACK_RELOCATE (yyss);
+	YYSTACK_RELOCATE (yyvs);
+
+#  undef YYSTACK_RELOCATE
+	if (yyss1 != yyssa)
+	  YYSTACK_FREE (yyss1);
+      }
+# endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + yysize - 1;
+      yyvsp = yyvs + yysize - 1;
+
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+		  (unsigned long int) yystacksize));
+
+      if (yyss + yystacksize - 1 <= yyssp)
+	YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+  goto yybackup;
+
+/*-----------.
+| yybackup.  |
+`-----------*/
+yybackup:
+
+/* Do appropriate processing given the current state.  */
+/* Read a lookahead token if we need one and don't already have one.  */
+/* yyresume: */
+
+  /* First try to decide what to do without reference to lookahead token.  */
+
+  yyn = yypact[yystate];
+  if (yyn == YYPACT_NINF)
+    goto yydefault;
+
+  /* Not known => get a lookahead token if don't already have one.  */
+
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
+  if (yychar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      yychar = YYLEX;
+    }
+
+  if (yychar <= YYEOF)
+    {
+      yychar = yytoken = YYEOF;
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      yytoken = YYTRANSLATE (yychar);
+      YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
+    }
+
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  yyn += yytoken;
+  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+    goto yydefault;
+  yyn = yytable[yyn];
+  if (yyn <= 0)
+    {
+      if (yyn == 0 || yyn == YYTABLE_NINF)
+	goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  /* Shift the lookahead token.  */
+  YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
+
+  /* Discard the token being shifted unless it is eof.  */
+  if (yychar != YYEOF)
+    yychar = YYEMPTY;
+
+  *++yyvsp = yylval;
+
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (yyerrstatus)
+    yyerrstatus--;
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+yydefault:
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+  goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction.  |
+`-----------------------------*/
+yyreduce:
+  /* yyn is the number of a rule to reduce with.  */
+  yylen = yyr2[yyn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     `$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  yyval = yyvsp[1-yylen];
+
+
+  YY_REDUCE_PRINT (yyn);
+  switch (yyn)
+    {
+        case 21:
+#line 259 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        __osm_qos_parser_port_group_start();
+                    }
+    break;
+
+  case 22:
+#line 264 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        __osm_qos_parser_port_group_end();
+                    }
+    break;
+
+  case 43:
+#line 353 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        __osm_qos_parser_sl2vl_scope_start();
+                    }
+    break;
+
+  case 44:
+#line 358 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        __osm_qos_parser_sl2vl_scope_end();
+                    }
+    break;
+
+  case 60:
+#line 401 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        __osm_qos_parser_vlarb_scope_start();
+                    }
+    break;
+
+  case 61:
+#line 406 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        __osm_qos_parser_vlarb_scope_end();
+                    }
+    break;
+
+  case 74:
+#line 461 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        __osm_qos_parser_qos_level_start();
+                    }
+    break;
+
+  case 75:
+#line 466 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        __osm_qos_parser_qos_level_end();
+                    }
+    break;
+
+  case 89:
+#line 517 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        __osm_qos_parser_match_rule_start();
+                    }
+    break;
+
+  case 90:
+#line 522 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        __osm_qos_parser_match_rule_end();
+                    }
+    break;
+
+  case 99:
+#line 543 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <name> of <port-group> - one instance */
+                        p_current_port_group->name = strdup(__osm_qos_parser_strip_white(str_buffer));
+                    }
+    break;
+
+  case 100:
+#line 549 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <name> of <port-group> - one instance */
+                        RESET_BUFFER;
+                        if (p_current_port_group->name)
+                        {
+                           yyerror("<port-group> has multiple <name> tags");
+                           return 1;
+                        }
+                    }
+    break;
+
+  case 101:
+#line 560 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <use> of <port-group>,<qos-level>,<qos-match-rule> - one instance */
+                        if (p_current_port_group)
+                            p_current_port_group->use = strdup(__osm_qos_parser_strip_white(str_buffer));
+                        else if (p_current_qos_level)
+                            p_current_qos_level->use = strdup(__osm_qos_parser_strip_white(str_buffer));
+                        else if (p_current_qos_match_rule)
+                            p_current_qos_match_rule->use = strdup(__osm_qos_parser_strip_white(str_buffer));
+                        else
+                            CL_ASSERT(0);
+                    }
+    break;
+
+  case 102:
+#line 573 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        RESET_BUFFER;
+                        if (p_current_port_group)
+                        {
+                            /* <use> of <port-group> - one instance */
+                            if (p_current_port_group->use)
+                            {
+                                yyerror("<port-group> has multiple <use> tags");
+                                return 1;
+                            }
+                        }
+                        else if (p_current_qos_level)
+                        {
+                            /* <use> of <qos-level> - one instance */
+                            if (p_current_qos_level->use)
+                            {
+                                yyerror("<qos-level> has multiple <use> tags");
+                                return 1;
+                            }
+                        }
+                        else if (p_current_qos_match_rule)
+                        {
+                            /* <use> of <qos-match-rule> - one instance */
+                            if (p_current_qos_match_rule->use)
+                            {
+                                yyerror("<qos-match-rule> has multiple <use> tags");
+                                return 1;
+                            }
+                        }
+                        else
+                           CL_ASSERT(0);
+                    }
+    break;
+
+  case 103:
+#line 607 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <port-name> in <port-group> - any num of instances */
+                        osm_qos_string_vector_item_t * p_str_item =
+                            (osm_qos_string_vector_item_t *)malloc(sizeof(osm_qos_string_vector_item_t));
+
+                        p_str_item->str = strdup(__osm_qos_parser_strip_white(str_buffer));
+                        cl_ptr_vector_insert(&p_current_port_group->port_names,
+                                             p_str_item,
+                                             NULL);
+                    }
+    break;
+
+  case 104:
+#line 619 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <port-name> in <port-group> - any num of instances */
+                        CL_ASSERT(p_current_port_group);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 105:
+#line 626 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        osm_qos_uint64_vector_item_t * p_uint64_item =
+                            (osm_qos_uint64_vector_item_t *)malloc(sizeof(osm_qos_uint64_vector_item_t));
+
+                        __osm_qos_parser_str2uint64(&p_uint64_item->value,
+                                                  __osm_qos_parser_strip_white(str_buffer));
+                        cl_ptr_vector_insert(&p_current_port_group->port_guids,
+                                             p_uint64_item,
+                                             NULL);
+                    }
+    break;
+
+  case 106:
+#line 638 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <port-guid> in <port-group> - any num of instances */
+                        CL_ASSERT(p_current_port_group);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 107:
+#line 645 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <partition> in <port-group> - any num of instances */
+                        osm_qos_string_vector_item_t * p_str_item =
+                            (osm_qos_string_vector_item_t *)malloc(sizeof(osm_qos_string_vector_item_t));
+
+                        p_str_item->str = strdup(__osm_qos_parser_strip_white(str_buffer));
+                        cl_ptr_vector_insert(&p_current_port_group->partitions,
+                                             p_str_item,
+                                             NULL);
+                    }
+    break;
+
+  case 108:
+#line 657 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <partition> in <port-group> - any num of instances */
+                        CL_ASSERT(p_current_port_group);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 109:
+#line 664 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <node-type> in <port-group> - any num of instances */
+                        uint8_t tmp_node_type;
+                        char * clean_str = __osm_qos_parser_strip_white(str_buffer);
+
+                        if (strcasecmp(clean_str,OSM_QOS_NODE_TYPE_ROUTER) == 0)
+                            tmp_node_type = IB_NODE_TYPE_ROUTER;
+                        else if (strcasecmp(clean_str,OSM_QOS_NODE_TYPE_CA) == 0)
+                            tmp_node_type = IB_NODE_TYPE_CA;
+                        else if (strcasecmp(clean_str,OSM_QOS_NODE_TYPE_SWITCH) == 0)
+                            tmp_node_type = IB_NODE_TYPE_SWITCH;
+                        else
+                        {
+                            yyerror("wrong <node-type> value");
+                            return 1;
+                        }
+
+                        osm_qos_uint32_vector_item_t * p_uint32_item =
+                            (osm_qos_uint32_vector_item_t *)malloc(sizeof(osm_qos_uint32_vector_item_t));
+
+                        p_uint32_item->value = tmp_node_type;
+                        cl_ptr_vector_insert(&p_current_port_group->node_types,
+                                             p_uint32_item,
+                                             NULL);
+                    }
+    break;
+
+  case 110:
+#line 691 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <node-type> in <port-group> - any num of instances */
+                        CL_ASSERT(p_current_port_group);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 111:
+#line 698 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <group> in <sl2vl-scope> and <vlarb-scope> - any num of instances.
+                           The <group> value refers to the <name> in <port-group> */
+                        osm_qos_string_vector_item_t * p_str_item =
+                            (osm_qos_string_vector_item_t *)malloc(sizeof(osm_qos_string_vector_item_t));
+
+                        p_str_item->str = strdup(__osm_qos_parser_strip_white(str_buffer));
+                        if (p_current_sl2vl_scope)
+                            cl_ptr_vector_insert(&p_current_sl2vl_scope->groups,
+                                                 p_str_item,
+                                                 NULL);
+                        else if (p_current_vlarb_scope)
+                            cl_ptr_vector_insert(&p_current_vlarb_scope->groups,
+                                                 p_str_item,
+                                                 NULL);
+                        else
+                            CL_ASSERT(0);
+                    }
+    break;
+
+  case 112:
+#line 718 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <group> in <sl2vl-scope> and <vlarb-scope> - any num of instances.
+                           The <group> value refers to the <name> in <port-group> */
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 113:
+#line 725 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <across> in <sl2vl-scope> and <vlarb-scope> - any num of instances.
+                           The value refers to the <name> in <port-group> */
+                        osm_qos_string_vector_item_t * p_str_item =
+                            (osm_qos_string_vector_item_t *)malloc(sizeof(osm_qos_string_vector_item_t));
+                        p_str_item->str = strdup(__osm_qos_parser_strip_white(str_buffer));
+
+                        /* inserting this both to across_to and to across_from */
+                        if (p_current_sl2vl_scope) {
+                            cl_ptr_vector_insert(&p_current_sl2vl_scope->across_from,
+                                                 p_str_item,
+                                                 NULL);
+                            cl_ptr_vector_insert(&p_current_sl2vl_scope->across_to,
+                                                 p_str_item,
+                                                 NULL);
+                        }
+                        else if (p_current_vlarb_scope)
+                            cl_ptr_vector_insert(&p_current_vlarb_scope->across,
+                                                 p_str_item,
+                                                 NULL);
+                        else
+                            CL_ASSERT(0);
+                    }
+    break;
+
+  case 114:
+#line 750 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <across> in <sl2vl-scope> and <vlarb-scope> - any num of instances.
+                           The value refers to the <name> in <port-group> */
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 115:
+#line 757 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <across-from> in <sl2vl-scope> - any num of instances.
+                           The value refers to the <name> in <port-group> */
+                        osm_qos_string_vector_item_t * p_str_item =
+                            (osm_qos_string_vector_item_t *)malloc(sizeof(osm_qos_string_vector_item_t));
+
+                        p_str_item->str = strdup(__osm_qos_parser_strip_white(str_buffer));
+                        cl_ptr_vector_insert(&p_current_sl2vl_scope->across_from,
+                                             p_str_item,
+                                             NULL);
+                    }
+    break;
+
+  case 116:
+#line 770 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <across-from> in <sl2vl-scope> - any num of instances.
+                           The value refers to the <name> in <port-group> */
+                        CL_ASSERT(p_current_sl2vl_scope);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 117:
+#line 778 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <across-to> in <sl2vl-scope> - any num of instances.
+                           The value refers to the <name> in <port-group> */
+                        osm_qos_string_vector_item_t * p_str_item =
+                            (osm_qos_string_vector_item_t *)malloc(sizeof(osm_qos_string_vector_item_t));
+
+                        p_str_item->str = strdup(__osm_qos_parser_strip_white(str_buffer));
+                        cl_ptr_vector_insert(&p_current_sl2vl_scope->across_to,
+                                             p_str_item,
+                                             NULL);
+                    }
+    break;
+
+  case 118:
+#line 791 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <across-to> in <sl2vl-scope> - any num of instances.
+                           The value refers to the <name> in <port-group> */
+                        CL_ASSERT(p_current_sl2vl_scope);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 119:
+#line 799 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <from> in <sl2vl-scope> - any num of instances.
+                           The value refers to the <name> in <port-group> */
+                        osm_qos_string_vector_item_t * p_str_item =
+                            (osm_qos_string_vector_item_t *)malloc(sizeof(osm_qos_string_vector_item_t));
+
+                        p_str_item->str = strdup(__osm_qos_parser_strip_white(str_buffer));
+                        cl_ptr_vector_insert(&p_current_sl2vl_scope->from,
+                                             p_str_item,
+                                             NULL);
+                    }
+    break;
+
+  case 120:
+#line 812 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <from> in <sl2vl-scope> - any num of instances.
+                           The value refers to the <name> in <port-group> */
+                        CL_ASSERT(p_current_sl2vl_scope);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 121:
+#line 820 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <to> in <sl2vl-scope> - any num of instances.
+                           The value refers to the <name> in <port-group> */
+                        osm_qos_string_vector_item_t * p_str_item =
+                            (osm_qos_string_vector_item_t *)malloc(sizeof(osm_qos_string_vector_item_t));
+
+                        p_str_item->str = strdup(__osm_qos_parser_strip_white(str_buffer));
+                        cl_ptr_vector_insert(&p_current_sl2vl_scope->to,
+                                             p_str_item,
+                                             NULL);
+                    }
+    break;
+
+  case 122:
+#line 833 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <to> in <sl2vl-scope> - any num of instances.
+                           The value refers to the <name> in <port-group> */
+                        CL_ASSERT(p_current_sl2vl_scope);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 123:
+#line 843 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <sl2vl-table> in <sl2vl-scope> - one instance of 16 numbers */
+                        uint8_t counter = 0;
+                        uint8_t i;
+                        char * tok = NULL;
+                        char * tmp_str = __osm_qos_parser_strip_white(str_buffer);
+
+                        /* checking the syntax */
+                        for (i = 0; tmp_str[i] != '\0'; i++)
+                            if (tmp_str[i] == ',')
+                                counter ++;
+                        if (counter != 15)
+                        {
+                            yyerror("wrong number of values in <sl2vl-table> (should be 16)");
+                            return 1;
+                        }
+                        for (i = 1; tmp_str[i] != '\0'; i++)
+                            if ((tmp_str[i-1] == ',') && (tmp_str[i] == ','))
+                            {
+                                yyerror("wrong syntax in <sl2vl-table>");
+                                return 1;
+                            }
+
+                        /* tokenizing the line */
+                        i = 0;
+                        tok = strtok (tmp_str," ,");
+                        while (tok != NULL && i < 16)
+                        {
+                            p_current_sl2vl_scope->sl2vl_table[i++] = atoi(tok);
+                            tok = strtok (NULL, " ,");
+                        }
+                        if (tok != NULL)
+                        {
+                            yyerror("wrong syntax in <sl2vl-table>");
+                            return 1;
+                        }
+                    }
+    break;
+
+  case 124:
+#line 882 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <sl2vl-table> in <sl2vl-scope> - one instance of 16 numbers */
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 125:
+#line 888 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <sn> in <qos-level> - one instance */
+                        p_current_qos_level->sn = atoi(__osm_qos_parser_strip_white(str_buffer));
+                    }
+    break;
+
+  case 126:
+#line 894 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <sn> in <qos-level> - one instance */
+                        CL_ASSERT(p_current_qos_level);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 127:
+#line 901 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <sl> in <qos-level> - one instance */
+                        p_current_qos_level->sl = atoi(__osm_qos_parser_strip_white(str_buffer));
+                    }
+    break;
+
+  case 128:
+#line 907 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <sl> in <qos-level> - one instance */
+                        CL_ASSERT(p_current_qos_level);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 129:
+#line 914 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <mtu-limit> in <qos-level> - one instance */
+                        p_current_qos_level->mtu_limit = atoi(__osm_qos_parser_strip_white(str_buffer));
+                    }
+    break;
+
+  case 130:
+#line 920 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <mtu-limit> in <qos-level> - one instance */
+                        CL_ASSERT(p_current_qos_level);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 131:
+#line 927 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <rate-limit> in <qos-level> - one instance */
+                        p_current_qos_level->rate_limit = atoi(__osm_qos_parser_strip_white(str_buffer));
+                    }
+    break;
+
+  case 132:
+#line 933 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <rate-limit> in <qos-level> - one instance */
+                        CL_ASSERT(p_current_qos_level);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 133:
+#line 940 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <class> in <qos-level> - one instance of one number */
+                        p_current_qos_level->class = atoi(__osm_qos_parser_strip_white(str_buffer));
+                    }
+    break;
+
+  case 134:
+#line 946 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <class> in <qos-level> - one instance of one number */
+                        CL_ASSERT(p_current_qos_level);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 135:
+#line 953 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <vl-high-limit> in <vlarb-scope> - one instance of one number */
+                        p_current_vlarb_scope->vl_high_limit = atoi(__osm_qos_parser_strip_white(str_buffer));
+                    }
+    break;
+
+  case 136:
+#line 959 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <vl-high-limit> in <vlarb-scope> - one instance of one number */
+                        CL_ASSERT(p_current_vlarb_scope);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 137:
+#line 968 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <vl-high> in <vlarb-scope> - list of pairs of numbers with ':' and ',' */
+                        uint8_t i;
+                        char * tok = NULL;
+                        char * tmp_str = __osm_qos_parser_strip_white(str_buffer);
+                        osm_qos_vlarb_hl_vector_item_t * p_hl_item = NULL;
+
+                        /* checking the syntax */
+                        for (i = 1; tmp_str[i] != '\0'; i++)
+                            if ( (tmp_str[i-1] == ',' || tmp_str[i-1] == ':') &&
+                                 (tmp_str[i]   == ',' || tmp_str[i]   == ':') )
+                            {
+                                yyerror("wrong syntax in <vl-high>");
+                                return 1;
+                            }
+
+                        /* tokenizing the line */
+                        i = 0;
+                        tok = strtok (tmp_str,":,");
+                        while (tok != NULL)
+                        {
+                            p_hl_item = (osm_qos_vlarb_hl_vector_item_t *)malloc(sizeof(osm_qos_vlarb_hl_vector_item_t));
+                            p_hl_item->sl = atoi(tok);
+                            tok = strtok (NULL, ":,");
+                            p_hl_item->credits = atoi(tok);
+                            tok = strtok (NULL, ":,");
+                            cl_ptr_vector_insert(&p_current_vlarb_scope->vlarb_highs,
+                                                 p_hl_item,
+                                                 NULL);
+                        }
+
+                    }
+    break;
+
+  case 138:
+#line 1002 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <vl-high> in <vlarb-scope> - list of pairs of numbers with ':' and ',' */
+                        CL_ASSERT(p_current_vlarb_scope);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 139:
+#line 1011 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <vl-low> in <vlarb-scope> - list of pairs of numbers with ':' and ',' */
+                        uint8_t i;
+                        char * tok = NULL;
+                        char * tmp_str = __osm_qos_parser_strip_white(str_buffer);
+                        osm_qos_vlarb_hl_vector_item_t * p_hl_item = NULL;
+
+                        /* checking the syntax */
+                        for (i = 1; tmp_str[i] != '\0'; i++)
+                            if ( (tmp_str[i-1] == ',' || tmp_str[i-1] == ':') &&
+                                 (tmp_str[i]   == ',' || tmp_str[i]   == ':') )
+                            {
+                                yyerror("wrong syntax in <vl-low>");
+                                return 1;
+                            }
+
+                        /* tokenizing the line */
+                        i = 0;
+                        tok = strtok (tmp_str,":,");
+                        while (tok != NULL)
+                        {
+                            p_hl_item = (osm_qos_vlarb_hl_vector_item_t *)malloc(sizeof(osm_qos_vlarb_hl_vector_item_t));
+                            p_hl_item->sl = atoi(tok);
+                            tok = strtok (NULL, ":,");
+                            p_hl_item->credits = atoi(tok);
+                            tok = strtok (NULL, ":,");
+                            cl_ptr_vector_insert(&p_current_vlarb_scope->vlarb_lows,
+                                                 p_hl_item,
+                                                 NULL);
+                        }
+
+                    }
+    break;
+
+  case 140:
+#line 1045 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <vl-low> in <vlarb-scope> - list of pairs of numbers with ':' and ',' */
+                        CL_ASSERT(p_current_vlarb_scope);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 141:
+#line 1052 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <source> in <qos-match-rule> - text */
+                        p_current_qos_match_rule->source = strdup(__osm_qos_parser_strip_white(str_buffer));
+                    }
+    break;
+
+  case 142:
+#line 1058 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <source> in <qos-match-rule> - text */
+                        CL_ASSERT(p_current_qos_match_rule);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 143:
+#line 1065 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <destination> in <qos-match-rule> - text */
+                        p_current_qos_match_rule->destination = strdup(__osm_qos_parser_strip_white(str_buffer));
+                    }
+    break;
+
+  case 144:
+#line 1071 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <destination> in <qos-match-rule> - text */
+                        CL_ASSERT(p_current_qos_match_rule);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 145:
+#line 1080 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <class> in <qos-match-rule> - "7-9,11" */
+                        uint32_t i;
+                        uint32_t j;
+                        uint32_t range_low;
+                        uint32_t range_high;
+                        char * dash_ptr = NULL;
+                        char * tok = NULL;
+                        char * tokens[10000] = {NULL};
+                        char * tmp_str = __osm_qos_parser_strip_white(str_buffer);
+                        osm_qos_uint32_vector_item_t * p_uint32_item = NULL;
+
+                        /* checking the syntax */
+                        for (i = 1; tmp_str[i] != '\0'; i++)
+                            if ( (tmp_str[i]   == ',' || tmp_str[i]   == '-') &&
+                                 (tmp_str[i-1] == ',' || tmp_str[i-1] == '-') )
+                            {
+                                yyerror("wrong syntax in <class>");
+                                return 1;
+                            }
+
+                        /* tokenizing the line with ',' being a delimiter */
+                        tok = strtok (tmp_str," ,");
+                        for (i = 0; tok != NULL; tok = strtok (NULL, " ,"))
+                            tokens[i++] = tok;
+
+                        for (i = 0; tokens[i] != NULL; i++)
+                        {
+                            dash_ptr = strstr(tokens[i],"-");
+                            if (dash_ptr != NULL)
+                            {
+                                /* this is number range: i-j */
+                                *dash_ptr = '\0';
+                                range_low = atoi(tokens[i]);
+                                *dash_ptr = '-';
+                                range_high = atoi(dash_ptr + 1);
+                                if (range_low > range_high)
+                                {
+                                    uint32_t tmp_num = range_low;
+                                    range_low = range_high;
+                                    range_high = tmp_num;
+                                }
+                                for (j = range_low; j <= range_high; j++)
+                                {
+                                    p_uint32_item = (osm_qos_uint32_vector_item_t *)
+                                                        malloc(sizeof(osm_qos_uint32_vector_item_t));
+                                    p_uint32_item->value = j;
+                                    cl_ptr_vector_insert(&p_current_qos_match_rule->classes,
+                                                         p_uint32_item,
+                                                         NULL);
+                                }
+                            }
+                            else
+                            {
+                                /* this is a single number */
+                                p_uint32_item = (osm_qos_uint32_vector_item_t *)
+                                                    malloc(sizeof(osm_qos_uint32_vector_item_t));
+                                p_uint32_item->value = atoi(tokens[i]);
+                                cl_ptr_vector_insert(&p_current_qos_match_rule->classes,
+                                                     p_uint32_item,
+                                                     NULL);
+                            }
+                        }
+                    }
+    break;
+
+  case 146:
+#line 1146 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        CL_ASSERT(p_current_qos_match_rule);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 147:
+#line 1154 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <service> in <qos_match_rule> - list of ',' delimited numbers */
+                        uint32_t i;
+                        char * tok = NULL;
+                        char * tmp_str = __osm_qos_parser_strip_white(str_buffer);
+                        osm_qos_uint32_vector_item_t * p_uint32_item = NULL;
+
+                        /* checking the syntax */
+                        for (i = 1; tmp_str[i] != '\0'; i++)
+                            if ((tmp_str[i-1] == ',') && (tmp_str[i] == ','))
+                            {
+                                yyerror("wrong syntax in <service>");
+                                return 1;
+                            }
+
+                        /* tokenizing the line */
+                        tok = strtok (tmp_str," ,");
+                        while (tok != NULL)
+                        {
+                            p_uint32_item = (osm_qos_uint32_vector_item_t *)malloc(sizeof(osm_qos_uint32_vector_item_t));
+                            p_uint32_item->value = atoi(tok);
+                            cl_ptr_vector_insert(&p_current_qos_match_rule->services,
+                                                 p_uint32_item,
+                                                 NULL);
+                            tok = strtok (NULL, " ,");
+                        }
+
+                    }
+    break;
+
+  case 148:
+#line 1184 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <service> in <qos_match_rule> - list of ',' delimited numbers */
+                        CL_ASSERT(p_current_qos_match_rule);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 149:
+#line 1191 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <qos-level-sn> in <qos-match-rule> - single number */
+
+                        osm_qos_uint32_vector_item_t * p_uint32_item =
+                            (osm_qos_uint32_vector_item_t *)malloc(sizeof(osm_qos_uint32_vector_item_t));
+
+                        p_uint32_item->value = atoi(__osm_qos_parser_strip_white(str_buffer));
+                        cl_ptr_vector_insert(&p_current_qos_match_rule->qos_level_sns,
+                                             p_uint32_item,
+                                             NULL);
+                    }
+    break;
+
+  case 150:
+#line 1204 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* <qos-level-sn> in <qos-match-rule> - single number */
+                        CL_ASSERT(p_current_qos_match_rule);
+                        RESET_BUFFER;
+                    }
+    break;
+
+  case 155:
+#line 1224 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        strcat(str_buffer,yyvsp[0]);
+                        free(yyvsp[0]);
+                    }
+    break;
+
+  case 156:
+#line 1228 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        strcat(str_buffer,yyvsp[0]);
+                        free(yyvsp[0]);
+                    }
+    break;
+
+  case 157:
+#line 1232 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        strcat(str_buffer,yyvsp[0]);
+                        free(yyvsp[0]);
+                    }
+    break;
+
+  case 158:
+#line 1236 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        strcat(str_buffer,yyvsp[0]);
+                        free(yyvsp[0]);
+                    }
+    break;
+
+  case 159:
+#line 1240 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        strcat(str_buffer,yyvsp[0]);
+                        free(yyvsp[0]);
+                    }
+    break;
+
+  case 177:
+#line 1269 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        strcat(str_buffer,yyvsp[0]);
+                        free(yyvsp[0]);
+                    }
+    break;
+
+  case 178:
+#line 1275 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        strcat(str_buffer,yyvsp[0]);
+                        free(yyvsp[0]);
+                    }
+    break;
+
+  case 179:
+#line 1281 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        strcat(str_buffer,yyvsp[0]);
+                        free(yyvsp[0]);
+                    }
+    break;
+
+  case 182:
+#line 1291 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        strcat(str_buffer,yyvsp[0]);
+                        free(yyvsp[0]);
+                    }
+    break;
+
+  case 183:
+#line 1297 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        strcat(str_buffer,yyvsp[0]);
+                        free(yyvsp[0]);
+                    }
+    break;
+
+  case 185:
+#line 1304 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+    {
+                        /* swallow whitespace */
+                        free(yyvsp[0]);
+                    }
+    break;
+
+
+    }
+
+/* Line 991 of yacc.c.  */
+#line 2491 "y.tab.c"
+

+  yyvsp -= yylen;
+  yyssp -= yylen;
+
+
+  YY_STACK_PRINT (yyss, yyssp);
+
+  *++yyvsp = yyval;
+
+
+  /* Now `shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTOKENS];
+
+  goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+  /* If not already recovering from an error, report this error.  */
+  if (!yyerrstatus)
+    {
+      ++yynerrs;
+#if YYERROR_VERBOSE
+      yyn = yypact[yystate];
+
+      if (YYPACT_NINF < yyn && yyn < YYLAST)
+	{
+	  YYSIZE_T yysize = 0;
+	  int yytype = YYTRANSLATE (yychar);
+	  char *yymsg;
+	  int yyx, yycount;
+
+	  yycount = 0;
+	  /* Start YYX at -YYN if negative to avoid negative indexes in
+	     YYCHECK.  */
+	  for (yyx = yyn < 0 ? -yyn : 0;
+	       yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
+	    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+	      yysize += yystrlen (yytname[yyx]) + 15, yycount++;
+	  yysize += yystrlen ("syntax error, unexpected ") + 1;
+	  yysize += yystrlen (yytname[yytype]);
+	  yymsg = (char *) YYSTACK_ALLOC (yysize);
+	  if (yymsg != 0)
+	    {
+	      char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
+	      yyp = yystpcpy (yyp, yytname[yytype]);
+
+	      if (yycount < 5)
+		{
+		  yycount = 0;
+		  for (yyx = yyn < 0 ? -yyn : 0;
+		       yyx < (int) (sizeof (yytname) / sizeof (char *));
+		       yyx++)
+		    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+		      {
+			const char *yyq = ! yycount ? ", expecting " : " or ";
+			yyp = yystpcpy (yyp, yyq);
+			yyp = yystpcpy (yyp, yytname[yyx]);
+			yycount++;
+		      }
+		}
+	      yyerror (yymsg);
+	      YYSTACK_FREE (yymsg);
+	    }
+	  else
+	    yyerror ("syntax error; also virtual memory exhausted");
+	}
+      else
+#endif /* YYERROR_VERBOSE */
+	yyerror ("syntax error");
+    }
+
+
+
+  if (yyerrstatus == 3)
+    {
+      /* If just tried and failed to reuse lookahead token after an
+	 error, discard it.  */
+
+      /* Return failure if at end of input.  */
+      if (yychar == YYEOF)
+        {
+	  /* Pop the error token.  */
+          YYPOPSTACK;
+	  /* Pop the rest of the stack.  */
+	  while (yyss < yyssp)
+	    {
+	      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
+	      yydestruct (yystos[*yyssp], yyvsp);
+	      YYPOPSTACK;
+	    }
+	  YYABORT;
+        }
+
+      YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
+      yydestruct (yytoken, &yylval);
+      yychar = YYEMPTY;
+
+    }
+
+  /* Else will try to reuse lookahead token after shifting the error
+     token.  */
+  goto yyerrlab2;
+
+
+/*----------------------------------------------------.
+| yyerrlab1 -- error raised explicitly by an action.  |
+`----------------------------------------------------*/
+yyerrlab1:
+
+  /* Suppress GCC warning that yyerrlab1 is unused when no action
+     invokes YYERROR.  */
+#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) \
+    && !defined __cplusplus
+  __attribute__ ((__unused__))
+#endif
+
+
+  goto yyerrlab2;
+
+
+/*---------------------------------------------------------------.
+| yyerrlab2 -- pop states until the error token can be shifted.  |
+`---------------------------------------------------------------*/
+yyerrlab2:
+  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
+
+  for (;;)
+    {
+      yyn = yypact[yystate];
+      if (yyn != YYPACT_NINF)
+	{
+	  yyn += YYTERROR;
+	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+	    {
+	      yyn = yytable[yyn];
+	      if (0 < yyn)
+		break;
+	    }
+	}
+
+      /* Pop the current state because it cannot handle the error token.  */
+      if (yyssp == yyss)
+	YYABORT;
+
+      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
+      yydestruct (yystos[yystate], yyvsp);
+      yyvsp--;
+      yystate = *--yyssp;
+
+      YY_STACK_PRINT (yyss, yyssp);
+    }
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  YYDPRINTF ((stderr, "Shifting error token, "));
+
+  *++yyvsp = yylval;
+
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+yyacceptlab:
+  yyresult = 0;
+  goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+yyabortlab:
+  yyresult = 1;
+  goto yyreturn;
+
+#ifndef yyoverflow
+/*----------------------------------------------.
+| yyoverflowlab -- parser overflow comes here.  |
+`----------------------------------------------*/
+yyoverflowlab:
+  yyerror ("parser stack overflow");
+  yyresult = 2;
+  /* Fall through.  */
+#endif
+
+yyreturn:
+#ifndef yyoverflow
+  if (yyss != yyssa)
+    YYSTACK_FREE (yyss);
+#endif
+  return yyresult;
+}
+
+
+#line 1310 "/mswg/work/kliteyn/git/management/osm/opensm/osm_qos_parser.y"
+
+
+/***************************************************
+ ***************************************************/
+
+int osm_qos_parse_policy_file(
+    IN  osm_log_t             * p_log,
+    IN  const char            * policy_file,
+    OUT osm_qos_parse_tree_t ** pp_qos_parse_tree)
+{
+    int res = 0;
+    p_osm_log = p_log;
+
+    //~ OSM_LOG_ENTER(p_osm_log, osm_qos_parse);
+
+    *pp_qos_parse_tree = NULL;
+    yyin = fopen (policy_file, "r");
+    if (!yyin)
+    {
+        //~ osm_log(p_osm_log, OSM_LOG_ERROR,
+                //~ "osm_qos_parse: ERR AC01: "
+                //~ "Failed opening QoS policy file (%s)\n",
+                //~ policy_file);
+        printf( "osm_qos_parse: ERR AC01: "
+                "Failed opening QoS policy file (%s)\n",
+                policy_file);
+        res = 1;
+        goto Exit;
+    }
+    column_num = 1;
+    line_num = 1;
+    __osm_qos_parse_tree_init();
+    str_buffer[0] = '\0';
+    
+    res = yyparse();
+    
+    if (res == 0)
+    {
+        *pp_qos_parse_tree = p_qos_parse_tree;
+    }
+    else
+    {
+        //~ osm_log(p_osm_log, OSM_LOG_ERROR,
+                //~ "osm_qos_parse: ERR AC02: "
+                //~ "Failed parsing QoS policy file (%s)\n",
+                //~ policy_file);
+        printf( "osm_qos_parse: ERR AC02: "
+                "Failed parsing QoS policy file (%s)\n",
+                policy_file);
+        res = 1;
+        goto Exit;
+    }
+
+  Exit:
+    if (yyin)
+        fclose(yyin);
+    //~ OSM_LOG_EXIT(p_osm_log);
+    return res;
+}
+
+/***************************************************
+ ***************************************************/
+
+int yywrap()
+{
+    return(1);
+}
+
+/***************************************************
+ ***************************************************/
+
+void yyerror (char *s)
+{
+    //~ OSM_LOG_ENTER(p_osm_log, yyerror);
+    //~ osm_log(p_osm_log, OSM_LOG_ERROR,
+            //~ "yyerror: ERR AC03: "
+            //~ "Syntax error (line %d:%d): %s. "
+            //~ "Last text read: \"%s\"\n",
+            //~ line_num, column_num, s, __osm_qos_parser_strip_white(yytext));
+    printf( "yyerror: ERR AC03: "
+            "Syntax error (line %d:%d): %s. "
+            "Last text read: \"%s\"\n",
+            line_num, column_num, s, __osm_qos_parser_strip_white(yytext));
+    //~ OSM_LOG_EXIT(p_osm_log);
+}
+
+/***************************************************
+ ***************************************************/
+
+static char * __osm_qos_parser_strip_white(char * str)
+{
+   int i;
+   for (i = (strlen(str)-1); i >= 0; i--)
+   {
+      if (isspace(str[i]))
+          str[i] = '\0';
+      else
+         break;
+   }
+   for (i = 0; i < strlen(str); i++)
+   {
+      if (!isspace(str[i]))
+         break;
+   }
+   return &(str[i]);
+}
+
+/***************************************************
+ ***************************************************/
+
+static void __osm_qos_parser_str2uint64(uint64_t * p_val, char * str)
+{
+#if __WORDSIZE == 64
+   *p_val = strtoul(str, NULL, 0);
+#else
+   *p_val = strtoull(str, NULL, 0);
+#endif
+}
+
+/***************************************************
+ ***************************************************/
+
+static void __osm_qos_parse_tree_init()
+{
+   p_qos_parse_tree = (osm_qos_parse_tree_t *)
+                        malloc(sizeof(osm_qos_parse_tree_t));
+
+   memset(p_qos_parse_tree, 0, sizeof(osm_qos_parse_tree_t));
+
+   cl_ptr_vector_init(&p_qos_parse_tree->port_groups,
+                      0,  /* min size */
+                      4); /* grow size */
+   cl_ptr_vector_init(&p_qos_parse_tree->sl2vl_tables,
+                      0,  /* min size */
+                      4); /* grow size */
+   cl_ptr_vector_init(&p_qos_parse_tree->vlarb_tables,
+                      0,  /* min size */
+                      4); /* grow size */
+   cl_ptr_vector_init(&p_qos_parse_tree->qos_levels,
+                      0,  /* min size */
+                      4); /* grow size */
+   cl_ptr_vector_init(&p_qos_parse_tree->qos_match_rules,
+                      0,  /* min size */
+                      4); /* grow size */
+}
+
+/***************************************************
+ ***************************************************/
+
+static void __osm_qos_parser_port_group_start()
+{
+   p_current_port_group = (osm_qos_port_group_t *)
+                                malloc(sizeof(osm_qos_port_group_t));
+   memset(p_current_port_group, 0, sizeof(osm_qos_port_group_t));
+
+   cl_ptr_vector_init(&p_current_port_group->port_guids,
+                      0,  /* min size */
+                      4); /* grow size */
+   cl_ptr_vector_init(&p_current_port_group->port_names,
+                      0,  /* min size */
+                      4); /* grow size */
+   cl_ptr_vector_init(&p_current_port_group->partitions,
+                      0,  /* min size */
+                      4); /* grow size */
+   cl_ptr_vector_init(&p_current_port_group->node_types,
+                      0,  /* min size */
+                      4); /* grow size */
+}
+
+/***************************************************
+ ***************************************************/
+
+static void __osm_qos_parser_port_group_end()
+{
+   cl_ptr_vector_insert(&p_qos_parse_tree->port_groups,
+                        p_current_port_group,
+                        NULL);
+   p_current_port_group = NULL;
+}
+
+/***************************************************
+ ***************************************************/
+
+static void __osm_qos_parser_sl2vl_scope_start()
+{
+    p_current_sl2vl_scope = (osm_qos_sl2vl_scope_t *)
+                                malloc(sizeof(osm_qos_sl2vl_scope_t));
+    memset(p_current_sl2vl_scope, 0, sizeof(osm_qos_sl2vl_scope_t));
+
+    cl_ptr_vector_init(&p_current_sl2vl_scope->groups,
+                       0,  /* min size */
+                       4); /* grow size */
+    cl_ptr_vector_init(&p_current_sl2vl_scope->from,
+                       0,  /* min size */
+                       4); /* grow size */
+    cl_ptr_vector_init(&p_current_sl2vl_scope->to,
+                       0,  /* min size */
+                       4); /* grow size */
+    cl_ptr_vector_init(&p_current_sl2vl_scope->across_from,
+                       0,  /* min size */
+                       4); /* grow size */
+    cl_ptr_vector_init(&p_current_sl2vl_scope->across_to,
+                       0,  /* min size */
+                       4); /* grow size */
+}
+
+/***************************************************
+ ***************************************************/
+
+static void __osm_qos_parser_sl2vl_scope_end()
+{
+    cl_ptr_vector_insert(&p_qos_parse_tree->sl2vl_tables,
+                         p_current_sl2vl_scope,
+                         NULL);
+    p_current_sl2vl_scope = NULL;
+}
+
+/***************************************************
+ ***************************************************/
+
+static void __osm_qos_parser_vlarb_scope_start()
+{
+    p_current_vlarb_scope = (osm_qos_vlarb_scope_t *)
+                                malloc(sizeof(osm_qos_vlarb_scope_t));
+    memset(p_current_vlarb_scope, 0, sizeof(osm_qos_vlarb_scope_t));
+
+    cl_ptr_vector_init(&p_current_vlarb_scope->groups,
+                       0,  /* min size */
+                       4); /* grow size */
+    cl_ptr_vector_init(&p_current_vlarb_scope->across,
+                       0,  /* min size */
+                       4); /* grow size */
+    cl_ptr_vector_init(&p_current_vlarb_scope->vlarb_highs,
+                       0,  /* min size */
+                       4); /* grow size */
+    cl_ptr_vector_init(&p_current_vlarb_scope->vlarb_lows,
+                       0,  /* min size */
+                       4); /* grow size */
+}
+
+/***************************************************
+ ***************************************************/
+
+static void __osm_qos_parser_vlarb_scope_end()
+{
+    cl_ptr_vector_insert(&p_qos_parse_tree->vlarb_tables,
+                         p_current_vlarb_scope,
+                         NULL);
+    p_current_vlarb_scope = NULL;
+}
+
+
+/***************************************************
+ ***************************************************/
+
+static void __osm_qos_parser_qos_level_start()
+{
+   p_current_qos_level = (osm_qos_level_t *)
+                            malloc(sizeof(osm_qos_level_t));
+   memset(p_current_qos_level, 0, sizeof(osm_qos_level_t));
+}
+
+/***************************************************
+ ***************************************************/
+
+static void __osm_qos_parser_qos_level_end()
+{
+   cl_ptr_vector_insert(&p_qos_parse_tree->qos_levels,
+                        p_current_qos_level,
+                        NULL);
+   p_current_qos_level = NULL;
+}
+
+/***************************************************
+ ***************************************************/
+
+static void __osm_qos_parser_match_rule_start()
+{
+   p_current_qos_match_rule = (osm_qos_match_rule_t *)
+                                    malloc(sizeof(osm_qos_match_rule_t));
+   memset(p_current_qos_match_rule, 0, sizeof(osm_qos_match_rule_t));
+
+   cl_ptr_vector_init(&p_current_qos_match_rule->services,
+                      0,  /* min size */
+                      4); /* grow size */
+   cl_ptr_vector_init(&p_current_qos_match_rule->qos_level_sns,
+                      0,  /* min size */
+                      4); /* grow size */
+   cl_ptr_vector_init(&p_current_qos_match_rule->classes,
+                      0,  /* min size */
+                      4); /* grow size */
+}
+
+/***************************************************
+ ***************************************************/
+
+static void __osm_qos_parser_match_rule_end()
+{
+   cl_ptr_vector_insert(&p_qos_parse_tree->qos_match_rules,
+                        p_current_qos_match_rule,
+                        NULL);
+   p_current_qos_match_rule = NULL;
+}
+
+/***************************************************
+ ***************************************************/
+
+/* free all the memory occupied by the parse tree data structure */
+void osm_qos_parser_destroy_parse_tree(
+    IN  osm_qos_parse_tree_t * p_qos_parse_tree)
+{
+    uint32_t i;
+    uint32_t j;
+
+    osm_qos_port_group_t   * p_port_group = NULL;
+    osm_qos_sl2vl_scope_t  * p_sl2vl_scope = NULL;
+    osm_qos_vlarb_scope_t  * p_vlarb_scope = NULL;
+    osm_qos_level_t        * p_qos_level = NULL;
+    osm_qos_match_rule_t   * p_qos_match_rule = NULL;
+
+    osm_qos_string_vector_item_t   * p_str_vector_item = NULL;
+    osm_qos_uint64_vector_item_t   * p_uint64_vector_item = NULL;
+    osm_qos_uint32_vector_item_t   * p_uint32_vector_item = NULL;
+    osm_qos_vlarb_hl_vector_item_t * p_vlarb_hl_vector_item = NULL;
+
+    for (i = 0; i < cl_ptr_vector_get_size(&p_qos_parse_tree->port_groups); i++)
+    {
+        cl_ptr_vector_at(&p_qos_parse_tree->port_groups, i, (void **)&p_port_group);
+
+        if (p_port_group->name)
+            free(p_port_group->name);
+        if (p_port_group->use)
+            free(p_port_group->use);
+
+        for (j = 0; j < cl_ptr_vector_get_size(&p_port_group->port_guids); j++)
+        {
+            cl_ptr_vector_at(&p_port_group->port_guids, j, (void **)&p_uint64_vector_item);
+            free(p_uint64_vector_item);
+        }
+        cl_ptr_vector_destroy(&p_port_group->port_guids);
+
+        for (j = 0; j < cl_ptr_vector_get_size(&p_port_group->port_names); j++)
+        {
+            cl_ptr_vector_at(&p_port_group->port_names, j, (void **)&p_str_vector_item);
+            if (p_str_vector_item->str)
+                free(p_str_vector_item->str);
+            free(p_str_vector_item);
+        }
+        cl_ptr_vector_destroy(&p_port_group->port_names);
+
+        for (j = 0; j < cl_ptr_vector_get_size(&p_port_group->partitions); j++)
+        {
+            cl_ptr_vector_at(&p_port_group->partitions, j, (void **)&p_str_vector_item);
+            if (p_str_vector_item->str)
+                free(p_str_vector_item->str);
+            free(p_str_vector_item);
+        }
+        cl_ptr_vector_destroy(&p_port_group->partitions);
+
+        for (j = 0; j < cl_ptr_vector_get_size(&p_port_group->node_types); j++)
+        {
+            cl_ptr_vector_at(&p_port_group->node_types, j, (void **)&p_uint32_vector_item);
+            free(p_uint32_vector_item);
+        }
+        cl_ptr_vector_destroy(&p_port_group->node_types);
+        
+        free(p_port_group);
+    }
+    cl_ptr_vector_destroy(&p_qos_parse_tree->port_groups);
+
+    for (i = 0; i < cl_ptr_vector_get_size(&p_qos_parse_tree->sl2vl_tables); i++)
+    {
+        cl_ptr_vector_at(&p_qos_parse_tree->sl2vl_tables, i, (void **)&p_sl2vl_scope);
+
+        for (j = 0; j < cl_ptr_vector_get_size(&p_sl2vl_scope->groups); j++)
+        {
+            cl_ptr_vector_at(&p_sl2vl_scope->groups, j, (void **)&p_str_vector_item);
+            if (p_str_vector_item->str)
+                free(p_str_vector_item->str);
+            free(p_str_vector_item);
+        }
+        cl_ptr_vector_destroy(&p_sl2vl_scope->groups);
+
+        for (j = 0; j < cl_ptr_vector_get_size(&p_sl2vl_scope->from); j++)
+        {
+            cl_ptr_vector_at(&p_sl2vl_scope->from, j, (void **)&p_str_vector_item);
+            if (p_str_vector_item->str)
+                free(p_str_vector_item->str);
+            free(p_str_vector_item);
+        }
+        cl_ptr_vector_destroy(&p_sl2vl_scope->from);
+
+        for (j = 0; j < cl_ptr_vector_get_size(&p_sl2vl_scope->to); j++)
+        {
+            cl_ptr_vector_at(&p_sl2vl_scope->to, j, (void **)&p_str_vector_item);
+            if (p_str_vector_item->str)
+                free(p_str_vector_item->str);
+            free(p_str_vector_item);
+        }
+        cl_ptr_vector_destroy(&p_sl2vl_scope->to);
+
+        for (j = 0; j < cl_ptr_vector_get_size(&p_sl2vl_scope->across_from); j++)
+        {
+            cl_ptr_vector_at(&p_sl2vl_scope->across_from, j, (void **)&p_str_vector_item);
+            if (p_str_vector_item->str)
+                free(p_str_vector_item->str);
+            free(p_str_vector_item);
+        }
+        cl_ptr_vector_destroy(&p_sl2vl_scope->across_from);
+
+        for (j = 0; j < cl_ptr_vector_get_size(&p_sl2vl_scope->across_to); j++)
+        {
+            cl_ptr_vector_at(&p_sl2vl_scope->across_to, j, (void **)&p_str_vector_item);
+            if (p_str_vector_item->str)
+                free(p_str_vector_item->str);
+            free(p_str_vector_item);
+        }
+        cl_ptr_vector_destroy(&p_sl2vl_scope->across_to);
+
+        free(p_sl2vl_scope);
+    }
+    cl_ptr_vector_destroy(&p_qos_parse_tree->sl2vl_tables);
+
+    for (i = 0; i < cl_ptr_vector_get_size(&p_qos_parse_tree->vlarb_tables); i++)
+    {
+        cl_ptr_vector_at(&p_qos_parse_tree->vlarb_tables, i, (void **)&p_vlarb_scope);
+
+        for (j = 0; j < cl_ptr_vector_get_size(&p_vlarb_scope->groups); j++)
+        {
+            cl_ptr_vector_at(&p_vlarb_scope->groups, j, (void **)&p_str_vector_item);
+            if (p_str_vector_item->str)
+                free(p_str_vector_item->str);
+            free(p_str_vector_item);
+        }
+        cl_ptr_vector_destroy(&p_vlarb_scope->groups);
+
+        for (j = 0; j < cl_ptr_vector_get_size(&p_vlarb_scope->across); j++)
+        {
+            cl_ptr_vector_at(&p_vlarb_scope->across, j, (void **)&p_str_vector_item);
+            if (p_str_vector_item->str)
+                free(p_str_vector_item->str);
+            free(p_str_vector_item);
+        }
+        cl_ptr_vector_destroy(&p_vlarb_scope->across);
+
+        for (j = 0; j < cl_ptr_vector_get_size(&p_vlarb_scope->vlarb_highs); j++)
+        {
+            cl_ptr_vector_at(&p_vlarb_scope->vlarb_highs, j, (void **)&p_vlarb_hl_vector_item);
+            free(p_vlarb_hl_vector_item);
+        }
+        cl_ptr_vector_destroy(&p_vlarb_scope->vlarb_highs);
+
+        for (j = 0; j < cl_ptr_vector_get_size(&p_vlarb_scope->vlarb_lows); j++)
+        {
+            cl_ptr_vector_at(&p_vlarb_scope->vlarb_lows, j, (void **)&p_vlarb_hl_vector_item);
+            free(p_vlarb_hl_vector_item);
+        }
+        cl_ptr_vector_destroy(&p_vlarb_scope->vlarb_lows);
+
+        free(p_vlarb_scope);
+    }
+    cl_ptr_vector_destroy(&p_qos_parse_tree->vlarb_tables);
+
+    for (i = 0; i < cl_ptr_vector_get_size(&p_qos_parse_tree->qos_levels); i++)
+    {
+        cl_ptr_vector_at(&p_qos_parse_tree->qos_levels, i, (void **)&p_qos_level);
+        if (p_qos_level->use)
+            free(p_qos_level->use);
+        free(p_qos_level);
+    }
+    cl_ptr_vector_destroy(&p_qos_parse_tree->qos_levels);
+
+    for (i = 0; i < cl_ptr_vector_get_size(&p_qos_parse_tree->qos_match_rules); i++)
+    {
+        cl_ptr_vector_at(&p_qos_parse_tree->qos_match_rules, i, (void **)&p_qos_match_rule);
+
+        if (p_qos_match_rule->use)
+            free(p_qos_match_rule->use);
+        if (p_qos_match_rule->source)
+            free(p_qos_match_rule->source);
+        if (p_qos_match_rule->destination)
+            free(p_qos_match_rule->destination);
+
+        for (j = 0; j < cl_ptr_vector_get_size(&p_qos_match_rule->services); j++)
+        {
+            cl_ptr_vector_at(&p_qos_match_rule->services, j, (void **)&p_uint32_vector_item);
+            free(p_uint32_vector_item);
+        }
+        cl_ptr_vector_destroy(&p_qos_match_rule->services);
+
+        for (j = 0; j < cl_ptr_vector_get_size(&p_qos_match_rule->qos_level_sns); j++)
+        {
+            cl_ptr_vector_at(&p_qos_match_rule->qos_level_sns, j, (void **)&p_uint32_vector_item);
+            free(p_uint32_vector_item);
+        }
+        cl_ptr_vector_destroy(&p_qos_match_rule->qos_level_sns);
+
+        for (j = 0; j < cl_ptr_vector_get_size(&p_qos_match_rule->classes); j++)
+        {
+            cl_ptr_vector_at(&p_qos_match_rule->classes, j, (void **)&p_uint32_vector_item);
+            free(p_uint32_vector_item);
+        }
+        cl_ptr_vector_destroy(&p_qos_match_rule->classes);
+
+        free(p_qos_match_rule);
+    }
+    cl_ptr_vector_destroy(&p_qos_parse_tree->qos_match_rules);
+
+    free(p_qos_parse_tree);
+}
+
+/***************************************************
+ ***************************************************/
+
-- 
1.4.4.1.GIT





More information about the general mailing list