hl_yacc.c++

来自「FreeFem++可以生成高质量的有限元网格。可以用于流体力学」· C++ 代码 · 共 1,540 行 · 第 1/5 页

C++
1,540
字号
#define SHOWBASE 534#define NOSHOWBASE 535#define SHOWPOS 536#define NOSHOWPOS 537#define DEFAULT 538#define IM 539#define RE 540/* Copy the first part of user declarations.  */#line 6 "hl_yacc.y++"#include <cstdio>#include <cstring>#include <cassert>#include <string>#include <iostream>using namespace std;#include "highlight.hpp"#include "hl_lexyacc.hpp"#include "tostring.hpp"// YYSTYPE represents an index in the words[] array// (see hl_lexyacc.hpp).#define YYSTYPE int// Standard lex/yacc definesextern char *yytext;extern "C" int yywrap(){return 1;}extern int yydebug;#define YYLEX_PARAM &yylval,&yyllocextern int yylex (YYSTYPE * yylval_param,YYLTYPE * yylloc_param);// Just gives a special color to any erroneous token.void yyerror(const char *str){	colorize(yylloc,highlight_error);}/* 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#if ! defined (YYLTYPE) && ! defined (YYLTYPE_IS_DECLARED)typedef struct YYLTYPE{  int first_line;  int first_column;  int last_line;  int last_column;} YYLTYPE;# define yyltype YYLTYPE /* obsolescent; will be withdrawn */# define YYLTYPE_IS_DECLARED 1# define YYLTYPE_IS_TRIVIAL 1#endif/* Copy the second part of user declarations.  *//* Line 213 of yacc.c.  */#line 699 "y.tab.c"#if ! defined (yyoverflow) || YYERROR_VERBOSE# ifndef YYFREE#  define YYFREE free# endif# ifndef YYMALLOC#  define YYMALLOC malloc# endif/* The parser invokes alloca or malloc; define the necessary symbols.  */# ifdef YYSTACK_USE_ALLOCA#  if YYSTACK_USE_ALLOCA#   ifdef __GNUC__#    define YYSTACK_ALLOC __builtin_alloca#   else#    define YYSTACK_ALLOC alloca#   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 YYMALLOC#  define YYSTACK_FREE YYFREE# endif#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */#if (! defined (yyoverflow) \     && (! defined (__cplusplus) \	 || (defined (YYLTYPE_IS_TRIVIAL) && YYLTYPE_IS_TRIVIAL \             && defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))/* A type that is properly aligned for any stack member.  */union yyalloc{  short int yyss;  YYSTYPE yyvs;    YYLTYPE yyls;};/* 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 int) + sizeof (YYSTYPE) + sizeof (YYLTYPE))	\      + 2 * YYSTACK_GAP_MAXIMUM)/* Copy COUNT objects from FROM to TO.  The source and destination do   not overlap.  */# ifndef YYCOPY#  if defined (__GNUC__) && 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 int yysigned_char;#endif/* YYFINAL -- State number of the termination state. */#define YYFINAL  332/* YYLAST -- Last index in YYTABLE.  */#define YYLAST   8757/* YYNTOKENS -- Number of terminals. */#define YYNTOKENS  311/* YYNNTS -- Number of nonterminals. */#define YYNNTS  54/* YYNRULES -- Number of rules. */#define YYNRULES  409/* YYNRULES -- Number of states. */#define YYNSTATES  583/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */#define YYUNDEFTOK  2#define YYMAXUTOK   540#define YYTRANSLATE(YYX) 						\  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */static const unsigned short int 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,   303,     2,     2,     2,   309,   298,   305,     287,   288,   306,   301,   292,   302,   293,   308,     2,     2,       2,     2,     2,     2,     2,     2,     2,     2,   299,   286,     296,   291,   297,   300,     2,     2,     2,     2,     2,     2,       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,       2,   294,     2,   295,   307,   304,     2,     2,     2,     2,       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,       2,     2,     2,   289,   310,   290,     2,     2,     2,     2,       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,       2,     2,     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,    86,    87,    88,    89,    90,    91,    92,    93,    94,      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,     125,   126,   127,   128,   129,   130,   131,   132,   133,   134,     135,   136,   137,   138,   139,   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,   194,     195,   196,   197,   198,   199,   200,   201,   202,   203,   204,     205,   206,   207,   208,   209,   210,   211,   212,   213,   214,     215,   216,   217,   218,   219,   220,   221,   222,   223,   224,     225,   226,   227,   228,   229,   230,   231,   232,   233,   234,     235,   236,   237,   238,   239,   240,   241,   242,   243,   244,     245,   246,   247,   248,   249,   250,   251,   252,   253,   254,     255,   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};#if YYDEBUG/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in   YYRHS.  */static const unsigned short int yyprhs[] ={       0,     0,     3,     4,     6,     8,    10,    12,    14,    16,      18,    20,    22,    24,    26,    28,    30,    32,    34,    36,      38,    40,    42,    44,    46,    48,    50,    52,    54,    56,      58,    60,    62,    64,    66,    68,    70,    72,    74,    76,      78,    80,    82,    84,    86,    88,    90,    92,    94,    96,      98,   100,   102,   104,   106,   108,   110,   112,   114,   116,     118,   120,   122,   124,   126,   128,   130,   132,   134,   136,     138,   140,   142,   144,   146,   148,   150,   152,   154,   156,     158,   160,   162,   164,   166,   168,   170,   172,   174,   176,     178,   180,   182,   184,   186,   188,   190,   192,   194,   196,     198,   200,   202,   204,   206,   208,   210,   212,   214,   216,     218,   220,   222,   224,   226,   228,   230,   232,   234,   236,     238,   240,   242,   244,   246,   248,   250,   252,   254,   256,     258,   260,   262,   264,   266,   268,   270,   272,   274,   276,     278,   280,   282,   284,   286,   288,   290,   292,   294,   296,     298,   300,   302,   304,   306,   308,   310,   312,   314,   316,     318,   320,   322,   324,   326,   328,   330,   332,   334,   336,     338,   340,   342,   344,   346,   348,   350,   352,   354,   356,     358,   360,   362,   364,   366,   368,   370,   372,   374,   376,     378,   380,   382,   384,   386,   388,   390,   392,   394,   396,     398,   400,   402,   404,   406,   408,   410,   412,   414,   416,     418,   420,   422,   424,   426,   428,   430,   432,   434,   436,     438,   440,   442,   444,   446,   448,   450,   452,   454,   456,     458,   460,   463,   465,   467,   470,   480,   486,   494,   500,     506,   508,   510,   513,   515,   526,   534,   536,   540,   541,     543,   545,   547,   550,   553,   561,   569,   575,   583,   589,     598,   601,   603,   607,   612,   620,   628,   636,   641,   652,     654,   659,   660,   662,   666,   669,   673,   675,   680,   682,     686,   690,   696,   700,   707,   709,   714,   719,   721,   725,     727,   729,   731,   733,   735,   737,   739,   741,   743,   745,     747,   749,   751,   753,   755,   757,   759,   761,   763,   765,     767,   769,   771,   773,   775,   777,   779,   781,   783,   787,     790,   793,   797,   799,   801,   803,   805,   807,   811,   813,     817,   819,   823,   827,   829,   833,   835,   837,   839,   841,     843,   851,   859,   867,   873,   878,   885,   893,   898,   904,     906,   910,   915,   917,   919,   921,   922,   924,   926,   930,     934,   935,   939,   941,   943,   945,   947,   949,   951,   953,     955,   957,   960,   964,   967,   971,   973,   975,   977,   979,     981,   983,   985,   987,   989,   991,   993,   995,   997,   999,    1001,  1003,  1005,  1007,  1009,  1011,  1013,  1015,  1017,  1019,

⌨️ 快捷键说明

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