Document subset of BNF for regex engine

Adding some documentation for my future self.
This commit is contained in:
William Carroll 2020-11-13 16:55:39 +00:00
parent aa66d9b83d
commit 14f6169fcf

View file

@ -3,6 +3,16 @@
# - parser # - parser
# - compiler # - compiler
# ...for regex. # ...for regex.
#
# BNF
# expression -> ( char_class | CHAR ) quantifier? ( "|" expression )*
# char_class -> "[" CHAR+ "]"
# quantifier -> "?" | "*" | "+" | "{" INT? "," INT? "}"
#
# Of the numerous things I do not support, here are a few items of which I'm
# aware:
# - alternatives: (a|b)
# - capture groups: (ab)cd
from parser import Parser from parser import Parser
import string import string