duckdb 0.10.2-dev0.0 → 0.10.2-dev3.0

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 (699) hide show
  1. package/binding.gyp +22 -18
  2. package/binding.gyp.in +3 -0
  3. package/package.json +1 -1
  4. package/src/duckdb/extension/icu/icu-timezone.cpp +3 -1
  5. package/src/duckdb/extension/icu/icu_extension.cpp +6 -2
  6. package/src/duckdb/extension/json/buffered_json_reader.cpp +10 -3
  7. package/src/duckdb/extension/json/include/buffered_json_reader.hpp +2 -0
  8. package/src/duckdb/extension/json/include/json_scan.hpp +13 -7
  9. package/src/duckdb/extension/json/include/json_serializer.hpp +5 -4
  10. package/src/duckdb/extension/json/include/json_structure.hpp +3 -3
  11. package/src/duckdb/extension/json/json_functions/json_serialize_plan.cpp +15 -5
  12. package/src/duckdb/extension/json/json_functions/json_serialize_sql.cpp +15 -6
  13. package/src/duckdb/extension/json/json_functions/json_structure.cpp +21 -20
  14. package/src/duckdb/extension/json/json_functions/read_json.cpp +37 -3
  15. package/src/duckdb/extension/json/json_functions.cpp +7 -2
  16. package/src/duckdb/extension/json/json_scan.cpp +57 -33
  17. package/src/duckdb/extension/parquet/column_reader.cpp +12 -3
  18. package/src/duckdb/extension/parquet/column_writer.cpp +44 -7
  19. package/src/duckdb/extension/parquet/include/parquet_writer.hpp +5 -1
  20. package/src/duckdb/extension/parquet/parquet_extension.cpp +30 -3
  21. package/src/duckdb/extension/parquet/parquet_metadata.cpp +1 -1
  22. package/src/duckdb/extension/parquet/parquet_writer.cpp +4 -2
  23. package/src/duckdb/extension/parquet/zstd_file_system.cpp +1 -1
  24. package/src/duckdb/src/catalog/catalog.cpp +5 -1
  25. package/src/duckdb/src/catalog/catalog_entry/duck_schema_entry.cpp +21 -5
  26. package/src/duckdb/src/catalog/catalog_entry/duck_table_entry.cpp +8 -9
  27. package/src/duckdb/src/catalog/catalog_entry/index_catalog_entry.cpp +3 -7
  28. package/src/duckdb/src/catalog/catalog_entry/sequence_catalog_entry.cpp +1 -1
  29. package/src/duckdb/src/catalog/catalog_entry/table_catalog_entry.cpp +6 -7
  30. package/src/duckdb/src/catalog/catalog_entry.cpp +8 -0
  31. package/src/duckdb/src/catalog/catalog_search_path.cpp +5 -0
  32. package/src/duckdb/src/catalog/catalog_set.cpp +2 -2
  33. package/src/duckdb/src/catalog/default/default_functions.cpp +6 -6
  34. package/src/duckdb/src/catalog/default/default_schemas.cpp +1 -1
  35. package/src/duckdb/src/catalog/default/default_views.cpp +7 -7
  36. package/src/duckdb/src/catalog/dependency_catalog_set.cpp +2 -1
  37. package/src/duckdb/src/catalog/dependency_list.cpp +92 -8
  38. package/src/duckdb/src/catalog/dependency_manager.cpp +53 -68
  39. package/src/duckdb/src/catalog/duck_catalog.cpp +1 -1
  40. package/src/duckdb/src/common/adbc/adbc.cpp +287 -45
  41. package/src/duckdb/src/common/arrow/appender/union_data.cpp +2 -2
  42. package/src/duckdb/src/common/box_renderer.cpp +12 -12
  43. package/src/duckdb/src/common/crypto/md5.cpp +2 -1
  44. package/src/duckdb/src/common/enum_util.cpp +307 -1
  45. package/src/duckdb/src/common/enums/expression_type.cpp +4 -0
  46. package/src/duckdb/src/common/enums/optimizer_type.cpp +1 -1
  47. package/src/duckdb/src/common/file_system.cpp +60 -13
  48. package/src/duckdb/src/common/filename_pattern.cpp +13 -13
  49. package/src/duckdb/src/common/gzip_file_system.cpp +1 -1
  50. package/src/duckdb/src/common/http_state.cpp +1 -1
  51. package/src/duckdb/src/common/local_file_system.cpp +72 -71
  52. package/src/duckdb/src/common/multi_file_reader.cpp +48 -28
  53. package/src/duckdb/src/common/row_operations/row_matcher.cpp +2 -2
  54. package/src/duckdb/src/common/serializer/buffered_file_reader.cpp +13 -1
  55. package/src/duckdb/src/common/serializer/buffered_file_writer.cpp +32 -13
  56. package/src/duckdb/src/common/string_util.cpp +2 -3
  57. package/src/duckdb/src/common/tree_renderer.cpp +32 -67
  58. package/src/duckdb/src/common/types/bit.cpp +6 -6
  59. package/src/duckdb/src/common/types/data_chunk.cpp +2 -2
  60. package/src/duckdb/src/common/types/hash.cpp +6 -6
  61. package/src/duckdb/src/common/types/hyperloglog.cpp +2 -0
  62. package/src/duckdb/src/common/types/row/tuple_data_allocator.cpp +13 -0
  63. package/src/duckdb/src/common/types/row/tuple_data_layout.cpp +5 -7
  64. package/src/duckdb/src/common/types/uuid.cpp +1 -1
  65. package/src/duckdb/src/common/types/vector.cpp +22 -14
  66. package/src/duckdb/src/common/types.cpp +8 -1
  67. package/src/duckdb/src/common/vector_operations/comparison_operators.cpp +20 -18
  68. package/src/duckdb/src/common/vector_operations/generators.cpp +1 -1
  69. package/src/duckdb/src/common/vector_operations/is_distinct_from.cpp +267 -110
  70. package/src/duckdb/src/common/vector_operations/vector_hash.cpp +52 -23
  71. package/src/duckdb/src/common/virtual_file_system.cpp +33 -20
  72. package/src/duckdb/src/core_functions/aggregate/algebraic/avg.cpp +2 -2
  73. package/src/duckdb/src/core_functions/aggregate/distributive/minmax.cpp +3 -3
  74. package/src/duckdb/src/core_functions/aggregate/distributive/sum.cpp +31 -16
  75. package/src/duckdb/src/core_functions/aggregate/holistic/quantile.cpp +3 -0
  76. package/src/duckdb/src/core_functions/aggregate/nested/list.cpp +2 -0
  77. package/src/duckdb/src/core_functions/core_functions.cpp +1 -1
  78. package/src/duckdb/src/core_functions/function_list.cpp +2 -2
  79. package/src/duckdb/src/core_functions/scalar/date/time_bucket.cpp +1 -1
  80. package/src/duckdb/src/core_functions/scalar/generic/system_functions.cpp +46 -17
  81. package/src/duckdb/src/core_functions/scalar/list/array_slice.cpp +1 -1
  82. package/src/duckdb/src/core_functions/scalar/list/flatten.cpp +82 -45
  83. package/src/duckdb/src/core_functions/scalar/list/list_aggregates.cpp +2 -2
  84. package/src/duckdb/src/core_functions/scalar/list/list_sort.cpp +3 -0
  85. package/src/duckdb/src/core_functions/scalar/math/numeric.cpp +3 -2
  86. package/src/duckdb/src/core_functions/scalar/string/hex.cpp +2 -4
  87. package/src/duckdb/src/core_functions/scalar/string/repeat.cpp +12 -21
  88. package/src/duckdb/src/execution/column_binding_resolver.cpp +2 -10
  89. package/src/duckdb/src/execution/expression_executor/execute_comparison.cpp +133 -66
  90. package/src/duckdb/src/execution/expression_executor/execute_function.cpp +0 -2
  91. package/src/duckdb/src/execution/expression_executor.cpp +0 -4
  92. package/src/duckdb/src/execution/expression_executor_state.cpp +1 -1
  93. package/src/duckdb/src/execution/index/art/art.cpp +2 -2
  94. package/src/duckdb/src/execution/index/unknown_index.cpp +13 -13
  95. package/src/duckdb/src/execution/join_hashtable.cpp +1 -1
  96. package/src/duckdb/src/execution/nested_loop_join/nested_loop_join_mark.cpp +0 -1
  97. package/src/duckdb/src/execution/operator/csv_scanner/buffer_manager/csv_buffer.cpp +10 -7
  98. package/src/duckdb/src/execution/operator/csv_scanner/buffer_manager/csv_buffer_manager.cpp +32 -1
  99. package/src/duckdb/src/execution/operator/csv_scanner/buffer_manager/csv_file_handle.cpp +16 -2
  100. package/src/duckdb/src/execution/operator/csv_scanner/scanner/scanner_boundary.cpp +7 -7
  101. package/src/duckdb/src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp +354 -159
  102. package/src/duckdb/src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp +11 -2
  103. package/src/duckdb/src/execution/operator/csv_scanner/sniffer/dialect_detection.cpp +22 -7
  104. package/src/duckdb/src/execution/operator/csv_scanner/sniffer/type_detection.cpp +1 -1
  105. package/src/duckdb/src/execution/operator/csv_scanner/state_machine/csv_state_machine_cache.cpp +10 -10
  106. package/src/duckdb/src/execution/operator/csv_scanner/table_function/csv_file_scanner.cpp +9 -18
  107. package/src/duckdb/src/execution/operator/csv_scanner/table_function/global_csv_state.cpp +180 -47
  108. package/src/duckdb/src/execution/operator/csv_scanner/util/csv_error.cpp +100 -58
  109. package/src/duckdb/src/execution/operator/csv_scanner/util/csv_reader_options.cpp +88 -21
  110. package/src/duckdb/src/execution/operator/helper/physical_vacuum.cpp +12 -13
  111. package/src/duckdb/src/execution/operator/join/physical_iejoin.cpp +2 -0
  112. package/src/duckdb/src/execution/operator/persistent/csv_rejects_table.cpp +118 -23
  113. package/src/duckdb/src/execution/operator/persistent/physical_batch_copy_to_file.cpp +2 -2
  114. package/src/duckdb/src/execution/operator/persistent/physical_batch_insert.cpp +14 -5
  115. package/src/duckdb/src/execution/operator/persistent/physical_copy_database.cpp +1 -1
  116. package/src/duckdb/src/execution/operator/persistent/physical_export.cpp +5 -5
  117. package/src/duckdb/src/execution/operator/schema/physical_attach.cpp +1 -1
  118. package/src/duckdb/src/execution/physical_plan/plan_simple.cpp +0 -9
  119. package/src/duckdb/src/execution/physical_plan/plan_vacuum.cpp +18 -0
  120. package/src/duckdb/src/execution/physical_plan_generator.cpp +5 -3
  121. package/src/duckdb/src/execution/radix_partitioned_hashtable.cpp +81 -106
  122. package/src/duckdb/src/execution/reservoir_sample.cpp +1 -1
  123. package/src/duckdb/src/execution/window_executor.cpp +48 -28
  124. package/src/duckdb/src/execution/window_segment_tree.cpp +20 -23
  125. package/src/duckdb/src/function/aggregate/sorted_aggregate_function.cpp +1 -1
  126. package/src/duckdb/src/function/cast/enum_casts.cpp +20 -55
  127. package/src/duckdb/src/function/cast/vector_cast_helpers.cpp +10 -9
  128. package/src/duckdb/src/function/cast_rules.cpp +9 -1
  129. package/src/duckdb/src/function/compression_config.cpp +1 -1
  130. package/src/duckdb/src/function/function_binder.cpp +45 -44
  131. package/src/duckdb/src/function/function_set.cpp +9 -9
  132. package/src/duckdb/src/function/pragma/pragma_queries.cpp +1 -2
  133. package/src/duckdb/src/function/scalar/compressed_materialization/compress_integral.cpp +21 -5
  134. package/src/duckdb/src/function/scalar/compressed_materialization/compress_string.cpp +2 -2
  135. package/src/duckdb/src/function/scalar/list/list_select.cpp +5 -2
  136. package/src/duckdb/src/function/scalar/list/list_zip.cpp +5 -4
  137. package/src/duckdb/src/function/scalar/operators/arithmetic.cpp +60 -32
  138. package/src/duckdb/src/function/scalar/sequence/nextval.cpp +1 -1
  139. package/src/duckdb/src/function/scalar/strftime_format.cpp +31 -25
  140. package/src/duckdb/src/function/scalar/string/caseconvert.cpp +6 -6
  141. package/src/duckdb/src/function/scalar/string/length.cpp +23 -2
  142. package/src/duckdb/src/function/scalar/string/like.cpp +1 -1
  143. package/src/duckdb/src/function/scalar/string/regexp/regexp_extract_all.cpp +1 -1
  144. package/src/duckdb/src/function/scalar/system/aggregate_export.cpp +3 -3
  145. package/src/duckdb/src/function/table/arrow/arrow_array_scan_state.cpp +1 -1
  146. package/src/duckdb/src/function/table/arrow.cpp +7 -1
  147. package/src/duckdb/src/function/table/copy_csv.cpp +17 -13
  148. package/src/duckdb/src/function/table/read_csv.cpp +52 -39
  149. package/src/duckdb/src/function/table/sniff_csv.cpp +7 -13
  150. package/src/duckdb/src/function/table/system/duckdb_constraints.cpp +1 -1
  151. package/src/duckdb/src/function/table/system/duckdb_databases.cpp +7 -1
  152. package/src/duckdb/src/function/table/system/duckdb_extensions.cpp +12 -2
  153. package/src/duckdb/src/function/table/system/duckdb_sequences.cpp +1 -2
  154. package/src/duckdb/src/function/table/system/duckdb_tables.cpp +2 -2
  155. package/src/duckdb/src/function/table/system/pragma_metadata_info.cpp +9 -2
  156. package/src/duckdb/src/function/table/system/pragma_table_info.cpp +10 -6
  157. package/src/duckdb/src/function/table/table_scan.cpp +1 -4
  158. package/src/duckdb/src/function/table/version/pragma_version.cpp +3 -3
  159. package/src/duckdb/src/include/duckdb/catalog/catalog.hpp +6 -2
  160. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/duck_index_entry.hpp +1 -1
  161. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/duck_schema_entry.hpp +1 -1
  162. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/sequence_catalog_entry.hpp +1 -1
  163. package/src/duckdb/src/include/duckdb/catalog/catalog_entry.hpp +6 -1
  164. package/src/duckdb/src/include/duckdb/catalog/catalog_set.hpp +3 -3
  165. package/src/duckdb/src/include/duckdb/catalog/default/default_functions.hpp +3 -3
  166. package/src/duckdb/src/include/duckdb/catalog/dependency.hpp +26 -4
  167. package/src/duckdb/src/include/duckdb/catalog/dependency_list.hpp +39 -6
  168. package/src/duckdb/src/include/duckdb/catalog/dependency_manager.hpp +19 -14
  169. package/src/duckdb/src/include/duckdb/catalog/duck_catalog.hpp +1 -1
  170. package/src/duckdb/src/include/duckdb/catalog/standard_entry.hpp +4 -0
  171. package/src/duckdb/src/include/duckdb/common/allocator.hpp +3 -3
  172. package/src/duckdb/src/include/duckdb/common/arrow/arrow_wrapper.hpp +1 -1
  173. package/src/duckdb/src/include/duckdb/common/bit_utils.hpp +1 -1
  174. package/src/duckdb/src/include/duckdb/common/box_renderer.hpp +16 -16
  175. package/src/duckdb/src/include/duckdb/common/crypto/md5.hpp +0 -1
  176. package/src/duckdb/src/include/duckdb/common/enum_util.hpp +32 -0
  177. package/src/duckdb/src/include/duckdb/common/enums/expression_type.hpp +4 -2
  178. package/src/duckdb/src/include/duckdb/common/exception/binder_exception.hpp +14 -10
  179. package/src/duckdb/src/include/duckdb/common/exception/catalog_exception.hpp +4 -4
  180. package/src/duckdb/src/include/duckdb/common/exception/conversion_exception.hpp +6 -6
  181. package/src/duckdb/src/include/duckdb/common/exception/http_exception.hpp +3 -3
  182. package/src/duckdb/src/include/duckdb/common/exception/parser_exception.hpp +4 -4
  183. package/src/duckdb/src/include/duckdb/common/exception/transaction_exception.hpp +2 -2
  184. package/src/duckdb/src/include/duckdb/common/exception.hpp +57 -58
  185. package/src/duckdb/src/include/duckdb/common/exception_format_value.hpp +2 -2
  186. package/src/duckdb/src/include/duckdb/common/extra_type_info.hpp +2 -2
  187. package/src/duckdb/src/include/duckdb/common/file_open_flags.hpp +134 -0
  188. package/src/duckdb/src/include/duckdb/common/file_opener.hpp +9 -6
  189. package/src/duckdb/src/include/duckdb/common/file_system.hpp +35 -36
  190. package/src/duckdb/src/include/duckdb/common/filename_pattern.hpp +4 -6
  191. package/src/duckdb/src/include/duckdb/common/fixed_size_map.hpp +13 -13
  192. package/src/duckdb/src/include/duckdb/common/helper.hpp +42 -47
  193. package/src/duckdb/src/include/duckdb/common/http_state.hpp +1 -1
  194. package/src/duckdb/src/include/duckdb/common/hugeint.hpp +2 -2
  195. package/src/duckdb/src/include/duckdb/common/index_vector.hpp +10 -10
  196. package/src/duckdb/src/include/duckdb/common/local_file_system.hpp +13 -10
  197. package/src/duckdb/src/include/duckdb/common/memory_safety.hpp +3 -3
  198. package/src/duckdb/src/include/duckdb/common/multi_file_reader_options.hpp +1 -1
  199. package/src/duckdb/src/include/duckdb/common/opener_file_system.hpp +50 -24
  200. package/src/duckdb/src/include/duckdb/common/operator/abs.hpp +12 -4
  201. package/src/duckdb/src/include/duckdb/common/optional_ptr.hpp +5 -5
  202. package/src/duckdb/src/include/duckdb/common/pipe_file_system.hpp +1 -1
  203. package/src/duckdb/src/include/duckdb/common/platform.h +1 -1
  204. package/src/duckdb/src/include/duckdb/common/printer.hpp +5 -5
  205. package/src/duckdb/src/include/duckdb/common/profiler.hpp +2 -2
  206. package/src/duckdb/src/include/duckdb/common/progress_bar/display/terminal_progress_bar_display.hpp +5 -5
  207. package/src/duckdb/src/include/duckdb/common/random_engine.hpp +1 -1
  208. package/src/duckdb/src/include/duckdb/common/re2_regex.hpp +7 -7
  209. package/src/duckdb/src/include/duckdb/common/serializer/buffered_file_reader.hpp +3 -0
  210. package/src/duckdb/src/include/duckdb/common/serializer/buffered_file_writer.hpp +2 -2
  211. package/src/duckdb/src/include/duckdb/common/serializer/deserialization_data.hpp +17 -6
  212. package/src/duckdb/src/include/duckdb/common/serializer/deserializer.hpp +12 -0
  213. package/src/duckdb/src/include/duckdb/common/serializer/serialization_traits.hpp +14 -0
  214. package/src/duckdb/src/include/duckdb/common/serializer/serializer.hpp +16 -0
  215. package/src/duckdb/src/include/duckdb/common/sort/duckdb_pdqsort.hpp +3 -0
  216. package/src/duckdb/src/include/duckdb/common/sort/partition_state.hpp +2 -0
  217. package/src/duckdb/src/include/duckdb/common/string_util.hpp +4 -4
  218. package/src/duckdb/src/include/duckdb/common/tree_renderer.hpp +24 -25
  219. package/src/duckdb/src/include/duckdb/common/typedefs.hpp +5 -5
  220. package/src/duckdb/src/include/duckdb/common/types/cast_helpers.hpp +1 -2
  221. package/src/duckdb/src/include/duckdb/common/types/column/column_data_collection.hpp +10 -10
  222. package/src/duckdb/src/include/duckdb/common/types/column/column_data_collection_iterators.hpp +5 -5
  223. package/src/duckdb/src/include/duckdb/common/types/column/partitioned_column_data.hpp +1 -1
  224. package/src/duckdb/src/include/duckdb/common/types/constraint_conflict_info.hpp +1 -2
  225. package/src/duckdb/src/include/duckdb/common/types/data_chunk.hpp +2 -2
  226. package/src/duckdb/src/include/duckdb/common/types/date.hpp +1 -1
  227. package/src/duckdb/src/include/duckdb/common/types/hash.hpp +5 -5
  228. package/src/duckdb/src/include/duckdb/common/types/hyperloglog.hpp +1 -1
  229. package/src/duckdb/src/include/duckdb/common/types/interval.hpp +4 -4
  230. package/src/duckdb/src/include/duckdb/common/types/row/partitioned_tuple_data.hpp +1 -1
  231. package/src/duckdb/src/include/duckdb/common/types/row/tuple_data_layout.hpp +10 -3
  232. package/src/duckdb/src/include/duckdb/common/types/row/tuple_data_segment.hpp +1 -1
  233. package/src/duckdb/src/include/duckdb/common/types/selection_vector.hpp +12 -12
  234. package/src/duckdb/src/include/duckdb/common/types/string_heap.hpp +1 -1
  235. package/src/duckdb/src/include/duckdb/common/types/string_type.hpp +21 -20
  236. package/src/duckdb/src/include/duckdb/common/types/time.hpp +2 -2
  237. package/src/duckdb/src/include/duckdb/common/types/timestamp.hpp +3 -3
  238. package/src/duckdb/src/include/duckdb/common/types/uuid.hpp +2 -2
  239. package/src/duckdb/src/include/duckdb/common/types/value.hpp +2 -2
  240. package/src/duckdb/src/include/duckdb/common/types/vector.hpp +15 -7
  241. package/src/duckdb/src/include/duckdb/common/types/vector_buffer.hpp +1 -1
  242. package/src/duckdb/src/include/duckdb/common/types.hpp +14 -10
  243. package/src/duckdb/src/include/duckdb/common/uhugeint.hpp +2 -2
  244. package/src/duckdb/src/include/duckdb/common/union_by_name.hpp +1 -1
  245. package/src/duckdb/src/include/duckdb/common/unique_ptr.hpp +15 -14
  246. package/src/duckdb/src/include/duckdb/common/vector.hpp +21 -21
  247. package/src/duckdb/src/include/duckdb/common/vector_operations/aggregate_executor.hpp +2 -0
  248. package/src/duckdb/src/include/duckdb/common/vector_operations/general_cast.hpp +2 -1
  249. package/src/duckdb/src/include/duckdb/common/vector_operations/generic_executor.hpp +2 -3
  250. package/src/duckdb/src/include/duckdb/common/vector_operations/unary_executor.hpp +3 -2
  251. package/src/duckdb/src/include/duckdb/common/vector_operations/vector_operations.hpp +50 -32
  252. package/src/duckdb/src/include/duckdb/common/virtual_file_system.hpp +10 -11
  253. package/src/duckdb/src/include/duckdb/core_functions/aggregate/distributive_functions.hpp +1 -1
  254. package/src/duckdb/src/include/duckdb/core_functions/aggregate/sum_helpers.hpp +13 -1
  255. package/src/duckdb/src/include/duckdb/core_functions/function_list.hpp +1 -1
  256. package/src/duckdb/src/include/duckdb/core_functions/lambda_functions.hpp +2 -1
  257. package/src/duckdb/src/include/duckdb/execution/aggregate_hashtable.hpp +1 -1
  258. package/src/duckdb/src/include/duckdb/execution/column_binding_resolver.hpp +1 -1
  259. package/src/duckdb/src/include/duckdb/execution/expression_executor.hpp +1 -1
  260. package/src/duckdb/src/include/duckdb/execution/expression_executor_state.hpp +2 -5
  261. package/src/duckdb/src/include/duckdb/execution/merge_sort_tree.hpp +3 -3
  262. package/src/duckdb/src/include/duckdb/execution/operator/aggregate/aggregate_object.hpp +2 -2
  263. package/src/duckdb/src/include/duckdb/execution/operator/aggregate/distinct_aggregate_data.hpp +1 -1
  264. package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/base_scanner.hpp +1 -1
  265. package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/column_count_scanner.hpp +0 -3
  266. package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_buffer.hpp +9 -6
  267. package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_buffer_manager.hpp +3 -0
  268. package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_error.hpp +40 -22
  269. package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_file_handle.hpp +5 -0
  270. package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_file_scanner.hpp +1 -0
  271. package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_option.hpp +6 -4
  272. package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_reader_options.hpp +24 -10
  273. package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_state_machine.hpp +4 -0
  274. package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/global_csv_state.hpp +3 -1
  275. package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/skip_scanner.hpp +0 -3
  276. package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/string_value_scanner.hpp +58 -17
  277. package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_batch_collector.hpp +1 -1
  278. package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_explain_analyze.hpp +1 -1
  279. package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_prepare.hpp +3 -3
  280. package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_set.hpp +1 -1
  281. package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_vacuum.hpp +4 -1
  282. package/src/duckdb/src/include/duckdb/execution/operator/persistent/csv_rejects_table.hpp +16 -5
  283. package/src/duckdb/src/include/duckdb/execution/physical_operator_states.hpp +6 -6
  284. package/src/duckdb/src/include/duckdb/execution/physical_plan_generator.hpp +2 -1
  285. package/src/duckdb/src/include/duckdb/execution/window_executor.hpp +1 -1
  286. package/src/duckdb/src/include/duckdb/execution/window_segment_tree.hpp +1 -1
  287. package/src/duckdb/src/include/duckdb/function/aggregate_function.hpp +1 -1
  288. package/src/duckdb/src/include/duckdb/function/cast/cast_function_set.hpp +5 -5
  289. package/src/duckdb/src/include/duckdb/function/cast/default_casts.hpp +4 -4
  290. package/src/duckdb/src/include/duckdb/function/cast/vector_cast_helpers.hpp +6 -6
  291. package/src/duckdb/src/include/duckdb/function/compression_function.hpp +4 -4
  292. package/src/duckdb/src/include/duckdb/function/copy_function.hpp +10 -13
  293. package/src/duckdb/src/include/duckdb/function/function.hpp +3 -3
  294. package/src/duckdb/src/include/duckdb/function/function_binder.hpp +24 -23
  295. package/src/duckdb/src/include/duckdb/function/function_serialization.hpp +1 -1
  296. package/src/duckdb/src/include/duckdb/function/function_set.hpp +1 -1
  297. package/src/duckdb/src/include/duckdb/function/pragma_function.hpp +1 -1
  298. package/src/duckdb/src/include/duckdb/function/scalar/regexp.hpp +3 -3
  299. package/src/duckdb/src/include/duckdb/function/scalar/strftime_format.hpp +7 -7
  300. package/src/duckdb/src/include/duckdb/function/scalar/string_functions.hpp +3 -3
  301. package/src/duckdb/src/include/duckdb/function/scalar_function.hpp +6 -6
  302. package/src/duckdb/src/include/duckdb/function/table/arrow/arrow_duck_schema.hpp +4 -4
  303. package/src/duckdb/src/include/duckdb/function/table/arrow.hpp +2 -2
  304. package/src/duckdb/src/include/duckdb/function/table/read_csv.hpp +1 -3
  305. package/src/duckdb/src/include/duckdb/function/table/table_scan.hpp +1 -1
  306. package/src/duckdb/src/include/duckdb/function/table_function.hpp +12 -11
  307. package/src/duckdb/src/include/duckdb/function/udf_function.hpp +66 -60
  308. package/src/duckdb/src/include/duckdb/main/appender.hpp +6 -6
  309. package/src/duckdb/src/include/duckdb/main/attached_database.hpp +3 -1
  310. package/src/duckdb/src/include/duckdb/main/buffered_data/buffered_data.hpp +2 -2
  311. package/src/duckdb/src/include/duckdb/main/buffered_data/simple_buffered_data.hpp +1 -1
  312. package/src/duckdb/src/include/duckdb/main/capi/capi_internal.hpp +2 -2
  313. package/src/duckdb/src/include/duckdb/main/chunk_scan_state/query_result.hpp +2 -2
  314. package/src/duckdb/src/include/duckdb/main/client_context.hpp +1 -1
  315. package/src/duckdb/src/include/duckdb/main/client_context_file_opener.hpp +3 -2
  316. package/src/duckdb/src/include/duckdb/main/client_data.hpp +1 -0
  317. package/src/duckdb/src/include/duckdb/main/client_properties.hpp +2 -1
  318. package/src/duckdb/src/include/duckdb/main/config.hpp +14 -5
  319. package/src/duckdb/src/include/duckdb/main/connection.hpp +27 -26
  320. package/src/duckdb/src/include/duckdb/main/database.hpp +19 -3
  321. package/src/duckdb/src/include/duckdb/main/database_file_opener.hpp +58 -0
  322. package/src/duckdb/src/include/duckdb/main/database_path_and_type.hpp +2 -2
  323. package/src/duckdb/src/include/duckdb/main/error_manager.hpp +6 -6
  324. package/src/duckdb/src/include/duckdb/main/extension_entries.hpp +8 -0
  325. package/src/duckdb/src/include/duckdb/main/extension_helper.hpp +1 -0
  326. package/src/duckdb/src/include/duckdb/main/external_dependencies.hpp +2 -1
  327. package/src/duckdb/src/include/duckdb/main/prepared_statement.hpp +8 -8
  328. package/src/duckdb/src/include/duckdb/main/query_profiler.hpp +2 -59
  329. package/src/duckdb/src/include/duckdb/main/query_result.hpp +3 -3
  330. package/src/duckdb/src/include/duckdb/main/relation/query_relation.hpp +1 -1
  331. package/src/duckdb/src/include/duckdb/main/relation.hpp +1 -1
  332. package/src/duckdb/src/include/duckdb/main/secret/secret.hpp +11 -7
  333. package/src/duckdb/src/include/duckdb/main/secret/secret_manager.hpp +2 -2
  334. package/src/duckdb/src/include/duckdb/main/secret/secret_storage.hpp +4 -4
  335. package/src/duckdb/src/include/duckdb/main/settings.hpp +78 -70
  336. package/src/duckdb/src/include/duckdb/optimizer/column_lifetime_analyzer.hpp +45 -0
  337. package/src/duckdb/src/include/duckdb/optimizer/compressed_materialization.hpp +11 -13
  338. package/src/duckdb/src/include/duckdb/optimizer/join_order/cardinality_estimator.hpp +2 -2
  339. package/src/duckdb/src/include/duckdb/optimizer/join_order/cost_model.hpp +1 -1
  340. package/src/duckdb/src/include/duckdb/optimizer/join_order/join_node.hpp +1 -1
  341. package/src/duckdb/src/include/duckdb/optimizer/join_order/query_graph.hpp +1 -1
  342. package/src/duckdb/src/include/duckdb/optimizer/join_order/query_graph_manager.hpp +1 -1
  343. package/src/duckdb/src/include/duckdb/optimizer/join_order/relation_manager.hpp +1 -1
  344. package/src/duckdb/src/include/duckdb/optimizer/matcher/expression_matcher.hpp +7 -7
  345. package/src/duckdb/src/include/duckdb/optimizer/matcher/function_matcher.hpp +7 -7
  346. package/src/duckdb/src/include/duckdb/optimizer/matcher/type_matcher.hpp +1 -1
  347. package/src/duckdb/src/include/duckdb/optimizer/optimizer.hpp +3 -0
  348. package/src/duckdb/src/include/duckdb/optimizer/statistics_propagator.hpp +32 -30
  349. package/src/duckdb/src/include/duckdb/optimizer/unnest_rewriter.hpp +1 -1
  350. package/src/duckdb/src/include/duckdb/parallel/event.hpp +1 -1
  351. package/src/duckdb/src/include/duckdb/parallel/executor_task.hpp +1 -1
  352. package/src/duckdb/src/include/duckdb/parallel/interrupt.hpp +2 -2
  353. package/src/duckdb/src/include/duckdb/parallel/pipeline_event.hpp +1 -1
  354. package/src/duckdb/src/include/duckdb/parser/column_list.hpp +4 -4
  355. package/src/duckdb/src/include/duckdb/parser/constraints/unique_constraint.hpp +49 -8
  356. package/src/duckdb/src/include/duckdb/parser/expression/bound_expression.hpp +1 -1
  357. package/src/duckdb/src/include/duckdb/parser/expression/positional_reference_expression.hpp +1 -1
  358. package/src/duckdb/src/include/duckdb/parser/expression/star_expression.hpp +1 -1
  359. package/src/duckdb/src/include/duckdb/parser/parsed_data/alter_scalar_function_info.hpp +1 -1
  360. package/src/duckdb/src/include/duckdb/parser/parsed_data/alter_table_function_info.hpp +1 -1
  361. package/src/duckdb/src/include/duckdb/parser/parsed_data/alter_table_info.hpp +1 -1
  362. package/src/duckdb/src/include/duckdb/parser/parsed_data/copy_database_info.hpp +40 -0
  363. package/src/duckdb/src/include/duckdb/parser/parsed_data/create_function_info.hpp +2 -1
  364. package/src/duckdb/src/include/duckdb/parser/parsed_data/create_index_info.hpp +1 -0
  365. package/src/duckdb/src/include/duckdb/parser/parsed_data/create_info.hpp +2 -1
  366. package/src/duckdb/src/include/duckdb/parser/parsed_data/create_macro_info.hpp +1 -1
  367. package/src/duckdb/src/include/duckdb/parser/parsed_data/create_pragma_function_info.hpp +1 -1
  368. package/src/duckdb/src/include/duckdb/parser/parsed_data/create_secret_info.hpp +2 -2
  369. package/src/duckdb/src/include/duckdb/parser/parsed_data/extra_drop_info.hpp +3 -3
  370. package/src/duckdb/src/include/duckdb/parser/parsed_data/parse_info.hpp +3 -2
  371. package/src/duckdb/src/include/duckdb/parser/parsed_data/vacuum_info.hpp +2 -5
  372. package/src/duckdb/src/include/duckdb/parser/parser.hpp +1 -1
  373. package/src/duckdb/src/include/duckdb/parser/parser_extension.hpp +3 -3
  374. package/src/duckdb/src/include/duckdb/parser/query_error_context.hpp +1 -1
  375. package/src/duckdb/src/include/duckdb/parser/transformer.hpp +3 -5
  376. package/src/duckdb/src/include/duckdb/planner/bind_context.hpp +2 -2
  377. package/src/duckdb/src/include/duckdb/planner/binder.hpp +16 -9
  378. package/src/duckdb/src/include/duckdb/planner/expression/bound_case_expression.hpp +1 -1
  379. package/src/duckdb/src/include/duckdb/planner/expression/bound_cast_expression.hpp +1 -1
  380. package/src/duckdb/src/include/duckdb/planner/expression/bound_default_expression.hpp +1 -1
  381. package/src/duckdb/src/include/duckdb/planner/expression/bound_expanded_expression.hpp +34 -0
  382. package/src/duckdb/src/include/duckdb/planner/expression/bound_subquery_expression.hpp +1 -1
  383. package/src/duckdb/src/include/duckdb/planner/expression.hpp +1 -1
  384. package/src/duckdb/src/include/duckdb/planner/expression_binder/base_select_binder.hpp +5 -8
  385. package/src/duckdb/src/include/duckdb/planner/expression_binder/column_alias_binder.hpp +3 -4
  386. package/src/duckdb/src/include/duckdb/planner/expression_binder/group_binder.hpp +3 -2
  387. package/src/duckdb/src/include/duckdb/planner/expression_binder/having_binder.hpp +3 -5
  388. package/src/duckdb/src/include/duckdb/planner/expression_binder/order_binder.hpp +6 -14
  389. package/src/duckdb/src/include/duckdb/planner/expression_binder/qualify_binder.hpp +3 -6
  390. package/src/duckdb/src/include/duckdb/planner/expression_binder/select_bind_state.hpp +52 -0
  391. package/src/duckdb/src/include/duckdb/planner/expression_binder/select_binder.hpp +4 -10
  392. package/src/duckdb/src/include/duckdb/planner/expression_binder/table_function_binder.hpp +5 -2
  393. package/src/duckdb/src/include/duckdb/planner/expression_binder.hpp +1 -0
  394. package/src/duckdb/src/include/duckdb/planner/expression_iterator.hpp +2 -0
  395. package/src/duckdb/src/include/duckdb/planner/filter/conjunction_filter.hpp +3 -6
  396. package/src/duckdb/src/include/duckdb/planner/logical_operator.hpp +2 -0
  397. package/src/duckdb/src/include/duckdb/planner/logical_tokens.hpp +1 -0
  398. package/src/duckdb/src/include/duckdb/planner/operator/list.hpp +1 -0
  399. package/src/duckdb/src/include/duckdb/planner/operator/logical_copy_database.hpp +4 -12
  400. package/src/duckdb/src/include/duckdb/planner/operator/logical_create_secret.hpp +1 -1
  401. package/src/duckdb/src/include/duckdb/planner/operator/logical_cteref.hpp +2 -2
  402. package/src/duckdb/src/include/duckdb/planner/operator/logical_delim_get.hpp +1 -1
  403. package/src/duckdb/src/include/duckdb/planner/operator/logical_dummy_scan.hpp +1 -1
  404. package/src/duckdb/src/include/duckdb/planner/operator/logical_explain.hpp +1 -1
  405. package/src/duckdb/src/include/duckdb/planner/operator/logical_export.hpp +2 -2
  406. package/src/duckdb/src/include/duckdb/planner/operator/logical_expression_get.hpp +2 -2
  407. package/src/duckdb/src/include/duckdb/planner/operator/logical_extension_operator.hpp +2 -2
  408. package/src/duckdb/src/include/duckdb/planner/operator/logical_materialized_cte.hpp +2 -2
  409. package/src/duckdb/src/include/duckdb/planner/operator/logical_pragma.hpp +1 -1
  410. package/src/duckdb/src/include/duckdb/planner/operator/logical_prepare.hpp +3 -2
  411. package/src/duckdb/src/include/duckdb/planner/operator/logical_recursive_cte.hpp +3 -3
  412. package/src/duckdb/src/include/duckdb/planner/operator/logical_reset.hpp +1 -1
  413. package/src/duckdb/src/include/duckdb/planner/operator/logical_set.hpp +2 -1
  414. package/src/duckdb/src/include/duckdb/planner/operator/logical_vacuum.hpp +52 -0
  415. package/src/duckdb/src/include/duckdb/planner/operator_extension.hpp +1 -1
  416. package/src/duckdb/src/include/duckdb/planner/parsed_data/bound_create_table_info.hpp +2 -2
  417. package/src/duckdb/src/include/duckdb/planner/query_node/bound_select_node.hpp +5 -4
  418. package/src/duckdb/src/include/duckdb/planner/subquery/flatten_dependent_join.hpp +2 -2
  419. package/src/duckdb/src/include/duckdb/storage/arena_allocator.hpp +4 -1
  420. package/src/duckdb/src/include/duckdb/storage/buffer/block_handle.hpp +1 -1
  421. package/src/duckdb/src/include/duckdb/storage/buffer_manager.hpp +3 -3
  422. package/src/duckdb/src/include/duckdb/storage/checkpoint/row_group_writer.hpp +2 -3
  423. package/src/duckdb/src/include/duckdb/storage/checkpoint/string_checkpoint_state.hpp +1 -1
  424. package/src/duckdb/src/include/duckdb/storage/checkpoint/table_data_writer.hpp +3 -3
  425. package/src/duckdb/src/include/duckdb/storage/checkpoint_manager.hpp +5 -5
  426. package/src/duckdb/src/include/duckdb/storage/compression/alp/alp_analyze.hpp +1 -1
  427. package/src/duckdb/src/include/duckdb/storage/compression/alp/alp_compress.hpp +1 -1
  428. package/src/duckdb/src/include/duckdb/storage/compression/alp/alp_fetch.hpp +1 -1
  429. package/src/duckdb/src/include/duckdb/storage/compression/alp/alp_scan.hpp +1 -1
  430. package/src/duckdb/src/include/duckdb/storage/compression/alprd/algorithm/alprd.hpp +3 -3
  431. package/src/duckdb/src/include/duckdb/storage/compression/alprd/alprd_analyze.hpp +2 -2
  432. package/src/duckdb/src/include/duckdb/storage/compression/alprd/alprd_compress.hpp +1 -1
  433. package/src/duckdb/src/include/duckdb/storage/compression/alprd/alprd_fetch.hpp +1 -1
  434. package/src/duckdb/src/include/duckdb/storage/compression/alprd/alprd_scan.hpp +3 -3
  435. package/src/duckdb/src/include/duckdb/storage/compression/chimp/algorithm/flag_buffer.hpp +1 -1
  436. package/src/duckdb/src/include/duckdb/storage/compression/chimp/algorithm/leading_zero_buffer.hpp +3 -3
  437. package/src/duckdb/src/include/duckdb/storage/compression/chimp/chimp.hpp +3 -3
  438. package/src/duckdb/src/include/duckdb/storage/compression/chimp/chimp_analyze.hpp +0 -1
  439. package/src/duckdb/src/include/duckdb/storage/compression/chimp/chimp_fetch.hpp +1 -1
  440. package/src/duckdb/src/include/duckdb/storage/compression/chimp/chimp_scan.hpp +4 -4
  441. package/src/duckdb/src/include/duckdb/storage/compression/patas/patas.hpp +4 -4
  442. package/src/duckdb/src/include/duckdb/storage/compression/patas/patas_analyze.hpp +0 -1
  443. package/src/duckdb/src/include/duckdb/storage/compression/patas/patas_fetch.hpp +1 -1
  444. package/src/duckdb/src/include/duckdb/storage/compression/patas/patas_scan.hpp +3 -3
  445. package/src/duckdb/src/include/duckdb/storage/data_pointer.hpp +1 -1
  446. package/src/duckdb/src/include/duckdb/storage/index.hpp +1 -1
  447. package/src/duckdb/src/include/duckdb/storage/magic_bytes.hpp +1 -1
  448. package/src/duckdb/src/include/duckdb/storage/object_cache.hpp +3 -3
  449. package/src/duckdb/src/include/duckdb/storage/optimistic_data_writer.hpp +1 -1
  450. package/src/duckdb/src/include/duckdb/storage/partial_block_manager.hpp +1 -1
  451. package/src/duckdb/src/include/duckdb/storage/single_file_block_manager.hpp +4 -1
  452. package/src/duckdb/src/include/duckdb/storage/standard_buffer_manager.hpp +24 -24
  453. package/src/duckdb/src/include/duckdb/storage/statistics/numeric_stats_union.hpp +3 -3
  454. package/src/duckdb/src/include/duckdb/storage/statistics/segment_statistics.hpp +2 -2
  455. package/src/duckdb/src/include/duckdb/storage/storage_info.hpp +2 -2
  456. package/src/duckdb/src/include/duckdb/storage/storage_manager.hpp +4 -4
  457. package/src/duckdb/src/include/duckdb/storage/string_uncompressed.hpp +9 -6
  458. package/src/duckdb/src/include/duckdb/storage/table/append_state.hpp +1 -1
  459. package/src/duckdb/src/include/duckdb/storage/table/chunk_info.hpp +2 -2
  460. package/src/duckdb/src/include/duckdb/storage/table/column_checkpoint_state.hpp +1 -1
  461. package/src/duckdb/src/include/duckdb/storage/table/column_data.hpp +10 -1
  462. package/src/duckdb/src/include/duckdb/storage/table/data_table_info.hpp +3 -2
  463. package/src/duckdb/src/include/duckdb/storage/table/row_group.hpp +1 -1
  464. package/src/duckdb/src/include/duckdb/storage/table/row_group_segment_tree.hpp +1 -1
  465. package/src/duckdb/src/include/duckdb/storage/table/row_version_manager.hpp +2 -1
  466. package/src/duckdb/src/include/duckdb/storage/table/scan_state.hpp +3 -3
  467. package/src/duckdb/src/include/duckdb/storage/table/segment_lock.hpp +1 -1
  468. package/src/duckdb/src/include/duckdb/storage/table/segment_tree.hpp +4 -4
  469. package/src/duckdb/src/include/duckdb/storage/table/standard_column_data.hpp +2 -0
  470. package/src/duckdb/src/include/duckdb/storage/table/table_index_list.hpp +3 -2
  471. package/src/duckdb/src/include/duckdb/storage/table/table_statistics.hpp +1 -1
  472. package/src/duckdb/src/include/duckdb/storage/table/update_segment.hpp +1 -1
  473. package/src/duckdb/src/include/duckdb/storage/table_storage_info.hpp +2 -1
  474. package/src/duckdb/src/include/duckdb/storage/write_ahead_log.hpp +1 -1
  475. package/src/duckdb/src/include/duckdb/transaction/delete_info.hpp +20 -1
  476. package/src/duckdb/src/include/duckdb/transaction/transaction.hpp +1 -1
  477. package/src/duckdb/src/include/duckdb/transaction/transaction_data.hpp +1 -1
  478. package/src/duckdb/src/include/duckdb/transaction/undo_buffer.hpp +1 -1
  479. package/src/duckdb/src/include/duckdb/transaction/update_info.hpp +1 -1
  480. package/src/duckdb/src/main/appender.cpp +1 -1
  481. package/src/duckdb/src/main/attached_database.cpp +11 -3
  482. package/src/duckdb/src/main/capi/arrow-c.cpp +6 -2
  483. package/src/duckdb/src/main/capi/cast/utils-c.cpp +1 -1
  484. package/src/duckdb/src/main/capi/duckdb-c.cpp +1 -1
  485. package/src/duckdb/src/main/capi/pending-c.cpp +1 -1
  486. package/src/duckdb/src/main/capi/prepared-c.cpp +2 -2
  487. package/src/duckdb/src/main/capi/result-c.cpp +4 -4
  488. package/src/duckdb/src/main/client_context.cpp +4 -12
  489. package/src/duckdb/src/main/client_context_file_opener.cpp +15 -3
  490. package/src/duckdb/src/main/client_data.cpp +5 -0
  491. package/src/duckdb/src/main/config.cpp +82 -82
  492. package/src/duckdb/src/main/database.cpp +31 -7
  493. package/src/duckdb/src/main/database_manager.cpp +3 -2
  494. package/src/duckdb/src/main/database_path_and_type.cpp +4 -4
  495. package/src/duckdb/src/main/error_manager.cpp +1 -1
  496. package/src/duckdb/src/main/extension/extension_alias.cpp +9 -9
  497. package/src/duckdb/src/main/extension/extension_helper.cpp +10 -5
  498. package/src/duckdb/src/main/extension/extension_install.cpp +1 -1
  499. package/src/duckdb/src/main/extension/extension_load.cpp +111 -37
  500. package/src/duckdb/src/main/query_profiler.cpp +1 -118
  501. package/src/duckdb/src/main/secret/secret_manager.cpp +1 -2
  502. package/src/duckdb/src/main/secret/secret_storage.cpp +1 -1
  503. package/src/duckdb/src/main/settings/settings.cpp +81 -65
  504. package/src/duckdb/src/optimizer/column_lifetime_analyzer.cpp +8 -1
  505. package/src/duckdb/src/optimizer/compressed_materialization/compress_aggregate.cpp +3 -0
  506. package/src/duckdb/src/optimizer/compressed_materialization.cpp +26 -28
  507. package/src/duckdb/src/optimizer/cse_optimizer.cpp +5 -5
  508. package/src/duckdb/src/optimizer/join_order/cardinality_estimator.cpp +10 -6
  509. package/src/duckdb/src/optimizer/optimizer.cpp +14 -17
  510. package/src/duckdb/src/optimizer/pushdown/pushdown_cross_product.cpp +16 -5
  511. package/src/duckdb/src/optimizer/pushdown/pushdown_inner_join.cpp +7 -4
  512. package/src/duckdb/src/optimizer/pushdown/pushdown_set_operation.cpp +2 -2
  513. package/src/duckdb/src/optimizer/remove_unused_columns.cpp +3 -3
  514. package/src/duckdb/src/optimizer/rule/ordered_aggregate_optimizer.cpp +2 -2
  515. package/src/duckdb/src/optimizer/statistics/expression/propagate_aggregate.cpp +1 -1
  516. package/src/duckdb/src/optimizer/statistics/expression/propagate_between.cpp +8 -8
  517. package/src/duckdb/src/optimizer/statistics/expression/propagate_case.cpp +1 -1
  518. package/src/duckdb/src/optimizer/statistics/expression/propagate_cast.cpp +1 -1
  519. package/src/duckdb/src/optimizer/statistics/expression/propagate_columnref.cpp +1 -1
  520. package/src/duckdb/src/optimizer/statistics/expression/propagate_comparison.cpp +7 -7
  521. package/src/duckdb/src/optimizer/statistics/expression/propagate_conjunction.cpp +6 -6
  522. package/src/duckdb/src/optimizer/statistics/expression/propagate_constant.cpp +1 -1
  523. package/src/duckdb/src/optimizer/statistics/expression/propagate_function.cpp +2 -2
  524. package/src/duckdb/src/optimizer/statistics/expression/propagate_operator.cpp +10 -10
  525. package/src/duckdb/src/optimizer/statistics/operator/propagate_aggregate.cpp +1 -1
  526. package/src/duckdb/src/optimizer/statistics/operator/propagate_cross_product.cpp +1 -1
  527. package/src/duckdb/src/optimizer/statistics/operator/propagate_filter.cpp +14 -7
  528. package/src/duckdb/src/optimizer/statistics/operator/propagate_get.cpp +2 -2
  529. package/src/duckdb/src/optimizer/statistics/operator/propagate_join.cpp +9 -9
  530. package/src/duckdb/src/optimizer/statistics/operator/propagate_limit.cpp +1 -1
  531. package/src/duckdb/src/optimizer/statistics/operator/propagate_order.cpp +1 -1
  532. package/src/duckdb/src/optimizer/statistics/operator/propagate_projection.cpp +2 -2
  533. package/src/duckdb/src/optimizer/statistics/operator/propagate_set_operation.cpp +1 -1
  534. package/src/duckdb/src/optimizer/statistics/operator/propagate_window.cpp +1 -1
  535. package/src/duckdb/src/optimizer/statistics_propagator.cpp +39 -18
  536. package/src/duckdb/src/parallel/pipeline_finish_event.cpp +1 -1
  537. package/src/duckdb/src/parallel/task_scheduler.cpp +8 -1
  538. package/src/duckdb/src/parser/constraints/unique_constraint.cpp +4 -2
  539. package/src/duckdb/src/parser/parsed_data/create_index_info.cpp +64 -0
  540. package/src/duckdb/src/parser/parsed_data/vacuum_info.cpp +1 -0
  541. package/src/duckdb/src/parser/transform/expression/transform_function.cpp +13 -5
  542. package/src/duckdb/src/parser/transform/expression/transform_subquery.cpp +24 -0
  543. package/src/duckdb/src/parser/transform/helpers/transform_cte.cpp +1 -8
  544. package/src/duckdb/src/parser/transform/statement/transform_create_function.cpp +2 -1
  545. package/src/duckdb/src/parser/transform/statement/transform_create_index.cpp +3 -0
  546. package/src/duckdb/src/parser/transform/statement/transform_delete.cpp +2 -6
  547. package/src/duckdb/src/parser/transform/statement/transform_insert.cpp +2 -6
  548. package/src/duckdb/src/parser/transform/statement/transform_pivot_stmt.cpp +2 -6
  549. package/src/duckdb/src/parser/transform/statement/transform_pragma.cpp +1 -1
  550. package/src/duckdb/src/parser/transform/statement/transform_select.cpp +5 -2
  551. package/src/duckdb/src/parser/transform/statement/transform_select_node.cpp +2 -8
  552. package/src/duckdb/src/parser/transform/statement/transform_update.cpp +1 -6
  553. package/src/duckdb/src/parser/transform/statement/transform_use.cpp +3 -2
  554. package/src/duckdb/src/parser/transformer.cpp +14 -2
  555. package/src/duckdb/src/planner/binder/expression/bind_aggregate_expression.cpp +40 -17
  556. package/src/duckdb/src/planner/binder/expression/bind_unnest_expression.cpp +8 -3
  557. package/src/duckdb/src/planner/binder/expression/bind_window_expression.cpp +32 -30
  558. package/src/duckdb/src/planner/binder/query_node/bind_cte_node.cpp +28 -17
  559. package/src/duckdb/src/planner/binder/query_node/bind_select_node.cpp +146 -101
  560. package/src/duckdb/src/planner/binder/query_node/bind_setop_node.cpp +28 -26
  561. package/src/duckdb/src/planner/binder/query_node/plan_cte_node.cpp +29 -0
  562. package/src/duckdb/src/planner/binder/query_node/plan_subquery.cpp +10 -10
  563. package/src/duckdb/src/planner/binder/statement/bind_copy.cpp +3 -2
  564. package/src/duckdb/src/planner/binder/statement/bind_copy_database.cpp +23 -28
  565. package/src/duckdb/src/planner/binder/statement/bind_create.cpp +11 -12
  566. package/src/duckdb/src/planner/binder/statement/bind_create_table.cpp +9 -11
  567. package/src/duckdb/src/planner/binder/statement/bind_insert.cpp +10 -13
  568. package/src/duckdb/src/planner/binder/statement/bind_pragma.cpp +3 -3
  569. package/src/duckdb/src/planner/binder/statement/bind_set.cpp +3 -0
  570. package/src/duckdb/src/planner/binder/statement/bind_vacuum.cpp +66 -65
  571. package/src/duckdb/src/planner/binder/tableref/bind_basetableref.cpp +54 -46
  572. package/src/duckdb/src/planner/binder/tableref/bind_pivot.cpp +3 -0
  573. package/src/duckdb/src/planner/binder/tableref/bind_subqueryref.cpp +1 -1
  574. package/src/duckdb/src/planner/binder/tableref/bind_table_function.cpp +5 -5
  575. package/src/duckdb/src/planner/binder.cpp +78 -6
  576. package/src/duckdb/src/planner/expression/bound_cast_expression.cpp +11 -3
  577. package/src/duckdb/src/planner/expression/bound_expanded_expression.cpp +22 -0
  578. package/src/duckdb/src/planner/expression_binder/base_select_binder.cpp +11 -58
  579. package/src/duckdb/src/planner/expression_binder/column_alias_binder.cpp +5 -8
  580. package/src/duckdb/src/planner/expression_binder/group_binder.cpp +5 -4
  581. package/src/duckdb/src/planner/expression_binder/having_binder.cpp +5 -19
  582. package/src/duckdb/src/planner/expression_binder/lateral_binder.cpp +8 -8
  583. package/src/duckdb/src/planner/expression_binder/order_binder.cpp +42 -26
  584. package/src/duckdb/src/planner/expression_binder/qualify_binder.cpp +3 -22
  585. package/src/duckdb/src/planner/expression_binder/select_bind_state.cpp +52 -0
  586. package/src/duckdb/src/planner/expression_binder/select_binder.cpp +43 -5
  587. package/src/duckdb/src/planner/expression_binder/table_function_binder.cpp +19 -7
  588. package/src/duckdb/src/planner/logical_operator.cpp +20 -3
  589. package/src/duckdb/src/planner/operator/logical_copy_database.cpp +4 -14
  590. package/src/duckdb/src/planner/operator/logical_delete.cpp +1 -1
  591. package/src/duckdb/src/planner/operator/logical_get.cpp +1 -1
  592. package/src/duckdb/src/planner/operator/logical_insert.cpp +1 -1
  593. package/src/duckdb/src/planner/operator/logical_update.cpp +1 -1
  594. package/src/duckdb/src/planner/operator/logical_vacuum.cpp +65 -0
  595. package/src/duckdb/src/planner/planner.cpp +4 -4
  596. package/src/duckdb/src/planner/subquery/flatten_dependent_join.cpp +26 -27
  597. package/src/duckdb/src/storage/arena_allocator.cpp +9 -0
  598. package/src/duckdb/src/storage/buffer/buffer_pool_reservation.cpp +1 -1
  599. package/src/duckdb/src/storage/buffer_manager.cpp +2 -10
  600. package/src/duckdb/src/storage/checkpoint/table_data_writer.cpp +2 -3
  601. package/src/duckdb/src/storage/checkpoint_manager.cpp +15 -8
  602. package/src/duckdb/src/storage/compression/bitpacking.cpp +6 -1
  603. package/src/duckdb/src/storage/compression/string_uncompressed.cpp +1 -1
  604. package/src/duckdb/src/storage/data_pointer.cpp +1 -1
  605. package/src/duckdb/src/storage/data_table.cpp +18 -7
  606. package/src/duckdb/src/storage/local_storage.cpp +8 -5
  607. package/src/duckdb/src/storage/magic_bytes.cpp +6 -5
  608. package/src/duckdb/src/storage/partial_block_manager.cpp +1 -1
  609. package/src/duckdb/src/storage/serialization/serialize_logical_operator.cpp +20 -9
  610. package/src/duckdb/src/storage/serialization/serialize_nodes.cpp +12 -10
  611. package/src/duckdb/src/storage/serialization/serialize_parse_info.cpp +23 -0
  612. package/src/duckdb/src/storage/single_file_block_manager.cpp +46 -19
  613. package/src/duckdb/src/storage/standard_buffer_manager.cpp +21 -5
  614. package/src/duckdb/src/storage/statistics/array_stats.cpp +1 -1
  615. package/src/duckdb/src/storage/statistics/base_statistics.cpp +2 -3
  616. package/src/duckdb/src/storage/statistics/list_stats.cpp +1 -1
  617. package/src/duckdb/src/storage/statistics/struct_stats.cpp +1 -1
  618. package/src/duckdb/src/storage/storage_info.cpp +19 -19
  619. package/src/duckdb/src/storage/storage_manager.cpp +18 -13
  620. package/src/duckdb/src/storage/table/chunk_info.cpp +11 -3
  621. package/src/duckdb/src/storage/table/column_data.cpp +88 -66
  622. package/src/duckdb/src/storage/table/row_group.cpp +7 -7
  623. package/src/duckdb/src/storage/table/row_version_manager.cpp +2 -2
  624. package/src/duckdb/src/storage/table/standard_column_data.cpp +4 -0
  625. package/src/duckdb/src/storage/table/update_segment.cpp +3 -1
  626. package/src/duckdb/src/storage/table_index_list.cpp +6 -1
  627. package/src/duckdb/src/storage/temporary_file_manager.cpp +1 -1
  628. package/src/duckdb/src/storage/wal_replay.cpp +8 -7
  629. package/src/duckdb/src/storage/write_ahead_log.cpp +3 -4
  630. package/src/duckdb/src/transaction/cleanup_state.cpp +10 -3
  631. package/src/duckdb/src/transaction/commit_state.cpp +11 -4
  632. package/src/duckdb/src/transaction/duck_transaction.cpp +23 -3
  633. package/src/duckdb/src/transaction/rollback_state.cpp +1 -1
  634. package/src/duckdb/src/transaction/transaction_context.cpp +1 -1
  635. package/src/duckdb/src/transaction/undo_buffer.cpp +3 -1
  636. package/src/duckdb/third_party/fmt/include/fmt/core.h +0 -5
  637. package/src/duckdb/third_party/fsst/fsst.h +1 -1
  638. package/src/duckdb/third_party/fsst/libfsst.cpp +1 -140
  639. package/src/duckdb/third_party/fsst/libfsst.hpp +0 -13
  640. package/src/duckdb/third_party/hyperloglog/hyperloglog.hpp +4 -0
  641. package/src/duckdb/third_party/libpg_query/include/nodes/parsenodes.hpp +8 -1
  642. package/src/duckdb/third_party/libpg_query/include/parser/gram.hpp +2 -1
  643. package/src/duckdb/third_party/libpg_query/src_backend_parser_gram.cpp +15401 -15354
  644. package/src/duckdb/third_party/libpg_query/src_backend_parser_scan.cpp +299 -538
  645. package/src/duckdb/third_party/lz4/lz4.cpp +2605 -0
  646. package/src/duckdb/third_party/lz4/lz4.hpp +843 -0
  647. package/src/duckdb/third_party/parquet/parquet_types.cpp +3 -0
  648. package/src/duckdb/third_party/parquet/parquet_types.h +2 -1
  649. package/src/duckdb/third_party/re2/re2/bitmap256.cc +44 -0
  650. package/src/duckdb/third_party/re2/re2/bitmap256.h +3 -35
  651. package/src/duckdb/third_party/re2/re2/bitstate.cc +31 -24
  652. package/src/duckdb/third_party/re2/re2/compile.cc +146 -164
  653. package/src/duckdb/third_party/re2/re2/dfa.cc +174 -181
  654. package/src/duckdb/third_party/re2/re2/filtered_re2.cc +19 -3
  655. package/src/duckdb/third_party/re2/re2/filtered_re2.h +27 -23
  656. package/src/duckdb/third_party/re2/re2/mimics_pcre.cc +21 -11
  657. package/src/duckdb/third_party/re2/re2/nfa.cc +91 -131
  658. package/src/duckdb/third_party/re2/re2/onepass.cc +11 -10
  659. package/src/duckdb/third_party/re2/re2/parse.cc +171 -154
  660. package/src/duckdb/third_party/re2/re2/perl_groups.cc +35 -35
  661. package/src/duckdb/third_party/re2/re2/pod_array.h +55 -0
  662. package/src/duckdb/third_party/re2/re2/prefilter.cc +40 -40
  663. package/src/duckdb/third_party/re2/re2/prefilter.h +24 -2
  664. package/src/duckdb/third_party/re2/re2/prefilter_tree.cc +70 -84
  665. package/src/duckdb/third_party/re2/re2/prefilter_tree.h +5 -4
  666. package/src/duckdb/third_party/re2/re2/prog.cc +315 -58
  667. package/src/duckdb/third_party/re2/re2/prog.h +77 -44
  668. package/src/duckdb/third_party/re2/re2/re2.cc +333 -221
  669. package/src/duckdb/third_party/re2/re2/re2.h +277 -201
  670. package/src/duckdb/third_party/re2/re2/regexp.cc +137 -105
  671. package/src/duckdb/third_party/re2/re2/regexp.h +45 -40
  672. package/src/duckdb/third_party/re2/re2/set.cc +40 -17
  673. package/src/duckdb/third_party/re2/re2/set.h +11 -6
  674. package/src/duckdb/third_party/re2/re2/simplify.cc +50 -41
  675. package/src/duckdb/third_party/re2/re2/sparse_array.h +392 -0
  676. package/src/duckdb/third_party/re2/re2/sparse_set.h +264 -0
  677. package/src/duckdb/third_party/re2/re2/stringpiece.cc +1 -1
  678. package/src/duckdb/third_party/re2/re2/stringpiece.h +11 -8
  679. package/src/duckdb/third_party/re2/re2/tostring.cc +8 -6
  680. package/src/duckdb/third_party/re2/re2/unicode_casefold.cc +39 -10
  681. package/src/duckdb/third_party/re2/re2/unicode_casefold.h +1 -1
  682. package/src/duckdb/third_party/re2/re2/unicode_groups.cc +5019 -4566
  683. package/src/duckdb/third_party/re2/re2/unicode_groups.h +1 -1
  684. package/src/duckdb/third_party/re2/re2/walker-inl.h +21 -20
  685. package/src/duckdb/third_party/re2/util/logging.h +14 -18
  686. package/src/duckdb/third_party/re2/util/mix.h +4 -4
  687. package/src/duckdb/third_party/re2/util/mutex.h +48 -15
  688. package/src/duckdb/third_party/re2/util/rune.cc +5 -5
  689. package/src/duckdb/third_party/re2/util/strutil.cc +1 -16
  690. package/src/duckdb/third_party/re2/util/strutil.h +1 -3
  691. package/src/duckdb/third_party/re2/util/utf.h +1 -1
  692. package/src/duckdb/third_party/re2/util/util.h +9 -1
  693. package/src/duckdb/third_party/utf8proc/include/utf8proc_wrapper.hpp +2 -0
  694. package/src/duckdb/third_party/utf8proc/utf8proc_wrapper.cpp +36 -1
  695. package/src/duckdb/ub_src_common.cpp +0 -2
  696. package/src/duckdb/ub_src_execution_physical_plan.cpp +2 -0
  697. package/src/duckdb/ub_src_planner_expression.cpp +2 -0
  698. package/src/duckdb/ub_src_planner_expression_binder.cpp +2 -0
  699. package/src/duckdb/ub_src_planner_operator.cpp +2 -0
@@ -1,4 +1,5 @@
1
- #line 1 "third_party/libpg_query/src_backend_parser_scan.cpp"
1
+ #line 2 "third_party/libpg_query/src_backend_parser_scan.cpp"
2
+ #line 2 "third_party/libpg_query/scan.l"
2
3
  /*-------------------------------------------------------------------------
3
4
  *
4
5
  * scan.l
@@ -40,7 +41,10 @@
40
41
 
41
42
  #include <stdexcept>
42
43
 
43
- #line 43 "third_party/libpg_query/src_backend_parser_scan.cpp"
44
+
45
+
46
+
47
+ #line 48 "third_party/libpg_query/src_backend_parser_scan.cpp"
44
48
 
45
49
  #define YY_INT_ALIGNED short int
46
50
 
@@ -48,246 +52,12 @@
48
52
 
49
53
  #define FLEX_SCANNER
50
54
  #define YY_FLEX_MAJOR_VERSION 2
51
- #define YY_FLEX_MINOR_VERSION 6
52
- #define YY_FLEX_SUBMINOR_VERSION 4
55
+ #define YY_FLEX_MINOR_VERSION 5
56
+ #define YY_FLEX_SUBMINOR_VERSION 35
53
57
  #if YY_FLEX_SUBMINOR_VERSION > 0
54
58
  #define FLEX_BETA
55
59
  #endif
56
60
 
57
- #ifdef yy_create_buffer
58
- #define core_yy_create_buffer_ALREADY_DEFINED
59
- #else
60
- #define yy_create_buffer core_yy_create_buffer
61
- #endif
62
-
63
- #ifdef yy_delete_buffer
64
- #define core_yy_delete_buffer_ALREADY_DEFINED
65
- #else
66
- #define yy_delete_buffer core_yy_delete_buffer
67
- #endif
68
-
69
- #ifdef yy_scan_buffer
70
- #define core_yy_scan_buffer_ALREADY_DEFINED
71
- #else
72
- #define yy_scan_buffer core_yy_scan_buffer
73
- #endif
74
-
75
- #ifdef yy_scan_string
76
- #define core_yy_scan_string_ALREADY_DEFINED
77
- #else
78
- #define yy_scan_string core_yy_scan_string
79
- #endif
80
-
81
- #ifdef yy_scan_bytes
82
- #define core_yy_scan_bytes_ALREADY_DEFINED
83
- #else
84
- #define yy_scan_bytes core_yy_scan_bytes
85
- #endif
86
-
87
- #ifdef yy_init_buffer
88
- #define core_yy_init_buffer_ALREADY_DEFINED
89
- #else
90
- #define yy_init_buffer core_yy_init_buffer
91
- #endif
92
-
93
- #ifdef yy_flush_buffer
94
- #define core_yy_flush_buffer_ALREADY_DEFINED
95
- #else
96
- #define yy_flush_buffer core_yy_flush_buffer
97
- #endif
98
-
99
- #ifdef yy_load_buffer_state
100
- #define core_yy_load_buffer_state_ALREADY_DEFINED
101
- #else
102
- #define yy_load_buffer_state core_yy_load_buffer_state
103
- #endif
104
-
105
- #ifdef yy_switch_to_buffer
106
- #define core_yy_switch_to_buffer_ALREADY_DEFINED
107
- #else
108
- #define yy_switch_to_buffer core_yy_switch_to_buffer
109
- #endif
110
-
111
- #ifdef yypush_buffer_state
112
- #define core_yypush_buffer_state_ALREADY_DEFINED
113
- #else
114
- #define yypush_buffer_state core_yypush_buffer_state
115
- #endif
116
-
117
- #ifdef yypop_buffer_state
118
- #define core_yypop_buffer_state_ALREADY_DEFINED
119
- #else
120
- #define yypop_buffer_state core_yypop_buffer_state
121
- #endif
122
-
123
- #ifdef yyensure_buffer_stack
124
- #define core_yyensure_buffer_stack_ALREADY_DEFINED
125
- #else
126
- #define yyensure_buffer_stack core_yyensure_buffer_stack
127
- #endif
128
-
129
- #ifdef yylex
130
- #define core_yylex_ALREADY_DEFINED
131
- #else
132
- #define yylex core_yylex
133
- #endif
134
-
135
- #ifdef yyrestart
136
- #define core_yyrestart_ALREADY_DEFINED
137
- #else
138
- #define yyrestart core_yyrestart
139
- #endif
140
-
141
- #ifdef yylex_init
142
- #define core_yylex_init_ALREADY_DEFINED
143
- #else
144
- #define yylex_init core_yylex_init
145
- #endif
146
-
147
- #ifdef yylex_init_extra
148
- #define core_yylex_init_extra_ALREADY_DEFINED
149
- #else
150
- #define yylex_init_extra core_yylex_init_extra
151
- #endif
152
-
153
- #ifdef yylex_destroy
154
- #define core_yylex_destroy_ALREADY_DEFINED
155
- #else
156
- #define yylex_destroy core_yylex_destroy
157
- #endif
158
-
159
- #ifdef yyget_debug
160
- #define core_yyget_debug_ALREADY_DEFINED
161
- #else
162
- #define yyget_debug core_yyget_debug
163
- #endif
164
-
165
- #ifdef yyset_debug
166
- #define core_yyset_debug_ALREADY_DEFINED
167
- #else
168
- #define yyset_debug core_yyset_debug
169
- #endif
170
-
171
- #ifdef yyget_extra
172
- #define core_yyget_extra_ALREADY_DEFINED
173
- #else
174
- #define yyget_extra core_yyget_extra
175
- #endif
176
-
177
- #ifdef yyset_extra
178
- #define core_yyset_extra_ALREADY_DEFINED
179
- #else
180
- #define yyset_extra core_yyset_extra
181
- #endif
182
-
183
- #ifdef yyget_in
184
- #define core_yyget_in_ALREADY_DEFINED
185
- #else
186
- #define yyget_in core_yyget_in
187
- #endif
188
-
189
- #ifdef yyset_in
190
- #define core_yyset_in_ALREADY_DEFINED
191
- #else
192
- #define yyset_in core_yyset_in
193
- #endif
194
-
195
- #ifdef yyget_out
196
- #define core_yyget_out_ALREADY_DEFINED
197
- #else
198
- #define yyget_out core_yyget_out
199
- #endif
200
-
201
- #ifdef yyset_out
202
- #define core_yyset_out_ALREADY_DEFINED
203
- #else
204
- #define yyset_out core_yyset_out
205
- #endif
206
-
207
- #ifdef yyget_leng
208
- #define core_yyget_leng_ALREADY_DEFINED
209
- #else
210
- #define yyget_leng core_yyget_leng
211
- #endif
212
-
213
- #ifdef yyget_text
214
- #define core_yyget_text_ALREADY_DEFINED
215
- #else
216
- #define yyget_text core_yyget_text
217
- #endif
218
-
219
- #ifdef yyget_lineno
220
- #define core_yyget_lineno_ALREADY_DEFINED
221
- #else
222
- #define yyget_lineno core_yyget_lineno
223
- #endif
224
-
225
- #ifdef yyset_lineno
226
- #define core_yyset_lineno_ALREADY_DEFINED
227
- #else
228
- #define yyset_lineno core_yyset_lineno
229
- #endif
230
-
231
- #ifdef yyget_column
232
- #define core_yyget_column_ALREADY_DEFINED
233
- #else
234
- #define yyget_column core_yyget_column
235
- #endif
236
-
237
- #ifdef yyset_column
238
- #define core_yyset_column_ALREADY_DEFINED
239
- #else
240
- #define yyset_column core_yyset_column
241
- #endif
242
-
243
- #ifdef yywrap
244
- #define core_yywrap_ALREADY_DEFINED
245
- #else
246
- #define yywrap core_yywrap
247
- #endif
248
-
249
- #ifdef yyget_lval
250
- #define core_yyget_lval_ALREADY_DEFINED
251
- #else
252
- #define yyget_lval core_yyget_lval
253
- #endif
254
-
255
- #ifdef yyset_lval
256
- #define core_yyset_lval_ALREADY_DEFINED
257
- #else
258
- #define yyset_lval core_yyset_lval
259
- #endif
260
-
261
- #ifdef yyget_lloc
262
- #define core_yyget_lloc_ALREADY_DEFINED
263
- #else
264
- #define yyget_lloc core_yyget_lloc
265
- #endif
266
-
267
- #ifdef yyset_lloc
268
- #define core_yyset_lloc_ALREADY_DEFINED
269
- #else
270
- #define yyset_lloc core_yyset_lloc
271
- #endif
272
-
273
- #ifdef yyalloc
274
- #define core_yyalloc_ALREADY_DEFINED
275
- #else
276
- #define yyalloc core_yyalloc
277
- #endif
278
-
279
- #ifdef yyrealloc
280
- #define core_yyrealloc_ALREADY_DEFINED
281
- #else
282
- #define yyrealloc core_yyrealloc
283
- #endif
284
-
285
- #ifdef yyfree
286
- #define core_yyfree_ALREADY_DEFINED
287
- #else
288
- #define yyfree core_yyfree
289
- #endif
290
-
291
61
  /* First, we deal with platform-specific or compiler-specific issues. */
292
62
 
293
63
  /* begin standard C headers. */
@@ -330,6 +100,7 @@ typedef int flex_int32_t;
330
100
  typedef unsigned char flex_uint8_t;
331
101
  typedef unsigned short int flex_uint16_t;
332
102
  typedef unsigned int flex_uint32_t;
103
+ #endif /* ! C99 */
333
104
 
334
105
  /* Limits of integral types. */
335
106
  #ifndef INT8_MIN
@@ -360,32 +131,38 @@ typedef unsigned int flex_uint32_t;
360
131
  #define UINT32_MAX (4294967295U)
361
132
  #endif
362
133
 
363
- #ifndef SIZE_MAX
364
- #define SIZE_MAX (~(size_t)0)
365
- #endif
134
+ #endif /* ! FLEXINT_H */
366
135
 
367
- #endif /* ! C99 */
136
+ #ifdef __cplusplus
368
137
 
369
- #endif /* ! FLEXINT_H */
138
+ /* The "const" storage-class-modifier is valid. */
139
+ #define YY_USE_CONST
370
140
 
371
- /* begin standard C++ headers. */
141
+ #else /* ! __cplusplus */
372
142
 
373
- /* TODO: this is always defined, so inline it */
374
- #define yyconst const
143
+ /* C99 requires __STDC__ to be defined as 1. */
144
+ #if defined (__STDC__)
375
145
 
376
- #if defined(__GNUC__) && __GNUC__ >= 3
377
- #define yynoreturn __attribute__((__noreturn__))
146
+ #define YY_USE_CONST
147
+
148
+ #endif /* defined (__STDC__) */
149
+ #endif /* ! __cplusplus */
150
+
151
+ #ifdef YY_USE_CONST
152
+ #define yyconst const
378
153
  #else
379
- #define yynoreturn
154
+ #define yyconst
380
155
  #endif
381
156
 
382
157
  /* Returned upon end-of-file. */
383
158
  #define YY_NULL 0
384
159
 
385
- /* Promotes a possibly negative, possibly signed char to an
386
- * integer in range [0..255] for use as an array index.
160
+ /* Promotes a possibly negative, possibly signed char to an unsigned
161
+ * integer for use as an array index. If the signed char is negative,
162
+ * we want to instead treat it as an 8-bit unsigned char, hence the
163
+ * double cast.
387
164
  */
388
- #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
165
+ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
389
166
 
390
167
  /* An opaque pointer. */
391
168
  #ifndef YY_TYPEDEF_YY_SCANNER_T
@@ -409,29 +186,25 @@ typedef void* yyscan_t;
409
186
  * definition of BEGIN.
410
187
  */
411
188
  #define BEGIN yyg->yy_start = 1 + 2 *
189
+
412
190
  /* Translate the current start state into a value that can be later handed
413
191
  * to BEGIN to return to the state. The YYSTATE alias is for lex
414
192
  * compatibility.
415
193
  */
416
194
  #define YY_START ((yyg->yy_start - 1) / 2)
417
195
  #define YYSTATE YY_START
196
+
418
197
  /* Action number for EOF rule of a given start state. */
419
198
  #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
199
+
420
200
  /* Special action meaning "start processing a new file". */
421
- #define YY_NEW_FILE yyrestart( yyin , yyscanner )
201
+ #define YY_NEW_FILE core_yyrestart(yyin ,yyscanner )
202
+
422
203
  #define YY_END_OF_BUFFER_CHAR 0
423
204
 
424
205
  /* Size of default input buffer. */
425
206
  #ifndef YY_BUF_SIZE
426
- #ifdef __ia64__
427
- /* On IA-64, the buffer size is 16k, not 8k.
428
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
429
- * Ditto for the __ia64__ case accordingly.
430
- */
431
- #define YY_BUF_SIZE 32768
432
- #else
433
207
  #define YY_BUF_SIZE 16384
434
- #endif /* __ia64__ */
435
208
  #endif
436
209
 
437
210
  /* The state buf must be large enough to hold one state per character in the main buffer.
@@ -451,9 +224,8 @@ typedef size_t yy_size_t;
451
224
  #define EOB_ACT_CONTINUE_SCAN 0
452
225
  #define EOB_ACT_END_OF_FILE 1
453
226
  #define EOB_ACT_LAST_MATCH 2
454
-
227
+
455
228
  #define YY_LESS_LINENO(n)
456
- #define YY_LINENO_REWIND_TO(ptr)
457
229
 
458
230
  /* Return all but the first "n" matched characters back to the input stream. */
459
231
  #define yyless(n) \
@@ -468,6 +240,7 @@ typedef size_t yy_size_t;
468
240
  YY_DO_BEFORE_ACTION; /* set up yytext again */ \
469
241
  } \
470
242
  while ( 0 )
243
+
471
244
  #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
472
245
 
473
246
  #ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -510,7 +283,7 @@ struct yy_buffer_state
510
283
 
511
284
  int yy_bs_lineno; /**< The line count. */
512
285
  int yy_bs_column; /**< The column count. */
513
-
286
+
514
287
  /* Whether to try to fill the input buffer when we reach the
515
288
  * end of it.
516
289
  */
@@ -527,7 +300,7 @@ struct yy_buffer_state
527
300
  * possible backing-up.
528
301
  *
529
302
  * When we actually see the EOF, we change the status to "new"
530
- * (via yyrestart()), so that the user can continue scanning by
303
+ * (via core_yyrestart()), so that the user can continue scanning by
531
304
  * just pointing yyin at a new input file.
532
305
  */
533
306
  #define YY_BUFFER_EOF_PENDING 2
@@ -544,67 +317,73 @@ struct yy_buffer_state
544
317
  #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
545
318
  ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
546
319
  : NULL)
320
+
547
321
  /* Same as previous macro, but useful when we know that the buffer stack is not
548
322
  * NULL or when we need an lvalue. For internal use only.
549
323
  */
550
324
  #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
551
325
 
552
- void yyrestart ( FILE *input_file , yyscan_t yyscanner );
553
- void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
554
- YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
555
- void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
556
- void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
557
- void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
558
- void yypop_buffer_state ( yyscan_t yyscanner );
326
+ void core_yyrestart (FILE *input_file ,yyscan_t yyscanner );
327
+ void core_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
328
+ YY_BUFFER_STATE core_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
329
+ void core_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
330
+ void core_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
331
+ void core_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
332
+ void core_yypop_buffer_state (yyscan_t yyscanner );
333
+
334
+ static void core_yyensure_buffer_stack (yyscan_t yyscanner );
335
+ static void core_yy_load_buffer_state (yyscan_t yyscanner );
336
+ static void core_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
559
337
 
560
- static void yyensure_buffer_stack ( yyscan_t yyscanner );
561
- static void yy_load_buffer_state ( yyscan_t yyscanner );
562
- static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
563
- #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
338
+ #define YY_FLUSH_BUFFER core_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
564
339
 
565
- YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
566
- YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
567
- YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner );
340
+ YY_BUFFER_STATE core_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
341
+ YY_BUFFER_STATE core_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
342
+ YY_BUFFER_STATE core_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
568
343
 
569
- void *yyalloc ( yy_size_t , yyscan_t yyscanner );
570
- void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
571
- void yyfree ( void * , yyscan_t yyscanner );
344
+ void *core_yyalloc (yy_size_t ,yyscan_t yyscanner );
345
+ void *core_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
346
+ void core_yyfree (void * ,yyscan_t yyscanner );
347
+
348
+ #define yy_new_buffer core_yy_create_buffer
572
349
 
573
- #define yy_new_buffer yy_create_buffer
574
350
  #define yy_set_interactive(is_interactive) \
575
351
  { \
576
352
  if ( ! YY_CURRENT_BUFFER ){ \
577
- yyensure_buffer_stack (yyscanner); \
353
+ core_yyensure_buffer_stack (yyscanner); \
578
354
  YY_CURRENT_BUFFER_LVALUE = \
579
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
355
+ core_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
580
356
  } \
581
357
  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
582
358
  }
359
+
583
360
  #define yy_set_bol(at_bol) \
584
361
  { \
585
362
  if ( ! YY_CURRENT_BUFFER ){\
586
- yyensure_buffer_stack (yyscanner); \
363
+ core_yyensure_buffer_stack (yyscanner); \
587
364
  YY_CURRENT_BUFFER_LVALUE = \
588
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
365
+ core_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
589
366
  } \
590
367
  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
591
368
  }
369
+
592
370
  #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
593
371
 
594
372
  /* Begin user sect3 */
595
373
 
596
- #define core_yywrap(yyscanner) (/*CONSTCOND*/1)
374
+ #define core_yywrap(n) 1
597
375
  #define YY_SKIP_YYWRAP
598
- typedef flex_uint8_t YY_CHAR;
376
+
377
+ typedef unsigned char YY_CHAR;
599
378
 
600
379
  typedef int yy_state_type;
601
380
 
602
381
  #define yytext_ptr yytext_r
603
382
 
604
- static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
605
- static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner);
606
- static int yy_get_next_buffer ( yyscan_t yyscanner );
607
- static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
383
+ static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
384
+ static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
385
+ static int yy_get_next_buffer (yyscan_t yyscanner );
386
+ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
608
387
 
609
388
  /* Done after the current pattern has been matched and before the
610
389
  * corresponding action - sets up yytext.
@@ -615,6 +394,7 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
615
394
  yyg->yy_hold_char = *yy_cp; \
616
395
  *yy_cp = '\0'; \
617
396
  yyg->yy_c_buf_p = yy_cp;
397
+
618
398
  #define YY_NUM_RULES 84
619
399
  #define YY_END_OF_BUFFER 85
620
400
  /* This struct is not used in this scanner,
@@ -624,7 +404,7 @@ struct yy_trans_info
624
404
  flex_int32_t yy_verify;
625
405
  flex_int32_t yy_nxt;
626
406
  };
627
- static const flex_int16_t yy_accept[309] =
407
+ static yyconst flex_int16_t yy_accept[309] =
628
408
  { 0,
629
409
  0, 0, 12, 12, 0, 0, 0, 0, 11, 11,
630
410
  0, 0, 0, 0, 0, 0, 0, 0, 55, 55,
@@ -662,7 +442,7 @@ static const flex_int16_t yy_accept[309] =
662
442
  28, 28, 28, 55, 55, 28, 28, 0
663
443
  } ;
664
444
 
665
- static const YY_CHAR yy_ec[256] =
445
+ static yyconst flex_int32_t yy_ec[256] =
666
446
  { 0,
667
447
  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
668
448
  1, 2, 4, 1, 1, 1, 1, 1, 1, 1,
@@ -694,7 +474,7 @@ static const YY_CHAR yy_ec[256] =
694
474
  30, 30, 30, 30, 30
695
475
  } ;
696
476
 
697
- static const YY_CHAR yy_meta[40] =
477
+ static yyconst flex_int32_t yy_meta[40] =
698
478
  { 0,
699
479
  1, 1, 2, 2, 3, 4, 5, 3, 3, 6,
700
480
  1, 7, 3, 3, 1, 7, 8, 8, 1, 3,
@@ -702,7 +482,7 @@ static const YY_CHAR yy_meta[40] =
702
482
  10, 10, 10, 10, 10, 11, 10, 10, 10
703
483
  } ;
704
484
 
705
- static const flex_int16_t yy_base[376] =
485
+ static yyconst flex_int16_t yy_base[376] =
706
486
  { 0,
707
487
  0, 0, 486, 484, 35, 55, 483, 475, 466, 465,
708
488
  42, 51, 458, 450, 39, 55, 449, 448, 86, 123,
@@ -747,7 +527,7 @@ static const flex_int16_t yy_base[376] =
747
527
  1196, 1205, 1216, 1227, 1238
748
528
  } ;
749
529
 
750
- static const flex_int16_t yy_def[376] =
530
+ static yyconst flex_int16_t yy_def[376] =
751
531
  { 0,
752
532
  308, 1, 309, 309, 310, 310, 311, 311, 312, 312,
753
533
  313, 313, 314, 314, 315, 315, 311, 311, 316, 316,
@@ -792,7 +572,7 @@ static const flex_int16_t yy_def[376] =
792
572
  308, 308, 308, 308, 308
793
573
  } ;
794
574
 
795
- static const flex_int16_t yy_nxt[1290] =
575
+ static yyconst flex_int16_t yy_nxt[1290] =
796
576
  { 0,
797
577
  28, 29, 30, 29, 31, 32, 33, 34, 35, 36,
798
578
  37, 38, 34, 39, 40, 41, 42, 42, 43, 44,
@@ -937,7 +717,7 @@ static const flex_int16_t yy_nxt[1290] =
937
717
  308, 308, 308, 308, 308, 308, 308, 308, 308
938
718
  } ;
939
719
 
940
- static const flex_int16_t yy_chk[1290] =
720
+ static yyconst flex_int16_t yy_chk[1290] =
941
721
  { 0,
942
722
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
943
723
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -1118,7 +898,7 @@ bool standard_conforming_strings = true;
1118
898
  #define YY_EXTRA_TYPE core_yy_extra_type *
1119
899
 
1120
900
  /*
1121
- * Each call to yylex must set yylloc to the location of the found token
901
+ * Each call to core_yylex must set yylloc to the location of the found token
1122
902
  * (expressed as a byte offset from the start of the input text).
1123
903
  * When we parse a token that requires multiple lexer rules to process,
1124
904
  * this should be done in the first such rule, else yylloc will point
@@ -1160,7 +940,6 @@ static void check_escape_warning(core_yyscan_t yyscanner);
1160
940
  extern int core_yyget_column(yyscan_t yyscanner);
1161
941
  extern void core_yyset_column(int column_no, yyscan_t yyscanner);
1162
942
 
1163
- #line 1162 "third_party/libpg_query/src_backend_parser_scan.cpp"
1164
943
  #define YY_NO_INPUT 1
1165
944
  /*
1166
945
  * OK, here is a short description of lex/flex rules behavior.
@@ -1190,6 +969,17 @@ extern void core_yyset_column(int column_no, yyscan_t yyscanner);
1190
969
  * The default one is probably not the right thing.
1191
970
  */
1192
971
 
972
+
973
+
974
+
975
+
976
+
977
+
978
+
979
+
980
+
981
+
982
+
1193
983
  /*
1194
984
  * In order to make the world safe for Windows and Mac clients as well as
1195
985
  * Unix ones, we accept either \n or \r as a newline. A DOS-style \r\n
@@ -1314,7 +1104,7 @@ extern void core_yyset_column(int column_no, yyscan_t yyscanner);
1314
1104
  * Note that xcstart must appear before operator, as explained above!
1315
1105
  * Also whitespace (comment) must appear before operator.
1316
1106
  */
1317
- #line 1316 "third_party/libpg_query/src_backend_parser_scan.cpp"
1107
+ #line 1107 "third_party/libpg_query/src_backend_parser_scan.cpp"
1318
1108
 
1319
1109
  #define INITIAL 0
1320
1110
  #define xb 1
@@ -1372,7 +1162,7 @@ struct yyguts_t
1372
1162
 
1373
1163
  }; /* end struct yyguts_t */
1374
1164
 
1375
- static int yy_init_globals ( yyscan_t yyscanner );
1165
+ static int yy_init_globals (yyscan_t yyscanner );
1376
1166
 
1377
1167
  /* This must go here because YYSTYPE and YYLTYPE are included
1378
1168
  * from bison output in section 1.*/
@@ -1380,50 +1170,46 @@ static int yy_init_globals ( yyscan_t yyscanner );
1380
1170
 
1381
1171
  # define yylloc yyg->yylloc_r
1382
1172
 
1383
- int yylex_init (yyscan_t* scanner);
1173
+ int core_yylex_init (yyscan_t* scanner);
1384
1174
 
1385
- int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
1175
+ int core_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
1386
1176
 
1387
1177
  /* Accessor methods to globals.
1388
1178
  These are made visible to non-reentrant scanners for convenience. */
1389
1179
 
1390
- int yylex_destroy ( yyscan_t yyscanner );
1180
+ int core_yylex_destroy (yyscan_t yyscanner );
1391
1181
 
1392
- int yyget_debug ( yyscan_t yyscanner );
1182
+ int core_yyget_debug (yyscan_t yyscanner );
1393
1183
 
1394
- void yyset_debug ( int debug_flag , yyscan_t yyscanner );
1184
+ void core_yyset_debug (int debug_flag ,yyscan_t yyscanner );
1395
1185
 
1396
- YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
1186
+ YY_EXTRA_TYPE core_yyget_extra (yyscan_t yyscanner );
1397
1187
 
1398
- void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
1188
+ void core_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
1399
1189
 
1400
- FILE *yyget_in ( yyscan_t yyscanner );
1190
+ FILE *core_yyget_in (yyscan_t yyscanner );
1401
1191
 
1402
- void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
1192
+ void core_yyset_in (FILE * in_str ,yyscan_t yyscanner );
1403
1193
 
1404
- FILE *yyget_out ( yyscan_t yyscanner );
1194
+ FILE *core_yyget_out (yyscan_t yyscanner );
1405
1195
 
1406
- void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
1196
+ void core_yyset_out (FILE * out_str ,yyscan_t yyscanner );
1407
1197
 
1408
- yy_size_t yyget_leng ( yyscan_t yyscanner );
1198
+ yy_size_t core_yyget_leng (yyscan_t yyscanner );
1409
1199
 
1410
- char *yyget_text ( yyscan_t yyscanner );
1200
+ char *core_yyget_text (yyscan_t yyscanner );
1411
1201
 
1412
- int yyget_lineno ( yyscan_t yyscanner );
1202
+ int core_yyget_lineno (yyscan_t yyscanner );
1413
1203
 
1414
- void yyset_lineno ( int _line_number , yyscan_t yyscanner );
1204
+ void core_yyset_lineno (int line_number ,yyscan_t yyscanner );
1415
1205
 
1416
- int yyget_column ( yyscan_t yyscanner );
1206
+ YYSTYPE * core_yyget_lval (yyscan_t yyscanner );
1417
1207
 
1418
- void yyset_column ( int _column_no , yyscan_t yyscanner );
1208
+ void core_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
1419
1209
 
1420
- YYSTYPE * yyget_lval ( yyscan_t yyscanner );
1421
-
1422
- void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
1423
-
1424
- YYLTYPE *yyget_lloc ( yyscan_t yyscanner );
1210
+ YYLTYPE *core_yyget_lloc (yyscan_t yyscanner );
1425
1211
 
1426
- void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner );
1212
+ void core_yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
1427
1213
 
1428
1214
  /* Macros after this point can all be overridden by user definitions in
1429
1215
  * section 1.
@@ -1431,41 +1217,33 @@ void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
1431
1217
 
1432
1218
  #ifndef YY_SKIP_YYWRAP
1433
1219
  #ifdef __cplusplus
1434
- extern "C" int yywrap ( yyscan_t yyscanner );
1220
+ extern "C" int core_yywrap (yyscan_t yyscanner );
1435
1221
  #else
1436
- extern int yywrap ( yyscan_t yyscanner );
1437
- #endif
1222
+ extern int core_yywrap (yyscan_t yyscanner );
1438
1223
  #endif
1439
-
1440
- #ifndef YY_NO_UNPUT
1441
-
1442
1224
  #endif
1443
1225
 
1444
1226
  #ifndef yytext_ptr
1445
- static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
1227
+ static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
1446
1228
  #endif
1447
1229
 
1448
1230
  #ifdef YY_NEED_STRLEN
1449
- static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
1231
+ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
1450
1232
  #endif
1451
1233
 
1452
1234
  #ifndef YY_NO_INPUT
1235
+
1453
1236
  #ifdef __cplusplus
1454
- static int yyinput ( yyscan_t yyscanner );
1237
+ static int yyinput (yyscan_t yyscanner );
1455
1238
  #else
1456
- static int input ( yyscan_t yyscanner );
1239
+ static int input (yyscan_t yyscanner );
1457
1240
  #endif
1458
1241
 
1459
1242
  #endif
1460
1243
 
1461
1244
  /* Amount of stuff to slurp up with each read. */
1462
1245
  #ifndef YY_READ_BUF_SIZE
1463
- #ifdef __ia64__
1464
- /* On IA-64, the buffer size is 16k, not 8k */
1465
- #define YY_READ_BUF_SIZE 16384
1466
- #else
1467
1246
  #define YY_READ_BUF_SIZE 8192
1468
- #endif /* __ia64__ */
1469
1247
  #endif
1470
1248
 
1471
1249
  /* Copy whatever the last rule matched to the standard output. */
@@ -1473,7 +1251,7 @@ static int input ( yyscan_t yyscanner );
1473
1251
  /* This used to be an fputs(), but since the string might contain NUL's,
1474
1252
  * we now use fwrite().
1475
1253
  */
1476
- #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1254
+ #define ECHO fwrite( yytext, yyleng, 1, yyout )
1477
1255
  #endif
1478
1256
 
1479
1257
  /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -1497,7 +1275,7 @@ static int input ( yyscan_t yyscanner );
1497
1275
  else \
1498
1276
  { \
1499
1277
  errno=0; \
1500
- while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1278
+ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1501
1279
  { \
1502
1280
  if( errno != EINTR) \
1503
1281
  { \
@@ -1538,10 +1316,10 @@ static int input ( yyscan_t yyscanner );
1538
1316
  #ifndef YY_DECL
1539
1317
  #define YY_DECL_IS_OURS 1
1540
1318
 
1541
- extern int yylex \
1542
- (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner);
1319
+ extern int core_yylex \
1320
+ (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
1543
1321
 
1544
- #define YY_DECL int yylex \
1322
+ #define YY_DECL int core_yylex \
1545
1323
  (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
1546
1324
  #endif /* !YY_DECL */
1547
1325
 
@@ -1554,7 +1332,7 @@ extern int yylex \
1554
1332
 
1555
1333
  /* Code executed at the end of each rule. */
1556
1334
  #ifndef YY_BREAK
1557
- #define YY_BREAK /*LINTED*/break;
1335
+ #define YY_BREAK break;
1558
1336
  #endif
1559
1337
 
1560
1338
  #define YY_RULE_SETUP \
@@ -1569,6 +1347,11 @@ YY_DECL
1569
1347
  int yy_act;
1570
1348
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1571
1349
 
1350
+ #line 404 "third_party/libpg_query/scan.l"
1351
+
1352
+
1353
+ #line 1353 "third_party/libpg_query/src_backend_parser_scan.cpp"
1354
+
1572
1355
  yylval = yylval_param;
1573
1356
 
1574
1357
  yylloc = yylloc_param;
@@ -1584,21 +1367,15 @@ YY_DECL
1584
1367
  if ( ! yyg->yy_start )
1585
1368
  yyg->yy_start = 1; /* first start state */
1586
1369
  if ( ! YY_CURRENT_BUFFER ) {
1587
- yyensure_buffer_stack (yyscanner);
1370
+ core_yyensure_buffer_stack (yyscanner);
1588
1371
  YY_CURRENT_BUFFER_LVALUE =
1589
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
1372
+ core_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1590
1373
  }
1591
1374
 
1592
- yy_load_buffer_state( yyscanner );
1375
+ core_yy_load_buffer_state(yyscanner );
1593
1376
  }
1594
1377
 
1595
- {
1596
- #line 404 "third_party/libpg_query/scan.l"
1597
-
1598
-
1599
- #line 1605 "third_party/libpg_query/src_backend_parser_scan.cpp"
1600
-
1601
- while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1378
+ while ( 1 ) /* loops until end-of-file is reached */
1602
1379
  {
1603
1380
  yy_cp = yyg->yy_c_buf_p;
1604
1381
 
@@ -1614,7 +1391,7 @@ YY_DECL
1614
1391
  yy_match:
1615
1392
  do
1616
1393
  {
1617
- YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1394
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1618
1395
  if ( yy_accept[yy_current_state] )
1619
1396
  {
1620
1397
  yyg->yy_last_accepting_state = yy_current_state;
@@ -1624,9 +1401,9 @@ yy_match:
1624
1401
  {
1625
1402
  yy_current_state = (int) yy_def[yy_current_state];
1626
1403
  if ( yy_current_state >= 309 )
1627
- yy_c = yy_meta[yy_c];
1404
+ yy_c = yy_meta[(unsigned int) yy_c];
1628
1405
  }
1629
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1406
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1630
1407
  ++yy_cp;
1631
1408
  }
1632
1409
  while ( yy_current_state != 308 );
@@ -2667,7 +2444,7 @@ YY_RULE_SETUP
2667
2444
  #line 1089 "third_party/libpg_query/scan.l"
2668
2445
  YY_FATAL_ERROR( "flex scanner jammed" );
2669
2446
  YY_BREAK
2670
- #line 2676 "third_party/libpg_query/src_backend_parser_scan.cpp"
2447
+ #line 2454 "third_party/libpg_query/src_backend_parser_scan.cpp"
2671
2448
 
2672
2449
  case YY_END_OF_BUFFER:
2673
2450
  {
@@ -2683,7 +2460,7 @@ YY_FATAL_ERROR( "flex scanner jammed" );
2683
2460
  /* We're scanning a new file or input source. It's
2684
2461
  * possible that this happened because the user
2685
2462
  * just pointed yyin at a new source and called
2686
- * yylex(). If so, then we have to assure
2463
+ * core_yylex(). If so, then we have to assure
2687
2464
  * consistency between YY_CURRENT_BUFFER and our
2688
2465
  * globals. Here is the right place to do so, because
2689
2466
  * this is the first action (other than possibly a
@@ -2744,7 +2521,7 @@ YY_FATAL_ERROR( "flex scanner jammed" );
2744
2521
  {
2745
2522
  yyg->yy_did_buffer_switch_on_eof = 0;
2746
2523
 
2747
- if ( yywrap( yyscanner ) )
2524
+ if ( core_yywrap(yyscanner ) )
2748
2525
  {
2749
2526
  /* Note: because we've taken care in
2750
2527
  * yy_get_next_buffer() to have set up
@@ -2797,8 +2574,7 @@ YY_FATAL_ERROR( "flex scanner jammed" );
2797
2574
  "fatal flex scanner internal error--no action found" );
2798
2575
  } /* end of action switch */
2799
2576
  } /* end of scanning one token */
2800
- } /* end of user's declarations */
2801
- } /* end of yylex */
2577
+ } /* end of core_yylex */
2802
2578
 
2803
2579
  /* yy_get_next_buffer - try to read in a new buffer
2804
2580
  *
@@ -2841,7 +2617,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
2841
2617
  /* Try to read more data. */
2842
2618
 
2843
2619
  /* First move last chars to start of buffer. */
2844
- number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
2620
+ number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
2845
2621
 
2846
2622
  for ( i = 0; i < number_to_move; ++i )
2847
2623
  *(dest++) = *(source++);
@@ -2861,7 +2637,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
2861
2637
  { /* Not enough room in the buffer - grow it. */
2862
2638
 
2863
2639
  /* just a shorter name for the current buffer */
2864
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
2640
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2865
2641
 
2866
2642
  int yy_c_buf_p_offset =
2867
2643
  (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
@@ -2877,12 +2653,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
2877
2653
 
2878
2654
  b->yy_ch_buf = (char *)
2879
2655
  /* Include room in for 2 EOB chars. */
2880
- yyrealloc( (void *) b->yy_ch_buf,
2881
- (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
2656
+ core_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
2882
2657
  }
2883
2658
  else
2884
2659
  /* Can't grow it, we don't own it. */
2885
- b->yy_ch_buf = NULL;
2660
+ b->yy_ch_buf = 0;
2886
2661
 
2887
2662
  if ( ! b->yy_ch_buf )
2888
2663
  YY_FATAL_ERROR(
@@ -2910,7 +2685,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
2910
2685
  if ( number_to_move == YY_MORE_ADJ )
2911
2686
  {
2912
2687
  ret_val = EOB_ACT_END_OF_FILE;
2913
- yyrestart( yyin , yyscanner);
2688
+ core_yyrestart(yyin ,yyscanner);
2914
2689
  }
2915
2690
 
2916
2691
  else
@@ -2924,15 +2699,12 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
2924
2699
  else
2925
2700
  ret_val = EOB_ACT_CONTINUE_SCAN;
2926
2701
 
2927
- if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2702
+ if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2928
2703
  /* Extend the array by 50%, plus the number we really need. */
2929
2704
  yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
2930
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
2931
- (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
2705
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) core_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
2932
2706
  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2933
2707
  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2934
- /* "- 2" to take care of EOB's */
2935
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
2936
2708
  }
2937
2709
 
2938
2710
  yyg->yy_n_chars += number_to_move;
@@ -2966,9 +2738,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
2966
2738
  {
2967
2739
  yy_current_state = (int) yy_def[yy_current_state];
2968
2740
  if ( yy_current_state >= 309 )
2969
- yy_c = yy_meta[yy_c];
2741
+ yy_c = yy_meta[(unsigned int) yy_c];
2970
2742
  }
2971
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2743
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2972
2744
  }
2973
2745
 
2974
2746
  return yy_current_state;
@@ -2995,19 +2767,14 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
2995
2767
  {
2996
2768
  yy_current_state = (int) yy_def[yy_current_state];
2997
2769
  if ( yy_current_state >= 309 )
2998
- yy_c = yy_meta[yy_c];
2770
+ yy_c = yy_meta[(unsigned int) yy_c];
2999
2771
  }
3000
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2772
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3001
2773
  yy_is_jam = (yy_current_state == 308);
3002
2774
 
3003
- (void)yyg;
3004
2775
  return yy_is_jam ? 0 : yy_current_state;
3005
2776
  }
3006
2777
 
3007
- #ifndef YY_NO_UNPUT
3008
-
3009
- #endif
3010
-
3011
2778
  #ifndef YY_NO_INPUT
3012
2779
  #ifdef __cplusplus
3013
2780
  static int yyinput (yyscan_t yyscanner)
@@ -3050,13 +2817,13 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
3050
2817
  */
3051
2818
 
3052
2819
  /* Reset buffer status. */
3053
- yyrestart( yyin , yyscanner);
2820
+ core_yyrestart(yyin ,yyscanner);
3054
2821
 
3055
2822
  /*FALLTHROUGH*/
3056
2823
 
3057
2824
  case EOB_ACT_END_OF_FILE:
3058
2825
  {
3059
- if ( yywrap( yyscanner ) )
2826
+ if ( core_yywrap(yyscanner ) )
3060
2827
  return 0;
3061
2828
 
3062
2829
  if ( ! yyg->yy_did_buffer_switch_on_eof )
@@ -3088,34 +2855,34 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
3088
2855
  * @param yyscanner The scanner object.
3089
2856
  * @note This function does not reset the start condition to @c INITIAL .
3090
2857
  */
3091
- void yyrestart (FILE * input_file , yyscan_t yyscanner)
2858
+ void core_yyrestart (FILE * input_file , yyscan_t yyscanner)
3092
2859
  {
3093
2860
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3094
2861
 
3095
2862
  if ( ! YY_CURRENT_BUFFER ){
3096
- yyensure_buffer_stack (yyscanner);
2863
+ core_yyensure_buffer_stack (yyscanner);
3097
2864
  YY_CURRENT_BUFFER_LVALUE =
3098
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
2865
+ core_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
3099
2866
  }
3100
2867
 
3101
- yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
3102
- yy_load_buffer_state( yyscanner );
2868
+ core_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
2869
+ core_yy_load_buffer_state(yyscanner );
3103
2870
  }
3104
2871
 
3105
2872
  /** Switch to a different input buffer.
3106
2873
  * @param new_buffer The new input buffer.
3107
2874
  * @param yyscanner The scanner object.
3108
2875
  */
3109
- void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2876
+ void core_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
3110
2877
  {
3111
2878
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3112
2879
 
3113
2880
  /* TODO. We should be able to replace this entire function body
3114
2881
  * with
3115
- * yypop_buffer_state();
3116
- * yypush_buffer_state(new_buffer);
2882
+ * core_yypop_buffer_state();
2883
+ * core_yypush_buffer_state(new_buffer);
3117
2884
  */
3118
- yyensure_buffer_stack (yyscanner);
2885
+ core_yyensure_buffer_stack (yyscanner);
3119
2886
  if ( YY_CURRENT_BUFFER == new_buffer )
3120
2887
  return;
3121
2888
 
@@ -3128,17 +2895,17 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
3128
2895
  }
3129
2896
 
3130
2897
  YY_CURRENT_BUFFER_LVALUE = new_buffer;
3131
- yy_load_buffer_state( yyscanner );
2898
+ core_yy_load_buffer_state(yyscanner );
3132
2899
 
3133
2900
  /* We don't actually know whether we did this switch during
3134
- * EOF (yywrap()) processing, but the only time this flag
3135
- * is looked at is after yywrap() is called, so it's safe
2901
+ * EOF (core_yywrap()) processing, but the only time this flag
2902
+ * is looked at is after core_yywrap() is called, so it's safe
3136
2903
  * to go ahead and always set it.
3137
2904
  */
3138
2905
  yyg->yy_did_buffer_switch_on_eof = 1;
3139
2906
  }
3140
2907
 
3141
- static void yy_load_buffer_state (yyscan_t yyscanner)
2908
+ static void core_yy_load_buffer_state (yyscan_t yyscanner)
3142
2909
  {
3143
2910
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3144
2911
  yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
@@ -3153,35 +2920,35 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
3153
2920
  * @param yyscanner The scanner object.
3154
2921
  * @return the allocated buffer state.
3155
2922
  */
3156
- YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
2923
+ YY_BUFFER_STATE core_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
3157
2924
  {
3158
2925
  YY_BUFFER_STATE b;
3159
2926
 
3160
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
2927
+ b = (YY_BUFFER_STATE) core_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
3161
2928
  if ( ! b )
3162
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2929
+ YY_FATAL_ERROR( "out of dynamic memory in core_yy_create_buffer()" );
3163
2930
 
3164
2931
  b->yy_buf_size = size;
3165
2932
 
3166
2933
  /* yy_ch_buf has to be 2 characters longer than the size given because
3167
2934
  * we need to put in 2 end-of-buffer characters.
3168
2935
  */
3169
- b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
2936
+ b->yy_ch_buf = (char *) core_yyalloc(b->yy_buf_size + 2 ,yyscanner );
3170
2937
  if ( ! b->yy_ch_buf )
3171
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2938
+ YY_FATAL_ERROR( "out of dynamic memory in core_yy_create_buffer()" );
3172
2939
 
3173
2940
  b->yy_is_our_buffer = 1;
3174
2941
 
3175
- yy_init_buffer( b, file , yyscanner);
2942
+ core_yy_init_buffer(b,file ,yyscanner);
3176
2943
 
3177
2944
  return b;
3178
2945
  }
3179
2946
 
3180
2947
  /** Destroy the buffer.
3181
- * @param b a buffer created with yy_create_buffer()
2948
+ * @param b a buffer created with core_yy_create_buffer()
3182
2949
  * @param yyscanner The scanner object.
3183
2950
  */
3184
- void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2951
+ void core_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
3185
2952
  {
3186
2953
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3187
2954
 
@@ -3192,28 +2959,28 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
3192
2959
  YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
3193
2960
 
3194
2961
  if ( b->yy_is_our_buffer )
3195
- yyfree( (void *) b->yy_ch_buf , yyscanner );
2962
+ core_yyfree((void *) b->yy_ch_buf ,yyscanner );
3196
2963
 
3197
- yyfree( (void *) b , yyscanner );
2964
+ core_yyfree((void *) b ,yyscanner );
3198
2965
  }
3199
2966
 
3200
2967
  /* Initializes or reinitializes a buffer.
3201
2968
  * This function is sometimes called more than once on the same buffer,
3202
- * such as during a yyrestart() or at EOF.
2969
+ * such as during a core_yyrestart() or at EOF.
3203
2970
  */
3204
- static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
2971
+ static void core_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
3205
2972
 
3206
2973
  {
3207
2974
  int oerrno = errno;
3208
2975
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3209
2976
 
3210
- yy_flush_buffer( b , yyscanner);
2977
+ core_yy_flush_buffer(b ,yyscanner);
3211
2978
 
3212
2979
  b->yy_input_file = file;
3213
2980
  b->yy_fill_buffer = 1;
3214
2981
 
3215
- /* If b is the current buffer, then yy_init_buffer was _probably_
3216
- * called from yyrestart() or through yy_get_next_buffer.
2982
+ /* If b is the current buffer, then core_yy_init_buffer was _probably_
2983
+ * called from core_yyrestart() or through yy_get_next_buffer.
3217
2984
  * In that case, we don't want to reset the lineno or column.
3218
2985
  */
3219
2986
  if (b != YY_CURRENT_BUFFER){
@@ -3230,7 +2997,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
3230
2997
  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
3231
2998
  * @param yyscanner The scanner object.
3232
2999
  */
3233
- void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
3000
+ void core_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
3234
3001
  {
3235
3002
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3236
3003
  if ( ! b )
@@ -3251,7 +3018,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
3251
3018
  b->yy_buffer_status = YY_BUFFER_NEW;
3252
3019
 
3253
3020
  if ( b == YY_CURRENT_BUFFER )
3254
- yy_load_buffer_state( yyscanner );
3021
+ core_yy_load_buffer_state(yyscanner );
3255
3022
  }
3256
3023
 
3257
3024
  /** Pushes the new state onto the stack. The new state becomes
@@ -3260,15 +3027,15 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
3260
3027
  * @param new_buffer The new state.
3261
3028
  * @param yyscanner The scanner object.
3262
3029
  */
3263
- void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
3030
+ void core_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
3264
3031
  {
3265
3032
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3266
3033
  if (new_buffer == NULL)
3267
3034
  return;
3268
3035
 
3269
- yyensure_buffer_stack(yyscanner);
3036
+ core_yyensure_buffer_stack(yyscanner);
3270
3037
 
3271
- /* This block is copied from yy_switch_to_buffer. */
3038
+ /* This block is copied from core_yy_switch_to_buffer. */
3272
3039
  if ( YY_CURRENT_BUFFER )
3273
3040
  {
3274
3041
  /* Flush out information for old buffer. */
@@ -3282,8 +3049,8 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
3282
3049
  yyg->yy_buffer_stack_top++;
3283
3050
  YY_CURRENT_BUFFER_LVALUE = new_buffer;
3284
3051
 
3285
- /* copied from yy_switch_to_buffer. */
3286
- yy_load_buffer_state( yyscanner );
3052
+ /* copied from core_yy_switch_to_buffer. */
3053
+ core_yy_load_buffer_state(yyscanner );
3287
3054
  yyg->yy_did_buffer_switch_on_eof = 1;
3288
3055
  }
3289
3056
 
@@ -3291,19 +3058,19 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
3291
3058
  * The next element becomes the new top.
3292
3059
  * @param yyscanner The scanner object.
3293
3060
  */
3294
- void yypop_buffer_state (yyscan_t yyscanner)
3061
+ void core_yypop_buffer_state (yyscan_t yyscanner)
3295
3062
  {
3296
3063
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3297
3064
  if (!YY_CURRENT_BUFFER)
3298
3065
  return;
3299
3066
 
3300
- yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
3067
+ core_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
3301
3068
  YY_CURRENT_BUFFER_LVALUE = NULL;
3302
3069
  if (yyg->yy_buffer_stack_top > 0)
3303
3070
  --yyg->yy_buffer_stack_top;
3304
3071
 
3305
3072
  if (YY_CURRENT_BUFFER) {
3306
- yy_load_buffer_state( yyscanner );
3073
+ core_yy_load_buffer_state(yyscanner );
3307
3074
  yyg->yy_did_buffer_switch_on_eof = 1;
3308
3075
  }
3309
3076
  }
@@ -3311,7 +3078,7 @@ void yypop_buffer_state (yyscan_t yyscanner)
3311
3078
  /* Allocates the stack if it does not exist.
3312
3079
  * Guarantees space for at least one push.
3313
3080
  */
3314
- static void yyensure_buffer_stack (yyscan_t yyscanner)
3081
+ static void core_yyensure_buffer_stack (yyscan_t yyscanner)
3315
3082
  {
3316
3083
  yy_size_t num_to_alloc;
3317
3084
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
@@ -3322,15 +3089,15 @@ static void yyensure_buffer_stack (yyscan_t yyscanner)
3322
3089
  * scanner will even need a stack. We use 2 instead of 1 to avoid an
3323
3090
  * immediate realloc on the next call.
3324
3091
  */
3325
- num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
3326
- yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
3092
+ num_to_alloc = 1;
3093
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)core_yyalloc
3327
3094
  (num_to_alloc * sizeof(struct yy_buffer_state*)
3328
3095
  , yyscanner);
3329
3096
  if ( ! yyg->yy_buffer_stack )
3330
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3331
-
3097
+ YY_FATAL_ERROR( "out of dynamic memory in core_yyensure_buffer_stack()" );
3098
+
3332
3099
  memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3333
-
3100
+
3334
3101
  yyg->yy_buffer_stack_max = num_to_alloc;
3335
3102
  yyg->yy_buffer_stack_top = 0;
3336
3103
  return;
@@ -3339,15 +3106,15 @@ static void yyensure_buffer_stack (yyscan_t yyscanner)
3339
3106
  if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
3340
3107
 
3341
3108
  /* Increase the buffer to prepare for a possible push. */
3342
- yy_size_t grow_size = 8 /* arbitrary grow size */;
3109
+ int grow_size = 8 /* arbitrary grow size */;
3343
3110
 
3344
3111
  num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
3345
- yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
3112
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)core_yyrealloc
3346
3113
  (yyg->yy_buffer_stack,
3347
3114
  num_to_alloc * sizeof(struct yy_buffer_state*)
3348
3115
  , yyscanner);
3349
3116
  if ( ! yyg->yy_buffer_stack )
3350
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3117
+ YY_FATAL_ERROR( "out of dynamic memory in core_yyensure_buffer_stack()" );
3351
3118
 
3352
3119
  /* zero only the new slots.*/
3353
3120
  memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -3359,9 +3126,9 @@ static void yyensure_buffer_stack (yyscan_t yyscanner)
3359
3126
  * @param base the character buffer
3360
3127
  * @param size the size in bytes of the character buffer
3361
3128
  * @param yyscanner The scanner object.
3362
- * @return the newly allocated buffer state object.
3129
+ * @return the newly allocated buffer state object.
3363
3130
  */
3364
- YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
3131
+ YY_BUFFER_STATE core_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
3365
3132
  {
3366
3133
  YY_BUFFER_STATE b;
3367
3134
 
@@ -3369,69 +3136,68 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann
3369
3136
  base[size-2] != YY_END_OF_BUFFER_CHAR ||
3370
3137
  base[size-1] != YY_END_OF_BUFFER_CHAR )
3371
3138
  /* They forgot to leave room for the EOB's. */
3372
- return NULL;
3139
+ return 0;
3373
3140
 
3374
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
3141
+ b = (YY_BUFFER_STATE) core_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
3375
3142
  if ( ! b )
3376
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3143
+ YY_FATAL_ERROR( "out of dynamic memory in core_yy_scan_buffer()" );
3377
3144
 
3378
- b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
3145
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
3379
3146
  b->yy_buf_pos = b->yy_ch_buf = base;
3380
3147
  b->yy_is_our_buffer = 0;
3381
- b->yy_input_file = NULL;
3148
+ b->yy_input_file = 0;
3382
3149
  b->yy_n_chars = b->yy_buf_size;
3383
3150
  b->yy_is_interactive = 0;
3384
3151
  b->yy_at_bol = 1;
3385
3152
  b->yy_fill_buffer = 0;
3386
3153
  b->yy_buffer_status = YY_BUFFER_NEW;
3387
3154
 
3388
- yy_switch_to_buffer( b , yyscanner );
3155
+ core_yy_switch_to_buffer(b ,yyscanner );
3389
3156
 
3390
3157
  return b;
3391
3158
  }
3392
3159
 
3393
- /** Setup the input buffer state to scan a string. The next call to yylex() will
3160
+ /** Setup the input buffer state to scan a string. The next call to core_yylex() will
3394
3161
  * scan from a @e copy of @a str.
3395
3162
  * @param yystr a NUL-terminated string to scan
3396
3163
  * @param yyscanner The scanner object.
3397
3164
  * @return the newly allocated buffer state object.
3398
3165
  * @note If you want to scan bytes that may contain NUL values, then use
3399
- * yy_scan_bytes() instead.
3166
+ * core_yy_scan_bytes() instead.
3400
3167
  */
3401
- YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
3168
+ YY_BUFFER_STATE core_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
3402
3169
  {
3403
3170
 
3404
- return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
3171
+ return core_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
3405
3172
  }
3406
3173
 
3407
- /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
3174
+ /** Setup the input buffer state to scan the given bytes. The next call to core_yylex() will
3408
3175
  * scan from a @e copy of @a bytes.
3409
- * @param yybytes the byte buffer to scan
3410
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
3176
+ * @param bytes the byte buffer to scan
3177
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
3411
3178
  * @param yyscanner The scanner object.
3412
3179
  * @return the newly allocated buffer state object.
3413
3180
  */
3414
- YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
3181
+ YY_BUFFER_STATE core_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
3415
3182
  {
3416
3183
  YY_BUFFER_STATE b;
3417
3184
  char *buf;
3418
- yy_size_t n;
3419
- yy_size_t i;
3185
+ yy_size_t n, i;
3420
3186
 
3421
3187
  /* Get memory for full buffer, including space for trailing EOB's. */
3422
- n = (yy_size_t) (_yybytes_len + 2);
3423
- buf = (char *) yyalloc( n , yyscanner );
3188
+ n = _yybytes_len + 2;
3189
+ buf = (char *) core_yyalloc(n ,yyscanner );
3424
3190
  if ( ! buf )
3425
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3191
+ YY_FATAL_ERROR( "out of dynamic memory in core_yy_scan_bytes()" );
3426
3192
 
3427
3193
  for ( i = 0; i < _yybytes_len; ++i )
3428
3194
  buf[i] = yybytes[i];
3429
3195
 
3430
3196
  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3431
3197
 
3432
- b = yy_scan_buffer( buf, n , yyscanner);
3198
+ b = core_yy_scan_buffer(buf,n ,yyscanner);
3433
3199
  if ( ! b )
3434
- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3200
+ YY_FATAL_ERROR( "bad buffer in core_yy_scan_bytes()" );
3435
3201
 
3436
3202
  /* It's okay to grow etc. this buffer, and we should throw it
3437
3203
  * away when we're done.
@@ -3445,11 +3211,9 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len ,
3445
3211
  #define YY_EXIT_FAILURE 2
3446
3212
  #endif
3447
3213
 
3448
- static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
3214
+ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
3449
3215
  {
3450
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3451
- (void)yyg;
3452
- //( stderr, "%s\n", msg );
3216
+ //( stderr, "%s\n", msg );
3453
3217
  throw std::runtime_error(msg); // YY_EXIT_FAILURE );
3454
3218
  }
3455
3219
 
@@ -3460,7 +3224,7 @@ static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
3460
3224
  do \
3461
3225
  { \
3462
3226
  /* Undo effects of setting up yytext. */ \
3463
- yy_size_t yyless_macro_arg = (n); \
3227
+ int yyless_macro_arg = (n); \
3464
3228
  YY_LESS_LINENO(yyless_macro_arg);\
3465
3229
  yytext[yyleng] = yyg->yy_hold_char; \
3466
3230
  yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
@@ -3475,7 +3239,7 @@ static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
3475
3239
  /** Get the user-defined data for this scanner.
3476
3240
  * @param yyscanner The scanner object.
3477
3241
  */
3478
- YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
3242
+ YY_EXTRA_TYPE core_yyget_extra (yyscan_t yyscanner)
3479
3243
  {
3480
3244
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3481
3245
  return yyextra;
@@ -3484,10 +3248,10 @@ YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
3484
3248
  /** Get the current line number.
3485
3249
  * @param yyscanner The scanner object.
3486
3250
  */
3487
- int yyget_lineno (yyscan_t yyscanner)
3251
+ int core_yyget_lineno (yyscan_t yyscanner)
3488
3252
  {
3489
3253
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3490
-
3254
+
3491
3255
  if (! YY_CURRENT_BUFFER)
3492
3256
  return 0;
3493
3257
 
@@ -3497,10 +3261,10 @@ int yyget_lineno (yyscan_t yyscanner)
3497
3261
  /** Get the current column number.
3498
3262
  * @param yyscanner The scanner object.
3499
3263
  */
3500
- int yyget_column (yyscan_t yyscanner)
3264
+ int core_yyget_column (yyscan_t yyscanner)
3501
3265
  {
3502
3266
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3503
-
3267
+
3504
3268
  if (! YY_CURRENT_BUFFER)
3505
3269
  return 0;
3506
3270
 
@@ -3510,7 +3274,7 @@ int yyget_column (yyscan_t yyscanner)
3510
3274
  /** Get the input stream.
3511
3275
  * @param yyscanner The scanner object.
3512
3276
  */
3513
- FILE *yyget_in (yyscan_t yyscanner)
3277
+ FILE *core_yyget_in (yyscan_t yyscanner)
3514
3278
  {
3515
3279
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3516
3280
  return yyin;
@@ -3519,7 +3283,7 @@ FILE *yyget_in (yyscan_t yyscanner)
3519
3283
  /** Get the output stream.
3520
3284
  * @param yyscanner The scanner object.
3521
3285
  */
3522
- FILE *yyget_out (yyscan_t yyscanner)
3286
+ FILE *core_yyget_out (yyscan_t yyscanner)
3523
3287
  {
3524
3288
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3525
3289
  return yyout;
@@ -3528,7 +3292,7 @@ FILE *yyget_out (yyscan_t yyscanner)
3528
3292
  /** Get the length of the current token.
3529
3293
  * @param yyscanner The scanner object.
3530
3294
  */
3531
- yy_size_t yyget_leng (yyscan_t yyscanner)
3295
+ yy_size_t core_yyget_leng (yyscan_t yyscanner)
3532
3296
  {
3533
3297
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3534
3298
  return yyleng;
@@ -3538,7 +3302,7 @@ yy_size_t yyget_leng (yyscan_t yyscanner)
3538
3302
  * @param yyscanner The scanner object.
3539
3303
  */
3540
3304
 
3541
- char *yyget_text (yyscan_t yyscanner)
3305
+ char *core_yyget_text (yyscan_t yyscanner)
3542
3306
  {
3543
3307
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3544
3308
  return yytext;
@@ -3548,93 +3312,93 @@ char *yyget_text (yyscan_t yyscanner)
3548
3312
  * @param user_defined The data to be associated with this scanner.
3549
3313
  * @param yyscanner The scanner object.
3550
3314
  */
3551
- void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
3315
+ void core_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
3552
3316
  {
3553
3317
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3554
3318
  yyextra = user_defined ;
3555
3319
  }
3556
3320
 
3557
3321
  /** Set the current line number.
3558
- * @param _line_number line number
3322
+ * @param line_number
3559
3323
  * @param yyscanner The scanner object.
3560
3324
  */
3561
- void yyset_lineno (int _line_number , yyscan_t yyscanner)
3325
+ void core_yyset_lineno (int line_number , yyscan_t yyscanner)
3562
3326
  {
3563
3327
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3564
3328
 
3565
3329
  /* lineno is only valid if an input buffer exists. */
3566
3330
  if (! YY_CURRENT_BUFFER )
3567
- YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
3331
+ yy_fatal_error( "core_yyset_lineno called with no buffer" , yyscanner);
3568
3332
 
3569
- yylineno = _line_number;
3333
+ yylineno = line_number;
3570
3334
  }
3571
3335
 
3572
3336
  /** Set the current column.
3573
- * @param _column_no column number
3337
+ * @param line_number
3574
3338
  * @param yyscanner The scanner object.
3575
3339
  */
3576
- void yyset_column (int _column_no , yyscan_t yyscanner)
3340
+ void core_yyset_column (int column_no , yyscan_t yyscanner)
3577
3341
  {
3578
3342
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3579
3343
 
3580
3344
  /* column is only valid if an input buffer exists. */
3581
3345
  if (! YY_CURRENT_BUFFER )
3582
- YY_FATAL_ERROR( "yyset_column called with no buffer" );
3346
+ yy_fatal_error( "core_yyset_column called with no buffer" , yyscanner);
3583
3347
 
3584
- yycolumn = _column_no;
3348
+ yycolumn = column_no;
3585
3349
  }
3586
3350
 
3587
3351
  /** Set the input stream. This does not discard the current
3588
3352
  * input buffer.
3589
- * @param _in_str A readable stream.
3353
+ * @param in_str A readable stream.
3590
3354
  * @param yyscanner The scanner object.
3591
- * @see yy_switch_to_buffer
3355
+ * @see core_yy_switch_to_buffer
3592
3356
  */
3593
- void yyset_in (FILE * _in_str , yyscan_t yyscanner)
3357
+ void core_yyset_in (FILE * in_str , yyscan_t yyscanner)
3594
3358
  {
3595
3359
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3596
- yyin = _in_str ;
3360
+ yyin = in_str ;
3597
3361
  }
3598
3362
 
3599
- void yyset_out (FILE * _out_str , yyscan_t yyscanner)
3363
+ void core_yyset_out (FILE * out_str , yyscan_t yyscanner)
3600
3364
  {
3601
3365
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3602
- yyout = _out_str ;
3366
+ yyout = out_str ;
3603
3367
  }
3604
3368
 
3605
- int yyget_debug (yyscan_t yyscanner)
3369
+ int core_yyget_debug (yyscan_t yyscanner)
3606
3370
  {
3607
3371
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3608
3372
  return yy_flex_debug;
3609
3373
  }
3610
3374
 
3611
- void yyset_debug (int _bdebug , yyscan_t yyscanner)
3375
+ void core_yyset_debug (int bdebug , yyscan_t yyscanner)
3612
3376
  {
3613
3377
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3614
- yy_flex_debug = _bdebug ;
3378
+ yy_flex_debug = bdebug ;
3615
3379
  }
3616
3380
 
3617
3381
  /* Accessor methods for yylval and yylloc */
3618
3382
 
3619
- YYSTYPE * yyget_lval (yyscan_t yyscanner)
3383
+ YYSTYPE * core_yyget_lval (yyscan_t yyscanner)
3620
3384
  {
3621
3385
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3622
3386
  return yylval;
3623
3387
  }
3624
3388
 
3625
- void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
3389
+ void core_yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
3626
3390
  {
3627
3391
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3628
3392
  yylval = yylval_param;
3629
3393
  }
3630
3394
 
3631
- YYLTYPE *yyget_lloc (yyscan_t yyscanner)
3395
+ YYLTYPE *core_yyget_lloc (yyscan_t yyscanner)
3632
3396
  {
3633
3397
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3634
3398
  return yylloc;
3635
3399
  }
3636
3400
 
3637
- void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
3401
+ void core_yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
3638
3402
  {
3639
3403
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3640
3404
  yylloc = yylloc_param;
@@ -3642,18 +3406,20 @@ void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
3642
3406
 
3643
3407
  /* User-visible API */
3644
3408
 
3645
- /* yylex_init is special because it creates the scanner itself, so it is
3409
+ /* core_yylex_init is special because it creates the scanner itself, so it is
3646
3410
  * the ONLY reentrant function that doesn't take the scanner as the last argument.
3647
3411
  * That's why we explicitly handle the declaration, instead of using our macros.
3648
3412
  */
3649
- int yylex_init(yyscan_t* ptr_yy_globals)
3413
+
3414
+ int core_yylex_init(yyscan_t* ptr_yy_globals)
3415
+
3650
3416
  {
3651
3417
  if (ptr_yy_globals == NULL){
3652
3418
  errno = EINVAL;
3653
3419
  return 1;
3654
3420
  }
3655
3421
 
3656
- *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
3422
+ *ptr_yy_globals = (yyscan_t) core_yyalloc ( sizeof( struct yyguts_t ), NULL );
3657
3423
 
3658
3424
  if (*ptr_yy_globals == NULL){
3659
3425
  errno = ENOMEM;
@@ -3666,37 +3432,39 @@ int yylex_init(yyscan_t* ptr_yy_globals)
3666
3432
  return yy_init_globals ( *ptr_yy_globals );
3667
3433
  }
3668
3434
 
3669
- /* yylex_init_extra has the same functionality as yylex_init, but follows the
3435
+ /* core_yylex_init_extra has the same functionality as core_yylex_init, but follows the
3670
3436
  * convention of taking the scanner as the last argument. Note however, that
3671
3437
  * this is a *pointer* to a scanner, as it will be allocated by this call (and
3672
3438
  * is the reason, too, why this function also must handle its own declaration).
3673
- * The user defined value in the first argument will be available to yyalloc in
3439
+ * The user defined value in the first argument will be available to core_yyalloc in
3674
3440
  * the yyextra field.
3675
3441
  */
3676
- int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
3442
+
3443
+ int core_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
3444
+
3677
3445
  {
3678
3446
  struct yyguts_t dummy_yyguts;
3679
3447
 
3680
- yyset_extra (yy_user_defined, &dummy_yyguts);
3448
+ core_yyset_extra (yy_user_defined, &dummy_yyguts);
3681
3449
 
3682
3450
  if (ptr_yy_globals == NULL){
3683
3451
  errno = EINVAL;
3684
3452
  return 1;
3685
3453
  }
3686
-
3687
- *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
3688
-
3454
+
3455
+ *ptr_yy_globals = (yyscan_t) core_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
3456
+
3689
3457
  if (*ptr_yy_globals == NULL){
3690
3458
  errno = ENOMEM;
3691
3459
  return 1;
3692
3460
  }
3693
-
3461
+
3694
3462
  /* By setting to 0xAA, we expose bugs in
3695
3463
  yy_init_globals. Leave at 0x00 for releases. */
3696
3464
  memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
3697
-
3698
- yyset_extra (yy_user_defined, *ptr_yy_globals);
3699
-
3465
+
3466
+ core_yyset_extra (yy_user_defined, *ptr_yy_globals);
3467
+
3700
3468
  return yy_init_globals ( *ptr_yy_globals );
3701
3469
  }
3702
3470
 
@@ -3704,13 +3472,13 @@ static int yy_init_globals (yyscan_t yyscanner)
3704
3472
  {
3705
3473
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3706
3474
  /* Initialization is the same as for the non-reentrant scanner.
3707
- * This function is called from yylex_destroy(), so don't allocate here.
3475
+ * This function is called from core_yylex_destroy(), so don't allocate here.
3708
3476
  */
3709
3477
 
3710
- yyg->yy_buffer_stack = NULL;
3478
+ yyg->yy_buffer_stack = 0;
3711
3479
  yyg->yy_buffer_stack_top = 0;
3712
3480
  yyg->yy_buffer_stack_max = 0;
3713
- yyg->yy_c_buf_p = NULL;
3481
+ yyg->yy_c_buf_p = (char *) 0;
3714
3482
  yyg->yy_init = 0;
3715
3483
  yyg->yy_start = 0;
3716
3484
 
@@ -3719,46 +3487,41 @@ static int yy_init_globals (yyscan_t yyscanner)
3719
3487
  yyg->yy_start_stack = NULL;
3720
3488
 
3721
3489
  /* Defined in main.c */
3722
- #ifdef YY_STDINIT
3723
- yyin = stdin;
3724
- yyout = stdout;
3725
- #else
3726
- yyin = NULL;
3727
- yyout = NULL;
3728
- #endif
3490
+ yyin = (FILE *) 0;
3491
+ yyout = (FILE *) 0;
3729
3492
 
3730
3493
  /* For future reference: Set errno on error, since we are called by
3731
- * yylex_init()
3494
+ * core_yylex_init()
3732
3495
  */
3733
3496
  return 0;
3734
3497
  }
3735
3498
 
3736
- /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3737
- int yylex_destroy (yyscan_t yyscanner)
3499
+ /* core_yylex_destroy is for both reentrant and non-reentrant scanners. */
3500
+ int core_yylex_destroy (yyscan_t yyscanner)
3738
3501
  {
3739
3502
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3740
3503
 
3741
3504
  /* Pop the buffer stack, destroying each element. */
3742
3505
  while(YY_CURRENT_BUFFER){
3743
- yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
3506
+ core_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
3744
3507
  YY_CURRENT_BUFFER_LVALUE = NULL;
3745
- yypop_buffer_state(yyscanner);
3508
+ core_yypop_buffer_state(yyscanner);
3746
3509
  }
3747
3510
 
3748
3511
  /* Destroy the stack itself. */
3749
- yyfree(yyg->yy_buffer_stack , yyscanner);
3512
+ core_yyfree(yyg->yy_buffer_stack ,yyscanner);
3750
3513
  yyg->yy_buffer_stack = NULL;
3751
3514
 
3752
3515
  /* Destroy the start condition stack. */
3753
- yyfree( yyg->yy_start_stack , yyscanner );
3516
+ core_yyfree(yyg->yy_start_stack ,yyscanner );
3754
3517
  yyg->yy_start_stack = NULL;
3755
3518
 
3756
3519
  /* Reset the globals. This is important in a non-reentrant scanner so the next time
3757
- * yylex() is called, initialization will occur. */
3520
+ * core_yylex() is called, initialization will occur. */
3758
3521
  yy_init_globals( yyscanner);
3759
3522
 
3760
3523
  /* Destroy the main struct (reentrant only). */
3761
- yyfree ( yyscanner , yyscanner );
3524
+ core_yyfree ( yyscanner , yyscanner );
3762
3525
  yyscanner = NULL;
3763
3526
  return 0;
3764
3527
  }
@@ -3768,11 +3531,8 @@ int yylex_destroy (yyscan_t yyscanner)
3768
3531
  */
3769
3532
 
3770
3533
  #ifndef yytext_ptr
3771
- static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
3534
+ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
3772
3535
  {
3773
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3774
- (void)yyg;
3775
-
3776
3536
  int i;
3777
3537
  for ( i = 0; i < n; ++i )
3778
3538
  s1[i] = s2[i];
@@ -3780,7 +3540,7 @@ static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscann
3780
3540
  #endif
3781
3541
 
3782
3542
  #ifdef YY_NEED_STRLEN
3783
- static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
3543
+ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
3784
3544
  {
3785
3545
  int n;
3786
3546
  for ( n = 0; s[n]; ++n )
@@ -3795,10 +3555,11 @@ static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
3795
3555
  #line 1089 "third_party/libpg_query/scan.l"
3796
3556
 
3797
3557
 
3558
+
3798
3559
  /* LCOV_EXCL_STOP */
3799
3560
 
3800
3561
  /*
3801
- * Arrange access to yyextra for subroutines of the main yylex() function.
3562
+ * Arrange access to yyextra for subroutines of the main core_yylex() function.
3802
3563
  * We expect each subroutine to have a yyscanner parameter. Rather than
3803
3564
  * use the yyget_xxx functions, which might or might not get inlined by the
3804
3565
  * compiler, we cheat just a bit and cast yyscanner to the right type.
@@ -3843,7 +3604,7 @@ scanner_errposition(int location, core_yyscan_t yyscanner)
3843
3604
  * Report a lexer or grammar error.
3844
3605
  *
3845
3606
  * The message's cursor position is whatever YYLLOC was last set to,
3846
- * ie, the start of the current token if called within yylex(), or the
3607
+ * ie, the start of the current token if called within core_yylex(), or the
3847
3608
  * most recently lexed token if called from the grammar.
3848
3609
  * This is OK for syntax error messages from the Bison parser, because Bison
3849
3610
  * parsers report error as soon as the first unparsable token is reached.
@@ -3886,8 +3647,8 @@ scanner_init(const char *str,
3886
3647
  PGSize slen = strlen(str);
3887
3648
  yyscan_t scanner;
3888
3649
 
3889
- if (yylex_init(&scanner) != 0)
3890
- elog(ERROR, "yylex_init() failed: %m");
3650
+ if (core_yylex_init(&scanner) != 0)
3651
+ elog(ERROR, "core_yylex_init() failed: %m");
3891
3652
 
3892
3653
  core_yyset_extra(yyext, scanner);
3893
3654
 
@@ -3905,7 +3666,7 @@ scanner_init(const char *str,
3905
3666
  yyext->scanbuflen = slen;
3906
3667
  memcpy(yyext->scanbuf, str, slen);
3907
3668
  yyext->scanbuf[slen] = yyext->scanbuf[slen + 1] = YY_END_OF_BUFFER_CHAR;
3908
- yy_scan_buffer(yyext->scanbuf, slen + 2, scanner);
3669
+ core_yy_scan_buffer(yyext->scanbuf,slen + 2,scanner);
3909
3670
 
3910
3671
  /* initialize literal buffer to a reasonable but expansible size */
3911
3672
  yyext->literalalloc = 1024;
@@ -3923,7 +3684,7 @@ void
3923
3684
  scanner_finish(core_yyscan_t yyscanner)
3924
3685
  {
3925
3686
  /*
3926
- * We don't bother to call yylex_destroy(), because all it would do is
3687
+ * We don't bother to call core_yylex_destroy(), because all it would do is
3927
3688
  * pfree a small amount of control storage. It's cheaper to leak the
3928
3689
  * storage until the parsing context is destroyed. The amount of space
3929
3690
  * involved is usually negligible compared to the output parse tree