-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Postpone position assignment until the end.
During AST expansion, it is possible for new literal nodes to be created and given the same position as existing literals. The code attempts to reposition nodes when this happens but does not always succeed. The result is a short-circuit in the TNFA which can manifest as an infinite loop, e.g. a bounded iteration being treated as an unbounded one. This reshuffling can also leave positions unfilled, wasting memory. Instead of trying to assign positions to literal nodes on creation, and then having to renumber them on the fly during AST expansion, wait until the end and move position assignment into `tre_compute_nfl()`, which we rename to `tre_compute_npfl()`.
- Loading branch information
1 parent
fdb68b3
commit 2e5030a
Showing
5 changed files
with
75 additions
and
103 deletions.
There are no files selected for viewing
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
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
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
Oops, something went wrong.