Create README with grammar spec
This commit is contained in:
commit
2957e913c0
18
README
Normal file
18
README
Normal file
@ -0,0 +1,18 @@
|
||||
REGEX ENGINE
|
||||
|
||||
I've thought for a while it would be fun and interesting to write my
|
||||
own regular expression engine using Thompson's construction algorithm,
|
||||
so here we are.
|
||||
|
||||
Grammar
|
||||
|
||||
This engine is not going to be strictly supporting any standard
|
||||
syntax; the expression syntax I intend to support follows.
|
||||
|
||||
regex ::= sequence ( '|' regex )?
|
||||
sequence ::= term+
|
||||
term ::= ( '.' | class | literal | '(' regex ')' ) quantifier?
|
||||
class ::= '[' '^'? literal+ ']'
|
||||
literal ::= non-special | '\' special
|
||||
quantifier ::= '*' | '+' | '?'
|
||||
special ::= quantifier | '|' | '(' | ')' | '[' | ']' | '^' | '\'
|
Loading…
x
Reference in New Issue
Block a user