Commit Graph
2 Commits
Author SHA1 Message Date
aneurinandClaude Sonnet 5.5 cf54471778 Bound parsing work and fix writer, lexer and keyswitch bugs
- Count variable expansions against MaxBytes and stop substituting past it, so
  nested #defines can't grow exponentially. Read at most MaxBytes from a reader.
- Lex in linear time: end an opcode value at the next line break with the same
  regexp, and merge text nodes by slicing. Cap variable names at 128 bytes.
- Read a byte order mark as space so a directive after it is recognised.
- Refuse in WriteFiles an include path that is absolute or leaves the folder, and
  report include.outside and sample.outside from Validate.
- Give a lone sw_lokey or sw_hikey a one-key range.
- Sum controller modulations in a fixed order so Instrument is deterministic.
- Stop samplePrefix looping on a sample at the root.
- Validate without lexing plain opcodes again, and cache registry lookups.
- Add regression tests and FuzzWrite, FuzzEdit and FuzzBuild.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-01 18:12:16 +00:00
aneurinandClaude Sonnet 5.5 d124690ecf Add lossless SFZ document, flattening, typed model and opcode registry
Parse keeps a file exactly as written, with #define and #include
unexpanded and each include as its own file in a tree. Flatten resolves
directives and header inheritance, and Flat.Instrument reads regions into
the typed model ported from Zampler's internal/sfz. The opcode registry
is generated from the SFZ format's syntax data and drives Lookup, GetAs
and Validate.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-01 17:38:10 +00:00