Module parser

Source
Expand description

§Nom-based parsers for KQL, KML, and META commands

This module provides the main parsing functionality for the Knowledge Interaction Protocol (KIP). KIP supports three main command types:

  • KQL (Knowledge Query Language): For querying knowledge graphs
  • KML (Knowledge Manipulation Language): For modifying knowledge structures
  • META: For introspection and schema exploration

The parser is built using the nom parsing combinator library and provides both unified parsing through parse_kip() and specialized parsers for each command type.

Functions§

parse_json
Parses a standalone JSON value.
parse_kip
The main entry point for parsing any KIP command.
parse_kml
Parses a Knowledge Manipulation Language (KML) statement specifically.
parse_kql
Parses a Knowledge Query Language (KQL) command specifically.
parse_meta
Parses a META command specifically.
quote_str
Converts a string to its JSON-quoted representation.
unquote_str
Attempts to unquote a JSON string, returning the inner string value.