Skip to content

Commit a683a45

Browse files
committed
comments
1 parent fbfffcd commit a683a45

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

src/fandango/language/grammar/parser/iterative_parser.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,7 @@ def scan_bit(
228228
next_state = state.next()
229229
tree = ParserDerivationTree(Terminal(bit))
230230
next_state.set_edge(state, tree)
231-
# A bit advances the parse by exactly one column; the table holds
232-
# `columns_per_byte` (8) columns per input byte for this.
233231
table[column_index + 1].add(next_state)
234-
235-
# Save the maximum position reached, so we can report errors
236232
self._max_position = max(self._max_position, word_index)
237233

238234
return True
@@ -481,13 +477,7 @@ def _closes_cycle(
481477
) -> bool:
482478
"""
483479
Whether an edge from `sources` into `next_state` would make a
484-
derivation contain itself.
485-
486-
`next_state` merges with an equal state already in `column`, so the
487-
edge really lands on that one; it closes a cycle when the derivation
488-
of a source already passes through it. Forcing a state to complete
489-
is the only way to get there: a state that spans no input completes
490-
into a waiter of its own column, and that waiter may be itself.
480+
loop between states.
491481
"""
492482
target = column.unique.get(next_state)
493483
if target is None:

0 commit comments

Comments
 (0)