recursive-regex

API Reference

recursive-regex

Recursive regular expression parsing engine

RECURSIVE-REGEX

  • Variable *DISPATCHERS*
    nil
  • Variable *CASE-INSENSITIVE*
    nil
  • Class RESULT-NODE
    NAME   Accessor: NAME
    START   Accessor: START
    END   Accessor: END
    FULL-MATCH   Accessor: FULL-MATCH
    GROUPS   Accessor: GROUPS
    KIDS   Accessor: KIDS
  • Function RESULT-NODE (name start end &optional (target cl-ppcre::*string*) groups kids)
  • Function CLEAR-DISPATCHERS
    removes all the dispatchers
  • Function ADD-BODY-MATCHER (name)
    Add a new body matcher that dispatches on name
  • Function ADD-NAMED-REGEX-MATCHER (name regex)
    Add a new dispatcher on name to child regex
  • Function ADD-MATCHED-PAIR-MATCHER (name open close &optional escape)
    Add a matched pair matcher dispatched on name
  • Function MAKE-DEFAULT-DISPATCH-TABLE
    Creates a default dispatch table with a parens dispatcher that can match pairs of parentheses
  • Function CREATE-RECURSIVE-SCANNER (regex &optional (function-table *dispatchers*) &aux (*allow-named-registers* t) (*dispatchers* function-table))
    Allows named registers to refer to functions that should be in the place of the named register
  • Function TREEIFY-REGEX-RESULTS (tree)
    Make a lisp tree of the results of the matches from the clos tree
  • Function REGEX-RECURSIVE-GROUPS (regex target &key (dispatchers *dispatchers*) tree-results? &aux (*dispatchers* dispatchers) res)
    run a recursive regular expression and gather all the results for each of them into a tree
  • Function READ-REX-FILE-TO-DISPATCHERS (file &aux ci? (defs (make-hash-table :test 'equalp)) done-with-defs? (*allow-named-registers* t))
    reads a set of definitions in from a rex file, calls add-named-regex-matcher for each production name => regex