llparse 0.1.6__tar.gz → 0.1.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {llparse-0.1.6 → llparse-0.1.8}/PKG-INFO +1 -1
- {llparse-0.1.6 → llparse-0.1.8}/llparse/frontend.py +2 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse.egg-info/PKG-INFO +1 -1
- {llparse-0.1.6 → llparse-0.1.8}/pyproject.toml +1 -1
- {llparse-0.1.6 → llparse-0.1.8}/tests/test_frontend.py +13 -0
- {llparse-0.1.6 → llparse-0.1.8}/LICENSE +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/README.md +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/C_compiler.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/__init__.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/compilator.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/constants.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/cython_builder.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/debug.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/dot.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/enumerator.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/errors.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/header.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/llparse.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/pybuilder/__init__.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/pybuilder/builder.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/pybuilder/loopchecker.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/pybuilder/main_code.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/pybuilder/parsemap.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/pyfront/containers.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/pyfront/front.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/pyfront/implementation.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/pyfront/namespace.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/pyfront/nodes.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/pyfront/peephole.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/pyfront/transform.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/settings.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/spanalloc.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/test.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse/trie.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse.egg-info/SOURCES.txt +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse.egg-info/dependency_links.txt +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/llparse.egg-info/top_level.txt +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/setup.cfg +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/tests/test_loop_checker.py +0 -0
- {llparse-0.1.6 → llparse-0.1.8}/tests/test_span_allocator.py +0 -0
|
@@ -190,11 +190,13 @@ class Frontend:
|
|
|
190
190
|
if isinstance(
|
|
191
191
|
node.ref,
|
|
192
192
|
(
|
|
193
|
+
_frontend.node.Int,
|
|
193
194
|
_frontend.node.Consume,
|
|
194
195
|
_frontend.node.Empty,
|
|
195
196
|
_frontend.node.Sequence,
|
|
196
197
|
_frontend.node.Single,
|
|
197
198
|
_frontend.node.TableLookup,
|
|
199
|
+
_frontend.node.SpanStart
|
|
198
200
|
),
|
|
199
201
|
):
|
|
200
202
|
self.resumptionTargets.add(node)
|
|
@@ -136,6 +136,19 @@ def test_pausing():
|
|
|
136
136
|
s2.match("p", p.pause(2, "parser was asked to pause again").otherwise(s)).skipTo(s2)
|
|
137
137
|
p.build(s)
|
|
138
138
|
|
|
139
|
+
def test_intnodes():
|
|
140
|
+
# IntNodes should be registered to llparse_state_t and should be a resumption target
|
|
141
|
+
# Otherwise we crash during dynamic streams of data this is a bug in 0.1.6 that is fixed in 0.1.7
|
|
142
|
+
p = LLParse("lltest")
|
|
143
|
+
p.property('i16', 'value')
|
|
144
|
+
start = p.node("start")
|
|
145
|
+
value = p.intBE('value', bits=2).skipTo(start)
|
|
146
|
+
start.skipTo(value)
|
|
147
|
+
|
|
148
|
+
artifacts = p.build(start)
|
|
149
|
+
code = artifacts.c.splitlines()
|
|
150
|
+
assert " case s_n_lltest__n_value_int_16be_byte2:" in code, "Int Node should be a resumption target"
|
|
151
|
+
|
|
139
152
|
|
|
140
153
|
def test_operators(op: str):
|
|
141
154
|
test = LLParse("test")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|