parser

Function summary
greedy-quant lexer
group lexer
parse-string string
quant lexer
reg-expr lexer
reverse-strings parse-tree
seq lexer
group   lexer  [Function]

Parses and consumes a <group>. The productions are: <group> -> "("<regex>")" "(?:"<regex>")" "(?>"<regex>")" "(?<flags>:"<regex>")" "(?="<regex>")" "(?!"<regex>")" "(?<="<regex>")" "(?<!"<regex>")" "(?("<num>")"<regex>")" "(?("<regex>")"<regex>")" "(?<name>"<regex>")" (when *ALLOW-NAMED-REGISTERS* is T) <legal-token> where <flags> is parsed by the lexer function MAYBE-PARSE-FLAGS. Will return <parse-tree> or (<grouping-type> <parse-tree>) where <grouping-type> is one of six keywords - see source for details.

greedy-quant   lexer  [Function]

Parses and consumes a <greedy-quant>. The productions are: <greedy-quant> -> <group> | <group><quantifier> where <quantifier> is parsed by the lexer function GET-QUANTIFIER. Will return <parse-tree> or (:GREEDY-REPETITION <min> <max> <parse-tree>).

quant   lexer  [Function]

Parses and consumes a <quant>. The productions are: <quant> -> <greedy-quant> | <greedy-quant>"?". Will return the <parse-tree> returned by GREEDY-QUANT and optionally change :GREEDY-REPETITION to :NON-GREEDY-REPETITION.

seq   lexer  [Function]

Parses and consumes a <seq>. The productions are: <seq> -> <quant> | <quant><seq>. Will return <parse-tree> or (:SEQUENCE <parse-tree> <parse-tree>).

reg-expr   lexer  [Function]

Parses and consumes a <regex>, a complete regular expression. The productions are: <regex> -> <seq> | <seq>"|"<regex>. Will return <parse-tree> or (:ALTERNATION <parse-tree> <parse-tree>).

reverse-strings   parse-tree  [Function]
parse-string   string  [Function]

Translate the regex string STRING into a parse tree.