This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
From: https://github.com/darius/sketchbook/blob/master/regex/integrated1.py | |
Integrate the right-to-left top-down operator-precedence parser with | |
the simplest terminating NFA code. | |
""" | |
def match(re, s): return run(prepare(re), s) | |
def run(states, s): |