diff --git a/Common/Gmsh.cpp b/Common/Gmsh.cpp index 3d19842d6d127dcbb3eb2d41fb2ae35b304c71da..101b831a298f1fd9741856e202a73a35da7f2d0c 100644 --- a/Common/Gmsh.cpp +++ b/Common/Gmsh.cpp @@ -17,6 +17,9 @@ #include "OS.h" #include "Context.h" #include "robustPredicates.h" +#if defined(HAVE_POST) +#include "PView.h" +#endif #if defined(HAVE_ONELAB) #include "onelab.h" diff --git a/Fltk/fieldWindow.cpp b/Fltk/fieldWindow.cpp index 3ffa96103413d2a048929b216bc07bf04bec5c4e..599ebef27a1c7c4bc01358856a7972c4e73a781e 100644 --- a/Fltk/fieldWindow.cpp +++ b/Fltk/fieldWindow.cpp @@ -299,7 +299,7 @@ void fieldWindow::loadFieldOptions() it != f->options.end(); it++){ FieldOption *option = it->second; std::ostringstream vstr; - std::list<int>::iterator list_it; + std::list<int>::const_iterator list_it; switch(option->getType()){ case FIELD_OPTION_STRING: case FIELD_OPTION_PATH: diff --git a/Mesh/Field.cpp b/Mesh/Field.cpp index f7c1cec6d4722fa2d1e99911c0150c802e1cda58..deb5852798f736ff629dbe9092376adfc57fefac 100644 --- a/Mesh/Field.cpp +++ b/Mesh/Field.cpp @@ -24,8 +24,10 @@ #include "mathEvaluator.h" #include "BackgroundMesh.h" #include "CenterlineField.h" +#include "STensor3.h" #if defined(HAVE_POST) +#include "PView.h" #include "OctreePost.h" #include "PViewDataList.h" #include "MVertex.h" @@ -45,6 +47,16 @@ Field::~Field() delete it->second; } +FieldOption *Field::getOption(const std::string optionName) +{ + std::map<std::string, FieldOption*>::iterator it = options.find(optionName); + if (it == options.end()) { + Msg::Error("field option :%s does not exist", optionName.c_str()); + return NULL; + } + return it->second; +} + void FieldManager::reset() { for(std::map<int, Field *>::iterator it = begin(); it != end(); it++) { diff --git a/Mesh/Field.h b/Mesh/Field.h index aa7023987a85e3654714e1c2d2c290e366fe3db2..0a5b61d7de6ae287f20487991dd54e71a69fa1c7 100644 --- a/Mesh/Field.h +++ b/Mesh/Field.h @@ -11,14 +11,13 @@ #include <list> #include "GmshConfig.h" #include "STensor3.h" - #include <fstream> #include <string> #include <string.h> #include <sstream> #if defined(HAVE_POST) -#include "PView.h" +class PView; #endif class Field; @@ -69,9 +68,9 @@ class FieldOption { virtual void numericalValue(double val) { throw(1); } virtual double numericalValue() const { throw(1); } virtual const std::list<int> &list() const { throw(1); } - virtual std::list<int> &list() { throw(1); } - virtual const std::string &string() const { throw(1); } - virtual std::string &string() { throw(1); } + virtual void list(std::list<int> value) { throw(1); } + virtual std::string string() const { throw(1); } + virtual void string(const std::string value) { throw(1); } }; class Field { @@ -98,6 +97,7 @@ class Field { #endif void putOnNewView(); virtual std::string getDescription(){ return ""; } + FieldOption * getOption(const std::string optionName); }; class FieldFactory { @@ -163,8 +163,8 @@ class FieldOptionString : public FieldOption virtual FieldOptionType getType(){ return FIELD_OPTION_STRING; } FieldOptionString(std::string &_val, std::string _help, bool *_status=0) : FieldOption(_help, _status), val(_val) {} - std::string &string() { modified(); return val; } - const std::string &string() const { return val; } + void string(const std::string value) { modified(); val = value;} + std::string string() const { return val; } void getTextRepresentation(std::string &v_str) { std::ostringstream sstream; @@ -216,7 +216,7 @@ class FieldOptionList : public FieldOption FieldOptionType getType(){ return FIELD_OPTION_LIST; } FieldOptionList(std::list<int> &_val, std::string _help, bool *_status=0) : FieldOption(_help, _status), val(_val) {} - std::list<int> &list(){ modified(); return val; } + void list(std::list<int> value){ modified(); val = value; } const std::list<int>& list() const { return val; } void getTextRepresentation(std::string & v_str) { diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index 9e4150f797c47bc38015ea5e287fc38414033228..eecda51e080c77ffeac8ed156aad0c102e028764 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -1,9 +1,8 @@ -/* A Bison parser, made by GNU Bison 2.4.3. */ +/* A Bison parser, made by GNU Bison 2.5. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2011 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 @@ -45,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.3" +#define YYBISON_VERSION "2.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -74,7 +73,7 @@ /* Copy the first part of user declarations. */ -/* Line 189 of yacc.c */ +/* Line 268 of yacc.c */ #line 1 "Gmsh.y" // Gmsh - Copyright (C) 1997-2012 C. Geuzaine, J.-F. Remacle @@ -167,8 +166,8 @@ struct doubleXstring{ -/* Line 189 of yacc.c */ -#line 172 "Gmsh.tab.cpp" +/* Line 268 of yacc.c */ +#line 171 "Gmsh.tab.cpp" /* Enabling traces. */ #ifndef YYDEBUG @@ -340,7 +339,7 @@ struct doubleXstring{ typedef union YYSTYPE { -/* Line 214 of yacc.c */ +/* Line 293 of yacc.c */ #line 92 "Gmsh.y" char *c; @@ -353,8 +352,8 @@ typedef union YYSTYPE -/* Line 214 of yacc.c */ -#line 358 "Gmsh.tab.cpp" +/* Line 293 of yacc.c */ +#line 357 "Gmsh.tab.cpp" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -365,8 +364,8 @@ typedef union YYSTYPE /* Copy the second part of user declarations. */ -/* Line 264 of yacc.c */ -#line 370 "Gmsh.tab.cpp" +/* Line 343 of yacc.c */ +#line 369 "Gmsh.tab.cpp" #ifdef short # undef short @@ -469,11 +468,11 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # endif @@ -496,24 +495,24 @@ YYID (yyi) # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined _STDLIB_H \ +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif @@ -542,23 +541,7 @@ union yyalloc ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + 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 \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of @@ -578,6 +561,26 @@ union yyalloc #endif +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* 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 \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + /* YYFINAL -- State number of the termination state. */ #define YYFINAL 5 /* YYLAST -- Last index in YYTABLE. */ @@ -946,40 +949,40 @@ static const yytype_uint16 yyrline[] = 498, 509, 508, 525, 542, 565, 564, 578, 579, 580, 581, 582, 586, 587, 593, 595, 658, 688, 721, 767, 782, 798, 807, 813, 822, 840, 858, 867, 879, 884, - 892, 912, 935, 946, 954, 976, 999, 1024, 1045, 1057, - 1071, 1071, 1073, 1075, 1086, 1098, 1097, 1111, 1117, 1124, - 1125, 1129, 1140, 1155, 1168, 1172, 1183, 1186, 1199, 1202, - 1212, 1236, 1235, 1255, 1277, 1295, 1316, 1334, 1364, 1394, - 1412, 1430, 1456, 1474, 1493, 1492, 1515, 1533, 1572, 1578, - 1584, 1591, 1616, 1641, 1658, 1675, 1707, 1706, 1730, 1748, - 1765, 1782, 1781, 1807, 1812, 1817, 1822, 1827, 1850, 1856, - 1867, 1868, 1873, 1876, 1880, 1903, 1926, 1949, 1977, 1998, - 2021, 2042, 2064, 2084, 2196, 2215, 2253, 2362, 2371, 2377, - 2392, 2420, 2437, 2451, 2457, 2463, 2472, 2486, 2531, 2548, - 2563, 2582, 2594, 2618, 2622, 2629, 2635, 2640, 2646, 2650, - 2654, 2664, 2681, 2698, 2719, 2740, 2775, 2783, 2789, 2796, - 2800, 2809, 2817, 2825, 2834, 2833, 2847, 2846, 2860, 2859, - 2873, 2872, 2885, 2892, 2899, 2906, 2913, 2920, 2927, 2934, - 2941, 2949, 2948, 2961, 2960, 2973, 2972, 2985, 2984, 2997, - 2996, 3009, 3008, 3021, 3020, 3033, 3032, 3045, 3044, 3060, - 3063, 3069, 3078, 3098, 3121, 3125, 3129, 3133, 3137, 3141, - 3160, 3173, 3176, 3192, 3195, 3208, 3211, 3217, 3220, 3227, - 3283, 3353, 3358, 3425, 3461, 3470, 3513, 3538, 3565, 3609, - 3632, 3655, 3658, 3667, 3671, 3681, 3716, 3717, 3721, 3726, - 3737, 3759, 3760, 3761, 3762, 3763, 3764, 3765, 3766, 3767, - 3774, 3775, 3776, 3777, 3778, 3779, 3780, 3781, 3782, 3783, - 3784, 3785, 3786, 3787, 3788, 3789, 3790, 3791, 3792, 3793, - 3794, 3795, 3796, 3797, 3798, 3799, 3800, 3801, 3802, 3803, - 3804, 3805, 3807, 3808, 3809, 3810, 3811, 3812, 3813, 3814, - 3815, 3816, 3817, 3818, 3819, 3820, 3821, 3822, 3823, 3824, - 3825, 3826, 3827, 3836, 3837, 3838, 3839, 3840, 3841, 3842, - 3846, 3866, 3885, 3903, 3915, 3932, 3953, 3958, 3963, 3973, - 3983, 3991, 3995, 3999, 4003, 4007, 4014, 4018, 4022, 4026, - 4033, 4038, 4045, 4050, 4054, 4059, 4063, 4071, 4082, 4086, - 4098, 4106, 4114, 4121, 4132, 4152, 4156, 4160, 4164, 4168, - 4178, 4188, 4200, 4212, 4233, 4238, 4242, 4246, 4258, 4262, - 4274, 4281, 4291, 4295, 4310, 4315, 4322, 4326, 4339, 4347, - 4358, 4362, 4370, 4378, 4386, 4394, 4408, 4422, 4426 + 892, 912, 935, 946, 954, 976, 999, 1025, 1046, 1058, + 1072, 1072, 1074, 1076, 1087, 1099, 1098, 1112, 1118, 1125, + 1126, 1130, 1141, 1156, 1169, 1173, 1184, 1187, 1200, 1203, + 1213, 1237, 1236, 1256, 1278, 1296, 1317, 1335, 1365, 1395, + 1413, 1431, 1457, 1475, 1494, 1493, 1516, 1534, 1573, 1579, + 1585, 1592, 1617, 1642, 1659, 1676, 1708, 1707, 1731, 1749, + 1766, 1783, 1782, 1808, 1813, 1818, 1823, 1828, 1851, 1857, + 1868, 1869, 1874, 1877, 1881, 1904, 1927, 1950, 1978, 1999, + 2022, 2043, 2065, 2085, 2197, 2216, 2254, 2363, 2372, 2378, + 2393, 2421, 2438, 2452, 2458, 2464, 2473, 2487, 2532, 2549, + 2564, 2583, 2595, 2619, 2623, 2630, 2636, 2641, 2647, 2651, + 2655, 2665, 2682, 2699, 2720, 2741, 2776, 2784, 2790, 2797, + 2801, 2810, 2818, 2826, 2835, 2834, 2848, 2847, 2861, 2860, + 2874, 2873, 2886, 2893, 2900, 2907, 2914, 2921, 2928, 2935, + 2942, 2950, 2949, 2962, 2961, 2974, 2973, 2986, 2985, 2998, + 2997, 3010, 3009, 3022, 3021, 3034, 3033, 3046, 3045, 3061, + 3064, 3070, 3079, 3099, 3122, 3126, 3130, 3134, 3138, 3142, + 3161, 3174, 3177, 3193, 3196, 3209, 3212, 3218, 3221, 3228, + 3284, 3354, 3359, 3426, 3462, 3471, 3514, 3539, 3566, 3610, + 3633, 3656, 3659, 3668, 3672, 3682, 3717, 3718, 3722, 3727, + 3738, 3760, 3761, 3762, 3763, 3764, 3765, 3766, 3767, 3768, + 3775, 3776, 3777, 3778, 3779, 3780, 3781, 3782, 3783, 3784, + 3785, 3786, 3787, 3788, 3789, 3790, 3791, 3792, 3793, 3794, + 3795, 3796, 3797, 3798, 3799, 3800, 3801, 3802, 3803, 3804, + 3805, 3806, 3808, 3809, 3810, 3811, 3812, 3813, 3814, 3815, + 3816, 3817, 3818, 3819, 3820, 3821, 3822, 3823, 3824, 3825, + 3826, 3827, 3828, 3837, 3838, 3839, 3840, 3841, 3842, 3843, + 3847, 3867, 3886, 3904, 3916, 3933, 3954, 3959, 3964, 3974, + 3984, 3992, 3996, 4000, 4004, 4008, 4015, 4019, 4023, 4027, + 4034, 4039, 4046, 4051, 4055, 4060, 4064, 4072, 4083, 4087, + 4099, 4107, 4115, 4122, 4133, 4153, 4157, 4161, 4165, 4169, + 4179, 4189, 4201, 4213, 4234, 4239, 4243, 4247, 4259, 4263, + 4275, 4282, 4292, 4296, 4311, 4316, 4323, 4327, 4340, 4348, + 4359, 4363, 4371, 4379, 4387, 4395, 4409, 4423, 4427 }; #endif @@ -1154,8 +1157,8 @@ static const yytype_uint8 yyr2[] = 1, 1, 4, 6, 6, 4, 4, 4, 6 }; -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint16 yydefact[] = { @@ -1486,8 +1489,7 @@ static const yytype_int16 yypgoto[] = /* 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. */ + number is the opposite. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -5 static const yytype_int16 yytable[] = { @@ -2258,6 +2260,12 @@ static const yytype_int16 yytable[] = 348, 349, 350, 0, 0, 0, 0, 351 }; +#define yypact_value_is_default(yystate) \ + ((yystate) == (-1061)) + +#define yytable_value_is_error(yytable_value) \ + YYID (0) + static const yytype_int16 yycheck[] = { 6, 4, 3, 0, 6, 401, 402, 206, 323, 1069, @@ -3210,7 +3218,6 @@ do \ { \ yychar = (Token); \ yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ @@ -3252,19 +3259,10 @@ 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. */ +/* This macro is provided for backward compatibility. */ #ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && 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 +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif @@ -3456,7 +3454,6 @@ int yydebug; # define YYMAXDEPTH 10000 #endif - #if YYERROR_VERBOSE @@ -3559,115 +3556,142 @@ yytnamerr (char *yyres, const char *yystr) } # endif -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) -{ - int yyn = yypact[yystate]; +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = 0; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> + for details. YYERROR is fine as it does not invoke this + function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } - if (yysize_overflow) - return YYSIZE_MAXIMUM; + yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; } #endif /* YYERROR_VERBOSE */ - /*-----------------------------------------------. | Release the memory associated to this symbol. | @@ -3700,6 +3724,7 @@ yydestruct (yymsg, yytype, yyvaluep) } } + /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus @@ -3726,10 +3751,9 @@ YYSTYPE yylval; int yynerrs; - -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ +/*----------. +| yyparse. | +`----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -3753,8 +3777,6 @@ yyparse () #endif #endif { - - int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; @@ -3909,7 +3931,7 @@ yybackup: /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ @@ -3940,8 +3962,8 @@ yybackup: yyn = yytable[yyn]; if (yyn <= 0) { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; + if (yytable_value_is_error (yyn)) + goto yyerrlab; yyn = -yyn; goto yyreduce; } @@ -3996,161 +4018,161 @@ yyreduce: { case 3: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 164 "Gmsh.y" - { yyerrok; return 1; ;} + { yyerrok; return 1; } break; case 6: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 175 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 7: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 176 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 8: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 177 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 9: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 178 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 10: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 179 "Gmsh.y" - { List_Delete((yyvsp[(1) - (1)].l)); return 1; ;} + { List_Delete((yyvsp[(1) - (1)].l)); return 1; } break; case 11: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 180 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 12: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 181 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 13: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 182 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 14: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 183 "Gmsh.y" - { List_Delete((yyvsp[(1) - (1)].l)); return 1; ;} + { List_Delete((yyvsp[(1) - (1)].l)); return 1; } break; case 15: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 184 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 16: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 185 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 17: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 186 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 18: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 187 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 19: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 188 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 20: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 189 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 21: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 190 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 22: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 191 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 23: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 196 "Gmsh.y" { (yyval.c) = (char*)"w"; - ;} + } break; case 24: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 200 "Gmsh.y" { (yyval.c) = (char*)"a"; - ;} + } break; case 25: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 207 "Gmsh.y" { Msg::Direct((yyvsp[(3) - (5)].c)); Free((yyvsp[(3) - (5)].c)); - ;} + } break; case 26: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 212 "Gmsh.y" { std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(6) - (7)].c)); @@ -4164,12 +4186,12 @@ yyreduce: } Free((yyvsp[(3) - (7)].c)); Free((yyvsp[(6) - (7)].c)); - ;} + } break; case 27: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 226 "Gmsh.y" { char tmpstring[1024]; @@ -4182,12 +4204,12 @@ yyreduce: Msg::Direct(tmpstring); Free((yyvsp[(3) - (7)].c)); List_Delete((yyvsp[(5) - (7)].l)); - ;} + } break; case 28: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 239 "Gmsh.y" { char tmpstring[1024]; @@ -4210,12 +4232,12 @@ yyreduce: Free((yyvsp[(3) - (9)].c)); Free((yyvsp[(8) - (9)].c)); List_Delete((yyvsp[(5) - (9)].l)); - ;} + } break; case 29: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 267 "Gmsh.y" { #if defined(HAVE_POST) @@ -4229,12 +4251,12 @@ yyreduce: delete ViewData; #endif Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(2) - (6)].c)); - ;} + } break; case 30: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 281 "Gmsh.y" { #if defined(HAVE_POST) @@ -4245,12 +4267,12 @@ yyreduce: } #endif Free((yyvsp[(2) - (6)].c)); - ;} + } break; case 31: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 292 "Gmsh.y" { #if defined(HAVE_POST) @@ -4261,51 +4283,51 @@ yyreduce: } #endif Free((yyvsp[(2) - (6)].c)); - ;} + } break; case 32: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 306 "Gmsh.y" { #if defined(HAVE_POST) ViewData = new PViewDataList(); #endif - ;} + } break; case 38: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 320 "Gmsh.y" - { ViewCoord.push_back((yyvsp[(1) - (1)].d)); ;} + { ViewCoord.push_back((yyvsp[(1) - (1)].d)); } break; case 39: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 322 "Gmsh.y" - { ViewCoord.push_back((yyvsp[(3) - (3)].d)); ;} + { ViewCoord.push_back((yyvsp[(3) - (3)].d)); } break; case 40: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 327 "Gmsh.y" - { if(ViewValueList) ViewValueList->push_back((yyvsp[(1) - (1)].d)); ;} + { if(ViewValueList) ViewValueList->push_back((yyvsp[(1) - (1)].d)); } break; case 41: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 329 "Gmsh.y" - { if(ViewValueList) ViewValueList->push_back((yyvsp[(3) - (3)].d)); ;} + { if(ViewValueList) ViewValueList->push_back((yyvsp[(3) - (3)].d)); } break; case 42: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 334 "Gmsh.y" { #if defined(HAVE_POST) @@ -4409,12 +4431,12 @@ yyreduce: #endif ViewCoord.clear(); Free((yyvsp[(1) - (1)].c)); - ;} + } break; case 43: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 438 "Gmsh.y" { #if defined(HAVE_POST) @@ -4424,47 +4446,47 @@ yyreduce: ViewValueList->push_back(ViewCoord[3 * j + i]); } #endif - ;} + } break; case 44: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 448 "Gmsh.y" { #if defined(HAVE_POST) if(ViewValueList) (*ViewNumList)++; #endif - ;} + } break; case 45: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 457 "Gmsh.y" { #if defined(HAVE_POST) for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c)) + 1; i++) ViewData->T2C.push_back((yyvsp[(1) - (1)].c)[i]); #endif Free((yyvsp[(1) - (1)].c)); - ;} + } break; case 46: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 464 "Gmsh.y" { #if defined(HAVE_POST) for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c)) + 1; i++) ViewData->T2C.push_back((yyvsp[(3) - (3)].c)[i]); #endif Free((yyvsp[(3) - (3)].c)); - ;} + } break; case 47: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 474 "Gmsh.y" { #if defined(HAVE_POST) @@ -4473,47 +4495,47 @@ yyreduce: ViewData->T2D.push_back((yyvsp[(7) - (8)].d)); ViewData->T2D.push_back(ViewData->T2C.size()); #endif - ;} + } break; case 48: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 483 "Gmsh.y" { #if defined(HAVE_POST) ViewData->NbT2++; #endif - ;} + } break; case 49: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 492 "Gmsh.y" { #if defined(HAVE_POST) for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c)) + 1; i++) ViewData->T3C.push_back((yyvsp[(1) - (1)].c)[i]); #endif Free((yyvsp[(1) - (1)].c)); - ;} + } break; case 50: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 499 "Gmsh.y" { #if defined(HAVE_POST) for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c)) + 1; i++) ViewData->T3C.push_back((yyvsp[(3) - (3)].c)[i]); #endif Free((yyvsp[(3) - (3)].c)); - ;} + } break; case 51: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 509 "Gmsh.y" { #if defined(HAVE_POST) @@ -4521,23 +4543,23 @@ yyreduce: ViewData->T3D.push_back((yyvsp[(7) - (10)].d)); ViewData->T3D.push_back((yyvsp[(9) - (10)].d)); ViewData->T3D.push_back(ViewData->T3C.size()); #endif - ;} + } break; case 52: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 517 "Gmsh.y" { #if defined(HAVE_POST) ViewData->NbT3++; #endif - ;} + } break; case 53: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 527 "Gmsh.y" { #if defined(HAVE_POST) @@ -4553,12 +4575,12 @@ yyreduce: ViewData->setInterpolationMatrices(type, ListOfListOfDouble2Matrix((yyvsp[(3) - (8)].l)), ListOfListOfDouble2Matrix((yyvsp[(6) - (8)].l))); #endif - ;} + } break; case 54: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 546 "Gmsh.y" { #if defined(HAVE_POST) @@ -4574,80 +4596,80 @@ yyreduce: ListOfListOfDouble2Matrix((yyvsp[(9) - (14)].l)), ListOfListOfDouble2Matrix((yyvsp[(12) - (14)].l))); #endif - ;} + } break; case 55: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 565 "Gmsh.y" { #if defined(HAVE_POST) ViewValueList = &ViewData->Time; #endif - ;} + } break; case 56: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 571 "Gmsh.y" { - ;} + } break; case 57: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 578 "Gmsh.y" - { (yyval.i) = 0; ;} + { (yyval.i) = 0; } break; case 58: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 579 "Gmsh.y" - { (yyval.i) = 1; ;} + { (yyval.i) = 1; } break; case 59: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 580 "Gmsh.y" - { (yyval.i) = 2; ;} + { (yyval.i) = 2; } break; case 60: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 581 "Gmsh.y" - { (yyval.i) = 3; ;} + { (yyval.i) = 3; } break; case 61: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 582 "Gmsh.y" - { (yyval.i) = 4; ;} + { (yyval.i) = 4; } break; case 62: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 586 "Gmsh.y" - { (yyval.i) = 1; ;} + { (yyval.i) = 1; } break; case 63: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 587 "Gmsh.y" - { (yyval.i) = -1; ;} + { (yyval.i) = -1; } break; case 65: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 596 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c)) && (yyvsp[(2) - (4)].i) && List_Nbr((yyvsp[(3) - (4)].l)) == 1){ @@ -4707,12 +4729,12 @@ yyreduce: } Free((yyvsp[(1) - (4)].c)); List_Delete((yyvsp[(3) - (4)].l)); - ;} + } break; case 66: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 659 "Gmsh.y" { gmsh_yysymbol &s(gmsh_yysymbols[(yyvsp[(1) - (6)].c)]); @@ -4741,12 +4763,12 @@ yyreduce: } Free((yyvsp[(1) - (6)].c)); List_Delete((yyvsp[(5) - (6)].l)); - ;} + } break; case 67: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 689 "Gmsh.y" { int index = (int)(yyvsp[(3) - (7)].d); @@ -4779,12 +4801,12 @@ yyreduce: yymsg(0, "Variable '%s' is not a list", (yyvsp[(1) - (7)].c)); } Free((yyvsp[(1) - (7)].c)); - ;} + } break; case 68: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 722 "Gmsh.y" { if(List_Nbr((yyvsp[(4) - (9)].l)) != List_Nbr((yyvsp[(8) - (9)].l))){ @@ -4830,12 +4852,12 @@ yyreduce: Free((yyvsp[(1) - (9)].c)); List_Delete((yyvsp[(4) - (9)].l)); List_Delete((yyvsp[(8) - (9)].l)); - ;} + } break; case 69: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 768 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c))) @@ -4850,12 +4872,12 @@ yyreduce: yymsg(0, "Variable '%s' is a list", (yyvsp[(1) - (3)].c)); } Free((yyvsp[(1) - (3)].c)); - ;} + } break; case 70: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 783 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c))) @@ -4871,23 +4893,23 @@ yyreduce: yymsg(0, "Variable '%s' is not a list", (yyvsp[(1) - (6)].c)); } Free((yyvsp[(1) - (6)].c)); - ;} + } break; case 71: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 799 "Gmsh.y" { gmsh_yystringsymbols[(yyvsp[(1) - (4)].c)] = std::string((yyvsp[(3) - (4)].c)); Free((yyvsp[(1) - (4)].c)); Free((yyvsp[(3) - (4)].c)); - ;} + } break; case 72: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 808 "Gmsh.y" { std::string tmp((yyvsp[(5) - (6)].c)); @@ -4898,7 +4920,7 @@ yyreduce: case 73: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 814 "Gmsh.y" { std::string tmp((yyvsp[(8) - (9)].c)); @@ -4909,7 +4931,7 @@ yyreduce: case 74: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 823 "Gmsh.y" { double d = 0.; @@ -4927,12 +4949,12 @@ yyreduce: NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (6)].c), 0, (yyvsp[(3) - (6)].c), d); } Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(3) - (6)].c)); - ;} + } break; case 75: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 841 "Gmsh.y" { double d = 0.; @@ -4950,12 +4972,12 @@ yyreduce: NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (9)].c), (int)(yyvsp[(3) - (9)].d), (yyvsp[(6) - (9)].c), d); } Free((yyvsp[(1) - (9)].c)); Free((yyvsp[(6) - (9)].c)); - ;} + } break; case 76: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 859 "Gmsh.y" { double d = 0.; @@ -4964,12 +4986,12 @@ yyreduce: NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (5)].c), 0, (yyvsp[(3) - (5)].c), d); } Free((yyvsp[(1) - (5)].c)); Free((yyvsp[(3) - (5)].c)); - ;} + } break; case 77: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 868 "Gmsh.y" { double d = 0.; @@ -4978,32 +5000,32 @@ yyreduce: NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (8)].c), (int)(yyvsp[(3) - (8)].d), (yyvsp[(6) - (8)].c), d); } Free((yyvsp[(1) - (8)].c)); Free((yyvsp[(6) - (8)].c)); - ;} + } break; case 78: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 880 "Gmsh.y" { ColorOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (8)].c), 0, (yyvsp[(5) - (8)].c), (yyvsp[(7) - (8)].u)); Free((yyvsp[(1) - (8)].c)); Free((yyvsp[(5) - (8)].c)); - ;} + } break; case 79: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 885 "Gmsh.y" { ColorOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (11)].c), (int)(yyvsp[(3) - (11)].d), (yyvsp[(8) - (11)].c), (yyvsp[(10) - (11)].u)); Free((yyvsp[(1) - (11)].c)); Free((yyvsp[(8) - (11)].c)); - ;} + } break; case 80: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 893 "Gmsh.y" { GmshColorTable *ct = GetColorTable(0); @@ -5023,12 +5045,12 @@ yyreduce: } Free((yyvsp[(1) - (6)].c)); List_Delete((yyvsp[(5) - (6)].l)); - ;} + } break; case 81: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 913 "Gmsh.y" { GmshColorTable *ct = GetColorTable((int)(yyvsp[(3) - (9)].d)); @@ -5048,12 +5070,12 @@ yyreduce: } Free((yyvsp[(1) - (9)].c)); List_Delete((yyvsp[(8) - (9)].l)); - ;} + } break; case 82: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 936 "Gmsh.y" { #if defined(HAVE_MESH) @@ -5064,12 +5086,12 @@ yyreduce: else yymsg(0, "Unknown command %s Field", (yyvsp[(1) - (5)].c)); #endif - ;} + } break; case 83: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 947 "Gmsh.y" { #if defined(HAVE_MESH) @@ -5077,12 +5099,12 @@ yyreduce: yymsg(0, "Cannot create field %i of type '%s'", (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c)); #endif Free((yyvsp[(6) - (7)].c)); - ;} + } break; case 84: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 955 "Gmsh.y" { #if defined(HAVE_MESH) @@ -5104,12 +5126,12 @@ yyreduce: yymsg(0, "No field with id %i", (int)(yyvsp[(3) - (9)].d)); #endif Free((yyvsp[(6) - (9)].c)); - ;} + } break; case 85: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 977 "Gmsh.y" { #if defined(HAVE_MESH) @@ -5117,7 +5139,7 @@ yyreduce: if(field){ FieldOption *option = field->options[(yyvsp[(6) - (9)].c)]; if(option){ - try { option->string() = (yyvsp[(8) - (9)].c); } + try { option->string((yyvsp[(8) - (9)].c)); } catch (...){ yymsg(0, "Cannot assign a string value to option '%s' " "in field %i of type '%s'", (yyvsp[(6) - (9)].c), (int)(yyvsp[(3) - (9)].d), field->getName()); @@ -5132,12 +5154,12 @@ yyreduce: #endif Free((yyvsp[(6) - (9)].c)); Free((yyvsp[(8) - (9)].c)); - ;} + } break; case 86: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1000 "Gmsh.y" { #if defined(HAVE_MESH) @@ -5145,13 +5167,14 @@ yyreduce: if(field){ FieldOption *option = field->options[(yyvsp[(6) - (11)].c)]; if(option){ - std::list<int> &vl = option->list(); + std::list<int> vl = option->list(); vl.clear(); for(int i = 0; i < List_Nbr((yyvsp[(9) - (11)].l)); i++){ double id; List_Read((yyvsp[(9) - (11)].l), i, &id); vl.push_back((int)id); } + option->list(vl); } else yymsg(0, "Unknown option '%s' in field %i of type '%s'", @@ -5162,13 +5185,13 @@ yyreduce: #endif Free((yyvsp[(6) - (11)].c)); List_Delete((yyvsp[(9) - (11)].l)); - ;} + } break; case 87: -/* Line 1464 of yacc.c */ -#line 1025 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1026 "Gmsh.y" { #if defined(HAVE_MESH) Field *field = GModel::current()->getFields()->get((int)(yyvsp[(3) - (7)].d)); @@ -5185,13 +5208,13 @@ yyreduce: yymsg(0, "No field with id %i", (int)(yyvsp[(3) - (7)].d)); #endif Free((yyvsp[(6) - (7)].c)); - ;} + } break; case 88: -/* Line 1464 of yacc.c */ -#line 1046 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1047 "Gmsh.y" { #if defined(HAVE_PLUGINS) try { @@ -5202,13 +5225,13 @@ yyreduce: } #endif Free((yyvsp[(3) - (9)].c)); Free((yyvsp[(6) - (9)].c)); - ;} + } break; case 89: -/* Line 1464 of yacc.c */ -#line 1058 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1059 "Gmsh.y" { #if defined(HAVE_PLUGINS) try { @@ -5219,13 +5242,13 @@ yyreduce: } #endif Free((yyvsp[(3) - (9)].c)); Free((yyvsp[(6) - (9)].c)); Free((yyvsp[(8) - (9)].c)); - ;} + } break; case 93: -/* Line 1464 of yacc.c */ -#line 1076 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1077 "Gmsh.y" { std::string key((yyvsp[(3) - (3)].c)); std::vector<double> val(1, 0.); @@ -5235,13 +5258,13 @@ yyreduce: gmsh_yysymbols[key].value = val; } Free((yyvsp[(3) - (3)].c)); - ;} + } break; case 94: -/* Line 1464 of yacc.c */ -#line 1087 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1088 "Gmsh.y" { std::string key((yyvsp[(3) - (5)].c)); std::vector<double> val(1, (yyvsp[(5) - (5)].d)); @@ -5251,20 +5274,20 @@ yyreduce: gmsh_yysymbols[key].value = val; } Free((yyvsp[(3) - (5)].c)); - ;} + } break; case 95: -/* Line 1464 of yacc.c */ -#line 1098 "Gmsh.y" - { floatOptions.clear(); charOptions.clear(); ;} +/* Line 1806 of yacc.c */ +#line 1099 "Gmsh.y" + { floatOptions.clear(); charOptions.clear(); } break; case 96: -/* Line 1464 of yacc.c */ -#line 1100 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1101 "Gmsh.y" { std::string key((yyvsp[(3) - (9)].c)); std::vector<double> val(1, (yyvsp[(6) - (9)].d)); @@ -5272,34 +5295,34 @@ yyreduce: Msg::ExchangeOnelabParameter(key, val, floatOptions, charOptions); gmsh_yysymbols[key].value = val; } - ;} + } break; case 97: -/* Line 1464 of yacc.c */ -#line 1112 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1113 "Gmsh.y" { (yyval.l) = List_Create(20,20,sizeof(doubleXstring)); doubleXstring v = {(yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].c)}; List_Add((yyval.l), &v); - ;} + } break; case 98: -/* Line 1464 of yacc.c */ -#line 1118 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1119 "Gmsh.y" { doubleXstring v = {(yyvsp[(3) - (5)].d), (yyvsp[(5) - (5)].c)}; List_Add((yyval.l), &v); - ;} + } break; case 101: -/* Line 1464 of yacc.c */ -#line 1130 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1131 "Gmsh.y" { std::string key((yyvsp[(2) - (3)].c)); for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){ @@ -5309,13 +5332,13 @@ yyreduce: } Free((yyvsp[(2) - (3)].c)); List_Delete((yyvsp[(3) - (3)].l)); - ;} + } break; case 102: -/* Line 1464 of yacc.c */ -#line 1141 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1142 "Gmsh.y" { std::string key((yyvsp[(2) - (5)].c)); for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){ @@ -5328,56 +5351,56 @@ yyreduce: for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++) Free(((doubleXstring*)List_Pointer((yyvsp[(4) - (5)].l), i))->s); List_Delete((yyvsp[(4) - (5)].l)); - ;} + } break; case 103: -/* Line 1464 of yacc.c */ -#line 1156 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1157 "Gmsh.y" { std::string key((yyvsp[(2) - (3)].c)); std::string val((yyvsp[(3) - (3)].c)); charOptions[key].push_back(val); Free((yyvsp[(2) - (3)].c)); Free((yyvsp[(3) - (3)].c)); - ;} + } break; case 104: -/* Line 1464 of yacc.c */ -#line 1169 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1170 "Gmsh.y" { (yyval.i) = (int)(yyvsp[(1) - (1)].d); - ;} + } break; case 105: -/* Line 1464 of yacc.c */ -#line 1173 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1174 "Gmsh.y" { (yyval.i) = GModel::current()->setPhysicalName (std::string((yyvsp[(1) - (1)].c)), curPhysDim, ++GModel::current()->getGEOInternals()->MaxPhysicalNum); Free((yyvsp[(1) - (1)].c)); - ;} + } break; case 106: -/* Line 1464 of yacc.c */ -#line 1183 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1184 "Gmsh.y" { (yyval.l) = 0; - ;} + } break; case 107: -/* Line 1464 of yacc.c */ -#line 1187 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1188 "Gmsh.y" { (yyval.l) = List_Create(1, 1, sizeof(Vertex*)); Vertex *v = FindPoint((int)(yyvsp[(4) - (5)].d)); @@ -5386,31 +5409,31 @@ yyreduce: else{ List_Add((yyval.l), &v); } - ;} + } break; case 108: -/* Line 1464 of yacc.c */ -#line 1199 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1200 "Gmsh.y" { for(int i = 0; i < 4; i++) (yyval.v)[i] = 0.; - ;} + } break; case 109: -/* Line 1464 of yacc.c */ -#line 1203 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1204 "Gmsh.y" { for(int i = 0; i < 4; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i]; - ;} + } break; case 110: -/* Line 1464 of yacc.c */ -#line 1213 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1214 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindPoint(num)){ @@ -5432,22 +5455,22 @@ yyreduce: } (yyval.s).Type = MSH_POINT; (yyval.s).Num = num; - ;} + } break; case 111: -/* Line 1464 of yacc.c */ -#line 1236 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1237 "Gmsh.y" { curPhysDim = 0; - ;} + } break; case 112: -/* Line 1464 of yacc.c */ -#line 1240 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1241 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); if(FindPhysicalGroup(num, MSH_PHYSICAL_POINT)){ @@ -5462,13 +5485,13 @@ yyreduce: List_Delete((yyvsp[(8) - (9)].l)); (yyval.s).Type = MSH_PHYSICAL_POINT; (yyval.s).Num = num; - ;} + } break; case 113: -/* Line 1464 of yacc.c */ -#line 1256 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1257 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ double d; @@ -5486,13 +5509,13 @@ yyreduce: // dummy values (yyval.s).Type = 0; (yyval.s).Num = 0; - ;} + } break; case 114: -/* Line 1464 of yacc.c */ -#line 1278 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1279 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -5509,13 +5532,13 @@ yyreduce: List_Delete((yyvsp[(6) - (7)].l)); (yyval.s).Type = MSH_SEGM_LINE; (yyval.s).Num = num; - ;} + } break; case 115: -/* Line 1464 of yacc.c */ -#line 1296 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1297 "Gmsh.y" { for (int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ double dnum; @@ -5535,13 +5558,13 @@ yyreduce: } } } - ;} + } break; case 116: -/* Line 1464 of yacc.c */ -#line 1317 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1318 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -5558,13 +5581,13 @@ yyreduce: List_Delete((yyvsp[(6) - (7)].l)); (yyval.s).Type = MSH_SEGM_SPLN; (yyval.s).Num = num; - ;} + } break; case 117: -/* Line 1464 of yacc.c */ -#line 1335 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1336 "Gmsh.y" { int num = (int)(yyvsp[(3) - (8)].d); if(FindCurve(num)){ @@ -5593,13 +5616,13 @@ yyreduce: List_Delete((yyvsp[(6) - (8)].l)); (yyval.s).Type = MSH_SEGM_CIRC; (yyval.s).Num = num; - ;} + } break; case 118: -/* Line 1464 of yacc.c */ -#line 1365 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1366 "Gmsh.y" { int num = (int)(yyvsp[(3) - (8)].d); if(FindCurve(num)){ @@ -5628,13 +5651,13 @@ yyreduce: List_Delete((yyvsp[(6) - (8)].l)); (yyval.s).Type = MSH_SEGM_ELLI; (yyval.s).Num = num; - ;} + } break; case 119: -/* Line 1464 of yacc.c */ -#line 1395 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1396 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -5651,13 +5674,13 @@ yyreduce: List_Delete((yyvsp[(6) - (7)].l)); (yyval.s).Type = MSH_SEGM_BSPLN; (yyval.s).Num = num; - ;} + } break; case 120: -/* Line 1464 of yacc.c */ -#line 1413 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1414 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -5674,13 +5697,13 @@ yyreduce: List_Delete((yyvsp[(6) - (7)].l)); (yyval.s).Type = MSH_SEGM_BEZIER; (yyval.s).Num = num; - ;} + } break; case 121: -/* Line 1464 of yacc.c */ -#line 1431 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1432 "Gmsh.y" { int num = (int)(yyvsp[(3) - (11)].d); if(List_Nbr((yyvsp[(6) - (11)].l)) + (int)(yyvsp[(10) - (11)].d) + 1 != List_Nbr((yyvsp[(8) - (11)].l))){ @@ -5705,13 +5728,13 @@ yyreduce: List_Delete((yyvsp[(8) - (11)].l)); (yyval.s).Type = MSH_SEGM_NURBS; (yyval.s).Num = num; - ;} + } break; case 122: -/* Line 1464 of yacc.c */ -#line 1457 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1458 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindEdgeLoop(num)){ @@ -5728,13 +5751,13 @@ yyreduce: Free((yyvsp[(2) - (8)].c)); (yyval.s).Type = MSH_SEGM_LOOP; (yyval.s).Num = num; - ;} + } break; case 123: -/* Line 1464 of yacc.c */ -#line 1475 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1476 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindCurve(num)){ @@ -5751,22 +5774,22 @@ yyreduce: List_Delete((yyvsp[(7) - (8)].l)); (yyval.s).Type = MSH_SEGM_COMPOUND; (yyval.s).Num = num; - ;} + } break; case 124: -/* Line 1464 of yacc.c */ -#line 1493 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1494 "Gmsh.y" { curPhysDim = 1; - ;} + } break; case 125: -/* Line 1464 of yacc.c */ -#line 1497 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1498 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); if(FindPhysicalGroup(num, MSH_PHYSICAL_LINE)){ @@ -5781,13 +5804,13 @@ yyreduce: List_Delete((yyvsp[(8) - (9)].l)); (yyval.s).Type = MSH_PHYSICAL_LINE; (yyval.s).Num = num; - ;} + } break; case 126: -/* Line 1464 of yacc.c */ -#line 1516 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1517 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindSurface(num)){ @@ -5804,13 +5827,13 @@ yyreduce: List_Delete((yyvsp[(7) - (8)].l)); (yyval.s).Type = MSH_SURF_PLAN; (yyval.s).Num = num; - ;} + } break; case 127: -/* Line 1464 of yacc.c */ -#line 1534 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1535 "Gmsh.y" { int num = (int)(yyvsp[(4) - (9)].d), type = 0; if(FindSurface(num)){ @@ -5848,47 +5871,47 @@ yyreduce: List_Delete((yyvsp[(7) - (9)].l)); (yyval.s).Type = type; (yyval.s).Num = num; - ;} + } break; case 128: -/* Line 1464 of yacc.c */ -#line 1573 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1574 "Gmsh.y" { myGmshSurface = 0; (yyval.s).Type = 0; (yyval.s).Num = 0; - ;} + } break; case 129: -/* Line 1464 of yacc.c */ -#line 1579 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1580 "Gmsh.y" { myGmshSurface = gmshSurface::getSurface((int)(yyvsp[(3) - (4)].d)); (yyval.s).Type = 0; (yyval.s).Num = 0; - ;} + } break; case 130: -/* Line 1464 of yacc.c */ -#line 1585 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1586 "Gmsh.y" { int num = (int)(yyvsp[(4) - (10)].d); myGmshSurface = gmshParametricSurface::NewParametricSurface(num, (yyvsp[(7) - (10)].c), (yyvsp[(8) - (10)].c), (yyvsp[(9) - (10)].c)); (yyval.s).Type = 0; (yyval.s).Num = num; - ;} + } break; case 131: -/* Line 1464 of yacc.c */ -#line 1592 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1593 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if (List_Nbr((yyvsp[(6) - (7)].l)) != 2){ @@ -5912,13 +5935,13 @@ yyreduce: } (yyval.s).Type = 0; (yyval.s).Num = num; - ;} + } break; case 132: -/* Line 1464 of yacc.c */ -#line 1617 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1618 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if (List_Nbr((yyvsp[(6) - (7)].l)) != 2){ @@ -5942,13 +5965,13 @@ yyreduce: } (yyval.s).Type = 0; (yyval.s).Num = num; - ;} + } break; case 133: -/* Line 1464 of yacc.c */ -#line 1642 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1643 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindSurfaceLoop(num)){ @@ -5964,13 +5987,13 @@ yyreduce: Free((yyvsp[(2) - (8)].c)); (yyval.s).Type = MSH_SURF_LOOP; (yyval.s).Num = num; - ;} + } break; case 134: -/* Line 1464 of yacc.c */ -#line 1659 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1660 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindSurface(num)){ @@ -5986,13 +6009,13 @@ yyreduce: List_Delete((yyvsp[(7) - (8)].l)); (yyval.s).Type = MSH_SURF_COMPOUND; (yyval.s).Num = num; - ;} + } break; case 135: -/* Line 1464 of yacc.c */ -#line 1677 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1678 "Gmsh.y" { int num = (int)(yyvsp[(4) - (12)].d); if(FindSurface(num)){ @@ -6021,22 +6044,22 @@ yyreduce: Free((yyvsp[(8) - (12)].c)); (yyval.s).Type = MSH_SURF_COMPOUND; (yyval.s).Num = num; - ;} + } break; case 136: -/* Line 1464 of yacc.c */ -#line 1707 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1708 "Gmsh.y" { curPhysDim = 2; - ;} + } break; case 137: -/* Line 1464 of yacc.c */ -#line 1711 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1712 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE)){ @@ -6051,13 +6074,13 @@ yyreduce: List_Delete((yyvsp[(8) - (9)].l)); (yyval.s).Type = MSH_PHYSICAL_SURFACE; (yyval.s).Num = num; - ;} + } break; case 138: -/* Line 1464 of yacc.c */ -#line 1731 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1732 "Gmsh.y" { yymsg(0, "'Complex Volume' command is deprecated: use 'Volume' instead"); int num = (int)(yyvsp[(4) - (8)].d); @@ -6074,13 +6097,13 @@ yyreduce: List_Delete((yyvsp[(7) - (8)].l)); (yyval.s).Type = MSH_VOLUME; (yyval.s).Num = num; - ;} + } break; case 139: -/* Line 1464 of yacc.c */ -#line 1749 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1750 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindVolume(num)){ @@ -6096,13 +6119,13 @@ yyreduce: List_Delete((yyvsp[(6) - (7)].l)); (yyval.s).Type = MSH_VOLUME; (yyval.s).Num = num; - ;} + } break; case 140: -/* Line 1464 of yacc.c */ -#line 1766 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1767 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindVolume(num)){ @@ -6117,22 +6140,22 @@ yyreduce: List_Delete((yyvsp[(7) - (8)].l)); (yyval.s).Type = MSH_VOLUME_COMPOUND; (yyval.s).Num = num; - ;} + } break; case 141: -/* Line 1464 of yacc.c */ -#line 1782 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1783 "Gmsh.y" { curPhysDim = 3; - ;} + } break; case 142: -/* Line 1464 of yacc.c */ -#line 1786 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1787 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); if(FindPhysicalGroup(num, MSH_PHYSICAL_VOLUME)){ @@ -6147,53 +6170,53 @@ yyreduce: List_Delete((yyvsp[(8) - (9)].l)); (yyval.s).Type = MSH_PHYSICAL_VOLUME; (yyval.s).Num = num; - ;} + } break; case 143: -/* Line 1464 of yacc.c */ -#line 1808 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1809 "Gmsh.y" { TranslateShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(4) - (5)].l)); (yyval.l) = (yyvsp[(4) - (5)].l); - ;} + } break; case 144: -/* Line 1464 of yacc.c */ -#line 1813 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1814 "Gmsh.y" { RotateShapes((yyvsp[(3) - (11)].v)[0], (yyvsp[(3) - (11)].v)[1], (yyvsp[(3) - (11)].v)[2], (yyvsp[(5) - (11)].v)[0], (yyvsp[(5) - (11)].v)[1], (yyvsp[(5) - (11)].v)[2], (yyvsp[(7) - (11)].d), (yyvsp[(10) - (11)].l)); (yyval.l) = (yyvsp[(10) - (11)].l); - ;} + } break; case 145: -/* Line 1464 of yacc.c */ -#line 1818 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1819 "Gmsh.y" { SymmetryShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(2) - (5)].v)[3], (yyvsp[(4) - (5)].l)); (yyval.l) = (yyvsp[(4) - (5)].l); - ;} + } break; case 146: -/* Line 1464 of yacc.c */ -#line 1823 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1824 "Gmsh.y" { DilatShapes((yyvsp[(3) - (9)].v)[0], (yyvsp[(3) - (9)].v)[1], (yyvsp[(3) - (9)].v)[2], (yyvsp[(5) - (9)].d), (yyvsp[(8) - (9)].l)); (yyval.l) = (yyvsp[(8) - (9)].l); - ;} + } break; case 147: -/* Line 1464 of yacc.c */ -#line 1828 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1829 "Gmsh.y" { (yyval.l) = List_Create(3, 3, sizeof(Shape)); if(!strcmp((yyvsp[(1) - (4)].c), "Duplicata")){ @@ -6215,69 +6238,69 @@ yyreduce: } Free((yyvsp[(1) - (4)].c)); List_Delete((yyvsp[(3) - (4)].l)); - ;} + } break; case 148: -/* Line 1464 of yacc.c */ -#line 1851 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1852 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); IntersectCurvesWithSurface((yyvsp[(4) - (9)].l), (int)(yyvsp[(8) - (9)].d), (yyval.l)); List_Delete((yyvsp[(4) - (9)].l)); - ;} + } break; case 149: -/* Line 1464 of yacc.c */ -#line 1857 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1858 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape*)); List_T *tmp = ListOfDouble2ListOfInt((yyvsp[(7) - (9)].l)); List_Delete((yyvsp[(7) - (9)].l)); SplitCurve((int)(yyvsp[(4) - (9)].d), tmp, (yyval.l)); List_Delete(tmp); - ;} + } break; case 150: -/* Line 1464 of yacc.c */ -#line 1867 "Gmsh.y" - { (yyval.l) = (yyvsp[(1) - (1)].l); ;} +/* Line 1806 of yacc.c */ +#line 1868 "Gmsh.y" + { (yyval.l) = (yyvsp[(1) - (1)].l); } break; case 151: -/* Line 1464 of yacc.c */ -#line 1868 "Gmsh.y" - { (yyval.l) = (yyvsp[(1) - (1)].l); ;} +/* Line 1806 of yacc.c */ +#line 1869 "Gmsh.y" + { (yyval.l) = (yyvsp[(1) - (1)].l); } break; case 152: -/* Line 1464 of yacc.c */ -#line 1873 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1874 "Gmsh.y" { (yyval.l) = List_Create(3, 3, sizeof(Shape)); - ;} + } break; case 153: -/* Line 1464 of yacc.c */ -#line 1877 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1878 "Gmsh.y" { List_Add((yyval.l), &(yyvsp[(2) - (2)].s)); - ;} + } break; case 154: -/* Line 1464 of yacc.c */ -#line 1881 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1882 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -6299,13 +6322,13 @@ yyreduce: yymsg(1, "Unknown point %d", TheShape.Num); } } - ;} + } break; case 155: -/* Line 1464 of yacc.c */ -#line 1904 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1905 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -6327,13 +6350,13 @@ yyreduce: yymsg(1, "Unknown curve %d", TheShape.Num); } } - ;} + } break; case 156: -/* Line 1464 of yacc.c */ -#line 1927 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1928 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -6355,13 +6378,13 @@ yyreduce: yymsg(1, "Unknown surface %d", TheShape.Num); } } - ;} + } break; case 157: -/* Line 1464 of yacc.c */ -#line 1950 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1951 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -6383,13 +6406,13 @@ yyreduce: yymsg(1, "Unknown volume %d", TheShape.Num); } } - ;} + } break; case 158: -/* Line 1464 of yacc.c */ -#line 1978 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 1979 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) if(List_Nbr((yyvsp[(7) - (8)].l)) == 4){ @@ -6409,13 +6432,13 @@ yyreduce: else yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (8)].d)); #endif - ;} + } break; case 159: -/* Line 1464 of yacc.c */ -#line 1999 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2000 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) int t = (int)(yyvsp[(4) - (10)].d); @@ -6437,13 +6460,13 @@ yyreduce: Tree_Add(GModel::current()->getGEOInternals()->LevelSets, &l); } #endif - ;} + } break; case 160: -/* Line 1464 of yacc.c */ -#line 2023 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2024 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) if(List_Nbr((yyvsp[(12) - (14)].l)) == 0){ @@ -6462,13 +6485,13 @@ yyreduce: else yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (14)].d)); #endif - ;} + } break; case 161: -/* Line 1464 of yacc.c */ -#line 2044 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2045 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) if(List_Nbr((yyvsp[(14) - (16)].l)) == 0){ @@ -6488,13 +6511,13 @@ yyreduce: else yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (16)].d)); #endif - ;} + } break; case 162: -/* Line 1464 of yacc.c */ -#line 2065 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2066 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) if(List_Nbr((yyvsp[(10) - (12)].l)) == 1){ @@ -6513,13 +6536,13 @@ yyreduce: else yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (12)].d)); #endif - ;} + } break; case 163: -/* Line 1464 of yacc.c */ -#line 2085 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2086 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) if(!strcmp((yyvsp[(2) - (8)].c), "Union")){ @@ -6630,13 +6653,13 @@ yyreduce: yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (8)].d)); Free((yyvsp[(2) - (8)].c)); #endif - ;} + } break; case 164: -/* Line 1464 of yacc.c */ -#line 2197 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2198 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) if(!strcmp((yyvsp[(2) - (8)].c), "MathEval")){ @@ -6654,13 +6677,13 @@ yyreduce: yymsg(0, "Wrong levelset definition"); Free((yyvsp[(2) - (8)].c)); Free((yyvsp[(7) - (8)].c)); #endif - ;} + } break; case 165: -/* Line 1464 of yacc.c */ -#line 2216 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2217 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) if(!strcmp((yyvsp[(2) - (6)].c), "CutMesh")){ @@ -6697,13 +6720,13 @@ yyreduce: yymsg(0, "Wrong levelset definition"); Free((yyvsp[(2) - (6)].c)); #endif - ;} + } break; case 166: -/* Line 1464 of yacc.c */ -#line 2255 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2256 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) if(!strcmp((yyvsp[(2) - (14)].c), "Cylinder") && List_Nbr((yyvsp[(12) - (14)].l)) == 1){ @@ -6805,13 +6828,13 @@ yyreduce: yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (14)].d)); Free((yyvsp[(2) - (14)].c)); #endif - ;} + } break; case 167: -/* Line 1464 of yacc.c */ -#line 2363 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2364 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ Shape TheShape; @@ -6819,24 +6842,24 @@ yyreduce: DeleteShape(TheShape.Type, TheShape.Num); } List_Delete((yyvsp[(3) - (4)].l)); - ;} + } break; case 168: -/* Line 1464 of yacc.c */ -#line 2372 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2373 "Gmsh.y" { #if defined(HAVE_MESH) GModel::current()->getFields()->deleteField((int)(yyvsp[(4) - (6)].d)); #endif - ;} + } break; case 169: -/* Line 1464 of yacc.c */ -#line 2378 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2379 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(2) - (6)].c), "View")){ @@ -6850,13 +6873,13 @@ yyreduce: yymsg(0, "Unknown command 'Delete %s'", (yyvsp[(2) - (6)].c)); #endif Free((yyvsp[(2) - (6)].c)); - ;} + } break; case 170: -/* Line 1464 of yacc.c */ -#line 2393 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2394 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Meshes") || !strcmp((yyvsp[(2) - (3)].c), "All")){ ClearProject(); @@ -6883,13 +6906,13 @@ yyreduce: yymsg(0, "Unknown object or expression to delete '%s'", (yyvsp[(2) - (3)].c)); } Free((yyvsp[(2) - (3)].c)); - ;} + } break; case 171: -/* Line 1464 of yacc.c */ -#line 2421 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2422 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(2) - (4)].c), "Empty") && !strcmp((yyvsp[(3) - (4)].c), "Views")){ @@ -6900,13 +6923,13 @@ yyreduce: yymsg(0, "Unknown command 'Delete %s %s'", (yyvsp[(2) - (4)].c), (yyvsp[(3) - (4)].c)); #endif Free((yyvsp[(2) - (4)].c)); Free((yyvsp[(3) - (4)].c)); - ;} + } break; case 172: -/* Line 1464 of yacc.c */ -#line 2438 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2439 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){ Shape TheShape; @@ -6914,35 +6937,35 @@ yyreduce: ColorShape(TheShape.Type, TheShape.Num, (yyvsp[(2) - (5)].u)); } List_Delete((yyvsp[(4) - (5)].l)); - ;} + } break; case 173: -/* Line 1464 of yacc.c */ -#line 2452 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2453 "Gmsh.y" { for(int i = 0; i < 4; i++) VisibilityShape((yyvsp[(2) - (3)].c), i, 1); Free((yyvsp[(2) - (3)].c)); - ;} + } break; case 174: -/* Line 1464 of yacc.c */ -#line 2458 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2459 "Gmsh.y" { for(int i = 0; i < 4; i++) VisibilityShape((yyvsp[(2) - (3)].c), i, 0); Free((yyvsp[(2) - (3)].c)); - ;} + } break; case 175: -/* Line 1464 of yacc.c */ -#line 2464 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2465 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ Shape TheShape; @@ -6950,13 +6973,13 @@ yyreduce: VisibilityShape(TheShape.Type, TheShape.Num, 1); } List_Delete((yyvsp[(3) - (4)].l)); - ;} + } break; case 176: -/* Line 1464 of yacc.c */ -#line 2473 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2474 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ Shape TheShape; @@ -6964,13 +6987,13 @@ yyreduce: VisibilityShape(TheShape.Type, TheShape.Num, 0); } List_Delete((yyvsp[(3) - (4)].l)); - ;} + } break; case 177: -/* Line 1464 of yacc.c */ -#line 2487 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2488 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Include")){ std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(2) - (3)].c)); @@ -7014,13 +7037,13 @@ yyreduce: else yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (3)].c)); Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(2) - (3)].c)); - ;} + } break; case 178: -/* Line 1464 of yacc.c */ -#line 2532 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2533 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(1) - (7)].c), "Save") && !strcmp((yyvsp[(2) - (7)].c), "View")){ @@ -7036,13 +7059,13 @@ yyreduce: yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (7)].c)); #endif Free((yyvsp[(1) - (7)].c)); Free((yyvsp[(2) - (7)].c)); Free((yyvsp[(6) - (7)].c)); - ;} + } break; case 179: -/* Line 1464 of yacc.c */ -#line 2549 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2550 "Gmsh.y" { #if defined(HAVE_POST) && defined(HAVE_MESH) if(!strcmp((yyvsp[(1) - (7)].c), "Background") && !strcmp((yyvsp[(2) - (7)].c), "Mesh") && !strcmp((yyvsp[(3) - (7)].c), "View")){ @@ -7056,13 +7079,13 @@ yyreduce: yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (7)].c)); #endif Free((yyvsp[(1) - (7)].c)); Free((yyvsp[(2) - (7)].c)); Free((yyvsp[(3) - (7)].c)); - ;} + } break; case 180: -/* Line 1464 of yacc.c */ -#line 2564 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2565 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Sleep")){ SleepInSeconds((yyvsp[(2) - (3)].d)); @@ -7080,13 +7103,13 @@ yyreduce: else yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (3)].c)); Free((yyvsp[(1) - (3)].c)); - ;} + } break; case 181: -/* Line 1464 of yacc.c */ -#line 2583 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2584 "Gmsh.y" { #if defined(HAVE_PLUGINS) try { @@ -7097,13 +7120,13 @@ yyreduce: } #endif Free((yyvsp[(3) - (7)].c)); Free((yyvsp[(6) - (7)].c)); - ;} + } break; case 182: -/* Line 1464 of yacc.c */ -#line 2595 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2596 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(2) - (3)].c), "ElementsFromAllViews")) @@ -7126,94 +7149,94 @@ yyreduce: yymsg(0, "Unknown 'Combine' command"); #endif Free((yyvsp[(2) - (3)].c)); - ;} + } break; case 183: -/* Line 1464 of yacc.c */ -#line 2619 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2620 "Gmsh.y" { exit(0); - ;} + } break; case 184: -/* Line 1464 of yacc.c */ -#line 2623 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2624 "Gmsh.y" { // FIXME: this is a hack to force a transfer from the old DB to // the new DB. This will become unnecessary if/when we fill the // GModel directly during parsing. GModel::current()->importGEOInternals(); - ;} + } break; case 185: -/* Line 1464 of yacc.c */ -#line 2630 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2631 "Gmsh.y" { CTX::instance()->forcedBBox = 0; GModel::current()->importGEOInternals(); SetBoundingBox(); - ;} + } break; case 186: -/* Line 1464 of yacc.c */ -#line 2636 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2637 "Gmsh.y" { CTX::instance()->forcedBBox = 1; SetBoundingBox((yyvsp[(3) - (15)].d), (yyvsp[(5) - (15)].d), (yyvsp[(7) - (15)].d), (yyvsp[(9) - (15)].d), (yyvsp[(11) - (15)].d), (yyvsp[(13) - (15)].d)); - ;} + } break; case 187: -/* Line 1464 of yacc.c */ -#line 2641 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2642 "Gmsh.y" { #if defined(HAVE_OPENGL) drawContext::global()->draw(); #endif - ;} + } break; case 188: -/* Line 1464 of yacc.c */ -#line 2647 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2648 "Gmsh.y" { GModel::current()->createTopologyFromMesh(); - ;} + } break; case 189: -/* Line 1464 of yacc.c */ -#line 2651 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2652 "Gmsh.y" { GModel::current()->createTopologyFromMesh(1); - ;} + } break; case 190: -/* Line 1464 of yacc.c */ -#line 2655 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2656 "Gmsh.y" { GModel::current()->importGEOInternals(); GModel::current()->refineMesh(CTX::instance()->mesh.secondOrderLinear); - ;} + } break; case 191: -/* Line 1464 of yacc.c */ -#line 2665 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2666 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (6)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (6)].d); @@ -7229,13 +7252,13 @@ yyreduce: yymsg(0, "Reached maximum number of imbricated loops"); ImbricatedLoop = MAX_RECUR_LOOPS - 1; } - ;} + } break; case 192: -/* Line 1464 of yacc.c */ -#line 2682 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2683 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (8)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (8)].d); @@ -7251,13 +7274,13 @@ yyreduce: yymsg(0, "Reached maximum number of imbricated loops"); ImbricatedLoop = MAX_RECUR_LOOPS - 1; } - ;} + } break; case 193: -/* Line 1464 of yacc.c */ -#line 2699 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2700 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (8)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (8)].d); @@ -7277,13 +7300,13 @@ yyreduce: yymsg(0, "Reached maximum number of imbricated loops"); ImbricatedLoop = MAX_RECUR_LOOPS - 1; } - ;} + } break; case 194: -/* Line 1464 of yacc.c */ -#line 2720 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2721 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (10)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (10)].d); @@ -7303,13 +7326,13 @@ yyreduce: yymsg(0, "Reached maximum number of imbricated loops"); ImbricatedLoop = MAX_RECUR_LOOPS - 1; } - ;} + } break; case 195: -/* Line 1464 of yacc.c */ -#line 2741 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2742 "Gmsh.y" { if(ImbricatedLoop <= 0){ yymsg(0, "Invalid For/EndFor loop"); @@ -7343,518 +7366,518 @@ yyreduce: else ImbricatedLoop--; } - ;} + } break; case 196: -/* Line 1464 of yacc.c */ -#line 2776 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2777 "Gmsh.y" { if(!FunctionManager::Instance()->createFunction ((yyvsp[(2) - (2)].c), gmsh_yyin, gmsh_yyname, gmsh_yylineno)) yymsg(0, "Redefinition of function %s", (yyvsp[(2) - (2)].c)); skip_until(NULL, "Return"); //FIXME: wee leak $2 - ;} + } break; case 197: -/* Line 1464 of yacc.c */ -#line 2784 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2785 "Gmsh.y" { if(!FunctionManager::Instance()->leaveFunction (&gmsh_yyin, gmsh_yyname, gmsh_yylineno)) yymsg(0, "Error while exiting function"); - ;} + } break; case 198: -/* Line 1464 of yacc.c */ -#line 2790 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2791 "Gmsh.y" { if(!FunctionManager::Instance()->enterFunction ((yyvsp[(2) - (3)].c), &gmsh_yyin, gmsh_yyname, gmsh_yylineno)) yymsg(0, "Unknown function %s", (yyvsp[(2) - (3)].c)); //FIXME: wee leak $2 - ;} + } break; case 199: -/* Line 1464 of yacc.c */ -#line 2797 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2798 "Gmsh.y" { if(!(yyvsp[(3) - (4)].d)) skip_until("If", "EndIf"); - ;} + } break; case 200: -/* Line 1464 of yacc.c */ -#line 2801 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2802 "Gmsh.y" { - ;} + } break; case 201: -/* Line 1464 of yacc.c */ -#line 2810 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2811 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (5)].l), (yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], 0., 0., 0., 0., 0., 0., 0., NULL, (yyval.l)); List_Delete((yyvsp[(4) - (5)].l)); - ;} + } break; case 202: -/* Line 1464 of yacc.c */ -#line 2818 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2819 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(ROTATE, (yyvsp[(10) - (11)].l), 0., 0., 0., (yyvsp[(3) - (11)].v)[0], (yyvsp[(3) - (11)].v)[1], (yyvsp[(3) - (11)].v)[2], (yyvsp[(5) - (11)].v)[0], (yyvsp[(5) - (11)].v)[1], (yyvsp[(5) - (11)].v)[2], (yyvsp[(7) - (11)].d), NULL, (yyval.l)); List_Delete((yyvsp[(10) - (11)].l)); - ;} + } break; case 203: -/* Line 1464 of yacc.c */ -#line 2826 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2827 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (13)].l), (yyvsp[(3) - (13)].v)[0], (yyvsp[(3) - (13)].v)[1], (yyvsp[(3) - (13)].v)[2], (yyvsp[(5) - (13)].v)[0], (yyvsp[(5) - (13)].v)[1], (yyvsp[(5) - (13)].v)[2], (yyvsp[(7) - (13)].v)[0], (yyvsp[(7) - (13)].v)[1], (yyvsp[(7) - (13)].v)[2], (yyvsp[(9) - (13)].d), NULL, (yyval.l)); List_Delete((yyvsp[(12) - (13)].l)); - ;} + } break; case 204: -/* Line 1464 of yacc.c */ -#line 2834 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2835 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 205: -/* Line 1464 of yacc.c */ -#line 2839 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2840 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (7)].l), (yyvsp[(2) - (7)].v)[0], (yyvsp[(2) - (7)].v)[1], (yyvsp[(2) - (7)].v)[2], 0., 0., 0., 0., 0., 0., 0., &extr, (yyval.l)); List_Delete((yyvsp[(4) - (7)].l)); - ;} + } break; case 206: -/* Line 1464 of yacc.c */ -#line 2847 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2848 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 207: -/* Line 1464 of yacc.c */ -#line 2852 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2853 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(ROTATE, (yyvsp[(10) - (13)].l), 0., 0., 0., (yyvsp[(3) - (13)].v)[0], (yyvsp[(3) - (13)].v)[1], (yyvsp[(3) - (13)].v)[2], (yyvsp[(5) - (13)].v)[0], (yyvsp[(5) - (13)].v)[1], (yyvsp[(5) - (13)].v)[2], (yyvsp[(7) - (13)].d), &extr, (yyval.l)); List_Delete((yyvsp[(10) - (13)].l)); - ;} + } break; case 208: -/* Line 1464 of yacc.c */ -#line 2860 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2861 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 209: -/* Line 1464 of yacc.c */ -#line 2865 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2866 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (15)].l), (yyvsp[(3) - (15)].v)[0], (yyvsp[(3) - (15)].v)[1], (yyvsp[(3) - (15)].v)[2], (yyvsp[(5) - (15)].v)[0], (yyvsp[(5) - (15)].v)[1], (yyvsp[(5) - (15)].v)[2], (yyvsp[(7) - (15)].v)[0], (yyvsp[(7) - (15)].v)[1], (yyvsp[(7) - (15)].v)[2], (yyvsp[(9) - (15)].d), &extr, (yyval.l)); List_Delete((yyvsp[(12) - (15)].l)); - ;} + } break; case 210: -/* Line 1464 of yacc.c */ -#line 2873 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2874 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 211: -/* Line 1464 of yacc.c */ -#line 2878 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2879 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(BOUNDARY_LAYER, (yyvsp[(3) - (6)].l), 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., &extr, (yyval.l)); List_Delete((yyvsp[(3) - (6)].l)); - ;} + } break; case 212: -/* Line 1464 of yacc.c */ -#line 2886 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2887 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (8)].d), (yyvsp[(6) - (8)].v)[0], (yyvsp[(6) - (8)].v)[1], (yyvsp[(6) - (8)].v)[2], 0., 0., 0., 0., 0., 0., 0., NULL, (yyval.l)); - ;} + } break; case 213: -/* Line 1464 of yacc.c */ -#line 2893 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2894 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (8)].d), (yyvsp[(6) - (8)].v)[0], (yyvsp[(6) - (8)].v)[1], (yyvsp[(6) - (8)].v)[2], 0., 0., 0., 0., 0., 0., 0., NULL, (yyval.l)); - ;} + } break; case 214: -/* Line 1464 of yacc.c */ -#line 2900 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2901 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (8)].d), (yyvsp[(6) - (8)].v)[0], (yyvsp[(6) - (8)].v)[1], (yyvsp[(6) - (8)].v)[2], 0., 0., 0., 0., 0., 0., 0., NULL, (yyval.l)); - ;} + } break; case 215: -/* Line 1464 of yacc.c */ -#line 2907 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2908 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), 0., 0., 0., (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], (yyvsp[(8) - (12)].v)[0], (yyvsp[(8) - (12)].v)[1], (yyvsp[(8) - (12)].v)[2], (yyvsp[(10) - (12)].d), NULL, (yyval.l)); - ;} + } break; case 216: -/* Line 1464 of yacc.c */ -#line 2914 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2915 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), 0., 0., 0., (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], (yyvsp[(8) - (12)].v)[0], (yyvsp[(8) - (12)].v)[1], (yyvsp[(8) - (12)].v)[2], (yyvsp[(10) - (12)].d), NULL, (yyval.l)); - ;} + } break; case 217: -/* Line 1464 of yacc.c */ -#line 2921 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2922 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), 0., 0., 0., (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], (yyvsp[(8) - (12)].v)[0], (yyvsp[(8) - (12)].v)[1], (yyvsp[(8) - (12)].v)[2], (yyvsp[(10) - (12)].d), NULL, (yyval.l)); - ;} + } break; case 218: -/* Line 1464 of yacc.c */ -#line 2928 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2929 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (14)].d), (yyvsp[(6) - (14)].v)[0], (yyvsp[(6) - (14)].v)[1], (yyvsp[(6) - (14)].v)[2], (yyvsp[(8) - (14)].v)[0], (yyvsp[(8) - (14)].v)[1], (yyvsp[(8) - (14)].v)[2], (yyvsp[(10) - (14)].v)[0], (yyvsp[(10) - (14)].v)[1], (yyvsp[(10) - (14)].v)[2], (yyvsp[(12) - (14)].d), NULL, (yyval.l)); - ;} + } break; case 219: -/* Line 1464 of yacc.c */ -#line 2935 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2936 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (14)].d), (yyvsp[(6) - (14)].v)[0], (yyvsp[(6) - (14)].v)[1], (yyvsp[(6) - (14)].v)[2], (yyvsp[(8) - (14)].v)[0], (yyvsp[(8) - (14)].v)[1], (yyvsp[(8) - (14)].v)[2], (yyvsp[(10) - (14)].v)[0], (yyvsp[(10) - (14)].v)[1], (yyvsp[(10) - (14)].v)[2], (yyvsp[(12) - (14)].d), NULL, (yyval.l)); - ;} + } break; case 220: -/* Line 1464 of yacc.c */ -#line 2942 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2943 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (14)].d), (yyvsp[(6) - (14)].v)[0], (yyvsp[(6) - (14)].v)[1], (yyvsp[(6) - (14)].v)[2], (yyvsp[(8) - (14)].v)[0], (yyvsp[(8) - (14)].v)[1], (yyvsp[(8) - (14)].v)[2], (yyvsp[(10) - (14)].v)[0], (yyvsp[(10) - (14)].v)[1], (yyvsp[(10) - (14)].v)[2], (yyvsp[(12) - (14)].d), NULL, (yyval.l)); - ;} + } break; case 221: -/* Line 1464 of yacc.c */ -#line 2949 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2950 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 222: -/* Line 1464 of yacc.c */ -#line 2954 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2955 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], 0., 0., 0., 0., 0., 0., 0., &extr, (yyval.l)); - ;} + } break; case 223: -/* Line 1464 of yacc.c */ -#line 2961 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2962 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 224: -/* Line 1464 of yacc.c */ -#line 2966 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2967 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], 0., 0., 0., 0., 0., 0., 0., &extr, (yyval.l)); - ;} + } break; case 225: -/* Line 1464 of yacc.c */ -#line 2973 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2974 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 226: -/* Line 1464 of yacc.c */ -#line 2978 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2979 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], 0., 0., 0., 0., 0., 0., 0., &extr, (yyval.l)); - ;} + } break; case 227: -/* Line 1464 of yacc.c */ -#line 2985 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2986 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 228: -/* Line 1464 of yacc.c */ -#line 2990 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2991 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (16)].d), 0., 0., 0., (yyvsp[(6) - (16)].v)[0], (yyvsp[(6) - (16)].v)[1], (yyvsp[(6) - (16)].v)[2], (yyvsp[(8) - (16)].v)[0], (yyvsp[(8) - (16)].v)[1], (yyvsp[(8) - (16)].v)[2], (yyvsp[(10) - (16)].d), &extr, (yyval.l)); - ;} + } break; case 229: -/* Line 1464 of yacc.c */ -#line 2997 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 2998 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 230: -/* Line 1464 of yacc.c */ -#line 3002 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3003 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (16)].d), 0., 0., 0., (yyvsp[(6) - (16)].v)[0], (yyvsp[(6) - (16)].v)[1], (yyvsp[(6) - (16)].v)[2], (yyvsp[(8) - (16)].v)[0], (yyvsp[(8) - (16)].v)[1], (yyvsp[(8) - (16)].v)[2], (yyvsp[(10) - (16)].d), &extr, (yyval.l)); - ;} + } break; case 231: -/* Line 1464 of yacc.c */ -#line 3009 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3010 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 232: -/* Line 1464 of yacc.c */ -#line 3014 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3015 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (16)].d), 0., 0., 0., (yyvsp[(6) - (16)].v)[0], (yyvsp[(6) - (16)].v)[1], (yyvsp[(6) - (16)].v)[2], (yyvsp[(8) - (16)].v)[0], (yyvsp[(8) - (16)].v)[1], (yyvsp[(8) - (16)].v)[2], (yyvsp[(10) - (16)].d), &extr, (yyval.l)); - ;} + } break; case 233: -/* Line 1464 of yacc.c */ -#line 3021 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3022 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 234: -/* Line 1464 of yacc.c */ -#line 3026 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3027 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (18)].d), (yyvsp[(6) - (18)].v)[0], (yyvsp[(6) - (18)].v)[1], (yyvsp[(6) - (18)].v)[2], (yyvsp[(8) - (18)].v)[0], (yyvsp[(8) - (18)].v)[1], (yyvsp[(8) - (18)].v)[2], (yyvsp[(10) - (18)].v)[0], (yyvsp[(10) - (18)].v)[1], (yyvsp[(10) - (18)].v)[2], (yyvsp[(12) - (18)].d), &extr, (yyval.l)); - ;} + } break; case 235: -/* Line 1464 of yacc.c */ -#line 3033 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3034 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 236: -/* Line 1464 of yacc.c */ -#line 3038 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3039 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (18)].d), (yyvsp[(6) - (18)].v)[0], (yyvsp[(6) - (18)].v)[1], (yyvsp[(6) - (18)].v)[2], (yyvsp[(8) - (18)].v)[0], (yyvsp[(8) - (18)].v)[1], (yyvsp[(8) - (18)].v)[2], (yyvsp[(10) - (18)].v)[0], (yyvsp[(10) - (18)].v)[1], (yyvsp[(10) - (18)].v)[2], (yyvsp[(12) - (18)].d), &extr, (yyval.l)); - ;} + } break; case 237: -/* Line 1464 of yacc.c */ -#line 3045 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3046 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 238: -/* Line 1464 of yacc.c */ -#line 3050 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3051 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (18)].d), (yyvsp[(6) - (18)].v)[0], (yyvsp[(6) - (18)].v)[1], (yyvsp[(6) - (18)].v)[2], (yyvsp[(8) - (18)].v)[0], (yyvsp[(8) - (18)].v)[1], (yyvsp[(8) - (18)].v)[2], (yyvsp[(10) - (18)].v)[0], (yyvsp[(10) - (18)].v)[1], (yyvsp[(10) - (18)].v)[2], (yyvsp[(12) - (18)].d), &extr, (yyval.l)); - ;} + } break; case 239: -/* Line 1464 of yacc.c */ -#line 3061 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3062 "Gmsh.y" { - ;} + } break; case 240: -/* Line 1464 of yacc.c */ -#line 3064 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3065 "Gmsh.y" { - ;} + } break; case 241: -/* Line 1464 of yacc.c */ -#line 3070 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3071 "Gmsh.y" { extr.mesh.ExtrudeMesh = true; extr.mesh.NbLayer = 1; @@ -7862,13 +7885,13 @@ yyreduce: extr.mesh.hLayer.clear(); extr.mesh.NbElmLayer.push_back((int)fabs((yyvsp[(3) - (5)].d))); extr.mesh.hLayer.push_back(1.); - ;} + } break; case 242: -/* Line 1464 of yacc.c */ -#line 3079 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3080 "Gmsh.y" { extr.mesh.ExtrudeMesh = true; extr.mesh.NbLayer = List_Nbr((yyvsp[(3) - (7)].l)); @@ -7887,13 +7910,13 @@ yyreduce: yymsg(0, "Wrong layer definition {%d, %d}", List_Nbr((yyvsp[(3) - (7)].l)), List_Nbr((yyvsp[(5) - (7)].l))); List_Delete((yyvsp[(3) - (7)].l)); List_Delete((yyvsp[(5) - (7)].l)); - ;} + } break; case 243: -/* Line 1464 of yacc.c */ -#line 3099 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3100 "Gmsh.y" { yymsg(0, "Explicit region numbers in layers are deprecated"); extr.mesh.ExtrudeMesh = true; @@ -7915,58 +7938,58 @@ yyreduce: List_Delete((yyvsp[(3) - (9)].l)); List_Delete((yyvsp[(5) - (9)].l)); List_Delete((yyvsp[(7) - (9)].l)); - ;} + } break; case 244: -/* Line 1464 of yacc.c */ -#line 3122 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3123 "Gmsh.y" { extr.mesh.Recombine = true; - ;} + } break; case 245: -/* Line 1464 of yacc.c */ -#line 3126 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3127 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_DBL_1; - ;} + } break; case 246: -/* Line 1464 of yacc.c */ -#line 3130 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3131 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_DBL_1_RECOMB; - ;} + } break; case 247: -/* Line 1464 of yacc.c */ -#line 3134 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3135 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_SNGL_1; - ;} + } break; case 248: -/* Line 1464 of yacc.c */ -#line 3138 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3139 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_SNGL_1_RECOMB; - ;} + } break; case 249: -/* Line 1464 of yacc.c */ -#line 3142 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3143 "Gmsh.y" { int num = (int)(yyvsp[(3) - (9)].d); if(FindSurface(num)){ @@ -7984,35 +8007,35 @@ yyreduce: } } List_Delete((yyvsp[(6) - (9)].l)); - ;} + } break; case 250: -/* Line 1464 of yacc.c */ -#line 3161 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3162 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (6)].c), "Index")) extr.mesh.BoundaryLayerIndex = (yyvsp[(4) - (6)].d); else if(!strcmp((yyvsp[(2) - (6)].c), "View")) extr.mesh.ViewIndex = (yyvsp[(4) - (6)].d); Free((yyvsp[(2) - (6)].c)); - ;} + } break; case 251: -/* Line 1464 of yacc.c */ -#line 3173 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3174 "Gmsh.y" { (yyval.v)[0] = (yyval.v)[1] = 1.; - ;} + } break; case 252: -/* Line 1464 of yacc.c */ -#line 3177 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3178 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Progression") || !strcmp((yyvsp[(2) - (3)].c), "Power")) (yyval.v)[0] = 1.; @@ -8024,22 +8047,22 @@ yyreduce: } (yyval.v)[1] = (yyvsp[(3) - (3)].d); Free((yyvsp[(2) - (3)].c)); - ;} + } break; case 253: -/* Line 1464 of yacc.c */ -#line 3192 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3193 "Gmsh.y" { (yyval.i) = -1; // left - ;} + } break; case 254: -/* Line 1464 of yacc.c */ -#line 3196 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3197 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "Right")) (yyval.i) = 1; @@ -8048,49 +8071,49 @@ yyreduce: else // alternated (yyval.i) = 0; Free((yyvsp[(1) - (1)].c)); - ;} + } break; case 255: -/* Line 1464 of yacc.c */ -#line 3208 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3209 "Gmsh.y" { (yyval.l) = List_Create(1, 1, sizeof(double)); - ;} + } break; case 256: -/* Line 1464 of yacc.c */ -#line 3212 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3213 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); - ;} + } break; case 257: -/* Line 1464 of yacc.c */ -#line 3217 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3218 "Gmsh.y" { (yyval.i) = 45; - ;} + } break; case 258: -/* Line 1464 of yacc.c */ -#line 3221 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3222 "Gmsh.y" { (yyval.i) = (int)(yyvsp[(2) - (2)].d); - ;} + } break; case 259: -/* Line 1464 of yacc.c */ -#line 3228 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3229 "Gmsh.y" { int type = (int)(yyvsp[(6) - (7)].v)[0]; double coef = fabs((yyvsp[(6) - (7)].v)[1]); @@ -8145,13 +8168,13 @@ yyreduce: } List_Delete((yyvsp[(3) - (7)].l)); } - ;} + } break; case 260: -/* Line 1464 of yacc.c */ -#line 3284 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3285 "Gmsh.y" { int k = List_Nbr((yyvsp[(4) - (6)].l)); if(k != 0 && k != 3 && k != 4){ @@ -8220,23 +8243,23 @@ yyreduce: } } List_Delete((yyvsp[(4) - (6)].l)); - ;} + } break; case 261: -/* Line 1464 of yacc.c */ -#line 3354 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3355 "Gmsh.y" { yymsg(1, "Elliptic Surface is deprecated: use Transfinite instead (with smoothing)"); List_Delete((yyvsp[(7) - (8)].l)); - ;} + } break; case 262: -/* Line 1464 of yacc.c */ -#line 3359 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3360 "Gmsh.y" { int k = List_Nbr((yyvsp[(4) - (5)].l)); if(k != 0 && k != 6 && k != 8){ @@ -8302,13 +8325,13 @@ yyreduce: } } List_Delete((yyvsp[(4) - (5)].l)); - ;} + } break; case 263: -/* Line 1464 of yacc.c */ -#line 3426 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3427 "Gmsh.y" { if(!(yyvsp[(2) - (3)].l)){ List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Volumes); @@ -8343,26 +8366,26 @@ yyreduce: } List_Delete((yyvsp[(2) - (3)].l)); } - ;} + } break; case 264: -/* Line 1464 of yacc.c */ -#line 3462 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3463 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (7)].l)); i++){ double d; List_Read((yyvsp[(4) - (7)].l), i, &d); CTX::instance()->mesh.algo2d_per_face[(int)d] = (int)(yyvsp[(6) - (7)].d); } - ;} + } break; case 265: -/* Line 1464 of yacc.c */ -#line 3471 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3472 "Gmsh.y" { if(!(yyvsp[(3) - (5)].l)){ List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Surfaces); @@ -8404,13 +8427,13 @@ yyreduce: } List_Delete((yyvsp[(3) - (5)].l)); } - ;} + } break; case 266: -/* Line 1464 of yacc.c */ -#line 3514 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3515 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ double d; @@ -8429,13 +8452,13 @@ yyreduce: } } List_Delete((yyvsp[(3) - (6)].l)); - ;} + } break; case 267: -/* Line 1464 of yacc.c */ -#line 3539 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3540 "Gmsh.y" { if(List_Nbr((yyvsp[(5) - (6)].l)) != List_Nbr((yyvsp[(3) - (6)].l))){ yymsg(0, "Number of master (%d) different from number of slave (%d) lines", @@ -8461,13 +8484,13 @@ yyreduce: } List_Delete((yyvsp[(3) - (6)].l)); List_Delete((yyvsp[(5) - (6)].l)); - ;} + } break; case 268: -/* Line 1464 of yacc.c */ -#line 3567 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3568 "Gmsh.y" { if (List_Nbr((yyvsp[(5) - (12)].l)) != List_Nbr((yyvsp[(10) - (12)].l))){ yymsg(0, "Number of master surface edges (%d) different from number of " @@ -8502,13 +8525,13 @@ yyreduce: } List_Delete((yyvsp[(5) - (12)].l)); List_Delete((yyvsp[(10) - (12)].l)); - ;} + } break; case 269: -/* Line 1464 of yacc.c */ -#line 3610 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3611 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); if(s){ @@ -8530,13 +8553,13 @@ yyreduce: else yymsg(0, "Unknown surface %d", (int)(yyvsp[(8) - (10)].d)); } - ;} + } break; case 270: -/* Line 1464 of yacc.c */ -#line 3633 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3634 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); if(s){ @@ -8558,38 +8581,38 @@ yyreduce: else yymsg(0, "Unknown surface %d", (int)(yyvsp[(8) - (10)].d)); } - ;} + } break; case 271: -/* Line 1464 of yacc.c */ -#line 3656 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3657 "Gmsh.y" { - ;} + } break; case 272: -/* Line 1464 of yacc.c */ -#line 3659 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3660 "Gmsh.y" { - ;} + } break; case 273: -/* Line 1464 of yacc.c */ -#line 3668 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3669 "Gmsh.y" { ReplaceAllDuplicates(); - ;} + } break; case 274: -/* Line 1464 of yacc.c */ -#line 3672 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3673 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Geometry")) ReplaceAllDuplicates(); @@ -8598,13 +8621,13 @@ yyreduce: else yymsg(0, "Unknown coherence command"); Free((yyvsp[(2) - (3)].c)); - ;} + } break; case 275: -/* Line 1464 of yacc.c */ -#line 3682 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3683 "Gmsh.y" { if(List_Nbr((yyvsp[(4) - (6)].l)) >= 2){ double d; @@ -8633,37 +8656,37 @@ yyreduce: yymsg(0, "Need at least two points to merge"); ReplaceAllDuplicates(); List_Delete((yyvsp[(4) - (6)].l)); - ;} + } break; case 276: -/* Line 1464 of yacc.c */ -#line 3716 "Gmsh.y" - { (yyval.c) = (char*)"Homology"; ;} +/* Line 1806 of yacc.c */ +#line 3717 "Gmsh.y" + { (yyval.c) = (char*)"Homology"; } break; case 277: -/* Line 1464 of yacc.c */ -#line 3717 "Gmsh.y" - { (yyval.c) = (char*)"Cohomology"; ;} +/* Line 1806 of yacc.c */ +#line 3718 "Gmsh.y" + { (yyval.c) = (char*)"Cohomology"; } break; case 278: -/* Line 1464 of yacc.c */ -#line 3722 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3723 "Gmsh.y" { std::vector<int> domain, subdomain; GModel::current()->addHomologyRequest((yyvsp[(1) - (2)].c), domain, subdomain); - ;} + } break; case 279: -/* Line 1464 of yacc.c */ -#line 3727 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3728 "Gmsh.y" { std::vector<int> domain, subdomain; for(int i = 0; i < List_Nbr((yyvsp[(3) - (5)].l)); i++){ @@ -8673,13 +8696,13 @@ yyreduce: } GModel::current()->addHomologyRequest((yyvsp[(1) - (5)].c), domain, subdomain); List_Delete((yyvsp[(3) - (5)].l)); - ;} + } break; case 280: -/* Line 1464 of yacc.c */ -#line 3738 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3739 "Gmsh.y" { std::vector<int> domain, subdomain; for(int i = 0; i < List_Nbr((yyvsp[(3) - (7)].l)); i++){ @@ -8695,501 +8718,501 @@ yyreduce: GModel::current()->addHomologyRequest((yyvsp[(1) - (7)].c), domain, subdomain); List_Delete((yyvsp[(3) - (7)].l)); List_Delete((yyvsp[(5) - (7)].l)); - ;} + } break; case 281: -/* Line 1464 of yacc.c */ -#line 3759 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (1)].d); ;} +/* Line 1806 of yacc.c */ +#line 3760 "Gmsh.y" + { (yyval.d) = (yyvsp[(1) - (1)].d); } break; case 282: -/* Line 1464 of yacc.c */ -#line 3760 "Gmsh.y" - { (yyval.d) = (yyvsp[(2) - (3)].d); ;} +/* Line 1806 of yacc.c */ +#line 3761 "Gmsh.y" + { (yyval.d) = (yyvsp[(2) - (3)].d); } break; case 283: -/* Line 1464 of yacc.c */ -#line 3761 "Gmsh.y" - { (yyval.d) = -(yyvsp[(2) - (2)].d); ;} +/* Line 1806 of yacc.c */ +#line 3762 "Gmsh.y" + { (yyval.d) = -(yyvsp[(2) - (2)].d); } break; case 284: -/* Line 1464 of yacc.c */ -#line 3762 "Gmsh.y" - { (yyval.d) = (yyvsp[(2) - (2)].d); ;} +/* Line 1806 of yacc.c */ +#line 3763 "Gmsh.y" + { (yyval.d) = (yyvsp[(2) - (2)].d); } break; case 285: -/* Line 1464 of yacc.c */ -#line 3763 "Gmsh.y" - { (yyval.d) = !(yyvsp[(2) - (2)].d); ;} +/* Line 1806 of yacc.c */ +#line 3764 "Gmsh.y" + { (yyval.d) = !(yyvsp[(2) - (2)].d); } break; case 286: -/* Line 1464 of yacc.c */ -#line 3764 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d); ;} +/* Line 1806 of yacc.c */ +#line 3765 "Gmsh.y" + { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d); } break; case 287: -/* Line 1464 of yacc.c */ -#line 3765 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d); ;} +/* Line 1806 of yacc.c */ +#line 3766 "Gmsh.y" + { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d); } break; case 288: -/* Line 1464 of yacc.c */ -#line 3766 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d); ;} +/* Line 1806 of yacc.c */ +#line 3767 "Gmsh.y" + { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d); } break; case 289: -/* Line 1464 of yacc.c */ -#line 3768 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3769 "Gmsh.y" { if(!(yyvsp[(3) - (3)].d)) yymsg(0, "Division by zero in '%g / %g'", (yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); else (yyval.d) = (yyvsp[(1) - (3)].d) / (yyvsp[(3) - (3)].d); - ;} + } break; case 290: -/* Line 1464 of yacc.c */ -#line 3774 "Gmsh.y" - { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d); ;} +/* Line 1806 of yacc.c */ +#line 3775 "Gmsh.y" + { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d); } break; case 291: -/* Line 1464 of yacc.c */ -#line 3775 "Gmsh.y" - { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3776 "Gmsh.y" + { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); } break; case 292: -/* Line 1464 of yacc.c */ -#line 3776 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d); ;} +/* Line 1806 of yacc.c */ +#line 3777 "Gmsh.y" + { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d); } break; case 293: -/* Line 1464 of yacc.c */ -#line 3777 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d); ;} +/* Line 1806 of yacc.c */ +#line 3778 "Gmsh.y" + { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d); } break; case 294: -/* Line 1464 of yacc.c */ -#line 3778 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d); ;} +/* Line 1806 of yacc.c */ +#line 3779 "Gmsh.y" + { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d); } break; case 295: -/* Line 1464 of yacc.c */ -#line 3779 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d); ;} +/* Line 1806 of yacc.c */ +#line 3780 "Gmsh.y" + { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d); } break; case 296: -/* Line 1464 of yacc.c */ -#line 3780 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d); ;} +/* Line 1806 of yacc.c */ +#line 3781 "Gmsh.y" + { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d); } break; case 297: -/* Line 1464 of yacc.c */ -#line 3781 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d); ;} +/* Line 1806 of yacc.c */ +#line 3782 "Gmsh.y" + { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d); } break; case 298: -/* Line 1464 of yacc.c */ -#line 3782 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d); ;} +/* Line 1806 of yacc.c */ +#line 3783 "Gmsh.y" + { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d); } break; case 299: -/* Line 1464 of yacc.c */ -#line 3783 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d); ;} +/* Line 1806 of yacc.c */ +#line 3784 "Gmsh.y" + { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d); } break; case 300: -/* Line 1464 of yacc.c */ -#line 3784 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (5)].d) ? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); ;} +/* Line 1806 of yacc.c */ +#line 3785 "Gmsh.y" + { (yyval.d) = (yyvsp[(1) - (5)].d) ? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); } break; case 301: -/* Line 1464 of yacc.c */ -#line 3785 "Gmsh.y" - { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3786 "Gmsh.y" + { (yyval.d) = exp((yyvsp[(3) - (4)].d)); } break; case 302: -/* Line 1464 of yacc.c */ -#line 3786 "Gmsh.y" - { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3787 "Gmsh.y" + { (yyval.d) = log((yyvsp[(3) - (4)].d)); } break; case 303: -/* Line 1464 of yacc.c */ -#line 3787 "Gmsh.y" - { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3788 "Gmsh.y" + { (yyval.d) = log10((yyvsp[(3) - (4)].d)); } break; case 304: -/* Line 1464 of yacc.c */ -#line 3788 "Gmsh.y" - { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3789 "Gmsh.y" + { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); } break; case 305: -/* Line 1464 of yacc.c */ -#line 3789 "Gmsh.y" - { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3790 "Gmsh.y" + { (yyval.d) = sin((yyvsp[(3) - (4)].d)); } break; case 306: -/* Line 1464 of yacc.c */ -#line 3790 "Gmsh.y" - { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3791 "Gmsh.y" + { (yyval.d) = asin((yyvsp[(3) - (4)].d)); } break; case 307: -/* Line 1464 of yacc.c */ -#line 3791 "Gmsh.y" - { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3792 "Gmsh.y" + { (yyval.d) = cos((yyvsp[(3) - (4)].d)); } break; case 308: -/* Line 1464 of yacc.c */ -#line 3792 "Gmsh.y" - { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3793 "Gmsh.y" + { (yyval.d) = acos((yyvsp[(3) - (4)].d)); } break; case 309: -/* Line 1464 of yacc.c */ -#line 3793 "Gmsh.y" - { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3794 "Gmsh.y" + { (yyval.d) = tan((yyvsp[(3) - (4)].d)); } break; case 310: -/* Line 1464 of yacc.c */ -#line 3794 "Gmsh.y" - { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3795 "Gmsh.y" + { (yyval.d) = atan((yyvsp[(3) - (4)].d)); } break; case 311: -/* Line 1464 of yacc.c */ -#line 3795 "Gmsh.y" - { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;} +/* Line 1806 of yacc.c */ +#line 3796 "Gmsh.y" + { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));} break; case 312: -/* Line 1464 of yacc.c */ -#line 3796 "Gmsh.y" - { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3797 "Gmsh.y" + { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); } break; case 313: -/* Line 1464 of yacc.c */ -#line 3797 "Gmsh.y" - { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3798 "Gmsh.y" + { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); } break; case 314: -/* Line 1464 of yacc.c */ -#line 3798 "Gmsh.y" - { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3799 "Gmsh.y" + { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); } break; case 315: -/* Line 1464 of yacc.c */ -#line 3799 "Gmsh.y" - { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3800 "Gmsh.y" + { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); } break; case 316: -/* Line 1464 of yacc.c */ -#line 3800 "Gmsh.y" - { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3801 "Gmsh.y" + { (yyval.d) = floor((yyvsp[(3) - (4)].d)); } break; case 317: -/* Line 1464 of yacc.c */ -#line 3801 "Gmsh.y" - { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3802 "Gmsh.y" + { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); } break; case 318: -/* Line 1464 of yacc.c */ -#line 3802 "Gmsh.y" - { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3803 "Gmsh.y" + { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); } break; case 319: -/* Line 1464 of yacc.c */ -#line 3803 "Gmsh.y" - { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3804 "Gmsh.y" + { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); } break; case 320: -/* Line 1464 of yacc.c */ -#line 3804 "Gmsh.y" - { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3805 "Gmsh.y" + { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); } break; case 321: -/* Line 1464 of yacc.c */ -#line 3805 "Gmsh.y" - { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;} +/* Line 1806 of yacc.c */ +#line 3806 "Gmsh.y" + { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; } break; case 322: -/* Line 1464 of yacc.c */ -#line 3807 "Gmsh.y" - { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3808 "Gmsh.y" + { (yyval.d) = exp((yyvsp[(3) - (4)].d)); } break; case 323: -/* Line 1464 of yacc.c */ -#line 3808 "Gmsh.y" - { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3809 "Gmsh.y" + { (yyval.d) = log((yyvsp[(3) - (4)].d)); } break; case 324: -/* Line 1464 of yacc.c */ -#line 3809 "Gmsh.y" - { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3810 "Gmsh.y" + { (yyval.d) = log10((yyvsp[(3) - (4)].d)); } break; case 325: -/* Line 1464 of yacc.c */ -#line 3810 "Gmsh.y" - { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3811 "Gmsh.y" + { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); } break; case 326: -/* Line 1464 of yacc.c */ -#line 3811 "Gmsh.y" - { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3812 "Gmsh.y" + { (yyval.d) = sin((yyvsp[(3) - (4)].d)); } break; case 327: -/* Line 1464 of yacc.c */ -#line 3812 "Gmsh.y" - { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3813 "Gmsh.y" + { (yyval.d) = asin((yyvsp[(3) - (4)].d)); } break; case 328: -/* Line 1464 of yacc.c */ -#line 3813 "Gmsh.y" - { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3814 "Gmsh.y" + { (yyval.d) = cos((yyvsp[(3) - (4)].d)); } break; case 329: -/* Line 1464 of yacc.c */ -#line 3814 "Gmsh.y" - { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3815 "Gmsh.y" + { (yyval.d) = acos((yyvsp[(3) - (4)].d)); } break; case 330: -/* Line 1464 of yacc.c */ -#line 3815 "Gmsh.y" - { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3816 "Gmsh.y" + { (yyval.d) = tan((yyvsp[(3) - (4)].d)); } break; case 331: -/* Line 1464 of yacc.c */ -#line 3816 "Gmsh.y" - { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3817 "Gmsh.y" + { (yyval.d) = atan((yyvsp[(3) - (4)].d)); } break; case 332: -/* Line 1464 of yacc.c */ -#line 3817 "Gmsh.y" - { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;} +/* Line 1806 of yacc.c */ +#line 3818 "Gmsh.y" + { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));} break; case 333: -/* Line 1464 of yacc.c */ -#line 3818 "Gmsh.y" - { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3819 "Gmsh.y" + { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); } break; case 334: -/* Line 1464 of yacc.c */ -#line 3819 "Gmsh.y" - { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3820 "Gmsh.y" + { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); } break; case 335: -/* Line 1464 of yacc.c */ -#line 3820 "Gmsh.y" - { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3821 "Gmsh.y" + { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); } break; case 336: -/* Line 1464 of yacc.c */ -#line 3821 "Gmsh.y" - { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3822 "Gmsh.y" + { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); } break; case 337: -/* Line 1464 of yacc.c */ -#line 3822 "Gmsh.y" - { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3823 "Gmsh.y" + { (yyval.d) = floor((yyvsp[(3) - (4)].d)); } break; case 338: -/* Line 1464 of yacc.c */ -#line 3823 "Gmsh.y" - { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3824 "Gmsh.y" + { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); } break; case 339: -/* Line 1464 of yacc.c */ -#line 3824 "Gmsh.y" - { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3825 "Gmsh.y" + { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); } break; case 340: -/* Line 1464 of yacc.c */ -#line 3825 "Gmsh.y" - { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3826 "Gmsh.y" + { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); } break; case 341: -/* Line 1464 of yacc.c */ -#line 3826 "Gmsh.y" - { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;} +/* Line 1806 of yacc.c */ +#line 3827 "Gmsh.y" + { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); } break; case 342: -/* Line 1464 of yacc.c */ -#line 3827 "Gmsh.y" - { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;} +/* Line 1806 of yacc.c */ +#line 3828 "Gmsh.y" + { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; } break; case 343: -/* Line 1464 of yacc.c */ -#line 3836 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (1)].d); ;} +/* Line 1806 of yacc.c */ +#line 3837 "Gmsh.y" + { (yyval.d) = (yyvsp[(1) - (1)].d); } break; case 344: -/* Line 1464 of yacc.c */ -#line 3837 "Gmsh.y" - { (yyval.d) = 3.141592653589793; ;} +/* Line 1806 of yacc.c */ +#line 3838 "Gmsh.y" + { (yyval.d) = 3.141592653589793; } break; case 345: -/* Line 1464 of yacc.c */ -#line 3838 "Gmsh.y" - { (yyval.d) = Msg::GetCommRank(); ;} +/* Line 1806 of yacc.c */ +#line 3839 "Gmsh.y" + { (yyval.d) = Msg::GetCommRank(); } break; case 346: -/* Line 1464 of yacc.c */ -#line 3839 "Gmsh.y" - { (yyval.d) = Msg::GetCommSize(); ;} +/* Line 1806 of yacc.c */ +#line 3840 "Gmsh.y" + { (yyval.d) = Msg::GetCommSize(); } break; case 347: -/* Line 1464 of yacc.c */ -#line 3840 "Gmsh.y" - { (yyval.d) = GetGmshMajorVersion(); ;} +/* Line 1806 of yacc.c */ +#line 3841 "Gmsh.y" + { (yyval.d) = GetGmshMajorVersion(); } break; case 348: -/* Line 1464 of yacc.c */ -#line 3841 "Gmsh.y" - { (yyval.d) = GetGmshMinorVersion(); ;} +/* Line 1806 of yacc.c */ +#line 3842 "Gmsh.y" + { (yyval.d) = GetGmshMinorVersion(); } break; case 349: -/* Line 1464 of yacc.c */ -#line 3842 "Gmsh.y" - { (yyval.d) = GetGmshPatchVersion(); ;} +/* Line 1806 of yacc.c */ +#line 3843 "Gmsh.y" + { (yyval.d) = GetGmshPatchVersion(); } break; case 350: -/* Line 1464 of yacc.c */ -#line 3847 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3848 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (1)].c))){ yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (1)].c)); @@ -9205,13 +9228,13 @@ yyreduce: (yyval.d) = s.value[0]; } Free((yyvsp[(1) - (1)].c)); - ;} + } break; case 351: -/* Line 1464 of yacc.c */ -#line 3867 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3868 "Gmsh.y" { char tmpstring[1024]; sprintf(tmpstring, "%s_%d", (yyvsp[(1) - (5)].c), (int)(yyvsp[(4) - (5)].d)) ; @@ -9229,13 +9252,13 @@ yyreduce: (yyval.d) = s.value[0]; } Free((yyvsp[(1) - (5)].c)); - ;} + } break; case 352: -/* Line 1464 of yacc.c */ -#line 3886 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3887 "Gmsh.y" { int index = (int)(yyvsp[(3) - (4)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){ @@ -9252,13 +9275,13 @@ yyreduce: (yyval.d) = s.value[index]; } Free((yyvsp[(1) - (4)].c)); - ;} + } break; case 353: -/* Line 1464 of yacc.c */ -#line 3904 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3905 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(2) - (4)].c))){ yymsg(0, "Unknown variable '%s'", (yyvsp[(2) - (4)].c)); @@ -9269,13 +9292,13 @@ yyreduce: (yyval.d) = s.value.size(); } Free((yyvsp[(2) - (4)].c)); - ;} + } break; case 354: -/* Line 1464 of yacc.c */ -#line 3916 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3917 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (2)].c))){ yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (2)].c)); @@ -9291,13 +9314,13 @@ yyreduce: (yyval.d) = (s.value[0] += (yyvsp[(2) - (2)].i)); } Free((yyvsp[(1) - (2)].c)); - ;} + } break; case 355: -/* Line 1464 of yacc.c */ -#line 3933 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3934 "Gmsh.y" { int index = (int)(yyvsp[(3) - (5)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){ @@ -9314,33 +9337,33 @@ yyreduce: (yyval.d) = (s.value[index] += (yyvsp[(5) - (5)].i)); } Free((yyvsp[(1) - (5)].c)); - ;} + } break; case 356: -/* Line 1464 of yacc.c */ -#line 3954 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3955 "Gmsh.y" { NumberOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), (yyval.d)); Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(3) - (3)].c)); - ;} + } break; case 357: -/* Line 1464 of yacc.c */ -#line 3959 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3960 "Gmsh.y" { NumberOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), (yyval.d)); Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(6) - (6)].c)); - ;} + } break; case 358: -/* Line 1464 of yacc.c */ -#line 3964 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3965 "Gmsh.y" { double d = 0.; if(NumberOption(GMSH_GET, (yyvsp[(1) - (4)].c), 0, (yyvsp[(3) - (4)].c), d)){ @@ -9349,13 +9372,13 @@ yyreduce: (yyval.d) = d; } Free((yyvsp[(1) - (4)].c)); Free((yyvsp[(3) - (4)].c)); - ;} + } break; case 359: -/* Line 1464 of yacc.c */ -#line 3974 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3975 "Gmsh.y" { double d = 0.; if(NumberOption(GMSH_GET, (yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c), d)){ @@ -9364,196 +9387,196 @@ yyreduce: (yyval.d) = d; } Free((yyvsp[(1) - (7)].c)); Free((yyvsp[(6) - (7)].c)); - ;} + } break; case 360: -/* Line 1464 of yacc.c */ -#line 3984 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3985 "Gmsh.y" { (yyval.d) = Msg::GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d)); Free((yyvsp[(3) - (6)].c)); - ;} + } break; case 361: -/* Line 1464 of yacc.c */ -#line 3992 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3993 "Gmsh.y" { memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double)); - ;} + } break; case 362: -/* Line 1464 of yacc.c */ -#line 3996 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 3997 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i]; - ;} + } break; case 363: -/* Line 1464 of yacc.c */ -#line 4000 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4001 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i]; - ;} + } break; case 364: -/* Line 1464 of yacc.c */ -#line 4004 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4005 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i]; - ;} + } break; case 365: -/* Line 1464 of yacc.c */ -#line 4008 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4009 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i]; - ;} + } break; case 366: -/* Line 1464 of yacc.c */ -#line 4015 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4016 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (11)].d); (yyval.v)[1] = (yyvsp[(4) - (11)].d); (yyval.v)[2] = (yyvsp[(6) - (11)].d); (yyval.v)[3] = (yyvsp[(8) - (11)].d); (yyval.v)[4] = (yyvsp[(10) - (11)].d); - ;} + } break; case 367: -/* Line 1464 of yacc.c */ -#line 4019 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4020 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (9)].d); (yyval.v)[1] = (yyvsp[(4) - (9)].d); (yyval.v)[2] = (yyvsp[(6) - (9)].d); (yyval.v)[3] = (yyvsp[(8) - (9)].d); (yyval.v)[4] = 1.0; - ;} + } break; case 368: -/* Line 1464 of yacc.c */ -#line 4023 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4024 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (7)].d); (yyval.v)[1] = (yyvsp[(4) - (7)].d); (yyval.v)[2] = (yyvsp[(6) - (7)].d); (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0; - ;} + } break; case 369: -/* Line 1464 of yacc.c */ -#line 4027 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4028 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (7)].d); (yyval.v)[1] = (yyvsp[(4) - (7)].d); (yyval.v)[2] = (yyvsp[(6) - (7)].d); (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0; - ;} + } break; case 370: -/* Line 1464 of yacc.c */ -#line 4034 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4035 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(List_T*)); List_Add((yyval.l), &((yyvsp[(1) - (1)].l))); - ;} + } break; case 371: -/* Line 1464 of yacc.c */ -#line 4039 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4040 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].l))); - ;} + } break; case 372: -/* Line 1464 of yacc.c */ -#line 4046 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4047 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); - ;} + } break; case 373: -/* Line 1464 of yacc.c */ -#line 4051 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4052 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); - ;} + } break; case 374: -/* Line 1464 of yacc.c */ -#line 4055 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4056 "Gmsh.y" { // creates an empty list (yyval.l) = List_Create(2, 1, sizeof(double)); - ;} + } break; case 375: -/* Line 1464 of yacc.c */ -#line 4060 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4061 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); - ;} + } break; case 376: -/* Line 1464 of yacc.c */ -#line 4064 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4065 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (4)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ double *pd = (double*)List_Pointer((yyval.l), i); (*pd) = - (*pd); } - ;} + } break; case 377: -/* Line 1464 of yacc.c */ -#line 4072 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4073 "Gmsh.y" { (yyval.l) = (yyvsp[(4) - (5)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ double *pd = (double*)List_Pointer((yyval.l), i); (*pd) *= (yyvsp[(1) - (5)].d); } - ;} + } break; case 378: -/* Line 1464 of yacc.c */ -#line 4083 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4084 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); - ;} + } break; case 379: -/* Line 1464 of yacc.c */ -#line 4087 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4088 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "*") || !strcmp((yyvsp[(1) - (1)].c), "all")) (yyval.l) = 0; @@ -9561,51 +9584,51 @@ yyreduce: yyerror("Unknown special string for list replacement"); (yyval.l) = List_Create(2, 1, sizeof(double)); } - ;} + } break; case 380: -/* Line 1464 of yacc.c */ -#line 4099 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4100 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ double *pd = (double*)List_Pointer((yyval.l), i); (*pd) = - (*pd); } - ;} + } break; case 381: -/* Line 1464 of yacc.c */ -#line 4107 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4108 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (3)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ double *pd = (double*)List_Pointer((yyval.l), i); (*pd) *= (yyvsp[(1) - (3)].d); } - ;} + } break; case 382: -/* Line 1464 of yacc.c */ -#line 4115 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4116 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); for(double d = (yyvsp[(1) - (3)].d); ((yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d)) ? (d <= (yyvsp[(3) - (3)].d)) : (d >= (yyvsp[(3) - (3)].d)); ((yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d)) ? (d += 1.) : (d -= 1.)) List_Add((yyval.l), &d); - ;} + } break; case 383: -/* Line 1464 of yacc.c */ -#line 4122 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4123 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!(yyvsp[(5) - (5)].d) || ((yyvsp[(1) - (5)].d) < (yyvsp[(3) - (5)].d) && (yyvsp[(5) - (5)].d) < 0) || ((yyvsp[(1) - (5)].d) > (yyvsp[(3) - (5)].d) && (yyvsp[(5) - (5)].d) > 0)){ @@ -9615,13 +9638,13 @@ yyreduce: else for(double d = (yyvsp[(1) - (5)].d); ((yyvsp[(5) - (5)].d) > 0) ? (d <= (yyvsp[(3) - (5)].d)) : (d >= (yyvsp[(3) - (5)].d)); d += (yyvsp[(5) - (5)].d)) List_Add((yyval.l), &d); - ;} + } break; case 384: -/* Line 1464 of yacc.c */ -#line 4133 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4134 "Gmsh.y" { // Returns the coordinates of a point and fills a list with it. // This allows to ensure e.g. that relative point positions are @@ -9640,49 +9663,49 @@ yyreduce: List_Add((yyval.l), &v->Pos.Y); List_Add((yyval.l), &v->Pos.Z); } - ;} + } break; case 385: -/* Line 1464 of yacc.c */ -#line 4153 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4154 "Gmsh.y" { (yyval.l) = GetAllEntityNumbers(0); - ;} + } break; case 386: -/* Line 1464 of yacc.c */ -#line 4157 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4158 "Gmsh.y" { (yyval.l) = GetAllEntityNumbers(1); - ;} + } break; case 387: -/* Line 1464 of yacc.c */ -#line 4161 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4162 "Gmsh.y" { (yyval.l) = GetAllEntityNumbers(2); - ;} + } break; case 388: -/* Line 1464 of yacc.c */ -#line 4165 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4166 "Gmsh.y" { (yyval.l) = GetAllEntityNumbers(3); - ;} + } break; case 389: -/* Line 1464 of yacc.c */ -#line 4169 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4170 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){ @@ -9691,13 +9714,13 @@ yyreduce: List_Add((yyval.l), &d); } List_Delete((yyvsp[(1) - (1)].l)); - ;} + } break; case 390: -/* Line 1464 of yacc.c */ -#line 4179 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4180 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){ @@ -9706,13 +9729,13 @@ yyreduce: List_Add((yyval.l), &d); } List_Delete((yyvsp[(1) - (1)].l)); - ;} + } break; case 391: -/* Line 1464 of yacc.c */ -#line 4189 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4190 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c))) @@ -9723,13 +9746,13 @@ yyreduce: List_Add((yyval.l), &s.value[i]); } Free((yyvsp[(1) - (3)].c)); - ;} + } break; case 392: -/* Line 1464 of yacc.c */ -#line 4201 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4202 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(3) - (4)].c))) @@ -9740,13 +9763,13 @@ yyreduce: List_Add((yyval.l), &s.value[i]); } Free((yyvsp[(3) - (4)].c)); - ;} + } break; case 393: -/* Line 1464 of yacc.c */ -#line 4213 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4214 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c))) @@ -9763,41 +9786,41 @@ yyreduce: } Free((yyvsp[(1) - (6)].c)); List_Delete((yyvsp[(4) - (6)].l)); - ;} + } break; case 394: -/* Line 1464 of yacc.c */ -#line 4234 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4235 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); - ;} + } break; case 395: -/* Line 1464 of yacc.c */ -#line 4239 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4240 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); - ;} + } break; case 396: -/* Line 1464 of yacc.c */ -#line 4243 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4244 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].d))); - ;} + } break; case 397: -/* Line 1464 of yacc.c */ -#line 4247 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4248 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){ double d; @@ -9805,64 +9828,64 @@ yyreduce: List_Add((yyval.l), &d); } List_Delete((yyvsp[(3) - (3)].l)); - ;} + } break; case 398: -/* Line 1464 of yacc.c */ -#line 4259 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4260 "Gmsh.y" { (yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (9)].d), (int)(yyvsp[(4) - (9)].d), (int)(yyvsp[(6) - (9)].d), (int)(yyvsp[(8) - (9)].d)); - ;} + } break; case 399: -/* Line 1464 of yacc.c */ -#line 4263 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4264 "Gmsh.y" { (yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (7)].d), (int)(yyvsp[(4) - (7)].d), (int)(yyvsp[(6) - (7)].d), 255); - ;} + } break; case 400: -/* Line 1464 of yacc.c */ -#line 4275 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4276 "Gmsh.y" { int flag; (yyval.u) = GetColorForString(-1, (yyvsp[(1) - (1)].c), &flag); if(flag) yymsg(0, "Unknown color '%s'", (yyvsp[(1) - (1)].c)); Free((yyvsp[(1) - (1)].c)); - ;} + } break; case 401: -/* Line 1464 of yacc.c */ -#line 4282 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4283 "Gmsh.y" { unsigned int val = 0; ColorOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(5) - (5)].c), val); (yyval.u) = val; Free((yyvsp[(1) - (5)].c)); Free((yyvsp[(5) - (5)].c)); - ;} + } break; case 402: -/* Line 1464 of yacc.c */ -#line 4292 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4293 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); - ;} + } break; case 403: -/* Line 1464 of yacc.c */ -#line 4296 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4297 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); GmshColorTable *ct = GetColorTable((int)(yyvsp[(3) - (6)].d)); @@ -9873,41 +9896,41 @@ yyreduce: List_Add((yyval.l), &ct->table[i]); } Free((yyvsp[(1) - (6)].c)); - ;} + } break; case 404: -/* Line 1464 of yacc.c */ -#line 4311 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4312 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); List_Add((yyval.l), &((yyvsp[(1) - (1)].u))); - ;} + } break; case 405: -/* Line 1464 of yacc.c */ -#line 4316 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4317 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].u))); - ;} + } break; case 406: -/* Line 1464 of yacc.c */ -#line 4323 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4324 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); - ;} + } break; case 407: -/* Line 1464 of yacc.c */ -#line 4327 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4328 "Gmsh.y" { if(!gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))){ yymsg(0, "Unknown string variable '%s'", (yyvsp[(1) - (1)].c)); @@ -9919,100 +9942,100 @@ yyreduce: strcpy((yyval.c), val.c_str()); Free((yyvsp[(1) - (1)].c)); } - ;} + } break; case 408: -/* Line 1464 of yacc.c */ -#line 4340 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4341 "Gmsh.y" { std::string out; StringOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), out); (yyval.c) = (char*)Malloc((out.size() + 1) * sizeof(char)); strcpy((yyval.c), out.c_str()); Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(3) - (3)].c)); - ;} + } break; case 409: -/* Line 1464 of yacc.c */ -#line 4348 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4349 "Gmsh.y" { std::string out; StringOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), out); (yyval.c) = (char*)Malloc((out.size() + 1) * sizeof(char)); strcpy((yyval.c), out.c_str()); Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(6) - (6)].c)); - ;} + } break; case 410: -/* Line 1464 of yacc.c */ -#line 4359 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4360 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); - ;} + } break; case 411: -/* Line 1464 of yacc.c */ -#line 4363 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4364 "Gmsh.y" { (yyval.c) = (char *)Malloc(32 * sizeof(char)); time_t now; time(&now); strcpy((yyval.c), ctime(&now)); (yyval.c)[strlen((yyval.c)) - 1] = '\0'; - ;} + } break; case 412: -/* Line 1464 of yacc.c */ -#line 4371 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4372 "Gmsh.y" { const char *env = GetEnvironmentVar((yyvsp[(3) - (4)].c)); if(!env) env = ""; (yyval.c) = (char *)Malloc((sizeof(env) + 1) * sizeof(char)); strcpy((yyval.c), env); Free((yyvsp[(3) - (4)].c)); - ;} + } break; case 413: -/* Line 1464 of yacc.c */ -#line 4379 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4380 "Gmsh.y" { std::string s = Msg::GetString((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c)); (yyval.c) = (char *)Malloc((s.size() + 1) * sizeof(char)); strcpy((yyval.c), s.c_str()); Free((yyvsp[(3) - (6)].c)); Free((yyvsp[(5) - (6)].c)); - ;} + } break; case 414: -/* Line 1464 of yacc.c */ -#line 4387 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4388 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (6)].c)) + strlen((yyvsp[(5) - (6)].c)) + 1) * sizeof(char)); strcpy((yyval.c), (yyvsp[(3) - (6)].c)); strcat((yyval.c), (yyvsp[(5) - (6)].c)); Free((yyvsp[(3) - (6)].c)); Free((yyvsp[(5) - (6)].c)); - ;} + } break; case 415: -/* Line 1464 of yacc.c */ -#line 4395 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4396 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); int i; @@ -10025,13 +10048,13 @@ yyreduce: } if(i <= 0) strcpy((yyval.c), (yyvsp[(3) - (4)].c)); Free((yyvsp[(3) - (4)].c)); - ;} + } break; case 416: -/* Line 1464 of yacc.c */ -#line 4409 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4410 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); int i; @@ -10044,22 +10067,22 @@ yyreduce: else strcpy((yyval.c), &(yyvsp[(3) - (4)].c)[i+1]); Free((yyvsp[(3) - (4)].c)); - ;} + } break; case 417: -/* Line 1464 of yacc.c */ -#line 4423 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4424 "Gmsh.y" { (yyval.c) = (yyvsp[(3) - (4)].c); - ;} + } break; case 418: -/* Line 1464 of yacc.c */ -#line 4427 "Gmsh.y" +/* Line 1806 of yacc.c */ +#line 4428 "Gmsh.y" { char tmpstring[1024]; int i = PrintListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring); @@ -10077,15 +10100,26 @@ yyreduce: Free((yyvsp[(3) - (6)].c)); } List_Delete((yyvsp[(5) - (6)].l)); - ;} + } break; -/* Line 1464 of yacc.c */ -#line 10087 "Gmsh.tab.cpp" +/* Line 1806 of yacc.c */ +#line 10110 "Gmsh.tab.cpp" default: break; } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); @@ -10113,6 +10147,10 @@ yyreduce: | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { @@ -10120,37 +10158,36 @@ yyerrlab: #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); - } - else - { - yyerror (YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; } +# undef YYSYNTAX_ERROR #endif } @@ -10209,7 +10246,7 @@ yyerrlab1: for (;;) { yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) + if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) @@ -10268,8 +10305,13 @@ yyexhaustedlab: yyreturn: if (yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + } /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); @@ -10294,8 +10336,8 @@ yyreturn: -/* Line 1684 of yacc.c */ -#line 4447 "Gmsh.y" +/* Line 2067 of yacc.c */ +#line 4448 "Gmsh.y" int PrintListOfDouble(char *format, List_T *list, char *buffer) diff --git a/Parser/Gmsh.tab.hpp b/Parser/Gmsh.tab.hpp index 952f0edd33f76cefdfc8e34db2aea90319c9f25d..1a1e6ff6d2f5237e2b93ac6c82c39e1ceae87f28 100644 --- a/Parser/Gmsh.tab.hpp +++ b/Parser/Gmsh.tab.hpp @@ -1,9 +1,8 @@ -/* A Bison parser, made by GNU Bison 2.4.3. */ +/* A Bison parser, made by GNU Bison 2.5. */ -/* Skeleton interface for Bison's Yacc-like parsers in C +/* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2011 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 @@ -183,7 +182,7 @@ typedef union YYSTYPE { -/* Line 1685 of yacc.c */ +/* Line 2068 of yacc.c */ #line 92 "Gmsh.y" char *c; @@ -196,8 +195,8 @@ typedef union YYSTYPE -/* Line 1685 of yacc.c */ -#line 201 "Gmsh.tab.hpp" +/* Line 2068 of yacc.c */ +#line 200 "Gmsh.tab.hpp" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index 6d22edbf70bff851dbe6cb0f1536e5de373a6f1f..dbda010127584d650e7f4bcd7285c657b74e6429 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -980,7 +980,7 @@ Affectation : if(field){ FieldOption *option = field->options[$6]; if(option){ - try { option->string() = $8; } + try { option->string($8); } catch (...){ yymsg(0, "Cannot assign a string value to option '%s' " "in field %i of type '%s'", $6, (int)$3, field->getName()); @@ -1003,13 +1003,14 @@ Affectation : if(field){ FieldOption *option = field->options[$6]; if(option){ - std::list<int> &vl = option->list(); + std::list<int> vl = option->list(); vl.clear(); for(int i = 0; i < List_Nbr($9); i++){ double id; List_Read($9, i, &id); vl.push_back((int)id); } + option->list(vl); } else yymsg(0, "Unknown option '%s' in field %i of type '%s'", diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp index eee6cc4d2a46e92234b0d9da1fbb00f3d393d65e..8f44d0c6f0e2f3a1cc4401c9addaed30491ce93f 100644 --- a/Parser/Gmsh.yy.cpp +++ b/Parser/Gmsh.yy.cpp @@ -73,7 +73,6 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -104,6 +103,8 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif +#endif /* ! C99 */ + #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -160,7 +161,15 @@ typedef unsigned int flex_uint32_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -172,12 +181,7 @@ typedef unsigned int flex_uint32_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -extern yy_size_t gmsh_yyleng; +extern int gmsh_yyleng; extern FILE *gmsh_yyin, *gmsh_yyout; @@ -203,6 +207,11 @@ extern FILE *gmsh_yyin, *gmsh_yyout; #define unput(c) yyunput( c, (yytext_ptr) ) +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -220,7 +229,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -290,8 +299,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* yy_hold_char holds the character lost when gmsh_yytext is formed. */ static char yy_hold_char; -static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ -yy_size_t gmsh_yyleng; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int gmsh_yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; @@ -319,7 +328,7 @@ static void gmsh_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); YY_BUFFER_STATE gmsh_yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE gmsh_yy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE gmsh_yy_scan_bytes (yyconst char *bytes,yy_size_t len ); +YY_BUFFER_STATE gmsh_yy_scan_bytes (yyconst char *bytes,int len ); void *gmsh_yyalloc (yy_size_t ); void *gmsh_yyrealloc (void *,yy_size_t ); @@ -950,7 +959,7 @@ void skipline(void); #define YY_NO_UNISTD_H #endif -#line 954 "Gmsh.yy.cpp" +#line 963 "Gmsh.yy.cpp" #define INITIAL 0 @@ -989,7 +998,7 @@ FILE *gmsh_yyget_out (void ); void gmsh_yyset_out (FILE * out_str ); -yy_size_t gmsh_yyget_leng (void ); +int gmsh_yyget_leng (void ); char *gmsh_yyget_text (void ); @@ -1031,7 +1040,12 @@ static int input (void ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -1039,7 +1053,7 @@ static int input (void ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO fwrite( gmsh_yytext, gmsh_yyleng, 1, gmsh_yyout ) +#define ECHO do { if (fwrite( gmsh_yytext, gmsh_yyleng, 1, gmsh_yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -1050,7 +1064,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - yy_size_t n; \ + size_t n; \ for ( n = 0; n < max_size && \ (c = getc( gmsh_yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1135,7 +1149,7 @@ YY_DECL #line 49 "Gmsh.l" -#line 1139 "Gmsh.yy.cpp" +#line 1153 "Gmsh.yy.cpp" if ( !(yy_init) ) { @@ -2005,7 +2019,7 @@ YY_RULE_SETUP #line 234 "Gmsh.l" ECHO; YY_BREAK -#line 2009 "Gmsh.yy.cpp" +#line 2023 "Gmsh.yy.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2191,7 +2205,7 @@ static int yy_get_next_buffer (void) else { - yy_size_t num_to_read = + int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -2205,7 +2219,7 @@ static int yy_get_next_buffer (void) if ( b->yy_is_our_buffer ) { - yy_size_t new_size = b->yy_buf_size * 2; + int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -2236,7 +2250,7 @@ static int yy_get_next_buffer (void) /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); + (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -2346,7 +2360,7 @@ static int yy_get_next_buffer (void) if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - register yy_size_t number_to_move = (yy_n_chars) + 2; + register int number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = @@ -2395,7 +2409,7 @@ static int yy_get_next_buffer (void) else { /* need more input */ - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -2419,7 +2433,7 @@ static int yy_get_next_buffer (void) case EOB_ACT_END_OF_FILE: { if ( gmsh_yywrap( ) ) - return 0; + return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; @@ -2671,7 +2685,7 @@ void gmsh_yypop_buffer_state (void) */ static void gmsh_yyensure_buffer_stack (void) { - yy_size_t num_to_alloc; + int num_to_alloc; if (!(yy_buffer_stack)) { @@ -2763,16 +2777,17 @@ YY_BUFFER_STATE gmsh_yy_scan_string (yyconst char * yystr ) /** Setup the input buffer state to scan the given bytes. The next call to gmsh_yylex() will * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE gmsh_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) +YY_BUFFER_STATE gmsh_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; - yy_size_t n, i; + yy_size_t n; + int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; @@ -2854,7 +2869,7 @@ FILE *gmsh_yyget_out (void) /** Get the length of the current token. * */ -yy_size_t gmsh_yyget_leng (void) +int gmsh_yyget_leng (void) { return gmsh_yyleng; } diff --git a/wrappers/gmshpy/gmshMesh.i b/wrappers/gmshpy/gmshMesh.i index a9dad57478ff569aeb5de314c14157f007c18ec9..20462c7a32a055dad695519e5e1e91e08cf757d6 100644 --- a/wrappers/gmshpy/gmshMesh.i +++ b/wrappers/gmshpy/gmshMesh.i @@ -1,6 +1,7 @@ %feature("autodoc", "1"); %module gmshMesh %include std_string.i +%include std_list.i %{ #include "GmshConfig.h" @@ -14,8 +15,8 @@ #if defined(HAVE_METIS) || defined(HAVE_CHACO) #include "meshPartition.h" #endif - #include "meshMetric.h" #include "Field.h" + #include "meshMetric.h" #include "CenterlineField.h" #include "simple3D.h" #include "Voronoi3D.h" @@ -26,8 +27,10 @@ %} %include std_vector.i +%include std_map.i namespace std { %template(DoubleVector) vector<double, std::allocator<double> >; + %template(IntList) list<int>; } %include "GmshConfig.h" @@ -41,8 +44,8 @@ namespace std { #if defined(HAVE_METIS) || defined(HAVE_CHACO) %include "meshPartition.h" #endif -%include "meshMetric.h" %include "Field.h" +%include "meshMetric.h" %include "CenterlineField.h" %include "simple3D.h" %include "Voronoi3D.h"