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

📄 gram.c

📁 tinyos-2.x.rar
💻 C
📖 第 1 页 / 共 5 页
字号:

/* YYFINAL -- State number of the termination state.  */
#define YYFINAL  7
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   151

/* YYNTOKENS -- Number of terminals.  */
#define YYNTOKENS  51
/* YYNNTS -- Number of nonterminals.  */
#define YYNNTS  33
/* YYNRULES -- Number of rules.  */
#define YYNRULES  81
/* YYNRULES -- Number of states.  */
#define YYNSTATES  170

/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
#define YYUNDEFTOK  2
#define YYMAXUTOK   301

#define YYTRANSLATE(YYX)						\
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
static const yytype_uint8 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,    50,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,    49,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,    47,     2,    48,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     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
};

#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
   YYRHS.  */
static const yytype_uint16 yyprhs[] =
{
       0,     0,     3,     6,     8,    14,    17,    19,    24,    25,
      27,    28,    30,    31,    33,    34,    36,    39,    41,    45,
      49,    53,    57,    61,    65,    69,    73,    77,    81,    85,
      89,    93,    97,   101,   105,   109,   113,   117,   121,   125,
     129,   133,   137,   139,   142,   148,   153,   154,   156,   159,
     161,   165,   169,   173,   177,   181,   185,   187,   190,   196,
     201,   202,   204,   207,   209,   213,   217,   219,   222,   228,
     231,   233,   235,   238,   239,   241,   244,   246,   250,   254,
     258,   260
};

/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
static const yytype_int8 yyrhs[] =
{
      52,     0,    -1,    52,    53,    -1,    53,    -1,    54,    47,
      56,    48,    49,    -1,     3,    55,    -1,     7,    -1,    57,
      58,    59,    60,    -1,    -1,    61,    -1,    -1,    63,    -1,
      -1,    69,    -1,    -1,    75,    -1,    61,    62,    -1,    62,
      -1,    17,     8,    49,    -1,    16,     8,    49,    -1,    18,
       8,    49,    -1,    17,    10,    49,    -1,    16,    10,    49,
      -1,    18,    10,    49,    -1,    14,    11,    49,    -1,    15,
      11,    49,    -1,    19,    11,    49,    -1,    20,    11,    49,
      -1,    21,     8,    49,    -1,    22,     8,    49,    -1,    23,
       8,    49,    -1,    25,     8,    49,    -1,    26,     9,    49,
      -1,    24,     8,    49,    -1,    27,    11,    49,    -1,    34,
      11,    49,    -1,    35,    11,    49,    -1,    33,    11,    49,
      -1,    38,     8,    49,    -1,    39,     8,    49,    -1,    37,
      11,    49,    -1,    45,    11,    49,    -1,    64,    -1,    63,
      64,    -1,    65,    47,    66,    48,    49,    -1,     4,    12,
      50,     8,    -1,    -1,    67,    -1,    67,    68,    -1,    68,
      -1,    28,    11,    49,    -1,    29,    11,    49,    -1,    32,
      11,    49,    -1,    30,    83,    49,    -1,    31,    83,    49,
      -1,    36,    55,    49,    -1,    70,    -1,    69,    70,    -1,
      71,    47,    72,    48,    49,    -1,     5,    12,    50,     8,
      -1,    -1,    73,    -1,    73,    74,    -1,    74,    -1,    40,
       9,    49,    -1,    41,    83,    49,    -1,    76,    -1,    75,
      76,    -1,    79,    47,    80,    48,    49,    -1,    77,    78,
      -1,    78,    -1,    12,    -1,     6,    77,    -1,    -1,    81,
      -1,    81,    82,    -1,    82,    -1,    42,     8,    49,    -1,
      43,    11,    49,    -1,    44,    83,    49,    -1,     8,    -1,
      13,    -1
};

/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
static const yytype_uint16 yyrline[] =
{
       0,   124,   124,   125,   128,   172,   187,   194,   202,   203,
     207,   210,   214,   217,   221,   224,   227,   228,   231,   235,
     239,   243,   247,   251,   255,   259,   263,   267,   271,   275,
     279,   283,   287,   291,   295,   299,   303,   307,   311,   315,
     319,   323,   329,   333,   340,   371,   394,   395,   398,   399,
     402,   406,   410,   414,   418,   422,   430,   434,   441,   449,
     473,   474,   477,   478,   482,   486,   492,   496,   503,   510,
     511,   514,   549,   558,   559,   562,   563,   567,   571,   575,
     588,   592
};
#endif

#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
/* YYTNAME[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", "T_INTERFACE", "T_PREFIX", "T_ROUTE",
  "T_RDNSS", "STRING", "NUMBER", "SIGNEDNUMBER", "DECIMAL", "SWITCH",
  "IPV6ADDR", "INFINITY", "T_IgnoreIfMissing", "T_AdvSendAdvert",
  "T_MaxRtrAdvInterval", "T_MinRtrAdvInterval", "T_MinDelayBetweenRAs",
  "T_AdvManagedFlag", "T_AdvOtherConfigFlag", "T_AdvLinkMTU",
  "T_AdvReachableTime", "T_AdvRetransTimer", "T_AdvCurHopLimit",
  "T_AdvDefaultLifetime", "T_AdvDefaultPreference", "T_AdvSourceLLAddress",
  "T_AdvOnLink", "T_AdvAutonomous", "T_AdvValidLifetime",
  "T_AdvPreferredLifetime", "T_AdvRouterAddr", "T_AdvHomeAgentFlag",
  "T_AdvIntervalOpt", "T_AdvHomeAgentInfo", "T_Base6to4Interface",
  "T_UnicastOnly", "T_HomeAgentPreference", "T_HomeAgentLifetime",
  "T_AdvRoutePreference", "T_AdvRouteLifetime", "T_AdvRDNSSPreference",
  "T_AdvRDNSSOpenFlag", "T_AdvRDNSSLifetime", "T_AdvMobRtrSupportFlag",
  "T_BAD_TOKEN", "'{'", "'}'", "';'", "'/'", "$accept", "grammar",
  "ifacedef", "ifacehead", "name", "ifaceparams", "optional_ifacevlist",
  "optional_prefixlist", "optional_routelist", "optional_rdnsslist",
  "ifacevlist", "ifaceval", "prefixlist", "prefixdef", "prefixhead",
  "optional_prefixplist", "prefixplist", "prefixparms", "routelist",
  "routedef", "routehead", "optional_routeplist", "routeplist",
  "routeparms", "rdnsslist", "rdnssdef", "rdnssaddrs", "rdnssaddr",
  "rdnsshead", "optional_rdnssplist", "rdnssplist", "rdnssparms",
  "number_or_infinity", 0
};
#endif

# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
   token YYLEX-NUM.  */
static const yytype_uint16 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,   123,   125,    59,
      47
};
# endif

/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
static const yytype_uint8 yyr1[] =
{
       0,    51,    52,    52,    53,    54,    55,    56,    57,    57,
      58,    58,    59,    59,    60,    60,    61,    61,    62,    62,
      62,    62,    62,    62,    62,    62,    62,    62,    62,    62,
      62,    62,    62,    62,    62,    62,    62,    62,    62,    62,
      62,    62,    63,    63,    64,    65,    66,    66,    67,    67,
      68,    68,    68,    68,    68,    68,    69,    69,    70,    71,
      72,    72,    73,    73,    74,    74,    75,    75,    76,    77,
      77,    78,    79,    80,    80,    81,    81,    82,    82,    82,
      83,    83
};

/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
static const yytype_uint8 yyr2[] =
{
       0,     2,     2,     1,     5,     2,     1,     4,     0,     1,
       0,     1,     0,     1,     0,     1,     2,     1,     3,     3,
       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
       3,     3,     1,     2,     5,     4,     0,     1,     2,     1,
       3,     3,     3,     3,     3,     3,     1,     2,     5,     4,
       0,     1,     2,     1,     3,     3,     1,     2,     5,     2,
       1,     1,     2,     0,     1,     2,     1,     3,     3,     3,
       1,     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 yytype_uint8 yydefact[] =
{
       0,     0,     0,     3,     0,     6,     5,     1,     2,     8,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,    10,     9,    17,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,    12,    11,    42,     0,    16,    24,    25,    19,    22,
      18,    21,    20,    23,    26,    27,    28,    29,    30,    33,
      31,    32,    34,    37,    35,    36,    40,    38,    39,    41,
       4,     0,     0,    14,    13,    56,     0,    43,    46,     0,
       0,     0,     7,    15,    66,     0,    57,    60,     0,     0,
       0,     0,     0,     0,     0,    47,    49,    45,     0,    71,
      72,    70,    67,    73,     0,     0,     0,    61,    63,     0,
       0,    80,    81,     0,     0,     0,     0,     0,    48,    59,
      69,     0,     0,     0,     0,    74,    76,     0,     0,     0,
      62,    50,    51,    53,    54,    52,    55,    44,     0,     0,
       0,     0,    75,    64,    65,    58,    77,    78,    79,    68
};

/* YYDEFGOTO[NTERM-NUM].  */
static const yytype_int16 yydefgoto[] =
{
      -1,     2,     3,     4,     6,    31,    32,    61,    93,   102,
      33,    34,    62,    63,    64,   114,   115,   116,    94,    95,
      96,   126,   127,   128,   103,   104,   120,   121,   105,   144,
     145,   146,   133
};

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
#define YYPACT_NINF -112
static const yytype_int8 yypact[] =
{
       5,    26,     7,  -112,   -10,  -112,  -112,  -112,  -112,     1,
      38,    39,    33,    34,    37,    40,    41,    45,    46,    47,
      48,    49,    50,    51,    52,    53,    54,    55,    59,    60,
      58,     0,    56,     1,  -112,     9,    12,    21,    22,    23,
      24,    25,    27,    28,    29,    30,    31,    32,    35,    36,
      42,    43,    44,    57,    61,    62,    63,    64,    65,    66,
      70,    78,    56,  -112,    69,  -112,  -112,  -112,  -112,  -112,
    -112,  -112,  -112,  -112,  -112,  -112,  -112,  -112,  -112,  -112,
    -112,  -112,  -112,  -112,  -112,  -112,  -112,  -112,  -112,  -112,
    -112,    67,    74,    81,    78,  -112,    71,  -112,   -27,    80,
      72,    77,  -112,    81,  -112,    73,  -112,   -28,    79,    83,
      -2,    -2,    84,    26,    75,   -27,  -112,  -112,    88,  -112,
      77,  -112,  -112,   -13,    89,    -2,    76,   -28,  -112,    82,
      85,  -112,  -112,    86,    87,    90,    91,    92,  -112,  -112,
    -112,    93,    94,    -2,    95,   -13,  -112,    96,    97,    98,
    -112,  -112,  -112,  -112,  -112,  -112,  -112,  -112,    99,   100,
     101,   102,  -112,  -112,  -112,  -112,  -112,  -112,  -112,  -112
};

/* YYPGOTO[NTERM-NUM].  */
static const yytype_int8 yypgoto[] =
{
    -112,  -112,   105,  -112,   -38,  -112,  -112,  -112,  -112,  -112,
    -112,   104,  -112,    68,  -112,  -112,  -112,   -18,  -112,     6,
    -112,  -112,  -112,   -25,  -112,    -4,  -112,   -17,  -112,  -112,
    -112,   -41,  -111
};

/* 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 -1
static const yytype_uint8 yytable[] =
{
     134,   108,   109,   110,   111,   112,   131,     7,     1,   113,
       1,   132,   124,   125,   148,    10,    11,    12,    13,    14,
      15,    16,    17,    18,    19,    20,    21,    22,    23,   141,
     142,   143,   160,     5,    24,    25,    26,     9,    27,    28,
      29,    37,    39,    38,    40,    41,    30,    42,    59,    35,
      36,    43,    44,    45,    46,    47,    48,    49,    66,    50,
      60,    67,    51,    52,    53,    54,    55,    56,    57,    58,
      68,    69,    70,    71,    72,   136,    73,    74,    75,    76,
      77,    78,    91,    92,    79,    80,   100,   101,   117,   119,
     129,    81,    82,    83,   130,   135,   139,   138,   147,   122,
     106,   158,   150,   140,   162,   159,    84,     8,     0,     0,
      85,    86,    87,    88,    89,    90,    98,    99,   107,     0,
     123,     0,   118,   137,   149,     0,     0,     0,     0,     0,
      97,   151,     0,     0,   152,   153,   154,    65,     0,   155,
     156,   157,     0,   161,     0,   163,   164,   165,   166,   167,
     168,   169
};

static const yytype_int16 yycheck[] =
{
     111,    28,    29,    30,    31,    32,     8,     0,     3,    36,
       3,    13,    40,    41,   125,    14,    15,    16,    17,    18,
      19,    20,    21,    22,    23,    24,    25,    26,    27,    42,
      43,    44,   143,     7,    33,    34,    35,    47,    37,    38,
      39,     8,     8,    10,    10,     8,    45,    10,    48,    11,
      11,    11,    11,     8,     8,     8,     8,     8,    49,     9,
       4,    49,    11,    11,    11,    11,    11,     8,     8,    11,
      49,    49,    49,    49,    49,   113,    49,    49,    49,    49,
      49,    49,    12,     5,    49,    49,    12,     6,     8,    12,
      11,    49,    49,    49,    11,    11,     8,   115,     9,   103,
      94,     8,   127,   120,   145,    11,    49,     2,    -1,    -1,
      49,    49,    49,    49,    49,    49,    47,    50,    47,    -1,
      47,    -1,    50,    48,    48,    -1,    -1,    -1,    -1,    -1,
      62,    49,    -1,    -1,    49,    49,    49,    33,    -1,    49,
      49,    49,    -1,    48,    -1,    49,    49,    49,    49,    49,
      49,    49
};

/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
   symbol of state STATE-NUM.  */
static const yytype_uint8 yystos[] =
{
       0,     3,    52,    53,    54,     7,    55,     0,    53,    47,
      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
      24,    25,    26,    27,    33,    34,    35,    37,    38,    39,
      45,    56,    57,    61,    62,    11,    11,     8,    10,     8,
      10,     8,    10,    11,    11,     8,     8,     8,     8,     8,
       9,    11,    11,    11,    11,    11,     8,     8,    11,    48,
       4,    58,    63,    64,    65,    62,    49,    49,    49,    49,
      49,    49,    49,    49,    49,    49,    49,    49,    49,    49,
      49,    49,    49,    49,    49,    49,    49,    49,    49,    49,
      49,    12,     5,    59,    69,    70,    71,    64,    47,    50,
      12,     6,    60,    75,    76,    79,    70,    47,    28,    29,
      30,    31,    32,    36,    66,    67,    68,     8,    50,    12,
      77,    78,    76,    47,    40,    41,    72,    73,    74,    11,
      11,     8,    13,    83,    83,    11,    55,    48,    68,     8,
      78,    42,    43,    44,    80,    81,    82,     9,    83,    48,
      74,    49,    49,    49,    49,    49,    49,    49,     8,    11,
      83,    48,    82,    49,    49,    49,    49,    49,    49,    49
};

#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 yyerrorlab


/* 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 (1);						\
      goto yybackup;						\
    }								\
  else								\
    {								\
      yyerror (YY_("syntax error: cannot back up")); \
      YYERROR;							\
    }								\
while (YYID (0))


#define YYTERROR	1
#define YYERRCODE	256


/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
   If N is 0, then set CURRENT to the empty location which ends
   the previous symbol: RHS[0] (always defined).  */

#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N)				\
    do									\
      if (YYID (N))                                                    \
	{								\
	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
	}								\
      else								\
	{								\
	  (Current).first_line   = (Current).last_line   =		\
	    YYRHSLOC (Rhs, 0).last_line;				\
	  (Current).first_column = (Current).last_column =		\
	    YYRHSLOC (Rhs, 0).last_column;				\
	}								\
    while (YYID (0))
#endif


/* YY_LOCATION_PRINT -- Print the location on the stream.
   This macro was not mandated originally: define only if we know
   we won't break user code: when these are the locations we know.  */

#ifndef YY_LOCATION_PRINT
# if YYLTYPE_IS_TRIVIAL
#  define YY_LOCATION_PRINT(File, Loc)			\
     fprintf (File, "%d.%d-%d.%d",			\
	      (Loc).first_line, (Loc).first_column,	\
	      (Loc).last_line,  (Loc).last_column)
# else
#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
#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 (YYID (0))

# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
do {									  \
  if (yydebug)								  \
    {									  \
      YYFPRINTF (stderr, "%s ", Title);					  \
      yy_symbol_print (stderr,						  \
		  Type, Value); \
      YYFPRINTF (stderr, "\n");						  \
    }									  \
} while (YYID (0))


/*--------------------------------.
| Print this symbol on YYOUTPUT.  |
`--------------------------------*/

/*ARGSUSED*/
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
#else
static void
yy_symbol_value_print (yyoutput, yytype, yyvaluep)

⌨️ 快捷键说明

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