diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp
index 621d11fd051fe0b093dac5af766685e608b61d25..a1911a28d35594a698930f9ecacc68e2aea5310b 100644
--- a/Parser/Gmsh.tab.cpp
+++ b/Parser/Gmsh.tab.cpp
@@ -892,7 +892,7 @@ static const yytype_int16 yyrhs[] =
      139,     6,    -1,    70,     6,    -1,    77,   131,   201,   132,
        7,   206,    62,   201,     6,    -1,    -1,    62,     4,   201,
       -1,    -1,     4,    -1,    -1,     7,   206,    -1,    -1,     7,
-     201,    -1,    58,    46,   206,     7,   201,   194,     6,    -1,
+     201,    -1,    58,    46,   207,     7,   201,   194,     6,    -1,
       58,    49,   207,   196,   195,     6,    -1,    55,    49,   138,
      201,   139,     7,   206,     6,    -1,    58,    51,   207,   196,
        6,    -1,    70,    49,   207,   197,     6,    -1,    71,    49,
@@ -988,21 +988,21 @@ static const yytype_uint16 yyrline[] =
     2255,  2262,  2269,  2277,  2276,  2288,  2287,  2299,  2298,  2310,
     2309,  2321,  2320,  2332,  2331,  2343,  2342,  2354,  2353,  2365,
     2364,  2379,  2382,  2388,  2397,  2417,  2440,  2444,  2468,  2471,
-    2487,  2490,  2503,  2506,  2512,  2515,  2522,  2551,  2621,  2626,
-    2693,  2736,  2762,  2785,  2808,  2811,  2820,  2824,  2840,  2841,
-    2842,  2843,  2844,  2845,  2846,  2847,  2848,  2855,  2856,  2857,
-    2858,  2859,  2860,  2861,  2862,  2863,  2864,  2865,  2866,  2867,
-    2868,  2869,  2870,  2871,  2872,  2873,  2874,  2875,  2876,  2877,
-    2878,  2879,  2880,  2881,  2882,  2883,  2884,  2885,  2886,  2888,
-    2889,  2890,  2891,  2892,  2893,  2894,  2895,  2896,  2897,  2898,
-    2899,  2900,  2901,  2902,  2903,  2904,  2905,  2906,  2907,  2908,
-    2917,  2918,  2919,  2920,  2921,  2922,  2923,  2927,  2940,  2952,
-    2967,  2977,  2987,  3005,  3010,  3015,  3025,  3035,  3043,  3047,
-    3051,  3055,  3059,  3066,  3070,  3074,  3078,  3085,  3090,  3097,
-    3102,  3106,  3111,  3115,  3123,  3134,  3138,  3150,  3158,  3166,
-    3173,  3184,  3204,  3214,  3224,  3234,  3254,  3259,  3263,  3267,
-    3279,  3283,  3295,  3302,  3312,  3316,  3331,  3336,  3343,  3347,
-    3360,  3368,  3379,  3383,  3391,  3399,  3413,  3427,  3431
+    2487,  2490,  2503,  2506,  2512,  2515,  2522,  2576,  2646,  2651,
+    2718,  2761,  2787,  2810,  2833,  2836,  2845,  2849,  2865,  2866,
+    2867,  2868,  2869,  2870,  2871,  2872,  2873,  2880,  2881,  2882,
+    2883,  2884,  2885,  2886,  2887,  2888,  2889,  2890,  2891,  2892,
+    2893,  2894,  2895,  2896,  2897,  2898,  2899,  2900,  2901,  2902,
+    2903,  2904,  2905,  2906,  2907,  2908,  2909,  2910,  2911,  2913,
+    2914,  2915,  2916,  2917,  2918,  2919,  2920,  2921,  2922,  2923,
+    2924,  2925,  2926,  2927,  2928,  2929,  2930,  2931,  2932,  2933,
+    2942,  2943,  2944,  2945,  2946,  2947,  2948,  2952,  2965,  2977,
+    2992,  3002,  3012,  3030,  3035,  3040,  3050,  3060,  3068,  3072,
+    3076,  3080,  3084,  3091,  3095,  3099,  3103,  3110,  3115,  3122,
+    3127,  3131,  3136,  3140,  3148,  3159,  3163,  3175,  3183,  3191,
+    3198,  3209,  3229,  3239,  3249,  3259,  3279,  3284,  3288,  3292,
+    3304,  3308,  3320,  3327,  3337,  3341,  3356,  3361,  3368,  3372,
+    3385,  3393,  3404,  3408,  3416,  3424,  3438,  3452,  3456
 };
 #endif
 
@@ -1194,7 +1194,7 @@ static const yytype_uint16 yydefact[] =
      143,   107,     0,     0,     0,     0,   297,     0,     0,   332,
      333,   336,   337,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,   319,     0,   320,
-       0,     0,     0,     0,     0,     0,   326,   325,   212,   212,
+       0,     0,     0,     0,     0,   326,   325,     0,   212,   212,
        0,     0,     0,     0,     0,     0,     0,     0,   310,   309,
        0,     0,     0,     0,   127,   127,     0,     0,     0,     0,
        0,     0,     0,   172,     0,   127,   214,     0,     0,     0,
@@ -1297,7 +1297,7 @@ static const yytype_int16 yydefgoto[] =
      280,   281,    66,    67,    68,    69,    70,   310,   719,  1146,
     1192,   543,  1010,  1013,  1016,  1161,  1165,  1169,  1201,  1204,
     1207,   715,   716,   814,   694,   520,   547,    72,    73,    74,
-     327,   130,   348,   173,   860,   861,   338,   329,   313,   198,
+     327,   130,   348,   173,   860,   861,   337,   329,   313,   198,
      649,   777,   443,   444
 };
 
@@ -1306,144 +1306,144 @@ static const yytype_int16 yydefgoto[] =
 #define YYPACT_NINF -1014
 static const yytype_int16 yypact[] =
 {
-    2725,    53,    33,  2801, -1014, -1014,  1281,    90,   103,    -9,
-      21,   180,   -84,    65,    71,    62,    79,   130,   -32,   137,
-     166,   251,   -48,   264,   273,   280,    -8,   310,   418,   318,
-     256,   244,   242,   242,   257,   268,   354,   361,   369,    25,
-     253,   375,   437,   446,   453,   334,   341,   347,    -2,    40,
-   -1014,   351, -1014,   497,   371, -1014,   503,   514,    15,    19,
+    2725,    50,    78,  2801, -1014, -1014,  1281,    46,    33,   -58,
+      21,    97,  -105,    -9,    55,    62,    65,    71,   -32,    79,
+     130,    99,   -48,   219,   248,   255,    -8,   262,   418,   273,
+     198,   223,   242,   242,   240,   268,   318,   333,   341,    25,
+     253,   349,   399,   406,   411,   290,   310,   319,    -2,    40,
+   -1014,   326, -1014,   459,   339, -1014,   499,   503,    15,    19,
    -1014, -1014, -1014, -1014, -1014, -1014, -1014, -1014, -1014, -1014,
-   -1014, -1014, -1014, -1014, -1014, -1014,    27,   383,   616, -1014,
-   -1014, -1014,    59,   141,   176,   245,   359,   362,   398,   408,
-     415,   449,   471,   475,   478,   500,   508,   511,   565,   570,
-     574,   604,   614,   405,   421,   425,   464, -1014,   542,   465,
+   -1014, -1014, -1014, -1014, -1014, -1014,    27,   340,   616, -1014,
+   -1014, -1014,    59,   141,   176,   359,   362,   398,   408,   415,
+     449,   473,   478,   500,   508,   511,   565,   570,   574,   604,
+     614,   625,   633,   351,   373,   387,   390, -1014,   529,   421,
    -1014, -1014, -1014, -1014, -1014, -1014, -1014,  2254,  2254,  2254,
-   -1014, -1014,  2254,  1886,    28,   608,    35,  2254,   626,   547,
-   -1014,   637,   644,  2254,   617, -1014,  2254, -1014,  2254,  2187,
-    2254,  2254,   525,  2254,  2187,  2254,  2254,   555,  2187,  2254,
-    2254,  1459,   556,  2254,   566,   569,   578,  1459,  1329,  1329,
-     579,   584,   591,   603,   618,   652,   757,   242,   242,   242,
-    2254,  2254,   -71, -1014,    63,   242,   633,   642,   651,  2057,
-     416,  1329,  1459,   677,    36,   679, -1014,   810, -1014,   686,
-     761,   762,   821,  2254,  2254,  2254,   699,  2254,   711,   765,
-    2254,  2254, -1014,  2254,   890, -1014,   893, -1014,   894, -1014,
-     768,  2254,   899,   766, -1014, -1014, -1014,   900,  2254,  2254,
+   -1014, -1014,  2254,  1886,    28,   545,    35,  2254,   550,   547,
+   -1014,   602,   606,  2254,   617, -1014,  2254, -1014,  2254,  2187,
+    2254,  2254,   501,  2254,  2187,  2254,  2254,   512,  2187,  2254,
+    2254,  1459,   519,  2254,   518,   555,   556,  1329,  1329,  1329,
+     569,   573,   578,   579,   584,   591,   745,   242,   242,   242,
+    2254,  2254,   -71, -1014,    63,   242,   596,   623,   642,  2057,
+     416,  1329,  1459,   640,    36,   650, -1014,   783, -1014,   670,
+     679,   683,   818,  2254,  2254,  2254,   692,  2254,   696,   756,
+    2254,  2254, -1014,  2254,   852, -1014,   889, -1014,   894, -1014,
+     770,  2254,   900,   767, -1014, -1014, -1014,   901,  2254,  2254,
     2254,  2254,  2254,  2254,  2254,  2254,  2254,  2254,  2254,  2254,
     2254,  2254,  2254,  2254,  2254,  2254,  2254,  2254,  2254,  2254,
     2254,  2254,  2254,  2254,  2254,  2254,  2254,  2254,  2254,  2254,
     2254,  2254,  2254,  2254,  2254,  2254,  2254,  2254,  2254,  2254,
-     588,   588,   588,   588,  2254,   902,   470,   775,   775,   775,
-    5032,     9,  2187,  4296,   167,   773,   906,   776,   777, -1014,
-     778,  2865,  1652, -1014, -1014,  2254,  2254,  2254,  2254,  2254,
+     588,   588,   588,   588,  2254,   903,   470,   776,   776,   776,
+    5032,     9,  2187,  4296,   167,   774,   906,   782,   778, -1014,
+     779,  2865,  1652, -1014, -1014,  2254,  2254,  2254,  2254,  2254,
     2254,  2254,  2254,  2254,  2254,  2254,  2254,  2254,  2254,  2254,
-   -1014, -1014,  1980,  -114,  3542,  5053,   -59,   780,  2187, -1014,
-   -1014,  2499, -1014,   619,  5074,  5095,  2254,  5116,   627,  5137,
-    5158,  2254,   628,  5179,  5200,  1589,  1144,  2521,   909, -1014,
-    2254,  5221,  2254,  2254,  2254,   912, -1014, -1014,   914,   914,
-    2254,  2311,  2311,  2311,  2311,  2254,   790,   364, -1014, -1014,
+   -1014, -1014,  1980,  -114,  3542,  5053,   -59,   781,  2187, -1014,
+   -1014,  2499, -1014,   628,  5074,  5095,  2254,  5116,   631,  5137,
+    5158,  2254,   639,  5179,  5200,  1589,  1144,  2521,   910, -1014,
+    2254,  5221,  2254,  2254,  2254, -1014, -1014,   914,   915,   915,
+    2254,  2311,  2311,  2311,  2311,  2254,   791,   364, -1014, -1014,
     3568,  3594,   242,   242,    35,    35,   452,  2254,  2254,  2254,
-    2057,  2057,  2254,  2865,   454, -1014,   916,   917,  2254,   920,
+    2057,  2057,  2254,  2865,   454, -1014,   917,   919,  2254,   921,
    -1014,  2254,  2254,   750, -1014,  2187,  2254,  2254, -1014,  5242,
-    5263,  5284,   837,  3620, -1014,   791,  2540,  5305,  4319, -1014,
+    5263,  5284,   839,  3620, -1014,   792,  2540,  5305,  4319, -1014,
    -1014,   944, -1014,  1054,  2254,  4342,   213,  2254,    11, -1014,
     5326,  4365,  5347,  4388,  5368,  4411,  5389,  4434,  5410,  4457,
     5431,  4480,  5452,  4503,  5473,  4526,  5494,  4549,  5515,  4572,
     5536,  4595,  3646,  3672,  5557,  4618,  5578,  4641,  5599,  4664,
     5620,  4687,  5641,  4710,  5662,  4733,  3698,  3724,  3750,  3776,
-    3802,  3828,   635,   -55, -1014,   793,   799,   800,  2000,   797,
-    2254, -1014,  1459,  1459,   639,   314,   616,  2254,   929,   933,
-      13,   805, -1014,   -82,   129,   -12,    73, -1014, -1014,  2560,
-    1307,  1002,   763,   763,   630,   630,   630,   630,   -52,   -52,
-     775,   775,   775,   775, -1014,     7,  2187,  2254,   934,  2022,
-    2254,   775, -1014,  2254,  2187,  2187,   847,   935,   936,  5683,
-     937,   852,   940,   941,  5704,   856,   945,   946,  2187, -1014,
-     640,  1719,  2254,  5725,   948,  2628,  5746,  5767,  2254,  1459,
-     954,   955,  5788,   828,  6061, -1014,   831,   833,   835,  5809,
-     834,   242,  2254,  2254, -1014, -1014,   829,   836,  2254,  3854,
+    3802,  3828,   644,   -60, -1014,   794,   800,   802,  2000,   798,
+    2254, -1014,  1459,  1459,   649,   314,   616,  2254,   931,   935,
+      13,   806, -1014,   -84,   129,   -12,    73, -1014, -1014,  2560,
+    1307,  1002,   763,   763,   630,   630,   630,   630,   251,   251,
+     776,   776,   776,   776, -1014,     7,  2187,  2254,   934,  2022,
+    2254,   776, -1014,  2254,  2187,  2187,   849,   936,   937,  5683,
+     938,   854,   941,   942,  5704,   859,   946,   948,  2187, -1014,
+     653,  1719,  2254,  5725,   951,  2628,  5746,  5767,  2254,  1459,
+     956,   955,  5788,   831,  6061, -1014,   833,   835,   836,  5809,
+     834,   242,  2254,  2254, -1014, -1014,   837,   838,  2254,  3854,
     3880,  3906,  3516,    38,   242,  1177,  2254,   964,  2254,  5830,
-   -1014,  4756,  4779, -1014,   649,  4802,  4825,   965,   966,   967,
-     841,  2254,  1492,  2254,  2254, -1014,    14, -1014, -1014,  4848,
-      48, -1014,  2900, -1014,   846,   849,   840, -1014,   975, -1014,
+   -1014,  4756,  4779, -1014,   676,  4802,  4825,   965,   966,   967,
+     840,  2254,  1492,  2254,  2254, -1014,    14, -1014, -1014,  4848,
+      48, -1014,  2900, -1014,   847,   850,   842, -1014,   976, -1014,
    -1014, -1014, -1014, -1014, -1014, -1014, -1014, -1014, -1014, -1014,
    -1014, -1014, -1014, -1014, -1014, -1014, -1014, -1014, -1014, -1014,
    -1014, -1014, -1014, -1014, -1014, -1014,  2254,  2254, -1014, -1014,
    -1014, -1014, -1014, -1014, -1014, -1014, -1014, -1014, -1014, -1014,
-    2254,  2254,  2254,  2254,  2254,  2254,  2254,   978, -1014,  2187,
-     588, -1014, -1014, -1014,  2254,  4871,   979,   980,   863, -1014,
-      91,  2254,   996,  1000,  2283, -1014,  1001,   874,    -2,  1003,
-   -1014,  2187,  2187,  2187,  2187,  2254, -1014,   892,   588,   -28,
-    3932,   242, -1014,  2187,  2928,  2579,   775, -1014,  2499, -1014,
-     962,  1459,  1459,  1005,  1459,   741,  1459,  1459,  1006,   963,
-    1459,  1459,   676, -1014,  2187,  2340,  1009,   879,  1011,  1015,
-    1016,  2119, -1014, -1014,  1019, -1014,  1020,  1025,  1027,  1028,
-    1030,  1031,  1022,   558,  3958,  3984, -1014, -1014,  2956,   242,
-     242,   242,  1033,   903,   911,   -42, -1014,   560, -1014,    38,
-    6061, -1014,  2359,   908,  1034,  1038,   999,  1043,  1044,  1459,
-    1459,  1459,  1047,  4010, -1014,  2598,  1683,  1049,  1050,  1051,
-    1052, -1014,  1053, -1014,   924,  2254,  2254,  1459,   923, -1014,
+    2254,  2254,  2254,  2254,  2254,  2254,  2254,   981, -1014,  2187,
+     588, -1014, -1014, -1014,  2254,  4871,   980,   991,   868, -1014,
+      91,  2254,  1000,  1001,  2283, -1014,  1003,   875,    -2,  1005,
+   -1014,  2187,  2187,  2187,  2187,  2254, -1014,   891,   588,   -28,
+    3932,   242, -1014,  2187,  2928,  2579,   776, -1014,  2499, -1014,
+     963,  1459,  1459,  1006,  1459,   771,  1459,  1459,  1007,   971,
+    1459,  1459,   684, -1014,  2187,  2340,  1009,   879,  1011,  1016,
+    1018,  2119, -1014, -1014,  1020, -1014,  1025,  1027,  1028,  1030,
+    1031,  1032,  1023,   558,  3958,  3984, -1014, -1014,  2956,   242,
+     242,   242,  1034,   904,   913,   -42, -1014,   560, -1014,    38,
+    6061, -1014,  2359,   908,  1035,  1042,  1004,  1043,  1044,  1459,
+    1459,  1459,  1047,  4010, -1014,  2598,  1683,  1050,  1051,  1053,
+    1052, -1014,  1055, -1014,   926,  2254,  2254,  1459,   925, -1014,
     5851,  4894,  5872,  4917,  5893,  4940,  5914,  4963,  4986, -1014,
-      43,   931,  5935,   246, -1014, -1014,    98,   583,   930,  1061,
-    2378, -1014, -1014, -1014,    -2,  2254, -1014,   683, -1014,   684,
-     691,   694,   701,  6061, -1014,  1063,    54,  2254,    57,   702,
-   -1014,  2254,   932,  1017,  1017,  1459,  1066,   938,   939,  1068,
-    1069,  1459,   943,  1072,  1076, -1014,   708, -1014,  1079,  2254,
-    1459,  1459,  1459,  1081,  1082, -1014,  1459,  1459,  1459,  1459,
-    1459,  1459,   343,  2254,  2254,  2254,   949,   179,   331,   338,
+      43,   933,  5935,   467, -1014, -1014,    98,   583,   939,  1061,
+    2378, -1014, -1014, -1014,    -2,  2254, -1014,   691, -1014,   694,
+     701,   702,   708,  6061, -1014,  1063,    54,  2254,    57,   709,
+   -1014,  2254,   932,  1017,  1017,  1459,  1066,   940,   943,  1069,
+    1070,  1459,   947,  1071,  1076, -1014,   713, -1014,  1079,  2254,
+    1459,  1459,  1459,  1083,  1082, -1014,  1459,  1459,  1459,  1459,
+    1459,  1459,   343,  2254,  2254,  2254,   952,   179,   331,   338,
    -1014,  1459,  2254, -1014, -1014,  2057,   -15, -1014,  2187, -1014,
-   -1014,   951, -1014, -1014,  1084,  1085,  1018, -1014,  2254,  2254,
-    2254, -1014,  1086,  1087, -1014,   213, -1014,  2254,  4036,  4062,
-     709, -1014,  2254, -1014, -1014, -1014, -1014, -1014, -1014, -1014,
-   -1014,   960, -1014, -1014, -1014,  1459,   616,  2254,  1103,  1108,
-      13, -1014,  1123,  5009,    -2, -1014,  1124,  1127,  1129,  1130,
-   -1014, -1014,   588,  4088, -1014,  1008,  6061,  2254,   242,  1131,
-    1137,  1138, -1014,  2254,  2254, -1014, -1014,  1139,  2254, -1014,
-   -1014, -1014,  1145,  4114,  1146,  1150,  1064,  2254, -1014,  1173,
-    1174,  1175,  1176,  1178,  1179, -1014,  2311,  2984,  5956,  2816,
-      35,   242,  1180,   242,  1182,   242,  1185,   315,  1048,  5977,
-    3012,   562, -1014,   713,  2254, -1014, -1014,  1459,  2844,   447,
-    5998, -1014,  1849, -1014,   171,  6061,  2254,  2254,  1459,  1056,
-     716,  6061,  1188,  1189,  1190,  2403, -1014,  1191,  1193, -1014,
-    1062, -1014, -1014, -1014, -1014, -1014,  1194,  2254, -1014,  3040,
-     377, -1014, -1014, -1014,  3068,  3096, -1014,  3124,  1196,  2254,
-   -1014, -1014,  1155,  1197,  6061, -1014, -1014, -1014, -1014, -1014,
-    1067,  2422,  1198,  1075, -1014,  2254, -1014,  1078,   592, -1014,
-    1077,   599, -1014,  1080,   609, -1014,  1092,  1200,  1459,  1207,
-    1094,  2254,  1201,  3152,  1147,  2254, -1014,  2254, -1014, -1014,
+   -1014,   953, -1014, -1014,  1086,  1088,  1040, -1014,  2254,  2254,
+    2254, -1014,  1089,  1100, -1014,   213, -1014,  2254,  4036,  4062,
+     716, -1014,  2254, -1014, -1014, -1014, -1014, -1014, -1014, -1014,
+   -1014,   954, -1014, -1014, -1014,  1459,   616,  2254,  1103,  1108,
+      13, -1014,  1124,  5009,    -2, -1014,  1127,  1129,  1130,  1131,
+   -1014, -1014,   588,  4088, -1014,  1008,  6061,  2254,   242,  1137,
+    1138,  1139, -1014,  2254,  2254, -1014, -1014,  1146,  2254, -1014,
+   -1014, -1014,  1145,  4114,  1150,  1151,  1087,  2254, -1014,  1173,
+    1175,  1176,  1178,  1179,  1182, -1014,  2311,  2984,  5956,  2816,
+      35,   242,  1185,   242,  1186,   242,  1188,   315,  1046,  5977,
+    3012,   562, -1014,   720,  2254, -1014, -1014,  1459,  2844,   447,
+    5998, -1014,  1849, -1014,   171,  6061,  2254,  2254,  1459,  1057,
+     724,  6061,  1184,  1190,  1191,  2403, -1014,  1192,  1194, -1014,
+    1067, -1014, -1014, -1014, -1014, -1014,  1195,  2254, -1014,  3040,
+     377, -1014, -1014, -1014,  3068,  3096, -1014,  3124,  1193,  2254,
+   -1014, -1014,  1156,  1198,  6061, -1014, -1014, -1014, -1014, -1014,
+    1068,  2422,  1199,  1075, -1014,  2254, -1014,  1078,   592, -1014,
+    1077,   599, -1014,  1080,   609, -1014,  1092,  1201,  1459,  1207,
+    1094,  2254,  1229,  3152,  1152,  2254, -1014,  2254, -1014, -1014,
     2187,  2442,  1233, -1014,  2254,  4140,  4166, -1014,  1459,  2254,
-    1234, -1014, -1014, -1014, -1014,    -2, -1014,  1151, -1014,  4192,
-    1235,  1237,  1238,  1239,  1240,  4218,  1109, -1014,  1459, -1014,
+    1235, -1014, -1014, -1014, -1014,    -2, -1014,  1153, -1014,  4192,
+    1236,  1237,  1239,  1240,  1241,  4218,  1114, -1014,  1459, -1014,
    -1014,    35,  2872, -1014,  2057,    38,  2057,    38,  2057,    38,
-   -1014,   720,  1459, -1014,  3180, -1014, -1014,  2254,  3208,  3236,
-     724, -1014, -1014,  1114,  6061,  2254,  2254,   725,  6061, -1014,
-    1247, -1014,  2254, -1014, -1014, -1014, -1014, -1014,  1249,  2254,
-     729,  1116,  2254, -1014,  3264,   611,   186,  3292,   620,   194,
-    3320,   622,   229,  1459,  1250,  1195,  1622,  1120,  2461, -1014,
-   -1014,  1253,  2254,  6019,  4244,    30, -1014,  4270,  1132,  3348,
-    1254, -1014,  3376,  1255,  2254,  1261,  1262,  2254,  1265,  1266,
-    2254,  1267,  1135, -1014,  2254, -1014,    38, -1014, -1014, -1014,
-     730, -1014,  2254, -1014,  1459,  2254,  1271, -1014, -1014, -1014,
-   -1014,  1140,  3404, -1014, -1014,  1141,  3432, -1014, -1014,  1143,
-    3460, -1014,  1276,  2480,   307,  1880,  1283,  1149,  6040,   733,
-    3488,  1156,    38,  1288,    38,  1315,    38,  1316, -1014, -1014,
-   -1014, -1014,    38, -1014,   588, -1014,  1186,  1319,  1272,   309,
-   -1014,  1192,   332, -1014,  1199,   335, -1014,  1203,   337,   736,
-   -1014,  1204,  1459, -1014,  1187,  1321,    38,  1322,    38,  1323,
-      38, -1014,   588,  1325,   588,   737,  1330, -1014,   386, -1014,
-     458, -1014,   474, -1014, -1014,   753, -1014,  1358, -1014,  1359,
-    1360,  1361,   588,  1362, -1014, -1014, -1014, -1014, -1014, -1014
+   -1014,   725,  1459, -1014,  3180, -1014, -1014,  2254,  3208,  3236,
+     729, -1014, -1014,  1115,  6061,  2254,  2254,   730,  6061, -1014,
+    1248, -1014,  2254, -1014, -1014, -1014, -1014, -1014,  1250,  2254,
+     733,  1117,  2254, -1014,  3264,   611,   186,  3292,   620,   194,
+    3320,   622,   229,  1459,  1251,  1196,  1622,  1121,  2461, -1014,
+   -1014,  1254,  2254,  6019,  4244,    30, -1014,  4270,  1132,  3348,
+    1255, -1014,  3376,  1261,  2254,  1262,  1265,  2254,  1266,  1267,
+    2254,  1268,  1140, -1014,  2254, -1014,    38, -1014, -1014, -1014,
+     736, -1014,  2254, -1014,  1459,  2254,  1271, -1014, -1014, -1014,
+   -1014,  1143,  3404, -1014, -1014,  1149,  3432, -1014, -1014,  1155,
+    3460, -1014,  1272,  2480,   307,  1880,  1276,  1183,  6040,   737,
+    3488,  1157,    38,  1283,    38,  1316,    38,  1318, -1014, -1014,
+   -1014, -1014,    38, -1014,   588, -1014,  1187,  1320,  1322,   309,
+   -1014,  1197,   332, -1014,  1203,   335, -1014,  1204,   337,   753,
+   -1014,  1226,  1459, -1014,  1189,  1323,    38,  1324,    38,  1325,
+      38, -1014,   588,  1330,   588,   757,  1331, -1014,   386, -1014,
+     458, -1014,   474, -1014, -1014,   762, -1014,  1359, -1014,  1360,
+    1361,  1362,   588,  1363, -1014, -1014, -1014, -1014, -1014, -1014
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-   -1014, -1014, -1014, -1014,   549, -1014, -1014, -1014, -1014,   247,
+   -1014, -1014, -1014, -1014,   491, -1014, -1014, -1014, -1014,   249,
    -1014, -1014, -1014, -1014, -1014, -1014, -1014, -1014, -1014, -1014,
-   -1014, -1014,  -252,    24, -1014,    75, -1014,   576,  1368,     3,
-    -345,  -111, -1014, -1014, -1014, -1014, -1014,  1370, -1014, -1014,
+   -1014, -1014,  -252,    24, -1014,    75, -1014,   576,  1370,     3,
+    -345,  -111, -1014, -1014, -1014, -1014, -1014,  1371, -1014, -1014,
    -1014, -1014, -1014, -1014, -1014, -1014, -1014, -1014, -1014, -1014,
-   -1014,  -673,  -708, -1014, -1014,  1035, -1014, -1014, -1014, -1014,
-      -6, -1014,   -21, -1014, -1013,   -93,  -133,    22,   121,  -629,
-     495, -1014,  -258,     2
+   -1014,  -673,  -708, -1014, -1014,  1036, -1014, -1014, -1014, -1014,
+      -6, -1014,   -21, -1014, -1013,   -93,  -110,    22,   121,  -629,
+     496, -1014,  -258,     2
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
@@ -1455,142 +1455,142 @@ static const yytype_int16 yytable[] =
 {
      129,   152,   196,   445,   446,   447,    65,   834,   131,   536,
      537,   172,   174,   656,   180,   573,   452,   647,   485,   776,
-     206,   737,   457,   486,   208,  1087,   339,   135,   712,   184,
-     128,   210,   274,     5,   713,   714,  1153,   147,   157,   278,
-     369,   158,   370,   159,   199,  1100,   836,   138,   366,   138,
-     352,   353,   442,   216,   139,   712,   651,   147,   328,     4,
-     891,   713,   714,   894,   335,   337,   337,   354,   363,   120,
-     121,   296,   297,   298,   489,   373,   212,   628,   299,   126,
-     217,   213,   629,   153,   103,   104,   105,   106,   337,   367,
+     206,   737,   457,   486,   208,  1087,   138,   135,   712,   184,
+     128,   210,   274,   139,   713,   714,  1153,   147,   157,   278,
+     369,   158,   370,   159,   199,  1100,   836,   138,   338,   339,
+     352,   353,   442,   216,   651,   712,     4,   147,   328,   132,
+     891,   713,   714,   894,   336,   336,   336,   354,   363,   120,
+     121,   366,   628,   134,   489,   373,   212,   629,     5,   126,
+     217,   213,   133,   153,   103,   104,   105,   106,   336,   367,
      107,   574,   575,   576,   577,   767,   391,   833,   393,    31,
-      32,    33,    34,   132,   786,   639,   148,    38,   712,   495,
+      32,    33,    34,   137,   786,   639,   148,    38,   712,   495,
       41,   267,   268,   269,   713,   714,   270,   273,   275,   276,
-     453,   282,   134,   185,   942,   657,   653,   302,   834,   279,
+     453,   282,   140,   185,   942,   657,   653,   302,   834,   279,
      304,   142,   305,   311,   314,   315,   197,   317,   311,   319,
      320,  1179,   311,   323,   324,   882,   347,   331,   349,   738,
-     578,   648,   133,   207,   356,   120,   121,   209,   364,   136,
+     578,   648,   151,   207,   356,   120,   121,   209,   364,   136,
      211,   312,   212,   186,   350,   351,   312,   213,  1154,   371,
      312,   200,   657,   351,   456,   872,   120,   121,   352,   353,
-     495,   768,   769,   740,   352,   353,   137,   379,   380,   381,
-     218,   383,   219,   143,   386,   387,   140,   388,   142,  1225,
-     144,   355,   141,   641,   150,   395,   113,   114,   115,   116,
-     145,   654,   400,   401,   402,   403,   404,   405,   406,   407,
+     495,   768,   769,   740,   352,   353,   141,   379,   380,   381,
+     218,   383,   219,   143,   386,   387,   145,   388,   142,  1225,
+     144,   355,   146,   641,   150,   395,   113,   114,   115,   116,
+     149,   654,   400,   401,   402,   403,   404,   405,   406,   407,
      408,   409,   410,   411,   412,   413,   414,   415,   416,   417,
      418,   419,   420,   421,   422,   423,   424,   425,   426,   427,
      428,   429,   430,   431,   432,   433,   434,   435,   436,   437,
      438,   439,   440,   441,   545,   971,   712,   187,   448,   188,
-     143,   146,   713,   714,   712,   318,   311,   652,   149,   322,
+     143,   150,   713,   714,   712,   318,   311,   652,   154,   322,
      713,   714,   220,   562,   221,   113,   114,   115,   116,   469,
      470,   471,   472,   473,   474,   475,   476,   477,   478,   479,
-     480,   481,   482,   483,   312,   120,   121,   150,   458,   712,
-     352,   353,   491,  1033,   151,   713,   714,   222,  1034,   223,
-     499,   176,   742,   154,   177,   504,   931,   178,   932,   491,
-     311,   639,   155,   493,   513,  1135,   515,   516,   517,   156,
+     480,   481,   482,   483,   312,   120,   121,   155,   458,   712,
+     352,   353,   491,  1033,   156,   713,   714,   222,  1034,   223,
+     499,   176,   742,   160,   177,   504,   931,   178,   932,   491,
+     311,   639,   165,   493,   513,  1135,   515,   516,   517,   166,
      492,   534,   535,  1138,   522,   524,   524,   524,   524,   529,
      349,   120,   121,   525,   525,   525,   525,   492,   312,   925,
      926,   539,   540,   541,   267,   268,   542,   279,   279,   636,
-     637,   160,   549,   168,   169,   551,   552,   165,  1141,   311,
-     555,   556,   761,   170,   120,   121,   224,   712,   225,   712,
-     171,   740,   167,   713,   714,   713,   714,   166,   569,   168,
-     169,   572,  1106,   454,  1109,   175,  1112,   312,   834,   170,
-     785,   834,   712,   181,   834,   712,   179,   712,   713,   714,
-     182,   713,   714,   713,   714,   183,  1090,   526,   527,   528,
-     571,   189,   113,   114,   115,   116,   692,   285,   286,   287,
+     637,   167,   549,   168,   169,   551,   552,   181,  1141,   311,
+     555,   556,   761,   170,   296,   297,   298,   712,   175,   712,
+     171,   299,   182,   713,   714,   713,   714,   183,   569,   168,
+     169,   572,  1106,   454,  1109,   189,  1112,   312,   834,   170,
+     785,   834,   712,   190,   834,   712,   179,   712,   713,   714,
+     191,   713,   714,   713,   714,   192,  1090,   526,   527,   528,
+     571,   193,   113,   114,   115,   116,   692,   285,   286,   287,
      288,   289,   290,   291,   292,   293,   294,   295,   511,   297,
-     298,   190,   120,   121,   635,   299,  1190,   510,  1215,   640,
-     191,   644,   352,   353,  1017,  1027,   712,   192,   643,   352,
-     353,   161,   713,   714,   162,   193,   834,   163,   933,   164,
-     934,  1217,   194,  1174,  1219,   935,  1221,   936,   195,   642,
-     311,   660,   201,   635,   664,   352,   353,   665,   666,   668,
-     226,   834,   227,   228,   834,   229,   554,   834,   352,   353,
-     834,   531,   311,   202,   203,   666,   685,   204,   312,  1199,
-     703,  1202,   691,  1205,   875,   877,   667,   669,   205,  1208,
-     834,   215,   834,   717,   834,  1239,   704,   705,   712,   230,
-     312,   231,   708,   667,   713,   714,   260,   352,   353,   232,
-     720,   233,   722,  1228,   712,  1230,   234,  1232,   235,   264,
-     713,   714,   261,   284,   365,   733,   262,   735,   736,   285,
+     298,   194,   120,   121,   635,   299,  1190,   510,  1215,   640,
+     195,   644,   352,   353,  1017,  1027,   712,   201,   643,   352,
+     353,   161,   713,   714,   162,   202,   834,   163,   933,   164,
+     934,  1217,   203,  1174,  1219,   935,  1221,   936,   215,   642,
+     311,   660,   260,   635,   664,   352,   353,   665,   666,   668,
+     224,   834,   225,   226,   834,   227,   554,   834,   352,   353,
+     834,   531,   311,   204,   261,   666,   685,   205,   312,  1199,
+     703,  1202,   691,  1205,   875,   877,   667,   669,   262,  1208,
+     834,   263,   834,   717,   834,  1239,   704,   705,   712,   228,
+     312,   229,   708,   667,   713,   714,   264,   352,   353,   230,
+     720,   231,   722,  1228,   712,  1230,   232,  1232,   233,   277,
+     713,   714,   265,   284,   365,   733,   283,   735,   736,   285,
      286,   287,   288,   289,   290,   291,   292,   293,   294,   295,
      296,   297,   298,   352,   353,   352,   353,   299,   793,   794,
-     236,   796,   237,   799,   800,  1007,  1028,   803,   804,   538,
-     876,   544,   442,   216,   741,   263,   265,  1240,   120,   121,
-     750,   751,   238,   450,   239,   212,   240,   659,   241,   242,
-     213,   243,   277,  1241,   752,   753,   754,   755,   756,   757,
+     234,   796,   235,   799,   800,  1007,  1028,   803,   804,   538,
+     876,   544,   442,   216,   741,   120,   121,  1240,   120,   121,
+     750,   751,   740,   450,   236,   212,   237,   659,   300,   238,
+     213,   239,   301,  1241,   752,   753,   754,   755,   756,   757,
      758,   216,   303,   311,   103,   104,   105,   106,   762,   682,
-     107,   244,   283,   245,   976,   770,   844,   845,   846,   246,
-     788,   247,   248,   300,   249,   311,   311,   311,   311,   783,
-     301,   312,   103,   104,   105,   106,   316,   311,   107,   285,
+     107,   240,   316,   241,   976,   770,   844,   845,   846,   242,
+     788,   243,   244,   321,   245,   311,   311,   311,   311,   783,
+     330,   312,   103,   104,   105,   106,   332,   311,   107,   285,
      286,   287,   288,   289,   290,   291,   292,   293,   294,   295,
      296,   297,   298,   312,   312,   312,   312,   299,   311,   352,
-     353,   352,   353,   352,   353,   312,   321,   330,   827,   828,
-     829,   113,   114,   115,   116,   823,   250,   835,   251,  1021,
-     333,   252,   901,   253,   332,   254,   312,   255,   907,   334,
-     340,   120,   121,   352,   353,   341,  1101,   914,   915,   916,
-     352,   353,   342,   919,   920,   921,   922,   923,   924,  1064,
-     352,   353,   352,   353,   343,   256,  1066,   257,   938,   858,
-     859,   352,   353,   352,   353,   258,  1068,   259,  1134,   344,
-     760,   294,   295,   296,   297,   298,   495,  1137,   496,  1140,
-     299,   346,     7,     8,   495,   495,   501,   505,   626,   883,
-     627,   357,   779,   780,   781,   782,   495,   495,   638,   683,
-     358,   893,   963,   345,   789,   896,   495,   741,   726,   359,
-     797,   878,   798,   463,    13,    14,   464,    16,    17,   465,
-      19,   466,    21,   913,    22,   806,    24,    25,   368,    27,
-      28,    29,   372,   495,   941,   805,   374,   927,   928,   929,
-     884,   495,   885,   886,   375,   937,   939,   378,   495,   940,
-     887,   495,   311,   888,   382,    45,    46,    47,   495,   495,
-     889,   895,   948,   949,   950,   495,   958,   911,   959,   384,
-     495,   955,  1022,  1039,  1024,  1040,   961,  1113,   385,  1114,
-     312,   495,   958,  1121,  1125,  1037,   958,  1039,  1130,  1176,
-     958,   965,  1196,  1222,   958,  1223,  1237,   980,   964,   953,
+     353,   352,   353,   352,   353,   312,   333,   334,   827,   828,
+     829,   113,   114,   115,   116,   823,   246,   835,   247,  1021,
+     340,   248,   901,   249,   341,   250,   312,   251,   907,   342,
+     343,   120,   121,   352,   353,   344,  1101,   914,   915,   916,
+     352,   353,   345,   919,   920,   921,   922,   923,   924,  1064,
+     352,   353,   352,   353,   357,   252,  1066,   253,   938,   858,
+     859,   352,   353,   352,   353,   254,  1068,   255,  1134,   346,
+     760,   294,   295,   296,   297,   298,   256,  1137,   257,  1140,
+     299,   358,     7,     8,   258,   495,   259,   496,   495,   883,
+     501,   368,   779,   780,   781,   782,   495,   626,   505,   627,
+     359,   893,   963,   372,   789,   896,   495,   741,   638,   374,
+     495,   878,   683,   463,    13,    14,   464,    16,    17,   465,
+      19,   466,    21,   913,    22,   806,    24,    25,   375,    27,
+      28,    29,   376,   495,   941,   726,   377,   927,   928,   929,
+     797,   495,   798,   805,   378,   937,   939,   382,   884,   940,
+     885,   495,   311,   886,   384,    45,    46,    47,   495,   495,
+     887,   888,   948,   949,   950,   495,   495,   889,   895,   385,
+     495,   955,   911,   958,  1024,   959,   961,   495,   389,  1022,
+     312,  1039,  1113,  1040,  1114,  1037,   495,   958,  1121,  1125,
+     958,   965,  1130,  1039,   958,  1176,  1196,   980,   964,   953,
      290,   291,   292,   293,   294,   295,   296,   297,   298,   553,
-    1242,   979,  1243,   299,   376,   377,   389,   984,   985,   390,
-     392,   394,   987,   396,   397,   299,   399,   449,   459,   461,
-    1008,   994,  1011,   460,  1014,   126,   512,   462,   490,   518,
-    1001,   519,   530,   546,   548,  1071,   550,   560,  1002,   563,
-     630,   631,   632,   279,   634,   645,  1210,   646,  1023,   650,
-     670,   661,   671,   672,   674,   675,  1031,   676,   677,   679,
-    1035,  1036,   680,   681,  1032,   687,     7,     8,   693,   943,
-     697,   695,  1116,   698,  1233,   699,  1236,   700,   706,   702,
-     721,  1049,   729,   730,   731,   707,   732,   745,   747,  1115,
-     746,   749,   759,  1055,  1248,   764,   765,   463,    13,    14,
-     464,    16,    17,   465,    19,   466,    21,   766,    22,  1062,
-      24,    25,   771,    27,    28,    29,   772,   775,   774,   778,
-     784,   792,   795,   801,   802,  1074,   808,   809,   810,  1078,
-    1142,  1079,   811,   812,   311,   815,   822,   816,  1084,    45,
-      46,    47,   817,  1088,   818,   819,  1175,   820,   821,   830,
-     839,   831,   832,  1105,   840,  1108,   838,  1111,   841,   842,
-     843,   847,   312,   852,   853,   857,   855,   854,  1104,   856,
-    1107,   862,  1110,   873,   279,   879,     7,     8,   880,   890,
-     897,  1118,   902,   898,   905,   906,   903,   904,   909,  1123,
-    1124,   908,   910,   567,   912,   917,  1127,   930,   918,   944,
-     945,   946,   951,  1129,   952,   962,  1132,   463,    13,    14,
-     464,    16,    17,   465,    19,   466,    21,   947,    22,   966,
+    1222,   979,  1223,   299,   958,   390,  1237,   984,   985,  1242,
+     392,  1243,   987,   394,   396,   397,   299,   399,   449,   459,
+    1008,   994,  1011,   460,  1014,   461,   126,   512,   462,   490,
+    1001,   518,   519,   530,   546,  1071,   548,   550,  1002,   560,
+     563,   630,   631,   279,   632,   634,  1210,   645,  1023,   646,
+     650,   661,   670,   671,   672,   674,  1031,   675,   676,   677,
+    1035,  1036,   679,   680,  1032,   681,     7,     8,   687,   943,
+     693,   695,  1116,   697,  1233,   698,  1236,   699,   700,   702,
+     721,  1049,   729,   730,   731,   732,   706,   707,   745,  1115,
+     747,   746,   749,  1055,  1248,   759,   764,   463,    13,    14,
+     464,    16,    17,   465,    19,   466,    21,   765,    22,  1062,
+      24,    25,   766,    27,    28,    29,   771,   772,   775,   784,
+     774,   778,   792,   795,   801,  1074,   808,   809,   810,  1078,
+    1142,  1079,   802,   811,   311,   812,   815,   822,  1084,    45,
+      46,    47,   816,  1088,   817,   818,  1175,   819,   820,   821,
+     830,   839,   831,  1105,   832,  1108,   838,  1111,   840,   842,
+     843,   847,   312,   841,   852,   853,   855,   857,  1104,   854,
+    1107,   856,  1110,   862,   279,   873,     7,     8,   880,   890,
+     897,  1118,   902,   898,   879,   905,   906,   909,   903,  1123,
+    1124,   904,   910,   567,   912,   908,  1127,   917,   918,   962,
+     930,   944,   945,  1129,   946,   951,  1132,   463,    13,    14,
+     464,    16,    17,   465,    19,   466,    21,   952,    22,   966,
       24,    25,   967,    27,    28,    29,   961,   288,   289,   290,
-     291,   292,   293,   294,   295,   296,   297,   298,  1162,   969,
-     972,  1166,   299,   973,  1170,   974,   975,   981,  1173,    45,
-      46,    47,   978,   982,   983,   986,  1178,    75,   306,  1180,
-     988,  1080,   990,    79,    80,    81,   991,   992,    82,    83,
+     291,   292,   293,   294,   295,   296,   297,   298,  1162,   947,
+     969,  1166,   299,   972,  1170,   973,   974,   975,  1173,    45,
+      46,    47,   978,   981,   982,   983,  1178,    75,   306,  1180,
+     988,  1080,   986,    79,    80,    81,   990,   991,    82,    83,
       84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
       94,    95,    96,    97,    98,    99,   100,   101,   102,   995,
-     996,   997,   998,  1000,   999,  1018,  1009,   307,  1012,     7,
-       8,  1015,  1041,   568,  1038,  1042,  1043,  1047,  1045,  1046,
-    1048,  1054,  1056,  1057,  1060,  1058,  1070,  1075,    31,    32,
+     992,   996,   997,  1018,   998,   999,  1000,   307,  1041,     7,
+       8,  1009,  1012,   568,  1015,  1038,  1042,  1043,  1054,  1045,
+    1046,  1048,  1047,  1056,  1057,  1060,  1058,  1070,    31,    32,
       33,    34,    35,  1061,  1072,  1065,    38,  1063,  1067,    41,
      463,    13,    14,   464,    16,    17,   465,    19,   466,    21,
-    1069,    22,  1073,    24,    25,  1077,    27,    28,    29,  1082,
-    1089,  1093,  1091,  1094,  1095,  1096,  1097,  1099,   109,   110,
-     111,   112,  1122,  1126,  1128,  1131,  1143,  1144,  1147,  1149,
-    1158,  1160,    45,    46,    47,   117,   308,  1163,  1164,  1156,
-     119,  1167,  1168,  1171,  1172,   122,  1181,  1214,  1182,  1184,
-     125,  1186,  1188,   509,    75,    76,    77,  1194,    78,  1193,
-      79,    80,    81,  1198,  1200,    82,    83,    84,    85,    86,
+    1069,    22,  1073,    24,    25,  1075,    27,    28,    29,  1082,
+    1077,  1089,  1093,  1094,  1091,  1095,  1096,  1097,   109,   110,
+     111,   112,  1099,  1122,  1126,  1128,  1131,  1143,  1144,  1147,
+    1149,  1158,    45,    46,    47,   117,   308,  1160,  1163,  1156,
+     119,  1164,  1167,  1168,  1171,   122,  1181,   892,  1188,  1172,
+     125,  1182,  1193,   509,    75,    76,    77,  1184,    78,  1200,
+      79,    80,    81,  1186,  1198,    82,    83,    84,    85,    86,
       87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
       97,    98,    99,   100,   101,   102,   718,   103,   104,   105,
-     106,  1203,  1206,   107,  1212,  1213,  1226,  1227,  1229,  1231,
-    1216,  1234,    75,   306,   336,   892,  1238,  1218,    79,    80,
-      81,  1220,  1224,    82,    83,    84,    85,    86,    87,    88,
+     106,  1194,  1203,   107,  1206,  1212,  1213,  1214,  1226,  1227,
+    1229,  1231,    75,   306,   335,  1216,  1234,  1238,    79,    80,
+      81,  1218,  1220,    82,    83,    84,    85,    86,    87,    88,
       89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
-      99,   100,   101,   102,  1244,  1245,  1246,  1247,  1249,  1150,
-     900,    64,   307,    71,   521,   968,     0,     0,     0,   108,
+      99,   100,   101,   102,  1224,  1244,  1245,  1246,  1247,  1249,
+     900,  1150,   307,    64,    71,   521,   968,     0,     0,   108,
        0,     0,     0,     0,     0,   109,   110,   111,   112,   113,
      114,   115,   116,    31,    32,    33,    34,    35,     0,     0,
        0,    38,   117,   118,    41,     0,     0,   119,     0,   120,
@@ -2079,23 +2079,23 @@ static const yytype_int16 yycheck[] =
 {
        6,    49,     4,   261,   262,   263,     3,   715,     6,   354,
      355,    32,    33,     6,    35,     4,     7,     4,   132,   648,
-       5,     7,   274,   137,     5,  1038,   159,     6,    70,     4,
-       6,     4,     4,     0,    76,    77,     6,    69,    46,     4,
-       4,    49,     6,    51,     4,  1058,   719,   131,   181,   131,
-     121,   122,     4,     5,   138,    70,   138,    69,   151,     6,
+       5,     7,   274,   137,     5,  1038,   131,     6,    70,     4,
+       6,     4,     4,   138,    76,    77,     6,    69,    46,     4,
+       4,    49,     6,    51,     4,  1058,   719,   131,   158,   159,
+     121,   122,     4,     5,   138,    70,     6,    69,   151,    13,
        6,    76,    77,     6,   157,   158,   159,   138,   179,   128,
-     129,   123,   124,   125,   133,   186,   135,   132,   130,   138,
-      78,   140,   137,   131,    36,    37,    38,    39,   181,   182,
+     129,   181,   132,   131,   133,   186,   135,   137,     0,   138,
+      78,   140,    49,   131,    36,    37,    38,    39,   181,   182,
       42,    80,    81,    82,    83,     4,   207,   139,   209,    64,
-      65,    66,    67,    13,   132,     7,   138,    72,    70,   137,
+      65,    66,    67,     6,   132,     7,   138,    72,    70,   137,
       75,   117,   118,   119,    76,    77,   122,   123,    90,    91,
      111,   127,   131,    98,   139,   118,   138,   133,   836,   126,
      136,    69,   138,   139,   140,   141,   138,   143,   144,   145,
      146,  1154,   148,   149,   150,   774,   167,   153,   169,   135,
-     139,   138,    49,   138,   175,   128,   129,   138,   179,   138,
+     139,   138,    53,   138,   175,   128,   129,   138,   179,   138,
      133,   139,   135,   138,   170,   171,   144,   140,   138,   133,
      148,   131,   118,   179,     7,   132,   128,   129,   121,   122,
-     137,    90,    91,   135,   121,   122,     6,   193,   194,   195,
+     137,    90,    91,   135,   121,   122,   131,   193,   194,   195,
      131,   197,   133,   131,   200,   201,   131,   203,    69,  1212,
      138,   138,   131,   455,   131,   211,   108,   109,   110,   111,
      131,   138,   218,   219,   220,   221,   222,   223,   224,   225,
@@ -2103,118 +2103,118 @@ static const yytype_int16 yycheck[] =
      236,   237,   238,   239,   240,   241,   242,   243,   244,   245,
      246,   247,   248,   249,   250,   251,   252,   253,   254,   255,
      256,   257,   258,   259,   365,   884,    70,     4,   264,     6,
-     131,   131,    76,    77,    70,   144,   272,   138,   131,   148,
+     131,   131,    76,    77,    70,   144,   272,   138,    49,   148,
       76,    77,   131,   384,   133,   108,   109,   110,   111,   285,
      286,   287,   288,   289,   290,   291,   292,   293,   294,   295,
-     296,   297,   298,   299,   272,   128,   129,   131,   274,    70,
-     121,   122,   308,   132,    53,    76,    77,   131,   137,   133,
-     316,    43,   570,    49,    46,   321,   137,    49,   139,   325,
-     326,     7,    49,     8,   330,   139,   332,   333,   334,    49,
+     296,   297,   298,   299,   272,   128,   129,    49,   274,    70,
+     121,   122,   308,   132,    49,    76,    77,   131,   137,   133,
+     316,    43,   570,    51,    46,   321,   137,    49,   139,   325,
+     326,     7,    49,     8,   330,   139,   332,   333,   334,   131,
      308,   352,   353,   139,   340,   341,   342,   343,   344,   345,
      361,   128,   129,   341,   342,   343,   344,   325,   326,     6,
        7,   357,   358,   359,   360,   361,   362,   354,   355,   452,
-     453,    51,   368,   121,   122,   371,   372,    49,   139,   375,
-     376,   377,   630,   131,   128,   129,   131,    70,   133,    70,
-     138,   135,   138,    76,    77,    76,    77,   131,   394,   121,
-     122,   397,  1065,   272,  1067,   138,  1069,   375,  1106,   131,
-     658,  1109,    70,    49,  1112,    70,   138,    70,    76,    77,
-      49,    76,    77,    76,    77,    46,  1045,   342,   343,   344,
-     396,    46,   108,   109,   110,   111,   519,   112,   113,   114,
+     453,   138,   368,   121,   122,   371,   372,    49,   139,   375,
+     376,   377,   630,   131,   123,   124,   125,    70,   138,    70,
+     138,   130,    49,    76,    77,    76,    77,    46,   394,   121,
+     122,   397,  1065,   272,  1067,    46,  1069,   375,  1106,   131,
+     658,  1109,    70,     4,  1112,    70,   138,    70,    76,    77,
+       4,    76,    77,    76,    77,     4,  1045,   342,   343,   344,
+     396,   131,   108,   109,   110,   111,   519,   112,   113,   114,
      115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
-     125,     4,   128,   129,   450,   130,   139,   326,   139,   135,
-       4,   457,   121,   122,   139,     8,    70,     4,   456,   121,
-     122,    43,    76,    77,    46,   131,  1174,    49,   137,    51,
-     139,   139,   131,  1146,   139,   137,   139,   139,   131,   455,
+     125,   131,   128,   129,   450,   130,   139,   326,   139,   135,
+     131,   457,   121,   122,   139,     8,    70,   131,   456,   121,
+     122,    43,    76,    77,    46,     6,  1174,    49,   137,    51,
+     139,   139,   133,  1146,   139,   137,   139,   139,   138,   455,
      486,   487,   131,   489,   490,   121,   122,   493,   494,   495,
      131,  1199,   133,   131,  1202,   133,   375,  1205,   121,   122,
-    1208,   137,   508,     6,   133,   511,   512,     4,   486,  1182,
-     531,  1184,   518,  1186,   766,   767,   494,   495,     4,  1192,
-    1228,   138,  1230,   544,  1232,   139,   532,   533,    70,   131,
-     508,   133,   538,   511,    76,    77,   131,   121,   122,   131,
-     546,   133,   548,  1216,    70,  1218,   131,  1220,   133,     7,
-      76,    77,   131,     6,   138,   561,   131,   563,   564,   112,
+    1208,   137,   508,     4,   131,   511,   512,     4,   486,  1182,
+     531,  1184,   518,  1186,   766,   767,   494,   495,   131,  1192,
+    1228,   131,  1230,   544,  1232,   139,   532,   533,    70,   131,
+     508,   133,   538,   511,    76,    77,     7,   121,   122,   131,
+     546,   133,   548,  1216,    70,  1218,   131,  1220,   133,     4,
+      76,    77,   131,     6,   138,   561,     6,   563,   564,   112,
      113,   114,   115,   116,   117,   118,   119,   120,   121,   122,
      123,   124,   125,   121,   122,   121,   122,   130,   671,   672,
      131,   674,   133,   676,   677,   930,   139,   680,   681,   137,
-       7,   137,     4,     5,   570,   131,   131,   139,   128,   129,
-     606,   607,   131,   133,   133,   135,   131,   486,   133,   131,
-     140,   133,     4,   139,   620,   621,   622,   623,   624,   625,
+       7,   137,     4,     5,   570,   128,   129,   139,   128,   129,
+     606,   607,   135,   133,   131,   135,   133,   486,     6,   131,
+     140,   133,     6,   139,   620,   621,   622,   623,   624,   625,
      626,     5,     5,   629,    36,    37,    38,    39,   634,   508,
-      42,   131,     6,   133,   892,   641,   729,   730,   731,   131,
-     661,   133,   131,     6,   133,   651,   652,   653,   654,   655,
-       6,   629,    36,    37,    38,    39,   131,   663,    42,   112,
+      42,   131,   131,   133,   892,   641,   729,   730,   731,   131,
+     661,   133,   131,   131,   133,   651,   652,   653,   654,   655,
+     131,   629,    36,    37,    38,    39,   138,   663,    42,   112,
      113,   114,   115,   116,   117,   118,   119,   120,   121,   122,
      123,   124,   125,   651,   652,   653,   654,   130,   684,   121,
      122,   121,   122,   121,   122,   663,   131,   131,   709,   710,
      711,   108,   109,   110,   111,   137,   131,   137,   133,   137,
-     131,   131,   795,   133,   138,   131,   684,   133,   801,   131,
+     131,   131,   795,   133,   131,   131,   684,   133,   801,   131,
      131,   128,   129,   121,   122,   131,  1061,   810,   811,   812,
      121,   122,   131,   816,   817,   818,   819,   820,   821,   137,
-     121,   122,   121,   122,   131,   131,   137,   133,   831,   745,
-     746,   121,   122,   121,   122,   131,   137,   133,   137,   131,
-     629,   121,   122,   123,   124,   125,   137,   137,   139,   137,
-     130,     4,    12,    13,   137,   137,   139,   139,   133,   775,
-     135,   138,   651,   652,   653,   654,   137,   137,   139,   139,
-     138,   787,   875,   131,   663,   791,   137,   763,   139,   138,
-      49,   767,    51,    43,    44,    45,    46,    47,    48,    49,
-      50,    51,    52,   809,    54,   684,    56,    57,   131,    59,
-      60,    61,   133,   137,   835,   139,     6,   823,   824,   825,
-     137,   137,   139,   139,   138,   831,   832,     6,   137,   835,
-     139,   137,   838,   139,   135,    85,    86,    87,   137,   137,
-     139,   139,   848,   849,   850,   137,   137,   139,   139,   138,
-     137,   857,   139,   137,   947,   139,   862,   137,    93,   139,
+     121,   122,   121,   122,   138,   131,   137,   133,   831,   745,
+     746,   121,   122,   121,   122,   131,   137,   133,   137,     4,
+     629,   121,   122,   123,   124,   125,   131,   137,   133,   137,
+     130,   138,    12,    13,   131,   137,   133,   139,   137,   775,
+     139,   131,   651,   652,   653,   654,   137,   133,   139,   135,
+     138,   787,   875,   133,   663,   791,   137,   763,   139,     6,
+     137,   767,   139,    43,    44,    45,    46,    47,    48,    49,
+      50,    51,    52,   809,    54,   684,    56,    57,   138,    59,
+      60,    61,   133,   137,   835,   139,   133,   823,   824,   825,
+      49,   137,    51,   139,     6,   831,   832,   135,   137,   835,
+     139,   137,   838,   139,   138,    85,    86,    87,   137,   137,
+     139,   139,   848,   849,   850,   137,   137,   139,   139,    93,
+     137,   857,   139,   137,   947,   139,   862,   137,     6,   139,
      838,   137,   137,   139,   139,   958,   137,   137,   139,   139,
      137,   877,   139,   137,   137,   139,   139,   898,   876,   855,
      117,   118,   119,   120,   121,   122,   123,   124,   125,   139,
-     137,   897,   139,   130,   133,   133,     6,   903,   904,     6,
-       6,   133,   908,     4,   138,   130,     6,     5,   135,   133,
-     931,   917,   933,     7,   935,   138,     7,   139,   138,     7,
-     926,     7,   132,     7,     7,  1018,     6,    90,   926,   138,
-     137,   132,   132,   930,   137,     6,  1194,     4,   944,   134,
-      93,     7,     7,     7,     7,    93,   952,     7,     7,    93,
-     956,   957,     7,     7,   952,     7,    12,    13,     4,   838,
-     132,     6,  1073,   132,  1222,   132,  1224,   132,   139,   135,
-       6,   977,     7,     7,     7,   139,   135,   131,   138,  1072,
-     131,     6,     4,   989,  1242,     6,     6,    43,    44,    45,
-      46,    47,    48,    49,    50,    51,    52,   134,    54,  1005,
-      56,    57,     6,    59,    60,    61,     6,   133,     7,     6,
-     118,    49,     7,     7,    51,  1021,     7,   138,     7,  1025,
-    1113,  1027,     7,     7,  1030,     6,     4,     7,  1034,    85,
-      86,    87,     7,  1039,     7,     7,  1147,     7,     7,     6,
-       6,   138,   131,  1064,     6,  1066,   138,  1068,    49,     6,
-       6,     4,  1030,     4,     4,   131,     4,     6,  1064,     6,
-    1066,   138,  1068,   132,  1061,   135,    12,    13,     7,     6,
-     138,  1077,     6,    56,     6,     6,   138,   138,     6,  1085,
-    1086,   138,     6,   139,     5,     4,  1092,   138,     6,   138,
-       6,     6,     6,  1099,     7,   135,  1102,    43,    44,    45,
-      46,    47,    48,    49,    50,    51,    52,    89,    54,     6,
+     137,   897,   139,   130,   137,     6,   139,   903,   904,   137,
+       6,   139,   908,   133,     4,   138,   130,     6,     5,   135,
+     931,   917,   933,     7,   935,   133,   138,     7,   139,   138,
+     926,     7,     7,   132,     7,  1018,     7,     6,   926,    90,
+     138,   137,   132,   930,   132,   137,  1194,     6,   944,     4,
+     134,     7,    93,     7,     7,     7,   952,    93,     7,     7,
+     956,   957,    93,     7,   952,     7,    12,    13,     7,   838,
+       4,     6,  1073,   132,  1222,   132,  1224,   132,   132,   135,
+       6,   977,     7,     7,     7,   135,   139,   139,   131,  1072,
+     138,   131,     6,   989,  1242,     4,     6,    43,    44,    45,
+      46,    47,    48,    49,    50,    51,    52,     6,    54,  1005,
+      56,    57,   134,    59,    60,    61,     6,     6,   133,   118,
+       7,     6,    49,     7,     7,  1021,     7,   138,     7,  1025,
+    1113,  1027,    51,     7,  1030,     7,     6,     4,  1034,    85,
+      86,    87,     7,  1039,     7,     7,  1147,     7,     7,     7,
+       6,     6,   138,  1064,   131,  1066,   138,  1068,     6,     6,
+       6,     4,  1030,    49,     4,     4,     4,   131,  1064,     6,
+    1066,     6,  1068,   138,  1061,   132,    12,    13,     7,     6,
+     138,  1077,     6,    56,   135,     6,     6,     6,   138,  1085,
+    1086,   138,     6,   139,     5,   138,  1092,     4,     6,   135,
+     138,   138,     6,  1099,     6,     6,  1102,    43,    44,    45,
+      46,    47,    48,    49,    50,    51,    52,     7,    54,     6,
       56,    57,     4,    59,    60,    61,  1122,   115,   116,   117,
-     118,   119,   120,   121,   122,   123,   124,   125,  1134,     6,
+     118,   119,   120,   121,   122,   123,   124,   125,  1134,    89,
        6,  1137,   130,     6,  1140,     6,     6,     6,  1144,    85,
       86,    87,   134,     6,     6,     6,  1152,     3,     4,  1155,
-       5,  1030,     6,     9,    10,    11,     6,    93,    14,    15,
+       5,  1030,     6,     9,    10,    11,     6,     6,    14,    15,
       16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
       26,    27,    28,    29,    30,    31,    32,    33,    34,     6,
-       6,     6,     6,     4,     6,   137,     6,    43,     6,    12,
-      13,     6,     4,   139,   138,     6,     6,   135,     7,     6,
-       6,     5,    47,     6,     6,   138,     6,     6,    64,    65,
+      93,     6,     6,   137,     6,     6,     4,    43,     4,    12,
+      13,     6,     6,   139,     6,   138,     6,     6,     5,     7,
+       6,     6,   135,    47,     6,     6,   138,     6,    64,    65,
       66,    67,    68,   138,     7,   138,    72,   139,   138,    75,
       43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-     138,    54,   138,    56,    57,    88,    59,    60,    61,     6,
-       6,     6,    91,     6,     6,     6,     6,   138,   104,   105,
-     106,   107,   138,     6,     5,   139,     6,    62,   138,     6,
+     138,    54,   138,    56,    57,     6,    59,    60,    61,     6,
+      88,     6,     6,     6,    91,     6,     6,     6,   104,   105,
+     106,   107,   138,   138,     6,     5,   139,     6,    62,   138,
        6,     6,    85,    86,    87,   121,   122,     6,     6,   137,
-     126,     6,     6,     6,   139,   131,     5,     5,   138,   138,
+     126,     6,     6,     6,     6,   131,     5,   786,     6,   139,
      136,   138,     6,   139,     3,     4,     5,   138,     7,     6,
-       9,    10,    11,   137,     6,    14,    15,    16,    17,    18,
+       9,    10,    11,   138,   137,    14,    15,    16,    17,    18,
       19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
       29,    30,    31,    32,    33,    34,   139,    36,    37,    38,
-      39,     6,     6,    42,   138,     6,   139,     6,     6,     6,
-     138,     6,     3,     4,     5,   786,     6,   138,     9,    10,
+      39,   138,     6,    42,     6,   138,     6,     5,   139,     6,
+       6,     6,     3,     4,     5,   138,     6,     6,     9,    10,
       11,   138,   138,    14,    15,    16,    17,    18,    19,    20,
       21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,     6,     6,     6,     6,     6,  1122,
-     794,     3,    43,     3,   339,   880,    -1,    -1,    -1,    98,
+      31,    32,    33,    34,   138,     6,     6,     6,     6,     6,
+     794,  1122,    43,     3,     3,   339,   880,    -1,    -1,    98,
       -1,    -1,    -1,    -1,    -1,   104,   105,   106,   107,   108,
      109,   110,   111,    64,    65,    66,    67,    68,    -1,    -1,
       -1,    72,   121,   122,    75,    -1,    -1,   126,    -1,   128,
@@ -2736,7 +2736,7 @@ static const yytype_uint8 yystos[] =
        6,     6,   201,     5,   201,   201,     4,    43,   122,   170,
      178,   201,   208,   209,   201,   201,   131,   201,   209,   201,
      201,   131,   209,   201,   201,   122,   138,   201,   206,   208,
-     131,   201,   138,   131,   131,   206,     5,   206,   207,   207,
+     131,   201,   138,   131,   131,     5,   206,   207,   207,   207,
      131,   131,   131,   131,   131,   131,     4,   203,   203,   203,
      201,   201,   121,   122,   138,   138,   203,   138,   138,   138,
      121,   122,   131,   172,   203,   138,   207,   206,   131,     4,
@@ -6485,35 +6485,60 @@ yyreduce:
     {
       int type = (int)(yyvsp[(6) - (7)].v)[0];
       double coef = fabs((yyvsp[(6) - (7)].v)[1]);
-      for(int i = 0; i < List_Nbr((yyvsp[(3) - (7)].l)); i++){
-	double d;
-	List_Read((yyvsp[(3) - (7)].l), i, &d);
-	int j = (int)fabs(d);
-        Curve *c = FindCurve(j);
-	if(c){
-	  c->Method = MESH_TRANSFINITE;
-	  c->nbPointsTransfinite = ((yyvsp[(5) - (7)].d) > 2) ? (int)(yyvsp[(5) - (7)].d) : 2;
-	  c->typeTransfinite = type * sign(d);
-	  c->coeffTransfinite = coef;
-	}
+      if(!(yyvsp[(3) - (7)].l)){
+        List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Curves);
+        if(List_Nbr(tmp)){
+          for(int i = 0; i < List_Nbr(tmp); i++){
+            Curve *c;
+            List_Read(tmp, i, &c);
+            c->Method = MESH_TRANSFINITE;
+            c->nbPointsTransfinite = ((yyvsp[(5) - (7)].d) > 2) ? (int)(yyvsp[(5) - (7)].d) : 2;
+            c->typeTransfinite = type;
+            c->coeffTransfinite = coef;
+          }
+        }
         else{
-	  GEdge *ge = GModel::current()->getEdgeByTag(j);
-          if(ge){
-            ge->meshAttributes.Method = MESH_TRANSFINITE;
-            ge->meshAttributes.nbPointsTransfinite = ((yyvsp[(5) - (7)].d) > 2) ? (int)(yyvsp[(5) - (7)].d) : 2;
-            ge->meshAttributes.typeTransfinite = type * sign(d);
-            ge->meshAttributes.coeffTransfinite = coef;
+          for(GModel::eiter it = GModel::current()->firstEdge(); 
+              it != GModel::current()->lastEdge(); it++){
+            (*it)->meshAttributes.Method = MESH_TRANSFINITE;
+            (*it)->meshAttributes.nbPointsTransfinite = ((yyvsp[(5) - (7)].d) > 2) ? (int)(yyvsp[(5) - (7)].d) : 2;
+            (*it)->meshAttributes.typeTransfinite = type;
+            (*it)->meshAttributes.coeffTransfinite = coef;
           }
-          else
-	    yymsg(0, "Unknown line %d", j);
         }
+        List_Delete(tmp);
+      }
+      else{
+        for(int i = 0; i < List_Nbr((yyvsp[(3) - (7)].l)); i++){
+          double d;
+          List_Read((yyvsp[(3) - (7)].l), i, &d);
+          int j = (int)fabs(d);
+          Curve *c = FindCurve(j);
+          if(c){
+            c->Method = MESH_TRANSFINITE;
+            c->nbPointsTransfinite = ((yyvsp[(5) - (7)].d) > 2) ? (int)(yyvsp[(5) - (7)].d) : 2;
+            c->typeTransfinite = type * sign(d);
+            c->coeffTransfinite = coef;
+          }
+          else{
+            GEdge *ge = GModel::current()->getEdgeByTag(j);
+            if(ge){
+              ge->meshAttributes.Method = MESH_TRANSFINITE;
+              ge->meshAttributes.nbPointsTransfinite = ((yyvsp[(5) - (7)].d) > 2) ? (int)(yyvsp[(5) - (7)].d) : 2;
+              ge->meshAttributes.typeTransfinite = type * sign(d);
+              ge->meshAttributes.coeffTransfinite = coef;
+            }
+            else
+              yymsg(0, "Unknown line %d", j);
+          }
+        }
+        List_Delete((yyvsp[(3) - (7)].l));
       }
-      List_Delete((yyvsp[(3) - (7)].l));
     ;}
     break;
 
   case 217:
-#line 2552 "Gmsh.y"
+#line 2577 "Gmsh.y"
     {
       int k = List_Nbr((yyvsp[(4) - (6)].l));
       if(k != 0 && k != 3 && k != 4){
@@ -6586,7 +6611,7 @@ yyreduce:
     break;
 
   case 218:
-#line 2622 "Gmsh.y"
+#line 2647 "Gmsh.y"
     {
       yymsg(1, "Elliptic Surface is deprecated: use Transfinite instead (with smoothing)");
       List_Delete((yyvsp[(7) - (8)].l));
@@ -6594,7 +6619,7 @@ yyreduce:
     break;
 
   case 219:
-#line 2627 "Gmsh.y"
+#line 2652 "Gmsh.y"
     {
       int k = List_Nbr((yyvsp[(4) - (5)].l));
       if(k != 0 && k != 6 && k != 8){
@@ -6664,7 +6689,7 @@ yyreduce:
     break;
 
   case 220:
-#line 2694 "Gmsh.y"
+#line 2719 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (5)].l)){
 	List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Surfaces);
@@ -6710,7 +6735,7 @@ yyreduce:
     break;
 
   case 221:
-#line 2737 "Gmsh.y"
+#line 2762 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){
 	double d;
@@ -6733,7 +6758,7 @@ yyreduce:
     break;
 
   case 222:
-#line 2763 "Gmsh.y"
+#line 2788 "Gmsh.y"
     { 
       Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d));
       if(s){
@@ -6759,7 +6784,7 @@ yyreduce:
     break;
 
   case 223:
-#line 2786 "Gmsh.y"
+#line 2811 "Gmsh.y"
     {
       Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d));
       if(s){
@@ -6785,26 +6810,26 @@ yyreduce:
     break;
 
   case 224:
-#line 2809 "Gmsh.y"
+#line 2834 "Gmsh.y"
     {
     ;}
     break;
 
   case 225:
-#line 2812 "Gmsh.y"
+#line 2837 "Gmsh.y"
     {
     ;}
     break;
 
   case 226:
-#line 2821 "Gmsh.y"
+#line 2846 "Gmsh.y"
     { 
       ReplaceAllDuplicates();
     ;}
     break;
 
   case 227:
-#line 2825 "Gmsh.y"
+#line 2850 "Gmsh.y"
     { 
       if(!strcmp((yyvsp[(2) - (3)].c), "Geometry"))
         ReplaceAllDuplicates();
@@ -6817,47 +6842,47 @@ yyreduce:
     break;
 
   case 228:
-#line 2840 "Gmsh.y"
+#line 2865 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (1)].d);           ;}
     break;
 
   case 229:
-#line 2841 "Gmsh.y"
+#line 2866 "Gmsh.y"
     { (yyval.d) = (yyvsp[(2) - (3)].d);           ;}
     break;
 
   case 230:
-#line 2842 "Gmsh.y"
+#line 2867 "Gmsh.y"
     { (yyval.d) = -(yyvsp[(2) - (2)].d);          ;}
     break;
 
   case 231:
-#line 2843 "Gmsh.y"
+#line 2868 "Gmsh.y"
     { (yyval.d) = (yyvsp[(2) - (2)].d);           ;}
     break;
 
   case 232:
-#line 2844 "Gmsh.y"
+#line 2869 "Gmsh.y"
     { (yyval.d) = !(yyvsp[(2) - (2)].d);          ;}
     break;
 
   case 233:
-#line 2845 "Gmsh.y"
+#line 2870 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d);      ;}
     break;
 
   case 234:
-#line 2846 "Gmsh.y"
+#line 2871 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d);      ;}
     break;
 
   case 235:
-#line 2847 "Gmsh.y"
+#line 2872 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d);      ;}
     break;
 
   case 236:
-#line 2849 "Gmsh.y"
+#line 2874 "Gmsh.y"
     { 
       if(!(yyvsp[(3) - (3)].d))
 	yymsg(0, "Division by zero in '%g / %g'", (yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d));
@@ -6867,307 +6892,307 @@ yyreduce:
     break;
 
   case 237:
-#line 2855 "Gmsh.y"
+#line 2880 "Gmsh.y"
     { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d);  ;}
     break;
 
   case 238:
-#line 2856 "Gmsh.y"
+#line 2881 "Gmsh.y"
     { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d));  ;}
     break;
 
   case 239:
-#line 2857 "Gmsh.y"
+#line 2882 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d);      ;}
     break;
 
   case 240:
-#line 2858 "Gmsh.y"
+#line 2883 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d);      ;}
     break;
 
   case 241:
-#line 2859 "Gmsh.y"
+#line 2884 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d);     ;}
     break;
 
   case 242:
-#line 2860 "Gmsh.y"
+#line 2885 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d);     ;}
     break;
 
   case 243:
-#line 2861 "Gmsh.y"
+#line 2886 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d);     ;}
     break;
 
   case 244:
-#line 2862 "Gmsh.y"
+#line 2887 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d);     ;}
     break;
 
   case 245:
-#line 2863 "Gmsh.y"
+#line 2888 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d);     ;}
     break;
 
   case 246:
-#line 2864 "Gmsh.y"
+#line 2889 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d);     ;}
     break;
 
   case 247:
-#line 2865 "Gmsh.y"
+#line 2890 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (5)].d) ? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); ;}
     break;
 
   case 248:
-#line 2866 "Gmsh.y"
+#line 2891 "Gmsh.y"
     { (yyval.d) = exp((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 249:
-#line 2867 "Gmsh.y"
+#line 2892 "Gmsh.y"
     { (yyval.d) = log((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 250:
-#line 2868 "Gmsh.y"
+#line 2893 "Gmsh.y"
     { (yyval.d) = log10((yyvsp[(3) - (4)].d));    ;}
     break;
 
   case 251:
-#line 2869 "Gmsh.y"
+#line 2894 "Gmsh.y"
     { (yyval.d) = sqrt((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 252:
-#line 2870 "Gmsh.y"
+#line 2895 "Gmsh.y"
     { (yyval.d) = sin((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 253:
-#line 2871 "Gmsh.y"
+#line 2896 "Gmsh.y"
     { (yyval.d) = asin((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 254:
-#line 2872 "Gmsh.y"
+#line 2897 "Gmsh.y"
     { (yyval.d) = cos((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 255:
-#line 2873 "Gmsh.y"
+#line 2898 "Gmsh.y"
     { (yyval.d) = acos((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 256:
-#line 2874 "Gmsh.y"
+#line 2899 "Gmsh.y"
     { (yyval.d) = tan((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 257:
-#line 2875 "Gmsh.y"
+#line 2900 "Gmsh.y"
     { (yyval.d) = atan((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 258:
-#line 2876 "Gmsh.y"
+#line 2901 "Gmsh.y"
     { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;}
     break;
 
   case 259:
-#line 2877 "Gmsh.y"
+#line 2902 "Gmsh.y"
     { (yyval.d) = sinh((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 260:
-#line 2878 "Gmsh.y"
+#line 2903 "Gmsh.y"
     { (yyval.d) = cosh((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 261:
-#line 2879 "Gmsh.y"
+#line 2904 "Gmsh.y"
     { (yyval.d) = tanh((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 262:
-#line 2880 "Gmsh.y"
+#line 2905 "Gmsh.y"
     { (yyval.d) = fabs((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 263:
-#line 2881 "Gmsh.y"
+#line 2906 "Gmsh.y"
     { (yyval.d) = floor((yyvsp[(3) - (4)].d));    ;}
     break;
 
   case 264:
-#line 2882 "Gmsh.y"
+#line 2907 "Gmsh.y"
     { (yyval.d) = ceil((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 265:
-#line 2883 "Gmsh.y"
+#line 2908 "Gmsh.y"
     { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
     break;
 
   case 266:
-#line 2884 "Gmsh.y"
+#line 2909 "Gmsh.y"
     { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
     break;
 
   case 267:
-#line 2885 "Gmsh.y"
+#line 2910 "Gmsh.y"
     { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;}
     break;
 
   case 268:
-#line 2886 "Gmsh.y"
+#line 2911 "Gmsh.y"
     { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;}
     break;
 
   case 269:
-#line 2888 "Gmsh.y"
+#line 2913 "Gmsh.y"
     { (yyval.d) = exp((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 270:
-#line 2889 "Gmsh.y"
+#line 2914 "Gmsh.y"
     { (yyval.d) = log((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 271:
-#line 2890 "Gmsh.y"
+#line 2915 "Gmsh.y"
     { (yyval.d) = log10((yyvsp[(3) - (4)].d));    ;}
     break;
 
   case 272:
-#line 2891 "Gmsh.y"
+#line 2916 "Gmsh.y"
     { (yyval.d) = sqrt((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 273:
-#line 2892 "Gmsh.y"
+#line 2917 "Gmsh.y"
     { (yyval.d) = sin((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 274:
-#line 2893 "Gmsh.y"
+#line 2918 "Gmsh.y"
     { (yyval.d) = asin((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 275:
-#line 2894 "Gmsh.y"
+#line 2919 "Gmsh.y"
     { (yyval.d) = cos((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 276:
-#line 2895 "Gmsh.y"
+#line 2920 "Gmsh.y"
     { (yyval.d) = acos((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 277:
-#line 2896 "Gmsh.y"
+#line 2921 "Gmsh.y"
     { (yyval.d) = tan((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 278:
-#line 2897 "Gmsh.y"
+#line 2922 "Gmsh.y"
     { (yyval.d) = atan((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 279:
-#line 2898 "Gmsh.y"
+#line 2923 "Gmsh.y"
     { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;}
     break;
 
   case 280:
-#line 2899 "Gmsh.y"
+#line 2924 "Gmsh.y"
     { (yyval.d) = sinh((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 281:
-#line 2900 "Gmsh.y"
+#line 2925 "Gmsh.y"
     { (yyval.d) = cosh((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 282:
-#line 2901 "Gmsh.y"
+#line 2926 "Gmsh.y"
     { (yyval.d) = tanh((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 283:
-#line 2902 "Gmsh.y"
+#line 2927 "Gmsh.y"
     { (yyval.d) = fabs((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 284:
-#line 2903 "Gmsh.y"
+#line 2928 "Gmsh.y"
     { (yyval.d) = floor((yyvsp[(3) - (4)].d));    ;}
     break;
 
   case 285:
-#line 2904 "Gmsh.y"
+#line 2929 "Gmsh.y"
     { (yyval.d) = ceil((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 286:
-#line 2905 "Gmsh.y"
+#line 2930 "Gmsh.y"
     { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
     break;
 
   case 287:
-#line 2906 "Gmsh.y"
+#line 2931 "Gmsh.y"
     { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
     break;
 
   case 288:
-#line 2907 "Gmsh.y"
+#line 2932 "Gmsh.y"
     { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;}
     break;
 
   case 289:
-#line 2908 "Gmsh.y"
+#line 2933 "Gmsh.y"
     { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;}
     break;
 
   case 290:
-#line 2917 "Gmsh.y"
+#line 2942 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (1)].d); ;}
     break;
 
   case 291:
-#line 2918 "Gmsh.y"
+#line 2943 "Gmsh.y"
     { (yyval.d) = 3.141592653589793; ;}
     break;
 
   case 292:
-#line 2919 "Gmsh.y"
+#line 2944 "Gmsh.y"
     { (yyval.d) = Msg::GetCommRank(); ;}
     break;
 
   case 293:
-#line 2920 "Gmsh.y"
+#line 2945 "Gmsh.y"
     { (yyval.d) = Msg::GetCommSize(); ;}
     break;
 
   case 294:
-#line 2921 "Gmsh.y"
+#line 2946 "Gmsh.y"
     { (yyval.d) = Get_GmshMajorVersion(); ;}
     break;
 
   case 295:
-#line 2922 "Gmsh.y"
+#line 2947 "Gmsh.y"
     { (yyval.d) = Get_GmshMinorVersion(); ;}
     break;
 
   case 296:
-#line 2923 "Gmsh.y"
+#line 2948 "Gmsh.y"
     { (yyval.d) = Get_GmshPatchVersion(); ;}
     break;
 
   case 297:
-#line 2928 "Gmsh.y"
+#line 2953 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(1) - (1)].c))){
 	yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (1)].c));
@@ -7180,7 +7205,7 @@ yyreduce:
     break;
 
   case 298:
-#line 2941 "Gmsh.y"
+#line 2966 "Gmsh.y"
     {
       char tmpstring[1024];
       sprintf(tmpstring, "%s_%d", (yyvsp[(1) - (5)].c), (int)(yyvsp[(4) - (5)].d)) ;
@@ -7195,7 +7220,7 @@ yyreduce:
     break;
 
   case 299:
-#line 2953 "Gmsh.y"
+#line 2978 "Gmsh.y"
     {
       int index = (int)(yyvsp[(3) - (4)].d);
       if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){
@@ -7213,7 +7238,7 @@ yyreduce:
     break;
 
   case 300:
-#line 2968 "Gmsh.y"
+#line 2993 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(2) - (4)].c))){
 	yymsg(0, "Unknown variable '%s'", (yyvsp[(2) - (4)].c));
@@ -7226,7 +7251,7 @@ yyreduce:
     break;
 
   case 301:
-#line 2978 "Gmsh.y"
+#line 3003 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(1) - (2)].c))){
 	yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (2)].c));
@@ -7239,7 +7264,7 @@ yyreduce:
     break;
 
   case 302:
-#line 2988 "Gmsh.y"
+#line 3013 "Gmsh.y"
     {
       int index = (int)(yyvsp[(3) - (5)].d);
       if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){
@@ -7257,7 +7282,7 @@ yyreduce:
     break;
 
   case 303:
-#line 3006 "Gmsh.y"
+#line 3031 "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));
@@ -7265,7 +7290,7 @@ yyreduce:
     break;
 
   case 304:
-#line 3011 "Gmsh.y"
+#line 3036 "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));
@@ -7273,7 +7298,7 @@ yyreduce:
     break;
 
   case 305:
-#line 3016 "Gmsh.y"
+#line 3041 "Gmsh.y"
     {
       double d = 0.;
       if(NumberOption(GMSH_GET, (yyvsp[(1) - (4)].c), 0, (yyvsp[(3) - (4)].c), d)){
@@ -7286,7 +7311,7 @@ yyreduce:
     break;
 
   case 306:
-#line 3026 "Gmsh.y"
+#line 3051 "Gmsh.y"
     {
       double d = 0.;
       if(NumberOption(GMSH_GET, (yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c), d)){
@@ -7299,7 +7324,7 @@ yyreduce:
     break;
 
   case 307:
-#line 3036 "Gmsh.y"
+#line 3061 "Gmsh.y"
     { 
       (yyval.d) = Msg::GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d));
       Free((yyvsp[(3) - (6)].c));
@@ -7307,70 +7332,70 @@ yyreduce:
     break;
 
   case 308:
-#line 3044 "Gmsh.y"
+#line 3069 "Gmsh.y"
     {
       memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double));
     ;}
     break;
 
   case 309:
-#line 3048 "Gmsh.y"
+#line 3073 "Gmsh.y"
     {
       for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i];
     ;}
     break;
 
   case 310:
-#line 3052 "Gmsh.y"
+#line 3077 "Gmsh.y"
     { 
       for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i];
     ;}
     break;
 
   case 311:
-#line 3056 "Gmsh.y"
+#line 3081 "Gmsh.y"
     { 
       for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i];
     ;}
     break;
 
   case 312:
-#line 3060 "Gmsh.y"
+#line 3085 "Gmsh.y"
     {
       for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i];
     ;}
     break;
 
   case 313:
-#line 3067 "Gmsh.y"
+#line 3092 "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 314:
-#line 3071 "Gmsh.y"
+#line 3096 "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 315:
-#line 3075 "Gmsh.y"
+#line 3100 "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 316:
-#line 3079 "Gmsh.y"
+#line 3104 "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 317:
-#line 3086 "Gmsh.y"
+#line 3111 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(List_T*));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].l)));
@@ -7378,14 +7403,14 @@ yyreduce:
     break;
 
   case 318:
-#line 3091 "Gmsh.y"
+#line 3116 "Gmsh.y"
     {
       List_Add((yyval.l), &((yyvsp[(3) - (3)].l)));
     ;}
     break;
 
   case 319:
-#line 3098 "Gmsh.y"
+#line 3123 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].d)));
@@ -7393,14 +7418,14 @@ yyreduce:
     break;
 
   case 320:
-#line 3103 "Gmsh.y"
+#line 3128 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(1) - (1)].l);
     ;}
     break;
 
   case 321:
-#line 3107 "Gmsh.y"
+#line 3132 "Gmsh.y"
     {
       // creates an empty list
       (yyval.l) = List_Create(2, 1, sizeof(double));
@@ -7408,14 +7433,14 @@ yyreduce:
     break;
 
   case 322:
-#line 3112 "Gmsh.y"
+#line 3137 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(2) - (3)].l);
     ;}
     break;
 
   case 323:
-#line 3116 "Gmsh.y"
+#line 3141 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(3) - (4)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
@@ -7426,7 +7451,7 @@ yyreduce:
     break;
 
   case 324:
-#line 3124 "Gmsh.y"
+#line 3149 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(4) - (5)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
@@ -7437,14 +7462,14 @@ yyreduce:
     break;
 
   case 325:
-#line 3135 "Gmsh.y"
+#line 3160 "Gmsh.y"
     { 
       (yyval.l) = (yyvsp[(1) - (1)].l); 
     ;}
     break;
 
   case 326:
-#line 3139 "Gmsh.y"
+#line 3164 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (1)].c), "*") || !strcmp((yyvsp[(1) - (1)].c), "all"))
         (yyval.l) = 0;
@@ -7456,7 +7481,7 @@ yyreduce:
     break;
 
   case 327:
-#line 3151 "Gmsh.y"
+#line 3176 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(2) - (2)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
@@ -7467,7 +7492,7 @@ yyreduce:
     break;
 
   case 328:
-#line 3159 "Gmsh.y"
+#line 3184 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(3) - (3)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
@@ -7478,7 +7503,7 @@ yyreduce:
     break;
 
   case 329:
-#line 3167 "Gmsh.y"
+#line 3192 "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)); 
@@ -7488,7 +7513,7 @@ yyreduce:
     break;
 
   case 330:
-#line 3174 "Gmsh.y"
+#line 3199 "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)){
@@ -7502,7 +7527,7 @@ yyreduce:
     break;
 
   case 331:
-#line 3185 "Gmsh.y"
+#line 3210 "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
@@ -7525,7 +7550,7 @@ yyreduce:
     break;
 
   case 332:
-#line 3205 "Gmsh.y"
+#line 3230 "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++){
@@ -7538,7 +7563,7 @@ yyreduce:
     break;
 
   case 333:
-#line 3215 "Gmsh.y"
+#line 3240 "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++){
@@ -7551,7 +7576,7 @@ yyreduce:
     break;
 
   case 334:
-#line 3225 "Gmsh.y"
+#line 3250 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c)))
@@ -7564,7 +7589,7 @@ yyreduce:
     break;
 
   case 335:
-#line 3235 "Gmsh.y"
+#line 3260 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c)))
@@ -7584,7 +7609,7 @@ yyreduce:
     break;
 
   case 336:
-#line 3255 "Gmsh.y"
+#line 3280 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].d)));
@@ -7592,21 +7617,21 @@ yyreduce:
     break;
 
   case 337:
-#line 3260 "Gmsh.y"
+#line 3285 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(1) - (1)].l);
     ;}
     break;
 
   case 338:
-#line 3264 "Gmsh.y"
+#line 3289 "Gmsh.y"
     {
       List_Add((yyval.l), &((yyvsp[(3) - (3)].d)));
     ;}
     break;
 
   case 339:
-#line 3268 "Gmsh.y"
+#line 3293 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){
 	double d;
@@ -7618,21 +7643,21 @@ yyreduce:
     break;
 
   case 340:
-#line 3280 "Gmsh.y"
+#line 3305 "Gmsh.y"
     {
       (yyval.u) = CTX.PACK_COLOR((int)(yyvsp[(2) - (9)].d), (int)(yyvsp[(4) - (9)].d), (int)(yyvsp[(6) - (9)].d), (int)(yyvsp[(8) - (9)].d));
     ;}
     break;
 
   case 341:
-#line 3284 "Gmsh.y"
+#line 3309 "Gmsh.y"
     {
       (yyval.u) = CTX.PACK_COLOR((int)(yyvsp[(2) - (7)].d), (int)(yyvsp[(4) - (7)].d), (int)(yyvsp[(6) - (7)].d), 255);
     ;}
     break;
 
   case 342:
-#line 3296 "Gmsh.y"
+#line 3321 "Gmsh.y"
     {
       int flag;
       (yyval.u) = Get_ColorForString(ColorString, -1, (yyvsp[(1) - (1)].c), &flag);
@@ -7642,7 +7667,7 @@ yyreduce:
     break;
 
   case 343:
-#line 3303 "Gmsh.y"
+#line 3328 "Gmsh.y"
     {
       unsigned int val = 0;
       ColorOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(5) - (5)].c), val);
@@ -7652,14 +7677,14 @@ yyreduce:
     break;
 
   case 344:
-#line 3313 "Gmsh.y"
+#line 3338 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(2) - (3)].l);
     ;}
     break;
 
   case 345:
-#line 3317 "Gmsh.y"
+#line 3342 "Gmsh.y"
     {
       (yyval.l) = List_Create(256, 10, sizeof(unsigned int));
       GmshColorTable *ct = Get_ColorTable((int)(yyvsp[(3) - (6)].d));
@@ -7674,7 +7699,7 @@ yyreduce:
     break;
 
   case 346:
-#line 3332 "Gmsh.y"
+#line 3357 "Gmsh.y"
     {
       (yyval.l) = List_Create(256, 10, sizeof(unsigned int));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].u)));
@@ -7682,21 +7707,21 @@ yyreduce:
     break;
 
   case 347:
-#line 3337 "Gmsh.y"
+#line 3362 "Gmsh.y"
     {
       List_Add((yyval.l), &((yyvsp[(3) - (3)].u)));
     ;}
     break;
 
   case 348:
-#line 3344 "Gmsh.y"
+#line 3369 "Gmsh.y"
     {
       (yyval.c) = (yyvsp[(1) - (1)].c);
     ;}
     break;
 
   case 349:
-#line 3348 "Gmsh.y"
+#line 3373 "Gmsh.y"
     {
       if(!gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))){
 	yymsg(0, "Unknown string variable '%s'", (yyvsp[(1) - (1)].c));
@@ -7712,7 +7737,7 @@ yyreduce:
     break;
 
   case 350:
-#line 3361 "Gmsh.y"
+#line 3386 "Gmsh.y"
     { 
       const char *val = "";
       StringOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), val);
@@ -7723,7 +7748,7 @@ yyreduce:
     break;
 
   case 351:
-#line 3369 "Gmsh.y"
+#line 3394 "Gmsh.y"
     { 
       const char *val = "";
       StringOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), val);
@@ -7734,14 +7759,14 @@ yyreduce:
     break;
 
   case 352:
-#line 3380 "Gmsh.y"
+#line 3405 "Gmsh.y"
     {
       (yyval.c) = (yyvsp[(1) - (1)].c);
     ;}
     break;
 
   case 353:
-#line 3384 "Gmsh.y"
+#line 3409 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc(32 * sizeof(char));
       time_t now;
@@ -7752,7 +7777,7 @@ yyreduce:
     break;
 
   case 354:
-#line 3392 "Gmsh.y"
+#line 3417 "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));
@@ -7763,7 +7788,7 @@ yyreduce:
     break;
 
   case 355:
-#line 3400 "Gmsh.y"
+#line 3425 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char));
       int i;
@@ -7780,7 +7805,7 @@ yyreduce:
     break;
 
   case 356:
-#line 3414 "Gmsh.y"
+#line 3439 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char));
       int i;
@@ -7797,14 +7822,14 @@ yyreduce:
     break;
 
   case 357:
-#line 3428 "Gmsh.y"
+#line 3453 "Gmsh.y"
     {
       (yyval.c) = (yyvsp[(3) - (4)].c);
     ;}
     break;
 
   case 358:
-#line 3432 "Gmsh.y"
+#line 3457 "Gmsh.y"
     {
       char tmpstring[1024];
       int i = PrintListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring);
@@ -7827,7 +7852,7 @@ yyreduce:
 
 
 /* Line 1267 of yacc.c.  */
-#line 7831 "Gmsh.tab.cpp"
+#line 7856 "Gmsh.tab.cpp"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -8041,7 +8066,7 @@ yyreturn:
 }
 
 
-#line 3452 "Gmsh.y"
+#line 3477 "Gmsh.y"
 
 
 int PrintListOfDouble(char *format, List_T *list, char *buffer)
diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y
index 23f7868d95b2d8ef59ada6170adc489625a4e0b1..e7e7255da85a7562062718cb575ddafc04148663 100644
--- a/Parser/Gmsh.y
+++ b/Parser/Gmsh.y
@@ -2519,34 +2519,59 @@ RecombineAngle :
 ;
 
 Transfinite : 
-    tTransfinite tLine ListOfDouble tAFFECT FExpr TransfiniteType tEND
+    tTransfinite tLine ListOfDoubleOrAll tAFFECT FExpr TransfiniteType tEND
     {
       int type = (int)$6[0];
       double coef = fabs($6[1]);
-      for(int i = 0; i < List_Nbr($3); i++){
-	double d;
-	List_Read($3, i, &d);
-	int j = (int)fabs(d);
-        Curve *c = FindCurve(j);
-	if(c){
-	  c->Method = MESH_TRANSFINITE;
-	  c->nbPointsTransfinite = ($5 > 2) ? (int)$5 : 2;
-	  c->typeTransfinite = type * sign(d);
-	  c->coeffTransfinite = coef;
-	}
+      if(!$3){
+        List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Curves);
+        if(List_Nbr(tmp)){
+          for(int i = 0; i < List_Nbr(tmp); i++){
+            Curve *c;
+            List_Read(tmp, i, &c);
+            c->Method = MESH_TRANSFINITE;
+            c->nbPointsTransfinite = ($5 > 2) ? (int)$5 : 2;
+            c->typeTransfinite = type;
+            c->coeffTransfinite = coef;
+          }
+        }
         else{
-	  GEdge *ge = GModel::current()->getEdgeByTag(j);
-          if(ge){
-            ge->meshAttributes.Method = MESH_TRANSFINITE;
-            ge->meshAttributes.nbPointsTransfinite = ($5 > 2) ? (int)$5 : 2;
-            ge->meshAttributes.typeTransfinite = type * sign(d);
-            ge->meshAttributes.coeffTransfinite = coef;
+          for(GModel::eiter it = GModel::current()->firstEdge(); 
+              it != GModel::current()->lastEdge(); it++){
+            (*it)->meshAttributes.Method = MESH_TRANSFINITE;
+            (*it)->meshAttributes.nbPointsTransfinite = ($5 > 2) ? (int)$5 : 2;
+            (*it)->meshAttributes.typeTransfinite = type;
+            (*it)->meshAttributes.coeffTransfinite = coef;
           }
-          else
-	    yymsg(0, "Unknown line %d", j);
         }
+        List_Delete(tmp);
+      }
+      else{
+        for(int i = 0; i < List_Nbr($3); i++){
+          double d;
+          List_Read($3, i, &d);
+          int j = (int)fabs(d);
+          Curve *c = FindCurve(j);
+          if(c){
+            c->Method = MESH_TRANSFINITE;
+            c->nbPointsTransfinite = ($5 > 2) ? (int)$5 : 2;
+            c->typeTransfinite = type * sign(d);
+            c->coeffTransfinite = coef;
+          }
+          else{
+            GEdge *ge = GModel::current()->getEdgeByTag(j);
+            if(ge){
+              ge->meshAttributes.Method = MESH_TRANSFINITE;
+              ge->meshAttributes.nbPointsTransfinite = ($5 > 2) ? (int)$5 : 2;
+              ge->meshAttributes.typeTransfinite = type * sign(d);
+              ge->meshAttributes.coeffTransfinite = coef;
+            }
+            else
+              yymsg(0, "Unknown line %d", j);
+          }
+        }
+        List_Delete($3);
       }
-      List_Delete($3);
     }
   | tTransfinite tSurface ListOfDoubleOrAll TransfiniteCorners TransfiniteArrangement tEND
     {
diff --git a/benchmarks/3d/sphere_in_sphere_hexa.geo b/benchmarks/3d/sphere_in_sphere_hexa.geo
index f1bbd253ffc6227fd28d6a2f9a6267b9b53eadc1..784956bedf7d5615d7d18d524b79a6bff695f773 100644
--- a/benchmarks/3d/sphere_in_sphere_hexa.geo
+++ b/benchmarks/3d/sphere_in_sphere_hexa.geo
@@ -74,20 +74,6 @@ Line Loop(108) = {9,104,-33,-100};  Plane Surface(108) = {108};
 Line Loop(109) = {10,105,-34,-101}; Plane Surface(109) = {109};
 Line Loop(110) = {11,106,-35,-102}; Plane Surface(110) = {110};
 Line Loop(111) = {12,107,-36,-103}; Plane Surface(111) = {111};
-Transfinite Line{100:107} = n_layer;
-Transfinite Surface{100} = {2,3,11,10};
-Transfinite Surface{101} = {3,4,12,11};
-Transfinite Surface{102} = {4,5,13,12};
-Transfinite Surface{103} = {5,2,10,13};
-Transfinite Surface{104} = {6,7,15,14};
-Transfinite Surface{105} = {7,8,16,15};
-Transfinite Surface{106} = {8,9,17,16};
-Transfinite Surface{107} = {9,6,14,17};
-Transfinite Surface{108} = {2,6,14,10};
-Transfinite Surface{109} = {3,7,15,11};
-Transfinite Surface{110} = {4,8,16,12};
-Transfinite Surface{111} = {5,9,17,13};
-Recombine Surface{100:111};
 
 Surface Loop(1) = {19,-100,-101,-102,-103,-43}; Volume(1) = {1};
 Surface Loop(2) = {20,-104,-105,-106,-107,-44}; Volume(2) = {2};
@@ -96,12 +82,10 @@ Surface Loop(4) = {46,101,-22,110,-105,-109}; Volume(4) = {4};
 Surface Loop(5) = {23,-102,-111,106,-47,110}; Volume(5) = {5};
 Surface Loop(6) = {24,-103,-108,107,-48,111}; Volume(6) = {6};
 
-Transfinite Volume{1} = {2,3,4,5,10,11,12,13};
-Transfinite Volume{2} = {6,7,8,9,14,15,16,17};
-Transfinite Volume{3} = {2,3,7,6,10,11,15,14};
-Transfinite Volume{4} = {3,7,8,4,11,15,16,12};
-Transfinite Volume{5} = {8,9,5,4,16,17,13,12};
-Transfinite Volume{6} = {9,5,2,6,17,13,10,14};
+Transfinite Line{100:107} = n_layer;
+Transfinite Surface "*";
+Recombine Surface "*";
+Transfinite Volume "*";
 
 Physical Volume(1) = {1:6};
 Physical Surface(2) = {19:24}; // inner
diff --git a/demos/transfinite.geo b/demos/transfinite.geo
index c08bd2070565a018ad44bd49c75603746d3929f6..e3ccfb61cafd2ee532a9e2f195bcac35db63fcdc 100644
--- a/demos/transfinite.geo
+++ b/demos/transfinite.geo
@@ -1,147 +1,81 @@
-// Here's an example using Transfinite meshes
+l = 1;
+r1 = 2;
+r2 = 0.5;
+n = 10;
+n2 = n;
+progr = 2;
 
-r_int  = 0.05 ;
-r_ext  = 0.051 ;
-r_far  = 0.125 ;
-r_inf  = 0.4 ;
-phi1   = 30. * (Pi/180.) ;
-angl   = 45. * (Pi/180.) ;
+// exterior cube
+Point(1) = {0,0,0,l};
+Point(2) = {r1,r1,-r1,l};
+Point(3) = {-r1,r1,-r1,l};
+Point(4) = {-r1,-r1,-r1,l};
+Point(5) = {r1,-r1,-r1,l};
+Line(1) = {2,3};
+Line(2) = {3,4};
+Line(3) = {4,5};
+Line(4) = {5,2};
+Line Loop(5) = {4,1,2,3};
+Plane Surface(6) = {5};
+Extrude Surface {6, {0.0,0.0,2*r1}};
+Delete { Volume{1}; }
 
-nbpt_phi   = 5 ; nbpt_int   = 20 ;
-nbpt_arc1  = 10 ; nbpt_arc2  = 10 ;
-nbpt_shell = 10 ; nbpt_far   = 25 ; nbpt_inf = 15 ;
+// interior sphere
+Point(102) = {r2,r2,-r2,l};
+Point(103) = {-r2,r2,-r2,l};
+Point(104) = {-r2,-r2,-r2,l};
+Point(105) = {r2,-r2,-r2,l};
+Circle(29) = {103,1,102};
+Circle(30) = {102,1,105};
+Circle(31) = {105,1,104};
+Circle(32) = {104,1,103};
+Line Loop(33) = {29,30,31,32};
+Ruled Surface(34) = {33};
+Rotate { {1,0,0},{0,0,0}, Pi/2 } { Duplicata{ Surface{34}; } }
+Rotate { {1,0,0},{0,0,0}, Pi } { Duplicata{ Surface{34}; } }
+Rotate { {1,0,0},{0,0,0}, 3*Pi/2 } { Duplicata{ Surface{34}; } }
+Rotate { {0,1,0},{0,0,0}, Pi/2 } { Duplicata { Surface{34}; } }
+Rotate { {0,1,0},{0,0,0}, -Pi/2 } { Duplicata { Surface{34}; } }
 
-lc0 = 0.1 ; lc1 = 0.1 ; lc2 = 0.3 ;
+// connect sphere and cube
+Line(52) = {102,2};
+Line(53) = {108,7};
+Line(54) = {105,5};
+Line(55) = {111,6};
+Line(56) = {109,15};
+Line(57) = {104,4};
+Line(58) = {103,3};
+Line(59) = {106,11};
 
-Point(1) = {0,     0, 0, lc0} ;
-Point(2) = {r_int, 0, 0, lc0} ;
-Point(3) = {r_ext, 0, 0, lc1} ;
-Point(4) = {r_far, 0, 0, lc2} ;
-Point(5) = {r_inf, 0, 0, lc2} ;
-Point(6) = {0, 0,  r_int, lc0} ;
-Point(7) = {0, 0,  r_ext, lc1} ;
-Point(8) = {0, 0,  r_far, lc2} ;
-Point(9) = {0, 0,  r_inf, lc2} ;
+Line Loop(60) = {58,-1,-52,-29};Plane Surface(61) = {60};
+Line Loop(62) = {58,18,-59,-39};Plane Surface(63) = {62};
+Line Loop(64) = {59,-9,-53,-36};Plane Surface(65) = {64};
+Line Loop(66) = {37,52,14,-53};Plane Surface(67) = {66};
+Line Loop(68) = {56,-22,-57,-49};Plane Surface(69) = {68};
+Line Loop(70) = {31,57,3,-54};Plane Surface(71) = {70};
+Line Loop(72) = {54,13,-55,-47};Plane Surface(73) = {72};
+Line Loop(74) = {55,-11,-56,41};Plane Surface(75) = {74};
+Line Loop(76) = {59,10,-56,-44};Plane Surface(77) = {76};
+Line Loop(78) = {58,2,-57,32};Plane Surface(79) = {78};
+Line Loop(80) = {52,-4,-54,-30};Plane Surface(81) = {80};
+Line Loop(82) = {42,53,-8,-55};Plane Surface(83) = {82};
 
-Point(10) = {r_int*Cos(phi1), r_int*Sin(phi1), 0, lc0} ;
-Point(11) = {r_ext*Cos(phi1), r_ext*Sin(phi1), 0, lc1} ;
-Point(12) = {r_far*Cos(phi1), r_far*Sin(phi1), 0, lc2} ;
-Point(13) = {r_inf*Cos(phi1), r_inf*Sin(phi1), 0, lc2} ;
+// connection volumes
+Surface Loop(84) = {19,61,-63,-65,67,-35}; Volume(85) = {84};
+Surface Loop(86) = {34,61,-79,6,81,-71}; Volume(87) = {86};
+Surface Loop(88) = {23,-79,63,77,69,-50}; Volume(89) = {88};
+Surface Loop(90) = {28,83,-40,75,-77,65}; Volume(91) = {90};
+Surface Loop(92) = {15,81,-67,-51,-83,73}; Volume(93) = {92};
+Surface Loop(94) = {27,-71,-45,-73,-75,-69}; Volume(95) = {94};
 
-Point(14) = {r_int/2, 0, 0, lc2} ;
-Point(15) = {r_int/2*Cos(phi1), r_int/2*Sin(phi1), 0, lc2} ;
-Point(16) = {r_int/2, 0, r_int/2, lc2} ;
-Point(17) = {r_int/2*Cos(phi1), r_int/2*Sin(phi1), r_int/2, lc2} ;
-Point(18) = {0, 0, r_int/2, lc2} ;
-Point(19) = {r_int*Cos(angl), 0, r_int*Sin(angl), lc2} ;
-Point(20) = {r_int*Cos(angl)*Cos(phi1), r_int*Cos(angl)*Sin(phi1),
-	     r_int*Sin(angl), lc2} ;
-Point(21) = {r_ext*Cos(angl), 0, r_ext*Sin(angl), lc2} ;
-Point(22) = {r_ext*Cos(angl)*Cos(phi1), r_ext*Cos(angl)*Sin(phi1),
-	     r_ext*Sin(angl), lc2} ;
-Point(23) = {r_far*Cos(angl), 0, r_far*Sin(angl), lc2} ;
-Point(24) = {r_far*Cos(angl)*Cos(phi1), r_far*Cos(angl)*Sin(phi1),
-	     r_far*Sin(angl), lc2} ;
-Point(25) = {r_inf, 0, r_inf, lc2} ;
-Point(26) = {r_inf*Cos(phi1), r_inf*Sin(phi1),  r_inf, lc2} ;
-
-Circle(1) = {2,1,19};  Circle(2) = {19,1,6};  Circle(3) = {3,1,21};
-Circle(4) = {21,1,7};  Circle(5) = {4,1,23};  Circle(6) = {23,1,8};   
-Line(7)   = {5,25};    Line(8)   = {25,9};
-Circle(9) = {10,1,20}; Circle(10)= {20,1,6};  Circle(11) = {11,1,22};
-Circle(12)= {22,1,7};  Circle(13)= {12,1,24}; Circle(14) = {24,1,8};
-Line(15)  = {13,26};   Line(16)  = {26,9};
-Circle(17)= {19,1,20}; Circle(18)= {21,1,22}; Circle(19) = {23,1,24};
-Circle(20)= {25,1,26}; Circle(21)= {2,1,10};  Circle(22) = {3,1,11};  
-Circle(23)= {4,1,12};  Circle(24)= {5,1,13};
-
-Line(25) = {1,14};  Line(26) = {14,2};  Line(27) = {2,3};
-Line(28) = {3,4};   Line(29) = {4,5};   Line(30) = {1,15};
-Line(31) = {15,10}; Line(32) = {10,11}; Line(33) = {11,12};
-Line(34) = {12,13}; Line(35) = {14,15}; Line(36) = {14,16};
-Line(37) = {15,17}; Line(38) = {16,17}; Line(39) = {18,16};
-Line(40) = {18,17}; Line(41) = {1,18};  Line(42) = {18,6};
-Line(43) = {6,7};   Line(44) = {16,19}; Line(45) = {19,21};
-Line(46) = {21,23}; Line(47) = {23,25}; Line(48) = {17,20};
-Line(49) = {20,22}; Line(50) = {22,24}; Line(51) = {24,26};
-Line(52) = {7,8};   Line(53) = {8,9};
-
-Line Loop(54) = {39,-36,-25,41};  Ruled Surface(55) = {54};
-Line Loop(56) = {44,-1,-26,36};   Ruled Surface(57) = {56};
-Line Loop(58) = {3,-45,-1,27};    Ruled Surface(59) = {58};
-Line Loop(60) = {5,-46,-3,28};    Ruled Surface(61) = {60};
-Line Loop(62) = {7,-47,-5,29};    Ruled Surface(63) = {62};
-Line Loop(64) = {-2,-44,-39,42};  Ruled Surface(65) = {64};
-Line Loop(66) = {-4,-45,2,43};    Ruled Surface(67) = {66};
-Line Loop(68) = {-6,-46,4,52};    Ruled Surface(69) = {68};
-Line Loop(70) = {-8,-47,6,53};    Ruled Surface(71) = {70};
-Line Loop(72) = {-40,-41,30,37};  Ruled Surface(73) = {72};
-Line Loop(74) = {48,-9,-31,37};   Ruled Surface(75) = {74};
-Line Loop(76) = {49,-11,-32,9};   Ruled Surface(77) = {76};
-Line Loop(78) = {-50,-11,33,13};  Ruled Surface(79) = {78};
-Line Loop(80) = {-51,-13,34,15};  Ruled Surface(81) = {80};
-Line Loop(82) = {10,-42,40,48};   Ruled Surface(83) = {82};
-Line Loop(84) = {12,-43,-10,49};  Ruled Surface(85) = {84};
-Line Loop(86) = {14,-52,-12,50};  Ruled Surface(87) = {86};
-Line Loop(88) = {16,-53,-14,51};  Ruled Surface(89) = {88};
-Line Loop(90) = {-30,25,35};      Ruled Surface(91) = {90};
-Line Loop(92) = {-40,39,38};      Ruled Surface(93) = {92};
-Line Loop(94) = {37,-38,-36,35};  Ruled Surface(95) = {94};
-Line Loop(96) = {-48,-38,44,17};  Ruled Surface(97) = {96};
-Line Loop(98) = {18,-49,-17,45};  Ruled Surface(99) = {98};
-Line Loop(100) = {19,-50,-18,46}; Ruled Surface(101) = {100};
-Line Loop(102) = {20,-51,-19,47}; Ruled Surface(103) = {102};
-Line Loop(104) = {-2,17,10};      Ruled Surface(105) = {104};
-Line Loop(106) = {-9,-21,1,17};   Ruled Surface(107) = {106};
-Line Loop(108) = {-4,18,12};      Ruled Surface(109) = {108};
-Line Loop(110) = {-11,-22,3,18};  Ruled Surface(111) = {110};
-Line Loop(112) = {-13,-23,5,19};  Ruled Surface(113) = {112};
-Line Loop(114) = {-6,19,14};      Ruled Surface(115) = {114};
-Line Loop(116) = {-15,-24,7,20};  Ruled Surface(117) = {116};
-Line Loop(118) = {-8,20,16};      Ruled Surface(119) = {118};
-Line Loop(120) = {-31,-35,26,21}; Ruled Surface(121) = {120};
-Line Loop(122) = {32,-22,-27,21}; Ruled Surface(123) = {122};
-Line Loop(124) = {33,-23,-28,22}; Ruled Surface(125) = {124};
-Line Loop(126) = {34,-24,-29,23}; Ruled Surface(127) = {126};
-
-Surface Loop(128) = {93,-73,-55,95,-91};
-Volume(129) = {128}; // int
-Surface Loop(130) = {107,-75,-97,95,57,121};
-Volume(131) = {130}; // int b
-Surface Loop(132) = {105,-65,-97,-83,-93};
-Volume(133) = {132}; // int h
-Surface Loop(134) = {99,-111,77,123,59,107};
-Volume(135) = {134}; // shell b
-Surface Loop(136) = {99,-109,67,105,85};
-Volume(137) = {136}; // shell h
-Surface Loop(138) = {113,79,-101,-111,-125,-61};
-Volume(139) = {138}; // ext b
-Surface Loop(140) = {115,-69,-101,-87,-109};
-Volume(141) = {140}; // ext h
-Surface Loop(142) = {103,-117,-81,113,127,63};
-Volume(143) = {142}; // inf b
-Surface Loop(144) = {89,-119,71,103,115};
-Volume(145) = {144}; // inf h
-
-// 1. Transfinite line commands specify the number of points on the
-// curves and their distribution (`Progression 2' means that each line
-// element in the series will be twice as long as the preceding one):
-
-Transfinite Line{35,21,22,23,24,38,17,18,19,20} = nbpt_phi ;
-Transfinite Line{31,26,48,44,42} = nbpt_int Using Progression 0.88;
-Transfinite Line{41,37,36,9,11,1,3,13,5,15,7} = nbpt_arc1 ;
-Transfinite Line{30,25,40,39,10,2,12,4,14,6,16,8} = nbpt_arc2 ;
-Transfinite Line{32,27,49,45,43} = nbpt_shell ;
-Transfinite Line{33,28,46,50,52} = nbpt_far Using Progression 1.2 ;
-Transfinite Line{34,29,51,47,53} = nbpt_inf Using Progression 1.05;
-
-// 2. Transfinite surfaces are normally defined by the ordered list of
-// their 3 or 4 transfinite interpolation corners, but when the
-// surfaces have only 3 or 4 sides they can be defined automatically:
+// define transfinite mesh
+Transfinite Line {53, 59, 52, 58, 55, 56, 54, 57} = n Using Progression progr;
+Transfinite Line {42, 44, 30, 32, 36, 41, 29, 31, 9, 1, 8, 4, 11, 3, 10, 2,
+                  18, 22, 14, 13, 39, 49, 37, 47} = n2;
 Transfinite Surface "*";
 Recombine Surface "*";
-
-// 3. Transfinite volumes are also normally defined by an ordered list
-// of the transfinite interpolation corners, but when they have only 5
-// or 6 sides they can be defined automatically:
 Transfinite Volume "*";
+
+Physical Volume(1) = {85:95:2}; // ext volume
+Physical Surface(100) = {34,35,40,45,50,51}; // int surf
+Physical Surface(101) = {6,15,19,23,27,28}; // ext surf
diff --git a/doc/texinfo/gmsh.texi b/doc/texinfo/gmsh.texi
index b42f8ad7ef4dc0ee94e69b1dbd4532a77497ac07..b429a3f62cff96ce519748179d0338fc32e7f6c6 100644
--- a/doc/texinfo/gmsh.texi
+++ b/doc/texinfo/gmsh.texi
@@ -2085,7 +2085,7 @@ above.
 @item Extrude @{ Surface @{ @var{expression-list} @}; @var{layers} @}
 Extrudes a boundary layer along the normals of the specified surfaces.
 
-@item Transfinite Line @{ @var{expression-list} @} = @var{expression} < Using Progression | Bump @var{expression} >;
+@item Transfinite Line @{ @var{expression-list} @} | "*" = @var{expression} < Using Progression | Bump @var{expression} >;
 Selects the lines in @var{expression-list} to be meshed with the 1D
 transfinite algorithm. The @var{expression} on the right hand side gives the
 number of nodes that will be created on the line (this overrides any