Document subset of BNF for regex engine
Adding some documentation for my future self.
This commit is contained in:
		
							parent
							
								
									aa66d9b83d
								
							
						
					
					
						commit
						14f6169fcf
					
				
					 1 changed files with 10 additions and 0 deletions
				
			
		|  | @ -3,6 +3,16 @@ | |||
| #   - parser | ||||
| #   - compiler | ||||
| # ...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 | ||||
| import string | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue