(module xpath-parser ( ;;; xpath-ast txp:ast-operation-helper txp:ast-params txp:ast-res ;; Highest level API txp:ast-api-helper txp:xpath->ast txp:xpointer->ast txp:expr->ast ;; SXPath native syntax -> AST txp:sxpath->ast ;; Several popular accessors and constructors for AST steps txp:step? txp:step-axis txp:step-node-test txp:step-preds txp:construct-step ;;; xpath-parser txp:parameterize-parser txp:error? txp:signal-semantic-error) (import chicken scheme) (include "chicken/common.scm") (include "sxml-tools/xpath-parser.scm") (include "sxml-tools/xpath-ast.scm") ;; Override error handlers so they do something sane (set! txp:signal-semantic-error (lambda text (apply error "XPath/XPointer semantic error: " text))) (set! sxml:xpointer-runtime-error (lambda text (apply error "XPath/XPointer runtime error: " text))) (set! sxml:xpointer-parse-error (lambda text (apply error "XPath/XPointer parser error: " text))))