diff options
author | Max Fischer <maxfischer2781@gmail.com> | 2021-06-20 10:54:29 +0200 |
---|---|---|
committer | Max Fischer <maxfischer2781@gmail.com> | 2021-06-20 10:54:29 +0200 |
commit | fef0b7b5c96fc2eb4fa8b6686b047bd8d73bdaa6 (patch) | |
tree | d44e3829baafd2ce7e0fd44b7d8e61d95399a54b | |
parent | 38ff1c8b014891aed05294dcb6130a13a965eb6e (diff) | |
download | pyparsing-git-fef0b7b5c96fc2eb4fa8b6686b047bd8d73bdaa6.tar.gz |
packrat rejects recursion
-rw-r--r-- | pyparsing/core.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pyparsing/core.py b/pyparsing/core.py index d27b3c0..d018da1 100644 --- a/pyparsing/core.py +++ b/pyparsing/core.py @@ -827,6 +827,8 @@ class ParserElement(ABC): import pyparsing pyparsing.ParserElement.enablePackrat() """ + if ParserElement._bounded_recursion_enabled: + raise RuntimeError("Packrat and Bounded Recursion are not compatible") if not ParserElement._packratEnabled: ParserElement._packratEnabled = True if cache_size_limit is None: |