pyEQL 1.4.0rc9__cp311-cp311-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (519) hide show
  1. pyEQL/__init__.py +50 -0
  2. pyEQL/_phreeqc.cp311-win_amd64.pyd +0 -0
  3. pyEQL/activity_correction.py +879 -0
  4. pyEQL/database/geothermal.dat +5693 -0
  5. pyEQL/database/llnl.dat +19305 -0
  6. pyEQL/database/phreeqc_license.txt +54 -0
  7. pyEQL/database/pyeql_db.json +35607 -0
  8. pyEQL/engines.py +1153 -0
  9. pyEQL/equilibrium.py +227 -0
  10. pyEQL/functions.py +281 -0
  11. pyEQL/phreeqc/__init__.py +5 -0
  12. pyEQL/phreeqc/bindings.cpp +84 -0
  13. pyEQL/phreeqc/core.py +239 -0
  14. pyEQL/phreeqc/database/Amm.dat +1968 -0
  15. pyEQL/phreeqc/database/CMakeLists.txt +32 -0
  16. pyEQL/phreeqc/database/ColdChem.dat +267 -0
  17. pyEQL/phreeqc/database/Concrete_PHR.dat +158 -0
  18. pyEQL/phreeqc/database/Concrete_PZ.dat +195 -0
  19. pyEQL/phreeqc/database/Kinec.v2.dat +12039 -0
  20. pyEQL/phreeqc/database/Kinec_v3.dat +12159 -0
  21. pyEQL/phreeqc/database/Makefile.am +28 -0
  22. pyEQL/phreeqc/database/Makefile.in +530 -0
  23. pyEQL/phreeqc/database/PHREEQC_ThermoddemV1.10_15Dec2020.dat +12965 -0
  24. pyEQL/phreeqc/database/Tipping_Hurley.dat +4137 -0
  25. pyEQL/phreeqc/database/__init__.py +0 -0
  26. pyEQL/phreeqc/database/core10.dat +6824 -0
  27. pyEQL/phreeqc/database/frezchem.dat +634 -0
  28. pyEQL/phreeqc/database/iso.dat +7235 -0
  29. pyEQL/phreeqc/database/llnl.dat +19310 -0
  30. pyEQL/phreeqc/database/minteq.dat +5654 -0
  31. pyEQL/phreeqc/database/minteq.v4.dat +13212 -0
  32. pyEQL/phreeqc/database/phreeqc.dat +1972 -0
  33. pyEQL/phreeqc/database/phreeqc_rates.dat +3158 -0
  34. pyEQL/phreeqc/database/pitzer.dat +1044 -0
  35. pyEQL/phreeqc/database/sit.dat +14348 -0
  36. pyEQL/phreeqc/database/wateq4f.dat +4036 -0
  37. pyEQL/phreeqc/ext/README.md +10 -0
  38. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/CMakeLists.txt +476 -0
  39. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/INSTALL +302 -0
  40. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/IPhreeqc.rc +61 -0
  41. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/IPhreeqcConfig.cmake.in +4 -0
  42. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/Makefile.am +8 -0
  43. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/Makefile.in +816 -0
  44. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/aclocal.m4 +1217 -0
  45. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/ALL_BUILD.vcxproj +185 -0
  46. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/ALL_BUILD.vcxproj.filters +8 -0
  47. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/generate.stamp +1 -0
  48. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/generate.stamp.depend +79 -0
  49. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CTestTestfile.cmake +6 -0
  50. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Continuous.vcxproj +240 -0
  51. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Continuous.vcxproj.filters +17 -0
  52. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/DartConfiguration.tcl +109 -0
  53. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Experimental.vcxproj +240 -0
  54. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Experimental.vcxproj.filters +17 -0
  55. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/INSTALL.vcxproj +209 -0
  56. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/INSTALL.vcxproj.filters +13 -0
  57. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/CSelectedOutput.obj +0 -0
  58. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Dictionary.obj +0 -0
  59. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/ExchComp.obj +0 -0
  60. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Exchange.obj +0 -0
  61. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/GasComp.obj +0 -0
  62. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/GasPhase.obj +0 -0
  63. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.lib.recipe +11 -0
  64. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.obj +0 -0
  65. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CL.command.1.tlog +0 -0
  66. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CL.read.1.tlog +0 -0
  67. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CL.write.1.tlog +0 -0
  68. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/Cl.items.tlog +82 -0
  69. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CustomBuild.command.1.tlog +10 -0
  70. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CustomBuild.read.1.tlog +78 -0
  71. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CustomBuild.write.1.tlog +2 -0
  72. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/IPhreeqc.lastbuildstate +2 -0
  73. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/Lib-link.read.1.tlog +0 -0
  74. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/Lib-link.write.1.tlog +0 -0
  75. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/Lib.command.1.tlog +0 -0
  76. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqcLib.obj +0 -0
  77. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc_interface_F.obj +0 -0
  78. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/ISolution.obj +0 -0
  79. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/ISolutionComp.obj +0 -0
  80. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Keywords.obj +0 -0
  81. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/KineticsComp.obj +0 -0
  82. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/NameDouble.obj +0 -0
  83. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/NumKeyword.obj +0 -0
  84. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PBasic.obj +0 -0
  85. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PHRQ_base.obj +0 -0
  86. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PHRQ_io.obj +0 -0
  87. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PHRQ_io_output.obj +0 -0
  88. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PPassemblage.obj +0 -0
  89. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PPassemblageComp.obj +0 -0
  90. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Parser.obj +0 -0
  91. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Phreeqc.obj +0 -0
  92. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Pressure.obj +0 -0
  93. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Reaction.obj +0 -0
  94. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/ReadClass.obj +0 -0
  95. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SS.obj +0 -0
  96. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SSassemblage.obj +0 -0
  97. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SScomp.obj +0 -0
  98. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SelectedOutput.obj +0 -0
  99. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Serializer.obj +0 -0
  100. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Solution.obj +0 -0
  101. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SolutionIsotope.obj +0 -0
  102. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/StorageBin.obj +0 -0
  103. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/StorageBinList.obj +0 -0
  104. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Surface.obj +0 -0
  105. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SurfaceCharge.obj +0 -0
  106. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SurfaceComp.obj +0 -0
  107. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/System.obj +0 -0
  108. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Temperature.obj +0 -0
  109. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Use.obj +0 -0
  110. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/UserPunch.obj +0 -0
  111. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Utils.obj +0 -0
  112. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Var.obj +0 -0
  113. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/advection.obj +0 -0
  114. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/basicsubs.obj +0 -0
  115. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cl1.obj +0 -0
  116. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cvdense.obj +0 -0
  117. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cvode.obj +0 -0
  118. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cxxKinetics.obj +0 -0
  119. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cxxMix.obj +0 -0
  120. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/dense.obj +0 -0
  121. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/dumper.obj +0 -0
  122. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/gases.obj +0 -0
  123. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/input.obj +0 -0
  124. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/integrate.obj +0 -0
  125. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/inverse.obj +0 -0
  126. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/isotopes.obj +0 -0
  127. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/kinetics.obj +0 -0
  128. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/mainsubs.obj +0 -0
  129. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/model.obj +0 -0
  130. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/nvector.obj +0 -0
  131. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/nvector_serial.obj +0 -0
  132. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/parse.obj +0 -0
  133. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/phqalloc.obj +0 -0
  134. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/pitzer.obj +0 -0
  135. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/pitzer_structures.obj +0 -0
  136. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/prep.obj +0 -0
  137. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/print.obj +0 -0
  138. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/read.obj +0 -0
  139. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/readtr.obj +0 -0
  140. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/runner.obj +0 -0
  141. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/sit.obj +0 -0
  142. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/smalldense.obj +0 -0
  143. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/spread.obj +0 -0
  144. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/step.obj +0 -0
  145. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/structures.obj +0 -0
  146. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/sundialsmath.obj +0 -0
  147. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/tally.obj +0 -0
  148. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/tidy.obj +0 -0
  149. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/transport.obj +0 -0
  150. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/utilities.obj +0 -0
  151. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.sln +116 -0
  152. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.vcxproj +443 -0
  153. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.vcxproj.filters +456 -0
  154. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Nightly.vcxproj +240 -0
  155. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Nightly.vcxproj.filters +17 -0
  156. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/NightlyMemoryCheck.vcxproj +240 -0
  157. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/NightlyMemoryCheck.vcxproj.filters +17 -0
  158. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Release/IPhreeqc.lib +0 -0
  159. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/cmake_install.cmake +40 -0
  160. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/ar-lib +270 -0
  161. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/compile +347 -0
  162. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/config.guess +1441 -0
  163. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/config.sub +1813 -0
  164. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/depcomp +791 -0
  165. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/install-sh +508 -0
  166. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/ltmain.sh +11156 -0
  167. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/missing +215 -0
  168. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/test-driver +148 -0
  169. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/configure +23867 -0
  170. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/configure.ac +136 -0
  171. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Amm.dat +1968 -0
  172. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/CMakeLists.txt +32 -0
  173. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/ColdChem.dat +267 -0
  174. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Concrete_PHR.dat +158 -0
  175. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Concrete_PZ.dat +195 -0
  176. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Kinec.v2.dat +12039 -0
  177. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Kinec_v3.dat +12159 -0
  178. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Makefile.am +28 -0
  179. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Makefile.in +530 -0
  180. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/PHREEQC_ThermoddemV1.10_15Dec2020.dat +12965 -0
  181. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Tipping_Hurley.dat +4137 -0
  182. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/core10.dat +6824 -0
  183. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/frezchem.dat +634 -0
  184. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/iso.dat +7235 -0
  185. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/llnl.dat +19310 -0
  186. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/minteq.dat +5654 -0
  187. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/minteq.v4.dat +13212 -0
  188. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/phreeqc.dat +1972 -0
  189. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/phreeqc_rates.dat +3158 -0
  190. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/pitzer.dat +1044 -0
  191. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/sit.dat +14348 -0
  192. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/wateq4f.dat +4036 -0
  193. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/CMakeLists.txt +35 -0
  194. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/IPhreeqc.pdf +0 -0
  195. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Makefile.am +24 -0
  196. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Makefile.in +545 -0
  197. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/NOTICE +51 -0
  198. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Phreeqc_2_1999_manual.pdf +0 -0
  199. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Phreeqc_3_2013_manual.pdf +0 -0
  200. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/README +428 -0
  201. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/RELEASE +7294 -0
  202. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8h.html +5096 -0
  203. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8h_source.html +389 -0
  204. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8hpp.html +83 -0
  205. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8hpp_source.html +478 -0
  206. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/Var_8h.html +318 -0
  207. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/Var_8h_source.html +200 -0
  208. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/bc_s.png +0 -0
  209. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/bdwn.png +0 -0
  210. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqc.html +2274 -0
  211. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqc.png +0 -0
  212. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqcStop.html +69 -0
  213. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqcStop.png +0 -0
  214. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/closed.png +0 -0
  215. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +68 -0
  216. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/doxygen.css +1440 -0
  217. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/doxygen.png +0 -0
  218. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/dynsections.js +97 -0
  219. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2blank.png +0 -0
  220. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2doc.png +0 -0
  221. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2folderclosed.png +0 -0
  222. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2folderopen.png +0 -0
  223. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2lastnode.png +0 -0
  224. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2link.png +0 -0
  225. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2mlastnode.png +0 -0
  226. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2mnode.png +0 -0
  227. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2node.png +0 -0
  228. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2plastnode.png +0 -0
  229. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2pnode.png +0 -0
  230. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2splitbar.png +0 -0
  231. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2vertline.png +0 -0
  232. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/index.html +58 -0
  233. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/jquery.js +31 -0
  234. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_f.png +0 -0
  235. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_g.png +0 -0
  236. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_h.png +0 -0
  237. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/open.png +0 -0
  238. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/structVAR.html +143 -0
  239. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/sync_off.png +0 -0
  240. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/sync_on.png +0 -0
  241. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_a.png +0 -0
  242. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_b.png +0 -0
  243. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_h.png +0 -0
  244. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_s.png +0 -0
  245. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tabs.css +60 -0
  246. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/phreeqc3.chm +0 -0
  247. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/CMakeLists.txt +11 -0
  248. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/Makefile.am +88 -0
  249. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/Makefile.in +696 -0
  250. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/CMakeLists.txt +1 -0
  251. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/CMakeLists.txt +35 -0
  252. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/CMakeLists.txt.in +21 -0
  253. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/README.txt +44 -0
  254. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/advect.c +101 -0
  255. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/ic +17 -0
  256. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/phreeqc.dat +1579 -0
  257. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/CMakeLists.txt +10 -0
  258. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/README.txt +3 -0
  259. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/CMakeLists.txt +9 -0
  260. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/phreeqc.dat +1582 -0
  261. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/runphreeqc.xls +0 -0
  262. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/withcallback.xls +0 -0
  263. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/CMakeLists.txt +11 -0
  264. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/Gypsum.py +52 -0
  265. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/parallel_advect.py +465 -0
  266. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/phreeqc.dat +1582 -0
  267. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/pitzer.dat +790 -0
  268. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/wateq4f.dat +3846 -0
  269. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/CMakeLists.txt +1 -0
  270. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/CMakeLists.txt +35 -0
  271. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/CMakeLists.txt.in +20 -0
  272. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/README.txt +45 -0
  273. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/advect.cpp +110 -0
  274. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/ic +17 -0
  275. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/phreeqc.dat +1579 -0
  276. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/CMakeLists.txt +1 -0
  277. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/CMakeLists.txt +44 -0
  278. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/CMakeLists.txt.in +24 -0
  279. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/README.txt +45 -0
  280. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/advect.F90 +102 -0
  281. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/ic +17 -0
  282. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/phreeqc.dat +1579 -0
  283. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/CMakeLists.txt +26 -0
  284. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/CMakeLists.txt.in +20 -0
  285. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/README.txt +37 -0
  286. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/ex2 +26 -0
  287. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/main.cpp +20 -0
  288. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/phreeqc.dat +1837 -0
  289. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/post-install.cmake.in +7 -0
  290. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/CMakeLists.txt +185 -0
  291. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/FileTest.cpp +171 -0
  292. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/FileTest.h +34 -0
  293. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/Makefile.am +18 -0
  294. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/Makefile.in +466 -0
  295. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestCVar.cpp +9 -0
  296. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestIPhreeqc.cpp +4901 -0
  297. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestIPhreeqcLib.cpp +4644 -0
  298. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestSelectedOutput.cpp +669 -0
  299. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestVar.cpp +10 -0
  300. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/conv_fail.in +11 -0
  301. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/dump +42 -0
  302. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/iso.dat +7231 -0
  303. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/kinn20140218 +349 -0
  304. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/missing_e.dat +1556 -0
  305. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/multi_punch +105 -0
  306. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/multi_punch_no_set +102 -0
  307. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/phreeqc.dat.90a6449 +1935 -0
  308. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/phreeqc.dat.old +1556 -0
  309. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/libtool.m4 +8388 -0
  310. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltoptions.m4 +437 -0
  311. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltsugar.m4 +124 -0
  312. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltversion.m4 +23 -0
  313. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/lt~obsolete.m4 +99 -0
  314. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/resource.h +14 -0
  315. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CSelectedOutput.cpp +401 -0
  316. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CSelectedOutput.hxx +77 -0
  317. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CVar.hxx +162 -0
  318. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Debug.h +12 -0
  319. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/ErrorReporter.hxx +70 -0
  320. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.cpp +1889 -0
  321. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.f.inc +91 -0
  322. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.f90.inc +603 -0
  323. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.h +2182 -0
  324. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.hpp +1027 -0
  325. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcCallbacks.h +19 -0
  326. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcF.f +653 -0
  327. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcLib.cpp +1098 -0
  328. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface.F90 +1283 -0
  329. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface_F.cpp +535 -0
  330. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface_F.h +162 -0
  331. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Makefile.am +210 -0
  332. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Makefile.in +1294 -0
  333. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/README.Fortran +17 -0
  334. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Var.c +84 -0
  335. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Var.h +152 -0
  336. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Version.h +36 -0
  337. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fimpl.h +282 -0
  338. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap.cpp +646 -0
  339. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap.h +163 -0
  340. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap1.cpp +24 -0
  341. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap2.cpp +24 -0
  342. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap3.cpp +24 -0
  343. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap4.cpp +24 -0
  344. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap5.cpp +24 -0
  345. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap6.cpp +25 -0
  346. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap7.cpp +25 -0
  347. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap8.cpp +24 -0
  348. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartHandler.cpp +225 -0
  349. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartHandler.h +59 -0
  350. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartObject.cpp +1382 -0
  351. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartObject.h +444 -0
  352. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/CurveObject.cpp +42 -0
  353. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/CurveObject.h +79 -0
  354. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Dictionary.cpp +41 -0
  355. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Dictionary.h +28 -0
  356. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ExchComp.cxx +398 -0
  357. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ExchComp.h +117 -0
  358. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Exchange.cxx +466 -0
  359. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Exchange.h +74 -0
  360. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Form1.h +1184 -0
  361. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Form1.resX +36 -0
  362. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasComp.cxx +265 -0
  363. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasComp.h +59 -0
  364. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasPhase.cxx +659 -0
  365. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasPhase.h +103 -0
  366. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolution.cxx +40 -0
  367. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolution.h +53 -0
  368. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolutionComp.cxx +202 -0
  369. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolutionComp.h +138 -0
  370. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/KineticsComp.cxx +318 -0
  371. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/KineticsComp.h +81 -0
  372. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NA.h +1 -0
  373. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NameDouble.cxx +537 -0
  374. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NameDouble.h +66 -0
  375. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NumKeyword.cxx +190 -0
  376. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NumKeyword.h +67 -0
  377. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PBasic.cpp +8350 -0
  378. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PBasic.h +572 -0
  379. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PHRQ_io_output.cpp +411 -0
  380. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblage.cxx +375 -0
  381. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblage.h +70 -0
  382. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblageComp.cxx +441 -0
  383. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblageComp.h +83 -0
  384. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Phreeqc.cpp +2087 -0
  385. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Phreeqc.h +2164 -0
  386. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PhreeqcKeywords/Keywords.cpp +242 -0
  387. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PhreeqcKeywords/Keywords.h +104 -0
  388. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Pressure.cxx +417 -0
  389. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Pressure.h +43 -0
  390. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Reaction.cxx +284 -0
  391. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Reaction.h +57 -0
  392. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ReadClass.cxx +1150 -0
  393. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SS.cxx +609 -0
  394. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SS.h +128 -0
  395. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SSassemblage.cxx +317 -0
  396. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SSassemblage.h +59 -0
  397. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SScomp.cxx +297 -0
  398. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SScomp.h +66 -0
  399. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SelectedOutput.cpp +115 -0
  400. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SelectedOutput.h +209 -0
  401. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Serializer.cxx +213 -0
  402. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Serializer.h +42 -0
  403. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Solution.cxx +1795 -0
  404. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Solution.h +154 -0
  405. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SolutionIsotope.cxx +333 -0
  406. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SolutionIsotope.h +85 -0
  407. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBin.cxx +1507 -0
  408. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBin.h +141 -0
  409. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBinList.cpp +358 -0
  410. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBinList.h +81 -0
  411. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Surface.cxx +837 -0
  412. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Surface.h +108 -0
  413. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceCharge.cxx +617 -0
  414. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceCharge.h +137 -0
  415. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceComp.cxx +509 -0
  416. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceComp.h +70 -0
  417. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/System.cxx +103 -0
  418. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/System.h +89 -0
  419. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Temperature.cxx +423 -0
  420. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Temperature.h +42 -0
  421. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Use.cpp +78 -0
  422. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Use.h +159 -0
  423. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/UserPunch.cpp +32 -0
  424. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/UserPunch.h +39 -0
  425. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ZedGraph.dll +0 -0
  426. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/advection.cpp +140 -0
  427. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/basicsubs.cpp +4333 -0
  428. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cl1.cpp +881 -0
  429. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_base.cxx +117 -0
  430. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_base.h +48 -0
  431. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_exports.h +20 -0
  432. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_io.cpp +914 -0
  433. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_io.h +207 -0
  434. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Parser.cxx +1331 -0
  435. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Parser.h +310 -0
  436. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Utils.cxx +263 -0
  437. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Utils.h +29 -0
  438. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/phrqtype.h +18 -0
  439. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvdense.cpp +566 -0
  440. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvdense.h +267 -0
  441. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvode.cpp +3939 -0
  442. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvode.h +940 -0
  443. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxKinetics.cxx +617 -0
  444. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxKinetics.h +78 -0
  445. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxMix.cxx +154 -0
  446. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxMix.h +58 -0
  447. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dense.cpp +175 -0
  448. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dense.h +341 -0
  449. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dumper.cpp +277 -0
  450. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dumper.h +60 -0
  451. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/gases.cpp +748 -0
  452. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/global_structures.h +1672 -0
  453. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/input.cpp +133 -0
  454. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/integrate.cpp +1219 -0
  455. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/inverse.cpp +5135 -0
  456. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/isotopes.cpp +1813 -0
  457. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/kinetics.cpp +3180 -0
  458. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/mainsubs.cpp +2320 -0
  459. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/model.cpp +5843 -0
  460. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector.cpp +272 -0
  461. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector.h +485 -0
  462. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector_serial.cpp +1032 -0
  463. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector_serial.h +369 -0
  464. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/parse.cpp +1044 -0
  465. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/phqalloc.cpp +316 -0
  466. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/phqalloc.h +47 -0
  467. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/pitzer.cpp +2709 -0
  468. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/pitzer_structures.cpp +225 -0
  469. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/prep.cpp +6267 -0
  470. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/print.cpp +3673 -0
  471. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/read.cpp +10245 -0
  472. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/readtr.cpp +1495 -0
  473. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/runner.cpp +158 -0
  474. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/runner.h +33 -0
  475. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sit.cpp +1684 -0
  476. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/smalldense.cpp +324 -0
  477. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/smalldense.h +261 -0
  478. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/spread.cpp +1309 -0
  479. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/step.cpp +1566 -0
  480. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/structures.cpp +3381 -0
  481. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialsmath.cpp +133 -0
  482. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialsmath.h +162 -0
  483. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialstypes.h +183 -0
  484. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/tally.cpp +1288 -0
  485. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/tidy.cpp +5600 -0
  486. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/transport.cpp +6403 -0
  487. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/utilities.cpp +1339 -0
  488. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/thread.h +64 -0
  489. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/CMakeLists.txt +133 -0
  490. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/Makefile.am +45 -0
  491. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/Makefile.in +1128 -0
  492. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/ex2.in +26 -0
  493. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main.f90 +31 -0
  494. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main77.f +6 -0
  495. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main_fortran.cxx +8 -0
  496. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/phreeqc.dat.in +1556 -0
  497. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_c.c +148 -0
  498. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_cxx.cxx +152 -0
  499. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_f90.F90 +328 -0
  500. pyEQL/phreeqc/iphreeqc_wrapper.cpp +75 -0
  501. pyEQL/phreeqc/solution.py +74 -0
  502. pyEQL/phreeqc/var.py +50 -0
  503. pyEQL/presets/Ringers lactate.yaml +20 -0
  504. pyEQL/presets/__init__.py +17 -0
  505. pyEQL/presets/normal saline.yaml +17 -0
  506. pyEQL/presets/rainwater.yaml +17 -0
  507. pyEQL/presets/seawater.yaml +29 -0
  508. pyEQL/presets/urine.yaml +26 -0
  509. pyEQL/presets/wastewater.yaml +21 -0
  510. pyEQL/py.typed +0 -0
  511. pyEQL/salt_ion_match.py +112 -0
  512. pyEQL/solute.py +163 -0
  513. pyEQL/solution.py +2714 -0
  514. pyEQL/utils.py +237 -0
  515. pyeql-1.4.0rc9.dist-info/METADATA +130 -0
  516. pyeql-1.4.0rc9.dist-info/RECORD +519 -0
  517. pyeql-1.4.0rc9.dist-info/WHEEL +5 -0
  518. pyeql-1.4.0rc9.dist-info/licenses/AUTHORS.md +21 -0
  519. pyeql-1.4.0rc9.dist-info/licenses/LICENSE.txt +20 -0
@@ -0,0 +1,1331 @@
1
+ // Parser.cpp: implementation of the CParser class.
2
+ //
3
+ //////////////////////////////////////////////////////////////////////
4
+ #ifdef _DEBUG
5
+ #pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
6
+ #endif
7
+
8
+ #include <algorithm> // std::transform
9
+ #include <map> // std::map
10
+ #include <cassert> // assert
11
+ #include <stdlib.h>
12
+ #include <iostream> // std::cout std::cerr
13
+ #include "Utils.h"
14
+ #include <stdio.h>
15
+ #include "Parser.h"
16
+ #include "PHRQ_io.h"
17
+
18
+ #if defined(PHREEQCI_GUI)
19
+ #ifdef _DEBUG
20
+ #define new DEBUG_NEW
21
+ #undef THIS_FILE
22
+ static char THIS_FILE[] = __FILE__;
23
+ #endif
24
+ #endif
25
+
26
+ //////////////////////////////////////////////////////////////////////
27
+ // Construction/Destruction
28
+ //////////////////////////////////////////////////////////////////////
29
+ CParser::CParser(PHRQ_io *io):
30
+ PHRQ_base(io),
31
+ m_input_stream(std::cin),
32
+ m_input_error(0),
33
+ m_next_keyword(Keywords::KEY_NONE)
34
+ {
35
+ if (!io)
36
+ {
37
+ error_msg("This parser constructor requires non-null phrq_io", PHRQ_io::OT_STOP);
38
+ echo_file = EO_ALL;
39
+ echo_stream = EO_NONE;
40
+ accumulate = false;
41
+ phrq_io_only = true;
42
+ m_line_type = PHRQ_io::LT_EMPTY;
43
+ }
44
+ else
45
+ {
46
+ m_line_save = io->Get_m_line();
47
+ m_line = io->Get_m_line();
48
+ m_line_type = io->Get_m_line_type();
49
+ m_line_iss.str(m_line);
50
+ m_line_iss.seekg(0, std::ios_base::beg);
51
+ m_line_iss.clear();
52
+ echo_file = EO_ALL;
53
+ echo_stream = EO_NONE;
54
+ accumulate = false;
55
+ phrq_io_only = true;
56
+ }
57
+ }
58
+
59
+ CParser::CParser(std::istream & input, PHRQ_io *io):
60
+ PHRQ_base(io),
61
+ m_input_stream(input),
62
+ m_input_error(0),
63
+ m_next_keyword(Keywords::KEY_NONE)
64
+ {
65
+ m_line_save.reserve(80);
66
+ m_line.reserve(80);
67
+ echo_file = EO_ALL;
68
+ echo_stream = EO_NONE;
69
+ accumulate = false;
70
+ phrq_io_only = false;
71
+ m_line_type = PHRQ_io::LT_EMPTY;
72
+ }
73
+
74
+ CParser::~CParser()
75
+ {
76
+ }
77
+
78
+ PHRQ_io::LINE_TYPE CParser::check_line(const std::string & str,
79
+ bool allow_empty, bool allow_eof,
80
+ bool allow_keyword, bool print)
81
+ {
82
+ PHRQ_io::LINE_TYPE
83
+ i;
84
+
85
+ // Get line
86
+ do
87
+ {
88
+ i = get_line();
89
+ // reset iss
90
+ m_line_iss.str(m_line);
91
+ m_line_iss.seekg(0, std::ios_base::beg);
92
+ m_line_iss.clear();
93
+
94
+ // output for stream
95
+ switch (this->echo_stream)
96
+ {
97
+ case EO_NONE:
98
+ break;
99
+ case EO_ALL:
100
+ if (i != PHRQ_io::LT_EOF)
101
+ {
102
+ std::ostringstream msg;
103
+ msg << "\t" << m_line_save << "\n";
104
+ //get_output() << msg;
105
+ io->output_msg(msg.str().c_str());
106
+ }
107
+ break;
108
+ case EO_KEYWORDS:
109
+ if (i == PHRQ_io::LT_KEYWORD)
110
+ {
111
+ std::ostringstream msg;
112
+ msg << "\t" << m_line_save << "\n";
113
+ //get_output() << msg;
114
+ io->output_msg(msg.str().c_str());
115
+ }
116
+ break;
117
+ case EO_NOKEYWORDS:
118
+ if (i != PHRQ_io::LT_KEYWORD && i != PHRQ_io::LT_EOF)
119
+ {
120
+ std::ostringstream msg;
121
+ msg << "\t" << m_line_save << "\n";
122
+ //get_output() << msg;
123
+ io->output_msg(msg.str().c_str());
124
+ }
125
+ break;
126
+ }
127
+ // output for file
128
+ switch (this->echo_file)
129
+ {
130
+ case EO_NONE:
131
+ break;
132
+ case EO_ALL:
133
+ if (i != PHRQ_io::LT_EOF)
134
+ {
135
+ std::ostringstream msg;
136
+ msg << "\t" << m_line_save << "\n";
137
+ this->echo_msg(msg.str());
138
+ }
139
+ break;
140
+ case EO_KEYWORDS:
141
+ if (i == PHRQ_io::LT_KEYWORD)
142
+ {
143
+ std::ostringstream msg;
144
+ msg << "\t" << m_line_save << "\n";
145
+ this->echo_msg(msg.str());
146
+ }
147
+ break;
148
+
149
+ case EO_NOKEYWORDS:
150
+ if (i != PHRQ_io::LT_KEYWORD && i != PHRQ_io::LT_EOF)
151
+ {
152
+ std::ostringstream msg;
153
+ msg << "\t" << m_line_save << "\n";
154
+ this->echo_msg(msg.str().c_str());
155
+ }
156
+ break;
157
+ }
158
+ }
159
+ while (i == PHRQ_io::LT_EMPTY && allow_empty == false);
160
+
161
+ // Check eof
162
+ if (i == PHRQ_io::LT_EOF && allow_eof == false)
163
+ {
164
+ std::ostringstream msg;
165
+ msg << "Unexpected eof while reading " << str <<
166
+ "\nExecution terminated.\n";
167
+ error_msg(msg.str().c_str(), PHRQ_io::OT_STOP);
168
+ }
169
+
170
+ // Check keyword
171
+ if (i == PHRQ_io::LT_KEYWORD && allow_keyword == false)
172
+ {
173
+ std::ostringstream msg;
174
+ msg << "Expected data for " << str <<
175
+ ", but got a keyword ending data block.";
176
+ error_msg(msg.str().c_str(), PHRQ_io::OT_CONTINUE);
177
+ incr_input_error();
178
+ }
179
+ m_line_type = i;
180
+ return i;
181
+ }
182
+ PHRQ_io::LINE_TYPE CParser::get_line_phrq_io()
183
+ {
184
+ m_line_type = io->get_line();
185
+ m_line_save = io->Get_m_line_save();
186
+ m_line = io->Get_m_line();
187
+ m_next_keyword = io->Get_m_next_keyword();
188
+ if (accumulate)
189
+ {
190
+ this->accumulated.append(m_line_save);
191
+ this->accumulated.append("\n");
192
+ }
193
+ return m_line_type;
194
+ }
195
+
196
+ PHRQ_io::LINE_TYPE CParser::get_line()
197
+ {
198
+ if (this->phrq_io_only)
199
+ {
200
+ return get_line_phrq_io();
201
+ }
202
+ PHRQ_io::LINE_TYPE return_value = PHRQ_io::LT_EMPTY;
203
+ while (return_value == PHRQ_io::LT_EMPTY)
204
+ {
205
+ //
206
+ // Eliminate all characters after # sign as a comment
207
+ //
208
+
209
+ //
210
+ // Get line, check for eof
211
+ //
212
+ if (get_logical_line() == PHRQ_io::LT_EOF)
213
+ {
214
+ if (!m_input_stream.eof())
215
+ {
216
+ error_msg("Reading input file.", PHRQ_io::OT_CONTINUE);
217
+ error_msg("istream::get() returned an error.", PHRQ_io::OT_STOP);
218
+ }
219
+ else
220
+ {
221
+ //{{MOD
222
+ m_line.erase(m_line.begin(), m_line.end()); // m_line.clear();
223
+ //}}MOD
224
+ m_next_keyword = Keywords::KEY_END;
225
+ return PHRQ_io::LT_EOF;
226
+ }
227
+ }
228
+
229
+ //
230
+ // Get long lines
231
+ //
232
+ bool
233
+ empty = true;
234
+ m_line = m_line_save.substr(0, m_line_save.find_first_of('#'));
235
+ for (unsigned int i = 0; i < m_line.size(); ++i)
236
+ {
237
+ if (!::isspace(m_line[i]))
238
+ {
239
+ empty = false;
240
+ break;
241
+ }
242
+ }
243
+
244
+ if (this->accumulate)
245
+ {
246
+ this->accumulated.append(m_line_save);
247
+ this->accumulated.append("\n");
248
+ }
249
+ //
250
+ // New line character encountered
251
+ //
252
+ return_value = (empty ? PHRQ_io::LT_EMPTY : PHRQ_io::LT_OK);
253
+ }
254
+
255
+ //
256
+ // Determine return_value
257
+ //
258
+ if (return_value == PHRQ_io::LT_OK)
259
+ {
260
+ if (check_key(m_line.begin(), m_line.end()))
261
+ {
262
+ return_value = PHRQ_io::LT_KEYWORD;
263
+ }
264
+ else
265
+ {
266
+ std::string::iterator beg = m_line.begin();
267
+ std::string::iterator end = m_line.end();
268
+ std::string token;
269
+ copy_token(token, beg, end);
270
+
271
+ if (token.size() > 1 && token[0] == '-' &&::isalpha(token[1]))
272
+ {
273
+ return_value = PHRQ_io::LT_OPTION;
274
+ }
275
+ }
276
+ }
277
+ return return_value;
278
+ }
279
+
280
+ /**
281
+ Reads input stream until end of line, ";", or eof
282
+ stores characters in line_save
283
+
284
+ returns:
285
+ EOF on empty line on end of file or
286
+ OK otherwise
287
+ */
288
+ PHRQ_io::LINE_TYPE CParser::get_logical_line()
289
+ {
290
+ int
291
+ j;
292
+ unsigned int
293
+ pos;
294
+ char
295
+ c;
296
+
297
+ m_line_save.erase(m_line_save.begin(), m_line_save.end()); // m_line_save.clear();
298
+
299
+ while ((j = m_input_stream.get()) != std::char_traits < char >::eof())
300
+ {
301
+ c = (char) j;
302
+ if (c == '#')
303
+ {
304
+ // ignore all chars after # until newline
305
+ do
306
+ {
307
+ c = (char) j;
308
+ if (c == '\n')
309
+ {
310
+ break;
311
+ }
312
+ m_line_save += c;
313
+ }
314
+ while ((j =
315
+ m_input_stream.get()) != std::char_traits <
316
+ char >::eof());
317
+ }
318
+ if (c == ';')
319
+ break;
320
+ if (c == '\n')
321
+ {
322
+ break;
323
+ }
324
+ if (c == '\\')
325
+ {
326
+ pos = (int) m_line_save.size();
327
+ m_line_save += c;
328
+ while ((j =
329
+ m_input_stream.get()) != std::char_traits < char >::eof())
330
+ {
331
+ c = (char) j;
332
+ if (c == '\\')
333
+ {
334
+ pos = (int) m_line_save.size();
335
+ m_line_save += c;
336
+ continue;
337
+ }
338
+ if (c == '\n')
339
+ {
340
+ // remove '\\'
341
+ for (; pos < m_line_save.size(); pos++)
342
+ {
343
+ m_line_save[pos] = m_line_save[(size_t) pos + 1];
344
+ }
345
+ m_line_save.erase(m_line_save.size() - 1, 1);
346
+ break;
347
+ }
348
+ m_line_save += c;
349
+ if (!::isspace(j))
350
+ break;
351
+ }
352
+ }
353
+ else
354
+ {
355
+ m_line_save += c;
356
+ }
357
+ }
358
+ if (j == std::char_traits < char >::eof() && m_line_save.size() == 0)
359
+ {
360
+ return (PHRQ_io::LT_EOF);
361
+ }
362
+ return (PHRQ_io::LT_OK);
363
+ }
364
+
365
+ bool
366
+ CParser::check_key(std::string::iterator begin, std::string::iterator end)
367
+ {
368
+ std::string lowercase;
369
+ copy_token(lowercase, begin, end);
370
+ std::transform(lowercase.begin(), lowercase.end(), lowercase.begin(),
371
+ tolower);
372
+ m_next_keyword = Keywords::Keyword_search(lowercase);
373
+ if (m_next_keyword == Keywords::KEY_NONE)
374
+ {
375
+ return false;
376
+ }
377
+ return true;
378
+ }
379
+ CParser::STATUS_TYPE CParser::check_units(std::string & tot_units,
380
+ bool alkalinity,
381
+ bool check_compatibility,
382
+ const std::string & default_units,
383
+ bool print)
384
+ {
385
+ /*
386
+ * Check if legitimate units
387
+ * Input:
388
+ * tot_units character string to check,
389
+ * alkalinity true if alkalinity, false if any other total,
390
+ * check_compatibility true check alk and default units, false otherwise
391
+ * default_units character string of default units (check /L, /kg, etc)
392
+ * print true print warning messages
393
+ * Output:
394
+ * tot_units standard form for unit
395
+ */
396
+ using
397
+ Utilities::str_tolower;
398
+ using
399
+ Utilities::replace;
400
+ using
401
+ Utilities::squeeze_white;
402
+
403
+ static const char *
404
+ units[] = {
405
+ "Mol/l", /* 0 */
406
+ "mMol/l", /* 1 */
407
+ "uMol/l", /* 2 */
408
+ "g/l", /* 3 */
409
+ "mg/l", /* 4 */
410
+ "ug/l", /* 5 */
411
+ "Mol/kgs", /* 6 */
412
+ "mMol/kgs", /* 7 */
413
+ "uMol/kgs", /* 8 */
414
+ "g/kgs", /* 9 = ppt */
415
+ "mg/kgs", /* 10 = ppm */
416
+ "ug/kgs", /* 11 = ppb */
417
+ "Mol/kgw", /* 12 = mol/kg H2O */
418
+ "mMol/kgw", /* 13 = mmol/kg H2O */
419
+ "uMol/kgw", /* 14 = umol/kg H2O */
420
+ "g/kgw", /* 15 = mol/kg H2O */
421
+ "mg/kgw", /* 16 = mmol/kg H2O */
422
+ "ug/kgw", /* 17 = umol/kg H2O */
423
+ "eq/l", /* 18 */
424
+ "meq/l", /* 19 */
425
+ "ueq/l", /* 20 */
426
+ "eq/kgs", /* 21 */
427
+ "meq/kgs", /* 22 */
428
+ "ueq/kgs", /* 23 */
429
+ "eq/kgw", /* 24 */
430
+ "meq/kgw", /* 25 */
431
+ "ueq/kgw", /* 26 */
432
+ };
433
+
434
+ squeeze_white(tot_units);
435
+ str_tolower(tot_units);
436
+ replace("milli", "m", tot_units);
437
+ replace("micro", "u", tot_units);
438
+ replace("grams", "g", tot_units);
439
+ replace("gram", "g", tot_units);
440
+ replace("moles", "Mol", tot_units);
441
+ replace("mole", "Mol", tot_units);
442
+ replace("mol", "Mol", tot_units);
443
+ replace("liter", "l", tot_units);
444
+ replace("kgh", "kgw", tot_units);
445
+ replace("ppt", "g/kgs", tot_units);
446
+ replace("ppm", "mg/kgs", tot_units);
447
+ replace("ppb", "ug/kgs", tot_units);
448
+ replace("equivalents", "eq", tot_units);
449
+ replace("equivalent", "eq", tot_units);
450
+ replace("equiv", "eq", tot_units);
451
+
452
+ std::string::size_type end;
453
+ if ((end = tot_units.find("/l")) != std::string::npos)
454
+ {
455
+ tot_units.resize(end + 2);
456
+ }
457
+ if ((end = tot_units.find("/kgs")) != std::string::npos)
458
+ {
459
+ tot_units.resize(end + 4);
460
+ }
461
+ if ((end = tot_units.find("/kgw")) != std::string::npos)
462
+ {
463
+ tot_units.resize(end + 4);
464
+ }
465
+
466
+ //
467
+ // Check if unit in list
468
+ //
469
+ bool
470
+ found = false;
471
+ for (unsigned int i = 0; i < sizeof(units) / sizeof(char *); ++i)
472
+ {
473
+ if (tot_units.compare(units[i]) == 0)
474
+ {
475
+ found = true;
476
+ break;
477
+ }
478
+ }
479
+ if (!found)
480
+ {
481
+ if (print)
482
+ {
483
+ std::ostringstream err;
484
+ err << "Unknown unit, " << tot_units;
485
+ this->error_msg(err.str().c_str(), PHRQ_io::OT_CONTINUE);
486
+ }
487
+ return PARSER_ERROR;
488
+ }
489
+
490
+ //
491
+ // Check if units are compatible with default_units
492
+ //
493
+ if (check_compatibility == false)
494
+ return PARSER_OK;
495
+
496
+ //
497
+ // Special cases for alkalinity
498
+ //
499
+ if (alkalinity == true && tot_units.find("Mol") != std::string::npos)
500
+ {
501
+ if (print)
502
+ {
503
+ this->warning_msg
504
+ ("Alkalinity given in moles, assumed to be equivalents.");
505
+ }
506
+ replace("Mol", "eq", tot_units);
507
+ }
508
+ if (alkalinity == false && tot_units.find("eq") != std::string::npos)
509
+ {
510
+ if (print)
511
+ {
512
+ this->error_msg("Only alkalinity can be entered in equivalents.",
513
+ PHRQ_io::OT_CONTINUE);
514
+ }
515
+ return PARSER_ERROR;
516
+ }
517
+
518
+ //
519
+ // See if default_units are compatible with tot_units
520
+ //
521
+ if (default_units.find("/l") != std::string::npos
522
+ && tot_units.find("/l") != std::string::npos)
523
+ return PARSER_OK;
524
+ if (default_units.find("/kgs") != std::string::npos
525
+ && tot_units.find("/kgs") != std::string::npos)
526
+ return PARSER_OK;
527
+ if (default_units.find("/kgw") != std::string::npos
528
+ && tot_units.find("/kgw") != std::string::npos)
529
+ return PARSER_OK;
530
+
531
+ std::string str = default_units;
532
+ replace("kgs", "kg solution", str);
533
+ replace("kgs", "kg solution", tot_units);
534
+ replace("kgw", "kg water", str);
535
+ replace("kgw", "kg water", tot_units);
536
+ replace("/l", "/L", str);
537
+ replace("Mol", "mol", str);
538
+ replace("/l", "/L", tot_units);
539
+ replace("Mol", "mol", tot_units);
540
+
541
+ if (print)
542
+ {
543
+ std::ostringstream err;
544
+ err << "Units for master species, " << tot_units <<
545
+ ", are not compatible with default units, " << str << ".";
546
+ this->error_msg(err.str().c_str(), PHRQ_io::OT_CONTINUE);
547
+ }
548
+ return PARSER_ERROR;
549
+ }
550
+ CParser::TOKEN_TYPE CParser::token_type(const std::string & token)
551
+ {
552
+ if (!token.empty())
553
+ {
554
+ if (::isupper(token[0]))
555
+ {
556
+ return CParser::TT_UPPER;
557
+ }
558
+ else if (::islower(token[0]))
559
+ {
560
+ return CParser::TT_LOWER;
561
+ }
562
+ else if (::isdigit(token[0]) || token[0] == '.' || token[0] == '-')
563
+ {
564
+ return CParser::TT_DIGIT;
565
+ }
566
+ else
567
+ {
568
+ assert(!::isspace(token[0]));
569
+ return CParser::TT_UNKNOWN;
570
+ }
571
+ }
572
+ else
573
+ {
574
+ return CParser::TT_EMPTY;
575
+ }
576
+ }
577
+
578
+ CParser::TOKEN_TYPE CParser::peek_token()
579
+ {
580
+ std::istringstream::pos_type pos = m_line_iss.tellg();
581
+ std::string token;
582
+ m_line_iss >> token;
583
+ m_line_iss.seekg(pos);
584
+ return token_type(token);
585
+ }
586
+
587
+ CParser::TOKEN_TYPE CParser::copy_token(std::string & token,
588
+ std::string::iterator & begin,
589
+ std::string::iterator & end)
590
+ {
591
+ if (begin != end)
592
+ {
593
+ std::string::iterator b = begin;
594
+ for (; b < end &&::isspace(*b); ++b);
595
+
596
+ begin = b;
597
+ for (; begin < end && !::isspace(*begin); ++begin);
598
+
599
+ token.assign(b, begin);
600
+ }
601
+ else
602
+ {
603
+ token.resize(0);
604
+ }
605
+
606
+ return token_type(token);
607
+ }
608
+
609
+ CParser::TOKEN_TYPE CParser::copy_token(std::string & token,
610
+ std::istream & is)
611
+ {
612
+ is >> token;
613
+ return token_type(token);
614
+ }
615
+
616
+ CParser::TOKEN_TYPE CParser::copy_token(std::string & token,
617
+ std::istream::pos_type & pos)
618
+ {
619
+ m_line_iss.seekg(pos);
620
+ if (!(m_line_iss >> token))
621
+ {
622
+ token.erase(token.begin(), token.end()); // token.clear();
623
+ }
624
+ pos = m_line_iss.tellg();
625
+ return token_type(token);
626
+ }
627
+
628
+ CParser::FIND_TYPE CParser::find_option(const std::string & item, int *n,
629
+ const std::vector < std::string >
630
+ &list, bool exact)
631
+ {
632
+ std::string token(item);
633
+ std::transform(token.begin(), token.end(), token.begin(), tolower);
634
+ for (unsigned int i = 0; i < list.size(); i++)
635
+ {
636
+ if (exact == true)
637
+ {
638
+ if (list[i].compare(token) == 0)
639
+ {
640
+ *n = i;
641
+ return FT_OK;
642
+ }
643
+ }
644
+ else
645
+ {
646
+ if (list[i].find(token) == 0)
647
+ {
648
+ *n = i;
649
+ return FT_OK;
650
+ }
651
+ }
652
+ }
653
+
654
+ *n = -1;
655
+ return FT_ERROR;
656
+ }
657
+
658
+ int
659
+ CParser::get_option(const std::vector < std::string > &opt_list,
660
+ std::string::iterator & next_char)
661
+ {
662
+ //
663
+ // Read a line and check for options
664
+ //
665
+ int j;
666
+ int /* opt_l, */ opt;
667
+ std::string::iterator opt_ptr;
668
+ std::string option;
669
+
670
+ #if !defined(R_SO)
671
+ fprintf(stderr, "Did not think this get_option was called\n");
672
+ #endif
673
+ //
674
+ // Read line
675
+ //
676
+ PHRQ_io::LINE_TYPE lt = check_line("get_option", false, true, true, true);
677
+ if (lt == PHRQ_io::LT_EOF)
678
+ {
679
+ j = OPT_EOF;
680
+ }
681
+ else if (lt == PHRQ_io::LT_KEYWORD)
682
+ {
683
+ j = OPT_KEYWORD;
684
+ }
685
+ else if (lt == PHRQ_io::LT_OPTION)
686
+ {
687
+ opt_ptr = m_line.begin();
688
+ std::string::iterator end = m_line.end();
689
+ copy_token(option, opt_ptr, end);
690
+ if (find_option(option, &opt, opt_list, false) == CParser::FT_OK)
691
+ {
692
+ j = opt;
693
+ m_line_save.replace(m_line_save.find(option), option.size(),
694
+ opt_list[opt]);
695
+ m_line.replace(m_line.find(option), option.size(), opt_list[opt]);
696
+ opt_ptr = m_line.begin();
697
+ std::string::iterator end = m_line.end();
698
+ copy_token(option, opt_ptr, end);
699
+ next_char = opt_ptr;
700
+ if (true) // pr.echo_input == TRUE
701
+ {
702
+ if (true) // database_file == NULL
703
+ {
704
+ //get_output() << "\t" << m_line_save << "\n";
705
+ std::ostringstream msg;
706
+ msg << "\t" << m_line_save << "\n";
707
+ io->output_msg(msg.str().c_str());
708
+ }
709
+ }
710
+ }
711
+ else
712
+ {
713
+ if (true) // (database_file == NULL)
714
+ {
715
+ //get_output() << "\t" << m_line_save << "\n";
716
+ std::ostringstream msg;
717
+ msg << "\t" << m_line_save << "\n";
718
+ io->output_msg(msg.str().c_str());
719
+ }
720
+
721
+ std::ostringstream err;
722
+ err << "Unknown option." << "\n";
723
+ err << m_line_save << "\n";
724
+ error_msg(err.str().c_str());
725
+
726
+ j = OPT_ERROR;
727
+ next_char = m_line.begin();
728
+ }
729
+ }
730
+ else
731
+ {
732
+ opt_ptr = m_line.begin();
733
+ std::string::iterator end = m_line.end();
734
+ copy_token(option, opt_ptr, end);
735
+ if (find_option(option, &opt, opt_list, true) == FT_OK)
736
+ {
737
+ j = opt;
738
+ next_char = opt_ptr;
739
+ }
740
+ else
741
+ {
742
+ j = OPT_DEFAULT;
743
+ next_char = m_line.begin();
744
+ }
745
+ if (true) // pr.echo_input == TRUE
746
+ {
747
+ if (true) // database_file == NULL
748
+ {
749
+ #if !defined(R_SO)
750
+ std::cout << "\t" << m_line_save << "\n";
751
+ #endif
752
+ }
753
+ }
754
+ }
755
+ return (j);
756
+ }
757
+
758
+ int
759
+ CParser::get_option(const std::vector < std::string > &opt_list,
760
+ std::istream::pos_type & next_pos)
761
+ {
762
+ //
763
+ // Read a line and check for options
764
+ //
765
+ int j;
766
+ int opt;
767
+ std::istream::pos_type pos_ptr;
768
+ std::string option;
769
+
770
+ //
771
+ // Read line
772
+ //
773
+ PHRQ_io::LINE_TYPE lt = check_line("get_option", false, true, true, true);
774
+ if (lt == PHRQ_io::LT_EOF)
775
+ {
776
+ j = OPT_EOF;
777
+ }
778
+ else if (lt == PHRQ_io::LT_KEYWORD)
779
+ {
780
+ j = OPT_KEYWORD;
781
+ }
782
+ else if (lt == PHRQ_io::LT_OPTION)
783
+ {
784
+ std::string::iterator opt_ptr = m_line.begin();
785
+ std::string::iterator end = m_line.end();
786
+ copy_token(option, opt_ptr, end);
787
+ if (find_option(option.substr(1), &opt, opt_list, false) == FT_OK)
788
+ {
789
+ // replace -option with option
790
+ j = opt;
791
+ m_line_save.replace(m_line_save.find(option), option.size(),
792
+ opt_list[opt]);
793
+ m_line.replace(m_line.find(option), option.size(), opt_list[opt]);
794
+
795
+ // reset iss
796
+ m_line_iss.str(m_line);
797
+ m_line_iss.seekg(0, std::ios_base::beg);
798
+ m_line_iss.clear();
799
+
800
+ pos_ptr = 0;
801
+ copy_token(option, pos_ptr);
802
+ next_pos = pos_ptr;
803
+ }
804
+ else
805
+ {
806
+ j = OPT_ERROR;
807
+ next_pos = pos_ptr;
808
+ }
809
+ }
810
+ else
811
+ {
812
+ pos_ptr = m_line_iss.tellg();
813
+ m_line_iss >> option;
814
+ if (find_option(option, &opt, opt_list, true) == FT_OK)
815
+ {
816
+ j = opt;
817
+ next_pos = m_line_iss.tellg();
818
+ }
819
+ else
820
+ {
821
+ j = OPT_DEFAULT;
822
+ m_line_iss.seekg(pos_ptr);
823
+ m_line_iss.clear();
824
+ next_pos = pos_ptr;
825
+ }
826
+ }
827
+ return (j);
828
+ }
829
+ CParser::STATUS_TYPE CParser::get_elt(std::string::iterator & begin,
830
+ const std::string::iterator end,
831
+ std::string & element)
832
+ {
833
+ element.erase(element.begin(), element.end()); // element.clear();
834
+
835
+ if (begin == end)
836
+ {
837
+ error_msg("Empty string in get_elt. Expected an element name.",
838
+ PHRQ_io::OT_CONTINUE);
839
+ return PARSER_ERROR;
840
+ }
841
+
842
+ //
843
+ // Load name into char array element
844
+ //
845
+ char
846
+ c = *begin;
847
+ ++begin;
848
+ element.insert(element.end(), c); // element.push_back(c);
849
+ if (c == '[')
850
+ {
851
+ while ((c = *begin) != ']')
852
+ {
853
+ element.insert(element.end(), c); // element.push_back(c);
854
+ ++begin;
855
+ if ((c = *begin) == ']')
856
+ {
857
+ element.insert(element.end(), c); // element.push_back(c);
858
+ ++begin;
859
+ break;
860
+ }
861
+ else if (begin == end)
862
+ {
863
+ error_msg("No ending bracket (]) for element name",
864
+ PHRQ_io::OT_CONTINUE);
865
+ incr_input_error();
866
+ return PARSER_ERROR;
867
+ }
868
+ }
869
+ while (::islower(c = *begin) || c == '_')
870
+ {
871
+ element.insert(element.end(), c); // element.push_back(c);
872
+ ++begin;
873
+ if (begin == end)
874
+ break;
875
+ }
876
+ }
877
+ else
878
+ {
879
+ while (::islower(c = *begin) || c == '_')
880
+ {
881
+ element.insert(element.end(), c); // element.push_back(c);
882
+ ++begin;
883
+ if (begin == end)
884
+ break;
885
+ }
886
+ }
887
+ return PARSER_OK;
888
+ }
889
+
890
+ CParser::STATUS_TYPE CParser::parse_couple(std::string & token)
891
+ {
892
+ // Parse couple puts redox couples in standard form
893
+ // "+" is removed and couples are rewritten in sort
894
+ // order.
895
+
896
+ if (Utilities::strcmp_nocase_arg1(token.c_str(), "pe") == 0)
897
+ {
898
+ Utilities::str_tolower(token);
899
+ return PARSER_OK;
900
+ }
901
+
902
+ while (Utilities::replace("(+", "(", token));
903
+
904
+ std::string::iterator ptr = token.begin();
905
+ std::string elt1;
906
+ get_elt(ptr, token.end(), elt1);
907
+
908
+ if (*ptr != '(')
909
+ {
910
+ std::ostringstream err_msg;
911
+ err_msg << "Element name must be followed by " <<
912
+ "parentheses in redox couple, " << token << ".";
913
+ error_msg(err_msg.str().c_str(), PHRQ_io::OT_CONTINUE);
914
+ incr_input_error();
915
+ return PARSER_ERROR;
916
+ }
917
+
918
+ int
919
+ paren_count = 1;
920
+ std::string paren1 = "(";
921
+ while (ptr != token.end())
922
+ {
923
+ ++ptr;
924
+ if (*ptr == '/' || ptr == token.end())
925
+ {
926
+ std::ostringstream err_msg;
927
+ err_msg << "End of line or " "/"
928
+ " encountered before end of parentheses, " << token << ".";
929
+ error_msg(err_msg.str().c_str(), PHRQ_io::OT_CONTINUE);
930
+ return PARSER_ERROR;
931
+ }
932
+ paren1.insert(paren1.end(), *ptr); // element.push_back(c);
933
+ if (*ptr == '(')
934
+ ++paren_count;
935
+ if (*ptr == ')')
936
+ --paren_count;
937
+ if (paren_count == 0)
938
+ break;
939
+ }
940
+
941
+ ++ptr;
942
+ if (ptr == token.end() || *ptr != '/')
943
+ {
944
+ std::ostringstream err_msg;
945
+ err_msg << " " "/" " must follow parentheses " <<
946
+ "ending first half of redox couple, " << token << ".";
947
+ error_msg(err_msg.str().c_str(), PHRQ_io::OT_CONTINUE);
948
+ return PARSER_ERROR;
949
+ }
950
+ ++ptr;
951
+ std::string elt2;
952
+ get_elt(ptr, token.end(), elt2);
953
+ if (elt1.compare(elt2) != 0)
954
+ {
955
+ std::ostringstream err_msg;
956
+ err_msg << "Redox couple must be two redox states " <<
957
+ "of the same element, " << token << ".";
958
+ error_msg(err_msg.str().c_str(), PHRQ_io::OT_CONTINUE);
959
+ return PARSER_ERROR;
960
+ }
961
+ if (*ptr != '(')
962
+ {
963
+ std::ostringstream err_msg;
964
+ err_msg << "Element name must be followed by "
965
+ "parentheses in redox couple, " << token << ".";
966
+ error_msg(err_msg.str().c_str(), PHRQ_io::OT_CONTINUE);
967
+ incr_input_error();
968
+ return PARSER_ERROR;
969
+ }
970
+ std::string paren2 = "(";
971
+ paren_count = 1;
972
+
973
+ while (ptr != token.end())
974
+ {
975
+ ++ptr;
976
+ if (*ptr == '/' || ptr == token.end())
977
+ {
978
+ std::ostringstream err_msg;
979
+ err_msg << "End of line or " "/"
980
+ " encountered before end of parentheses, " << token << ".";
981
+ error_msg(err_msg.str().c_str(), PHRQ_io::OT_CONTINUE);
982
+ return PARSER_ERROR;
983
+ }
984
+ paren2.insert(paren2.end(), *ptr); // element.push_back(c);
985
+ if (*ptr == '(')
986
+ ++paren_count;
987
+ if (*ptr == ')')
988
+ --paren_count;
989
+ if (paren_count == 0)
990
+ break;
991
+ }
992
+ if (paren1.compare(paren2) < 0)
993
+ {
994
+ token = elt1 + paren1 + std::string("/") + elt2 + paren2;
995
+ }
996
+ else if (paren1.compare(paren2) > 0)
997
+ {
998
+ token = elt2 + paren2 + std::string("/") + elt1 + paren1;
999
+ }
1000
+ else
1001
+ {
1002
+ std::ostringstream err_msg;
1003
+ err_msg << "Both parts of redox couple are the same, " <<
1004
+ token << ".";
1005
+ error_msg(err_msg.str().c_str(), PHRQ_io::OT_CONTINUE);
1006
+ return PARSER_ERROR;
1007
+ }
1008
+ return PARSER_OK;
1009
+ }
1010
+
1011
+ template <class T>
1012
+ CParser::STATUS_TYPE CParser::addPair(std::map < std::string, T >&totals,
1013
+ std::istream::pos_type & pos)
1014
+ {
1015
+ std::string token;
1016
+ T d;
1017
+ CParser::TOKEN_TYPE j;
1018
+
1019
+ m_line_iss.seekg(pos);
1020
+
1021
+ j = copy_token(token, pos);
1022
+
1023
+ if (j == CParser::TT_EMPTY)
1024
+ return PARSER_OK;
1025
+
1026
+ if (!(m_line_iss >> d))
1027
+ {
1028
+ return PARSER_ERROR;
1029
+ }
1030
+ totals[token] = d;
1031
+ return PARSER_OK;
1032
+ }
1033
+
1034
+ int
1035
+ CParser::getOptionFromLastLine(const std::vector < std::string > &opt_list,
1036
+ std::string::iterator & next_char, bool flag_error)
1037
+ {
1038
+ //
1039
+ // Read a line and check for options
1040
+ //
1041
+ int j;
1042
+ int /* opt_l, */ opt;
1043
+ std::string::iterator opt_ptr;
1044
+ std::string option;
1045
+
1046
+ //
1047
+ // Read line
1048
+ //
1049
+ PHRQ_io::LINE_TYPE lt = m_line_type;
1050
+ if (lt == PHRQ_io::LT_EOF)
1051
+ {
1052
+ j = OPT_EOF;
1053
+ }
1054
+ else if (lt == PHRQ_io::LT_KEYWORD)
1055
+ {
1056
+ j = OPT_KEYWORD;
1057
+ }
1058
+ else if (lt == PHRQ_io::LT_OPTION)
1059
+ {
1060
+ opt_ptr = m_line.begin();
1061
+ std::string::iterator end = m_line.end();
1062
+ copy_token(option, opt_ptr, end);
1063
+ if (find_option(option, &opt, opt_list, false) == CParser::FT_OK)
1064
+ {
1065
+ j = opt;
1066
+ m_line_save.replace(m_line_save.find(option), option.size(),
1067
+ opt_list[opt]);
1068
+ m_line.replace(m_line.find(option), option.size(), opt_list[opt]);
1069
+ opt_ptr = m_line.begin();
1070
+ std::string::iterator end = m_line.end();
1071
+ copy_token(option, opt_ptr, end);
1072
+ next_char = opt_ptr;
1073
+ if (true) // pr.echo_input == TRUE
1074
+ {
1075
+ if (true) // database_file == NULL
1076
+ {
1077
+ std::ostringstream msg;
1078
+ msg << "\t" << m_line_save << "\n";
1079
+ io->output_msg(msg.str().c_str());
1080
+ }
1081
+ }
1082
+ }
1083
+ else
1084
+ {
1085
+ if (flag_error)
1086
+ {
1087
+ if (true) // (database_file == NULL)
1088
+ {
1089
+ std::ostringstream msg;
1090
+ msg << "\t" << m_line_save << "\n";
1091
+ io->output_msg(msg.str().c_str());
1092
+ }
1093
+ std::ostringstream err;
1094
+ err << "Unknown option." << "\n";
1095
+ err << m_line_save << "\n";
1096
+ error_msg(err.str().c_str());
1097
+ }
1098
+ j = OPT_ERROR;
1099
+ next_char = m_line.begin();
1100
+ }
1101
+ }
1102
+ else
1103
+ {
1104
+ opt_ptr = m_line.begin();
1105
+ std::string::iterator end = m_line.end();
1106
+ copy_token(option, opt_ptr, end);
1107
+ if (find_option(option, &opt, opt_list, true) == FT_OK)
1108
+ {
1109
+ j = opt;
1110
+ next_char = opt_ptr;
1111
+ }
1112
+ else
1113
+ {
1114
+ j = OPT_DEFAULT;
1115
+ next_char = m_line.begin();
1116
+ }
1117
+ if (true) // pr.echo_input == TRUE
1118
+ {
1119
+ if (true) // database_file == NULL
1120
+ {
1121
+ #if !defined(R_SO)
1122
+ std::cout << "\t" << m_line_save << "\n";
1123
+ #endif
1124
+ }
1125
+ }
1126
+ }
1127
+ return (j);
1128
+ }
1129
+
1130
+ int
1131
+ CParser::getOptionFromLastLine(const std::vector < std::string > &opt_list,
1132
+ std::istream::pos_type & next_pos, bool flag_error)
1133
+ {
1134
+ //
1135
+ // Read a line and check for options
1136
+ //
1137
+ int j;
1138
+ int opt;
1139
+ std::istream::pos_type pos_ptr;
1140
+ std::string option;
1141
+
1142
+ //
1143
+ // Read line
1144
+ //
1145
+ PHRQ_io::LINE_TYPE lt = m_line_type;
1146
+ if (lt == PHRQ_io::LT_EOF)
1147
+ {
1148
+ j = OPT_EOF;
1149
+ }
1150
+ else if (lt == PHRQ_io::LT_KEYWORD)
1151
+ {
1152
+ j = OPT_KEYWORD;
1153
+ }
1154
+ else if (lt == PHRQ_io::LT_OPTION)
1155
+ {
1156
+ std::string::iterator opt_ptr = m_line.begin();
1157
+ std::string::iterator end = m_line.end();
1158
+ copy_token(option, opt_ptr, end);
1159
+ if (find_option(option.substr(1), &opt, opt_list, false) == FT_OK)
1160
+ {
1161
+ // replace -option with option
1162
+ j = opt;
1163
+ m_line_save.replace(m_line_save.find(option), option.size(),
1164
+ opt_list[opt]);
1165
+ m_line.replace(m_line.find(option), option.size(), opt_list[opt]);
1166
+
1167
+ // reset iss
1168
+ m_line_iss.str(m_line);
1169
+ m_line_iss.seekg(0, std::ios_base::beg);
1170
+ m_line_iss.clear();
1171
+
1172
+ pos_ptr = 0;
1173
+ copy_token(option, pos_ptr);
1174
+ next_pos = pos_ptr;
1175
+ //if (this->echo_file) // pr.echo_input == TRUE
1176
+ if (false)
1177
+ {
1178
+ if (true) // database_file == NULL
1179
+ {
1180
+ std::ostringstream msg;
1181
+ msg << "\t" << m_line_save << "\n";
1182
+ io->output_msg(msg.str().c_str());
1183
+ }
1184
+ }
1185
+ }
1186
+ else
1187
+ {
1188
+ if (flag_error) // don`t throw error
1189
+ {
1190
+ if (true) // (database_file == NULL)
1191
+ {
1192
+ std::ostringstream msg;
1193
+ msg << "\t" << m_line_save << "\n";
1194
+ io->output_msg(msg.str().c_str());
1195
+ }
1196
+ error_msg("Unknown option.", PHRQ_io::OT_CONTINUE);
1197
+ error_msg(m_line_save.c_str(), PHRQ_io::OT_CONTINUE);
1198
+ incr_input_error();
1199
+ }
1200
+ j = OPT_ERROR;
1201
+ next_pos = pos_ptr;
1202
+ }
1203
+ }
1204
+ else
1205
+ {
1206
+ pos_ptr = 0;
1207
+ copy_token(option, pos_ptr);
1208
+ if (find_option(option, &opt, opt_list, true) == FT_OK)
1209
+ {
1210
+ j = opt;
1211
+ next_pos = pos_ptr;
1212
+ }
1213
+ else
1214
+ {
1215
+ j = OPT_DEFAULT;
1216
+ next_pos = 0;
1217
+ }
1218
+ if (true) // pr.echo_input == TRUE
1219
+ {
1220
+ if (true) // database_file == NULL
1221
+ {
1222
+ std::ostringstream msg;
1223
+ msg << "\t" << m_line_save << "\n";
1224
+ io->output_msg(msg.str().c_str());
1225
+ }
1226
+ }
1227
+ }
1228
+ return (j);
1229
+ }
1230
+ int CParser::
1231
+ incr_input_error()
1232
+ {
1233
+ return ++m_input_error;
1234
+ }
1235
+
1236
+ CParser::TOKEN_TYPE CParser::copy_title(std::string & token,
1237
+ std::string::iterator & begin,
1238
+ std::string::iterator & end)
1239
+ {
1240
+ if (begin != end)
1241
+ {
1242
+ std::string::iterator b = begin;
1243
+ std::string::iterator e = end;
1244
+ for (; b < end && (::isspace(*b) || (*b == ',')); ++b);
1245
+ begin = b;
1246
+ if (*begin == '"')
1247
+ {
1248
+ begin = ++b;
1249
+ for (; begin != end && !(*begin == '"'); ++begin);
1250
+ e = begin;
1251
+ if (begin != end && *begin == '"')
1252
+ {
1253
+ e = begin++;
1254
+ }
1255
+ }
1256
+ else if (*begin == '\'')
1257
+ {
1258
+ begin = ++b;
1259
+ for (; begin != end && !(*begin == '\''); ++begin);
1260
+ e = begin;
1261
+ if (begin != end && *begin == '\'')
1262
+ {
1263
+ e = begin++;
1264
+ }
1265
+ }
1266
+ else
1267
+ {
1268
+ for (; begin < end && !(*begin == ',') && !(::isspace(*begin)); ++begin);
1269
+ e = begin;
1270
+ }
1271
+ token.assign(b, e);
1272
+ }
1273
+ else
1274
+ {
1275
+ token.resize(0);
1276
+ }
1277
+ token = trim(token);
1278
+ return token_type(token);
1279
+ }
1280
+ bool CParser::get_true_false(std::istream::pos_type & pos, bool def)
1281
+ {
1282
+ std::string token;
1283
+ this->copy_token(token, pos);
1284
+ std::string::iterator b = token.begin();
1285
+ for (; b != token.end() && (::isspace(*b)); ++b);
1286
+ if (b != token.end())
1287
+ {
1288
+ if (*b == 'f' || *b == 'F')
1289
+ {
1290
+ return false;
1291
+ }
1292
+ else if (*b == 't' || *b == 'T')
1293
+ {
1294
+ return true;
1295
+ }
1296
+ }
1297
+ return def;
1298
+ }
1299
+ CParser::TOKEN_TYPE CParser::get_rest_of_line(std::string &token)
1300
+ {
1301
+ token.clear();
1302
+ int j;
1303
+ while ((j = m_line_iss.get()) != std::char_traits < char >::eof())
1304
+ {
1305
+ char c = (char) j;
1306
+ token += c;
1307
+ }
1308
+ token = trim(token);
1309
+ return token_type(token);
1310
+ }
1311
+ CParser::TOKEN_TYPE CParser::parse_delimited(std::string & source, std::string & result,
1312
+ const std::string& t = " \t")
1313
+ {
1314
+
1315
+ size_t pos = source.find_first_of(t);
1316
+ std::string temp;
1317
+ if (pos != std::string::npos)
1318
+ {
1319
+ result = source.substr(0, pos);
1320
+ temp = source.substr(pos+1);
1321
+ source = temp;
1322
+ }
1323
+ else
1324
+ {
1325
+ result = source;
1326
+ source.clear();
1327
+ }
1328
+ std::string str = result;
1329
+
1330
+ return token_type(trim_left(str));
1331
+ }