kdlquery 1.0.0__tar.gz

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 (603) hide show
  1. kdlquery-1.0.0/.gitignore +10 -0
  2. kdlquery-1.0.0/.python-version +1 -0
  3. kdlquery-1.0.0/LICENSE +21 -0
  4. kdlquery-1.0.0/PKG-INFO +302 -0
  5. kdlquery-1.0.0/QUERY.md +429 -0
  6. kdlquery-1.0.0/README.md +294 -0
  7. kdlquery-1.0.0/examples/config_dsl.py +128 -0
  8. kdlquery-1.0.0/examples/xml_reader.py +102 -0
  9. kdlquery-1.0.0/kdlquery/__init__.py +83 -0
  10. kdlquery-1.0.0/kdlquery/dict_reader.py +97 -0
  11. kdlquery-1.0.0/kdlquery/document.py +178 -0
  12. kdlquery-1.0.0/kdlquery/parser.py +1217 -0
  13. kdlquery-1.0.0/kdlquery/reader.py +730 -0
  14. kdlquery-1.0.0/kdlquery/selector.py +750 -0
  15. kdlquery-1.0.0/kdlquery/types.py +112 -0
  16. kdlquery-1.0.0/llm.txt +150 -0
  17. kdlquery-1.0.0/pyproject.toml +19 -0
  18. kdlquery-1.0.0/tests/kdl_test_cases/README.md +1 -0
  19. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/all_escapes.kdl +1 -0
  20. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/all_node_fields.kdl +3 -0
  21. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_and_prop_same_name.kdl +1 -0
  22. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_bare.kdl +1 -0
  23. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_false_type.kdl +1 -0
  24. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_float_type.kdl +1 -0
  25. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_hex_type.kdl +1 -0
  26. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_null_type.kdl +1 -0
  27. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_raw_string_type.kdl +1 -0
  28. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_string_type.kdl +1 -0
  29. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_true_type.kdl +1 -0
  30. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_type.kdl +1 -0
  31. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_zero_type.kdl +1 -0
  32. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/asterisk_in_block_comment.kdl +1 -0
  33. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/bare_emoji.kdl +1 -0
  34. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/bare_ident_dot.kdl +1 -0
  35. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/bare_ident_sign.kdl +1 -0
  36. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/bare_ident_sign_dot.kdl +1 -0
  37. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/binary.kdl +1 -0
  38. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/binary_trailing_underscore.kdl +1 -0
  39. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/binary_underscore.kdl +1 -0
  40. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/blank_arg_type.kdl +1 -0
  41. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/blank_node_type.kdl +1 -0
  42. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/blank_prop_type.kdl +1 -0
  43. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/block_comment.kdl +1 -0
  44. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/block_comment_after_node.kdl +1 -0
  45. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/block_comment_before_node.kdl +1 -0
  46. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/block_comment_before_node_no_space.kdl +1 -0
  47. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/block_comment_newline.kdl +1 -0
  48. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/bom_initial.kdl +1 -0
  49. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/boolean_arg.kdl +1 -0
  50. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/boolean_prop.kdl +1 -0
  51. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/braces_in_bare_id.kdl +3 -0
  52. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/chevrons_in_bare_id.kdl +1 -0
  53. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/comma_in_bare_id.kdl +1 -0
  54. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/comment_after_arg_type.kdl +1 -0
  55. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/comment_after_node_type.kdl +1 -0
  56. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/comment_after_prop_type.kdl +1 -0
  57. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/comment_and_newline.kdl +2 -0
  58. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/comment_in_arg_type.kdl +1 -0
  59. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/comment_in_node_type.kdl +1 -0
  60. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/comment_in_prop_type.kdl +1 -0
  61. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/commented_arg.kdl +1 -0
  62. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/commented_child.kdl +1 -0
  63. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/commented_line.kdl +1 -0
  64. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/commented_node.kdl +1 -0
  65. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/commented_prop.kdl +1 -0
  66. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/crlf_between_nodes.kdl +2 -0
  67. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/dash_dash.kdl +1 -0
  68. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/emoji.kdl +1 -0
  69. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/empty.kdl +1 -0
  70. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/empty_child.kdl +1 -0
  71. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/empty_child_different_lines.kdl +1 -0
  72. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/empty_child_same_line.kdl +1 -0
  73. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/empty_child_whitespace.kdl +1 -0
  74. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/empty_line_comment.kdl +1 -0
  75. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/empty_quoted_node_id.kdl +1 -0
  76. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/empty_quoted_prop_key.kdl +1 -0
  77. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/empty_string_arg.kdl +1 -0
  78. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/eof_after_escape.kdl +1 -0
  79. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/esc_multiple_newlines.kdl +1 -0
  80. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/esc_newline_in_string.kdl +1 -0
  81. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/esc_unicode_in_string.kdl +1 -0
  82. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escaped_whitespace.kdl +1 -0
  83. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline.kdl +1 -0
  84. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline_after_semicolon.kdl +2 -0
  85. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline_alone.kdl +1 -0
  86. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline_empty_line.kdl +1 -0
  87. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline_end_of_node.kdl +2 -0
  88. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline_in_child_block.kdl +4 -0
  89. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline_line_comment.kdl +1 -0
  90. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline_node.kdl +2 -0
  91. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline_node_type.kdl +1 -0
  92. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline_slashdash.kdl +1 -0
  93. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/false_prefix_in_bare_id.kdl +1 -0
  94. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/false_prefix_in_prop_key.kdl +1 -0
  95. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/floating_point_keywords.kdl +1 -0
  96. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/hex.kdl +1 -0
  97. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/hex_int.kdl +1 -0
  98. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/hex_int_underscores.kdl +1 -0
  99. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/hex_leading_zero.kdl +1 -0
  100. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/initial_slashdash.kdl +1 -0
  101. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/int_multiple_underscore.kdl +1 -0
  102. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/just_block_comment.kdl +1 -0
  103. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/just_child.kdl +3 -0
  104. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/just_newline.kdl +1 -0
  105. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/just_node_id.kdl +1 -0
  106. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/just_space.kdl +1 -0
  107. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/leading_newline.kdl +1 -0
  108. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/leading_zero_binary.kdl +1 -0
  109. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/leading_zero_int.kdl +1 -0
  110. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/leading_zero_oct.kdl +1 -0
  111. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_comment.kdl +1 -0
  112. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_nodes.kdl +1 -0
  113. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_raw_string.kdl +1 -0
  114. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_raw_string_containing_quotes.kdl +1 -0
  115. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_raw_string_empty.kdl +1 -0
  116. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_raw_string_empty_indented.kdl +1 -0
  117. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_raw_string_indented.kdl +1 -0
  118. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string.kdl +1 -0
  119. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_containing_quotes.kdl +1 -0
  120. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_double_backslash.kdl +1 -0
  121. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_empty.kdl +1 -0
  122. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_empty_indented.kdl +1 -0
  123. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_escape_delimiter.kdl +1 -0
  124. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_escape_in_closing_line.kdl +1 -0
  125. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_escape_in_closing_line_shallow.kdl +1 -0
  126. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_escape_newline_at_end.kdl +1 -0
  127. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_indented.kdl +1 -0
  128. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_only_1_quote.kdl +1 -0
  129. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_only_2_quotes.kdl +1 -0
  130. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_whitespace_only.kdl +1 -0
  131. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_wrapped_binary.kdl +1 -0
  132. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/negative_exponent.kdl +1 -0
  133. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/negative_float.kdl +1 -0
  134. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/negative_int.kdl +1 -0
  135. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/nested_block_comment.kdl +1 -0
  136. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/nested_children.kdl +5 -0
  137. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/nested_comments.kdl +1 -0
  138. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/nested_multiline_block_comment.kdl +1 -0
  139. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/newline_between_nodes.kdl +2 -0
  140. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/newlines_in_block_comment.kdl +1 -0
  141. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/no_decimal_exponent.kdl +1 -0
  142. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/node_false.kdl +1 -0
  143. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/node_true.kdl +1 -0
  144. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/node_type.kdl +1 -0
  145. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/null_arg.kdl +1 -0
  146. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/null_prefix_in_bare_id.kdl +1 -0
  147. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/null_prefix_in_prop_key.kdl +1 -0
  148. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/null_prop.kdl +1 -0
  149. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/numeric_arg.kdl +1 -0
  150. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/numeric_prop.kdl +1 -0
  151. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/octal.kdl +1 -0
  152. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/only_cr.kdl +1 -0
  153. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/only_line_comment.kdl +1 -0
  154. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/only_line_comment_crlf.kdl +1 -0
  155. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/only_line_comment_newline.kdl +1 -0
  156. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/optional_child_semicolon.kdl +5 -0
  157. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/parse_all_arg_types.kdl +1 -0
  158. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/positive_exponent.kdl +1 -0
  159. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/positive_int.kdl +1 -0
  160. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/preserve_duplicate_nodes.kdl +2 -0
  161. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/preserve_node_order.kdl +3 -0
  162. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_false_type.kdl +1 -0
  163. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_float_type.kdl +1 -0
  164. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_hex_type.kdl +1 -0
  165. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_identifier_type.kdl +1 -0
  166. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_null_type.kdl +1 -0
  167. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_raw_string_type.kdl +1 -0
  168. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_string_type.kdl +1 -0
  169. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_true_type.kdl +1 -0
  170. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_type.kdl +1 -0
  171. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_zero_type.kdl +1 -0
  172. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/question_mark_before_number.kdl +1 -0
  173. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/quoted_arg_type.kdl +1 -0
  174. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/quoted_node_name.kdl +1 -0
  175. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/quoted_node_type.kdl +1 -0
  176. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/quoted_numeric.kdl +1 -0
  177. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/quoted_prop_name.kdl +1 -0
  178. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/quoted_prop_type.kdl +1 -0
  179. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/r_node.kdl +1 -0
  180. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_arg_type.kdl +1 -0
  181. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_node_name.kdl +1 -0
  182. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_node_type.kdl +1 -0
  183. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_prop_type.kdl +1 -0
  184. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_string_arg.kdl +2 -0
  185. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_string_backslash.kdl +1 -0
  186. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_string_hash_no_esc.kdl +1 -0
  187. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_string_just_backslash.kdl +1 -0
  188. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_string_multiple_hash.kdl +1 -0
  189. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_string_newline.kdl +1 -0
  190. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_string_prop.kdl +2 -0
  191. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_string_quote.kdl +1 -0
  192. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/repeated_arg.kdl +1 -0
  193. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/repeated_prop.kdl +1 -0
  194. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/same_name_nodes.kdl +2 -0
  195. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/sci_notation_large.kdl +1 -0
  196. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/sci_notation_small.kdl +1 -0
  197. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/semicolon_after_child.kdl +3 -0
  198. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/semicolon_in_child.kdl +3 -0
  199. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/semicolon_separated.kdl +2 -0
  200. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/semicolon_separated_nodes.kdl +2 -0
  201. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/semicolon_terminated.kdl +1 -0
  202. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/single_arg.kdl +1 -0
  203. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/single_prop.kdl +1 -0
  204. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_arg_after_newline_esc.kdl +1 -0
  205. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_arg_before_newline_esc.kdl +1 -0
  206. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_child.kdl +1 -0
  207. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_empty_child.kdl +1 -0
  208. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_escline_before_arg_type.kdl +1 -0
  209. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_escline_before_children.kdl +1 -0
  210. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_escline_before_node.kdl +1 -0
  211. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_false_node.kdl +1 -0
  212. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_full_node.kdl +1 -0
  213. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_in_slashdash.kdl +1 -0
  214. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_multi_line_comment_entry.kdl +1 -0
  215. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_multi_line_comment_inline.kdl +1 -0
  216. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_multiple_child_blocks.kdl +3 -0
  217. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_negative_number.kdl +1 -0
  218. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_newline_before_children.kdl +1 -0
  219. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_newline_before_entry.kdl +1 -0
  220. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_newline_before_node.kdl +1 -0
  221. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_node_in_child.kdl +1 -0
  222. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_node_with_child.kdl +1 -0
  223. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_only_node.kdl +1 -0
  224. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_only_node_with_space.kdl +1 -0
  225. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_prop.kdl +1 -0
  226. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_raw_prop_key.kdl +1 -0
  227. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_repeated_prop.kdl +1 -0
  228. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_single_line_comment_entry.kdl +1 -0
  229. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_single_line_comment_node.kdl +1 -0
  230. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/space_after_arg_type.kdl +1 -0
  231. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/space_after_node_type.kdl +1 -0
  232. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/space_after_prop_type.kdl +1 -0
  233. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/space_around_prop_marker.kdl +1 -0
  234. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/space_in_arg_type.kdl +1 -0
  235. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/space_in_node_type.kdl +1 -0
  236. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/space_in_prop_type.kdl +1 -0
  237. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/string_arg.kdl +1 -0
  238. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/string_escaped_literal_whitespace.kdl +1 -0
  239. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/string_prop.kdl +1 -0
  240. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/tab_space.kdl +1 -0
  241. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/trailing_crlf.kdl +1 -0
  242. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/trailing_underscore_hex.kdl +1 -0
  243. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/trailing_underscore_octal.kdl +1 -0
  244. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/true_prefix_in_bare_id.kdl +1 -0
  245. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/true_prefix_in_prop_key.kdl +1 -0
  246. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/two_nodes.kdl +2 -0
  247. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/underscore_before_number.kdl +1 -0
  248. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/underscore_in_exponent.kdl +1 -0
  249. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/underscore_in_float.kdl +1 -0
  250. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/underscore_in_fraction.kdl +1 -0
  251. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/underscore_in_int.kdl +1 -0
  252. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/underscore_in_octal.kdl +1 -0
  253. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/unicode_silly.kdl +1 -0
  254. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/unusual_bare_id_chars_in_quoted_id.kdl +1 -0
  255. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/unusual_chars_in_bare_id.kdl +1 -0
  256. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/vertical_tab_whitespace.kdl +2 -0
  257. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/zero_float.kdl +1 -0
  258. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/zero_int.kdl +1 -0
  259. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/zero_space_before_slashdash_arg.kdl +1 -0
  260. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/zero_space_before_slashdash_children.kdl +2 -0
  261. kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/zero_space_before_slashdash_prop.kdl +1 -0
  262. kdlquery-1.0.0/tests/kdl_test_cases/input/all_escapes.kdl +1 -0
  263. kdlquery-1.0.0/tests/kdl_test_cases/input/all_node_fields.kdl +3 -0
  264. kdlquery-1.0.0/tests/kdl_test_cases/input/arg_and_prop_same_name.kdl +1 -0
  265. kdlquery-1.0.0/tests/kdl_test_cases/input/arg_bare.kdl +1 -0
  266. kdlquery-1.0.0/tests/kdl_test_cases/input/arg_false_type.kdl +1 -0
  267. kdlquery-1.0.0/tests/kdl_test_cases/input/arg_float_type.kdl +1 -0
  268. kdlquery-1.0.0/tests/kdl_test_cases/input/arg_hex_type.kdl +1 -0
  269. kdlquery-1.0.0/tests/kdl_test_cases/input/arg_null_type.kdl +1 -0
  270. kdlquery-1.0.0/tests/kdl_test_cases/input/arg_raw_string_type.kdl +1 -0
  271. kdlquery-1.0.0/tests/kdl_test_cases/input/arg_string_type.kdl +1 -0
  272. kdlquery-1.0.0/tests/kdl_test_cases/input/arg_true_type.kdl +1 -0
  273. kdlquery-1.0.0/tests/kdl_test_cases/input/arg_type.kdl +1 -0
  274. kdlquery-1.0.0/tests/kdl_test_cases/input/arg_zero_type.kdl +1 -0
  275. kdlquery-1.0.0/tests/kdl_test_cases/input/asterisk_in_block_comment.kdl +1 -0
  276. kdlquery-1.0.0/tests/kdl_test_cases/input/bare_emoji.kdl +1 -0
  277. kdlquery-1.0.0/tests/kdl_test_cases/input/bare_ident_dot.kdl +1 -0
  278. kdlquery-1.0.0/tests/kdl_test_cases/input/bare_ident_numeric_dot_fail.kdl +1 -0
  279. kdlquery-1.0.0/tests/kdl_test_cases/input/bare_ident_numeric_fail.kdl +1 -0
  280. kdlquery-1.0.0/tests/kdl_test_cases/input/bare_ident_numeric_sign_fail.kdl +1 -0
  281. kdlquery-1.0.0/tests/kdl_test_cases/input/bare_ident_sign.kdl +1 -0
  282. kdlquery-1.0.0/tests/kdl_test_cases/input/bare_ident_sign_dot.kdl +1 -0
  283. kdlquery-1.0.0/tests/kdl_test_cases/input/binary.kdl +1 -0
  284. kdlquery-1.0.0/tests/kdl_test_cases/input/binary_trailing_underscore.kdl +1 -0
  285. kdlquery-1.0.0/tests/kdl_test_cases/input/binary_underscore.kdl +1 -0
  286. kdlquery-1.0.0/tests/kdl_test_cases/input/blank_arg_type.kdl +1 -0
  287. kdlquery-1.0.0/tests/kdl_test_cases/input/blank_node_type.kdl +1 -0
  288. kdlquery-1.0.0/tests/kdl_test_cases/input/blank_prop_type.kdl +1 -0
  289. kdlquery-1.0.0/tests/kdl_test_cases/input/block_comment.kdl +1 -0
  290. kdlquery-1.0.0/tests/kdl_test_cases/input/block_comment_after_node.kdl +1 -0
  291. kdlquery-1.0.0/tests/kdl_test_cases/input/block_comment_before_node.kdl +1 -0
  292. kdlquery-1.0.0/tests/kdl_test_cases/input/block_comment_before_node_no_space.kdl +1 -0
  293. kdlquery-1.0.0/tests/kdl_test_cases/input/block_comment_newline.kdl +1 -0
  294. kdlquery-1.0.0/tests/kdl_test_cases/input/bom_initial.kdl +1 -0
  295. kdlquery-1.0.0/tests/kdl_test_cases/input/bom_later_fail.kdl +1 -0
  296. kdlquery-1.0.0/tests/kdl_test_cases/input/boolean_arg.kdl +1 -0
  297. kdlquery-1.0.0/tests/kdl_test_cases/input/boolean_prop.kdl +1 -0
  298. kdlquery-1.0.0/tests/kdl_test_cases/input/braces_in_bare_id.kdl +1 -0
  299. kdlquery-1.0.0/tests/kdl_test_cases/input/chevrons_in_bare_id.kdl +1 -0
  300. kdlquery-1.0.0/tests/kdl_test_cases/input/comma_in_bare_id.kdl +1 -0
  301. kdlquery-1.0.0/tests/kdl_test_cases/input/comment_after_arg_type.kdl +1 -0
  302. kdlquery-1.0.0/tests/kdl_test_cases/input/comment_after_node_type.kdl +1 -0
  303. kdlquery-1.0.0/tests/kdl_test_cases/input/comment_after_prop_type.kdl +1 -0
  304. kdlquery-1.0.0/tests/kdl_test_cases/input/comment_and_newline.kdl +2 -0
  305. kdlquery-1.0.0/tests/kdl_test_cases/input/comment_in_arg_type.kdl +1 -0
  306. kdlquery-1.0.0/tests/kdl_test_cases/input/comment_in_node_type.kdl +1 -0
  307. kdlquery-1.0.0/tests/kdl_test_cases/input/comment_in_prop_type.kdl +1 -0
  308. kdlquery-1.0.0/tests/kdl_test_cases/input/commented_arg.kdl +1 -0
  309. kdlquery-1.0.0/tests/kdl_test_cases/input/commented_child.kdl +3 -0
  310. kdlquery-1.0.0/tests/kdl_test_cases/input/commented_line.kdl +2 -0
  311. kdlquery-1.0.0/tests/kdl_test_cases/input/commented_node.kdl +3 -0
  312. kdlquery-1.0.0/tests/kdl_test_cases/input/commented_prop.kdl +1 -0
  313. kdlquery-1.0.0/tests/kdl_test_cases/input/crlf_between_nodes.kdl +2 -0
  314. kdlquery-1.0.0/tests/kdl_test_cases/input/dash_dash.kdl +1 -0
  315. kdlquery-1.0.0/tests/kdl_test_cases/input/dot_but_no_fraction_before_exponent_fail.kdl +1 -0
  316. kdlquery-1.0.0/tests/kdl_test_cases/input/dot_but_no_fraction_fail.kdl +1 -0
  317. kdlquery-1.0.0/tests/kdl_test_cases/input/dot_in_exponent_fail.kdl +1 -0
  318. kdlquery-1.0.0/tests/kdl_test_cases/input/dot_zero_fail.kdl +1 -0
  319. kdlquery-1.0.0/tests/kdl_test_cases/input/emoji.kdl +1 -0
  320. kdlquery-1.0.0/tests/kdl_test_cases/input/empty.kdl +0 -0
  321. kdlquery-1.0.0/tests/kdl_test_cases/input/empty_arg_type_fail.kdl +1 -0
  322. kdlquery-1.0.0/tests/kdl_test_cases/input/empty_child.kdl +2 -0
  323. kdlquery-1.0.0/tests/kdl_test_cases/input/empty_child_different_lines.kdl +2 -0
  324. kdlquery-1.0.0/tests/kdl_test_cases/input/empty_child_same_line.kdl +1 -0
  325. kdlquery-1.0.0/tests/kdl_test_cases/input/empty_child_whitespace.kdl +3 -0
  326. kdlquery-1.0.0/tests/kdl_test_cases/input/empty_line_comment.kdl +2 -0
  327. kdlquery-1.0.0/tests/kdl_test_cases/input/empty_node_type_fail.kdl +1 -0
  328. kdlquery-1.0.0/tests/kdl_test_cases/input/empty_prop_type_fail.kdl +1 -0
  329. kdlquery-1.0.0/tests/kdl_test_cases/input/empty_quoted_node_id.kdl +1 -0
  330. kdlquery-1.0.0/tests/kdl_test_cases/input/empty_quoted_prop_key.kdl +1 -0
  331. kdlquery-1.0.0/tests/kdl_test_cases/input/empty_string_arg.kdl +1 -0
  332. kdlquery-1.0.0/tests/kdl_test_cases/input/eof_after_escape.kdl +1 -0
  333. kdlquery-1.0.0/tests/kdl_test_cases/input/err_backslash_in_bare_id_fail.kdl +1 -0
  334. kdlquery-1.0.0/tests/kdl_test_cases/input/esc_multiple_newlines.kdl +4 -0
  335. kdlquery-1.0.0/tests/kdl_test_cases/input/esc_newline_in_string.kdl +1 -0
  336. kdlquery-1.0.0/tests/kdl_test_cases/input/esc_unicode_in_string.kdl +1 -0
  337. kdlquery-1.0.0/tests/kdl_test_cases/input/escaped_whitespace.kdl +15 -0
  338. kdlquery-1.0.0/tests/kdl_test_cases/input/escline.kdl +2 -0
  339. kdlquery-1.0.0/tests/kdl_test_cases/input/escline_after_semicolon.kdl +2 -0
  340. kdlquery-1.0.0/tests/kdl_test_cases/input/escline_alone.kdl +1 -0
  341. kdlquery-1.0.0/tests/kdl_test_cases/input/escline_empty_line.kdl +3 -0
  342. kdlquery-1.0.0/tests/kdl_test_cases/input/escline_end_of_node.kdl +3 -0
  343. kdlquery-1.0.0/tests/kdl_test_cases/input/escline_in_child_block.kdl +5 -0
  344. kdlquery-1.0.0/tests/kdl_test_cases/input/escline_line_comment.kdl +3 -0
  345. kdlquery-1.0.0/tests/kdl_test_cases/input/escline_node.kdl +3 -0
  346. kdlquery-1.0.0/tests/kdl_test_cases/input/escline_node_type.kdl +2 -0
  347. kdlquery-1.0.0/tests/kdl_test_cases/input/escline_slashdash.kdl +4 -0
  348. kdlquery-1.0.0/tests/kdl_test_cases/input/false_prefix_in_bare_id.kdl +1 -0
  349. kdlquery-1.0.0/tests/kdl_test_cases/input/false_prefix_in_prop_key.kdl +1 -0
  350. kdlquery-1.0.0/tests/kdl_test_cases/input/false_prop_key_fail.kdl +1 -0
  351. kdlquery-1.0.0/tests/kdl_test_cases/input/floating_point_keyword_identifier_strings_fail.kdl +1 -0
  352. kdlquery-1.0.0/tests/kdl_test_cases/input/floating_point_keywords.kdl +1 -0
  353. kdlquery-1.0.0/tests/kdl_test_cases/input/hash_in_id_fail.kdl +1 -0
  354. kdlquery-1.0.0/tests/kdl_test_cases/input/hex.kdl +1 -0
  355. kdlquery-1.0.0/tests/kdl_test_cases/input/hex_int.kdl +1 -0
  356. kdlquery-1.0.0/tests/kdl_test_cases/input/hex_int_underscores.kdl +1 -0
  357. kdlquery-1.0.0/tests/kdl_test_cases/input/hex_leading_zero.kdl +1 -0
  358. kdlquery-1.0.0/tests/kdl_test_cases/input/illegal_char_in_binary_fail.kdl +1 -0
  359. kdlquery-1.0.0/tests/kdl_test_cases/input/illegal_char_in_hex_fail.kdl +1 -0
  360. kdlquery-1.0.0/tests/kdl_test_cases/input/illegal_char_in_octal_fail.kdl +1 -0
  361. kdlquery-1.0.0/tests/kdl_test_cases/input/initial_slashdash.kdl +2 -0
  362. kdlquery-1.0.0/tests/kdl_test_cases/input/int_multiple_underscore.kdl +1 -0
  363. kdlquery-1.0.0/tests/kdl_test_cases/input/just_block_comment.kdl +1 -0
  364. kdlquery-1.0.0/tests/kdl_test_cases/input/just_child.kdl +3 -0
  365. kdlquery-1.0.0/tests/kdl_test_cases/input/just_newline.kdl +1 -0
  366. kdlquery-1.0.0/tests/kdl_test_cases/input/just_node_id.kdl +1 -0
  367. kdlquery-1.0.0/tests/kdl_test_cases/input/just_space.kdl +1 -0
  368. kdlquery-1.0.0/tests/kdl_test_cases/input/just_space_in_arg_type_fail.kdl +1 -0
  369. kdlquery-1.0.0/tests/kdl_test_cases/input/just_space_in_node_type_fail.kdl +1 -0
  370. kdlquery-1.0.0/tests/kdl_test_cases/input/just_space_in_prop_type_fail.kdl +1 -0
  371. kdlquery-1.0.0/tests/kdl_test_cases/input/just_type_no_arg_fail.kdl +1 -0
  372. kdlquery-1.0.0/tests/kdl_test_cases/input/just_type_no_node_id_fail.kdl +1 -0
  373. kdlquery-1.0.0/tests/kdl_test_cases/input/just_type_no_prop_fail.kdl +1 -0
  374. kdlquery-1.0.0/tests/kdl_test_cases/input/leading_newline.kdl +2 -0
  375. kdlquery-1.0.0/tests/kdl_test_cases/input/leading_zero_binary.kdl +1 -0
  376. kdlquery-1.0.0/tests/kdl_test_cases/input/leading_zero_int.kdl +1 -0
  377. kdlquery-1.0.0/tests/kdl_test_cases/input/leading_zero_oct.kdl +1 -0
  378. kdlquery-1.0.0/tests/kdl_test_cases/input/legacy_raw_string_fail.kdl +1 -0
  379. kdlquery-1.0.0/tests/kdl_test_cases/input/legacy_raw_string_hash_fail.kdl +1 -0
  380. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_comment.kdl +4 -0
  381. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_nodes.kdl +3 -0
  382. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_raw_string.kdl +5 -0
  383. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_raw_string_containing_quotes.kdl +5 -0
  384. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_raw_string_empty.kdl +2 -0
  385. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_raw_string_empty_indented.kdl +2 -0
  386. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_raw_string_indented.kdl +5 -0
  387. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_raw_string_non_matching_prefix_character_error_fail.kdl +5 -0
  388. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_raw_string_non_matching_prefix_count_error_fail.kdl +5 -0
  389. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_raw_string_single_line_err_fail.kdl +1 -0
  390. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_raw_string_single_quote_err_fail.kdl +5 -0
  391. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string.kdl +5 -0
  392. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_containing_quotes.kdl +3 -0
  393. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_double_backslash.kdl +4 -0
  394. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_empty.kdl +2 -0
  395. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_empty_indented.kdl +2 -0
  396. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_escape_delimiter.kdl +3 -0
  397. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_escape_in_closing_line.kdl +5 -0
  398. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_escape_in_closing_line_shallow.kdl +5 -0
  399. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_escape_newline_at_end.kdl +4 -0
  400. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_escape_newline_at_end_fail.kdl +4 -0
  401. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_final_whitespace_escape_fail.kdl +4 -0
  402. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_indented.kdl +5 -0
  403. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_non_literal_prefix_fail.kdl +4 -0
  404. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_non_matching_prefix_character_error_fail.kdl +5 -0
  405. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_non_matching_prefix_count_error_fail.kdl +5 -0
  406. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_only_1_quote.kdl +3 -0
  407. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_only_2_quotes.kdl +3 -0
  408. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_single_line_err_fail.kdl +1 -0
  409. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_single_quote_err_fail.kdl +5 -0
  410. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_whitespace_only.kdl +18 -0
  411. kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_wrapped_binary.kdl +4 -0
  412. kdlquery-1.0.0/tests/kdl_test_cases/input/multiple_dots_in_float_before_exponent_fail.kdl +1 -0
  413. kdlquery-1.0.0/tests/kdl_test_cases/input/multiple_dots_in_float_fail.kdl +1 -0
  414. kdlquery-1.0.0/tests/kdl_test_cases/input/multiple_es_in_float_fail.kdl +1 -0
  415. kdlquery-1.0.0/tests/kdl_test_cases/input/multiple_x_in_hex_fail.kdl +1 -0
  416. kdlquery-1.0.0/tests/kdl_test_cases/input/negative_exponent.kdl +1 -0
  417. kdlquery-1.0.0/tests/kdl_test_cases/input/negative_float.kdl +1 -0
  418. kdlquery-1.0.0/tests/kdl_test_cases/input/negative_int.kdl +1 -0
  419. kdlquery-1.0.0/tests/kdl_test_cases/input/nested_block_comment.kdl +1 -0
  420. kdlquery-1.0.0/tests/kdl_test_cases/input/nested_children.kdl +5 -0
  421. kdlquery-1.0.0/tests/kdl_test_cases/input/nested_comments.kdl +1 -0
  422. kdlquery-1.0.0/tests/kdl_test_cases/input/nested_multiline_block_comment.kdl +6 -0
  423. kdlquery-1.0.0/tests/kdl_test_cases/input/newline_between_nodes.kdl +2 -0
  424. kdlquery-1.0.0/tests/kdl_test_cases/input/newlines_in_block_comment.kdl +3 -0
  425. kdlquery-1.0.0/tests/kdl_test_cases/input/no_decimal_exponent.kdl +1 -0
  426. kdlquery-1.0.0/tests/kdl_test_cases/input/no_digits_in_hex_fail.kdl +1 -0
  427. kdlquery-1.0.0/tests/kdl_test_cases/input/no_integer_digit_fail.kdl +1 -0
  428. kdlquery-1.0.0/tests/kdl_test_cases/input/no_solidus_escape_fail.kdl +1 -0
  429. kdlquery-1.0.0/tests/kdl_test_cases/input/node_false.kdl +1 -0
  430. kdlquery-1.0.0/tests/kdl_test_cases/input/node_true.kdl +1 -0
  431. kdlquery-1.0.0/tests/kdl_test_cases/input/node_type.kdl +1 -0
  432. kdlquery-1.0.0/tests/kdl_test_cases/input/null_arg.kdl +1 -0
  433. kdlquery-1.0.0/tests/kdl_test_cases/input/null_prefix_in_bare_id.kdl +1 -0
  434. kdlquery-1.0.0/tests/kdl_test_cases/input/null_prefix_in_prop_key.kdl +1 -0
  435. kdlquery-1.0.0/tests/kdl_test_cases/input/null_prop.kdl +1 -0
  436. kdlquery-1.0.0/tests/kdl_test_cases/input/null_prop_key_fail.kdl +1 -0
  437. kdlquery-1.0.0/tests/kdl_test_cases/input/numeric_arg.kdl +1 -0
  438. kdlquery-1.0.0/tests/kdl_test_cases/input/numeric_prop.kdl +1 -0
  439. kdlquery-1.0.0/tests/kdl_test_cases/input/octal.kdl +1 -0
  440. kdlquery-1.0.0/tests/kdl_test_cases/input/only_cr.kdl +1 -0
  441. kdlquery-1.0.0/tests/kdl_test_cases/input/only_line_comment.kdl +1 -0
  442. kdlquery-1.0.0/tests/kdl_test_cases/input/only_line_comment_crlf.kdl +1 -0
  443. kdlquery-1.0.0/tests/kdl_test_cases/input/only_line_comment_newline.kdl +1 -0
  444. kdlquery-1.0.0/tests/kdl_test_cases/input/optional_child_semicolon.kdl +1 -0
  445. kdlquery-1.0.0/tests/kdl_test_cases/input/parens_in_bare_id_fail.kdl +1 -0
  446. kdlquery-1.0.0/tests/kdl_test_cases/input/parse_all_arg_types.kdl +1 -0
  447. kdlquery-1.0.0/tests/kdl_test_cases/input/positive_exponent.kdl +1 -0
  448. kdlquery-1.0.0/tests/kdl_test_cases/input/positive_int.kdl +1 -0
  449. kdlquery-1.0.0/tests/kdl_test_cases/input/preserve_duplicate_nodes.kdl +2 -0
  450. kdlquery-1.0.0/tests/kdl_test_cases/input/preserve_node_order.kdl +3 -0
  451. kdlquery-1.0.0/tests/kdl_test_cases/input/prop_false_type.kdl +1 -0
  452. kdlquery-1.0.0/tests/kdl_test_cases/input/prop_float_type.kdl +1 -0
  453. kdlquery-1.0.0/tests/kdl_test_cases/input/prop_hex_type.kdl +1 -0
  454. kdlquery-1.0.0/tests/kdl_test_cases/input/prop_identifier_type.kdl +1 -0
  455. kdlquery-1.0.0/tests/kdl_test_cases/input/prop_null_type.kdl +1 -0
  456. kdlquery-1.0.0/tests/kdl_test_cases/input/prop_raw_string_type.kdl +1 -0
  457. kdlquery-1.0.0/tests/kdl_test_cases/input/prop_string_type.kdl +1 -0
  458. kdlquery-1.0.0/tests/kdl_test_cases/input/prop_true_type.kdl +1 -0
  459. kdlquery-1.0.0/tests/kdl_test_cases/input/prop_type.kdl +1 -0
  460. kdlquery-1.0.0/tests/kdl_test_cases/input/prop_zero_type.kdl +1 -0
  461. kdlquery-1.0.0/tests/kdl_test_cases/input/question_mark_before_number.kdl +1 -0
  462. kdlquery-1.0.0/tests/kdl_test_cases/input/quote_in_bare_id_fail.kdl +1 -0
  463. kdlquery-1.0.0/tests/kdl_test_cases/input/quoted_arg_type.kdl +1 -0
  464. kdlquery-1.0.0/tests/kdl_test_cases/input/quoted_node_name.kdl +1 -0
  465. kdlquery-1.0.0/tests/kdl_test_cases/input/quoted_node_type.kdl +1 -0
  466. kdlquery-1.0.0/tests/kdl_test_cases/input/quoted_numeric.kdl +1 -0
  467. kdlquery-1.0.0/tests/kdl_test_cases/input/quoted_prop_name.kdl +1 -0
  468. kdlquery-1.0.0/tests/kdl_test_cases/input/quoted_prop_type.kdl +1 -0
  469. kdlquery-1.0.0/tests/kdl_test_cases/input/r_node.kdl +1 -0
  470. kdlquery-1.0.0/tests/kdl_test_cases/input/raw_arg_type.kdl +1 -0
  471. kdlquery-1.0.0/tests/kdl_test_cases/input/raw_node_name.kdl +1 -0
  472. kdlquery-1.0.0/tests/kdl_test_cases/input/raw_node_type.kdl +1 -0
  473. kdlquery-1.0.0/tests/kdl_test_cases/input/raw_prop_type.kdl +1 -0
  474. kdlquery-1.0.0/tests/kdl_test_cases/input/raw_string_arg.kdl +2 -0
  475. kdlquery-1.0.0/tests/kdl_test_cases/input/raw_string_backslash.kdl +1 -0
  476. kdlquery-1.0.0/tests/kdl_test_cases/input/raw_string_hash_no_esc.kdl +1 -0
  477. kdlquery-1.0.0/tests/kdl_test_cases/input/raw_string_just_backslash.kdl +1 -0
  478. kdlquery-1.0.0/tests/kdl_test_cases/input/raw_string_just_quote_fail.kdl +2 -0
  479. kdlquery-1.0.0/tests/kdl_test_cases/input/raw_string_multiple_hash.kdl +1 -0
  480. kdlquery-1.0.0/tests/kdl_test_cases/input/raw_string_newline.kdl +4 -0
  481. kdlquery-1.0.0/tests/kdl_test_cases/input/raw_string_prop.kdl +2 -0
  482. kdlquery-1.0.0/tests/kdl_test_cases/input/raw_string_quote.kdl +1 -0
  483. kdlquery-1.0.0/tests/kdl_test_cases/input/repeated_arg.kdl +1 -0
  484. kdlquery-1.0.0/tests/kdl_test_cases/input/repeated_prop.kdl +1 -0
  485. kdlquery-1.0.0/tests/kdl_test_cases/input/same_name_nodes.kdl +2 -0
  486. kdlquery-1.0.0/tests/kdl_test_cases/input/sci_notation_large.kdl +1 -0
  487. kdlquery-1.0.0/tests/kdl_test_cases/input/sci_notation_small.kdl +1 -0
  488. kdlquery-1.0.0/tests/kdl_test_cases/input/semicolon_after_child.kdl +3 -0
  489. kdlquery-1.0.0/tests/kdl_test_cases/input/semicolon_in_child.kdl +3 -0
  490. kdlquery-1.0.0/tests/kdl_test_cases/input/semicolon_missing_after_children_fail.kdl +1 -0
  491. kdlquery-1.0.0/tests/kdl_test_cases/input/semicolon_separated.kdl +1 -0
  492. kdlquery-1.0.0/tests/kdl_test_cases/input/semicolon_separated_nodes.kdl +1 -0
  493. kdlquery-1.0.0/tests/kdl_test_cases/input/semicolon_terminated.kdl +1 -0
  494. kdlquery-1.0.0/tests/kdl_test_cases/input/single_arg.kdl +1 -0
  495. kdlquery-1.0.0/tests/kdl_test_cases/input/single_prop.kdl +1 -0
  496. kdlquery-1.0.0/tests/kdl_test_cases/input/slash_in_bare_id_fail.kdl +1 -0
  497. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_after_arg_type_fail.kdl +1 -0
  498. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_after_node_type_fail.kdl +2 -0
  499. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_after_prop_key_fail.kdl +1 -0
  500. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_after_prop_val_type_fail.kdl +1 -0
  501. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_after_type_fail.kdl +1 -0
  502. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_arg_after_newline_esc.kdl +2 -0
  503. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_arg_before_newline_esc.kdl +2 -0
  504. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_before_children_end_fail.kdl +4 -0
  505. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_before_eof_fail.kdl +1 -0
  506. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_before_prop_value_fail.kdl +1 -0
  507. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_before_semicolon_fail.kdl +1 -0
  508. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_between_child_blocks_fail.kdl +1 -0
  509. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_child.kdl +3 -0
  510. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_child_block_before_entry_err_fail.kdl +5 -0
  511. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_empty_child.kdl +2 -0
  512. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_escline_before_arg_type.kdl +2 -0
  513. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_escline_before_children.kdl +3 -0
  514. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_escline_before_node.kdl +3 -0
  515. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_false_node.kdl +2 -0
  516. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_full_node.kdl +3 -0
  517. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_in_slashdash.kdl +2 -0
  518. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_inside_arg_type_fail.kdl +1 -0
  519. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_inside_node_type_fail.kdl +1 -0
  520. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_multi_line_comment_entry.kdl +6 -0
  521. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_multi_line_comment_inline.kdl +1 -0
  522. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_multiple_child_blocks.kdl +10 -0
  523. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_negative_number.kdl +1 -0
  524. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_newline_before_children.kdl +4 -0
  525. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_newline_before_entry.kdl +2 -0
  526. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_newline_before_node.kdl +2 -0
  527. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_node_in_child.kdl +3 -0
  528. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_node_with_child.kdl +3 -0
  529. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_only_node.kdl +1 -0
  530. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_only_node_with_space.kdl +1 -0
  531. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_prop.kdl +1 -0
  532. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_raw_prop_key.kdl +1 -0
  533. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_repeated_prop.kdl +1 -0
  534. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_single_line_comment_entry.kdl +2 -0
  535. kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_single_line_comment_node.kdl +3 -0
  536. kdlquery-1.0.0/tests/kdl_test_cases/input/space_after_arg_type.kdl +1 -0
  537. kdlquery-1.0.0/tests/kdl_test_cases/input/space_after_node_type.kdl +1 -0
  538. kdlquery-1.0.0/tests/kdl_test_cases/input/space_after_prop_type.kdl +1 -0
  539. kdlquery-1.0.0/tests/kdl_test_cases/input/space_around_prop_marker.kdl +1 -0
  540. kdlquery-1.0.0/tests/kdl_test_cases/input/space_in_arg_type.kdl +1 -0
  541. kdlquery-1.0.0/tests/kdl_test_cases/input/space_in_node_type.kdl +1 -0
  542. kdlquery-1.0.0/tests/kdl_test_cases/input/space_in_prop_type.kdl +1 -0
  543. kdlquery-1.0.0/tests/kdl_test_cases/input/square_bracket_in_bare_id_fail.kdl +1 -0
  544. kdlquery-1.0.0/tests/kdl_test_cases/input/string_arg.kdl +1 -0
  545. kdlquery-1.0.0/tests/kdl_test_cases/input/string_escaped_literal_whitespace.kdl +2 -0
  546. kdlquery-1.0.0/tests/kdl_test_cases/input/string_prop.kdl +1 -0
  547. kdlquery-1.0.0/tests/kdl_test_cases/input/tab_space.kdl +1 -0
  548. kdlquery-1.0.0/tests/kdl_test_cases/input/trailing_crlf.kdl +1 -0
  549. kdlquery-1.0.0/tests/kdl_test_cases/input/trailing_underscore_hex.kdl +1 -0
  550. kdlquery-1.0.0/tests/kdl_test_cases/input/trailing_underscore_octal.kdl +1 -0
  551. kdlquery-1.0.0/tests/kdl_test_cases/input/true_prefix_in_bare_id.kdl +1 -0
  552. kdlquery-1.0.0/tests/kdl_test_cases/input/true_prefix_in_prop_key.kdl +1 -0
  553. kdlquery-1.0.0/tests/kdl_test_cases/input/true_prop_key_fail.kdl +1 -0
  554. kdlquery-1.0.0/tests/kdl_test_cases/input/two_nodes.kdl +2 -0
  555. kdlquery-1.0.0/tests/kdl_test_cases/input/type_before_prop_key_fail.kdl +1 -0
  556. kdlquery-1.0.0/tests/kdl_test_cases/input/unbalanced_raw_hashes_fail.kdl +1 -0
  557. kdlquery-1.0.0/tests/kdl_test_cases/input/underscore_at_start_of_fraction_fail.kdl +1 -0
  558. kdlquery-1.0.0/tests/kdl_test_cases/input/underscore_at_start_of_hex_fail.kdl +1 -0
  559. kdlquery-1.0.0/tests/kdl_test_cases/input/underscore_before_number.kdl +1 -0
  560. kdlquery-1.0.0/tests/kdl_test_cases/input/underscore_in_exponent.kdl +1 -0
  561. kdlquery-1.0.0/tests/kdl_test_cases/input/underscore_in_float.kdl +1 -0
  562. kdlquery-1.0.0/tests/kdl_test_cases/input/underscore_in_fraction.kdl +1 -0
  563. kdlquery-1.0.0/tests/kdl_test_cases/input/underscore_in_int.kdl +1 -0
  564. kdlquery-1.0.0/tests/kdl_test_cases/input/underscore_in_octal.kdl +1 -0
  565. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_delete_fail.kdl +2 -0
  566. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_escaped_above_max_fail.kdl +1 -0
  567. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_escaped_h1_fail.kdl +1 -0
  568. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_escaped_h2_fail.kdl +1 -0
  569. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_escaped_h3_fail.kdl +1 -0
  570. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_escaped_h4_fail.kdl +1 -0
  571. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_escaped_l1_fail.kdl +1 -0
  572. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_escaped_l2_fail.kdl +1 -0
  573. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_escaped_l3_fail.kdl +1 -0
  574. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_escaped_too_long_lead0_fail.kdl +1 -0
  575. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_fsi_fail.kdl +2 -0
  576. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_lre_fail.kdl +2 -0
  577. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_lri_fail.kdl +2 -0
  578. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_lrm_fail.kdl +2 -0
  579. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_lro_fail.kdl +2 -0
  580. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_pdf_fail.kdl +2 -0
  581. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_pdi_fail.kdl +2 -0
  582. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_rle_fail.kdl +2 -0
  583. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_rli_fail.kdl +2 -0
  584. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_rlm_fail.kdl +2 -0
  585. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_rlo_fail.kdl +2 -0
  586. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_silly.kdl +1 -0
  587. kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_under_0x20_fail.kdl +2 -0
  588. kdlquery-1.0.0/tests/kdl_test_cases/input/unterminated_empty_node_fail.kdl +1 -0
  589. kdlquery-1.0.0/tests/kdl_test_cases/input/unusual_bare_id_chars_in_quoted_id.kdl +1 -0
  590. kdlquery-1.0.0/tests/kdl_test_cases/input/unusual_chars_in_bare_id.kdl +1 -0
  591. kdlquery-1.0.0/tests/kdl_test_cases/input/vertical_tab_whitespace.kdl +1 -0
  592. kdlquery-1.0.0/tests/kdl_test_cases/input/zero_float.kdl +1 -0
  593. kdlquery-1.0.0/tests/kdl_test_cases/input/zero_int.kdl +1 -0
  594. kdlquery-1.0.0/tests/kdl_test_cases/input/zero_space_before_first_arg_fail.kdl +1 -0
  595. kdlquery-1.0.0/tests/kdl_test_cases/input/zero_space_before_prop_fail.kdl +1 -0
  596. kdlquery-1.0.0/tests/kdl_test_cases/input/zero_space_before_second_arg_fail.kdl +1 -0
  597. kdlquery-1.0.0/tests/kdl_test_cases/input/zero_space_before_slashdash_arg.kdl +1 -0
  598. kdlquery-1.0.0/tests/kdl_test_cases/input/zero_space_before_slashdash_children.kdl +2 -0
  599. kdlquery-1.0.0/tests/kdl_test_cases/input/zero_space_before_slashdash_prop.kdl +1 -0
  600. kdlquery-1.0.0/tests/test_kdl_parser.py +290 -0
  601. kdlquery-1.0.0/tests/test_reader.py +323 -0
  602. kdlquery-1.0.0/tests/test_selector.py +644 -0
  603. kdlquery-1.0.0/uv.lock +527 -0
@@ -0,0 +1,10 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+ .coverage
9
+ # Virtual environments
10
+ .venv
@@ -0,0 +1 @@
1
+ 3.10
kdlquery-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 vypivshiy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,302 @@
1
+ Metadata-Version: 2.4
2
+ Name: kdlquery
3
+ Version: 1.0.0
4
+ Summary: KDL 2.0 query tool
5
+ License-File: LICENSE
6
+ Requires-Python: >=3.10
7
+ Description-Content-Type: text/markdown
8
+
9
+ # kdlquery
10
+
11
+ A pure Python [KDL 2.0](https://kdl.dev/spec) parser with a CSS3-like selector API.
12
+
13
+ kdlquery provides a lossless CST parser, an immutable node tree with parent/sibling navigation, a Reader API for transforming KDL documents into arbitrary Python objects, and a selector engine for querying nodes by name, type annotation, properties, arguments, combinators, and pseudo-classes.
14
+
15
+ Designed as a foundation for building DSLs — KDL is a good fit for configuration, schemas, and structured data. The parser and selector API together cover the common cases of parsing, validating, and linting KDL documents.
16
+
17
+ Parser test cases are borrowed from the [official KDL test suite](https://github.com/kdl-org/kdl/tree/main/tests/test_cases).
18
+
19
+ ## Requirements
20
+
21
+ Python 3.10+, no external dependencies.
22
+
23
+ ## Installation
24
+
25
+ ```bash
26
+ pip install kdlquery
27
+ ```
28
+
29
+ ## Quick start
30
+
31
+ ### Parsing
32
+
33
+ ```python
34
+ from kdlquery import parse
35
+
36
+ doc = parse("""
37
+ app "my-service" version="1.0.0" {
38
+ (network)server "primary" port=8080 tls=#true {
39
+ host "localhost"
40
+ host "127.0.0.1"
41
+ timeout idle=30 connect=5
42
+ }
43
+
44
+ (network)server "replica" port=8081 tls=#false {
45
+ host "replica.local"
46
+ timeout idle=60 connect=5
47
+ }
48
+
49
+ router {
50
+ route "GET" "/api/users" handler="users.list" auth=#true
51
+ route "POST" "/api/users" handler="users.create" auth=#true
52
+ route "GET" "/api/health" handler="health.check" auth=#false
53
+ route "GET" "/static/*" handler="static.serve" auth=#false
54
+ }
55
+
56
+ plugins {
57
+ plugin "auth" enabled=#true {
58
+ (jwt)secret "hs256" key=(regex)"hs(256|512)"
59
+ expires (i32)3600
60
+ }
61
+ plugin "cache" enabled=#true {
62
+ backend "redis" host="cache.local" port=(u16)6379
63
+ }
64
+ plugin "debug" enabled=#false
65
+ }
66
+
67
+ (i32)workers 4
68
+ (i32)timeout 30
69
+ limits max-conn=(u32)1000 max-req=(u32)500
70
+ }
71
+ """)
72
+ ```
73
+
74
+ `parse()` returns a `KdlDocument` — an immutable tree of `KdlNode` objects with parent, depth, sibling, and index maps pre-built.
75
+
76
+ ### Node access
77
+
78
+ ```python
79
+ # Top-level nodes
80
+ app = doc.nodes[0]
81
+ app.name # "app"
82
+ app.get_arg(0) # "my-service"
83
+ app.get_prop("version") # "1.0.0"
84
+
85
+ # Children
86
+ for server in app.children:
87
+ print(server.get_arg(0), server.get_prop("port"))
88
+
89
+ # Tree navigation
90
+ doc.parent_of(app.children[0]) is app # True
91
+ doc.depth_of(app) # 0
92
+ doc.index_of(app.children[1]) # 1
93
+ doc.siblings_of(app.children[0]) # (child_0, child_1, ...)
94
+ ```
95
+
96
+ ### Selector API
97
+
98
+ CSS3-like selectors for querying the node tree.
99
+
100
+ ```python
101
+ # By name
102
+ doc.select("server")
103
+ # → [server "primary", server "replica"]
104
+
105
+ # By type annotation
106
+ doc.select("(network)")
107
+ # → [server "primary", server "replica"]
108
+
109
+ # Property filters
110
+ doc.select("server[tls=#true]")
111
+ # → [server "primary"]
112
+
113
+ doc.select('route[handler^="users"]')
114
+ # → [route "GET" "/api/users", route "POST" "/api/users"]
115
+
116
+ # Argument filters
117
+ doc.select('route[0="GET"]')
118
+ # → [route "GET" "/api/users", route "GET" "/api/health", route "GET" "/static/*"]
119
+
120
+ doc.select('route[*="POST"]')
121
+ # → [route "POST" "/api/users"]
122
+
123
+ # Type-annotated properties
124
+ doc.select("backend[(u16)port]")
125
+ # → [backend "redis"]
126
+
127
+ # Type-annotated arguments
128
+ doc.select("expires[(i32)0]")
129
+ # → [expires (i32)3600]
130
+
131
+ # Combinators: child (>), descendant (space), adjacent sibling (+), general sibling (~)
132
+ doc.select("app > server")
133
+ # → [server "primary", server "replica"]
134
+
135
+ doc.select("app route")
136
+ # → all four routes
137
+
138
+ doc.select('route[0="GET"] + route')
139
+ # → [route "POST" ..., route "GET" ...]
140
+
141
+ # Pseudo-classes
142
+ doc.select("route:first-child")
143
+ # → [route "GET" "/api/users"]
144
+
145
+ doc.select("(i32):last-child")
146
+ # → [timeout 30]
147
+
148
+ doc.select("host:only-child")
149
+ # → [host "replica.local"]
150
+
151
+ doc.select("app:root")
152
+ # → [app]
153
+
154
+ # :not()
155
+ doc.select("server:not([port=8080])")
156
+ # → [server "replica"]
157
+
158
+ doc.select("plugin:not(:empty)")
159
+ # → [plugin "auth", plugin "cache"]
160
+
161
+ # :has()
162
+ doc.select("plugin:has(backend)")
163
+ # → [plugin "cache"]
164
+
165
+ doc.select("app:has(> router)")
166
+ # → [app]
167
+
168
+ doc.select("plugin:has(> secret[(regex)key])")
169
+ # → [plugin "auth"]
170
+
171
+ # Comma (union) — deduplicates by node identity
172
+ doc.select("app, router")
173
+ # → [app, router]
174
+
175
+ doc.select("server, server")
176
+ # → [server "primary", server "replica"] (no duplicates)
177
+
178
+ # select_one — lazy, returns first match or None
179
+ doc.select_one("server[tls=#true]")
180
+ # → server "primary"
181
+ ```
182
+
183
+ ### Reader API
184
+
185
+ The Reader API lets you transform a KDL document into arbitrary Python objects by walking the node tree.
186
+
187
+ ```python
188
+ from kdlquery import KDL2CSTParser, DictReader, parse_into
189
+
190
+ cst = KDL2CSTParser().parse("""
191
+ database "primary" {
192
+ host "db.example.com"
193
+ port 5432
194
+ }
195
+ database "replica" {
196
+ host "db-replica.example.com"
197
+ port 5433
198
+ }
199
+ """)
200
+
201
+ result, diagnostics = parse_into(cst, DictReader())
202
+
203
+ # result is a list of plain dicts
204
+ # [
205
+ # {
206
+ # "name": "database",
207
+ # "args": ("primary",),
208
+ # "props": {},
209
+ # "children": [
210
+ # {"name": "host", "args": ("db.example.com",), "props": {}, "children": []},
211
+ # {"name": "port", "args": (5432,), "props": {}, "children": []},
212
+ # ],
213
+ # },
214
+ # ...
215
+ # ]
216
+ ```
217
+
218
+ `DictReader` is a built-in reader that produces nested dicts. To build a custom reader, subclass `Reader` and implement `on_node`:
219
+
220
+ ```python
221
+ from kdlquery import KdlNode, Reader, WalkContext
222
+
223
+ class ConfigReader(Reader[dict, dict]):
224
+ def on_node(self, node: KdlNode, ctx: WalkContext[dict]) -> dict:
225
+ if node.name == "server":
226
+ children = ctx.walk_children()
227
+ return {
228
+ "id": node.get_arg(0),
229
+ "port": node.get_prop("port"),
230
+ "tls": node.get_prop("tls", False),
231
+ "hosts": [c["host"] for c in children if "host" in c],
232
+ }
233
+ if node.name == "host":
234
+ return {"host": node.get_arg(0)}
235
+ return ctx.walk_children() # recurse by default
236
+
237
+ def finalize(self, nodes, diagnostics):
238
+ return {n["id"]: n for n in nodes if "id" in n}
239
+ ```
240
+
241
+ ### CST parser
242
+
243
+ For cases where you need the raw parse tree with full source spans:
244
+
245
+ ```python
246
+ from kdlquery import KDL2CSTParser
247
+
248
+ cst = KDL2CSTParser().parse('node "value" key=42')
249
+ # cst.nodes[0].entries — raw CST entries with exact positions
250
+ ```
251
+
252
+ ## Selector reference
253
+
254
+ ```
255
+ # Node
256
+ name # by name
257
+ * # any node
258
+ (type) # by type annotation on node
259
+ (type)name # type annotation + name
260
+
261
+ # Properties
262
+ [key] # property exists
263
+ [key=val] # equals
264
+ [key^=val] # starts with
265
+ [key$=val] # ends with
266
+ [key~=val] # contains
267
+ [(type)key] # property with type-annotated value
268
+ [(type)key=val] # type-annotated + value match
269
+
270
+ # Arguments
271
+ [N] # argument at position N exists
272
+ [N=val] # equals
273
+ [N^=val] # starts with
274
+ [N$=val] # ends with
275
+ [N~=val] # contains
276
+ [(type)N] # argument with type annotation
277
+ [*=val] # any argument equals val
278
+
279
+ # Combinators
280
+ A B # descendant
281
+ A > B # direct child
282
+ A + B # adjacent sibling
283
+ A ~ B # general sibling
284
+ A, B # union (deduplicated)
285
+
286
+ # Pseudo-classes
287
+ :root
288
+ :first-child
289
+ :last-child
290
+ :nth-child(n)
291
+ :nth-child(2n)
292
+ :nth-child(2n+1)
293
+ :only-child
294
+ :empty
295
+ :not(compound)
296
+ :has(complex)
297
+ :has(> complex)
298
+ ```
299
+
300
+ ## License
301
+
302
+ MIT