Elektrine lite

← Feed

@cliffordheath@mastodon.social

Post #2280784

2025-10-29 21:13 UTC

@sminez@hachyderm.io @robpike@hachyderm.io obviously a parser language cannot describe the LZW coding but in many cases such things will be wrapped in blocks that have other size delimiters. I can see how Thompson algo helps with your parallel edits though, consuming one byte at a time (even though substitutions may produce more). If two patterns match the same text, or one matches the output of another, how do you define precedence?

Replies (1)

  • @sminez@hachyderm.io 2025-10-29 21:28

    @cliffordheath@mastodon.social @robpike@hachyderm.io in my engine patterns can't match one another's output as all matches are resolved first before any actions (edits / printing) take place. The paper also calls out that matches must not overlap which I currently don't have a nice solution for other than a runtime error. I've been chatting to my friend @oac@fosstodon.org about how to handle execution on streams and I _think_ that so long as you're not extending matches backwards you should be able to easily determine when you can drop previous input and when actions can be applied. Parallel groups still require evaluating all matches before any actions can be taken though, which is unfortunate but I suspect unavoidable?

    Open ##2280785