1722 lines
58 KiB

  1. /* A Bison parser, made by GNU Bison 2.5. */
  2. /* Skeleton implementation for Bison LALR(1) parsers in C++
  3. Copyright (C) 2002-2011 Free Software Foundation, Inc.
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  14. /* As a special exception, you may create a larger work that contains
  15. part or all of the Bison parser skeleton and distribute that work
  16. under terms of your choice, so long as that work isn't itself a
  17. parser generator using the skeleton or a modified version thereof
  18. as a parser skeleton. Alternatively, if you modify or redistribute
  19. the parser skeleton itself, you may (at your option) remove this
  20. special exception, which will cause the skeleton and the resulting
  21. Bison output files to be licensed under the GNU General Public
  22. License without this special exception.
  23. This special exception was added by the Free Software Foundation in
  24. version 2.2 of Bison. */
  25. // Take the name prefix into account.
  26. #define yylex lollex
  27. /* First part of user declarations. */
  28. /* Line 293 of lalr1.cc */
  29. #line 1 "easymesh/easymesh-parser.y"
  30. //
  31. // Lol Engine
  32. //
  33. // Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net>
  34. // (c) 2009-2013 Cédric Lecacheur <jordx@free.fr>
  35. // (c) 2009-2013 Benjamin "Touky" Huet <huet.benjamin@gmail.com>
  36. // This program is free software; you can redistribute it and/or
  37. // modify it under the terms of the Do What The Fuck You Want To
  38. // Public License, Version 2, as published by Sam Hocevar. See
  39. // http://www.wtfpl.net/ for more details.
  40. //
  41. #if defined HAVE_CONFIG_H
  42. # include "config.h"
  43. #endif
  44. #include "core.h"
  45. #include "easymesh/easymesh.h"
  46. #include <string>
  47. /* Line 293 of lalr1.cc */
  48. #line 66 "generated/easymesh-parser.cpp"
  49. #include "easymesh-parser.h"
  50. /* User implementation prologue. */
  51. /* Line 299 of lalr1.cc */
  52. #line 66 "easymesh/easymesh-parser.y"
  53. #include "easymesh/easymesh-compiler.h"
  54. #undef yylex
  55. #define yylex mc.m_lexer->lex
  56. /* Line 299 of lalr1.cc */
  57. #line 83 "generated/easymesh-parser.cpp"
  58. #ifndef YY_
  59. # if defined YYENABLE_NLS && YYENABLE_NLS
  60. # if ENABLE_NLS
  61. # include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */
  62. # define YY_(msgid) dgettext ("bison-runtime", msgid)
  63. # endif
  64. # endif
  65. # ifndef YY_
  66. # define YY_(msgid) msgid
  67. # endif
  68. #endif
  69. /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
  70. If N is 0, then set CURRENT to the empty location which ends
  71. the previous symbol: RHS[0] (always defined). */
  72. #define YYRHSLOC(Rhs, K) ((Rhs)[K])
  73. #ifndef YYLLOC_DEFAULT
  74. # define YYLLOC_DEFAULT(Current, Rhs, N) \
  75. do \
  76. if (N) \
  77. { \
  78. (Current).begin = YYRHSLOC (Rhs, 1).begin; \
  79. (Current).end = YYRHSLOC (Rhs, N).end; \
  80. } \
  81. else \
  82. { \
  83. (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
  84. } \
  85. while (false)
  86. #endif
  87. /* Suppress unused-variable warnings by "using" E. */
  88. #define YYUSE(e) ((void) (e))
  89. /* Enable debugging if requested. */
  90. #if YYDEBUG
  91. /* A pseudo ostream that takes yydebug_ into account. */
  92. # define YYCDEBUG if (yydebug_) (*yycdebug_)
  93. # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
  94. do { \
  95. if (yydebug_) \
  96. { \
  97. *yycdebug_ << Title << ' '; \
  98. yy_symbol_print_ ((Type), (Value), (Location)); \
  99. *yycdebug_ << std::endl; \
  100. } \
  101. } while (false)
  102. # define YY_REDUCE_PRINT(Rule) \
  103. do { \
  104. if (yydebug_) \
  105. yy_reduce_print_ (Rule); \
  106. } while (false)
  107. # define YY_STACK_PRINT() \
  108. do { \
  109. if (yydebug_) \
  110. yystack_print_ (); \
  111. } while (false)
  112. #else /* !YYDEBUG */
  113. # define YYCDEBUG if (false) std::cerr
  114. # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
  115. # define YY_REDUCE_PRINT(Rule)
  116. # define YY_STACK_PRINT()
  117. #endif /* !YYDEBUG */
  118. #define yyerrok (yyerrstatus_ = 0)
  119. #define yyclearin (yychar = yyempty_)
  120. #define YYACCEPT goto yyacceptlab
  121. #define YYABORT goto yyabortlab
  122. #define YYERROR goto yyerrorlab
  123. #define YYRECOVERING() (!!yyerrstatus_)
  124. namespace lol {
  125. /* Line 382 of lalr1.cc */
  126. #line 169 "generated/easymesh-parser.cpp"
  127. /* Return YYSTR after stripping away unnecessary quotes and
  128. backslashes, so that it's suitable for yyerror. The heuristic is
  129. that double-quoting is unnecessary unless the string contains an
  130. apostrophe, a comma, or backslash (other than backslash-backslash).
  131. YYSTR is taken from yytname. */
  132. std::string
  133. EasyMeshParser::yytnamerr_ (const char *yystr)
  134. {
  135. if (*yystr == '"')
  136. {
  137. std::string yyr = "";
  138. char const *yyp = yystr;
  139. for (;;)
  140. switch (*++yyp)
  141. {
  142. case '\'':
  143. case ',':
  144. goto do_not_strip_quotes;
  145. case '\\':
  146. if (*++yyp != '\\')
  147. goto do_not_strip_quotes;
  148. /* Fall through. */
  149. default:
  150. yyr += *yyp;
  151. break;
  152. case '"':
  153. return yyr;
  154. }
  155. do_not_strip_quotes: ;
  156. }
  157. return yystr;
  158. }
  159. /// Build a parser object.
  160. EasyMeshParser::EasyMeshParser (class EasyMeshCompiler& mc_yyarg)
  161. :
  162. #if YYDEBUG
  163. yydebug_ (false),
  164. yycdebug_ (&std::cerr),
  165. #endif
  166. mc (mc_yyarg)
  167. {
  168. }
  169. EasyMeshParser::~EasyMeshParser ()
  170. {
  171. }
  172. #if YYDEBUG
  173. /*--------------------------------.
  174. | Print this symbol on YYOUTPUT. |
  175. `--------------------------------*/
  176. inline void
  177. EasyMeshParser::yy_symbol_value_print_ (int yytype,
  178. const semantic_type* yyvaluep, const location_type* yylocationp)
  179. {
  180. YYUSE (yylocationp);
  181. YYUSE (yyvaluep);
  182. switch (yytype)
  183. {
  184. default:
  185. break;
  186. }
  187. }
  188. void
  189. EasyMeshParser::yy_symbol_print_ (int yytype,
  190. const semantic_type* yyvaluep, const location_type* yylocationp)
  191. {
  192. *yycdebug_ << (yytype < yyntokens_ ? "token" : "nterm")
  193. << ' ' << yytname_[yytype] << " ("
  194. << *yylocationp << ": ";
  195. yy_symbol_value_print_ (yytype, yyvaluep, yylocationp);
  196. *yycdebug_ << ')';
  197. }
  198. #endif
  199. void
  200. EasyMeshParser::yydestruct_ (const char* yymsg,
  201. int yytype, semantic_type* yyvaluep, location_type* yylocationp)
  202. {
  203. YYUSE (yylocationp);
  204. YYUSE (yymsg);
  205. YYUSE (yyvaluep);
  206. YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
  207. switch (yytype)
  208. {
  209. default:
  210. break;
  211. }
  212. }
  213. void
  214. EasyMeshParser::yypop_ (unsigned int n)
  215. {
  216. yystate_stack_.pop (n);
  217. yysemantic_stack_.pop (n);
  218. yylocation_stack_.pop (n);
  219. }
  220. #if YYDEBUG
  221. std::ostream&
  222. EasyMeshParser::debug_stream () const
  223. {
  224. return *yycdebug_;
  225. }
  226. void
  227. EasyMeshParser::set_debug_stream (std::ostream& o)
  228. {
  229. yycdebug_ = &o;
  230. }
  231. EasyMeshParser::debug_level_type
  232. EasyMeshParser::debug_level () const
  233. {
  234. return yydebug_;
  235. }
  236. void
  237. EasyMeshParser::set_debug_level (debug_level_type l)
  238. {
  239. yydebug_ = l;
  240. }
  241. #endif
  242. inline bool
  243. EasyMeshParser::yy_pact_value_is_default_ (int yyvalue)
  244. {
  245. return yyvalue == yypact_ninf_;
  246. }
  247. inline bool
  248. EasyMeshParser::yy_table_value_is_error_ (int yyvalue)
  249. {
  250. return yyvalue == yytable_ninf_;
  251. }
  252. int
  253. EasyMeshParser::parse ()
  254. {
  255. /// Lookahead and lookahead in internal form.
  256. int yychar = yyempty_;
  257. int yytoken = 0;
  258. /* State. */
  259. int yyn;
  260. int yylen = 0;
  261. int yystate = 0;
  262. /* Error handling. */
  263. int yynerrs_ = 0;
  264. int yyerrstatus_ = 0;
  265. /// Semantic value of the lookahead.
  266. semantic_type yylval;
  267. /// Location of the lookahead.
  268. location_type yylloc;
  269. /// The locations where the error started and ended.
  270. location_type yyerror_range[3];
  271. /// $$.
  272. semantic_type yyval;
  273. /// @$.
  274. location_type yyloc;
  275. int yyresult;
  276. YYCDEBUG << "Starting parse" << std::endl;
  277. /* Initialize the stacks. The initial state will be pushed in
  278. yynewstate, since the latter expects the semantical and the
  279. location values to have been already stored, initialize these
  280. stacks with a primary value. */
  281. yystate_stack_ = state_stack_type (0);
  282. yysemantic_stack_ = semantic_stack_type (0);
  283. yylocation_stack_ = location_stack_type (0);
  284. yysemantic_stack_.push (yylval);
  285. yylocation_stack_.push (yylloc);
  286. /* New state. */
  287. yynewstate:
  288. yystate_stack_.push (yystate);
  289. YYCDEBUG << "Entering state " << yystate << std::endl;
  290. /* Accept? */
  291. if (yystate == yyfinal_)
  292. goto yyacceptlab;
  293. goto yybackup;
  294. /* Backup. */
  295. yybackup:
  296. /* Try to take a decision without lookahead. */
  297. yyn = yypact_[yystate];
  298. if (yy_pact_value_is_default_ (yyn))
  299. goto yydefault;
  300. /* Read a lookahead token. */
  301. if (yychar == yyempty_)
  302. {
  303. YYCDEBUG << "Reading a token: ";
  304. yychar = yylex (&yylval, &yylloc);
  305. }
  306. /* Convert token to internal form. */
  307. if (yychar <= yyeof_)
  308. {
  309. yychar = yytoken = yyeof_;
  310. YYCDEBUG << "Now at end of input." << std::endl;
  311. }
  312. else
  313. {
  314. yytoken = yytranslate_ (yychar);
  315. YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
  316. }
  317. /* If the proper action on seeing token YYTOKEN is to reduce or to
  318. detect an error, take that action. */
  319. yyn += yytoken;
  320. if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yytoken)
  321. goto yydefault;
  322. /* Reduce or error. */
  323. yyn = yytable_[yyn];
  324. if (yyn <= 0)
  325. {
  326. if (yy_table_value_is_error_ (yyn))
  327. goto yyerrlab;
  328. yyn = -yyn;
  329. goto yyreduce;
  330. }
  331. /* Shift the lookahead token. */
  332. YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
  333. /* Discard the token being shifted. */
  334. yychar = yyempty_;
  335. yysemantic_stack_.push (yylval);
  336. yylocation_stack_.push (yylloc);
  337. /* Count tokens shifted since error; after three, turn off error
  338. status. */
  339. if (yyerrstatus_)
  340. --yyerrstatus_;
  341. yystate = yyn;
  342. goto yynewstate;
  343. /*-----------------------------------------------------------.
  344. | yydefault -- do the default action for the current state. |
  345. `-----------------------------------------------------------*/
  346. yydefault:
  347. yyn = yydefact_[yystate];
  348. if (yyn == 0)
  349. goto yyerrlab;
  350. goto yyreduce;
  351. /*-----------------------------.
  352. | yyreduce -- Do a reduction. |
  353. `-----------------------------*/
  354. yyreduce:
  355. yylen = yyr2_[yyn];
  356. /* If YYLEN is nonzero, implement the default value of the action:
  357. `$$ = $1'. Otherwise, use the top of the stack.
  358. Otherwise, the following line sets YYVAL to garbage.
  359. This behavior is undocumented and Bison
  360. users should not rely upon it. */
  361. if (yylen)
  362. yyval = yysemantic_stack_[yylen - 1];
  363. else
  364. yyval = yysemantic_stack_[0];
  365. {
  366. slice<location_type, location_stack_type> slice (yylocation_stack_, yylen);
  367. YYLLOC_DEFAULT (yyloc, slice, yylen);
  368. }
  369. YY_REDUCE_PRINT (yyn);
  370. switch (yyn)
  371. {
  372. case 7:
  373. /* Line 690 of lalr1.cc */
  374. #line 90 "easymesh/easymesh-parser.y"
  375. { mc.m_mesh.OpenBrace(); }
  376. break;
  377. case 8:
  378. /* Line 690 of lalr1.cc */
  379. #line 94 "easymesh/easymesh-parser.y"
  380. { mc.m_mesh.CloseBrace(); }
  381. break;
  382. case 14:
  383. /* Line 690 of lalr1.cc */
  384. #line 109 "easymesh/easymesh-parser.y"
  385. { mc.m_mesh.SetCurColor(vec4((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3)); }
  386. break;
  387. case 15:
  388. /* Line 690 of lalr1.cc */
  389. #line 110 "easymesh/easymesh-parser.y"
  390. { uint32_t x = (yysemantic_stack_[(2) - (2)].u32val);
  391. vec4 v(x >> 24, (x >> 16) & 0xff, (x >> 8) & 0xff, x & 0xff);
  392. mc.m_mesh.SetCurColor(vec4(v) * (1.f / 255)); }
  393. break;
  394. case 16:
  395. /* Line 690 of lalr1.cc */
  396. #line 113 "easymesh/easymesh-parser.y"
  397. { mc.m_mesh.SetCurColor2(vec4((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3)); }
  398. break;
  399. case 17:
  400. /* Line 690 of lalr1.cc */
  401. #line 114 "easymesh/easymesh-parser.y"
  402. { uint32_t x = (yysemantic_stack_[(2) - (2)].u32val);
  403. vec4 v(x >> 24, (x >> 16) & 0xff, (x >> 8) & 0xff, x & 0xff);
  404. mc.m_mesh.SetCurColor2(vec4(v) * (1.f / 255)); }
  405. break;
  406. case 18:
  407. /* Line 690 of lalr1.cc */
  408. #line 120 "easymesh/easymesh-parser.y"
  409. { mc.m_mesh.Chamfer((yysemantic_stack_[(2) - (2)].args).f0); }
  410. break;
  411. case 19:
  412. /* Line 690 of lalr1.cc */
  413. #line 121 "easymesh/easymesh-parser.y"
  414. { mc.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].args).f0, 0, 0)); }
  415. break;
  416. case 20:
  417. /* Line 690 of lalr1.cc */
  418. #line 122 "easymesh/easymesh-parser.y"
  419. { mc.m_mesh.Translate(vec3(0, (yysemantic_stack_[(2) - (2)].args).f0, 0)); }
  420. break;
  421. case 21:
  422. /* Line 690 of lalr1.cc */
  423. #line 123 "easymesh/easymesh-parser.y"
  424. { mc.m_mesh.Translate(vec3(0, 0, (yysemantic_stack_[(2) - (2)].args).f0)); }
  425. break;
  426. case 22:
  427. /* Line 690 of lalr1.cc */
  428. #line 124 "easymesh/easymesh-parser.y"
  429. { mc.m_mesh.Translate(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); }
  430. break;
  431. case 23:
  432. /* Line 690 of lalr1.cc */
  433. #line 125 "easymesh/easymesh-parser.y"
  434. { mc.m_mesh.RotateX((yysemantic_stack_[(2) - (2)].args).f0); }
  435. break;
  436. case 24:
  437. /* Line 690 of lalr1.cc */
  438. #line 126 "easymesh/easymesh-parser.y"
  439. { mc.m_mesh.RotateY((yysemantic_stack_[(2) - (2)].args).f0); }
  440. break;
  441. case 25:
  442. /* Line 690 of lalr1.cc */
  443. #line 127 "easymesh/easymesh-parser.y"
  444. { mc.m_mesh.RotateZ((yysemantic_stack_[(2) - (2)].args).f0); }
  445. break;
  446. case 26:
  447. /* Line 690 of lalr1.cc */
  448. #line 128 "easymesh/easymesh-parser.y"
  449. { mc.m_mesh.TaperX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
  450. break;
  451. case 27:
  452. /* Line 690 of lalr1.cc */
  453. #line 129 "easymesh/easymesh-parser.y"
  454. { mc.m_mesh.TaperX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); }
  455. break;
  456. case 28:
  457. /* Line 690 of lalr1.cc */
  458. #line 130 "easymesh/easymesh-parser.y"
  459. { mc.m_mesh.TaperY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
  460. break;
  461. case 29:
  462. /* Line 690 of lalr1.cc */
  463. #line 131 "easymesh/easymesh-parser.y"
  464. { mc.m_mesh.TaperY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); }
  465. break;
  466. case 30:
  467. /* Line 690 of lalr1.cc */
  468. #line 132 "easymesh/easymesh-parser.y"
  469. { mc.m_mesh.TaperZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
  470. break;
  471. case 31:
  472. /* Line 690 of lalr1.cc */
  473. #line 133 "easymesh/easymesh-parser.y"
  474. { mc.m_mesh.TaperZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); }
  475. break;
  476. case 32:
  477. /* Line 690 of lalr1.cc */
  478. #line 134 "easymesh/easymesh-parser.y"
  479. { mc.m_mesh.TwistX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
  480. break;
  481. case 33:
  482. /* Line 690 of lalr1.cc */
  483. #line 135 "easymesh/easymesh-parser.y"
  484. { mc.m_mesh.TwistY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
  485. break;
  486. case 34:
  487. /* Line 690 of lalr1.cc */
  488. #line 136 "easymesh/easymesh-parser.y"
  489. { mc.m_mesh.TwistZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
  490. break;
  491. case 35:
  492. /* Line 690 of lalr1.cc */
  493. #line 137 "easymesh/easymesh-parser.y"
  494. { mc.m_mesh.ShearX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
  495. break;
  496. case 36:
  497. /* Line 690 of lalr1.cc */
  498. #line 138 "easymesh/easymesh-parser.y"
  499. { mc.m_mesh.ShearX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); }
  500. break;
  501. case 37:
  502. /* Line 690 of lalr1.cc */
  503. #line 139 "easymesh/easymesh-parser.y"
  504. { mc.m_mesh.ShearY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
  505. break;
  506. case 38:
  507. /* Line 690 of lalr1.cc */
  508. #line 140 "easymesh/easymesh-parser.y"
  509. { mc.m_mesh.ShearY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); }
  510. break;
  511. case 39:
  512. /* Line 690 of lalr1.cc */
  513. #line 141 "easymesh/easymesh-parser.y"
  514. { mc.m_mesh.ShearZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
  515. break;
  516. case 40:
  517. /* Line 690 of lalr1.cc */
  518. #line 142 "easymesh/easymesh-parser.y"
  519. { mc.m_mesh.ShearZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); }
  520. break;
  521. case 41:
  522. /* Line 690 of lalr1.cc */
  523. #line 143 "easymesh/easymesh-parser.y"
  524. { mc.m_mesh.StretchX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
  525. break;
  526. case 42:
  527. /* Line 690 of lalr1.cc */
  528. #line 144 "easymesh/easymesh-parser.y"
  529. { mc.m_mesh.StretchY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
  530. break;
  531. case 43:
  532. /* Line 690 of lalr1.cc */
  533. #line 145 "easymesh/easymesh-parser.y"
  534. { mc.m_mesh.StretchZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
  535. break;
  536. case 44:
  537. /* Line 690 of lalr1.cc */
  538. #line 146 "easymesh/easymesh-parser.y"
  539. { mc.m_mesh.BendXY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
  540. break;
  541. case 45:
  542. /* Line 690 of lalr1.cc */
  543. #line 147 "easymesh/easymesh-parser.y"
  544. { mc.m_mesh.BendXZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
  545. break;
  546. case 46:
  547. /* Line 690 of lalr1.cc */
  548. #line 148 "easymesh/easymesh-parser.y"
  549. { mc.m_mesh.BendYX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
  550. break;
  551. case 47:
  552. /* Line 690 of lalr1.cc */
  553. #line 149 "easymesh/easymesh-parser.y"
  554. { mc.m_mesh.BendYZ((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
  555. break;
  556. case 48:
  557. /* Line 690 of lalr1.cc */
  558. #line 150 "easymesh/easymesh-parser.y"
  559. { mc.m_mesh.BendZX((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
  560. break;
  561. case 49:
  562. /* Line 690 of lalr1.cc */
  563. #line 151 "easymesh/easymesh-parser.y"
  564. { mc.m_mesh.BendZY((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
  565. break;
  566. case 50:
  567. /* Line 690 of lalr1.cc */
  568. #line 152 "easymesh/easymesh-parser.y"
  569. { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, 1.0, 1.0)); }
  570. break;
  571. case 51:
  572. /* Line 690 of lalr1.cc */
  573. #line 153 "easymesh/easymesh-parser.y"
  574. { mc.m_mesh.Scale(vec3(1.0, (yysemantic_stack_[(2) - (2)].args).f0, 1.0)); }
  575. break;
  576. case 52:
  577. /* Line 690 of lalr1.cc */
  578. #line 154 "easymesh/easymesh-parser.y"
  579. { mc.m_mesh.Scale(vec3(1.0, 1.0, (yysemantic_stack_[(2) - (2)].args).f0)); }
  580. break;
  581. case 53:
  582. /* Line 690 of lalr1.cc */
  583. #line 155 "easymesh/easymesh-parser.y"
  584. { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); }
  585. break;
  586. case 54:
  587. /* Line 690 of lalr1.cc */
  588. #line 156 "easymesh/easymesh-parser.y"
  589. { mc.m_mesh.MirrorX(); }
  590. break;
  591. case 55:
  592. /* Line 690 of lalr1.cc */
  593. #line 157 "easymesh/easymesh-parser.y"
  594. { mc.m_mesh.MirrorY(); }
  595. break;
  596. case 56:
  597. /* Line 690 of lalr1.cc */
  598. #line 158 "easymesh/easymesh-parser.y"
  599. { mc.m_mesh.MirrorZ(); }
  600. break;
  601. case 57:
  602. /* Line 690 of lalr1.cc */
  603. #line 159 "easymesh/easymesh-parser.y"
  604. { mc.m_mesh.RadialJitter((yysemantic_stack_[(2) - (2)].args).f0); }
  605. break;
  606. case 58:
  607. /* Line 690 of lalr1.cc */
  608. #line 160 "easymesh/easymesh-parser.y"
  609. { mc.m_mesh.SplitTriangles((yysemantic_stack_[(2) - (2)].args).f0); }
  610. break;
  611. case 59:
  612. /* Line 690 of lalr1.cc */
  613. #line 161 "easymesh/easymesh-parser.y"
  614. { mc.m_mesh.SmoothMesh((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
  615. break;
  616. case 60:
  617. /* Line 690 of lalr1.cc */
  618. #line 162 "easymesh/easymesh-parser.y"
  619. { mc.m_mesh.ToggleScaleWinding(); }
  620. break;
  621. case 61:
  622. /* Line 690 of lalr1.cc */
  623. #line 163 "easymesh/easymesh-parser.y"
  624. { mc.m_mesh.CsgUnion(); }
  625. break;
  626. case 62:
  627. /* Line 690 of lalr1.cc */
  628. #line 164 "easymesh/easymesh-parser.y"
  629. { mc.m_mesh.CsgSubstract(); }
  630. break;
  631. case 63:
  632. /* Line 690 of lalr1.cc */
  633. #line 165 "easymesh/easymesh-parser.y"
  634. { mc.m_mesh.CsgSubstractLoss(); }
  635. break;
  636. case 64:
  637. /* Line 690 of lalr1.cc */
  638. #line 166 "easymesh/easymesh-parser.y"
  639. { mc.m_mesh.CsgAnd(); }
  640. break;
  641. case 65:
  642. /* Line 690 of lalr1.cc */
  643. #line 167 "easymesh/easymesh-parser.y"
  644. { mc.m_mesh.CsgXor(); }
  645. break;
  646. case 66:
  647. /* Line 690 of lalr1.cc */
  648. #line 171 "easymesh/easymesh-parser.y"
  649. { mc.m_mesh.AppendCylinder((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
  650. (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3,
  651. (int)(yysemantic_stack_[(2) - (2)].args).f4, (int)(yysemantic_stack_[(2) - (2)].args).f5, 0); }
  652. break;
  653. case 67:
  654. /* Line 690 of lalr1.cc */
  655. #line 174 "easymesh/easymesh-parser.y"
  656. { mc.m_mesh.AppendCylinder((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
  657. (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3,
  658. (int)(yysemantic_stack_[(2) - (2)].args).f4, (int)(yysemantic_stack_[(2) - (2)].args).f5, (int)(yysemantic_stack_[(2) - (2)].args).f6); }
  659. break;
  660. case 68:
  661. /* Line 690 of lalr1.cc */
  662. #line 177 "easymesh/easymesh-parser.y"
  663. { mc.m_mesh.AppendBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2)); }
  664. break;
  665. case 69:
  666. /* Line 690 of lalr1.cc */
  667. #line 178 "easymesh/easymesh-parser.y"
  668. { mc.m_mesh.AppendSmoothChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
  669. (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); }
  670. break;
  671. case 70:
  672. /* Line 690 of lalr1.cc */
  673. #line 180 "easymesh/easymesh-parser.y"
  674. { mc.m_mesh.AppendFlatChamfBox(vec3((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
  675. (yysemantic_stack_[(2) - (2)].args).f2), (yysemantic_stack_[(2) - (2)].args).f3); }
  676. break;
  677. case 71:
  678. /* Line 690 of lalr1.cc */
  679. #line 182 "easymesh/easymesh-parser.y"
  680. { mc.m_mesh.AppendSphere((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1); }
  681. break;
  682. case 72:
  683. /* Line 690 of lalr1.cc */
  684. #line 183 "easymesh/easymesh-parser.y"
  685. { mc.m_mesh.AppendCapsule((yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
  686. break;
  687. case 73:
  688. /* Line 690 of lalr1.cc */
  689. #line 184 "easymesh/easymesh-parser.y"
  690. { mc.m_mesh.AppendTorus((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2); }
  691. break;
  692. case 74:
  693. /* Line 690 of lalr1.cc */
  694. #line 185 "easymesh/easymesh-parser.y"
  695. { mc.m_mesh.AppendStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (yysemantic_stack_[(2) - (2)].args).f2,
  696. (int)(yysemantic_stack_[(2) - (2)].args).f3, (int)(yysemantic_stack_[(2) - (2)].args).f4); }
  697. break;
  698. case 75:
  699. /* Line 690 of lalr1.cc */
  700. #line 187 "easymesh/easymesh-parser.y"
  701. { mc.m_mesh.AppendExpandedStar((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
  702. (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3); }
  703. break;
  704. case 76:
  705. /* Line 690 of lalr1.cc */
  706. #line 189 "easymesh/easymesh-parser.y"
  707. { mc.m_mesh.AppendDisc((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1, (int)(yysemantic_stack_[(2) - (2)].args).f2); }
  708. break;
  709. case 77:
  710. /* Line 690 of lalr1.cc */
  711. #line 190 "easymesh/easymesh-parser.y"
  712. { mc.m_mesh.AppendSimpleTriangle((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); }
  713. break;
  714. case 78:
  715. /* Line 690 of lalr1.cc */
  716. #line 191 "easymesh/easymesh-parser.y"
  717. { mc.m_mesh.AppendSimpleQuad((yysemantic_stack_[(2) - (2)].args).f0, (int)(yysemantic_stack_[(2) - (2)].args).f1); }
  718. break;
  719. case 79:
  720. /* Line 690 of lalr1.cc */
  721. #line 192 "easymesh/easymesh-parser.y"
  722. { mc.m_mesh.AppendCog((int)(yysemantic_stack_[(2) - (2)].args).f0, (yysemantic_stack_[(2) - (2)].args).f1,
  723. (yysemantic_stack_[(2) - (2)].args).f2, (yysemantic_stack_[(2) - (2)].args).f3, (yysemantic_stack_[(2) - (2)].args).f4, (yysemantic_stack_[(2) - (2)].args).f5, (yysemantic_stack_[(2) - (2)].args).f6,
  724. (yysemantic_stack_[(2) - (2)].args).f7, (yysemantic_stack_[(2) - (2)].args).f8, (int)(yysemantic_stack_[(2) - (2)].args).f9); }
  725. break;
  726. case 80:
  727. /* Line 690 of lalr1.cc */
  728. #line 197 "easymesh/easymesh-parser.y"
  729. { (yyval.args).f0 = (yysemantic_stack_[(1) - (1)].fval); }
  730. break;
  731. case 81:
  732. /* Line 690 of lalr1.cc */
  733. #line 198 "easymesh/easymesh-parser.y"
  734. { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f1 = (yysemantic_stack_[(2) - (2)].fval); }
  735. break;
  736. case 82:
  737. /* Line 690 of lalr1.cc */
  738. #line 199 "easymesh/easymesh-parser.y"
  739. { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f2 = (yysemantic_stack_[(2) - (2)].fval); }
  740. break;
  741. case 83:
  742. /* Line 690 of lalr1.cc */
  743. #line 200 "easymesh/easymesh-parser.y"
  744. { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f3 = (yysemantic_stack_[(2) - (2)].fval); }
  745. break;
  746. case 84:
  747. /* Line 690 of lalr1.cc */
  748. #line 201 "easymesh/easymesh-parser.y"
  749. { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f4 = (yysemantic_stack_[(2) - (2)].fval); }
  750. break;
  751. case 85:
  752. /* Line 690 of lalr1.cc */
  753. #line 202 "easymesh/easymesh-parser.y"
  754. { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f5 = (yysemantic_stack_[(2) - (2)].fval); }
  755. break;
  756. case 86:
  757. /* Line 690 of lalr1.cc */
  758. #line 203 "easymesh/easymesh-parser.y"
  759. { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f6 = (yysemantic_stack_[(2) - (2)].fval); }
  760. break;
  761. case 87:
  762. /* Line 690 of lalr1.cc */
  763. #line 204 "easymesh/easymesh-parser.y"
  764. { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f7 = (yysemantic_stack_[(2) - (2)].fval); }
  765. break;
  766. case 88:
  767. /* Line 690 of lalr1.cc */
  768. #line 205 "easymesh/easymesh-parser.y"
  769. { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f8 = (yysemantic_stack_[(2) - (2)].fval); }
  770. break;
  771. case 89:
  772. /* Line 690 of lalr1.cc */
  773. #line 206 "easymesh/easymesh-parser.y"
  774. { (yyval.args) = (yysemantic_stack_[(2) - (1)].args); (yyval.args).f9 = (yysemantic_stack_[(2) - (2)].fval); }
  775. break;
  776. case 90:
  777. /* Line 690 of lalr1.cc */
  778. #line 209 "easymesh/easymesh-parser.y"
  779. { (yyval.fval) = (yysemantic_stack_[(1) - (1)].fval); }
  780. break;
  781. case 91:
  782. /* Line 690 of lalr1.cc */
  783. #line 210 "easymesh/easymesh-parser.y"
  784. { (yyval.fval) = -(yysemantic_stack_[(2) - (2)].fval); }
  785. break;
  786. /* Line 690 of lalr1.cc */
  787. #line 1044 "generated/easymesh-parser.cpp"
  788. default:
  789. break;
  790. }
  791. /* User semantic actions sometimes alter yychar, and that requires
  792. that yytoken be updated with the new translation. We take the
  793. approach of translating immediately before every use of yytoken.
  794. One alternative is translating here after every semantic action,
  795. but that translation would be missed if the semantic action
  796. invokes YYABORT, YYACCEPT, or YYERROR immediately after altering
  797. yychar. In the case of YYABORT or YYACCEPT, an incorrect
  798. destructor might then be invoked immediately. In the case of
  799. YYERROR, subsequent parser actions might lead to an incorrect
  800. destructor call or verbose syntax error message before the
  801. lookahead is translated. */
  802. YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc);
  803. yypop_ (yylen);
  804. yylen = 0;
  805. YY_STACK_PRINT ();
  806. yysemantic_stack_.push (yyval);
  807. yylocation_stack_.push (yyloc);
  808. /* Shift the result of the reduction. */
  809. yyn = yyr1_[yyn];
  810. yystate = yypgoto_[yyn - yyntokens_] + yystate_stack_[0];
  811. if (0 <= yystate && yystate <= yylast_
  812. && yycheck_[yystate] == yystate_stack_[0])
  813. yystate = yytable_[yystate];
  814. else
  815. yystate = yydefgoto_[yyn - yyntokens_];
  816. goto yynewstate;
  817. /*------------------------------------.
  818. | yyerrlab -- here on detecting error |
  819. `------------------------------------*/
  820. yyerrlab:
  821. /* Make sure we have latest lookahead translation. See comments at
  822. user semantic actions for why this is necessary. */
  823. yytoken = yytranslate_ (yychar);
  824. /* If not already recovering from an error, report this error. */
  825. if (!yyerrstatus_)
  826. {
  827. ++yynerrs_;
  828. if (yychar == yyempty_)
  829. yytoken = yyempty_;
  830. error (yylloc, yysyntax_error_ (yystate, yytoken));
  831. }
  832. yyerror_range[1] = yylloc;
  833. if (yyerrstatus_ == 3)
  834. {
  835. /* If just tried and failed to reuse lookahead token after an
  836. error, discard it. */
  837. if (yychar <= yyeof_)
  838. {
  839. /* Return failure if at end of input. */
  840. if (yychar == yyeof_)
  841. YYABORT;
  842. }
  843. else
  844. {
  845. yydestruct_ ("Error: discarding", yytoken, &yylval, &yylloc);
  846. yychar = yyempty_;
  847. }
  848. }
  849. /* Else will try to reuse lookahead token after shifting the error
  850. token. */
  851. goto yyerrlab1;
  852. /*---------------------------------------------------.
  853. | yyerrorlab -- error raised explicitly by YYERROR. |
  854. `---------------------------------------------------*/
  855. yyerrorlab:
  856. /* Pacify compilers like GCC when the user code never invokes
  857. YYERROR and the label yyerrorlab therefore never appears in user
  858. code. */
  859. if (false)
  860. goto yyerrorlab;
  861. yyerror_range[1] = yylocation_stack_[yylen - 1];
  862. /* Do not reclaim the symbols of the rule which action triggered
  863. this YYERROR. */
  864. yypop_ (yylen);
  865. yylen = 0;
  866. yystate = yystate_stack_[0];
  867. goto yyerrlab1;
  868. /*-------------------------------------------------------------.
  869. | yyerrlab1 -- common code for both syntax error and YYERROR. |
  870. `-------------------------------------------------------------*/
  871. yyerrlab1:
  872. yyerrstatus_ = 3; /* Each real token shifted decrements this. */
  873. for (;;)
  874. {
  875. yyn = yypact_[yystate];
  876. if (!yy_pact_value_is_default_ (yyn))
  877. {
  878. yyn += yyterror_;
  879. if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_)
  880. {
  881. yyn = yytable_[yyn];
  882. if (0 < yyn)
  883. break;
  884. }
  885. }
  886. /* Pop the current state because it cannot handle the error token. */
  887. if (yystate_stack_.height () == 1)
  888. YYABORT;
  889. yyerror_range[1] = yylocation_stack_[0];
  890. yydestruct_ ("Error: popping",
  891. yystos_[yystate],
  892. &yysemantic_stack_[0], &yylocation_stack_[0]);
  893. yypop_ ();
  894. yystate = yystate_stack_[0];
  895. YY_STACK_PRINT ();
  896. }
  897. yyerror_range[2] = yylloc;
  898. // Using YYLLOC is tempting, but would change the location of
  899. // the lookahead. YYLOC is available though.
  900. YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
  901. yysemantic_stack_.push (yylval);
  902. yylocation_stack_.push (yyloc);
  903. /* Shift the error token. */
  904. YY_SYMBOL_PRINT ("Shifting", yystos_[yyn],
  905. &yysemantic_stack_[0], &yylocation_stack_[0]);
  906. yystate = yyn;
  907. goto yynewstate;
  908. /* Accept. */
  909. yyacceptlab:
  910. yyresult = 0;
  911. goto yyreturn;
  912. /* Abort. */
  913. yyabortlab:
  914. yyresult = 1;
  915. goto yyreturn;
  916. yyreturn:
  917. if (yychar != yyempty_)
  918. {
  919. /* Make sure we have latest lookahead translation. See comments
  920. at user semantic actions for why this is necessary. */
  921. yytoken = yytranslate_ (yychar);
  922. yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval,
  923. &yylloc);
  924. }
  925. /* Do not reclaim the symbols of the rule which action triggered
  926. this YYABORT or YYACCEPT. */
  927. yypop_ (yylen);
  928. while (yystate_stack_.height () != 1)
  929. {
  930. yydestruct_ ("Cleanup: popping",
  931. yystos_[yystate_stack_[0]],
  932. &yysemantic_stack_[0],
  933. &yylocation_stack_[0]);
  934. yypop_ ();
  935. }
  936. return yyresult;
  937. }
  938. // Generate an error message.
  939. std::string
  940. EasyMeshParser::yysyntax_error_ (int yystate, int yytoken)
  941. {
  942. std::string yyres;
  943. // Number of reported tokens (one for the "unexpected", one per
  944. // "expected").
  945. size_t yycount = 0;
  946. // Its maximum.
  947. enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
  948. // Arguments of yyformat.
  949. char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
  950. /* There are many possibilities here to consider:
  951. - If this state is a consistent state with a default action, then
  952. the only way this function was invoked is if the default action
  953. is an error action. In that case, don't check for expected
  954. tokens because there are none.
  955. - The only way there can be no lookahead present (in yytoken) is
  956. if this state is a consistent state with a default action.
  957. Thus, detecting the absence of a lookahead is sufficient to
  958. determine that there is no unexpected or expected token to
  959. report. In that case, just report a simple "syntax error".
  960. - Don't assume there isn't a lookahead just because this state is
  961. a consistent state with a default action. There might have
  962. been a previous inconsistent state, consistent state with a
  963. non-default action, or user semantic action that manipulated
  964. yychar.
  965. - Of course, the expected token list depends on states to have
  966. correct lookahead information, and it depends on the parser not
  967. to perform extra reductions after fetching a lookahead from the
  968. scanner and before detecting a syntax error. Thus, state
  969. merging (from LALR or IELR) and default reductions corrupt the
  970. expected token list. However, the list is correct for
  971. canonical LR with one exception: it will still contain any
  972. token that will not be accepted due to an error action in a
  973. later state.
  974. */
  975. if (yytoken != yyempty_)
  976. {
  977. yyarg[yycount++] = yytname_[yytoken];
  978. int yyn = yypact_[yystate];
  979. if (!yy_pact_value_is_default_ (yyn))
  980. {
  981. /* Start YYX at -YYN if negative to avoid negative indexes in
  982. YYCHECK. In other words, skip the first -YYN actions for
  983. this state because they are default actions. */
  984. int yyxbegin = yyn < 0 ? -yyn : 0;
  985. /* Stay within bounds of both yycheck and yytname. */
  986. int yychecklim = yylast_ - yyn + 1;
  987. int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
  988. for (int yyx = yyxbegin; yyx < yyxend; ++yyx)
  989. if (yycheck_[yyx + yyn] == yyx && yyx != yyterror_
  990. && !yy_table_value_is_error_ (yytable_[yyx + yyn]))
  991. {
  992. if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
  993. {
  994. yycount = 1;
  995. break;
  996. }
  997. else
  998. yyarg[yycount++] = yytname_[yyx];
  999. }
  1000. }
  1001. }
  1002. char const* yyformat = 0;
  1003. switch (yycount)
  1004. {
  1005. #define YYCASE_(N, S) \
  1006. case N: \
  1007. yyformat = S; \
  1008. break
  1009. YYCASE_(0, YY_("syntax error"));
  1010. YYCASE_(1, YY_("syntax error, unexpected %s"));
  1011. YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
  1012. YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
  1013. YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
  1014. YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
  1015. #undef YYCASE_
  1016. }
  1017. // Argument number.
  1018. size_t yyi = 0;
  1019. for (char const* yyp = yyformat; *yyp; ++yyp)
  1020. if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount)
  1021. {
  1022. yyres += yytnamerr_ (yyarg[yyi++]);
  1023. ++yyp;
  1024. }
  1025. else
  1026. yyres += *yyp;
  1027. return yyres;
  1028. }
  1029. /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  1030. STATE-NUM. */
  1031. const signed char EasyMeshParser::yypact_ninf_ = -71;
  1032. const signed char
  1033. EasyMeshParser::yypact_[] =
  1034. {
  1035. 62, -42, -25, -49, -49, -49, -49, -49, -49, -49,
  1036. -49, -49, -71, -49, -49, -49, -49, -49, -49, -49,
  1037. -49, -49, -71, -49, -49, -49, -49, -49, -49, -49,
  1038. -49, -49, -71, -49, -49, -71, -49, -49, -49, -71,
  1039. -71, -71, -71, -71, -49, -49, -49, -49, -49, -49,
  1040. -49, -49, -49, -49, -49, -49, -49, -49, -71, 4,
  1041. 6, 62, 62, 123, -71, -71, -71, -71, -71, -71,
  1042. -49, -49, -49, -49, -71, -71, -71, -71, -71, -71,
  1043. -49, -71, -71, -49, -71, -71, -71, -71, -71, -71,
  1044. -71, -49, -71, -71, -49, -71, -71, -71, -71, -71,
  1045. -71, -71, -49, -71, -71, -49, -71, -71, -71, -71,
  1046. -71, -71, -71, -71, -71, -71, -71, -49, -49, -49,
  1047. -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
  1048. -71, -49, -49, -49, -49, -71, -71, -71, -71, -71,
  1049. -55, -71, -71, -71, -71, -71, -71, -71, -71, -71,
  1050. -71, -71, -71, -71
  1051. };
  1052. /* YYDEFACT[S] -- default reduction number in state S. Performed when
  1053. YYTABLE doesn't specify something else to do. Zero means the
  1054. default is an error. */
  1055. const unsigned char
  1056. EasyMeshParser::yydefact_[] =
  1057. {
  1058. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1059. 0, 0, 54, 0, 0, 0, 0, 0, 0, 0,
  1060. 0, 0, 55, 0, 0, 0, 0, 0, 0, 0,
  1061. 0, 0, 56, 0, 0, 60, 0, 0, 0, 61,
  1062. 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
  1063. 0, 0, 0, 0, 0, 0, 0, 0, 7, 0,
  1064. 0, 3, 0, 5, 9, 11, 12, 13, 90, 15,
  1065. 0, 0, 0, 0, 14, 80, 17, 16, 19, 23,
  1066. 26, 27, 32, 35, 36, 41, 44, 45, 50, 20,
  1067. 24, 28, 29, 33, 37, 38, 42, 46, 47, 51,
  1068. 21, 25, 30, 31, 34, 39, 40, 43, 48, 49,
  1069. 52, 22, 53, 57, 58, 59, 18, 0, 0, 66,
  1070. 67, 68, 69, 70, 71, 72, 74, 75, 76, 77,
  1071. 78, 0, 0, 0, 0, 79, 73, 1, 2, 4,
  1072. 0, 10, 91, 81, 82, 83, 84, 85, 86, 87,
  1073. 88, 89, 8, 6
  1074. };
  1075. /* YYPGOTO[NTERM-NUM]. */
  1076. const short int
  1077. EasyMeshParser::yypgoto_[] =
  1078. {
  1079. -71, -71, -32, -71, -71, -71, -71, -52, -71, -71,
  1080. -71, 232, 184, 0, 182, -37, -34, -30, -71, -71,
  1081. -71, -70
  1082. };
  1083. /* YYDEFGOTO[NTERM-NUM]. */
  1084. const short int
  1085. EasyMeshParser::yydefgoto_[] =
  1086. {
  1087. -1, 59, 60, 61, 62, 153, 63, 64, 65, 66,
  1088. 67, 71, 72, 73, 117, 118, 119, 120, 133, 134,
  1089. 135, 75
  1090. };
  1091. /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
  1092. positive, shift that token. If negative, reduce the rule which
  1093. number is the opposite. If YYTABLE_NINF_, syntax error. */
  1094. const signed char EasyMeshParser::yytable_ninf_ = -1;
  1095. const unsigned char
  1096. EasyMeshParser::yytable_[] =
  1097. {
  1098. 142, 143, 144, 145, 137, 80, 138, 83, 85, 152,
  1099. 145, 141, 68, 145, 126, 91, 70, 94, 96, 68,
  1100. 69, 145, 131, 70, 145, 102, 132, 105, 107, 139,
  1101. 140, 0, 145, 111, 112, 145, 68, 76, 115, 0,
  1102. 70, 0, 0, 0, 0, 0, 121, 146, 147, 148,
  1103. 125, 0, 0, 128, 0, 0, 0, 136, 0, 0,
  1104. 0, 148, 149, 150, 151, 1, 2, 3, 4, 5,
  1105. 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
  1106. 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
  1107. 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
  1108. 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
  1109. 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
  1110. 56, 57, 0, 0, 0, 58, 1, 2, 3, 4,
  1111. 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
  1112. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
  1113. 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
  1114. 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
  1115. 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
  1116. 55, 56, 57, 74, 77, 0, 0, 81, 0, 84,
  1117. 82, 0, 0, 86, 87, 0, 0, 92, 0, 95,
  1118. 93, 0, 0, 97, 98, 0, 0, 103, 0, 106,
  1119. 104, 0, 0, 108, 109, 0, 0, 0, 0, 0,
  1120. 0, 0, 0, 0, 0, 0, 0, 0, 0, 122,
  1121. 123, 0, 0, 124, 127, 78, 79, 0, 129, 130,
  1122. 0, 0, 0, 88, 0, 89, 90, 0, 0, 0,
  1123. 0, 0, 0, 99, 0, 100, 101, 0, 0, 0,
  1124. 0, 0, 0, 110, 0, 0, 0, 0, 113, 114,
  1125. 0, 0, 0, 0, 0, 0, 116
  1126. };
  1127. /* YYCHECK. */
  1128. const short int
  1129. EasyMeshParser::yycheck_[] =
  1130. {
  1131. 70, 71, 72, 73, 0, 5, 0, 7, 8, 64,
  1132. 80, 63, 61, 83, 51, 15, 65, 17, 18, 61,
  1133. 62, 91, 56, 65, 94, 25, 56, 27, 28, 61,
  1134. 62, -1, 102, 33, 34, 105, 61, 62, 38, -1,
  1135. 65, -1, -1, -1, -1, -1, 46, 117, 118, 119,
  1136. 50, -1, -1, 53, -1, -1, -1, 57, -1, -1,
  1137. -1, 131, 132, 133, 134, 3, 4, 5, 6, 7,
  1138. 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
  1139. 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
  1140. 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
  1141. 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
  1142. 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
  1143. 58, 59, -1, -1, -1, 63, 3, 4, 5, 6,
  1144. 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
  1145. 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
  1146. 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
  1147. 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
  1148. 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
  1149. 57, 58, 59, 1, 2, -1, -1, 5, -1, 7,
  1150. 6, -1, -1, 9, 10, -1, -1, 15, -1, 17,
  1151. 16, -1, -1, 19, 20, -1, -1, 25, -1, 27,
  1152. 26, -1, -1, 29, 30, -1, -1, -1, -1, -1,
  1153. -1, -1, -1, -1, -1, -1, -1, -1, -1, 47,
  1154. 48, -1, -1, 49, 52, 3, 4, -1, 54, 55,
  1155. -1, -1, -1, 11, -1, 13, 14, -1, -1, -1,
  1156. -1, -1, -1, 21, -1, 23, 24, -1, -1, -1,
  1157. -1, -1, -1, 31, -1, -1, -1, -1, 36, 37,
  1158. -1, -1, -1, -1, -1, -1, 44
  1159. };
  1160. /* STOS_[STATE-NUM] -- The (internal number of the) accessing
  1161. symbol of state STATE-NUM. */
  1162. const unsigned char
  1163. EasyMeshParser::yystos_[] =
  1164. {
  1165. 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
  1166. 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
  1167. 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
  1168. 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
  1169. 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
  1170. 52, 53, 54, 55, 56, 57, 58, 59, 63, 67,
  1171. 68, 69, 70, 72, 73, 74, 75, 76, 61, 62,
  1172. 65, 77, 78, 79, 80, 87, 62, 80, 77, 77,
  1173. 79, 80, 78, 79, 80, 79, 78, 78, 77, 77,
  1174. 77, 79, 80, 78, 79, 80, 79, 78, 78, 77,
  1175. 77, 77, 79, 80, 78, 79, 80, 79, 78, 78,
  1176. 77, 79, 79, 77, 77, 79, 77, 80, 81, 82,
  1177. 83, 79, 80, 80, 78, 79, 81, 80, 79, 78,
  1178. 78, 82, 83, 84, 85, 86, 79, 0, 0, 68,
  1179. 68, 73, 87, 87, 87, 87, 87, 87, 87, 87,
  1180. 87, 87, 64, 71
  1181. };
  1182. #if YYDEBUG
  1183. /* TOKEN_NUMBER_[YYLEX-NUM] -- Internal symbol number corresponding
  1184. to YYLEX-NUM. */
  1185. const unsigned short int
  1186. EasyMeshParser::yytoken_number_[] =
  1187. {
  1188. 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
  1189. 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
  1190. 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
  1191. 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
  1192. 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
  1193. 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
  1194. 315, 316, 317, 91, 93, 45
  1195. };
  1196. #endif
  1197. /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
  1198. const unsigned char
  1199. EasyMeshParser::yyr1_[] =
  1200. {
  1201. 0, 66, 67, 68, 68, 69, 69, 70, 71, 72,
  1202. 72, 73, 73, 73, 74, 74, 74, 74, 75, 75,
  1203. 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
  1204. 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
  1205. 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
  1206. 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
  1207. 75, 75, 75, 75, 75, 75, 76, 76, 76, 76,
  1208. 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
  1209. 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
  1210. 87, 87
  1211. };
  1212. /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
  1213. const unsigned char
  1214. EasyMeshParser::yyr2_[] =
  1215. {
  1216. 0, 2, 2, 1, 2, 1, 3, 1, 1, 1,
  1217. 2, 1, 1, 1, 2, 2, 2, 2, 2, 2,
  1218. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1219. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1220. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1221. 2, 2, 2, 2, 1, 1, 1, 2, 2, 2,
  1222. 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
  1223. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1224. 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1225. 1, 2
  1226. };
  1227. #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
  1228. /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
  1229. First, the terminals, then, starting at \a yyntokens_, nonterminals. */
  1230. const char*
  1231. const EasyMeshParser::yytname_[] =
  1232. {
  1233. "T_END", "error", "$undefined", "T_COLOR", "T_BGCOLOR", "T_TRANSLATEX",
  1234. "T_ROTATEX", "T_TAPERX", "T_TWISTX", "T_SHEARX", "T_STRETCHX",
  1235. "T_BENDXY", "T_BENDXZ", "T_SCALEX", "T_MIRRORX", "T_TRANSLATEY",
  1236. "T_ROTATEY", "T_TAPERY", "T_TWISTY", "T_SHEARY", "T_STRETCHY",
  1237. "T_BENDYX", "T_BENDYZ", "T_SCALEY", "T_MIRRORY", "T_TRANSLATEZ",
  1238. "T_ROTATEZ", "T_TAPERZ", "T_TWISTZ", "T_SHEARZ", "T_STRETCHZ",
  1239. "T_BENDZX", "T_BENDZY", "T_SCALEZ", "T_MIRRORZ", "T_TRANSLATE",
  1240. "T_SCALE", "T_TOGGLESCALEWINDING", "T_RADIALJITTER", "T_SPLITTRIANGLE",
  1241. "T_SMOOTHMESH", "T_CSGUNION", "T_CSGSUBSTRACT", "T_CSGSUBSTRACTLOSS",
  1242. "T_CSGAND", "T_CSGXOR", "T_CHAMFER", "T_CYLINDER", "T_BOX",
  1243. "T_SMOOTHCHAMFBOX", "T_FLATCHAMFBOX", "T_SPHERE", "T_CAPSULE", "T_STAR",
  1244. "T_EXPANDEDSTAR", "T_DISC", "T_TRIANGLE", "T_QUAD", "T_COG", "T_TORUS",
  1245. "T_ERROR", "NUMBER", "COLOR", "'['", "']'", "'-'", "$accept",
  1246. "mesh_description", "mesh_expression_list", "mesh_expression",
  1247. "mesh_open", "mesh_close", "mesh_command_list", "mesh_command",
  1248. "color_command", "transform_command", "primitive_command", "args1",
  1249. "args2", "args3", "args4", "args5", "args6", "args7", "args8", "args9",
  1250. "args10", "number", 0
  1251. };
  1252. #endif
  1253. #if YYDEBUG
  1254. /* YYRHS -- A `-1'-separated list of the rules' RHS. */
  1255. const EasyMeshParser::rhs_number_type
  1256. EasyMeshParser::yyrhs_[] =
  1257. {
  1258. 67, 0, -1, 68, 0, -1, 69, -1, 69, 68,
  1259. -1, 72, -1, 70, 68, 71, -1, 63, -1, 64,
  1260. -1, 73, -1, 72, 73, -1, 74, -1, 75, -1,
  1261. 76, -1, 3, 80, -1, 3, 62, -1, 4, 80,
  1262. -1, 4, 62, -1, 46, 77, -1, 5, 77, -1,
  1263. 15, 77, -1, 25, 77, -1, 35, 79, -1, 6,
  1264. 77, -1, 16, 77, -1, 26, 77, -1, 7, 79,
  1265. -1, 7, 80, -1, 17, 79, -1, 17, 80, -1,
  1266. 27, 79, -1, 27, 80, -1, 8, 78, -1, 18,
  1267. 78, -1, 28, 78, -1, 9, 79, -1, 9, 80,
  1268. -1, 19, 79, -1, 19, 80, -1, 29, 79, -1,
  1269. 29, 80, -1, 10, 79, -1, 20, 79, -1, 30,
  1270. 79, -1, 11, 78, -1, 12, 78, -1, 21, 78,
  1271. -1, 22, 78, -1, 31, 78, -1, 32, 78, -1,
  1272. 13, 77, -1, 23, 77, -1, 33, 77, -1, 36,
  1273. 79, -1, 14, -1, 24, -1, 34, -1, 38, 77,
  1274. -1, 39, 77, -1, 40, 79, -1, 37, -1, 41,
  1275. -1, 42, -1, 43, -1, 44, -1, 45, -1, 47,
  1276. 82, -1, 47, 83, -1, 48, 79, -1, 49, 80,
  1277. -1, 50, 80, -1, 51, 78, -1, 52, 79, -1,
  1278. 59, 79, -1, 53, 81, -1, 54, 80, -1, 55,
  1279. 79, -1, 56, 78, -1, 57, 78, -1, 58, 86,
  1280. -1, 87, -1, 77, 87, -1, 78, 87, -1, 79,
  1281. 87, -1, 80, 87, -1, 81, 87, -1, 82, 87,
  1282. -1, 83, 87, -1, 84, 87, -1, 85, 87, -1,
  1283. 61, -1, 65, 87, -1
  1284. };
  1285. /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
  1286. YYRHS. */
  1287. const unsigned char
  1288. EasyMeshParser::yyprhs_[] =
  1289. {
  1290. 0, 0, 3, 6, 8, 11, 13, 17, 19, 21,
  1291. 23, 26, 28, 30, 32, 35, 38, 41, 44, 47,
  1292. 50, 53, 56, 59, 62, 65, 68, 71, 74, 77,
  1293. 80, 83, 86, 89, 92, 95, 98, 101, 104, 107,
  1294. 110, 113, 116, 119, 122, 125, 128, 131, 134, 137,
  1295. 140, 143, 146, 149, 152, 154, 156, 158, 161, 164,
  1296. 167, 169, 171, 173, 175, 177, 179, 182, 185, 188,
  1297. 191, 194, 197, 200, 203, 206, 209, 212, 215, 218,
  1298. 221, 223, 226, 229, 232, 235, 238, 241, 244, 247,
  1299. 250, 252
  1300. };
  1301. /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
  1302. const unsigned char
  1303. EasyMeshParser::yyrline_[] =
  1304. {
  1305. 0, 76, 76, 80, 81, 85, 86, 90, 94, 98,
  1306. 99, 103, 104, 105, 109, 110, 113, 114, 120, 121,
  1307. 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
  1308. 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
  1309. 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
  1310. 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
  1311. 162, 163, 164, 165, 166, 167, 171, 174, 177, 178,
  1312. 180, 182, 183, 184, 185, 187, 189, 190, 191, 192,
  1313. 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
  1314. 209, 210
  1315. };
  1316. // Print the state stack on the debug stream.
  1317. void
  1318. EasyMeshParser::yystack_print_ ()
  1319. {
  1320. *yycdebug_ << "Stack now";
  1321. for (state_stack_type::const_iterator i = yystate_stack_.begin ();
  1322. i != yystate_stack_.end (); ++i)
  1323. *yycdebug_ << ' ' << *i;
  1324. *yycdebug_ << std::endl;
  1325. }
  1326. // Report on the debug stream that the rule \a yyrule is going to be reduced.
  1327. void
  1328. EasyMeshParser::yy_reduce_print_ (int yyrule)
  1329. {
  1330. unsigned int yylno = yyrline_[yyrule];
  1331. int yynrhs = yyr2_[yyrule];
  1332. /* Print the symbols being reduced, and their result. */
  1333. *yycdebug_ << "Reducing stack by rule " << yyrule - 1
  1334. << " (line " << yylno << "):" << std::endl;
  1335. /* The symbols being reduced. */
  1336. for (int yyi = 0; yyi < yynrhs; yyi++)
  1337. YY_SYMBOL_PRINT (" $" << yyi + 1 << " =",
  1338. yyrhs_[yyprhs_[yyrule] + yyi],
  1339. &(yysemantic_stack_[(yynrhs) - (yyi + 1)]),
  1340. &(yylocation_stack_[(yynrhs) - (yyi + 1)]));
  1341. }
  1342. #endif // YYDEBUG
  1343. /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
  1344. EasyMeshParser::token_number_type
  1345. EasyMeshParser::yytranslate_ (int t)
  1346. {
  1347. static
  1348. const token_number_type
  1349. translate_table[] =
  1350. {
  1351. 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1352. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1353. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1354. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1355. 2, 2, 2, 2, 2, 65, 2, 2, 2, 2,
  1356. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1357. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1358. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1359. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1360. 2, 63, 2, 64, 2, 2, 2, 2, 2, 2,
  1361. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1362. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1363. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1364. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1365. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1366. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1367. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1368. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1369. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1370. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1371. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1372. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1373. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1374. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1375. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1376. 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
  1377. 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
  1378. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
  1379. 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
  1380. 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
  1381. 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
  1382. 55, 56, 57, 58, 59, 60, 61, 62
  1383. };
  1384. if ((unsigned int) t <= yyuser_token_number_max_)
  1385. return translate_table[t];
  1386. else
  1387. return yyundef_token_;
  1388. }
  1389. const int EasyMeshParser::yyeof_ = 0;
  1390. const int EasyMeshParser::yylast_ = 276;
  1391. const int EasyMeshParser::yynnts_ = 22;
  1392. const int EasyMeshParser::yyempty_ = -2;
  1393. const int EasyMeshParser::yyfinal_ = 137;
  1394. const int EasyMeshParser::yyterror_ = 1;
  1395. const int EasyMeshParser::yyerrcode_ = 256;
  1396. const int EasyMeshParser::yyntokens_ = 66;
  1397. const unsigned int EasyMeshParser::yyuser_token_number_max_ = 317;
  1398. const EasyMeshParser::token_number_type EasyMeshParser::yyundef_token_ = 2;
  1399. } // lol
  1400. /* Line 1136 of lalr1.cc */
  1401. #line 1709 "generated/easymesh-parser.cpp"
  1402. /* Line 1138 of lalr1.cc */
  1403. #line 213 "easymesh/easymesh-parser.y"
  1404. void lol::EasyMeshParser::error(const EasyMeshParser::location_type& l,
  1405. const std::string& m)
  1406. {
  1407. mc.Error(l, m);
  1408. }