@cliffordheath@mastodon.social
Post #2280783
2025-10-29 20:37 UTC
@sminez@hachyderm.io @robpike@hachyderm.io my plan (because it's only a plan so far) is to extract content values to use later to steer the match, e.g. for length-delimited blocks, commonly used in protocols and file formats. Lexical typing only requires go/no-go, but useful parsing requires semantic capture, which Px already supports. A pretty-printer can re-inject non-semantic whitespace given a semantic AST. I also generate railroad diagrams and want to emit Textmate for syntax highlighters.
https://github.com/cjheath/strpp
Replies (1)
-
@cliffordheath@mastodon.social 2025-10-29 21:13
@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?