⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 syntax.cc

📁 分布式仿真 开放源码
💻 CC
📖 第 1 页 / 共 3 页
字号:
/* A Bison parser, made by GNU Bison 1.875a.  *//* Skeleton parser for Yacc-like parsing with Bison,   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 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 {     IDENT = 258,     STRING = 259,     L_PAR = 260,     R_PAR = 261,     ATTRIBUTE = 262,     CLASS = 263,     DIMENSION = 264,     FED = 265,     FED_VERSION = 266,     FEDERATION = 267,     FEDERATE = 268,     INTERACTIONS = 269,     OBJECTS = 270,     ORDER = 271,     PARAMETER = 272,     SEC_LEVEL = 273,     SPACE = 274,     SPACES = 275,     TRANSPORT = 276   };#endif#define IDENT 258#define STRING 259#define L_PAR 260#define R_PAR 261#define ATTRIBUTE 262#define CLASS 263#define DIMENSION 264#define FED 265#define FED_VERSION 266#define FEDERATION 267#define FEDERATE 268#define INTERACTIONS 269#define OBJECTS 270#define ORDER 271#define PARAMETER 272#define SEC_LEVEL 273#define SPACE 274#define SPACES 275#define TRANSPORT 276/* Copy the first part of user declarations.  */#line 1 "syntax.yy"// ----------------------------------------------------------------------------// CERTI - HLA RunTime Infrastructure// Copyright (C) 2003  Beno顃 Br閔ol閑//// This file is part of CERTI-libCERTI//// CERTI-libCERTI is free software ; you can redistribute it and/or// modify it under the terms of the GNU Lesser General Public License// as published by the Free Software Foundation ; either version 2 of// the License, or (at your option) any later version.//// CERTI-libCERTI 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// Lesser General Public License for more details.//// You should have received a copy of the GNU Lesser 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//// $Id: syntax.yy,v 3.2 2003/11/13 10:45:56 breholee Exp $// ----------------------------------------------------------------------------#include "fed.hh"#include <iostream>using std::cout ;using std::endl ;namespace certi {namespace fedparser {extern const char *arg ;extern const char *fed_filename ;extern int line_number ;}}int yylex();int yyerror(char *);/* 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 173 "syntax.cc"#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  4/* YYLAST -- Last index in YYTABLE.  */#define YYLAST   78/* YYNTOKENS -- Number of terminals. */#define YYNTOKENS  22/* YYNNTS -- Number of nonterminals. */#define YYNNTS  53/* YYNRULES -- Number of rules. */#define YYNRULES  76/* YYNRULES -- Number of states. */#define YYNSTATES  116/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */#define YYUNDEFTOK  2#define YYMAXUTOK   276#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};#if YYDEBUG/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in   YYRHS.  */static const unsigned char yyprhs[] ={       0,     0,     3,     4,     5,    16,    17,    22,    23,    28,      30,    31,    33,    36,    37,    38,    45,    46,    47,    53,      55,    56,    58,    61,    62,    63,    70,    72,    73,    75,      78,    79,    84,    85,    86,    92,    94,    95,    97,   100,     101,   102,   109,   111,   114,   116,   119,   122,   126,   127,     129,   132,   133,   140,   141,   142,   148,   150,   151,   153,     156,   157,   158,   167,   169,   172,   174,   177,   181,   182,     184,   187,   188,   193,   194,   199,   200};/* YYRHS -- A `-1'-separated list of the rules' RHS. */static const yysigned_char yyrhs[] ={      23,     0,    -1,    -1,    -1,    10,    24,    26,    28,    30,      35,    47,    59,    25,     6,    -1,    -1,    12,     4,    27,       6,    -1,    -1,    11,     4,    29,     6,    -1,    31,    -1,      -1,    32,    -1,    31,    32,    -1,    -1,    -1,    13,     4,      33,     4,    34,     6,    -1,    -1,    -1,    20,    36,    38,      37,     6,    -1,    39,    -1,    -1,    40,    -1,    39,    40,      -1,    -1,    -1,    19,     4,    41,    43,    42,     6,    -1,      44,    -1,    -1,    45,    -1,    44,    45,    -1,    -1,     9,       4,    46,     6,    -1,    -1,    -1,    15,    48,    50,    49,       6,    -1,    51,    -1,    -1,    52,    -1,    51,    52,    -1,      -1,    -1,     8,     4,    53,    55,    54,     6,    -1,    56,      -1,    73,    56,    -1,    51,    -1,    73,    51,    -1,    56,      51,    -1,    73,    56,    51,    -1,    -1,    57,    -1,    56,      57,    -1,    -1,     7,     4,    21,    16,    58,     6,    -1,      -1,    -1,    14,    60,    62,    61,     6,    -1,    63,    -1,      -1,    64,    -1,    63,    64,    -1,    -1,    -1,     8,     4,      21,    16,    65,    67,    66,     6,    -1,    68,    -1,    71,      68,    -1,    63,    -1,    71,    63,    -1,    71,    68,    63,      -1,    -1,    69,    -1,    68,    69,    -1,    -1,    17,     4,      70,     6,    -1,    -1,    18,     4,    72,     6,    -1,    -1,      18,     4,    74,     6,    -1};/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */static const unsigned char yyrline[] ={       0,    71,    71,    77,    71,    81,    81,    85,    85,    89,      90,    93,    94,    97,    98,    97,   102,   103,   102,   107,     108,   111,   112,   115,   116,   115,   120,   121,   124,   125,     128,   128,   132,   133,   132,   137,   138,   141,   142,   145,     146,   145,   150,   151,   152,   153,   154,   155,   156,   159,     160,   163,   163,   167,   168,   167,   172,   173,   176,   177,     180,   181,   180,   185,   186,   187,   188,   189,   190,   193,     194,   197,   197,   201,   201,   205,   205};#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", "IDENT", "STRING", "L_PAR", "R_PAR",   "ATTRIBUTE", "CLASS", "DIMENSION", "FED", "FED_VERSION", "FEDERATION",   "FEDERATE", "INTERACTIONS", "OBJECTS", "ORDER", "PARAMETER",   "SEC_LEVEL", "SPACE", "SPACES", "TRANSPORT", "$accept", "fed", "@1",   "@2", "federation", "@3", "fed_version", "@4", "federates",   "federate_list", "federate", "@5", "@6", "spaces", "@7", "@8",   "opt_space_list", "space_list", "space", "@9", "@10",   "opt_dimension_list", "dimension_list", "dimension", "@11", "objects",   "@12", "@13", "opt_object_class_list", "object_class_list",   "object_class", "@14", "@15", "object_class_items", "attribute_list",   "attribute", "@16", "interactions", "@17", "@18",   "opt_interaction_class_list", "interaction_class_list",   "interaction_class", "@19", "@20", "interaction_class_items",   "parameter_list", "parameter", "@21", "interaction_security_level",   "@22", "object_security_level", "@23", 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};# endif/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */static const unsigned char yyr1[] ={       0,    22,    24,    25,    23,    27,    26,    29,    28,    30,      30,    31,    31,    33,    34,    32,    36,    37,    35,    38,      38,    39,    39,    41,    42,    40,    43,    43,    44,    44,      46,    45,    48,    49,    47,    50,    50,    51,    51,    53,      54,    52,    55,    55,    55,    55,    55,    55,    55,    56,      56,    58,    57,    60,    61,    59,    62,    62,    63,    63,      65,    66,    64,    67,    67,    67,    67,    67,    67,    68,      68,    70,    69,    72,    71,    74,    73};/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */static const unsigned char yyr2[] ={       0,     2,     0,     0,    10,     0,     4,     0,     4,     1,       0,     1,     2,     0,     0,     6,     0,     0,     5,     1,       0,     1,     2,     0,     0,     6,     1,     0,     1,     2,       0,     4,     0,     0,     5,     1,     0,     1,     2,     0,       0,     6,     1,     2,     1,     2,     2,     3,     0,     1,       2,     0,     6,     0,     0,     5,     1,     0,     1,     2,       0,     0,     8,     1,     2,     1,     2,     3,     0,     1,       2,     0,     4,     0,     4,     0,     4};/* 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[] ={       0,     2,     0,     0,     1,     0,     0,     5,     0,    10,       0,     7,     0,     0,     9,    11,     6,     0,    13,    16,       0,    12,     8,     0,    20,    32,     0,    14,     0,    17,      19,    21,    36,    53,     3,     0,    23,     0,    22,     0,      33,    35,    37,    57,     0,    15,    27,    18,    39,     0,      38,     0,    54,    56,    58,     4,     0,    24,    26,    28,      48,    34,     0,     0,    59,    30,     0,    29,     0,     0,      44,    40,    42,    49,     0,     0,    55,     0,    25,     0,      75,     0,    46,    50,    45,    43,    60,    31,     0,     0,      41,    47,    68,    51,    76,     0,     0,    65,    61,    63,      69,     0,     0,    71,    73,     0,    70,    66,    64,    52,       0,     0,    62,    67,    72,    74};/* YYDEFGOTO[NTERM-NUM]. */static const yysigned_char yydefgoto[] ={      -1,     2,     3,    44,     6,    10,     9,    17,    13,    14,      15,    23,    35,    20,    24,    37,    29,    30,    31,    46,      66,    57,    58,    59,    77,    26,    32,    49,    40,    41,      42,    60,    81,    71,    72,    73,   102,    34,    43,    63,      52,    53,    54,    92,   105,    98,    99,   100,   110,   101,     111,    74,    89};/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing   STATE-NUM.  */#define YYPACT_NINF -90static const yysigned_char yypact[] ={      12,   -90,    10,    13,   -90,    20,    16,   -90,    24,    17,      23,   -90,    28,    14,    17,   -90,   -90,    27,   -90,   -90,      21,   -90,   -90,    31,    18,   -90,    25,   -90,    34,   -90,      18,   -90,    32,   -90,   -90,    35,   -90,    36,   -90,    42,     -90,    32,   -90,    39,    43,   -90,    41,   -90,   -90,    45,     -90,    44,   -90,    39,   -90,   -90,    49,   -90,    41,   -90,      -2,   -90,    37,    50,   -90,   -90,    51,   -90,    55,    57,      32,   -90,     0,   -90,     0,    46,   -90,    58,   -90,    47,     -90,    59,    32,   -90,    32,     0,   -90,   -90,    53,    60,     -90,    32,     3,   -90,   -90,    63,    66,    39,   -90,    38,     -90,     1,    65,   -90,   -90,    67,   -90,    39,     1,   -90,      68,    69,   -90,    39,   -90,   -90};/* YYPGOTO[NTERM-NUM].  */static const yysigned_char yypgoto[] ={     -90,   -90,   -90,   -90,   -90,   -90,   -90,   -90,   -90,   -90,      62,   -90,   -90,   -90,   -90,   -90,   -90,   -90,    33,   -90,     -90,   -90,   -90,    19,   -90,   -90,   -90,   -90,   -90,   -59,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -