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.
- kdlquery-1.0.0/.gitignore +10 -0
- kdlquery-1.0.0/.python-version +1 -0
- kdlquery-1.0.0/LICENSE +21 -0
- kdlquery-1.0.0/PKG-INFO +302 -0
- kdlquery-1.0.0/QUERY.md +429 -0
- kdlquery-1.0.0/README.md +294 -0
- kdlquery-1.0.0/examples/config_dsl.py +128 -0
- kdlquery-1.0.0/examples/xml_reader.py +102 -0
- kdlquery-1.0.0/kdlquery/__init__.py +83 -0
- kdlquery-1.0.0/kdlquery/dict_reader.py +97 -0
- kdlquery-1.0.0/kdlquery/document.py +178 -0
- kdlquery-1.0.0/kdlquery/parser.py +1217 -0
- kdlquery-1.0.0/kdlquery/reader.py +730 -0
- kdlquery-1.0.0/kdlquery/selector.py +750 -0
- kdlquery-1.0.0/kdlquery/types.py +112 -0
- kdlquery-1.0.0/llm.txt +150 -0
- kdlquery-1.0.0/pyproject.toml +19 -0
- kdlquery-1.0.0/tests/kdl_test_cases/README.md +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/all_escapes.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/all_node_fields.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_and_prop_same_name.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_bare.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_false_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_float_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_hex_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_null_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_raw_string_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_string_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_true_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/arg_zero_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/asterisk_in_block_comment.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/bare_emoji.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/bare_ident_dot.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/bare_ident_sign.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/bare_ident_sign_dot.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/binary.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/binary_trailing_underscore.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/binary_underscore.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/blank_arg_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/blank_node_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/blank_prop_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/block_comment.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/block_comment_after_node.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/block_comment_before_node.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/block_comment_before_node_no_space.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/block_comment_newline.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/bom_initial.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/boolean_arg.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/boolean_prop.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/braces_in_bare_id.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/chevrons_in_bare_id.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/comma_in_bare_id.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/comment_after_arg_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/comment_after_node_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/comment_after_prop_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/comment_and_newline.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/comment_in_arg_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/comment_in_node_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/comment_in_prop_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/commented_arg.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/commented_child.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/commented_line.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/commented_node.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/commented_prop.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/crlf_between_nodes.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/dash_dash.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/emoji.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/empty.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/empty_child.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/empty_child_different_lines.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/empty_child_same_line.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/empty_child_whitespace.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/empty_line_comment.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/empty_quoted_node_id.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/empty_quoted_prop_key.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/empty_string_arg.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/eof_after_escape.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/esc_multiple_newlines.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/esc_newline_in_string.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/esc_unicode_in_string.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escaped_whitespace.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline_after_semicolon.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline_alone.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline_empty_line.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline_end_of_node.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline_in_child_block.kdl +4 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline_line_comment.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline_node.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline_node_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/escline_slashdash.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/false_prefix_in_bare_id.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/false_prefix_in_prop_key.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/floating_point_keywords.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/hex.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/hex_int.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/hex_int_underscores.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/hex_leading_zero.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/initial_slashdash.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/int_multiple_underscore.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/just_block_comment.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/just_child.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/just_newline.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/just_node_id.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/just_space.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/leading_newline.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/leading_zero_binary.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/leading_zero_int.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/leading_zero_oct.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_comment.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_nodes.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_raw_string.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_raw_string_containing_quotes.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_raw_string_empty.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_raw_string_empty_indented.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_raw_string_indented.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_containing_quotes.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_double_backslash.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_empty.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_empty_indented.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_escape_delimiter.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_escape_in_closing_line.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_escape_in_closing_line_shallow.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_escape_newline_at_end.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_indented.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_only_1_quote.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_only_2_quotes.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_whitespace_only.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/multiline_string_wrapped_binary.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/negative_exponent.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/negative_float.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/negative_int.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/nested_block_comment.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/nested_children.kdl +5 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/nested_comments.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/nested_multiline_block_comment.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/newline_between_nodes.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/newlines_in_block_comment.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/no_decimal_exponent.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/node_false.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/node_true.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/node_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/null_arg.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/null_prefix_in_bare_id.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/null_prefix_in_prop_key.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/null_prop.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/numeric_arg.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/numeric_prop.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/octal.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/only_cr.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/only_line_comment.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/only_line_comment_crlf.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/only_line_comment_newline.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/optional_child_semicolon.kdl +5 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/parse_all_arg_types.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/positive_exponent.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/positive_int.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/preserve_duplicate_nodes.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/preserve_node_order.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_false_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_float_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_hex_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_identifier_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_null_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_raw_string_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_string_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_true_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/prop_zero_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/question_mark_before_number.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/quoted_arg_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/quoted_node_name.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/quoted_node_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/quoted_numeric.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/quoted_prop_name.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/quoted_prop_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/r_node.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_arg_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_node_name.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_node_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_prop_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_string_arg.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_string_backslash.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_string_hash_no_esc.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_string_just_backslash.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_string_multiple_hash.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_string_newline.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_string_prop.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/raw_string_quote.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/repeated_arg.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/repeated_prop.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/same_name_nodes.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/sci_notation_large.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/sci_notation_small.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/semicolon_after_child.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/semicolon_in_child.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/semicolon_separated.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/semicolon_separated_nodes.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/semicolon_terminated.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/single_arg.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/single_prop.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_arg_after_newline_esc.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_arg_before_newline_esc.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_child.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_empty_child.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_escline_before_arg_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_escline_before_children.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_escline_before_node.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_false_node.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_full_node.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_in_slashdash.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_multi_line_comment_entry.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_multi_line_comment_inline.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_multiple_child_blocks.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_negative_number.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_newline_before_children.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_newline_before_entry.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_newline_before_node.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_node_in_child.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_node_with_child.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_only_node.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_only_node_with_space.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_prop.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_raw_prop_key.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_repeated_prop.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_single_line_comment_entry.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/slashdash_single_line_comment_node.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/space_after_arg_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/space_after_node_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/space_after_prop_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/space_around_prop_marker.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/space_in_arg_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/space_in_node_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/space_in_prop_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/string_arg.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/string_escaped_literal_whitespace.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/string_prop.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/tab_space.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/trailing_crlf.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/trailing_underscore_hex.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/trailing_underscore_octal.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/true_prefix_in_bare_id.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/true_prefix_in_prop_key.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/two_nodes.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/underscore_before_number.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/underscore_in_exponent.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/underscore_in_float.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/underscore_in_fraction.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/underscore_in_int.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/underscore_in_octal.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/unicode_silly.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/unusual_bare_id_chars_in_quoted_id.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/unusual_chars_in_bare_id.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/vertical_tab_whitespace.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/zero_float.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/zero_int.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/zero_space_before_slashdash_arg.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/zero_space_before_slashdash_children.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/expected_kdl/zero_space_before_slashdash_prop.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/all_escapes.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/all_node_fields.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/arg_and_prop_same_name.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/arg_bare.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/arg_false_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/arg_float_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/arg_hex_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/arg_null_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/arg_raw_string_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/arg_string_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/arg_true_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/arg_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/arg_zero_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/asterisk_in_block_comment.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/bare_emoji.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/bare_ident_dot.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/bare_ident_numeric_dot_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/bare_ident_numeric_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/bare_ident_numeric_sign_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/bare_ident_sign.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/bare_ident_sign_dot.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/binary.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/binary_trailing_underscore.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/binary_underscore.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/blank_arg_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/blank_node_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/blank_prop_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/block_comment.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/block_comment_after_node.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/block_comment_before_node.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/block_comment_before_node_no_space.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/block_comment_newline.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/bom_initial.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/bom_later_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/boolean_arg.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/boolean_prop.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/braces_in_bare_id.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/chevrons_in_bare_id.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/comma_in_bare_id.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/comment_after_arg_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/comment_after_node_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/comment_after_prop_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/comment_and_newline.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/comment_in_arg_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/comment_in_node_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/comment_in_prop_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/commented_arg.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/commented_child.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/commented_line.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/commented_node.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/commented_prop.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/crlf_between_nodes.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/dash_dash.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/dot_but_no_fraction_before_exponent_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/dot_but_no_fraction_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/dot_in_exponent_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/dot_zero_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/emoji.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/empty.kdl +0 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/empty_arg_type_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/empty_child.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/empty_child_different_lines.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/empty_child_same_line.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/empty_child_whitespace.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/empty_line_comment.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/empty_node_type_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/empty_prop_type_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/empty_quoted_node_id.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/empty_quoted_prop_key.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/empty_string_arg.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/eof_after_escape.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/err_backslash_in_bare_id_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/esc_multiple_newlines.kdl +4 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/esc_newline_in_string.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/esc_unicode_in_string.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/escaped_whitespace.kdl +15 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/escline.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/escline_after_semicolon.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/escline_alone.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/escline_empty_line.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/escline_end_of_node.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/escline_in_child_block.kdl +5 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/escline_line_comment.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/escline_node.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/escline_node_type.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/escline_slashdash.kdl +4 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/false_prefix_in_bare_id.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/false_prefix_in_prop_key.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/false_prop_key_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/floating_point_keyword_identifier_strings_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/floating_point_keywords.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/hash_in_id_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/hex.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/hex_int.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/hex_int_underscores.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/hex_leading_zero.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/illegal_char_in_binary_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/illegal_char_in_hex_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/illegal_char_in_octal_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/initial_slashdash.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/int_multiple_underscore.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/just_block_comment.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/just_child.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/just_newline.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/just_node_id.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/just_space.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/just_space_in_arg_type_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/just_space_in_node_type_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/just_space_in_prop_type_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/just_type_no_arg_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/just_type_no_node_id_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/just_type_no_prop_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/leading_newline.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/leading_zero_binary.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/leading_zero_int.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/leading_zero_oct.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/legacy_raw_string_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/legacy_raw_string_hash_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_comment.kdl +4 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_nodes.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_raw_string.kdl +5 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_raw_string_containing_quotes.kdl +5 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_raw_string_empty.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_raw_string_empty_indented.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_raw_string_indented.kdl +5 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_raw_string_non_matching_prefix_character_error_fail.kdl +5 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_raw_string_non_matching_prefix_count_error_fail.kdl +5 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_raw_string_single_line_err_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_raw_string_single_quote_err_fail.kdl +5 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string.kdl +5 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_containing_quotes.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_double_backslash.kdl +4 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_empty.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_empty_indented.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_escape_delimiter.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_escape_in_closing_line.kdl +5 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_escape_in_closing_line_shallow.kdl +5 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_escape_newline_at_end.kdl +4 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_escape_newline_at_end_fail.kdl +4 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_final_whitespace_escape_fail.kdl +4 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_indented.kdl +5 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_non_literal_prefix_fail.kdl +4 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_non_matching_prefix_character_error_fail.kdl +5 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_non_matching_prefix_count_error_fail.kdl +5 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_only_1_quote.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_only_2_quotes.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_single_line_err_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_single_quote_err_fail.kdl +5 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_whitespace_only.kdl +18 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiline_string_wrapped_binary.kdl +4 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiple_dots_in_float_before_exponent_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiple_dots_in_float_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiple_es_in_float_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/multiple_x_in_hex_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/negative_exponent.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/negative_float.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/negative_int.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/nested_block_comment.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/nested_children.kdl +5 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/nested_comments.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/nested_multiline_block_comment.kdl +6 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/newline_between_nodes.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/newlines_in_block_comment.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/no_decimal_exponent.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/no_digits_in_hex_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/no_integer_digit_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/no_solidus_escape_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/node_false.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/node_true.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/node_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/null_arg.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/null_prefix_in_bare_id.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/null_prefix_in_prop_key.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/null_prop.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/null_prop_key_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/numeric_arg.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/numeric_prop.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/octal.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/only_cr.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/only_line_comment.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/only_line_comment_crlf.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/only_line_comment_newline.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/optional_child_semicolon.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/parens_in_bare_id_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/parse_all_arg_types.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/positive_exponent.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/positive_int.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/preserve_duplicate_nodes.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/preserve_node_order.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/prop_false_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/prop_float_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/prop_hex_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/prop_identifier_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/prop_null_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/prop_raw_string_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/prop_string_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/prop_true_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/prop_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/prop_zero_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/question_mark_before_number.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/quote_in_bare_id_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/quoted_arg_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/quoted_node_name.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/quoted_node_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/quoted_numeric.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/quoted_prop_name.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/quoted_prop_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/r_node.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/raw_arg_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/raw_node_name.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/raw_node_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/raw_prop_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/raw_string_arg.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/raw_string_backslash.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/raw_string_hash_no_esc.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/raw_string_just_backslash.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/raw_string_just_quote_fail.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/raw_string_multiple_hash.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/raw_string_newline.kdl +4 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/raw_string_prop.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/raw_string_quote.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/repeated_arg.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/repeated_prop.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/same_name_nodes.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/sci_notation_large.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/sci_notation_small.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/semicolon_after_child.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/semicolon_in_child.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/semicolon_missing_after_children_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/semicolon_separated.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/semicolon_separated_nodes.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/semicolon_terminated.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/single_arg.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/single_prop.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slash_in_bare_id_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_after_arg_type_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_after_node_type_fail.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_after_prop_key_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_after_prop_val_type_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_after_type_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_arg_after_newline_esc.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_arg_before_newline_esc.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_before_children_end_fail.kdl +4 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_before_eof_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_before_prop_value_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_before_semicolon_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_between_child_blocks_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_child.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_child_block_before_entry_err_fail.kdl +5 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_empty_child.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_escline_before_arg_type.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_escline_before_children.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_escline_before_node.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_false_node.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_full_node.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_in_slashdash.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_inside_arg_type_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_inside_node_type_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_multi_line_comment_entry.kdl +6 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_multi_line_comment_inline.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_multiple_child_blocks.kdl +10 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_negative_number.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_newline_before_children.kdl +4 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_newline_before_entry.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_newline_before_node.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_node_in_child.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_node_with_child.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_only_node.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_only_node_with_space.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_prop.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_raw_prop_key.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_repeated_prop.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_single_line_comment_entry.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/slashdash_single_line_comment_node.kdl +3 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/space_after_arg_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/space_after_node_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/space_after_prop_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/space_around_prop_marker.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/space_in_arg_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/space_in_node_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/space_in_prop_type.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/square_bracket_in_bare_id_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/string_arg.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/string_escaped_literal_whitespace.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/string_prop.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/tab_space.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/trailing_crlf.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/trailing_underscore_hex.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/trailing_underscore_octal.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/true_prefix_in_bare_id.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/true_prefix_in_prop_key.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/true_prop_key_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/two_nodes.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/type_before_prop_key_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unbalanced_raw_hashes_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/underscore_at_start_of_fraction_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/underscore_at_start_of_hex_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/underscore_before_number.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/underscore_in_exponent.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/underscore_in_float.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/underscore_in_fraction.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/underscore_in_int.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/underscore_in_octal.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_delete_fail.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_escaped_above_max_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_escaped_h1_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_escaped_h2_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_escaped_h3_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_escaped_h4_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_escaped_l1_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_escaped_l2_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_escaped_l3_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_escaped_too_long_lead0_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_fsi_fail.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_lre_fail.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_lri_fail.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_lrm_fail.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_lro_fail.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_pdf_fail.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_pdi_fail.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_rle_fail.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_rli_fail.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_rlm_fail.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_rlo_fail.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_silly.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unicode_under_0x20_fail.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unterminated_empty_node_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unusual_bare_id_chars_in_quoted_id.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/unusual_chars_in_bare_id.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/vertical_tab_whitespace.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/zero_float.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/zero_int.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/zero_space_before_first_arg_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/zero_space_before_prop_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/zero_space_before_second_arg_fail.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/zero_space_before_slashdash_arg.kdl +1 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/zero_space_before_slashdash_children.kdl +2 -0
- kdlquery-1.0.0/tests/kdl_test_cases/input/zero_space_before_slashdash_prop.kdl +1 -0
- kdlquery-1.0.0/tests/test_kdl_parser.py +290 -0
- kdlquery-1.0.0/tests/test_reader.py +323 -0
- kdlquery-1.0.0/tests/test_selector.py +644 -0
- kdlquery-1.0.0/uv.lock +527 -0
|
@@ -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.
|
kdlquery-1.0.0/PKG-INFO
ADDED
|
@@ -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
|