dep-selector-libgecode 1.0.0.alpha.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (806) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +26 -0
  3. data/Gemfile +3 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +29 -0
  6. data/Rakefile +20 -0
  7. data/dep-selector-libgecode.gemspec +25 -0
  8. data/ext/libgecode3/Makefile +8 -0
  9. data/ext/libgecode3/extconf.rb +57 -0
  10. data/ext/libgecode3/vendor/gecode-3.7.3/LICENSE +25 -0
  11. data/ext/libgecode3/vendor/gecode-3.7.3/Makefile.contribs +88 -0
  12. data/ext/libgecode3/vendor/gecode-3.7.3/Makefile.dep +11307 -0
  13. data/ext/libgecode3/vendor/gecode-3.7.3/Makefile.in +1795 -0
  14. data/ext/libgecode3/vendor/gecode-3.7.3/changelog.in +6132 -0
  15. data/ext/libgecode3/vendor/gecode-3.7.3/configure +13054 -0
  16. data/ext/libgecode3/vendor/gecode-3.7.3/configure.ac +356 -0
  17. data/ext/libgecode3/vendor/gecode-3.7.3/configure.ac.in +352 -0
  18. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/README +26 -0
  19. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/AbstractWorker.hh +42 -0
  20. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Doxyfile +263 -0
  21. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Makefile.in.in +162 -0
  22. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/OptVar.cc +82 -0
  23. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/OptVar.hh +124 -0
  24. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCOPPlus.cc +306 -0
  25. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCOPPlus.hh +166 -0
  26. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCSPPlusUnblockable.cc +239 -0
  27. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCSPPlusUnblockable.hh +140 -0
  28. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/README +6 -0
  29. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Strategy.cc +253 -0
  30. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Strategy.hh +112 -0
  31. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/StrategyNode.cc +59 -0
  32. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/StrategyNode.hh +49 -0
  33. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/UnblockableBranching.hh +34 -0
  34. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/UnblockableViewValBranching.cc +61 -0
  35. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/UnblockableViewValBranching.hh +45 -0
  36. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Work.cc +48 -0
  37. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Work.hh +64 -0
  38. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/WorkComparators.hh +67 -0
  39. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/WorkManager.cc +376 -0
  40. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/WorkManager.hh +96 -0
  41. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Worker.cc +285 -0
  42. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Worker.hh +70 -0
  43. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/clean +5 -0
  44. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/configure +2637 -0
  45. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/configure.ac +44 -0
  46. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/myDom.cc +59 -0
  47. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/myspace.cc +119 -0
  48. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/myspace.hh +79 -0
  49. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qecode.hh +56 -0
  50. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_parallel.cc +41 -0
  51. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_parallel.hh +43 -0
  52. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcop.cc +268 -0
  53. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcop.hh +56 -0
  54. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcsp.cc +163 -0
  55. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcsp.hh +63 -0
  56. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_unblockable.cc +423 -0
  57. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_unblockable.hh +84 -0
  58. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/shortdesc.ac +1 -0
  59. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/vartype.hh +31 -0
  60. data/ext/libgecode3/vendor/gecode-3.7.3/doxygen/doxygen.conf.in +1245 -0
  61. data/ext/libgecode3/vendor/gecode-3.7.3/doxygen/doxygen.hh.in +594 -0
  62. data/ext/libgecode3/vendor/gecode-3.7.3/examples/all-interval.cpp +136 -0
  63. data/ext/libgecode3/vendor/gecode-3.7.3/examples/alpha.cpp +151 -0
  64. data/ext/libgecode3/vendor/gecode-3.7.3/examples/bacp.cpp +596 -0
  65. data/ext/libgecode3/vendor/gecode-3.7.3/examples/bibd.cpp +182 -0
  66. data/ext/libgecode3/vendor/gecode-3.7.3/examples/bin-packing.cpp +25363 -0
  67. data/ext/libgecode3/vendor/gecode-3.7.3/examples/black-hole.cpp +413 -0
  68. data/ext/libgecode3/vendor/gecode-3.7.3/examples/car-sequencing.cpp +653 -0
  69. data/ext/libgecode3/vendor/gecode-3.7.3/examples/crew.cpp +269 -0
  70. data/ext/libgecode3/vendor/gecode-3.7.3/examples/crossword.cpp +3954 -0
  71. data/ext/libgecode3/vendor/gecode-3.7.3/examples/crowded-chess.cpp +424 -0
  72. data/ext/libgecode3/vendor/gecode-3.7.3/examples/dominating-queens.cpp +170 -0
  73. data/ext/libgecode3/vendor/gecode-3.7.3/examples/domino.cpp +346 -0
  74. data/ext/libgecode3/vendor/gecode-3.7.3/examples/donald.cpp +135 -0
  75. data/ext/libgecode3/vendor/gecode-3.7.3/examples/efpa.cpp +323 -0
  76. data/ext/libgecode3/vendor/gecode-3.7.3/examples/eq20.cpp +128 -0
  77. data/ext/libgecode3/vendor/gecode-3.7.3/examples/golf.cpp +190 -0
  78. data/ext/libgecode3/vendor/gecode-3.7.3/examples/golomb-ruler.cpp +157 -0
  79. data/ext/libgecode3/vendor/gecode-3.7.3/examples/graph-color.cpp +425 -0
  80. data/ext/libgecode3/vendor/gecode-3.7.3/examples/grocery.cpp +116 -0
  81. data/ext/libgecode3/vendor/gecode-3.7.3/examples/hamming.cpp +144 -0
  82. data/ext/libgecode3/vendor/gecode-3.7.3/examples/ind-set.cpp +144 -0
  83. data/ext/libgecode3/vendor/gecode-3.7.3/examples/kakuro.cpp +627 -0
  84. data/ext/libgecode3/vendor/gecode-3.7.3/examples/knights.cpp +430 -0
  85. data/ext/libgecode3/vendor/gecode-3.7.3/examples/langford-number.cpp +218 -0
  86. data/ext/libgecode3/vendor/gecode-3.7.3/examples/magic-sequence.cpp +133 -0
  87. data/ext/libgecode3/vendor/gecode-3.7.3/examples/magic-square.cpp +141 -0
  88. data/ext/libgecode3/vendor/gecode-3.7.3/examples/minesweeper.cpp +311 -0
  89. data/ext/libgecode3/vendor/gecode-3.7.3/examples/money.cpp +132 -0
  90. data/ext/libgecode3/vendor/gecode-3.7.3/examples/nonogram.cpp +1215 -0
  91. data/ext/libgecode3/vendor/gecode-3.7.3/examples/open-shop.cpp +412 -0
  92. data/ext/libgecode3/vendor/gecode-3.7.3/examples/ortho-latin.cpp +183 -0
  93. data/ext/libgecode3/vendor/gecode-3.7.3/examples/partition.cpp +145 -0
  94. data/ext/libgecode3/vendor/gecode-3.7.3/examples/pentominoes.cpp +952 -0
  95. data/ext/libgecode3/vendor/gecode-3.7.3/examples/perfect-square.cpp +317 -0
  96. data/ext/libgecode3/vendor/gecode-3.7.3/examples/photo.cpp +166 -0
  97. data/ext/libgecode3/vendor/gecode-3.7.3/examples/queen-armies.cpp +335 -0
  98. data/ext/libgecode3/vendor/gecode-3.7.3/examples/queens.cpp +214 -0
  99. data/ext/libgecode3/vendor/gecode-3.7.3/examples/radiotherapy.cpp +943 -0
  100. data/ext/libgecode3/vendor/gecode-3.7.3/examples/sat.cpp +260 -0
  101. data/ext/libgecode3/vendor/gecode-3.7.3/examples/schurs-lemma.cpp +142 -0
  102. data/ext/libgecode3/vendor/gecode-3.7.3/examples/scowl.hpp +14149 -0
  103. data/ext/libgecode3/vendor/gecode-3.7.3/examples/sports-league.cpp +353 -0
  104. data/ext/libgecode3/vendor/gecode-3.7.3/examples/steel-mill.cpp +654 -0
  105. data/ext/libgecode3/vendor/gecode-3.7.3/examples/steiner.cpp +170 -0
  106. data/ext/libgecode3/vendor/gecode-3.7.3/examples/sudoku.cpp +2294 -0
  107. data/ext/libgecode3/vendor/gecode-3.7.3/examples/tsp.cpp +339 -0
  108. data/ext/libgecode3/vendor/gecode-3.7.3/examples/warehouses.cpp +185 -0
  109. data/ext/libgecode3/vendor/gecode-3.7.3/examples/word-square.cpp +168 -0
  110. data/ext/libgecode3/vendor/gecode-3.7.3/gecode.m4 +1272 -0
  111. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver.hh +602 -0
  112. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/options.cpp +435 -0
  113. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/options.hpp +418 -0
  114. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/script.cpp +104 -0
  115. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/script.hpp +388 -0
  116. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc.hh +417 -0
  117. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/CHANGES +63 -0
  118. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/ast.hh +492 -0
  119. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/conexpr.hh +82 -0
  120. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/myplugin.cpp +49 -0
  121. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/myplugin.hh +47 -0
  122. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/myplugin.pro +51 -0
  123. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/test_myplugin.fzn +1 -0
  124. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/flatzinc.cpp +1056 -0
  125. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/lexer.lxx +137 -0
  126. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/lexer.yy.cpp +2458 -0
  127. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/all_different_int.mzn +37 -0
  128. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/all_equal_int.mzn +37 -0
  129. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/among.mzn +37 -0
  130. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_least_int.mzn +37 -0
  131. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_least_set.mzn +38 -0
  132. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_most_int.mzn +37 -0
  133. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_most_set.mzn +38 -0
  134. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/bin_packing.mzn +44 -0
  135. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/bin_packing_capa.mzn +45 -0
  136. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/bin_packing_load.mzn +45 -0
  137. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/circuit.mzn +40 -0
  138. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/count.mzn +37 -0
  139. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/cumulative.mzn +53 -0
  140. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/decreasing_bool.mzn +37 -0
  141. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/decreasing_int.mzn +37 -0
  142. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/diffn.mzn +44 -0
  143. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/disjoint.mzn +37 -0
  144. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/distribute.mzn +46 -0
  145. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/exactly_int.mzn +40 -0
  146. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/exactly_set.mzn +38 -0
  147. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/gecode.mzn +98 -0
  148. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality.mzn +43 -0
  149. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality_closed.mzn +39 -0
  150. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality_low_up.mzn +40 -0
  151. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality_low_up_closed.mzn +40 -0
  152. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/increasing_bool.mzn +37 -0
  153. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/increasing_int.mzn +37 -0
  154. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/int_set_channel.mzn +49 -0
  155. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/inverse.mzn +42 -0
  156. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/lex_less_int.mzn +42 -0
  157. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/lex_lesseq_int.mzn +42 -0
  158. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/link_set_to_booleans.mzn +47 -0
  159. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/maximum_int.mzn +37 -0
  160. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/member_bool.mzn +41 -0
  161. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/member_int.mzn +41 -0
  162. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/minimum_int.mzn +37 -0
  163. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/nvalue.mzn +37 -0
  164. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/partition_set.mzn +42 -0
  165. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/precedence.mzn +41 -0
  166. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/range.mzn +51 -0
  167. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/redefinitions.mzn +62 -0
  168. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/regular.mzn +38 -0
  169. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/roots.mzn +63 -0
  170. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/sort.mzn +37 -0
  171. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/sum_pred.mzn +42 -0
  172. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/table_bool.mzn +37 -0
  173. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/table_int.mzn +37 -0
  174. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/option.hh +70 -0
  175. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.hh +265 -0
  176. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.tab.cpp +3571 -0
  177. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.tab.hh +164 -0
  178. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.yxx +1604 -0
  179. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/plugin.hh +83 -0
  180. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/registry.cpp +1812 -0
  181. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/registry.hh +71 -0
  182. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/symboltable.hh +96 -0
  183. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/varspec.hh +163 -0
  184. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist.hh +298 -0
  185. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/drawingcursor.cpp +288 -0
  186. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/drawingcursor.hh +110 -0
  187. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/drawingcursor.hpp +84 -0
  188. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gecodelogo.cpp +673 -0
  189. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gecodelogo.hh +65 -0
  190. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gist.cpp +120 -0
  191. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gist.hpp +207 -0
  192. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/layoutcursor.hh +69 -0
  193. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/layoutcursor.hpp +70 -0
  194. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/mainwindow.cpp +341 -0
  195. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/mainwindow.hh +129 -0
  196. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/node.cpp +82 -0
  197. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/node.hh +160 -0
  198. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/node.hpp +210 -0
  199. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodecursor.hh +215 -0
  200. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodecursor.hpp +271 -0
  201. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodestats.cpp +138 -0
  202. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodestats.hh +81 -0
  203. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodevisitor.hh +96 -0
  204. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodevisitor.hpp +126 -0
  205. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodewidget.cpp +90 -0
  206. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodewidget.hh +59 -0
  207. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/preferences.cpp +190 -0
  208. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/preferences.hh +96 -0
  209. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/qtgist.cpp +809 -0
  210. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/qtgist.hh +294 -0
  211. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/spacenode.cpp +369 -0
  212. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/spacenode.hh +221 -0
  213. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/spacenode.hpp +191 -0
  214. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/standalone-example/mygist.cpp +80 -0
  215. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/standalone-example/standalone_example.pro +18 -0
  216. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/stopbrancher.cpp +90 -0
  217. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/stopbrancher.hh +82 -0
  218. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/textoutput.cpp +175 -0
  219. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/textoutput.hh +75 -0
  220. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/treecanvas.cpp +1430 -0
  221. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/treecanvas.hh +369 -0
  222. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/visualnode.cpp +473 -0
  223. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/visualnode.hh +237 -0
  224. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/visualnode.hpp +220 -0
  225. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/zoomToFitIcon.hpp +114 -0
  226. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int.hh +3477 -0
  227. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic.cpp +185 -0
  228. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic.hh +666 -0
  229. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/abs.hpp +236 -0
  230. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/divmod.hpp +350 -0
  231. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/max.hpp +398 -0
  232. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/mult.hpp +750 -0
  233. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/sqr.hpp +377 -0
  234. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/sqrt.hpp +217 -0
  235. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/array-traits.hpp +147 -0
  236. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/array.cpp +113 -0
  237. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/array.hpp +111 -0
  238. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing.cpp +71 -0
  239. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing.hh +184 -0
  240. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing/propagate.cpp +388 -0
  241. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing/propagate.hpp +219 -0
  242. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool.cpp +755 -0
  243. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool.hh +581 -0
  244. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/base.hpp +137 -0
  245. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/clause.hpp +353 -0
  246. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/eq.hpp +196 -0
  247. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/eqv.cpp +104 -0
  248. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/eqv.hpp +202 -0
  249. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/lq.hpp +241 -0
  250. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/or.hpp +850 -0
  251. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch.cpp +152 -0
  252. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch.hh +607 -0
  253. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-val-bool.hpp +81 -0
  254. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-val-int.hpp +107 -0
  255. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-bool.bs +121 -0
  256. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-bool.cpp +438 -0
  257. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-int.bs +121 -0
  258. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-int.cpp +438 -0
  259. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/select-val.hpp +229 -0
  260. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/select-values.hpp +213 -0
  261. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/select-view.hpp +364 -0
  262. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel.cpp +172 -0
  263. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel.hh +249 -0
  264. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/base.hpp +78 -0
  265. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/dom.hpp +332 -0
  266. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-multi.cpp +241 -0
  267. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-multi.hpp +84 -0
  268. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-single.cpp +77 -0
  269. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-single.hpp +71 -0
  270. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/val.hpp +256 -0
  271. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit.cpp +229 -0
  272. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit.hh +160 -0
  273. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit/base.hpp +270 -0
  274. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit/dom.hpp +128 -0
  275. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit/val.hpp +105 -0
  276. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count.cpp +417 -0
  277. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count.hh +410 -0
  278. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-base.hpp +80 -0
  279. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-eq.hpp +143 -0
  280. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-gq.hpp +137 -0
  281. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-lq.hpp +136 -0
  282. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/rel.hpp +281 -0
  283. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-base.hpp +131 -0
  284. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-eq.hpp +117 -0
  285. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-gq.hpp +109 -0
  286. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-lq.hpp +96 -0
  287. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative.cpp +432 -0
  288. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative.hh +745 -0
  289. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/basic.hpp +211 -0
  290. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/edge-finding.hpp +185 -0
  291. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/man-prop.hpp +127 -0
  292. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/opt-prop.hpp +171 -0
  293. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/overload.hpp +63 -0
  294. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/task-view.hpp +84 -0
  295. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/task.hpp +256 -0
  296. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/tree.hpp +272 -0
  297. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulatives.cpp +187 -0
  298. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulatives.hh +133 -0
  299. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulatives/val.hpp +380 -0
  300. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct.cpp +97 -0
  301. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct.hh +314 -0
  302. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/bnd.hpp +444 -0
  303. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/dom-ctrl.hpp +81 -0
  304. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/dom.hpp +123 -0
  305. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/graph.hpp +266 -0
  306. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/ter-dom.hpp +113 -0
  307. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/val.hpp +185 -0
  308. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom.cpp +135 -0
  309. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom.hh +118 -0
  310. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom/range.hpp +105 -0
  311. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom/spec.hpp +124 -0
  312. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element.cpp +190 -0
  313. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element.hh +384 -0
  314. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/int.hpp +443 -0
  315. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/pair.cpp +151 -0
  316. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/pair.hpp +74 -0
  317. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/view.hpp +559 -0
  318. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exception.hpp +196 -0
  319. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec.cpp +83 -0
  320. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec.hh +87 -0
  321. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec/when.cpp +77 -0
  322. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec/when.hpp +51 -0
  323. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional.cpp +124 -0
  324. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional.hh +508 -0
  325. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/base.hpp +163 -0
  326. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/basic.hpp +148 -0
  327. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/dfa.cpp +535 -0
  328. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/dfa.hpp +282 -0
  329. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/incremental.hpp +454 -0
  330. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/layered-graph.hpp +982 -0
  331. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/tuple-set.cpp +222 -0
  332. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/tuple-set.hpp +184 -0
  333. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc.cpp +172 -0
  334. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc.hh +268 -0
  335. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/bnd-sup.hpp +608 -0
  336. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/bnd.hpp +829 -0
  337. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/dom-sup.hpp +1777 -0
  338. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/dom.hpp +315 -0
  339. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/post.hpp +169 -0
  340. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/val.hpp +299 -0
  341. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/view.hpp +410 -0
  342. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/int-set-1.hpp +249 -0
  343. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/int-set-2.hpp +51 -0
  344. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/int-set.cpp +167 -0
  345. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/limits.hpp +94 -0
  346. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear-bool.cpp +196 -0
  347. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear-int.cpp +194 -0
  348. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear.hh +1560 -0
  349. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-int.hpp +743 -0
  350. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-post.cpp +602 -0
  351. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-scale.hpp +695 -0
  352. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-view.hpp +319 -0
  353. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-bin.hpp +439 -0
  354. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-dom.hpp +484 -0
  355. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-nary.hpp +864 -0
  356. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-noview.hpp +251 -0
  357. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-post.cpp +561 -0
  358. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-ter.hpp +273 -0
  359. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/post.hpp +152 -0
  360. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member.cpp +85 -0
  361. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member.hh +125 -0
  362. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member/prop.hpp +175 -0
  363. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member/re-prop.hpp +178 -0
  364. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap.cpp +226 -0
  365. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap.hh +318 -0
  366. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/base.hpp +88 -0
  367. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/box.hpp +198 -0
  368. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/dim.hpp +197 -0
  369. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/man.hpp +119 -0
  370. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/opt.hpp +153 -0
  371. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues.cpp +244 -0
  372. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues.hh +429 -0
  373. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-base.hpp +98 -0
  374. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-eq.hpp +174 -0
  375. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-gq.hpp +149 -0
  376. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-lq.hpp +151 -0
  377. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/graph.hpp +283 -0
  378. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-base.hpp +347 -0
  379. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-eq.hpp +167 -0
  380. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-gq.hpp +130 -0
  381. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-lq.hpp +154 -0
  382. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/range-event.hpp +51 -0
  383. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/sym-bit-matrix.hpp +69 -0
  384. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/precede.cpp +73 -0
  385. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/precede.hh +113 -0
  386. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/precede/single.hpp +232 -0
  387. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/propagator.hpp +311 -0
  388. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel.cpp +381 -0
  389. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel.hh +665 -0
  390. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/eq.hpp +676 -0
  391. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/lex.hpp +414 -0
  392. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/lq-le.hpp +537 -0
  393. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/nq.hpp +196 -0
  394. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence.cpp +197 -0
  395. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence.hh +154 -0
  396. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/int.hpp +168 -0
  397. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/set-op.hpp +154 -0
  398. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/view.hpp +499 -0
  399. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/violations.hpp +101 -0
  400. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted.cpp +82 -0
  401. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted.hh +107 -0
  402. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/matching.hpp +173 -0
  403. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/narrowing.hpp +250 -0
  404. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/order.hpp +213 -0
  405. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/propagate.hpp +646 -0
  406. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/sortsup.hpp +564 -0
  407. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/support-values.hh +154 -0
  408. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/support-values.hpp +187 -0
  409. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task.hh +454 -0
  410. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/array.hpp +179 -0
  411. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/fwd-to-bwd.hpp +102 -0
  412. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/iter.hpp +92 -0
  413. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/man-to-opt.hpp +100 -0
  414. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/prop.hpp +70 -0
  415. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/purge.hpp +74 -0
  416. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/sort.hpp +234 -0
  417. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/tree.hpp +189 -0
  418. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary.cpp +258 -0
  419. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary.hh +839 -0
  420. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/detectable.hpp +116 -0
  421. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/edge-finding.hpp +78 -0
  422. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/man-prop.hpp +78 -0
  423. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/not-first-not-last.hpp +133 -0
  424. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/opt-prop.hpp +116 -0
  425. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/overload.hpp +93 -0
  426. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/subsumption.hpp +55 -0
  427. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/task-view.hpp +105 -0
  428. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/task.hpp +532 -0
  429. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/tree.hpp +229 -0
  430. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unshare.cpp +146 -0
  431. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/val-set.hh +118 -0
  432. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/val-set.hpp +186 -0
  433. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp.hpp +710 -0
  434. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/bool.cpp +65 -0
  435. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/bool.hpp +431 -0
  436. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/bool.vis +75 -0
  437. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/delta.hpp +64 -0
  438. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/int.cpp +361 -0
  439. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/int.hpp +1029 -0
  440. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/int.vis +117 -0
  441. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/bool.cpp +53 -0
  442. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/bool.hpp +121 -0
  443. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/int.cpp +61 -0
  444. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/int.hpp +145 -0
  445. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/print.hpp +56 -0
  446. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph.hh +334 -0
  447. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/bi-link.hpp +89 -0
  448. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/comb-ptr-flag.hpp +78 -0
  449. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/edge.hpp +124 -0
  450. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/graph.hpp +202 -0
  451. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/iter-prune-val.hpp +70 -0
  452. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/node.hpp +171 -0
  453. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view.hpp +1690 -0
  454. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/bool-test.hpp +64 -0
  455. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/bool.hpp +314 -0
  456. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/cached.hpp +402 -0
  457. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/constint.hpp +324 -0
  458. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/int.hpp +264 -0
  459. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/iter.hpp +65 -0
  460. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/minus.hpp +300 -0
  461. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/neg-bool.hpp +177 -0
  462. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/offset.hpp +303 -0
  463. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/print.hpp +162 -0
  464. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/rel-test.hpp +231 -0
  465. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/scale.hpp +368 -0
  466. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/zero.hpp +305 -0
  467. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter.hh +96 -0
  468. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-add.hpp +144 -0
  469. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-append.hpp +222 -0
  470. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-array.hpp +139 -0
  471. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-cache.hpp +106 -0
  472. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-compl.hpp +220 -0
  473. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-diff.hpp +142 -0
  474. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-empty.hpp +111 -0
  475. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-inter.hpp +309 -0
  476. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-list.hpp +263 -0
  477. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-map.hpp +260 -0
  478. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-minmax.hpp +118 -0
  479. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-minus.hpp +107 -0
  480. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-negative.hpp +137 -0
  481. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-offset.hpp +127 -0
  482. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-operations.hpp +157 -0
  483. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-positive.hpp +139 -0
  484. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-rangelist.hpp +115 -0
  485. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-scale.hpp +238 -0
  486. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-singleton-append.hpp +111 -0
  487. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-singleton.hpp +86 -0
  488. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-size.hpp +146 -0
  489. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-union.hpp +361 -0
  490. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-values.hpp +140 -0
  491. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-array.hpp +120 -0
  492. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-bitset.hpp +114 -0
  493. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-inter.hpp +130 -0
  494. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-list.hpp +186 -0
  495. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-map.hpp +136 -0
  496. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-minus.hpp +105 -0
  497. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-negative.hpp +116 -0
  498. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-offset.hpp +113 -0
  499. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-positive.hpp +123 -0
  500. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-ranges.hpp +106 -0
  501. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-singleton.hpp +109 -0
  502. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-union.hpp +137 -0
  503. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-unique.hpp +118 -0
  504. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel.hh +194 -0
  505. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/advisor.hpp +102 -0
  506. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/allocators.hpp +476 -0
  507. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/archive.cpp +70 -0
  508. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/archive.hpp +298 -0
  509. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/array.hpp +2133 -0
  510. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/branch.cpp +121 -0
  511. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/branch.hpp +254 -0
  512. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher-tiebreak.hpp +615 -0
  513. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher-val.hpp +126 -0
  514. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher-view.hpp +455 -0
  515. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher.hpp +431 -0
  516. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/core.cpp +563 -0
  517. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/core.hpp +3668 -0
  518. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/exception.hpp +124 -0
  519. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/global-prop-info.hpp +258 -0
  520. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/macros.hpp +118 -0
  521. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/memory-config.hpp +154 -0
  522. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/memory-manager.cpp +53 -0
  523. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/memory-manager.hpp +511 -0
  524. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/modevent.hpp +69 -0
  525. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/propagator.hpp +699 -0
  526. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/range-list.hpp +184 -0
  527. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/region.cpp +85 -0
  528. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/region.hpp +459 -0
  529. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/shared-array.hpp +345 -0
  530. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/var-imp.hpp +332 -0
  531. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/var-type.hpp +767 -0
  532. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/var.hpp +144 -0
  533. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/view.hpp +715 -0
  534. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/wait.hh +244 -0
  535. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel.hh +1870 -0
  536. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/arithmetic.cpp +408 -0
  537. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/bool-expr.cpp +522 -0
  538. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/bool-expr.hpp +87 -0
  539. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/exception.hpp +84 -0
  540. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-expr.cpp +594 -0
  541. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-expr.hpp +297 -0
  542. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-rel.cpp +414 -0
  543. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-rel.hpp +85 -0
  544. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/matrix.hpp +247 -0
  545. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/optimize.hpp +62 -0
  546. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/reg.cpp +817 -0
  547. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/reg.hpp +94 -0
  548. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-expr.cpp +704 -0
  549. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-expr.hpp +96 -0
  550. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-rel.cpp +81 -0
  551. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-rel.hpp +84 -0
  552. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search.hh +458 -0
  553. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/bab.cpp +62 -0
  554. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/bab.hpp +91 -0
  555. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/dfs.cpp +62 -0
  556. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/dfs.hpp +84 -0
  557. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/options.cpp +72 -0
  558. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/options.hpp +49 -0
  559. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/bab.cpp +178 -0
  560. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/bab.hh +203 -0
  561. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/dfs.cpp +176 -0
  562. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/dfs.hh +195 -0
  563. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/engine.cpp +118 -0
  564. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/engine.hh +418 -0
  565. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/path.hh +477 -0
  566. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/restart.cpp +167 -0
  567. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/restart.hh +73 -0
  568. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/restart.cpp +62 -0
  569. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/restart.hpp +88 -0
  570. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/bab.hh +177 -0
  571. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/dfs.hh +176 -0
  572. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/path.hh +411 -0
  573. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/restart.hh +89 -0
  574. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/statistics.hpp +70 -0
  575. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/stop.cpp +83 -0
  576. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/stop.hpp +137 -0
  577. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/support.hh +91 -0
  578. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/worker.hh +202 -0
  579. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set.hh +1144 -0
  580. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/array-traits.hpp +86 -0
  581. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/array.cpp +219 -0
  582. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/array.hpp +64 -0
  583. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch.cpp +128 -0
  584. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch.hh +438 -0
  585. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/post-val.hpp +107 -0
  586. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/post-view.bs +109 -0
  587. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/post-view.cpp +370 -0
  588. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/select-val.hpp +204 -0
  589. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/select-view.hpp +306 -0
  590. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/cardinality.cpp +65 -0
  591. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex.cpp +60 -0
  592. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex.hh +107 -0
  593. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/conv.cpp +97 -0
  594. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/conv.hpp +67 -0
  595. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/hull.cpp +116 -0
  596. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/hull.hpp +68 -0
  597. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct.cpp +56 -0
  598. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct.hh +79 -0
  599. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct/atmostOne.cpp +162 -0
  600. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct/atmostOne.hpp +66 -0
  601. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/dom.cpp +300 -0
  602. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element.cpp +255 -0
  603. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element.hh +218 -0
  604. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/disjoint.hpp +324 -0
  605. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/inter.hpp +308 -0
  606. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/union.hpp +342 -0
  607. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/unionConst.hpp +293 -0
  608. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/exception.hpp +146 -0
  609. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/exec.cpp +58 -0
  610. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int.cpp +191 -0
  611. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int.hh +459 -0
  612. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/card.hpp +93 -0
  613. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/channel-bool.hpp +282 -0
  614. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/channel-int.hpp +158 -0
  615. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/match.hpp +199 -0
  616. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/minmax.hpp +645 -0
  617. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/weights.hpp +353 -0
  618. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/limits.hpp +62 -0
  619. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/precede.cpp +74 -0
  620. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/precede.hh +115 -0
  621. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/precede/single.hpp +255 -0
  622. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-cvc.cpp +66 -0
  623. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-cvv.cpp +65 -0
  624. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-vcc.cpp +168 -0
  625. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-vcv.cpp +166 -0
  626. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-vvc.cpp +63 -0
  627. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-singleton.cpp +115 -0
  628. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-ternary.cpp +60 -0
  629. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op.cpp +105 -0
  630. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op.hh +297 -0
  631. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/common.hpp +619 -0
  632. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/inter.hpp +389 -0
  633. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/partition.hpp +164 -0
  634. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl-cvc.cpp +58 -0
  635. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl-cvv.cpp +54 -0
  636. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl-vvc.cpp +57 -0
  637. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl.cpp +54 -0
  638. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl-cvc.cpp +55 -0
  639. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl-cvv.cpp +54 -0
  640. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl-vvc.cpp +54 -0
  641. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl.cpp +54 -0
  642. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post.hpp +266 -0
  643. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/subofunion.hpp +166 -0
  644. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/superofinter.hpp +167 -0
  645. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/union.hpp +319 -0
  646. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel.cpp +232 -0
  647. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel.hh +322 -0
  648. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/common.hpp +125 -0
  649. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/eq.hpp +116 -0
  650. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/lq.hpp +417 -0
  651. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/nosubset.hpp +104 -0
  652. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/nq.hpp +160 -0
  653. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/re-eq.hpp +152 -0
  654. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/re-lq.hpp +182 -0
  655. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/re-subset.hpp +146 -0
  656. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/subset.hpp +96 -0
  657. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence.cpp +64 -0
  658. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence.hh +115 -0
  659. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/common.hpp +100 -0
  660. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq-u.cpp +145 -0
  661. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq-u.hpp +79 -0
  662. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq.cpp +76 -0
  663. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq.hpp +69 -0
  664. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp.hpp +634 -0
  665. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/delta.hpp +78 -0
  666. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/integerset.cpp +348 -0
  667. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/integerset.hpp +426 -0
  668. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/iter.hpp +63 -0
  669. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/set.cpp +142 -0
  670. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/set.hpp +531 -0
  671. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/set.vis +197 -0
  672. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var/print.hpp +49 -0
  673. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var/set.cpp +111 -0
  674. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var/set.hpp +254 -0
  675. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view.hpp +1142 -0
  676. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/cached.hpp +399 -0
  677. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/complement.hpp +556 -0
  678. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/const.hpp +723 -0
  679. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/print.hpp +140 -0
  680. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/set.hpp +263 -0
  681. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/singleton.hpp +402 -0
  682. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support.hh +135 -0
  683. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/auto-link.hpp +73 -0
  684. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/bitset-base.hpp +379 -0
  685. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/bitset.hpp +81 -0
  686. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/block-allocator.hpp +169 -0
  687. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/cast.hpp +52 -0
  688. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/config.hpp.in +109 -0
  689. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/dynamic-array.hpp +140 -0
  690. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/dynamic-queue.hpp +156 -0
  691. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/dynamic-stack.hpp +186 -0
  692. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/exception.cpp +65 -0
  693. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/exception.hpp +102 -0
  694. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/heap.cpp +49 -0
  695. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/heap.hpp +593 -0
  696. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/int-type.hpp +172 -0
  697. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/macros.hpp +103 -0
  698. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/marked-pointer.hpp +79 -0
  699. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/random.hpp +128 -0
  700. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/sort.hpp +268 -0
  701. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/static-stack.hpp +148 -0
  702. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread.hpp +272 -0
  703. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/none.hpp +87 -0
  704. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/pthreads.cpp +66 -0
  705. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/pthreads.hpp +142 -0
  706. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/thread.cpp +72 -0
  707. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/thread.hpp +114 -0
  708. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/windows.cpp +68 -0
  709. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/windows.hpp +108 -0
  710. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/timer.hpp +103 -0
  711. data/ext/libgecode3/vendor/gecode-3.7.3/install-sh +323 -0
  712. data/ext/libgecode3/vendor/gecode-3.7.3/misc/allexamples.perl +60 -0
  713. data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/back.png +0 -0
  714. data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/footer.html +3 -0
  715. data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/gecode-logo-100.png +0 -0
  716. data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/header.html +66 -0
  717. data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/stylesheet.css +468 -0
  718. data/ext/libgecode3/vendor/gecode-3.7.3/misc/fixautoheader.perl +55 -0
  719. data/ext/libgecode3/vendor/gecode-3.7.3/misc/fixmanifest.perl +84 -0
  720. data/ext/libgecode3/vendor/gecode-3.7.3/misc/fixproperties.sh +98 -0
  721. data/ext/libgecode3/vendor/gecode-3.7.3/misc/gecode-logo.ico +0 -0
  722. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genbranch.perl +310 -0
  723. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genchangelog.perl +249 -0
  724. data/ext/libgecode3/vendor/gecode-3.7.3/misc/gencurrentchangelog.perl +191 -0
  725. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genlcovmakefile.perl +148 -0
  726. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genlicense.perl +121 -0
  727. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genrc.perl +236 -0
  728. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genstatistics.perl +178 -0
  729. data/ext/libgecode3/vendor/gecode-3.7.3/misc/gentxtchangelog.perl +198 -0
  730. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genvarimp.perl +877 -0
  731. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genxcodeproj.perl +144 -0
  732. data/ext/libgecode3/vendor/gecode-3.7.3/misc/getrevision.perl +47 -0
  733. data/ext/libgecode3/vendor/gecode-3.7.3/misc/makedepend.perl +85 -0
  734. data/ext/libgecode3/vendor/gecode-3.7.3/misc/svn-ignore-root.txt +43 -0
  735. data/ext/libgecode3/vendor/gecode-3.7.3/misc/svn-ignore.txt +18 -0
  736. data/ext/libgecode3/vendor/gecode-3.7.3/test/afc.cpp +143 -0
  737. data/ext/libgecode3/vendor/gecode-3.7.3/test/array.cpp +277 -0
  738. data/ext/libgecode3/vendor/gecode-3.7.3/test/assign.cpp +278 -0
  739. data/ext/libgecode3/vendor/gecode-3.7.3/test/assign.hh +119 -0
  740. data/ext/libgecode3/vendor/gecode-3.7.3/test/assign/bool.cpp +61 -0
  741. data/ext/libgecode3/vendor/gecode-3.7.3/test/assign/int.cpp +70 -0
  742. data/ext/libgecode3/vendor/gecode-3.7.3/test/assign/set.cpp +72 -0
  743. data/ext/libgecode3/vendor/gecode-3.7.3/test/branch.cpp +504 -0
  744. data/ext/libgecode3/vendor/gecode-3.7.3/test/branch.hh +119 -0
  745. data/ext/libgecode3/vendor/gecode-3.7.3/test/branch/bool.cpp +61 -0
  746. data/ext/libgecode3/vendor/gecode-3.7.3/test/branch/int.cpp +70 -0
  747. data/ext/libgecode3/vendor/gecode-3.7.3/test/branch/set.cpp +72 -0
  748. data/ext/libgecode3/vendor/gecode-3.7.3/test/int.cpp +655 -0
  749. data/ext/libgecode3/vendor/gecode-3.7.3/test/int.hh +353 -0
  750. data/ext/libgecode3/vendor/gecode-3.7.3/test/int.hpp +314 -0
  751. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/arithmetic.cpp +772 -0
  752. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/basic.cpp +82 -0
  753. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/bin-packing.cpp +237 -0
  754. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/bool.cpp +500 -0
  755. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/channel.cpp +234 -0
  756. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/circuit.cpp +359 -0
  757. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/count.cpp +410 -0
  758. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/cumulative.cpp +560 -0
  759. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/cumulatives.cpp +276 -0
  760. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/distinct.cpp +248 -0
  761. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/dom.cpp +174 -0
  762. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/element.cpp +602 -0
  763. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/exec.cpp +150 -0
  764. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/extensional.cpp +571 -0
  765. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/gcc.cpp +320 -0
  766. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/linear.cpp +394 -0
  767. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/member.cpp +138 -0
  768. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-arithmetic.cpp +368 -0
  769. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-bool.cpp +4344 -0
  770. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-count.cpp +295 -0
  771. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-lin.cpp +2179 -0
  772. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-rel.cpp +136 -0
  773. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/no-overlap.cpp +259 -0
  774. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/nvalues.cpp +241 -0
  775. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/precede.cpp +115 -0
  776. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/rel.cpp +568 -0
  777. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/sequence.cpp +168 -0
  778. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/sorted.cpp +165 -0
  779. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/unary.cpp +327 -0
  780. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/unshare.cpp +109 -0
  781. data/ext/libgecode3/vendor/gecode-3.7.3/test/search.cpp +487 -0
  782. data/ext/libgecode3/vendor/gecode-3.7.3/test/set.cpp +638 -0
  783. data/ext/libgecode3/vendor/gecode-3.7.3/test/set.hh +362 -0
  784. data/ext/libgecode3/vendor/gecode-3.7.3/test/set.hpp +121 -0
  785. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/construct.cpp +225 -0
  786. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/convex.cpp +139 -0
  787. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/distinct.cpp +116 -0
  788. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/dom.cpp +346 -0
  789. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/element.cpp +397 -0
  790. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/exec.cpp +86 -0
  791. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/int.cpp +532 -0
  792. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/mm-set.cpp +4532 -0
  793. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/precede.cpp +136 -0
  794. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/rel-op-const.cpp +368 -0
  795. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/rel-op.cpp +504 -0
  796. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/rel.cpp +157 -0
  797. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/sequence.cpp +133 -0
  798. data/ext/libgecode3/vendor/gecode-3.7.3/test/test.cpp +281 -0
  799. data/ext/libgecode3/vendor/gecode-3.7.3/test/test.hh +161 -0
  800. data/ext/libgecode3/vendor/gecode-3.7.3/test/test.hpp +76 -0
  801. data/ext/libgecode3/vendor/gecode-3.7.3/tools/flatzinc/fz.cpp +93 -0
  802. data/ext/libgecode3/vendor/gecode-3.7.3/tools/flatzinc/mzn-gecode.bat.in +41 -0
  803. data/ext/libgecode3/vendor/gecode-3.7.3/tools/flatzinc/mzn-gecode.in +41 -0
  804. data/lib/dep-selector-libgecode.rb +15 -0
  805. data/lib/dep-selector-libgecode/version.rb +3 -0
  806. metadata +878 -0
@@ -0,0 +1,3571 @@
1
+ /* A Bison parser, made by GNU Bison 2.3. */
2
+
3
+ /* Skeleton implementation for Bison's Yacc-like parsers in C
4
+
5
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6
+ Free Software Foundation, Inc.
7
+
8
+ This program is free software; you can redistribute it and/or modify
9
+ it under the terms of the GNU General Public License as published by
10
+ the Free Software Foundation; either version 2, or (at your option)
11
+ any later version.
12
+
13
+ This program is distributed in the hope that it will be useful,
14
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ GNU General Public License for more details.
17
+
18
+ You should have received a copy of the GNU General Public License
19
+ along with this program; if not, write to the Free Software
20
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
+ Boston, MA 02110-1301, USA. */
22
+
23
+ /* As a special exception, you may create a larger work that contains
24
+ part or all of the Bison parser skeleton and distribute that work
25
+ under terms of your choice, so long as that work isn't itself a
26
+ parser generator using the skeleton or a modified version thereof
27
+ as a parser skeleton. Alternatively, if you modify or redistribute
28
+ the parser skeleton itself, you may (at your option) remove this
29
+ special exception, which will cause the skeleton and the resulting
30
+ Bison output files to be licensed under the GNU General Public
31
+ License without this special exception.
32
+
33
+ This special exception was added by the Free Software Foundation in
34
+ version 2.2 of Bison. */
35
+
36
+ /* C LALR(1) parser skeleton written by Richard Stallman, by
37
+ simplifying the original so-called "semantic" parser. */
38
+
39
+ /* All symbols defined below should begin with yy or YY, to avoid
40
+ infringing on user name space. This should be done even for local
41
+ variables, as they might otherwise be expanded by user macros.
42
+ There are some unavoidable exceptions within include files to
43
+ define necessary library symbols; they are noted "INFRINGES ON
44
+ USER NAME SPACE" below. */
45
+
46
+ /* Identify Bison output. */
47
+ #define YYBISON 1
48
+
49
+ /* Bison version. */
50
+ #define YYBISON_VERSION "2.3"
51
+
52
+ /* Skeleton name. */
53
+ #define YYSKELETON_NAME "yacc.c"
54
+
55
+ /* Pure parsers. */
56
+ #define YYPURE 1
57
+
58
+ /* Using locations. */
59
+ #define YYLSP_NEEDED 0
60
+
61
+
62
+
63
+ /* Tokens. */
64
+ #ifndef YYTOKENTYPE
65
+ # define YYTOKENTYPE
66
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
67
+ know about them. */
68
+ enum yytokentype {
69
+ FZ_INT_LIT = 258,
70
+ FZ_BOOL_LIT = 259,
71
+ FZ_FLOAT_LIT = 260,
72
+ FZ_ID = 261,
73
+ FZ_U_ID = 262,
74
+ FZ_STRING_LIT = 263,
75
+ FZ_VAR = 264,
76
+ FZ_PAR = 265,
77
+ FZ_ANNOTATION = 266,
78
+ FZ_ANY = 267,
79
+ FZ_ARRAY = 268,
80
+ FZ_BOOL = 269,
81
+ FZ_CASE = 270,
82
+ FZ_COLONCOLON = 271,
83
+ FZ_CONSTRAINT = 272,
84
+ FZ_DEFAULT = 273,
85
+ FZ_DOTDOT = 274,
86
+ FZ_ELSE = 275,
87
+ FZ_ELSEIF = 276,
88
+ FZ_ENDIF = 277,
89
+ FZ_ENUM = 278,
90
+ FZ_FLOAT = 279,
91
+ FZ_FUNCTION = 280,
92
+ FZ_IF = 281,
93
+ FZ_INCLUDE = 282,
94
+ FZ_INT = 283,
95
+ FZ_LET = 284,
96
+ FZ_MAXIMIZE = 285,
97
+ FZ_MINIMIZE = 286,
98
+ FZ_OF = 287,
99
+ FZ_SATISFY = 288,
100
+ FZ_OUTPUT = 289,
101
+ FZ_PREDICATE = 290,
102
+ FZ_RECORD = 291,
103
+ FZ_SET = 292,
104
+ FZ_SHOW = 293,
105
+ FZ_SHOWCOND = 294,
106
+ FZ_SOLVE = 295,
107
+ FZ_STRING = 296,
108
+ FZ_TEST = 297,
109
+ FZ_THEN = 298,
110
+ FZ_TUPLE = 299,
111
+ FZ_TYPE = 300,
112
+ FZ_VARIANT_RECORD = 301,
113
+ FZ_WHERE = 302
114
+ };
115
+ #endif
116
+ /* Tokens. */
117
+ #define FZ_INT_LIT 258
118
+ #define FZ_BOOL_LIT 259
119
+ #define FZ_FLOAT_LIT 260
120
+ #define FZ_ID 261
121
+ #define FZ_U_ID 262
122
+ #define FZ_STRING_LIT 263
123
+ #define FZ_VAR 264
124
+ #define FZ_PAR 265
125
+ #define FZ_ANNOTATION 266
126
+ #define FZ_ANY 267
127
+ #define FZ_ARRAY 268
128
+ #define FZ_BOOL 269
129
+ #define FZ_CASE 270
130
+ #define FZ_COLONCOLON 271
131
+ #define FZ_CONSTRAINT 272
132
+ #define FZ_DEFAULT 273
133
+ #define FZ_DOTDOT 274
134
+ #define FZ_ELSE 275
135
+ #define FZ_ELSEIF 276
136
+ #define FZ_ENDIF 277
137
+ #define FZ_ENUM 278
138
+ #define FZ_FLOAT 279
139
+ #define FZ_FUNCTION 280
140
+ #define FZ_IF 281
141
+ #define FZ_INCLUDE 282
142
+ #define FZ_INT 283
143
+ #define FZ_LET 284
144
+ #define FZ_MAXIMIZE 285
145
+ #define FZ_MINIMIZE 286
146
+ #define FZ_OF 287
147
+ #define FZ_SATISFY 288
148
+ #define FZ_OUTPUT 289
149
+ #define FZ_PREDICATE 290
150
+ #define FZ_RECORD 291
151
+ #define FZ_SET 292
152
+ #define FZ_SHOW 293
153
+ #define FZ_SHOWCOND 294
154
+ #define FZ_SOLVE 295
155
+ #define FZ_STRING 296
156
+ #define FZ_TEST 297
157
+ #define FZ_THEN 298
158
+ #define FZ_TUPLE 299
159
+ #define FZ_TYPE 300
160
+ #define FZ_VARIANT_RECORD 301
161
+ #define FZ_WHERE 302
162
+
163
+
164
+
165
+
166
+ /* Copy the first part of user declarations. */
167
+ #line 40 "gecode/flatzinc/parser.yxx"
168
+
169
+ #define YYPARSE_PARAM parm
170
+ #define YYLEX_PARAM static_cast<ParserState*>(parm)->yyscanner
171
+ #include <gecode/flatzinc.hh>
172
+ #include <gecode/flatzinc/parser.hh>
173
+ #include <iostream>
174
+ #include <fstream>
175
+
176
+ #ifdef HAVE_MMAP
177
+ #include <stdio.h>
178
+ #include <stdlib.h>
179
+ #include <fcntl.h>
180
+ #include <unistd.h>
181
+ #include <sys/types.h>
182
+ #include <sys/mman.h>
183
+ #include <sys/stat.h>
184
+ #endif
185
+
186
+ using namespace std;
187
+
188
+ int yyparse(void*);
189
+ int yylex(YYSTYPE*, void* scanner);
190
+ int yylex_init (void** scanner);
191
+ int yylex_destroy (void* scanner);
192
+ int yyget_lineno (void* scanner);
193
+ void yyset_extra (void* user_defined ,void* yyscanner );
194
+
195
+ extern int yydebug;
196
+
197
+ using namespace Gecode;
198
+ using namespace Gecode::FlatZinc;
199
+
200
+ void yyerror(void* parm, const char *str) {
201
+ ParserState* pp = static_cast<ParserState*>(parm);
202
+ pp->err << "Error: " << str
203
+ << " in line no. " << yyget_lineno(pp->yyscanner)
204
+ << std::endl;
205
+ pp->hadError = true;
206
+ }
207
+
208
+ void yyassert(ParserState* pp, bool cond, const char* str)
209
+ {
210
+ if (!cond) {
211
+ pp->err << "Error: " << str
212
+ << " in line no. " << yyget_lineno(pp->yyscanner)
213
+ << std::endl;
214
+ pp->hadError = true;
215
+ }
216
+ }
217
+
218
+ /*
219
+ * The symbol tables
220
+ *
221
+ */
222
+
223
+ AST::Node* getArrayElement(ParserState* pp, string id, int offset) {
224
+ if (offset > 0) {
225
+ SymbolEntry e;
226
+ if (pp->symbols.get(id,e)) {
227
+ switch (e.t) {
228
+ case ST_INTVARARRAY:
229
+ if (offset > pp->arrays[e.i])
230
+ goto error;
231
+ return new AST::IntVar(pp->arrays[e.i+offset]);
232
+ case ST_BOOLVARARRAY:
233
+ if (offset > pp->arrays[e.i])
234
+ goto error;
235
+ return new AST::BoolVar(pp->arrays[e.i+offset]);
236
+ case ST_SETVARARRAY:
237
+ if (offset > pp->arrays[e.i])
238
+ goto error;
239
+ return new AST::SetVar(pp->arrays[e.i+offset]);
240
+ case ST_INTVALARRAY:
241
+ if (offset > pp->arrays[e.i])
242
+ goto error;
243
+ return new AST::IntLit(pp->arrays[e.i+offset]);
244
+ case ST_SETVALARRAY:
245
+ if (offset > pp->arrays[e.i])
246
+ goto error;
247
+ return new AST::SetLit(pp->setvals[pp->arrays[e.i+1]+offset-1]);
248
+ default:
249
+ break;
250
+ }
251
+ }
252
+ }
253
+ error:
254
+ pp->err << "Error: array access to " << id << " invalid"
255
+ << " in line no. "
256
+ << yyget_lineno(pp->yyscanner) << std::endl;
257
+ pp->hadError = true;
258
+ return new AST::IntVar(0); // keep things consistent
259
+ }
260
+ AST::Node* getVarRefArg(ParserState* pp, string id, bool annotation = false) {
261
+ SymbolEntry e;
262
+ if (pp->symbols.get(id, e)) {
263
+ switch (e.t) {
264
+ case ST_INTVAR: return new AST::IntVar(e.i);
265
+ case ST_BOOLVAR: return new AST::BoolVar(e.i);
266
+ case ST_SETVAR: return new AST::SetVar(e.i);
267
+ default: break;
268
+ }
269
+ }
270
+
271
+ if (annotation)
272
+ return new AST::Atom(id);
273
+ pp->err << "Error: undefined variable " << id
274
+ << " in line no. "
275
+ << yyget_lineno(pp->yyscanner) << std::endl;
276
+ pp->hadError = true;
277
+ return new AST::IntVar(0); // keep things consistent
278
+ }
279
+
280
+ void addDomainConstraint(ParserState* pp, std::string id, AST::Node* var,
281
+ Option<AST::SetLit* >& dom) {
282
+ if (!dom())
283
+ return;
284
+ AST::Array* args = new AST::Array(2);
285
+ args->a[0] = var;
286
+ args->a[1] = dom.some();
287
+ pp->domainConstraints.push_back(new ConExpr(id, args));
288
+ }
289
+
290
+ /*
291
+ * Initialize the root gecode space
292
+ *
293
+ */
294
+
295
+ void initfg(ParserState* pp) {
296
+ if (!pp->hadError)
297
+ pp->fg->init(pp->intvars.size(),
298
+ pp->boolvars.size(),
299
+ pp->setvars.size());
300
+
301
+ for (unsigned int i=0; i<pp->intvars.size(); i++) {
302
+ if (!pp->hadError) {
303
+ try {
304
+ pp->fg->newIntVar(static_cast<IntVarSpec*>(pp->intvars[i].second));
305
+ } catch (Gecode::FlatZinc::Error& e) {
306
+ yyerror(pp, e.toString().c_str());
307
+ }
308
+ }
309
+ if (pp->intvars[i].first[0] != '[') {
310
+ delete pp->intvars[i].second;
311
+ pp->intvars[i].second = NULL;
312
+ }
313
+ }
314
+ for (unsigned int i=0; i<pp->boolvars.size(); i++) {
315
+ if (!pp->hadError) {
316
+ try {
317
+ pp->fg->newBoolVar(
318
+ static_cast<BoolVarSpec*>(pp->boolvars[i].second));
319
+ } catch (Gecode::FlatZinc::Error& e) {
320
+ yyerror(pp, e.toString().c_str());
321
+ }
322
+ }
323
+ if (pp->boolvars[i].first[0] != '[') {
324
+ delete pp->boolvars[i].second;
325
+ pp->boolvars[i].second = NULL;
326
+ }
327
+ }
328
+ for (unsigned int i=0; i<pp->setvars.size(); i++) {
329
+ if (!pp->hadError) {
330
+ try {
331
+ pp->fg->newSetVar(static_cast<SetVarSpec*>(pp->setvars[i].second));
332
+ } catch (Gecode::FlatZinc::Error& e) {
333
+ yyerror(pp, e.toString().c_str());
334
+ }
335
+ }
336
+ if (pp->setvars[i].first[0] != '[') {
337
+ delete pp->setvars[i].second;
338
+ pp->setvars[i].second = NULL;
339
+ }
340
+ }
341
+ for (unsigned int i=pp->domainConstraints.size(); i--;) {
342
+ if (!pp->hadError) {
343
+ try {
344
+ assert(pp->domainConstraints[i]->args->a.size() == 2);
345
+ pp->fg->postConstraint(*pp->domainConstraints[i], NULL);
346
+ delete pp->domainConstraints[i];
347
+ } catch (Gecode::FlatZinc::Error& e) {
348
+ yyerror(pp, e.toString().c_str());
349
+ }
350
+ }
351
+ }
352
+ }
353
+
354
+ void fillPrinter(ParserState& pp, Gecode::FlatZinc::Printer& p) {
355
+ p.init(pp.getOutput());
356
+ }
357
+
358
+ AST::Node* arrayOutput(AST::Call* ann) {
359
+ AST::Array* a = NULL;
360
+
361
+ if (ann->args->isArray()) {
362
+ a = ann->args->getArray();
363
+ } else {
364
+ a = new AST::Array(ann->args);
365
+ }
366
+
367
+ std::ostringstream oss;
368
+
369
+ oss << "array" << a->a.size() << "d(";
370
+ for (unsigned int i=0; i<a->a.size(); i++) {
371
+ AST::SetLit* s = a->a[i]->getSet();
372
+ if (s->empty())
373
+ oss << "{}, ";
374
+ else if (s->interval)
375
+ oss << s->min << ".." << s->max << ", ";
376
+ else {
377
+ oss << "{";
378
+ for (unsigned int j=0; j<s->s.size(); j++) {
379
+ oss << s->s[j];
380
+ if (j<s->s.size()-1)
381
+ oss << ",";
382
+ }
383
+ oss << "}, ";
384
+ }
385
+ }
386
+
387
+ if (!ann->args->isArray()) {
388
+ a->a[0] = NULL;
389
+ delete a;
390
+ }
391
+ return new AST::String(oss.str());
392
+ }
393
+
394
+ /*
395
+ * The main program
396
+ *
397
+ */
398
+
399
+ namespace Gecode { namespace FlatZinc {
400
+
401
+ FlatZincSpace* parse(const std::string& filename, Printer& p, std::ostream& err,
402
+ FlatZincSpace* fzs) {
403
+ #ifdef HAVE_MMAP
404
+ int fd;
405
+ char* data;
406
+ struct stat sbuf;
407
+ fd = open(filename.c_str(), O_RDONLY);
408
+ if (fd == -1) {
409
+ err << "Cannot open file " << filename << endl;
410
+ return NULL;
411
+ }
412
+ if (stat(filename.c_str(), &sbuf) == -1) {
413
+ err << "Cannot stat file " << filename << endl;
414
+ return NULL;
415
+ }
416
+ data = (char*)mmap((caddr_t)0, sbuf.st_size, PROT_READ, MAP_SHARED, fd,0);
417
+ if (data == (caddr_t)(-1)) {
418
+ err << "Cannot mmap file " << filename << endl;
419
+ return NULL;
420
+ }
421
+
422
+ if (fzs == NULL) {
423
+ fzs = new FlatZincSpace();
424
+ }
425
+ ParserState pp(data, sbuf.st_size, err, fzs);
426
+ #else
427
+ std::ifstream file;
428
+ file.open(filename.c_str());
429
+ if (!file.is_open()) {
430
+ err << "Cannot open file " << filename << endl;
431
+ return NULL;
432
+ }
433
+ std::string s = string(istreambuf_iterator<char>(file),
434
+ istreambuf_iterator<char>());
435
+ if (fzs == NULL) {
436
+ fzs = new FlatZincSpace();
437
+ }
438
+ ParserState pp(s, err, fzs);
439
+ #endif
440
+ yylex_init(&pp.yyscanner);
441
+ yyset_extra(&pp, pp.yyscanner);
442
+ // yydebug = 1;
443
+ yyparse(&pp);
444
+ fillPrinter(pp, p);
445
+
446
+ if (pp.yyscanner)
447
+ yylex_destroy(pp.yyscanner);
448
+ return pp.hadError ? NULL : pp.fg;
449
+ }
450
+
451
+ FlatZincSpace* parse(std::istream& is, Printer& p, std::ostream& err,
452
+ FlatZincSpace* fzs) {
453
+ std::string s = string(istreambuf_iterator<char>(is),
454
+ istreambuf_iterator<char>());
455
+
456
+ if (fzs == NULL) {
457
+ fzs = new FlatZincSpace();
458
+ }
459
+ ParserState pp(s, err, fzs);
460
+ yylex_init(&pp.yyscanner);
461
+ yyset_extra(&pp, pp.yyscanner);
462
+ // yydebug = 1;
463
+ yyparse(&pp);
464
+ fillPrinter(pp, p);
465
+
466
+ if (pp.yyscanner)
467
+ yylex_destroy(pp.yyscanner);
468
+ return pp.hadError ? NULL : pp.fg;
469
+ }
470
+
471
+ }}
472
+
473
+
474
+
475
+ /* Enabling traces. */
476
+ #ifndef YYDEBUG
477
+ # define YYDEBUG 1
478
+ #endif
479
+
480
+ /* Enabling verbose error messages. */
481
+ #ifdef YYERROR_VERBOSE
482
+ # undef YYERROR_VERBOSE
483
+ # define YYERROR_VERBOSE 1
484
+ #else
485
+ # define YYERROR_VERBOSE 1
486
+ #endif
487
+
488
+ /* Enabling the token table. */
489
+ #ifndef YYTOKEN_TABLE
490
+ # define YYTOKEN_TABLE 0
491
+ #endif
492
+
493
+ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
494
+ typedef union YYSTYPE
495
+ #line 347 "gecode/flatzinc/parser.yxx"
496
+ { int iValue; char* sValue; bool bValue; double dValue;
497
+ std::vector<int>* setValue;
498
+ Gecode::FlatZinc::AST::SetLit* setLit;
499
+ std::vector<double>* floatSetValue;
500
+ std::vector<Gecode::FlatZinc::AST::SetLit>* setValueList;
501
+ Gecode::FlatZinc::Option<Gecode::FlatZinc::AST::SetLit* > oSet;
502
+ Gecode::FlatZinc::VarSpec* varSpec;
503
+ Gecode::FlatZinc::Option<Gecode::FlatZinc::AST::Node*> oArg;
504
+ std::vector<Gecode::FlatZinc::VarSpec*>* varSpecVec;
505
+ Gecode::FlatZinc::Option<std::vector<Gecode::FlatZinc::VarSpec*>* > oVarSpecVec;
506
+ Gecode::FlatZinc::AST::Node* arg;
507
+ Gecode::FlatZinc::AST::Array* argVec;
508
+ }
509
+ /* Line 193 of yacc.c. */
510
+ #line 511 "gecode/flatzinc/parser.tab.cpp"
511
+ YYSTYPE;
512
+ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
513
+ # define YYSTYPE_IS_DECLARED 1
514
+ # define YYSTYPE_IS_TRIVIAL 1
515
+ #endif
516
+
517
+
518
+
519
+ /* Copy the second part of user declarations. */
520
+
521
+
522
+ /* Line 216 of yacc.c. */
523
+ #line 524 "gecode/flatzinc/parser.tab.cpp"
524
+
525
+ #ifdef short
526
+ # undef short
527
+ #endif
528
+
529
+ #ifdef YYTYPE_UINT8
530
+ typedef YYTYPE_UINT8 yytype_uint8;
531
+ #else
532
+ typedef unsigned char yytype_uint8;
533
+ #endif
534
+
535
+ #ifdef YYTYPE_INT8
536
+ typedef YYTYPE_INT8 yytype_int8;
537
+ #elif (defined __STDC__ || defined __C99__FUNC__ \
538
+ || defined __cplusplus || defined _MSC_VER)
539
+ typedef signed char yytype_int8;
540
+ #else
541
+ typedef short int yytype_int8;
542
+ #endif
543
+
544
+ #ifdef YYTYPE_UINT16
545
+ typedef YYTYPE_UINT16 yytype_uint16;
546
+ #else
547
+ typedef unsigned short int yytype_uint16;
548
+ #endif
549
+
550
+ #ifdef YYTYPE_INT16
551
+ typedef YYTYPE_INT16 yytype_int16;
552
+ #else
553
+ typedef short int yytype_int16;
554
+ #endif
555
+
556
+ #ifndef YYSIZE_T
557
+ # ifdef __SIZE_TYPE__
558
+ # define YYSIZE_T __SIZE_TYPE__
559
+ # elif defined size_t
560
+ # define YYSIZE_T size_t
561
+ # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
562
+ || defined __cplusplus || defined _MSC_VER)
563
+ # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
564
+ # define YYSIZE_T size_t
565
+ # else
566
+ # define YYSIZE_T unsigned int
567
+ # endif
568
+ #endif
569
+
570
+ #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
571
+
572
+ #ifndef YY_
573
+ # if defined YYENABLE_NLS && YYENABLE_NLS
574
+ # if ENABLE_NLS
575
+ # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
576
+ # define YY_(msgid) dgettext ("bison-runtime", msgid)
577
+ # endif
578
+ # endif
579
+ # ifndef YY_
580
+ # define YY_(msgid) msgid
581
+ # endif
582
+ #endif
583
+
584
+ /* Suppress unused-variable warnings by "using" E. */
585
+ #if ! defined lint || defined __GNUC__
586
+ # define YYUSE(e) ((void) (e))
587
+ #else
588
+ # define YYUSE(e) /* empty */
589
+ #endif
590
+
591
+ /* Identity function, used to suppress warnings about constant conditions. */
592
+ #ifndef lint
593
+ # define YYID(n) (n)
594
+ #else
595
+ #if (defined __STDC__ || defined __C99__FUNC__ \
596
+ || defined __cplusplus || defined _MSC_VER)
597
+ static int
598
+ YYID (int i)
599
+ #else
600
+ static int
601
+ YYID (i)
602
+ int i;
603
+ #endif
604
+ {
605
+ return i;
606
+ }
607
+ #endif
608
+
609
+ #if ! defined yyoverflow || YYERROR_VERBOSE
610
+
611
+ /* The parser invokes alloca or malloc; define the necessary symbols. */
612
+
613
+ # ifdef YYSTACK_USE_ALLOCA
614
+ # if YYSTACK_USE_ALLOCA
615
+ # ifdef __GNUC__
616
+ # define YYSTACK_ALLOC __builtin_alloca
617
+ # elif defined __BUILTIN_VA_ARG_INCR
618
+ # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
619
+ # elif defined _AIX
620
+ # define YYSTACK_ALLOC __alloca
621
+ # elif defined _MSC_VER
622
+ # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
623
+ # define alloca _alloca
624
+ # else
625
+ # define YYSTACK_ALLOC alloca
626
+ # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
627
+ || defined __cplusplus || defined _MSC_VER)
628
+ # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
629
+ # ifndef _STDLIB_H
630
+ # define _STDLIB_H 1
631
+ # endif
632
+ # endif
633
+ # endif
634
+ # endif
635
+ # endif
636
+
637
+ # ifdef YYSTACK_ALLOC
638
+ /* Pacify GCC's `empty if-body' warning. */
639
+ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
640
+ # ifndef YYSTACK_ALLOC_MAXIMUM
641
+ /* The OS might guarantee only one guard page at the bottom of the stack,
642
+ and a page size can be as small as 4096 bytes. So we cannot safely
643
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
644
+ to allow for a few compiler-allocated temporary stack slots. */
645
+ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
646
+ # endif
647
+ # else
648
+ # define YYSTACK_ALLOC YYMALLOC
649
+ # define YYSTACK_FREE YYFREE
650
+ # ifndef YYSTACK_ALLOC_MAXIMUM
651
+ # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
652
+ # endif
653
+ # if (defined __cplusplus && ! defined _STDLIB_H \
654
+ && ! ((defined YYMALLOC || defined malloc) \
655
+ && (defined YYFREE || defined free)))
656
+ # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
657
+ # ifndef _STDLIB_H
658
+ # define _STDLIB_H 1
659
+ # endif
660
+ # endif
661
+ # ifndef YYMALLOC
662
+ # define YYMALLOC malloc
663
+ # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
664
+ || defined __cplusplus || defined _MSC_VER)
665
+ void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
666
+ # endif
667
+ # endif
668
+ # ifndef YYFREE
669
+ # define YYFREE free
670
+ # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
671
+ || defined __cplusplus || defined _MSC_VER)
672
+ void free (void *); /* INFRINGES ON USER NAME SPACE */
673
+ # endif
674
+ # endif
675
+ # endif
676
+ #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
677
+
678
+
679
+ #if (! defined yyoverflow \
680
+ && (! defined __cplusplus \
681
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
682
+
683
+ /* A type that is properly aligned for any stack member. */
684
+ union yyalloc
685
+ {
686
+ yytype_int16 yyss;
687
+ YYSTYPE yyvs;
688
+ };
689
+
690
+ /* The size of the maximum gap between one aligned stack and the next. */
691
+ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
692
+
693
+ /* The size of an array large to enough to hold all stacks, each with
694
+ N elements. */
695
+ # define YYSTACK_BYTES(N) \
696
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
697
+ + YYSTACK_GAP_MAXIMUM)
698
+
699
+ /* Copy COUNT objects from FROM to TO. The source and destination do
700
+ not overlap. */
701
+ # ifndef YYCOPY
702
+ # if defined __GNUC__ && 1 < __GNUC__
703
+ # define YYCOPY(To, From, Count) \
704
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
705
+ # else
706
+ # define YYCOPY(To, From, Count) \
707
+ do \
708
+ { \
709
+ YYSIZE_T yyi; \
710
+ for (yyi = 0; yyi < (Count); yyi++) \
711
+ (To)[yyi] = (From)[yyi]; \
712
+ } \
713
+ while (YYID (0))
714
+ # endif
715
+ # endif
716
+
717
+ /* Relocate STACK from its old location to the new one. The
718
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
719
+ elements in the stack, and YYPTR gives the new location of the
720
+ stack. Advance YYPTR to a properly aligned location for the next
721
+ stack. */
722
+ # define YYSTACK_RELOCATE(Stack) \
723
+ do \
724
+ { \
725
+ YYSIZE_T yynewbytes; \
726
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
727
+ Stack = &yyptr->Stack; \
728
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
729
+ yyptr += yynewbytes / sizeof (*yyptr); \
730
+ } \
731
+ while (YYID (0))
732
+
733
+ #endif
734
+
735
+ /* YYFINAL -- State number of the termination state. */
736
+ #define YYFINAL 7
737
+ /* YYLAST -- Last index in YYTABLE. */
738
+ #define YYLAST 337
739
+
740
+ /* YYNTOKENS -- Number of terminals. */
741
+ #define YYNTOKENS 58
742
+ /* YYNNTS -- Number of nonterminals. */
743
+ #define YYNNTS 67
744
+ /* YYNRULES -- Number of rules. */
745
+ #define YYNRULES 156
746
+ /* YYNRULES -- Number of states. */
747
+ #define YYNSTATES 336
748
+
749
+ /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
750
+ #define YYUNDEFTOK 2
751
+ #define YYMAXUTOK 302
752
+
753
+ #define YYTRANSLATE(YYX) \
754
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
755
+
756
+ /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
757
+ static const yytype_uint8 yytranslate[] =
758
+ {
759
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
760
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
761
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
762
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
763
+ 49, 50, 2, 2, 51, 2, 2, 2, 2, 2,
764
+ 2, 2, 2, 2, 2, 2, 2, 2, 52, 48,
765
+ 2, 55, 2, 2, 2, 2, 2, 2, 2, 2,
766
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
767
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
768
+ 2, 53, 2, 54, 2, 2, 2, 2, 2, 2,
769
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
770
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
771
+ 2, 2, 2, 56, 2, 57, 2, 2, 2, 2,
772
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
773
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
774
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
775
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
776
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
777
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
778
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
779
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
780
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
781
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
782
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
783
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
784
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
785
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
786
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
787
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
788
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
789
+ 45, 46, 47
790
+ };
791
+
792
+ #if YYDEBUG
793
+ /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
794
+ YYRHS. */
795
+ static const yytype_uint16 yyprhs[] =
796
+ {
797
+ 0, 0, 3, 9, 10, 12, 15, 19, 20, 22,
798
+ 25, 29, 30, 32, 35, 39, 45, 46, 49, 51,
799
+ 55, 59, 66, 74, 77, 79, 81, 85, 87, 89,
800
+ 91, 95, 97, 101, 103, 105, 112, 119, 126, 135,
801
+ 142, 149, 158, 172, 186, 200, 216, 232, 248, 264,
802
+ 282, 284, 286, 291, 292, 295, 297, 301, 302, 304,
803
+ 308, 310, 312, 317, 318, 321, 323, 327, 331, 333,
804
+ 335, 340, 341, 344, 346, 350, 354, 356, 358, 363,
805
+ 364, 367, 369, 373, 377, 378, 381, 382, 385, 386,
806
+ 389, 390, 393, 400, 404, 409, 411, 415, 419, 421,
807
+ 426, 428, 433, 437, 441, 442, 445, 447, 451, 452,
808
+ 455, 457, 461, 462, 465, 467, 471, 472, 475, 477,
809
+ 481, 483, 487, 489, 493, 494, 497, 499, 501, 503,
810
+ 505, 507, 512, 513, 516, 518, 522, 524, 529, 531,
811
+ 533, 534, 536, 539, 543, 548, 550, 552, 556, 558,
812
+ 562, 564, 566, 568, 570, 572, 577
813
+ };
814
+
815
+ /* YYRHS -- A `-1'-separated list of the rules' RHS. */
816
+ static const yytype_int8 yyrhs[] =
817
+ {
818
+ 59, 0, -1, 60, 62, 64, 98, 48, -1, -1,
819
+ 61, -1, 66, 48, -1, 61, 66, 48, -1, -1,
820
+ 63, -1, 75, 48, -1, 63, 75, 48, -1, -1,
821
+ 65, -1, 97, 48, -1, 65, 97, 48, -1, 35,
822
+ 6, 49, 67, 50, -1, -1, 68, 79, -1, 69,
823
+ -1, 68, 51, 69, -1, 70, 52, 6, -1, 13,
824
+ 53, 72, 54, 32, 71, -1, 13, 53, 72, 54,
825
+ 32, 9, 71, -1, 9, 71, -1, 71, -1, 99,
826
+ -1, 37, 32, 99, -1, 14, -1, 24, -1, 73,
827
+ -1, 72, 51, 73, -1, 28, -1, 3, 19, 3,
828
+ -1, 6, -1, 7, -1, 9, 99, 52, 74, 119,
829
+ 113, -1, 9, 100, 52, 74, 119, 113, -1, 9,
830
+ 101, 52, 74, 119, 113, -1, 9, 37, 32, 99,
831
+ 52, 74, 119, 113, -1, 28, 52, 74, 119, 55,
832
+ 114, -1, 14, 52, 74, 119, 55, 114, -1, 37,
833
+ 32, 28, 52, 74, 119, 55, 114, -1, 13, 53,
834
+ 3, 19, 3, 54, 32, 9, 99, 52, 74, 119,
835
+ 93, -1, 13, 53, 3, 19, 3, 54, 32, 9,
836
+ 100, 52, 74, 119, 94, -1, 13, 53, 3, 19,
837
+ 3, 54, 32, 9, 101, 52, 74, 119, 95, -1,
838
+ 13, 53, 3, 19, 3, 54, 32, 9, 37, 32,
839
+ 99, 52, 74, 119, 96, -1, 13, 53, 3, 19,
840
+ 3, 54, 32, 28, 52, 74, 119, 55, 53, 103,
841
+ 54, -1, 13, 53, 3, 19, 3, 54, 32, 14,
842
+ 52, 74, 119, 55, 53, 105, 54, -1, 13, 53,
843
+ 3, 19, 3, 54, 32, 24, 52, 74, 119, 55,
844
+ 53, 107, 54, -1, 13, 53, 3, 19, 3, 54,
845
+ 32, 37, 32, 28, 52, 74, 119, 55, 53, 109,
846
+ 54, -1, 3, -1, 74, -1, 74, 53, 3, 54,
847
+ -1, -1, 78, 79, -1, 76, -1, 78, 51, 76,
848
+ -1, -1, 51, -1, 53, 77, 54, -1, 5, -1,
849
+ 74, -1, 74, 53, 3, 54, -1, -1, 83, 79,
850
+ -1, 81, -1, 83, 51, 81, -1, 53, 82, 54,
851
+ -1, 4, -1, 74, -1, 74, 53, 3, 54, -1,
852
+ -1, 87, 79, -1, 85, -1, 87, 51, 85, -1,
853
+ 53, 86, 54, -1, 102, -1, 74, -1, 74, 53,
854
+ 3, 54, -1, -1, 91, 79, -1, 89, -1, 91,
855
+ 51, 89, -1, 53, 90, 54, -1, -1, 55, 80,
856
+ -1, -1, 55, 88, -1, -1, 55, 84, -1, -1,
857
+ 55, 92, -1, 17, 6, 49, 111, 50, 119, -1,
858
+ 40, 119, 33, -1, 40, 119, 118, 117, -1, 28,
859
+ -1, 56, 103, 57, -1, 3, 19, 3, -1, 14,
860
+ -1, 56, 106, 79, 57, -1, 24, -1, 56, 108,
861
+ 79, 57, -1, 56, 103, 57, -1, 3, 19, 3,
862
+ -1, -1, 104, 79, -1, 3, -1, 104, 51, 3,
863
+ -1, -1, 106, 79, -1, 4, -1, 106, 51, 4,
864
+ -1, -1, 108, 79, -1, 5, -1, 108, 51, 5,
865
+ -1, -1, 110, 79, -1, 102, -1, 110, 51, 102,
866
+ -1, 112, -1, 111, 51, 112, -1, 114, -1, 53,
867
+ 115, 54, -1, -1, 55, 114, -1, 4, -1, 3,
868
+ -1, 5, -1, 102, -1, 74, -1, 74, 53, 114,
869
+ 54, -1, -1, 116, 79, -1, 114, -1, 116, 51,
870
+ 114, -1, 74, -1, 74, 53, 3, 54, -1, 31,
871
+ -1, 30, -1, -1, 120, -1, 16, 121, -1, 120,
872
+ 16, 121, -1, 6, 49, 122, 50, -1, 123, -1,
873
+ 121, -1, 122, 51, 121, -1, 124, -1, 53, 122,
874
+ 54, -1, 4, -1, 3, -1, 5, -1, 102, -1,
875
+ 74, -1, 74, 53, 124, 54, -1, 8, -1
876
+ };
877
+
878
+ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
879
+ static const yytype_uint16 yyrline[] =
880
+ {
881
+ 0, 447, 447, 449, 451, 454, 455, 459, 460, 464,
882
+ 465, 467, 469, 472, 473, 480, 482, 484, 487, 488,
883
+ 491, 494, 495, 496, 497, 500, 501, 502, 503, 506,
884
+ 507, 510, 511, 517, 517, 520, 551, 582, 587, 619,
885
+ 628, 637, 649, 714, 772, 779, 842, 863, 883, 890,
886
+ 913, 917, 932, 956, 957, 961, 963, 966, 966, 968,
887
+ 972, 974, 989, 1012, 1013, 1017, 1019, 1023, 1027, 1029,
888
+ 1044, 1067, 1068, 1072, 1074, 1077, 1080, 1082, 1097, 1120,
889
+ 1121, 1125, 1127, 1130, 1135, 1136, 1141, 1142, 1147, 1148,
890
+ 1153, 1154, 1158, 1172, 1185, 1207, 1209, 1211, 1217, 1219,
891
+ 1232, 1233, 1240, 1242, 1249, 1250, 1254, 1256, 1261, 1262,
892
+ 1266, 1268, 1273, 1274, 1278, 1280, 1285, 1286, 1290, 1292,
893
+ 1300, 1302, 1306, 1308, 1313, 1314, 1318, 1320, 1322, 1324,
894
+ 1326, 1402, 1416, 1417, 1421, 1423, 1431, 1445, 1467, 1468,
895
+ 1476, 1477, 1481, 1483, 1487, 1491, 1495, 1497, 1501, 1503,
896
+ 1507, 1509, 1511, 1513, 1515, 1589, 1600
897
+ };
898
+ #endif
899
+
900
+ #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
901
+ /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
902
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
903
+ static const char *const yytname[] =
904
+ {
905
+ "$end", "error", "$undefined", "FZ_INT_LIT", "FZ_BOOL_LIT",
906
+ "FZ_FLOAT_LIT", "FZ_ID", "FZ_U_ID", "FZ_STRING_LIT", "FZ_VAR", "FZ_PAR",
907
+ "FZ_ANNOTATION", "FZ_ANY", "FZ_ARRAY", "FZ_BOOL", "FZ_CASE",
908
+ "FZ_COLONCOLON", "FZ_CONSTRAINT", "FZ_DEFAULT", "FZ_DOTDOT", "FZ_ELSE",
909
+ "FZ_ELSEIF", "FZ_ENDIF", "FZ_ENUM", "FZ_FLOAT", "FZ_FUNCTION", "FZ_IF",
910
+ "FZ_INCLUDE", "FZ_INT", "FZ_LET", "FZ_MAXIMIZE", "FZ_MINIMIZE", "FZ_OF",
911
+ "FZ_SATISFY", "FZ_OUTPUT", "FZ_PREDICATE", "FZ_RECORD", "FZ_SET",
912
+ "FZ_SHOW", "FZ_SHOWCOND", "FZ_SOLVE", "FZ_STRING", "FZ_TEST", "FZ_THEN",
913
+ "FZ_TUPLE", "FZ_TYPE", "FZ_VARIANT_RECORD", "FZ_WHERE", "';'", "'('",
914
+ "')'", "','", "':'", "'['", "']'", "'='", "'{'", "'}'", "$accept",
915
+ "model", "preddecl_items", "preddecl_items_head", "vardecl_items",
916
+ "vardecl_items_head", "constraint_items", "constraint_items_head",
917
+ "preddecl_item", "pred_arg_list", "pred_arg_list_head", "pred_arg",
918
+ "pred_arg_type", "pred_arg_simple_type", "pred_array_init",
919
+ "pred_array_init_arg", "var_par_id", "vardecl_item", "int_init",
920
+ "int_init_list", "int_init_list_head", "list_tail",
921
+ "int_var_array_literal", "float_init", "float_init_list",
922
+ "float_init_list_head", "float_var_array_literal", "bool_init",
923
+ "bool_init_list", "bool_init_list_head", "bool_var_array_literal",
924
+ "set_init", "set_init_list", "set_init_list_head",
925
+ "set_var_array_literal", "vardecl_int_var_array_init",
926
+ "vardecl_bool_var_array_init", "vardecl_float_var_array_init",
927
+ "vardecl_set_var_array_init", "constraint_item", "solve_item",
928
+ "int_ti_expr_tail", "bool_ti_expr_tail", "float_ti_expr_tail",
929
+ "set_literal", "int_list", "int_list_head", "bool_list",
930
+ "bool_list_head", "float_list", "float_list_head", "set_literal_list",
931
+ "set_literal_list_head", "flat_expr_list", "flat_expr",
932
+ "non_array_expr_opt", "non_array_expr", "non_array_expr_list",
933
+ "non_array_expr_list_head", "solve_expr", "minmax", "annotations",
934
+ "annotations_head", "annotation", "annotation_list", "annotation_expr",
935
+ "ann_non_array_expr", 0
936
+ };
937
+ #endif
938
+
939
+ # ifdef YYPRINT
940
+ /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
941
+ token YYLEX-NUM. */
942
+ static const yytype_uint16 yytoknum[] =
943
+ {
944
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
945
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
946
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
947
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
948
+ 295, 296, 297, 298, 299, 300, 301, 302, 59, 40,
949
+ 41, 44, 58, 91, 93, 61, 123, 125
950
+ };
951
+ # endif
952
+
953
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
954
+ static const yytype_uint8 yyr1[] =
955
+ {
956
+ 0, 58, 59, 60, 60, 61, 61, 62, 62, 63,
957
+ 63, 64, 64, 65, 65, 66, 67, 67, 68, 68,
958
+ 69, 70, 70, 70, 70, 71, 71, 71, 71, 72,
959
+ 72, 73, 73, 74, 74, 75, 75, 75, 75, 75,
960
+ 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
961
+ 76, 76, 76, 77, 77, 78, 78, 79, 79, 80,
962
+ 81, 81, 81, 82, 82, 83, 83, 84, 85, 85,
963
+ 85, 86, 86, 87, 87, 88, 89, 89, 89, 90,
964
+ 90, 91, 91, 92, 93, 93, 94, 94, 95, 95,
965
+ 96, 96, 97, 98, 98, 99, 99, 99, 100, 100,
966
+ 101, 101, 102, 102, 103, 103, 104, 104, 105, 105,
967
+ 106, 106, 107, 107, 108, 108, 109, 109, 110, 110,
968
+ 111, 111, 112, 112, 113, 113, 114, 114, 114, 114,
969
+ 114, 114, 115, 115, 116, 116, 117, 117, 118, 118,
970
+ 119, 119, 120, 120, 121, 121, 122, 122, 123, 123,
971
+ 124, 124, 124, 124, 124, 124, 124
972
+ };
973
+
974
+ /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
975
+ static const yytype_uint8 yyr2[] =
976
+ {
977
+ 0, 2, 5, 0, 1, 2, 3, 0, 1, 2,
978
+ 3, 0, 1, 2, 3, 5, 0, 2, 1, 3,
979
+ 3, 6, 7, 2, 1, 1, 3, 1, 1, 1,
980
+ 3, 1, 3, 1, 1, 6, 6, 6, 8, 6,
981
+ 6, 8, 13, 13, 13, 15, 15, 15, 15, 17,
982
+ 1, 1, 4, 0, 2, 1, 3, 0, 1, 3,
983
+ 1, 1, 4, 0, 2, 1, 3, 3, 1, 1,
984
+ 4, 0, 2, 1, 3, 3, 1, 1, 4, 0,
985
+ 2, 1, 3, 3, 0, 2, 0, 2, 0, 2,
986
+ 0, 2, 6, 3, 4, 1, 3, 3, 1, 4,
987
+ 1, 4, 3, 3, 0, 2, 1, 3, 0, 2,
988
+ 1, 3, 0, 2, 1, 3, 0, 2, 1, 3,
989
+ 1, 3, 1, 3, 0, 2, 1, 1, 1, 1,
990
+ 1, 4, 0, 2, 1, 3, 1, 4, 1, 1,
991
+ 0, 1, 2, 3, 4, 1, 1, 3, 1, 3,
992
+ 1, 1, 1, 1, 1, 4, 1
993
+ };
994
+
995
+ /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
996
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
997
+ means the default is an error. */
998
+ static const yytype_uint8 yydefact[] =
999
+ {
1000
+ 3, 0, 0, 7, 4, 0, 0, 1, 0, 0,
1001
+ 0, 0, 0, 11, 8, 0, 0, 5, 16, 0,
1002
+ 98, 100, 95, 0, 104, 0, 0, 0, 0, 0,
1003
+ 0, 0, 0, 0, 12, 0, 0, 9, 6, 0,
1004
+ 0, 27, 28, 0, 104, 0, 57, 18, 0, 24,
1005
+ 25, 0, 0, 106, 110, 114, 0, 57, 57, 57,
1006
+ 0, 0, 0, 0, 33, 34, 140, 140, 0, 0,
1007
+ 140, 0, 0, 13, 10, 23, 0, 0, 15, 58,
1008
+ 17, 0, 97, 0, 96, 58, 105, 58, 0, 58,
1009
+ 0, 140, 140, 140, 0, 0, 0, 141, 0, 0,
1010
+ 0, 0, 2, 14, 0, 31, 0, 29, 26, 19,
1011
+ 20, 0, 107, 111, 99, 115, 101, 124, 124, 124,
1012
+ 0, 151, 150, 152, 33, 156, 0, 104, 154, 153,
1013
+ 142, 145, 148, 0, 0, 0, 140, 127, 126, 128,
1014
+ 132, 130, 129, 0, 120, 122, 139, 138, 93, 0,
1015
+ 0, 0, 0, 140, 0, 35, 36, 37, 0, 0,
1016
+ 0, 146, 0, 0, 0, 40, 143, 39, 0, 134,
1017
+ 0, 57, 0, 140, 0, 136, 94, 32, 30, 0,
1018
+ 124, 125, 0, 103, 0, 0, 149, 102, 0, 0,
1019
+ 123, 58, 133, 0, 92, 121, 0, 0, 21, 38,
1020
+ 0, 0, 0, 0, 0, 144, 147, 155, 41, 135,
1021
+ 131, 0, 22, 0, 0, 0, 0, 0, 0, 0,
1022
+ 0, 137, 0, 0, 0, 0, 140, 140, 140, 0,
1023
+ 0, 140, 140, 140, 0, 0, 0, 0, 0, 84,
1024
+ 86, 88, 0, 0, 0, 140, 140, 0, 42, 0,
1025
+ 43, 0, 44, 108, 112, 104, 0, 90, 53, 85,
1026
+ 71, 87, 63, 89, 0, 57, 0, 57, 0, 0,
1027
+ 0, 45, 50, 51, 55, 0, 57, 68, 69, 73,
1028
+ 0, 57, 60, 61, 65, 0, 57, 47, 109, 48,
1029
+ 113, 46, 116, 79, 91, 0, 59, 58, 54, 0,
1030
+ 75, 58, 72, 0, 67, 58, 64, 0, 118, 0,
1031
+ 57, 77, 81, 0, 57, 76, 0, 56, 0, 74,
1032
+ 0, 66, 49, 58, 117, 0, 83, 58, 80, 52,
1033
+ 70, 62, 119, 0, 82, 78
1034
+ };
1035
+
1036
+ /* YYDEFGOTO[NTERM-NUM]. */
1037
+ static const yytype_int16 yydefgoto[] =
1038
+ {
1039
+ -1, 2, 3, 4, 13, 14, 33, 34, 5, 45,
1040
+ 46, 47, 48, 49, 106, 107, 141, 15, 274, 275,
1041
+ 276, 80, 259, 284, 285, 286, 263, 279, 280, 281,
1042
+ 261, 312, 313, 314, 294, 248, 250, 252, 271, 35,
1043
+ 71, 50, 26, 27, 142, 56, 57, 264, 58, 266,
1044
+ 59, 309, 310, 143, 144, 155, 145, 170, 171, 176,
1045
+ 149, 96, 97, 161, 162, 131, 132
1046
+ };
1047
+
1048
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1049
+ STATE-NUM. */
1050
+ #define YYPACT_NINF -120
1051
+ static const yytype_int16 yypact[] =
1052
+ {
1053
+ 0, 34, 46, 101, 0, 1, 12, -120, 97, -3,
1054
+ 29, 33, 71, 96, 101, 68, 74, -120, 50, 100,
1055
+ -120, -120, -120, 94, 64, 76, 78, 80, 136, 23,
1056
+ 23, 112, 151, 119, 96, 113, 114, -120, -120, 144,
1057
+ 110, -120, -120, 132, 163, 117, 118, -120, 126, -120,
1058
+ -120, 167, 24, -120, -120, -120, 122, 120, 129, 131,
1059
+ 23, 23, 23, 164, -120, -120, 168, 168, 133, 137,
1060
+ 168, 139, 149, -120, -120, -120, 15, 24, -120, 50,
1061
+ -120, 186, -120, 146, -120, 198, -120, 201, 150, 209,
1062
+ 158, 168, 168, 168, 203, 9, 162, 202, 165, 23,
1063
+ 51, 53, -120, -120, 200, -120, -15, -120, -120, -120,
1064
+ -120, 23, -120, -120, -120, -120, -120, 169, 169, 169,
1065
+ 174, 204, -120, -120, 187, -120, 9, 163, 182, -120,
1066
+ -120, -120, -120, 170, 9, 170, 168, 204, -120, -120,
1067
+ 170, 184, -120, 44, -120, -120, -120, -120, -120, 23,
1068
+ 236, 15, 208, 168, 170, -120, -120, -120, 210, 238,
1069
+ 9, -120, -10, 189, 85, -120, -120, -120, 190, -120,
1070
+ 193, 192, 170, 168, 51, 195, -120, -120, -120, 109,
1071
+ 169, -120, 10, -120, 58, 9, -120, -120, 196, 170,
1072
+ -120, 170, -120, 197, -120, -120, 246, 144, -120, -120,
1073
+ 188, 205, 206, 207, 220, -120, -120, -120, -120, -120,
1074
+ -120, 199, -120, 222, 211, 213, 214, 23, 23, 23,
1075
+ 227, -120, 24, 23, 23, 23, 168, 168, 168, 215,
1076
+ 217, 168, 168, 168, 216, 218, 219, 23, 23, 223,
1077
+ 224, 225, 228, 229, 233, 168, 168, 234, -120, 239,
1078
+ -120, 240, -120, 257, 265, 163, 241, 242, 19, -120,
1079
+ 148, -120, 138, -120, 221, 129, 237, 131, 245, 247,
1080
+ 248, -120, -120, 251, -120, 252, 226, -120, 254, -120,
1081
+ 255, 243, -120, 258, -120, 256, 244, -120, -120, -120,
1082
+ -120, -120, 17, 95, -120, 259, -120, 19, -120, 302,
1083
+ -120, 148, -120, 305, -120, 138, -120, 204, -120, 260,
1084
+ 261, 262, -120, 263, 267, -120, 266, -120, 268, -120,
1085
+ 269, -120, -120, 17, -120, 310, -120, 95, -120, -120,
1086
+ -120, -120, -120, 270, -120, -120
1087
+ };
1088
+
1089
+ /* YYPGOTO[NTERM-NUM]. */
1090
+ static const yytype_int16 yypgoto[] =
1091
+ {
1092
+ -120, -120, -120, -120, -120, -120, -120, -120, 312, -120,
1093
+ -120, 249, -120, -37, -120, 175, -29, 307, 22, -120,
1094
+ -120, -54, -120, 20, -120, -120, -120, 26, -120, -120,
1095
+ -120, 2, -120, -120, -120, -120, -120, -120, -120, 296,
1096
+ -120, -1, 134, 135, -89, -119, -120, -120, 79, -120,
1097
+ 77, -120, -120, -120, 159, -108, -112, -120, -120, -120,
1098
+ -120, 57, -120, -86, 176, -120, 173
1099
+ };
1100
+
1101
+ /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1102
+ positive, shift that token. If negative, reduce the rule which
1103
+ number is the opposite. If zero, do what YYDEFACT says.
1104
+ If YYTABLE_NINF, syntax error. */
1105
+ #define YYTABLE_NINF -1
1106
+ static const yytype_uint16 yytable[] =
1107
+ {
1108
+ 66, 67, 75, 86, 88, 90, 129, 25, 163, 130,
1109
+ 156, 157, 121, 122, 123, 124, 65, 125, 104, 200,
1110
+ 307, 165, 272, 167, 201, 64, 65, 19, 169, 64,
1111
+ 65, 91, 92, 93, 202, 1, 151, 129, 203, 152,
1112
+ 6, 185, 181, 105, 186, 129, 7, 204, 166, 17,
1113
+ 28, 83, 22, 19, 137, 138, 139, 64, 65, 39,
1114
+ 193, 18, 126, 40, 41, 127, 128, 53, 54, 55,
1115
+ 136, 129, 199, 127, 42, 129, 108, 208, 22, 209,
1116
+ 44, 29, 153, 146, 147, 30, 148, 43, 121, 122,
1117
+ 123, 64, 65, 125, 173, 174, 129, 128, 307, 206,
1118
+ 19, 64, 65, 31, 140, 128, 44, 127, 205, 185,
1119
+ 8, 20, 19, 32, 9, 10, 37, 192, 197, 51,
1120
+ 175, 21, 38, 41, 98, 22, 52, 101, 60, 11,
1121
+ 61, 128, 62, 42, 23, 128, 268, 22, 12, 63,
1122
+ 68, 127, 198, 282, 64, 65, 43, 19, 117, 118,
1123
+ 119, 127, 277, 24, 64, 65, 128, 69, 41, 70,
1124
+ 212, 73, 74, 76, 77, 44, 53, 78, 42, 79,
1125
+ 82, 85, 22, 137, 138, 139, 64, 65, 81, 84,
1126
+ 87, 43, 89, 94, 95, 99, 100, 102, 226, 227,
1127
+ 228, 19, 110, 168, 231, 232, 233, 103, 111, 214,
1128
+ 44, 112, 20, 308, 315, 113, 120, 114, 245, 246,
1129
+ 180, 288, 21, 290, 115, 116, 22, 133, 134, 150,
1130
+ 135, 230, 298, 159, 154, 213, 127, 302, 158, 273,
1131
+ 194, 278, 306, 283, 332, 164, 160, 172, 315, 177,
1132
+ 179, 183, 182, 191, 24, 189, 187, 190, 196, 211,
1133
+ 207, 210, 220, 221, 222, 229, 324, 217, 218, 219,
1134
+ 328, 54, 316, 223, 311, 224, 225, 237, 273, 238,
1135
+ 55, 242, 278, 243, 244, 287, 283, 297, 247, 249,
1136
+ 251, 253, 254, 234, 235, 236, 255, 258, 239, 240,
1137
+ 241, 289, 260, 262, 301, 305, 269, 270, 311, 291,
1138
+ 292, 293, 256, 257, 295, 318, 296, 299, 320, 300,
1139
+ 304, 303, 323, 333, 322, 325, 16, 326, 327, 317,
1140
+ 329, 36, 330, 331, 335, 321, 178, 319, 109, 334,
1141
+ 72, 267, 265, 195, 215, 216, 184, 188
1142
+ };
1143
+
1144
+ static const yytype_uint16 yycheck[] =
1145
+ {
1146
+ 29, 30, 39, 57, 58, 59, 95, 8, 127, 95,
1147
+ 118, 119, 3, 4, 5, 6, 7, 8, 3, 9,
1148
+ 3, 133, 3, 135, 14, 6, 7, 3, 140, 6,
1149
+ 7, 60, 61, 62, 24, 35, 51, 126, 28, 54,
1150
+ 6, 51, 154, 28, 54, 134, 0, 37, 134, 48,
1151
+ 53, 52, 28, 3, 3, 4, 5, 6, 7, 9,
1152
+ 172, 49, 53, 13, 14, 56, 95, 3, 4, 5,
1153
+ 99, 160, 180, 56, 24, 164, 77, 189, 28, 191,
1154
+ 56, 52, 111, 30, 31, 52, 33, 37, 3, 4,
1155
+ 5, 6, 7, 8, 50, 51, 185, 126, 3, 185,
1156
+ 3, 6, 7, 32, 53, 134, 56, 56, 50, 51,
1157
+ 9, 14, 3, 17, 13, 14, 48, 171, 9, 19,
1158
+ 149, 24, 48, 14, 67, 28, 32, 70, 52, 28,
1159
+ 52, 160, 52, 24, 37, 164, 255, 28, 37, 3,
1160
+ 28, 56, 179, 5, 6, 7, 37, 3, 91, 92,
1161
+ 93, 56, 4, 56, 6, 7, 185, 6, 14, 40,
1162
+ 197, 48, 48, 53, 32, 56, 3, 50, 24, 51,
1163
+ 3, 51, 28, 3, 4, 5, 6, 7, 52, 57,
1164
+ 51, 37, 51, 19, 16, 52, 49, 48, 217, 218,
1165
+ 219, 3, 6, 136, 223, 224, 225, 48, 52, 200,
1166
+ 56, 3, 14, 292, 293, 4, 3, 57, 237, 238,
1167
+ 153, 265, 24, 267, 5, 57, 28, 55, 16, 19,
1168
+ 55, 222, 276, 19, 55, 37, 56, 281, 54, 258,
1169
+ 173, 260, 286, 262, 323, 53, 49, 53, 327, 3,
1170
+ 32, 3, 32, 51, 56, 55, 57, 54, 53, 3,
1171
+ 54, 54, 32, 54, 32, 28, 310, 52, 52, 52,
1172
+ 314, 4, 3, 52, 293, 52, 52, 52, 297, 52,
1173
+ 5, 55, 301, 55, 55, 54, 305, 51, 55, 55,
1174
+ 55, 53, 53, 226, 227, 228, 53, 53, 231, 232,
1175
+ 233, 54, 53, 53, 51, 51, 55, 55, 327, 54,
1176
+ 53, 53, 245, 246, 53, 3, 54, 53, 3, 54,
1177
+ 54, 53, 51, 3, 54, 53, 4, 54, 51, 297,
1178
+ 54, 14, 54, 54, 54, 305, 151, 301, 79, 327,
1179
+ 34, 254, 253, 174, 200, 200, 160, 164
1180
+ };
1181
+
1182
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1183
+ symbol of state STATE-NUM. */
1184
+ static const yytype_uint8 yystos[] =
1185
+ {
1186
+ 0, 35, 59, 60, 61, 66, 6, 0, 9, 13,
1187
+ 14, 28, 37, 62, 63, 75, 66, 48, 49, 3,
1188
+ 14, 24, 28, 37, 56, 99, 100, 101, 53, 52,
1189
+ 52, 32, 17, 64, 65, 97, 75, 48, 48, 9,
1190
+ 13, 14, 24, 37, 56, 67, 68, 69, 70, 71,
1191
+ 99, 19, 32, 3, 4, 5, 103, 104, 106, 108,
1192
+ 52, 52, 52, 3, 6, 7, 74, 74, 28, 6,
1193
+ 40, 98, 97, 48, 48, 71, 53, 32, 50, 51,
1194
+ 79, 52, 3, 99, 57, 51, 79, 51, 79, 51,
1195
+ 79, 74, 74, 74, 19, 16, 119, 120, 119, 52,
1196
+ 49, 119, 48, 48, 3, 28, 72, 73, 99, 69,
1197
+ 6, 52, 3, 4, 57, 5, 57, 119, 119, 119,
1198
+ 3, 3, 4, 5, 6, 8, 53, 56, 74, 102,
1199
+ 121, 123, 124, 55, 16, 55, 74, 3, 4, 5,
1200
+ 53, 74, 102, 111, 112, 114, 30, 31, 33, 118,
1201
+ 19, 51, 54, 74, 55, 113, 113, 113, 54, 19,
1202
+ 49, 121, 122, 103, 53, 114, 121, 114, 119, 114,
1203
+ 115, 116, 53, 50, 51, 74, 117, 3, 73, 32,
1204
+ 119, 114, 32, 3, 122, 51, 54, 57, 124, 55,
1205
+ 54, 51, 79, 114, 119, 112, 53, 9, 71, 113,
1206
+ 9, 14, 24, 28, 37, 50, 121, 54, 114, 114,
1207
+ 54, 3, 71, 37, 99, 100, 101, 52, 52, 52,
1208
+ 32, 54, 32, 52, 52, 52, 74, 74, 74, 28,
1209
+ 99, 74, 74, 74, 119, 119, 119, 52, 52, 119,
1210
+ 119, 119, 55, 55, 55, 74, 74, 55, 93, 55,
1211
+ 94, 55, 95, 53, 53, 53, 119, 119, 53, 80,
1212
+ 53, 88, 53, 84, 105, 106, 107, 108, 103, 55,
1213
+ 55, 96, 3, 74, 76, 77, 78, 4, 74, 85,
1214
+ 86, 87, 5, 74, 81, 82, 83, 54, 79, 54,
1215
+ 79, 54, 53, 53, 92, 53, 54, 51, 79, 53,
1216
+ 54, 51, 79, 53, 54, 51, 79, 3, 102, 109,
1217
+ 110, 74, 89, 90, 91, 102, 3, 76, 3, 85,
1218
+ 3, 81, 54, 51, 79, 53, 54, 51, 79, 54,
1219
+ 54, 54, 102, 3, 89, 54
1220
+ };
1221
+
1222
+ #define yyerrok (yyerrstatus = 0)
1223
+ #define yyclearin (yychar = YYEMPTY)
1224
+ #define YYEMPTY (-2)
1225
+ #define YYEOF 0
1226
+
1227
+ #define YYACCEPT goto yyacceptlab
1228
+ #define YYABORT goto yyabortlab
1229
+ #define YYERROR goto yyerrorlab
1230
+
1231
+
1232
+ /* Like YYERROR except do call yyerror. This remains here temporarily
1233
+ to ease the transition to the new meaning of YYERROR, for GCC.
1234
+ Once GCC version 2 has supplanted version 1, this can go. */
1235
+
1236
+ #define YYFAIL goto yyerrlab
1237
+
1238
+ #define YYRECOVERING() (!!yyerrstatus)
1239
+
1240
+ #define YYBACKUP(Token, Value) \
1241
+ do \
1242
+ if (yychar == YYEMPTY && yylen == 1) \
1243
+ { \
1244
+ yychar = (Token); \
1245
+ yylval = (Value); \
1246
+ yytoken = YYTRANSLATE (yychar); \
1247
+ YYPOPSTACK (1); \
1248
+ goto yybackup; \
1249
+ } \
1250
+ else \
1251
+ { \
1252
+ yyerror (parm, YY_("syntax error: cannot back up")); \
1253
+ YYERROR; \
1254
+ } \
1255
+ while (YYID (0))
1256
+
1257
+
1258
+ #define YYTERROR 1
1259
+ #define YYERRCODE 256
1260
+
1261
+
1262
+ /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1263
+ If N is 0, then set CURRENT to the empty location which ends
1264
+ the previous symbol: RHS[0] (always defined). */
1265
+
1266
+ #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1267
+ #ifndef YYLLOC_DEFAULT
1268
+ # define YYLLOC_DEFAULT(Current, Rhs, N) \
1269
+ do \
1270
+ if (YYID (N)) \
1271
+ { \
1272
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1273
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1274
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1275
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1276
+ } \
1277
+ else \
1278
+ { \
1279
+ (Current).first_line = (Current).last_line = \
1280
+ YYRHSLOC (Rhs, 0).last_line; \
1281
+ (Current).first_column = (Current).last_column = \
1282
+ YYRHSLOC (Rhs, 0).last_column; \
1283
+ } \
1284
+ while (YYID (0))
1285
+ #endif
1286
+
1287
+
1288
+ /* YY_LOCATION_PRINT -- Print the location on the stream.
1289
+ This macro was not mandated originally: define only if we know
1290
+ we won't break user code: when these are the locations we know. */
1291
+
1292
+ #ifndef YY_LOCATION_PRINT
1293
+ # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1294
+ # define YY_LOCATION_PRINT(File, Loc) \
1295
+ fprintf (File, "%d.%d-%d.%d", \
1296
+ (Loc).first_line, (Loc).first_column, \
1297
+ (Loc).last_line, (Loc).last_column)
1298
+ # else
1299
+ # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1300
+ # endif
1301
+ #endif
1302
+
1303
+
1304
+ /* YYLEX -- calling `yylex' with the right arguments. */
1305
+
1306
+ #ifdef YYLEX_PARAM
1307
+ # define YYLEX yylex (&yylval, YYLEX_PARAM)
1308
+ #else
1309
+ # define YYLEX yylex (&yylval)
1310
+ #endif
1311
+
1312
+ /* Enable debugging if requested. */
1313
+ #if YYDEBUG
1314
+
1315
+ # ifndef YYFPRINTF
1316
+ # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1317
+ # define YYFPRINTF fprintf
1318
+ # endif
1319
+
1320
+ # define YYDPRINTF(Args) \
1321
+ do { \
1322
+ if (yydebug) \
1323
+ YYFPRINTF Args; \
1324
+ } while (YYID (0))
1325
+
1326
+ # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1327
+ do { \
1328
+ if (yydebug) \
1329
+ { \
1330
+ YYFPRINTF (stderr, "%s ", Title); \
1331
+ yy_symbol_print (stderr, \
1332
+ Type, Value, parm); \
1333
+ YYFPRINTF (stderr, "\n"); \
1334
+ } \
1335
+ } while (YYID (0))
1336
+
1337
+
1338
+ /*--------------------------------.
1339
+ | Print this symbol on YYOUTPUT. |
1340
+ `--------------------------------*/
1341
+
1342
+ /*ARGSUSED*/
1343
+ #if (defined __STDC__ || defined __C99__FUNC__ \
1344
+ || defined __cplusplus || defined _MSC_VER)
1345
+ static void
1346
+ yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *parm)
1347
+ #else
1348
+ static void
1349
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep, parm)
1350
+ FILE *yyoutput;
1351
+ int yytype;
1352
+ YYSTYPE const * const yyvaluep;
1353
+ void *parm;
1354
+ #endif
1355
+ {
1356
+ if (!yyvaluep)
1357
+ return;
1358
+ YYUSE (parm);
1359
+ # ifdef YYPRINT
1360
+ if (yytype < YYNTOKENS)
1361
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1362
+ # else
1363
+ YYUSE (yyoutput);
1364
+ # endif
1365
+ switch (yytype)
1366
+ {
1367
+ default:
1368
+ break;
1369
+ }
1370
+ }
1371
+
1372
+
1373
+ /*--------------------------------.
1374
+ | Print this symbol on YYOUTPUT. |
1375
+ `--------------------------------*/
1376
+
1377
+ #if (defined __STDC__ || defined __C99__FUNC__ \
1378
+ || defined __cplusplus || defined _MSC_VER)
1379
+ static void
1380
+ yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *parm)
1381
+ #else
1382
+ static void
1383
+ yy_symbol_print (yyoutput, yytype, yyvaluep, parm)
1384
+ FILE *yyoutput;
1385
+ int yytype;
1386
+ YYSTYPE const * const yyvaluep;
1387
+ void *parm;
1388
+ #endif
1389
+ {
1390
+ if (yytype < YYNTOKENS)
1391
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1392
+ else
1393
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1394
+
1395
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep, parm);
1396
+ YYFPRINTF (yyoutput, ")");
1397
+ }
1398
+
1399
+ /*------------------------------------------------------------------.
1400
+ | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1401
+ | TOP (included). |
1402
+ `------------------------------------------------------------------*/
1403
+
1404
+ #if (defined __STDC__ || defined __C99__FUNC__ \
1405
+ || defined __cplusplus || defined _MSC_VER)
1406
+ static void
1407
+ yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
1408
+ #else
1409
+ static void
1410
+ yy_stack_print (bottom, top)
1411
+ yytype_int16 *bottom;
1412
+ yytype_int16 *top;
1413
+ #endif
1414
+ {
1415
+ YYFPRINTF (stderr, "Stack now");
1416
+ for (; bottom <= top; ++bottom)
1417
+ YYFPRINTF (stderr, " %d", *bottom);
1418
+ YYFPRINTF (stderr, "\n");
1419
+ }
1420
+
1421
+ # define YY_STACK_PRINT(Bottom, Top) \
1422
+ do { \
1423
+ if (yydebug) \
1424
+ yy_stack_print ((Bottom), (Top)); \
1425
+ } while (YYID (0))
1426
+
1427
+
1428
+ /*------------------------------------------------.
1429
+ | Report that the YYRULE is going to be reduced. |
1430
+ `------------------------------------------------*/
1431
+
1432
+ #if (defined __STDC__ || defined __C99__FUNC__ \
1433
+ || defined __cplusplus || defined _MSC_VER)
1434
+ static void
1435
+ yy_reduce_print (YYSTYPE *yyvsp, int yyrule, void *parm)
1436
+ #else
1437
+ static void
1438
+ yy_reduce_print (yyvsp, yyrule, parm)
1439
+ YYSTYPE *yyvsp;
1440
+ int yyrule;
1441
+ void *parm;
1442
+ #endif
1443
+ {
1444
+ int yynrhs = yyr2[yyrule];
1445
+ int yyi;
1446
+ unsigned long int yylno = yyrline[yyrule];
1447
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1448
+ yyrule - 1, yylno);
1449
+ /* The symbols being reduced. */
1450
+ for (yyi = 0; yyi < yynrhs; yyi++)
1451
+ {
1452
+ fprintf (stderr, " $%d = ", yyi + 1);
1453
+ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1454
+ &(yyvsp[(yyi + 1) - (yynrhs)])
1455
+ , parm);
1456
+ fprintf (stderr, "\n");
1457
+ }
1458
+ }
1459
+
1460
+ # define YY_REDUCE_PRINT(Rule) \
1461
+ do { \
1462
+ if (yydebug) \
1463
+ yy_reduce_print (yyvsp, Rule, parm); \
1464
+ } while (YYID (0))
1465
+
1466
+ /* Nonzero means print parse trace. It is left uninitialized so that
1467
+ multiple parsers can coexist. */
1468
+ int yydebug;
1469
+ #else /* !YYDEBUG */
1470
+ # define YYDPRINTF(Args)
1471
+ # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1472
+ # define YY_STACK_PRINT(Bottom, Top)
1473
+ # define YY_REDUCE_PRINT(Rule)
1474
+ #endif /* !YYDEBUG */
1475
+
1476
+
1477
+ /* YYINITDEPTH -- initial size of the parser's stacks. */
1478
+ #ifndef YYINITDEPTH
1479
+ # define YYINITDEPTH 200
1480
+ #endif
1481
+
1482
+ /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1483
+ if the built-in stack extension method is used).
1484
+
1485
+ Do not make this value too large; the results are undefined if
1486
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1487
+ evaluated with infinite-precision integer arithmetic. */
1488
+
1489
+ #ifndef YYMAXDEPTH
1490
+ # define YYMAXDEPTH 10000
1491
+ #endif
1492
+
1493
+
1494
+
1495
+ #if YYERROR_VERBOSE
1496
+
1497
+ # ifndef yystrlen
1498
+ # if defined __GLIBC__ && defined _STRING_H
1499
+ # define yystrlen strlen
1500
+ # else
1501
+ /* Return the length of YYSTR. */
1502
+ #if (defined __STDC__ || defined __C99__FUNC__ \
1503
+ || defined __cplusplus || defined _MSC_VER)
1504
+ static YYSIZE_T
1505
+ yystrlen (const char *yystr)
1506
+ #else
1507
+ static YYSIZE_T
1508
+ yystrlen (yystr)
1509
+ const char *yystr;
1510
+ #endif
1511
+ {
1512
+ YYSIZE_T yylen;
1513
+ for (yylen = 0; yystr[yylen]; yylen++)
1514
+ continue;
1515
+ return yylen;
1516
+ }
1517
+ # endif
1518
+ # endif
1519
+
1520
+ # ifndef yystpcpy
1521
+ # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1522
+ # define yystpcpy stpcpy
1523
+ # else
1524
+ /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1525
+ YYDEST. */
1526
+ #if (defined __STDC__ || defined __C99__FUNC__ \
1527
+ || defined __cplusplus || defined _MSC_VER)
1528
+ static char *
1529
+ yystpcpy (char *yydest, const char *yysrc)
1530
+ #else
1531
+ static char *
1532
+ yystpcpy (yydest, yysrc)
1533
+ char *yydest;
1534
+ const char *yysrc;
1535
+ #endif
1536
+ {
1537
+ char *yyd = yydest;
1538
+ const char *yys = yysrc;
1539
+
1540
+ while ((*yyd++ = *yys++) != '\0')
1541
+ continue;
1542
+
1543
+ return yyd - 1;
1544
+ }
1545
+ # endif
1546
+ # endif
1547
+
1548
+ # ifndef yytnamerr
1549
+ /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1550
+ quotes and backslashes, so that it's suitable for yyerror. The
1551
+ heuristic is that double-quoting is unnecessary unless the string
1552
+ contains an apostrophe, a comma, or backslash (other than
1553
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
1554
+ null, do not copy; instead, return the length of what the result
1555
+ would have been. */
1556
+ static YYSIZE_T
1557
+ yytnamerr (char *yyres, const char *yystr)
1558
+ {
1559
+ if (*yystr == '"')
1560
+ {
1561
+ YYSIZE_T yyn = 0;
1562
+ char const *yyp = yystr;
1563
+
1564
+ for (;;)
1565
+ switch (*++yyp)
1566
+ {
1567
+ case '\'':
1568
+ case ',':
1569
+ goto do_not_strip_quotes;
1570
+
1571
+ case '\\':
1572
+ if (*++yyp != '\\')
1573
+ goto do_not_strip_quotes;
1574
+ /* Fall through. */
1575
+ default:
1576
+ if (yyres)
1577
+ yyres[yyn] = *yyp;
1578
+ yyn++;
1579
+ break;
1580
+
1581
+ case '"':
1582
+ if (yyres)
1583
+ yyres[yyn] = '\0';
1584
+ return yyn;
1585
+ }
1586
+ do_not_strip_quotes: ;
1587
+ }
1588
+
1589
+ if (! yyres)
1590
+ return yystrlen (yystr);
1591
+
1592
+ return yystpcpy (yyres, yystr) - yyres;
1593
+ }
1594
+ # endif
1595
+
1596
+ /* Copy into YYRESULT an error message about the unexpected token
1597
+ YYCHAR while in state YYSTATE. Return the number of bytes copied,
1598
+ including the terminating null byte. If YYRESULT is null, do not
1599
+ copy anything; just return the number of bytes that would be
1600
+ copied. As a special case, return 0 if an ordinary "syntax error"
1601
+ message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1602
+ size calculation. */
1603
+ static YYSIZE_T
1604
+ yysyntax_error (char *yyresult, int yystate, int yychar)
1605
+ {
1606
+ int yyn = yypact[yystate];
1607
+
1608
+ if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1609
+ return 0;
1610
+ else
1611
+ {
1612
+ int yytype = YYTRANSLATE (yychar);
1613
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1614
+ YYSIZE_T yysize = yysize0;
1615
+ YYSIZE_T yysize1;
1616
+ int yysize_overflow = 0;
1617
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1618
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1619
+ int yyx;
1620
+
1621
+ # if 0
1622
+ /* This is so xgettext sees the translatable formats that are
1623
+ constructed on the fly. */
1624
+ YY_("syntax error, unexpected %s");
1625
+ YY_("syntax error, unexpected %s, expecting %s");
1626
+ YY_("syntax error, unexpected %s, expecting %s or %s");
1627
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1628
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1629
+ # endif
1630
+ char *yyfmt;
1631
+ char const *yyf;
1632
+ static char const yyunexpected[] = "syntax error, unexpected %s";
1633
+ static char const yyexpecting[] = ", expecting %s";
1634
+ static char const yyor[] = " or %s";
1635
+ char yyformat[sizeof yyunexpected
1636
+ + sizeof yyexpecting - 1
1637
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1638
+ * (sizeof yyor - 1))];
1639
+ char const *yyprefix = yyexpecting;
1640
+
1641
+ /* Start YYX at -YYN if negative to avoid negative indexes in
1642
+ YYCHECK. */
1643
+ int yyxbegin = yyn < 0 ? -yyn : 0;
1644
+
1645
+ /* Stay within bounds of both yycheck and yytname. */
1646
+ int yychecklim = YYLAST - yyn + 1;
1647
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1648
+ int yycount = 1;
1649
+
1650
+ yyarg[0] = yytname[yytype];
1651
+ yyfmt = yystpcpy (yyformat, yyunexpected);
1652
+
1653
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1654
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1655
+ {
1656
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1657
+ {
1658
+ yycount = 1;
1659
+ yysize = yysize0;
1660
+ yyformat[sizeof yyunexpected - 1] = '\0';
1661
+ break;
1662
+ }
1663
+ yyarg[yycount++] = yytname[yyx];
1664
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1665
+ yysize_overflow |= (yysize1 < yysize);
1666
+ yysize = yysize1;
1667
+ yyfmt = yystpcpy (yyfmt, yyprefix);
1668
+ yyprefix = yyor;
1669
+ }
1670
+
1671
+ yyf = YY_(yyformat);
1672
+ yysize1 = yysize + yystrlen (yyf);
1673
+ yysize_overflow |= (yysize1 < yysize);
1674
+ yysize = yysize1;
1675
+
1676
+ if (yysize_overflow)
1677
+ return YYSIZE_MAXIMUM;
1678
+
1679
+ if (yyresult)
1680
+ {
1681
+ /* Avoid sprintf, as that infringes on the user's name space.
1682
+ Don't have undefined behavior even if the translation
1683
+ produced a string with the wrong number of "%s"s. */
1684
+ char *yyp = yyresult;
1685
+ int yyi = 0;
1686
+ while ((*yyp = *yyf) != '\0')
1687
+ {
1688
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1689
+ {
1690
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
1691
+ yyf += 2;
1692
+ }
1693
+ else
1694
+ {
1695
+ yyp++;
1696
+ yyf++;
1697
+ }
1698
+ }
1699
+ }
1700
+ return yysize;
1701
+ }
1702
+ }
1703
+ #endif /* YYERROR_VERBOSE */
1704
+
1705
+
1706
+ /*-----------------------------------------------.
1707
+ | Release the memory associated to this symbol. |
1708
+ `-----------------------------------------------*/
1709
+
1710
+ /*ARGSUSED*/
1711
+ #if (defined __STDC__ || defined __C99__FUNC__ \
1712
+ || defined __cplusplus || defined _MSC_VER)
1713
+ static void
1714
+ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, void *parm)
1715
+ #else
1716
+ static void
1717
+ yydestruct (yymsg, yytype, yyvaluep, parm)
1718
+ const char *yymsg;
1719
+ int yytype;
1720
+ YYSTYPE *yyvaluep;
1721
+ void *parm;
1722
+ #endif
1723
+ {
1724
+ YYUSE (yyvaluep);
1725
+ YYUSE (parm);
1726
+
1727
+ if (!yymsg)
1728
+ yymsg = "Deleting";
1729
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1730
+
1731
+ switch (yytype)
1732
+ {
1733
+
1734
+ default:
1735
+ break;
1736
+ }
1737
+ }
1738
+
1739
+
1740
+ /* Prevent warnings from -Wmissing-prototypes. */
1741
+
1742
+ #ifdef YYPARSE_PARAM
1743
+ #if defined __STDC__ || defined __cplusplus
1744
+ int yyparse (void *YYPARSE_PARAM);
1745
+ #else
1746
+ int yyparse ();
1747
+ #endif
1748
+ #else /* ! YYPARSE_PARAM */
1749
+ #if defined __STDC__ || defined __cplusplus
1750
+ int yyparse (void *parm);
1751
+ #else
1752
+ int yyparse ();
1753
+ #endif
1754
+ #endif /* ! YYPARSE_PARAM */
1755
+
1756
+
1757
+
1758
+
1759
+
1760
+
1761
+ /*----------.
1762
+ | yyparse. |
1763
+ `----------*/
1764
+
1765
+ #ifdef YYPARSE_PARAM
1766
+ #if (defined __STDC__ || defined __C99__FUNC__ \
1767
+ || defined __cplusplus || defined _MSC_VER)
1768
+ int
1769
+ yyparse (void *YYPARSE_PARAM)
1770
+ #else
1771
+ int
1772
+ yyparse (YYPARSE_PARAM)
1773
+ void *YYPARSE_PARAM;
1774
+ #endif
1775
+ #else /* ! YYPARSE_PARAM */
1776
+ #if (defined __STDC__ || defined __C99__FUNC__ \
1777
+ || defined __cplusplus || defined _MSC_VER)
1778
+ int
1779
+ yyparse (void *parm)
1780
+ #else
1781
+ int
1782
+ yyparse (parm)
1783
+ void *parm;
1784
+ #endif
1785
+ #endif
1786
+ {
1787
+ /* The look-ahead symbol. */
1788
+ int yychar;
1789
+
1790
+ /* The semantic value of the look-ahead symbol. */
1791
+ YYSTYPE yylval;
1792
+
1793
+ /* Number of syntax errors so far. */
1794
+ int yynerrs;
1795
+
1796
+ int yystate;
1797
+ int yyn;
1798
+ int yyresult;
1799
+ /* Number of tokens to shift before error messages enabled. */
1800
+ int yyerrstatus;
1801
+ /* Look-ahead token as an internal (translated) token number. */
1802
+ int yytoken = 0;
1803
+ #if YYERROR_VERBOSE
1804
+ /* Buffer for error messages, and its allocated size. */
1805
+ char yymsgbuf[128];
1806
+ char *yymsg = yymsgbuf;
1807
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1808
+ #endif
1809
+
1810
+ /* Three stacks and their tools:
1811
+ `yyss': related to states,
1812
+ `yyvs': related to semantic values,
1813
+ `yyls': related to locations.
1814
+
1815
+ Refer to the stacks thru separate pointers, to allow yyoverflow
1816
+ to reallocate them elsewhere. */
1817
+
1818
+ /* The state stack. */
1819
+ yytype_int16 yyssa[YYINITDEPTH];
1820
+ yytype_int16 *yyss = yyssa;
1821
+ yytype_int16 *yyssp;
1822
+
1823
+ /* The semantic value stack. */
1824
+ YYSTYPE yyvsa[YYINITDEPTH];
1825
+ YYSTYPE *yyvs = yyvsa;
1826
+ YYSTYPE *yyvsp;
1827
+
1828
+
1829
+
1830
+ #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1831
+
1832
+ YYSIZE_T yystacksize = YYINITDEPTH;
1833
+
1834
+ /* The variables used to return semantic value and location from the
1835
+ action routines. */
1836
+ YYSTYPE yyval;
1837
+
1838
+
1839
+ /* The number of symbols on the RHS of the reduced rule.
1840
+ Keep to zero when no symbol should be popped. */
1841
+ int yylen = 0;
1842
+
1843
+ YYDPRINTF ((stderr, "Starting parse\n"));
1844
+
1845
+ yystate = 0;
1846
+ yyerrstatus = 0;
1847
+ yynerrs = 0;
1848
+ yychar = YYEMPTY; /* Cause a token to be read. */
1849
+
1850
+ /* Initialize stack pointers.
1851
+ Waste one element of value and location stack
1852
+ so that they stay on the same level as the state stack.
1853
+ The wasted elements are never initialized. */
1854
+
1855
+ yyssp = yyss;
1856
+ yyvsp = yyvs;
1857
+
1858
+ goto yysetstate;
1859
+
1860
+ /*------------------------------------------------------------.
1861
+ | yynewstate -- Push a new state, which is found in yystate. |
1862
+ `------------------------------------------------------------*/
1863
+ yynewstate:
1864
+ /* In all cases, when you get here, the value and location stacks
1865
+ have just been pushed. So pushing a state here evens the stacks. */
1866
+ yyssp++;
1867
+
1868
+ yysetstate:
1869
+ *yyssp = yystate;
1870
+
1871
+ if (yyss + yystacksize - 1 <= yyssp)
1872
+ {
1873
+ /* Get the current used size of the three stacks, in elements. */
1874
+ YYSIZE_T yysize = yyssp - yyss + 1;
1875
+
1876
+ #ifdef yyoverflow
1877
+ {
1878
+ /* Give user a chance to reallocate the stack. Use copies of
1879
+ these so that the &'s don't force the real ones into
1880
+ memory. */
1881
+ YYSTYPE *yyvs1 = yyvs;
1882
+ yytype_int16 *yyss1 = yyss;
1883
+
1884
+
1885
+ /* Each stack pointer address is followed by the size of the
1886
+ data in use in that stack, in bytes. This used to be a
1887
+ conditional around just the two extra args, but that might
1888
+ be undefined if yyoverflow is a macro. */
1889
+ yyoverflow (YY_("memory exhausted"),
1890
+ &yyss1, yysize * sizeof (*yyssp),
1891
+ &yyvs1, yysize * sizeof (*yyvsp),
1892
+
1893
+ &yystacksize);
1894
+
1895
+ yyss = yyss1;
1896
+ yyvs = yyvs1;
1897
+ }
1898
+ #else /* no yyoverflow */
1899
+ # ifndef YYSTACK_RELOCATE
1900
+ goto yyexhaustedlab;
1901
+ # else
1902
+ /* Extend the stack our own way. */
1903
+ if (YYMAXDEPTH <= yystacksize)
1904
+ goto yyexhaustedlab;
1905
+ yystacksize *= 2;
1906
+ if (YYMAXDEPTH < yystacksize)
1907
+ yystacksize = YYMAXDEPTH;
1908
+
1909
+ {
1910
+ yytype_int16 *yyss1 = yyss;
1911
+ union yyalloc *yyptr =
1912
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1913
+ if (! yyptr)
1914
+ goto yyexhaustedlab;
1915
+ YYSTACK_RELOCATE (yyss);
1916
+ YYSTACK_RELOCATE (yyvs);
1917
+
1918
+ # undef YYSTACK_RELOCATE
1919
+ if (yyss1 != yyssa)
1920
+ YYSTACK_FREE (yyss1);
1921
+ }
1922
+ # endif
1923
+ #endif /* no yyoverflow */
1924
+
1925
+ yyssp = yyss + yysize - 1;
1926
+ yyvsp = yyvs + yysize - 1;
1927
+
1928
+
1929
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1930
+ (unsigned long int) yystacksize));
1931
+
1932
+ if (yyss + yystacksize - 1 <= yyssp)
1933
+ YYABORT;
1934
+ }
1935
+
1936
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1937
+
1938
+ goto yybackup;
1939
+
1940
+ /*-----------.
1941
+ | yybackup. |
1942
+ `-----------*/
1943
+ yybackup:
1944
+
1945
+ /* Do appropriate processing given the current state. Read a
1946
+ look-ahead token if we need one and don't already have one. */
1947
+
1948
+ /* First try to decide what to do without reference to look-ahead token. */
1949
+ yyn = yypact[yystate];
1950
+ if (yyn == YYPACT_NINF)
1951
+ goto yydefault;
1952
+
1953
+ /* Not known => get a look-ahead token if don't already have one. */
1954
+
1955
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1956
+ if (yychar == YYEMPTY)
1957
+ {
1958
+ YYDPRINTF ((stderr, "Reading a token: "));
1959
+ yychar = YYLEX;
1960
+ }
1961
+
1962
+ if (yychar <= YYEOF)
1963
+ {
1964
+ yychar = yytoken = YYEOF;
1965
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
1966
+ }
1967
+ else
1968
+ {
1969
+ yytoken = YYTRANSLATE (yychar);
1970
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1971
+ }
1972
+
1973
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
1974
+ detect an error, take that action. */
1975
+ yyn += yytoken;
1976
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1977
+ goto yydefault;
1978
+ yyn = yytable[yyn];
1979
+ if (yyn <= 0)
1980
+ {
1981
+ if (yyn == 0 || yyn == YYTABLE_NINF)
1982
+ goto yyerrlab;
1983
+ yyn = -yyn;
1984
+ goto yyreduce;
1985
+ }
1986
+
1987
+ if (yyn == YYFINAL)
1988
+ YYACCEPT;
1989
+
1990
+ /* Count tokens shifted since error; after three, turn off error
1991
+ status. */
1992
+ if (yyerrstatus)
1993
+ yyerrstatus--;
1994
+
1995
+ /* Shift the look-ahead token. */
1996
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1997
+
1998
+ /* Discard the shifted token unless it is eof. */
1999
+ if (yychar != YYEOF)
2000
+ yychar = YYEMPTY;
2001
+
2002
+ yystate = yyn;
2003
+ *++yyvsp = yylval;
2004
+
2005
+ goto yynewstate;
2006
+
2007
+
2008
+ /*-----------------------------------------------------------.
2009
+ | yydefault -- do the default action for the current state. |
2010
+ `-----------------------------------------------------------*/
2011
+ yydefault:
2012
+ yyn = yydefact[yystate];
2013
+ if (yyn == 0)
2014
+ goto yyerrlab;
2015
+ goto yyreduce;
2016
+
2017
+
2018
+ /*-----------------------------.
2019
+ | yyreduce -- Do a reduction. |
2020
+ `-----------------------------*/
2021
+ yyreduce:
2022
+ /* yyn is the number of a rule to reduce with. */
2023
+ yylen = yyr2[yyn];
2024
+
2025
+ /* If YYLEN is nonzero, implement the default value of the action:
2026
+ `$$ = $1'.
2027
+
2028
+ Otherwise, the following line sets YYVAL to garbage.
2029
+ This behavior is undocumented and Bison
2030
+ users should not rely upon it. Assigning to YYVAL
2031
+ unconditionally makes the parser a bit smaller, and it avoids a
2032
+ GCC warning that YYVAL may be used uninitialized. */
2033
+ yyval = yyvsp[1-yylen];
2034
+
2035
+
2036
+ YY_REDUCE_PRINT (yyn);
2037
+ switch (yyn)
2038
+ {
2039
+ case 7:
2040
+ #line 459 "gecode/flatzinc/parser.yxx"
2041
+ { initfg(static_cast<ParserState*>(parm)); ;}
2042
+ break;
2043
+
2044
+ case 8:
2045
+ #line 461 "gecode/flatzinc/parser.yxx"
2046
+ { initfg(static_cast<ParserState*>(parm)); ;}
2047
+ break;
2048
+
2049
+ case 35:
2050
+ #line 521 "gecode/flatzinc/parser.yxx"
2051
+ {
2052
+ ParserState* pp = static_cast<ParserState*>(parm);
2053
+ bool print = (yyvsp[(5) - (6)].argVec)->hasAtom("output_var");
2054
+ bool introduced = (yyvsp[(5) - (6)].argVec)->hasAtom("var_is_introduced");
2055
+ yyassert(pp,
2056
+ pp->symbols.put((yyvsp[(4) - (6)].sValue), se_iv(pp->intvars.size())),
2057
+ "Duplicate symbol");
2058
+ if (print) {
2059
+ pp->output(std::string((yyvsp[(4) - (6)].sValue)), new AST::IntVar(pp->intvars.size()));
2060
+ }
2061
+ if ((yyvsp[(6) - (6)].oArg)()) {
2062
+ AST::Node* arg = (yyvsp[(6) - (6)].oArg).some();
2063
+ if (arg->isInt()) {
2064
+ pp->intvars.push_back(varspec((yyvsp[(4) - (6)].sValue),
2065
+ new IntVarSpec(arg->getInt(),introduced)));
2066
+ } else if (arg->isIntVar()) {
2067
+ pp->intvars.push_back(varspec((yyvsp[(4) - (6)].sValue),
2068
+ new IntVarSpec(Alias(arg->getIntVar()),introduced)));
2069
+ } else {
2070
+ yyassert(pp, false, "Invalid var int initializer");
2071
+ }
2072
+ if (!pp->hadError)
2073
+ addDomainConstraint(pp, "int_in",
2074
+ new AST::IntVar(pp->intvars.size()-1), (yyvsp[(2) - (6)].oSet));
2075
+ delete arg;
2076
+ } else {
2077
+ pp->intvars.push_back(varspec((yyvsp[(4) - (6)].sValue), new IntVarSpec((yyvsp[(2) - (6)].oSet),introduced)));
2078
+ }
2079
+ delete (yyvsp[(5) - (6)].argVec); free((yyvsp[(4) - (6)].sValue));
2080
+ ;}
2081
+ break;
2082
+
2083
+ case 36:
2084
+ #line 552 "gecode/flatzinc/parser.yxx"
2085
+ {
2086
+ ParserState* pp = static_cast<ParserState*>(parm);
2087
+ bool print = (yyvsp[(5) - (6)].argVec)->hasAtom("output_var");
2088
+ bool introduced = (yyvsp[(5) - (6)].argVec)->hasAtom("var_is_introduced");
2089
+ yyassert(pp,
2090
+ pp->symbols.put((yyvsp[(4) - (6)].sValue), se_bv(pp->boolvars.size())),
2091
+ "Duplicate symbol");
2092
+ if (print) {
2093
+ pp->output(std::string((yyvsp[(4) - (6)].sValue)), new AST::BoolVar(pp->boolvars.size()));
2094
+ }
2095
+ if ((yyvsp[(6) - (6)].oArg)()) {
2096
+ AST::Node* arg = (yyvsp[(6) - (6)].oArg).some();
2097
+ if (arg->isBool()) {
2098
+ pp->boolvars.push_back(varspec((yyvsp[(4) - (6)].sValue),
2099
+ new BoolVarSpec(arg->getBool(),introduced)));
2100
+ } else if (arg->isBoolVar()) {
2101
+ pp->boolvars.push_back(varspec((yyvsp[(4) - (6)].sValue),
2102
+ new BoolVarSpec(Alias(arg->getBoolVar()),introduced)));
2103
+ } else {
2104
+ yyassert(pp, false, "Invalid var bool initializer");
2105
+ }
2106
+ if (!pp->hadError)
2107
+ addDomainConstraint(pp, "int_in",
2108
+ new AST::BoolVar(pp->boolvars.size()-1), (yyvsp[(2) - (6)].oSet));
2109
+ delete arg;
2110
+ } else {
2111
+ pp->boolvars.push_back(varspec((yyvsp[(4) - (6)].sValue), new BoolVarSpec((yyvsp[(2) - (6)].oSet),introduced)));
2112
+ }
2113
+ delete (yyvsp[(5) - (6)].argVec); free((yyvsp[(4) - (6)].sValue));
2114
+ ;}
2115
+ break;
2116
+
2117
+ case 37:
2118
+ #line 583 "gecode/flatzinc/parser.yxx"
2119
+ { ParserState* pp = static_cast<ParserState*>(parm);
2120
+ yyassert(pp, false, "Floats not supported");
2121
+ delete (yyvsp[(5) - (6)].argVec); free((yyvsp[(4) - (6)].sValue));
2122
+ ;}
2123
+ break;
2124
+
2125
+ case 38:
2126
+ #line 588 "gecode/flatzinc/parser.yxx"
2127
+ {
2128
+ ParserState* pp = static_cast<ParserState*>(parm);
2129
+ bool print = (yyvsp[(7) - (8)].argVec)->hasAtom("output_var");
2130
+ bool introduced = (yyvsp[(7) - (8)].argVec)->hasAtom("var_is_introduced");
2131
+ yyassert(pp,
2132
+ pp->symbols.put((yyvsp[(6) - (8)].sValue), se_sv(pp->setvars.size())),
2133
+ "Duplicate symbol");
2134
+ if (print) {
2135
+ pp->output(std::string((yyvsp[(6) - (8)].sValue)), new AST::SetVar(pp->setvars.size()));
2136
+ }
2137
+ if ((yyvsp[(8) - (8)].oArg)()) {
2138
+ AST::Node* arg = (yyvsp[(8) - (8)].oArg).some();
2139
+ if (arg->isSet()) {
2140
+ pp->setvars.push_back(varspec((yyvsp[(6) - (8)].sValue),
2141
+ new SetVarSpec(arg->getSet(),introduced)));
2142
+ } else if (arg->isSetVar()) {
2143
+ pp->setvars.push_back(varspec((yyvsp[(6) - (8)].sValue),
2144
+ new SetVarSpec(Alias(arg->getSetVar()),introduced)));
2145
+ delete arg;
2146
+ } else {
2147
+ yyassert(pp, false, "Invalid var set initializer");
2148
+ delete arg;
2149
+ }
2150
+ if (!pp->hadError)
2151
+ addDomainConstraint(pp, "set_subset",
2152
+ new AST::SetVar(pp->setvars.size()-1), (yyvsp[(4) - (8)].oSet));
2153
+ } else {
2154
+ pp->setvars.push_back(varspec((yyvsp[(6) - (8)].sValue), new SetVarSpec((yyvsp[(4) - (8)].oSet),introduced)));
2155
+ }
2156
+ delete (yyvsp[(7) - (8)].argVec); free((yyvsp[(6) - (8)].sValue));
2157
+ ;}
2158
+ break;
2159
+
2160
+ case 39:
2161
+ #line 620 "gecode/flatzinc/parser.yxx"
2162
+ {
2163
+ ParserState* pp = static_cast<ParserState*>(parm);
2164
+ yyassert(pp, (yyvsp[(6) - (6)].arg)->isInt(), "Invalid int initializer");
2165
+ yyassert(pp,
2166
+ pp->symbols.put((yyvsp[(3) - (6)].sValue), se_i((yyvsp[(6) - (6)].arg)->getInt())),
2167
+ "Duplicate symbol");
2168
+ delete (yyvsp[(4) - (6)].argVec); free((yyvsp[(3) - (6)].sValue));
2169
+ ;}
2170
+ break;
2171
+
2172
+ case 40:
2173
+ #line 629 "gecode/flatzinc/parser.yxx"
2174
+ {
2175
+ ParserState* pp = static_cast<ParserState*>(parm);
2176
+ yyassert(pp, (yyvsp[(6) - (6)].arg)->isBool(), "Invalid bool initializer");
2177
+ yyassert(pp,
2178
+ pp->symbols.put((yyvsp[(3) - (6)].sValue), se_b((yyvsp[(6) - (6)].arg)->getBool())),
2179
+ "Duplicate symbol");
2180
+ delete (yyvsp[(4) - (6)].argVec); free((yyvsp[(3) - (6)].sValue));
2181
+ ;}
2182
+ break;
2183
+
2184
+ case 41:
2185
+ #line 638 "gecode/flatzinc/parser.yxx"
2186
+ {
2187
+ ParserState* pp = static_cast<ParserState*>(parm);
2188
+ yyassert(pp, (yyvsp[(8) - (8)].arg)->isSet(), "Invalid set initializer");
2189
+ AST::SetLit* set = (yyvsp[(8) - (8)].arg)->getSet();
2190
+ pp->setvals.push_back(*set);
2191
+ yyassert(pp,
2192
+ pp->symbols.put((yyvsp[(5) - (8)].sValue), se_s(pp->setvals.size()-1)),
2193
+ "Duplicate symbol");
2194
+ delete set;
2195
+ delete (yyvsp[(6) - (8)].argVec); free((yyvsp[(5) - (8)].sValue));
2196
+ ;}
2197
+ break;
2198
+
2199
+ case 42:
2200
+ #line 651 "gecode/flatzinc/parser.yxx"
2201
+ {
2202
+ ParserState* pp = static_cast<ParserState*>(parm);
2203
+ yyassert(pp, (yyvsp[(3) - (13)].iValue)==1, "Arrays must start at 1");
2204
+ if (!pp->hadError) {
2205
+ bool print = (yyvsp[(12) - (13)].argVec)->hasCall("output_array");
2206
+ vector<int> vars((yyvsp[(5) - (13)].iValue));
2207
+ if (!pp->hadError) {
2208
+ if ((yyvsp[(13) - (13)].oVarSpecVec)()) {
2209
+ vector<VarSpec*>* vsv = (yyvsp[(13) - (13)].oVarSpecVec).some();
2210
+ yyassert(pp, vsv->size() == static_cast<unsigned int>((yyvsp[(5) - (13)].iValue)),
2211
+ "Initializer size does not match array dimension");
2212
+ if (!pp->hadError) {
2213
+ for (int i=0; i<(yyvsp[(5) - (13)].iValue); i++) {
2214
+ IntVarSpec* ivsv = static_cast<IntVarSpec*>((*vsv)[i]);
2215
+ if (ivsv->alias) {
2216
+ vars[i] = ivsv->i;
2217
+ } else {
2218
+ vars[i] = pp->intvars.size();
2219
+ pp->intvars.push_back(varspec((yyvsp[(11) - (13)].sValue), ivsv));
2220
+ }
2221
+ if (!pp->hadError && (yyvsp[(9) - (13)].oSet)()) {
2222
+ Option<AST::SetLit*> opt =
2223
+ Option<AST::SetLit*>::some(new AST::SetLit(*(yyvsp[(9) - (13)].oSet).some()));
2224
+ addDomainConstraint(pp, "int_in",
2225
+ new AST::IntVar(vars[i]),
2226
+ opt);
2227
+ }
2228
+ }
2229
+ }
2230
+ delete vsv;
2231
+ } else {
2232
+ if ((yyvsp[(5) - (13)].iValue)>0) {
2233
+ IntVarSpec* ispec = new IntVarSpec((yyvsp[(9) - (13)].oSet),!print);
2234
+ string arrayname = "["; arrayname += (yyvsp[(11) - (13)].sValue);
2235
+ for (int i=0; i<(yyvsp[(5) - (13)].iValue)-1; i++) {
2236
+ vars[i] = pp->intvars.size();
2237
+ pp->intvars.push_back(varspec(arrayname, ispec));
2238
+ }
2239
+ vars[(yyvsp[(5) - (13)].iValue)-1] = pp->intvars.size();
2240
+ pp->intvars.push_back(varspec((yyvsp[(11) - (13)].sValue), ispec));
2241
+ }
2242
+ }
2243
+ }
2244
+ if (print) {
2245
+ AST::Array* a = new AST::Array();
2246
+ a->a.push_back(arrayOutput((yyvsp[(12) - (13)].argVec)->getCall("output_array")));
2247
+ AST::Array* output = new AST::Array();
2248
+ for (int i=0; i<(yyvsp[(5) - (13)].iValue); i++)
2249
+ output->a.push_back(new AST::IntVar(vars[i]));
2250
+ a->a.push_back(output);
2251
+ a->a.push_back(new AST::String(")"));
2252
+ pp->output(std::string((yyvsp[(11) - (13)].sValue)), a);
2253
+ }
2254
+ int iva = pp->arrays.size();
2255
+ pp->arrays.push_back(vars.size());
2256
+ for (unsigned int i=0; i<vars.size(); i++)
2257
+ pp->arrays.push_back(vars[i]);
2258
+ yyassert(pp,
2259
+ pp->symbols.put((yyvsp[(11) - (13)].sValue), se_iva(iva)),
2260
+ "Duplicate symbol");
2261
+ }
2262
+ delete (yyvsp[(12) - (13)].argVec); free((yyvsp[(11) - (13)].sValue));
2263
+ ;}
2264
+ break;
2265
+
2266
+ case 43:
2267
+ #line 716 "gecode/flatzinc/parser.yxx"
2268
+ {
2269
+ ParserState* pp = static_cast<ParserState*>(parm);
2270
+ bool print = (yyvsp[(12) - (13)].argVec)->hasCall("output_array");
2271
+ yyassert(pp, (yyvsp[(3) - (13)].iValue)==1, "Arrays must start at 1");
2272
+ if (!pp->hadError) {
2273
+ vector<int> vars((yyvsp[(5) - (13)].iValue));
2274
+ if ((yyvsp[(13) - (13)].oVarSpecVec)()) {
2275
+ vector<VarSpec*>* vsv = (yyvsp[(13) - (13)].oVarSpecVec).some();
2276
+ yyassert(pp, vsv->size() == static_cast<unsigned int>((yyvsp[(5) - (13)].iValue)),
2277
+ "Initializer size does not match array dimension");
2278
+ if (!pp->hadError) {
2279
+ for (int i=0; i<(yyvsp[(5) - (13)].iValue); i++) {
2280
+ BoolVarSpec* bvsv = static_cast<BoolVarSpec*>((*vsv)[i]);
2281
+ if (bvsv->alias)
2282
+ vars[i] = bvsv->i;
2283
+ else {
2284
+ vars[i] = pp->boolvars.size();
2285
+ pp->boolvars.push_back(varspec((yyvsp[(11) - (13)].sValue), (*vsv)[i]));
2286
+ }
2287
+ if (!pp->hadError && (yyvsp[(9) - (13)].oSet)()) {
2288
+ Option<AST::SetLit*> opt =
2289
+ Option<AST::SetLit*>::some(new AST::SetLit(*(yyvsp[(9) - (13)].oSet).some()));
2290
+ addDomainConstraint(pp, "int_in",
2291
+ new AST::BoolVar(vars[i]),
2292
+ opt);
2293
+ }
2294
+ }
2295
+ }
2296
+ delete vsv;
2297
+ } else {
2298
+ for (int i=0; i<(yyvsp[(5) - (13)].iValue); i++) {
2299
+ vars[i] = pp->boolvars.size();
2300
+ pp->boolvars.push_back(varspec((yyvsp[(11) - (13)].sValue),
2301
+ new BoolVarSpec((yyvsp[(9) - (13)].oSet),!print)));
2302
+ }
2303
+ }
2304
+ if (print) {
2305
+ AST::Array* a = new AST::Array();
2306
+ a->a.push_back(arrayOutput((yyvsp[(12) - (13)].argVec)->getCall("output_array")));
2307
+ AST::Array* output = new AST::Array();
2308
+ for (int i=0; i<(yyvsp[(5) - (13)].iValue); i++)
2309
+ output->a.push_back(new AST::BoolVar(vars[i]));
2310
+ a->a.push_back(output);
2311
+ a->a.push_back(new AST::String(")"));
2312
+ pp->output(std::string((yyvsp[(11) - (13)].sValue)), a);
2313
+ }
2314
+ int bva = pp->arrays.size();
2315
+ pp->arrays.push_back(vars.size());
2316
+ for (unsigned int i=0; i<vars.size(); i++)
2317
+ pp->arrays.push_back(vars[i]);
2318
+ yyassert(pp,
2319
+ pp->symbols.put((yyvsp[(11) - (13)].sValue), se_bva(bva)),
2320
+ "Duplicate symbol");
2321
+ }
2322
+ delete (yyvsp[(12) - (13)].argVec); free((yyvsp[(11) - (13)].sValue));
2323
+ ;}
2324
+ break;
2325
+
2326
+ case 44:
2327
+ #line 774 "gecode/flatzinc/parser.yxx"
2328
+ {
2329
+ ParserState* pp = static_cast<ParserState*>(parm);
2330
+ yyassert(pp, false, "Floats not supported");
2331
+ delete (yyvsp[(12) - (13)].argVec); free((yyvsp[(11) - (13)].sValue));
2332
+ ;}
2333
+ break;
2334
+
2335
+ case 45:
2336
+ #line 781 "gecode/flatzinc/parser.yxx"
2337
+ {
2338
+ ParserState* pp = static_cast<ParserState*>(parm);
2339
+ bool print = (yyvsp[(14) - (15)].argVec)->hasCall("output_array");
2340
+ yyassert(pp, (yyvsp[(3) - (15)].iValue)==1, "Arrays must start at 1");
2341
+ if (!pp->hadError) {
2342
+ vector<int> vars((yyvsp[(5) - (15)].iValue));
2343
+ if ((yyvsp[(15) - (15)].oVarSpecVec)()) {
2344
+ vector<VarSpec*>* vsv = (yyvsp[(15) - (15)].oVarSpecVec).some();
2345
+ yyassert(pp, vsv->size() == static_cast<unsigned int>((yyvsp[(5) - (15)].iValue)),
2346
+ "Initializer size does not match array dimension");
2347
+ if (!pp->hadError) {
2348
+ for (int i=0; i<(yyvsp[(5) - (15)].iValue); i++) {
2349
+ SetVarSpec* svsv = static_cast<SetVarSpec*>((*vsv)[i]);
2350
+ if (svsv->alias)
2351
+ vars[i] = svsv->i;
2352
+ else {
2353
+ vars[i] = pp->setvars.size();
2354
+ pp->setvars.push_back(varspec((yyvsp[(13) - (15)].sValue), (*vsv)[i]));
2355
+ }
2356
+ if (!pp->hadError && (yyvsp[(11) - (15)].oSet)()) {
2357
+ Option<AST::SetLit*> opt =
2358
+ Option<AST::SetLit*>::some(new AST::SetLit(*(yyvsp[(11) - (15)].oSet).some()));
2359
+ addDomainConstraint(pp, "set_subset",
2360
+ new AST::SetVar(vars[i]),
2361
+ opt);
2362
+ }
2363
+ }
2364
+ }
2365
+ delete vsv;
2366
+ } else {
2367
+ if ((yyvsp[(5) - (15)].iValue)>0) {
2368
+ SetVarSpec* ispec = new SetVarSpec((yyvsp[(11) - (15)].oSet),!print);
2369
+ string arrayname = "["; arrayname += (yyvsp[(13) - (15)].sValue);
2370
+ for (int i=0; i<(yyvsp[(5) - (15)].iValue)-1; i++) {
2371
+ vars[i] = pp->setvars.size();
2372
+ pp->setvars.push_back(varspec(arrayname, ispec));
2373
+ }
2374
+ vars[(yyvsp[(5) - (15)].iValue)-1] = pp->setvars.size();
2375
+ pp->setvars.push_back(varspec((yyvsp[(13) - (15)].sValue), ispec));
2376
+ }
2377
+ }
2378
+ if (print) {
2379
+ AST::Array* a = new AST::Array();
2380
+ a->a.push_back(arrayOutput((yyvsp[(14) - (15)].argVec)->getCall("output_array")));
2381
+ AST::Array* output = new AST::Array();
2382
+ for (int i=0; i<(yyvsp[(5) - (15)].iValue); i++)
2383
+ output->a.push_back(new AST::SetVar(vars[i]));
2384
+ a->a.push_back(output);
2385
+ a->a.push_back(new AST::String(")"));
2386
+ pp->output(std::string((yyvsp[(13) - (15)].sValue)), a);
2387
+ }
2388
+ int sva = pp->arrays.size();
2389
+ pp->arrays.push_back(vars.size());
2390
+ for (unsigned int i=0; i<vars.size(); i++)
2391
+ pp->arrays.push_back(vars[i]);
2392
+ yyassert(pp,
2393
+ pp->symbols.put((yyvsp[(13) - (15)].sValue), se_sva(sva)),
2394
+ "Duplicate symbol");
2395
+ }
2396
+ delete (yyvsp[(14) - (15)].argVec); free((yyvsp[(13) - (15)].sValue));
2397
+ ;}
2398
+ break;
2399
+
2400
+ case 46:
2401
+ #line 844 "gecode/flatzinc/parser.yxx"
2402
+ {
2403
+ ParserState* pp = static_cast<ParserState*>(parm);
2404
+ yyassert(pp, (yyvsp[(3) - (15)].iValue)==1, "Arrays must start at 1");
2405
+ yyassert(pp, (yyvsp[(14) - (15)].setValue)->size() == static_cast<unsigned int>((yyvsp[(5) - (15)].iValue)),
2406
+ "Initializer size does not match array dimension");
2407
+
2408
+ if (!pp->hadError) {
2409
+ int ia = pp->arrays.size();
2410
+ pp->arrays.push_back((yyvsp[(14) - (15)].setValue)->size());
2411
+ for (unsigned int i=0; i<(yyvsp[(14) - (15)].setValue)->size(); i++)
2412
+ pp->arrays.push_back((*(yyvsp[(14) - (15)].setValue))[i]);
2413
+ yyassert(pp,
2414
+ pp->symbols.put((yyvsp[(10) - (15)].sValue), se_ia(ia)),
2415
+ "Duplicate symbol");
2416
+ }
2417
+ delete (yyvsp[(14) - (15)].setValue);
2418
+ free((yyvsp[(10) - (15)].sValue));
2419
+ delete (yyvsp[(11) - (15)].argVec);
2420
+ ;}
2421
+ break;
2422
+
2423
+ case 47:
2424
+ #line 865 "gecode/flatzinc/parser.yxx"
2425
+ {
2426
+ ParserState* pp = static_cast<ParserState*>(parm);
2427
+ yyassert(pp, (yyvsp[(3) - (15)].iValue)==1, "Arrays must start at 1");
2428
+ yyassert(pp, (yyvsp[(14) - (15)].setValue)->size() == static_cast<unsigned int>((yyvsp[(5) - (15)].iValue)),
2429
+ "Initializer size does not match array dimension");
2430
+ if (!pp->hadError) {
2431
+ int ia = pp->arrays.size();
2432
+ pp->arrays.push_back((yyvsp[(14) - (15)].setValue)->size());
2433
+ for (unsigned int i=0; i<(yyvsp[(14) - (15)].setValue)->size(); i++)
2434
+ pp->arrays.push_back((*(yyvsp[(14) - (15)].setValue))[i]);
2435
+ yyassert(pp,
2436
+ pp->symbols.put((yyvsp[(10) - (15)].sValue), se_ba(ia)),
2437
+ "Duplicate symbol");
2438
+ }
2439
+ delete (yyvsp[(14) - (15)].setValue);
2440
+ free((yyvsp[(10) - (15)].sValue));
2441
+ delete (yyvsp[(11) - (15)].argVec);
2442
+ ;}
2443
+ break;
2444
+
2445
+ case 48:
2446
+ #line 885 "gecode/flatzinc/parser.yxx"
2447
+ {
2448
+ ParserState* pp = static_cast<ParserState*>(parm);
2449
+ yyassert(pp, false, "Floats not supported");
2450
+ delete (yyvsp[(11) - (15)].argVec); free((yyvsp[(10) - (15)].sValue));
2451
+ ;}
2452
+ break;
2453
+
2454
+ case 49:
2455
+ #line 892 "gecode/flatzinc/parser.yxx"
2456
+ {
2457
+ ParserState* pp = static_cast<ParserState*>(parm);
2458
+ yyassert(pp, (yyvsp[(3) - (17)].iValue)==1, "Arrays must start at 1");
2459
+ yyassert(pp, (yyvsp[(16) - (17)].setValueList)->size() == static_cast<unsigned int>((yyvsp[(5) - (17)].iValue)),
2460
+ "Initializer size does not match array dimension");
2461
+ if (!pp->hadError) {
2462
+ int sa = pp->arrays.size();
2463
+ pp->arrays.push_back((yyvsp[(16) - (17)].setValueList)->size());
2464
+ pp->arrays.push_back(pp->setvals.size());
2465
+ for (unsigned int i=0; i<(yyvsp[(16) - (17)].setValueList)->size(); i++)
2466
+ pp->setvals.push_back((*(yyvsp[(16) - (17)].setValueList))[i]);
2467
+ yyassert(pp,
2468
+ pp->symbols.put((yyvsp[(12) - (17)].sValue), se_sa(sa)),
2469
+ "Duplicate symbol");
2470
+ }
2471
+
2472
+ delete (yyvsp[(16) - (17)].setValueList);
2473
+ delete (yyvsp[(13) - (17)].argVec); free((yyvsp[(12) - (17)].sValue));
2474
+ ;}
2475
+ break;
2476
+
2477
+ case 50:
2478
+ #line 914 "gecode/flatzinc/parser.yxx"
2479
+ {
2480
+ (yyval.varSpec) = new IntVarSpec((yyvsp[(1) - (1)].iValue),false);
2481
+ ;}
2482
+ break;
2483
+
2484
+ case 51:
2485
+ #line 918 "gecode/flatzinc/parser.yxx"
2486
+ {
2487
+ SymbolEntry e;
2488
+ ParserState* pp = static_cast<ParserState*>(parm);
2489
+ if (pp->symbols.get((yyvsp[(1) - (1)].sValue), e) && e.t == ST_INTVAR)
2490
+ (yyval.varSpec) = new IntVarSpec(Alias(e.i),false);
2491
+ else {
2492
+ pp->err << "Error: undefined identifier " << (yyvsp[(1) - (1)].sValue)
2493
+ << " in line no. "
2494
+ << yyget_lineno(pp->yyscanner) << std::endl;
2495
+ pp->hadError = true;
2496
+ (yyval.varSpec) = new IntVarSpec(0,false); // keep things consistent
2497
+ }
2498
+ free((yyvsp[(1) - (1)].sValue));
2499
+ ;}
2500
+ break;
2501
+
2502
+ case 52:
2503
+ #line 933 "gecode/flatzinc/parser.yxx"
2504
+ {
2505
+ vector<int> v;
2506
+ SymbolEntry e;
2507
+ ParserState* pp = static_cast<ParserState*>(parm);
2508
+ if (pp->symbols.get((yyvsp[(1) - (4)].sValue), e) && e.t == ST_INTVARARRAY) {
2509
+ yyassert(pp,(yyvsp[(3) - (4)].iValue) > 0 && (yyvsp[(3) - (4)].iValue) <= pp->arrays[e.i],
2510
+ "array access out of bounds");
2511
+ if (!pp->hadError)
2512
+ (yyval.varSpec) = new IntVarSpec(Alias(pp->arrays[e.i+(yyvsp[(3) - (4)].iValue)]),false);
2513
+ else
2514
+ (yyval.varSpec) = new IntVarSpec(0,false); // keep things consistent
2515
+ } else {
2516
+ pp->err << "Error: undefined array identifier " << (yyvsp[(1) - (4)].sValue)
2517
+ << " in line no. "
2518
+ << yyget_lineno(pp->yyscanner) << std::endl;
2519
+ pp->hadError = true;
2520
+ (yyval.varSpec) = new IntVarSpec(0,false); // keep things consistent
2521
+ }
2522
+ free((yyvsp[(1) - (4)].sValue));
2523
+ ;}
2524
+ break;
2525
+
2526
+ case 53:
2527
+ #line 956 "gecode/flatzinc/parser.yxx"
2528
+ { (yyval.varSpecVec) = new vector<VarSpec*>(0); ;}
2529
+ break;
2530
+
2531
+ case 54:
2532
+ #line 958 "gecode/flatzinc/parser.yxx"
2533
+ { (yyval.varSpecVec) = (yyvsp[(1) - (2)].varSpecVec); ;}
2534
+ break;
2535
+
2536
+ case 55:
2537
+ #line 962 "gecode/flatzinc/parser.yxx"
2538
+ { (yyval.varSpecVec) = new vector<VarSpec*>(1); (*(yyval.varSpecVec))[0] = (yyvsp[(1) - (1)].varSpec); ;}
2539
+ break;
2540
+
2541
+ case 56:
2542
+ #line 964 "gecode/flatzinc/parser.yxx"
2543
+ { (yyval.varSpecVec) = (yyvsp[(1) - (3)].varSpecVec); (yyval.varSpecVec)->push_back((yyvsp[(3) - (3)].varSpec)); ;}
2544
+ break;
2545
+
2546
+ case 59:
2547
+ #line 969 "gecode/flatzinc/parser.yxx"
2548
+ { (yyval.varSpecVec) = (yyvsp[(2) - (3)].varSpecVec); ;}
2549
+ break;
2550
+
2551
+ case 60:
2552
+ #line 973 "gecode/flatzinc/parser.yxx"
2553
+ { (yyval.varSpec) = new FloatVarSpec((yyvsp[(1) - (1)].dValue),false); ;}
2554
+ break;
2555
+
2556
+ case 61:
2557
+ #line 975 "gecode/flatzinc/parser.yxx"
2558
+ {
2559
+ SymbolEntry e;
2560
+ ParserState* pp = static_cast<ParserState*>(parm);
2561
+ if (pp->symbols.get((yyvsp[(1) - (1)].sValue), e) && e.t == ST_FLOATVAR)
2562
+ (yyval.varSpec) = new FloatVarSpec(Alias(e.i),false);
2563
+ else {
2564
+ pp->err << "Error: undefined identifier " << (yyvsp[(1) - (1)].sValue)
2565
+ << " in line no. "
2566
+ << yyget_lineno(pp->yyscanner) << std::endl;
2567
+ pp->hadError = true;
2568
+ (yyval.varSpec) = new FloatVarSpec(0.0,false);
2569
+ }
2570
+ free((yyvsp[(1) - (1)].sValue));
2571
+ ;}
2572
+ break;
2573
+
2574
+ case 62:
2575
+ #line 990 "gecode/flatzinc/parser.yxx"
2576
+ {
2577
+ SymbolEntry e;
2578
+ ParserState* pp = static_cast<ParserState*>(parm);
2579
+ if (pp->symbols.get((yyvsp[(1) - (4)].sValue), e) && e.t == ST_FLOATVARARRAY) {
2580
+ yyassert(pp,(yyvsp[(3) - (4)].iValue) > 0 && (yyvsp[(3) - (4)].iValue) <= pp->arrays[e.i],
2581
+ "array access out of bounds");
2582
+ if (!pp->hadError)
2583
+ (yyval.varSpec) = new FloatVarSpec(Alias(pp->arrays[e.i+(yyvsp[(3) - (4)].iValue)]),false);
2584
+ else
2585
+ (yyval.varSpec) = new FloatVarSpec(0.0,false);
2586
+ } else {
2587
+ pp->err << "Error: undefined array identifier " << (yyvsp[(1) - (4)].sValue)
2588
+ << " in line no. "
2589
+ << yyget_lineno(pp->yyscanner) << std::endl;
2590
+ pp->hadError = true;
2591
+ (yyval.varSpec) = new FloatVarSpec(0.0,false);
2592
+ }
2593
+ free((yyvsp[(1) - (4)].sValue));
2594
+ ;}
2595
+ break;
2596
+
2597
+ case 63:
2598
+ #line 1012 "gecode/flatzinc/parser.yxx"
2599
+ { (yyval.varSpecVec) = new vector<VarSpec*>(0); ;}
2600
+ break;
2601
+
2602
+ case 64:
2603
+ #line 1014 "gecode/flatzinc/parser.yxx"
2604
+ { (yyval.varSpecVec) = (yyvsp[(1) - (2)].varSpecVec); ;}
2605
+ break;
2606
+
2607
+ case 65:
2608
+ #line 1018 "gecode/flatzinc/parser.yxx"
2609
+ { (yyval.varSpecVec) = new vector<VarSpec*>(1); (*(yyval.varSpecVec))[0] = (yyvsp[(1) - (1)].varSpec); ;}
2610
+ break;
2611
+
2612
+ case 66:
2613
+ #line 1020 "gecode/flatzinc/parser.yxx"
2614
+ { (yyval.varSpecVec) = (yyvsp[(1) - (3)].varSpecVec); (yyval.varSpecVec)->push_back((yyvsp[(3) - (3)].varSpec)); ;}
2615
+ break;
2616
+
2617
+ case 67:
2618
+ #line 1024 "gecode/flatzinc/parser.yxx"
2619
+ { (yyval.varSpecVec) = (yyvsp[(2) - (3)].varSpecVec); ;}
2620
+ break;
2621
+
2622
+ case 68:
2623
+ #line 1028 "gecode/flatzinc/parser.yxx"
2624
+ { (yyval.varSpec) = new BoolVarSpec((yyvsp[(1) - (1)].iValue),false); ;}
2625
+ break;
2626
+
2627
+ case 69:
2628
+ #line 1030 "gecode/flatzinc/parser.yxx"
2629
+ {
2630
+ SymbolEntry e;
2631
+ ParserState* pp = static_cast<ParserState*>(parm);
2632
+ if (pp->symbols.get((yyvsp[(1) - (1)].sValue), e) && e.t == ST_BOOLVAR)
2633
+ (yyval.varSpec) = new BoolVarSpec(Alias(e.i),false);
2634
+ else {
2635
+ pp->err << "Error: undefined identifier " << (yyvsp[(1) - (1)].sValue)
2636
+ << " in line no. "
2637
+ << yyget_lineno(pp->yyscanner) << std::endl;
2638
+ pp->hadError = true;
2639
+ (yyval.varSpec) = new BoolVarSpec(false,false);
2640
+ }
2641
+ free((yyvsp[(1) - (1)].sValue));
2642
+ ;}
2643
+ break;
2644
+
2645
+ case 70:
2646
+ #line 1045 "gecode/flatzinc/parser.yxx"
2647
+ {
2648
+ SymbolEntry e;
2649
+ ParserState* pp = static_cast<ParserState*>(parm);
2650
+ if (pp->symbols.get((yyvsp[(1) - (4)].sValue), e) && e.t == ST_BOOLVARARRAY) {
2651
+ yyassert(pp,(yyvsp[(3) - (4)].iValue) > 0 && (yyvsp[(3) - (4)].iValue) <= pp->arrays[e.i],
2652
+ "array access out of bounds");
2653
+ if (!pp->hadError)
2654
+ (yyval.varSpec) = new BoolVarSpec(Alias(pp->arrays[e.i+(yyvsp[(3) - (4)].iValue)]),false);
2655
+ else
2656
+ (yyval.varSpec) = new BoolVarSpec(false,false);
2657
+ } else {
2658
+ pp->err << "Error: undefined array identifier " << (yyvsp[(1) - (4)].sValue)
2659
+ << " in line no. "
2660
+ << yyget_lineno(pp->yyscanner) << std::endl;
2661
+ pp->hadError = true;
2662
+ (yyval.varSpec) = new BoolVarSpec(false,false);
2663
+ }
2664
+ free((yyvsp[(1) - (4)].sValue));
2665
+ ;}
2666
+ break;
2667
+
2668
+ case 71:
2669
+ #line 1067 "gecode/flatzinc/parser.yxx"
2670
+ { (yyval.varSpecVec) = new vector<VarSpec*>(0); ;}
2671
+ break;
2672
+
2673
+ case 72:
2674
+ #line 1069 "gecode/flatzinc/parser.yxx"
2675
+ { (yyval.varSpecVec) = (yyvsp[(1) - (2)].varSpecVec); ;}
2676
+ break;
2677
+
2678
+ case 73:
2679
+ #line 1073 "gecode/flatzinc/parser.yxx"
2680
+ { (yyval.varSpecVec) = new vector<VarSpec*>(1); (*(yyval.varSpecVec))[0] = (yyvsp[(1) - (1)].varSpec); ;}
2681
+ break;
2682
+
2683
+ case 74:
2684
+ #line 1075 "gecode/flatzinc/parser.yxx"
2685
+ { (yyval.varSpecVec) = (yyvsp[(1) - (3)].varSpecVec); (yyval.varSpecVec)->push_back((yyvsp[(3) - (3)].varSpec)); ;}
2686
+ break;
2687
+
2688
+ case 75:
2689
+ #line 1077 "gecode/flatzinc/parser.yxx"
2690
+ { (yyval.varSpecVec) = (yyvsp[(2) - (3)].varSpecVec); ;}
2691
+ break;
2692
+
2693
+ case 76:
2694
+ #line 1081 "gecode/flatzinc/parser.yxx"
2695
+ { (yyval.varSpec) = new SetVarSpec((yyvsp[(1) - (1)].setLit),false); ;}
2696
+ break;
2697
+
2698
+ case 77:
2699
+ #line 1083 "gecode/flatzinc/parser.yxx"
2700
+ {
2701
+ ParserState* pp = static_cast<ParserState*>(parm);
2702
+ SymbolEntry e;
2703
+ if (pp->symbols.get((yyvsp[(1) - (1)].sValue), e) && e.t == ST_SETVAR)
2704
+ (yyval.varSpec) = new SetVarSpec(Alias(e.i),false);
2705
+ else {
2706
+ pp->err << "Error: undefined identifier " << (yyvsp[(1) - (1)].sValue)
2707
+ << " in line no. "
2708
+ << yyget_lineno(pp->yyscanner) << std::endl;
2709
+ pp->hadError = true;
2710
+ (yyval.varSpec) = new SetVarSpec(Alias(0),false);
2711
+ }
2712
+ free((yyvsp[(1) - (1)].sValue));
2713
+ ;}
2714
+ break;
2715
+
2716
+ case 78:
2717
+ #line 1098 "gecode/flatzinc/parser.yxx"
2718
+ {
2719
+ SymbolEntry e;
2720
+ ParserState* pp = static_cast<ParserState*>(parm);
2721
+ if (pp->symbols.get((yyvsp[(1) - (4)].sValue), e) && e.t == ST_SETVARARRAY) {
2722
+ yyassert(pp,(yyvsp[(3) - (4)].iValue) > 0 && (yyvsp[(3) - (4)].iValue) <= pp->arrays[e.i],
2723
+ "array access out of bounds");
2724
+ if (!pp->hadError)
2725
+ (yyval.varSpec) = new SetVarSpec(Alias(pp->arrays[e.i+(yyvsp[(3) - (4)].iValue)]),false);
2726
+ else
2727
+ (yyval.varSpec) = new SetVarSpec(Alias(0),false);
2728
+ } else {
2729
+ pp->err << "Error: undefined array identifier " << (yyvsp[(1) - (4)].sValue)
2730
+ << " in line no. "
2731
+ << yyget_lineno(pp->yyscanner) << std::endl;
2732
+ pp->hadError = true;
2733
+ (yyval.varSpec) = new SetVarSpec(Alias(0),false);
2734
+ }
2735
+ free((yyvsp[(1) - (4)].sValue));
2736
+ ;}
2737
+ break;
2738
+
2739
+ case 79:
2740
+ #line 1120 "gecode/flatzinc/parser.yxx"
2741
+ { (yyval.varSpecVec) = new vector<VarSpec*>(0); ;}
2742
+ break;
2743
+
2744
+ case 80:
2745
+ #line 1122 "gecode/flatzinc/parser.yxx"
2746
+ { (yyval.varSpecVec) = (yyvsp[(1) - (2)].varSpecVec); ;}
2747
+ break;
2748
+
2749
+ case 81:
2750
+ #line 1126 "gecode/flatzinc/parser.yxx"
2751
+ { (yyval.varSpecVec) = new vector<VarSpec*>(1); (*(yyval.varSpecVec))[0] = (yyvsp[(1) - (1)].varSpec); ;}
2752
+ break;
2753
+
2754
+ case 82:
2755
+ #line 1128 "gecode/flatzinc/parser.yxx"
2756
+ { (yyval.varSpecVec) = (yyvsp[(1) - (3)].varSpecVec); (yyval.varSpecVec)->push_back((yyvsp[(3) - (3)].varSpec)); ;}
2757
+ break;
2758
+
2759
+ case 83:
2760
+ #line 1131 "gecode/flatzinc/parser.yxx"
2761
+ { (yyval.varSpecVec) = (yyvsp[(2) - (3)].varSpecVec); ;}
2762
+ break;
2763
+
2764
+ case 84:
2765
+ #line 1135 "gecode/flatzinc/parser.yxx"
2766
+ { (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::none(); ;}
2767
+ break;
2768
+
2769
+ case 85:
2770
+ #line 1137 "gecode/flatzinc/parser.yxx"
2771
+ { (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::some((yyvsp[(2) - (2)].varSpecVec)); ;}
2772
+ break;
2773
+
2774
+ case 86:
2775
+ #line 1141 "gecode/flatzinc/parser.yxx"
2776
+ { (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::none(); ;}
2777
+ break;
2778
+
2779
+ case 87:
2780
+ #line 1143 "gecode/flatzinc/parser.yxx"
2781
+ { (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::some((yyvsp[(2) - (2)].varSpecVec)); ;}
2782
+ break;
2783
+
2784
+ case 88:
2785
+ #line 1147 "gecode/flatzinc/parser.yxx"
2786
+ { (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::none(); ;}
2787
+ break;
2788
+
2789
+ case 89:
2790
+ #line 1149 "gecode/flatzinc/parser.yxx"
2791
+ { (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::some((yyvsp[(2) - (2)].varSpecVec)); ;}
2792
+ break;
2793
+
2794
+ case 90:
2795
+ #line 1153 "gecode/flatzinc/parser.yxx"
2796
+ { (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::none(); ;}
2797
+ break;
2798
+
2799
+ case 91:
2800
+ #line 1155 "gecode/flatzinc/parser.yxx"
2801
+ { (yyval.oVarSpecVec) = Option<vector<VarSpec*>* >::some((yyvsp[(2) - (2)].varSpecVec)); ;}
2802
+ break;
2803
+
2804
+ case 92:
2805
+ #line 1159 "gecode/flatzinc/parser.yxx"
2806
+ {
2807
+ ParserState *pp = static_cast<ParserState*>(parm);
2808
+ if (!pp->hadError) {
2809
+ ConExpr c((yyvsp[(2) - (6)].sValue), (yyvsp[(4) - (6)].argVec));
2810
+ try {
2811
+ pp->fg->postConstraint(c, (yyvsp[(6) - (6)].argVec));
2812
+ } catch (Gecode::FlatZinc::Error& e) {
2813
+ yyerror(pp, e.toString().c_str());
2814
+ }
2815
+ }
2816
+ delete (yyvsp[(6) - (6)].argVec); free((yyvsp[(2) - (6)].sValue));
2817
+ ;}
2818
+ break;
2819
+
2820
+ case 93:
2821
+ #line 1173 "gecode/flatzinc/parser.yxx"
2822
+ {
2823
+ ParserState *pp = static_cast<ParserState*>(parm);
2824
+ if (!pp->hadError) {
2825
+ try {
2826
+ pp->fg->solve((yyvsp[(2) - (3)].argVec));
2827
+ } catch (Gecode::FlatZinc::Error& e) {
2828
+ yyerror(pp, e.toString().c_str());
2829
+ }
2830
+ } else {
2831
+ delete (yyvsp[(2) - (3)].argVec);
2832
+ }
2833
+ ;}
2834
+ break;
2835
+
2836
+ case 94:
2837
+ #line 1186 "gecode/flatzinc/parser.yxx"
2838
+ {
2839
+ ParserState *pp = static_cast<ParserState*>(parm);
2840
+ if (!pp->hadError) {
2841
+ try {
2842
+ if ((yyvsp[(3) - (4)].bValue))
2843
+ pp->fg->minimize((yyvsp[(4) - (4)].iValue),(yyvsp[(2) - (4)].argVec));
2844
+ else
2845
+ pp->fg->maximize((yyvsp[(4) - (4)].iValue),(yyvsp[(2) - (4)].argVec));
2846
+ } catch (Gecode::FlatZinc::Error& e) {
2847
+ yyerror(pp, e.toString().c_str());
2848
+ }
2849
+ } else {
2850
+ delete (yyvsp[(2) - (4)].argVec);
2851
+ }
2852
+ ;}
2853
+ break;
2854
+
2855
+ case 95:
2856
+ #line 1208 "gecode/flatzinc/parser.yxx"
2857
+ { (yyval.oSet) = Option<AST::SetLit* >::none(); ;}
2858
+ break;
2859
+
2860
+ case 96:
2861
+ #line 1210 "gecode/flatzinc/parser.yxx"
2862
+ { (yyval.oSet) = Option<AST::SetLit* >::some(new AST::SetLit(*(yyvsp[(2) - (3)].setValue))); ;}
2863
+ break;
2864
+
2865
+ case 97:
2866
+ #line 1212 "gecode/flatzinc/parser.yxx"
2867
+ {
2868
+ (yyval.oSet) = Option<AST::SetLit* >::some(new AST::SetLit((yyvsp[(1) - (3)].iValue), (yyvsp[(3) - (3)].iValue)));
2869
+ ;}
2870
+ break;
2871
+
2872
+ case 98:
2873
+ #line 1218 "gecode/flatzinc/parser.yxx"
2874
+ { (yyval.oSet) = Option<AST::SetLit* >::none(); ;}
2875
+ break;
2876
+
2877
+ case 99:
2878
+ #line 1220 "gecode/flatzinc/parser.yxx"
2879
+ { bool haveTrue = false;
2880
+ bool haveFalse = false;
2881
+ for (int i=(yyvsp[(2) - (4)].setValue)->size(); i--;) {
2882
+ haveTrue |= ((*(yyvsp[(2) - (4)].setValue))[i] == 1);
2883
+ haveFalse |= ((*(yyvsp[(2) - (4)].setValue))[i] == 0);
2884
+ }
2885
+ delete (yyvsp[(2) - (4)].setValue);
2886
+ (yyval.oSet) = Option<AST::SetLit* >::some(
2887
+ new AST::SetLit(!haveFalse,haveTrue));
2888
+ ;}
2889
+ break;
2890
+
2891
+ case 102:
2892
+ #line 1241 "gecode/flatzinc/parser.yxx"
2893
+ { (yyval.setLit) = new AST::SetLit(*(yyvsp[(2) - (3)].setValue)); ;}
2894
+ break;
2895
+
2896
+ case 103:
2897
+ #line 1243 "gecode/flatzinc/parser.yxx"
2898
+ { (yyval.setLit) = new AST::SetLit((yyvsp[(1) - (3)].iValue), (yyvsp[(3) - (3)].iValue)); ;}
2899
+ break;
2900
+
2901
+ case 104:
2902
+ #line 1249 "gecode/flatzinc/parser.yxx"
2903
+ { (yyval.setValue) = new vector<int>(0); ;}
2904
+ break;
2905
+
2906
+ case 105:
2907
+ #line 1251 "gecode/flatzinc/parser.yxx"
2908
+ { (yyval.setValue) = (yyvsp[(1) - (2)].setValue); ;}
2909
+ break;
2910
+
2911
+ case 106:
2912
+ #line 1255 "gecode/flatzinc/parser.yxx"
2913
+ { (yyval.setValue) = new vector<int>(1); (*(yyval.setValue))[0] = (yyvsp[(1) - (1)].iValue); ;}
2914
+ break;
2915
+
2916
+ case 107:
2917
+ #line 1257 "gecode/flatzinc/parser.yxx"
2918
+ { (yyval.setValue) = (yyvsp[(1) - (3)].setValue); (yyval.setValue)->push_back((yyvsp[(3) - (3)].iValue)); ;}
2919
+ break;
2920
+
2921
+ case 108:
2922
+ #line 1261 "gecode/flatzinc/parser.yxx"
2923
+ { (yyval.setValue) = new vector<int>(0); ;}
2924
+ break;
2925
+
2926
+ case 109:
2927
+ #line 1263 "gecode/flatzinc/parser.yxx"
2928
+ { (yyval.setValue) = (yyvsp[(1) - (2)].setValue); ;}
2929
+ break;
2930
+
2931
+ case 110:
2932
+ #line 1267 "gecode/flatzinc/parser.yxx"
2933
+ { (yyval.setValue) = new vector<int>(1); (*(yyval.setValue))[0] = (yyvsp[(1) - (1)].iValue); ;}
2934
+ break;
2935
+
2936
+ case 111:
2937
+ #line 1269 "gecode/flatzinc/parser.yxx"
2938
+ { (yyval.setValue) = (yyvsp[(1) - (3)].setValue); (yyval.setValue)->push_back((yyvsp[(3) - (3)].iValue)); ;}
2939
+ break;
2940
+
2941
+ case 112:
2942
+ #line 1273 "gecode/flatzinc/parser.yxx"
2943
+ { (yyval.floatSetValue) = new vector<double>(0); ;}
2944
+ break;
2945
+
2946
+ case 113:
2947
+ #line 1275 "gecode/flatzinc/parser.yxx"
2948
+ { (yyval.floatSetValue) = (yyvsp[(1) - (2)].floatSetValue); ;}
2949
+ break;
2950
+
2951
+ case 114:
2952
+ #line 1279 "gecode/flatzinc/parser.yxx"
2953
+ { (yyval.floatSetValue) = new vector<double>(1); (*(yyval.floatSetValue))[0] = (yyvsp[(1) - (1)].dValue); ;}
2954
+ break;
2955
+
2956
+ case 115:
2957
+ #line 1281 "gecode/flatzinc/parser.yxx"
2958
+ { (yyval.floatSetValue) = (yyvsp[(1) - (3)].floatSetValue); (yyval.floatSetValue)->push_back((yyvsp[(3) - (3)].dValue)); ;}
2959
+ break;
2960
+
2961
+ case 116:
2962
+ #line 1285 "gecode/flatzinc/parser.yxx"
2963
+ { (yyval.setValueList) = new vector<AST::SetLit>(0); ;}
2964
+ break;
2965
+
2966
+ case 117:
2967
+ #line 1287 "gecode/flatzinc/parser.yxx"
2968
+ { (yyval.setValueList) = (yyvsp[(1) - (2)].setValueList); ;}
2969
+ break;
2970
+
2971
+ case 118:
2972
+ #line 1291 "gecode/flatzinc/parser.yxx"
2973
+ { (yyval.setValueList) = new vector<AST::SetLit>(1); (*(yyval.setValueList))[0] = *(yyvsp[(1) - (1)].setLit); delete (yyvsp[(1) - (1)].setLit); ;}
2974
+ break;
2975
+
2976
+ case 119:
2977
+ #line 1293 "gecode/flatzinc/parser.yxx"
2978
+ { (yyval.setValueList) = (yyvsp[(1) - (3)].setValueList); (yyval.setValueList)->push_back(*(yyvsp[(3) - (3)].setLit)); delete (yyvsp[(3) - (3)].setLit); ;}
2979
+ break;
2980
+
2981
+ case 120:
2982
+ #line 1301 "gecode/flatzinc/parser.yxx"
2983
+ { (yyval.argVec) = new AST::Array((yyvsp[(1) - (1)].arg)); ;}
2984
+ break;
2985
+
2986
+ case 121:
2987
+ #line 1303 "gecode/flatzinc/parser.yxx"
2988
+ { (yyval.argVec) = (yyvsp[(1) - (3)].argVec); (yyval.argVec)->append((yyvsp[(3) - (3)].arg)); ;}
2989
+ break;
2990
+
2991
+ case 122:
2992
+ #line 1307 "gecode/flatzinc/parser.yxx"
2993
+ { (yyval.arg) = (yyvsp[(1) - (1)].arg); ;}
2994
+ break;
2995
+
2996
+ case 123:
2997
+ #line 1309 "gecode/flatzinc/parser.yxx"
2998
+ { (yyval.arg) = (yyvsp[(2) - (3)].argVec); ;}
2999
+ break;
3000
+
3001
+ case 124:
3002
+ #line 1313 "gecode/flatzinc/parser.yxx"
3003
+ { (yyval.oArg) = Option<AST::Node*>::none(); ;}
3004
+ break;
3005
+
3006
+ case 125:
3007
+ #line 1315 "gecode/flatzinc/parser.yxx"
3008
+ { (yyval.oArg) = Option<AST::Node*>::some((yyvsp[(2) - (2)].arg)); ;}
3009
+ break;
3010
+
3011
+ case 126:
3012
+ #line 1319 "gecode/flatzinc/parser.yxx"
3013
+ { (yyval.arg) = new AST::BoolLit((yyvsp[(1) - (1)].iValue)); ;}
3014
+ break;
3015
+
3016
+ case 127:
3017
+ #line 1321 "gecode/flatzinc/parser.yxx"
3018
+ { (yyval.arg) = new AST::IntLit((yyvsp[(1) - (1)].iValue)); ;}
3019
+ break;
3020
+
3021
+ case 128:
3022
+ #line 1323 "gecode/flatzinc/parser.yxx"
3023
+ { (yyval.arg) = new AST::FloatLit((yyvsp[(1) - (1)].dValue)); ;}
3024
+ break;
3025
+
3026
+ case 129:
3027
+ #line 1325 "gecode/flatzinc/parser.yxx"
3028
+ { (yyval.arg) = (yyvsp[(1) - (1)].setLit); ;}
3029
+ break;
3030
+
3031
+ case 130:
3032
+ #line 1327 "gecode/flatzinc/parser.yxx"
3033
+ {
3034
+ ParserState* pp = static_cast<ParserState*>(parm);
3035
+ SymbolEntry e;
3036
+ if (pp->symbols.get((yyvsp[(1) - (1)].sValue), e)) {
3037
+ switch (e.t) {
3038
+ case ST_INTVARARRAY:
3039
+ {
3040
+ AST::Array *v = new AST::Array(pp->arrays[e.i]);
3041
+ for (int i=pp->arrays[e.i]; i--;)
3042
+ v->a[i] = new AST::IntVar(pp->arrays[e.i+i+1]);
3043
+ (yyval.arg) = v;
3044
+ }
3045
+ break;
3046
+ case ST_BOOLVARARRAY:
3047
+ {
3048
+ AST::Array *v = new AST::Array(pp->arrays[e.i]);
3049
+ for (int i=pp->arrays[e.i]; i--;)
3050
+ v->a[i] = new AST::BoolVar(pp->arrays[e.i+i+1]);
3051
+ (yyval.arg) = v;
3052
+ }
3053
+ break;
3054
+ case ST_SETVARARRAY:
3055
+ {
3056
+ AST::Array *v = new AST::Array(pp->arrays[e.i]);
3057
+ for (int i=pp->arrays[e.i]; i--;)
3058
+ v->a[i] = new AST::SetVar(pp->arrays[e.i+i+1]);
3059
+ (yyval.arg) = v;
3060
+ }
3061
+ break;
3062
+ case ST_INTVALARRAY:
3063
+ {
3064
+ AST::Array *v = new AST::Array(pp->arrays[e.i]);
3065
+ for (int i=pp->arrays[e.i]; i--;)
3066
+ v->a[i] = new AST::IntLit(pp->arrays[e.i+i+1]);
3067
+ (yyval.arg) = v;
3068
+ }
3069
+ break;
3070
+ case ST_BOOLVALARRAY:
3071
+ {
3072
+ AST::Array *v = new AST::Array(pp->arrays[e.i]);
3073
+ for (int i=pp->arrays[e.i]; i--;)
3074
+ v->a[i] = new AST::BoolLit(pp->arrays[e.i+i+1]);
3075
+ (yyval.arg) = v;
3076
+ }
3077
+ break;
3078
+ case ST_SETVALARRAY:
3079
+ {
3080
+ AST::Array *v = new AST::Array(pp->arrays[e.i]);
3081
+ int idx = pp->arrays[e.i+1];
3082
+ for (int i=pp->arrays[e.i]; i--;)
3083
+ v->a[i] = new AST::SetLit(pp->setvals[idx+i]);
3084
+ (yyval.arg) = v;
3085
+ }
3086
+ break;
3087
+ case ST_INT:
3088
+ (yyval.arg) = new AST::IntLit(e.i);
3089
+ break;
3090
+ case ST_BOOL:
3091
+ (yyval.arg) = new AST::BoolLit(e.i);
3092
+ break;
3093
+ case ST_SET:
3094
+ (yyval.arg) = new AST::SetLit(pp->setvals[e.i]);
3095
+ break;
3096
+ default:
3097
+ (yyval.arg) = getVarRefArg(pp,(yyvsp[(1) - (1)].sValue));
3098
+ }
3099
+ } else {
3100
+ pp->err << "Error: undefined identifier " << (yyvsp[(1) - (1)].sValue)
3101
+ << " in line no. "
3102
+ << yyget_lineno(pp->yyscanner) << std::endl;
3103
+ pp->hadError = true;
3104
+ (yyval.arg) = NULL;
3105
+ }
3106
+ free((yyvsp[(1) - (1)].sValue));
3107
+ ;}
3108
+ break;
3109
+
3110
+ case 131:
3111
+ #line 1403 "gecode/flatzinc/parser.yxx"
3112
+ {
3113
+ ParserState* pp = static_cast<ParserState*>(parm);
3114
+ int i = -1;
3115
+ yyassert(pp, (yyvsp[(3) - (4)].arg)->isInt(i), "Non-integer array index");
3116
+ if (!pp->hadError)
3117
+ (yyval.arg) = getArrayElement(static_cast<ParserState*>(parm),(yyvsp[(1) - (4)].sValue),i);
3118
+ else
3119
+ (yyval.arg) = new AST::IntLit(0); // keep things consistent
3120
+ free((yyvsp[(1) - (4)].sValue));
3121
+ ;}
3122
+ break;
3123
+
3124
+ case 132:
3125
+ #line 1416 "gecode/flatzinc/parser.yxx"
3126
+ { (yyval.argVec) = new AST::Array(0); ;}
3127
+ break;
3128
+
3129
+ case 133:
3130
+ #line 1418 "gecode/flatzinc/parser.yxx"
3131
+ { (yyval.argVec) = (yyvsp[(1) - (2)].argVec); ;}
3132
+ break;
3133
+
3134
+ case 134:
3135
+ #line 1422 "gecode/flatzinc/parser.yxx"
3136
+ { (yyval.argVec) = new AST::Array((yyvsp[(1) - (1)].arg)); ;}
3137
+ break;
3138
+
3139
+ case 135:
3140
+ #line 1424 "gecode/flatzinc/parser.yxx"
3141
+ { (yyval.argVec) = (yyvsp[(1) - (3)].argVec); (yyval.argVec)->append((yyvsp[(3) - (3)].arg)); ;}
3142
+ break;
3143
+
3144
+ case 136:
3145
+ #line 1432 "gecode/flatzinc/parser.yxx"
3146
+ {
3147
+ ParserState *pp = static_cast<ParserState*>(parm);
3148
+ SymbolEntry e;
3149
+ if (pp->symbols.get((yyvsp[(1) - (1)].sValue),e) && e.t == ST_INTVAR) {
3150
+ (yyval.iValue) = e.i;
3151
+ } else {
3152
+ pp->err << "Error: unknown integer variable " << (yyvsp[(1) - (1)].sValue)
3153
+ << " in line no. "
3154
+ << yyget_lineno(pp->yyscanner) << std::endl;
3155
+ pp->hadError = true;
3156
+ }
3157
+ free((yyvsp[(1) - (1)].sValue));
3158
+ ;}
3159
+ break;
3160
+
3161
+ case 137:
3162
+ #line 1446 "gecode/flatzinc/parser.yxx"
3163
+ {
3164
+ SymbolEntry e;
3165
+ ParserState *pp = static_cast<ParserState*>(parm);
3166
+ if ( (!pp->symbols.get((yyvsp[(1) - (4)].sValue), e)) || e.t != ST_INTVARARRAY) {
3167
+ pp->err << "Error: unknown integer variable array " << (yyvsp[(1) - (4)].sValue)
3168
+ << " in line no. "
3169
+ << yyget_lineno(pp->yyscanner) << std::endl;
3170
+ pp->hadError = true;
3171
+ }
3172
+ if ((yyvsp[(3) - (4)].iValue) == 0 || (yyvsp[(3) - (4)].iValue) > pp->arrays[e.i]) {
3173
+ pp->err << "Error: array index out of bounds for array " << (yyvsp[(1) - (4)].sValue)
3174
+ << " in line no. "
3175
+ << yyget_lineno(pp->yyscanner) << std::endl;
3176
+ pp->hadError = true;
3177
+ } else {
3178
+ (yyval.iValue) = pp->arrays[e.i+(yyvsp[(3) - (4)].iValue)];
3179
+ }
3180
+ free((yyvsp[(1) - (4)].sValue));
3181
+ ;}
3182
+ break;
3183
+
3184
+ case 140:
3185
+ #line 1476 "gecode/flatzinc/parser.yxx"
3186
+ { (yyval.argVec) = NULL; ;}
3187
+ break;
3188
+
3189
+ case 141:
3190
+ #line 1478 "gecode/flatzinc/parser.yxx"
3191
+ { (yyval.argVec) = (yyvsp[(1) - (1)].argVec); ;}
3192
+ break;
3193
+
3194
+ case 142:
3195
+ #line 1482 "gecode/flatzinc/parser.yxx"
3196
+ { (yyval.argVec) = new AST::Array((yyvsp[(2) - (2)].arg)); ;}
3197
+ break;
3198
+
3199
+ case 143:
3200
+ #line 1484 "gecode/flatzinc/parser.yxx"
3201
+ { (yyval.argVec) = (yyvsp[(1) - (3)].argVec); (yyval.argVec)->append((yyvsp[(3) - (3)].arg)); ;}
3202
+ break;
3203
+
3204
+ case 144:
3205
+ #line 1488 "gecode/flatzinc/parser.yxx"
3206
+ {
3207
+ (yyval.arg) = new AST::Call((yyvsp[(1) - (4)].sValue), AST::extractSingleton((yyvsp[(3) - (4)].arg))); free((yyvsp[(1) - (4)].sValue));
3208
+ ;}
3209
+ break;
3210
+
3211
+ case 145:
3212
+ #line 1492 "gecode/flatzinc/parser.yxx"
3213
+ { (yyval.arg) = (yyvsp[(1) - (1)].arg); ;}
3214
+ break;
3215
+
3216
+ case 146:
3217
+ #line 1496 "gecode/flatzinc/parser.yxx"
3218
+ { (yyval.arg) = new AST::Array((yyvsp[(1) - (1)].arg)); ;}
3219
+ break;
3220
+
3221
+ case 147:
3222
+ #line 1498 "gecode/flatzinc/parser.yxx"
3223
+ { (yyval.arg) = (yyvsp[(1) - (3)].arg); (yyval.arg)->append((yyvsp[(3) - (3)].arg)); ;}
3224
+ break;
3225
+
3226
+ case 148:
3227
+ #line 1502 "gecode/flatzinc/parser.yxx"
3228
+ { (yyval.arg) = (yyvsp[(1) - (1)].arg); ;}
3229
+ break;
3230
+
3231
+ case 149:
3232
+ #line 1504 "gecode/flatzinc/parser.yxx"
3233
+ { (yyval.arg) = (yyvsp[(2) - (3)].arg); ;}
3234
+ break;
3235
+
3236
+ case 150:
3237
+ #line 1508 "gecode/flatzinc/parser.yxx"
3238
+ { (yyval.arg) = new AST::BoolLit((yyvsp[(1) - (1)].iValue)); ;}
3239
+ break;
3240
+
3241
+ case 151:
3242
+ #line 1510 "gecode/flatzinc/parser.yxx"
3243
+ { (yyval.arg) = new AST::IntLit((yyvsp[(1) - (1)].iValue)); ;}
3244
+ break;
3245
+
3246
+ case 152:
3247
+ #line 1512 "gecode/flatzinc/parser.yxx"
3248
+ { (yyval.arg) = new AST::FloatLit((yyvsp[(1) - (1)].dValue)); ;}
3249
+ break;
3250
+
3251
+ case 153:
3252
+ #line 1514 "gecode/flatzinc/parser.yxx"
3253
+ { (yyval.arg) = (yyvsp[(1) - (1)].setLit); ;}
3254
+ break;
3255
+
3256
+ case 154:
3257
+ #line 1516 "gecode/flatzinc/parser.yxx"
3258
+ {
3259
+ ParserState* pp = static_cast<ParserState*>(parm);
3260
+ SymbolEntry e;
3261
+ bool gotSymbol = false;
3262
+ if (pp->symbols.get((yyvsp[(1) - (1)].sValue), e)) {
3263
+ gotSymbol = true;
3264
+ switch (e.t) {
3265
+ case ST_INTVARARRAY:
3266
+ {
3267
+ AST::Array *v = new AST::Array(pp->arrays[e.i]);
3268
+ for (int i=pp->arrays[e.i]; i--;)
3269
+ v->a[i] = new AST::IntVar(pp->arrays[e.i+i+1]);
3270
+ (yyval.arg) = v;
3271
+ }
3272
+ break;
3273
+ case ST_BOOLVARARRAY:
3274
+ {
3275
+ AST::Array *v = new AST::Array(pp->arrays[e.i]);
3276
+ for (int i=pp->arrays[e.i]; i--;)
3277
+ v->a[i] = new AST::BoolVar(pp->arrays[e.i+i+1]);
3278
+ (yyval.arg) = v;
3279
+ }
3280
+ break;
3281
+ case ST_SETVARARRAY:
3282
+ {
3283
+ AST::Array *v = new AST::Array(pp->arrays[e.i]);
3284
+ for (int i=pp->arrays[e.i]; i--;)
3285
+ v->a[i] = new AST::SetVar(pp->arrays[e.i+i+1]);
3286
+ (yyval.arg) = v;
3287
+ }
3288
+ break;
3289
+ case ST_INTVALARRAY:
3290
+ {
3291
+ AST::Array *v = new AST::Array(pp->arrays[e.i]);
3292
+ for (int i=pp->arrays[e.i]; i--;)
3293
+ v->a[i] = new AST::IntLit(pp->arrays[e.i+i+1]);
3294
+ (yyval.arg) = v;
3295
+ }
3296
+ break;
3297
+ case ST_BOOLVALARRAY:
3298
+ {
3299
+ AST::Array *v = new AST::Array(pp->arrays[e.i]);
3300
+ for (int i=pp->arrays[e.i]; i--;)
3301
+ v->a[i] = new AST::BoolLit(pp->arrays[e.i+i+1]);
3302
+ (yyval.arg) = v;
3303
+ }
3304
+ break;
3305
+ case ST_SETVALARRAY:
3306
+ {
3307
+ AST::Array *v = new AST::Array(pp->arrays[e.i]);
3308
+ int idx = pp->arrays[e.i+1];
3309
+ for (int i=pp->arrays[e.i]; i--;)
3310
+ v->a[i] = new AST::SetLit(pp->setvals[idx+i]);
3311
+ (yyval.arg) = v;
3312
+ }
3313
+ break;
3314
+ case ST_INT:
3315
+ (yyval.arg) = new AST::IntLit(e.i);
3316
+ break;
3317
+ case ST_BOOL:
3318
+ (yyval.arg) = new AST::BoolLit(e.i);
3319
+ break;
3320
+ case ST_SET:
3321
+ (yyval.arg) = new AST::SetLit(pp->setvals[e.i]);
3322
+ break;
3323
+ default:
3324
+ gotSymbol = false;
3325
+ }
3326
+ }
3327
+ if (!gotSymbol)
3328
+ (yyval.arg) = getVarRefArg(pp,(yyvsp[(1) - (1)].sValue),true);
3329
+ free((yyvsp[(1) - (1)].sValue));
3330
+ ;}
3331
+ break;
3332
+
3333
+ case 155:
3334
+ #line 1590 "gecode/flatzinc/parser.yxx"
3335
+ {
3336
+ ParserState* pp = static_cast<ParserState*>(parm);
3337
+ int i = -1;
3338
+ yyassert(pp, (yyvsp[(3) - (4)].arg)->isInt(i), "Non-integer array index");
3339
+ if (!pp->hadError)
3340
+ (yyval.arg) = getArrayElement(static_cast<ParserState*>(parm),(yyvsp[(1) - (4)].sValue),i);
3341
+ else
3342
+ (yyval.arg) = new AST::IntLit(0); // keep things consistent
3343
+ free((yyvsp[(1) - (4)].sValue));
3344
+ ;}
3345
+ break;
3346
+
3347
+ case 156:
3348
+ #line 1601 "gecode/flatzinc/parser.yxx"
3349
+ {
3350
+ (yyval.arg) = new AST::String((yyvsp[(1) - (1)].sValue));
3351
+ free((yyvsp[(1) - (1)].sValue));
3352
+ ;}
3353
+ break;
3354
+
3355
+
3356
+ /* Line 1267 of yacc.c. */
3357
+ #line 3358 "gecode/flatzinc/parser.tab.cpp"
3358
+ default: break;
3359
+ }
3360
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3361
+
3362
+ YYPOPSTACK (yylen);
3363
+ yylen = 0;
3364
+ YY_STACK_PRINT (yyss, yyssp);
3365
+
3366
+ *++yyvsp = yyval;
3367
+
3368
+
3369
+ /* Now `shift' the result of the reduction. Determine what state
3370
+ that goes to, based on the state we popped back to and the rule
3371
+ number reduced by. */
3372
+
3373
+ yyn = yyr1[yyn];
3374
+
3375
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3376
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3377
+ yystate = yytable[yystate];
3378
+ else
3379
+ yystate = yydefgoto[yyn - YYNTOKENS];
3380
+
3381
+ goto yynewstate;
3382
+
3383
+
3384
+ /*------------------------------------.
3385
+ | yyerrlab -- here on detecting error |
3386
+ `------------------------------------*/
3387
+ yyerrlab:
3388
+ /* If not already recovering from an error, report this error. */
3389
+ if (!yyerrstatus)
3390
+ {
3391
+ ++yynerrs;
3392
+ #if ! YYERROR_VERBOSE
3393
+ yyerror (parm, YY_("syntax error"));
3394
+ #else
3395
+ {
3396
+ YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
3397
+ if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
3398
+ {
3399
+ YYSIZE_T yyalloc = 2 * yysize;
3400
+ if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
3401
+ yyalloc = YYSTACK_ALLOC_MAXIMUM;
3402
+ if (yymsg != yymsgbuf)
3403
+ YYSTACK_FREE (yymsg);
3404
+ yymsg = (char *) YYSTACK_ALLOC (yyalloc);
3405
+ if (yymsg)
3406
+ yymsg_alloc = yyalloc;
3407
+ else
3408
+ {
3409
+ yymsg = yymsgbuf;
3410
+ yymsg_alloc = sizeof yymsgbuf;
3411
+ }
3412
+ }
3413
+
3414
+ if (0 < yysize && yysize <= yymsg_alloc)
3415
+ {
3416
+ (void) yysyntax_error (yymsg, yystate, yychar);
3417
+ yyerror (parm, yymsg);
3418
+ }
3419
+ else
3420
+ {
3421
+ yyerror (parm, YY_("syntax error"));
3422
+ if (yysize != 0)
3423
+ goto yyexhaustedlab;
3424
+ }
3425
+ }
3426
+ #endif
3427
+ }
3428
+
3429
+
3430
+
3431
+ if (yyerrstatus == 3)
3432
+ {
3433
+ /* If just tried and failed to reuse look-ahead token after an
3434
+ error, discard it. */
3435
+
3436
+ if (yychar <= YYEOF)
3437
+ {
3438
+ /* Return failure if at end of input. */
3439
+ if (yychar == YYEOF)
3440
+ YYABORT;
3441
+ }
3442
+ else
3443
+ {
3444
+ yydestruct ("Error: discarding",
3445
+ yytoken, &yylval, parm);
3446
+ yychar = YYEMPTY;
3447
+ }
3448
+ }
3449
+
3450
+ /* Else will try to reuse look-ahead token after shifting the error
3451
+ token. */
3452
+ goto yyerrlab1;
3453
+
3454
+
3455
+ /*---------------------------------------------------.
3456
+ | yyerrorlab -- error raised explicitly by YYERROR. |
3457
+ `---------------------------------------------------*/
3458
+ yyerrorlab:
3459
+
3460
+ /* Pacify compilers like GCC when the user code never invokes
3461
+ YYERROR and the label yyerrorlab therefore never appears in user
3462
+ code. */
3463
+ if (/*CONSTCOND*/ 0)
3464
+ goto yyerrorlab;
3465
+
3466
+ /* Do not reclaim the symbols of the rule which action triggered
3467
+ this YYERROR. */
3468
+ YYPOPSTACK (yylen);
3469
+ yylen = 0;
3470
+ YY_STACK_PRINT (yyss, yyssp);
3471
+ yystate = *yyssp;
3472
+ goto yyerrlab1;
3473
+
3474
+
3475
+ /*-------------------------------------------------------------.
3476
+ | yyerrlab1 -- common code for both syntax error and YYERROR. |
3477
+ `-------------------------------------------------------------*/
3478
+ yyerrlab1:
3479
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
3480
+
3481
+ for (;;)
3482
+ {
3483
+ yyn = yypact[yystate];
3484
+ if (yyn != YYPACT_NINF)
3485
+ {
3486
+ yyn += YYTERROR;
3487
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3488
+ {
3489
+ yyn = yytable[yyn];
3490
+ if (0 < yyn)
3491
+ break;
3492
+ }
3493
+ }
3494
+
3495
+ /* Pop the current state because it cannot handle the error token. */
3496
+ if (yyssp == yyss)
3497
+ YYABORT;
3498
+
3499
+
3500
+ yydestruct ("Error: popping",
3501
+ yystos[yystate], yyvsp, parm);
3502
+ YYPOPSTACK (1);
3503
+ yystate = *yyssp;
3504
+ YY_STACK_PRINT (yyss, yyssp);
3505
+ }
3506
+
3507
+ if (yyn == YYFINAL)
3508
+ YYACCEPT;
3509
+
3510
+ *++yyvsp = yylval;
3511
+
3512
+
3513
+ /* Shift the error token. */
3514
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3515
+
3516
+ yystate = yyn;
3517
+ goto yynewstate;
3518
+
3519
+
3520
+ /*-------------------------------------.
3521
+ | yyacceptlab -- YYACCEPT comes here. |
3522
+ `-------------------------------------*/
3523
+ yyacceptlab:
3524
+ yyresult = 0;
3525
+ goto yyreturn;
3526
+
3527
+ /*-----------------------------------.
3528
+ | yyabortlab -- YYABORT comes here. |
3529
+ `-----------------------------------*/
3530
+ yyabortlab:
3531
+ yyresult = 1;
3532
+ goto yyreturn;
3533
+
3534
+ #ifndef yyoverflow
3535
+ /*-------------------------------------------------.
3536
+ | yyexhaustedlab -- memory exhaustion comes here. |
3537
+ `-------------------------------------------------*/
3538
+ yyexhaustedlab:
3539
+ yyerror (parm, YY_("memory exhausted"));
3540
+ yyresult = 2;
3541
+ /* Fall through. */
3542
+ #endif
3543
+
3544
+ yyreturn:
3545
+ if (yychar != YYEOF && yychar != YYEMPTY)
3546
+ yydestruct ("Cleanup: discarding lookahead",
3547
+ yytoken, &yylval, parm);
3548
+ /* Do not reclaim the symbols of the rule which action triggered
3549
+ this YYABORT or YYACCEPT. */
3550
+ YYPOPSTACK (yylen);
3551
+ YY_STACK_PRINT (yyss, yyssp);
3552
+ while (yyssp != yyss)
3553
+ {
3554
+ yydestruct ("Cleanup: popping",
3555
+ yystos[*yyssp], yyvsp, parm);
3556
+ YYPOPSTACK (1);
3557
+ }
3558
+ #ifndef yyoverflow
3559
+ if (yyss != yyssa)
3560
+ YYSTACK_FREE (yyss);
3561
+ #endif
3562
+ #if YYERROR_VERBOSE
3563
+ if (yymsg != yymsgbuf)
3564
+ YYSTACK_FREE (yymsg);
3565
+ #endif
3566
+ /* Make sure YYID is used. */
3567
+ return YYID (yyresult);
3568
+ }
3569
+
3570
+
3571
+