Skip to main content

parse_auto

Function parse_auto 

Source
pub fn parse_auto(input: &str) -> Result<TLExpr>
Expand description

Auto-detect format and parse logic expression

This function attempts to auto-detect the format based on syntax patterns and parse accordingly.

ยงExamples

use tensorlogic_compiler::import::parse_auto;

// Prolog format
let expr1 = parse_auto("mortal(socrates).").unwrap();

// S-expression format
let expr2 = parse_auto("(and (P x) (Q x))").unwrap();