tinymux/docs/generated-files.md
Stephen Dennis 4884ba3dba Replace ParseDate with unified Ragel -G2 scanner + recursive descent parser
Delete the 1650-line multi-pass constraint-satisfaction engine
(timeparser.cpp) and replace it with date_scan.rl: a Ragel -G2
scanner that tokenizes date strings into a flat token array, plus a
small recursive descent parser that dispatches on the leading token.

The scanner handles month names, day-of-week names, timezone
abbreviations, military timezone letters, meridian (AM/PM), ordinal
suffixes, and numbers — all as DFA alternations with no hash tables
or linear searches.

The parser dispatches on the first non-whitespace token:
  4+ digit number → ISO 8601 family (extended, basic, ordinal, week)
  Month name      → US order (Mmm DD [YYYY] HH:MM:SS / legacy)
  1-2 digit + Month → European order (DD Mmm YYYY HH:MM:SS)
  Day-of-week     → strip prefix, re-dispatch

This is a single code path — always exercised, always tested.  The
old architecture had two independent parsers (do_convtime + ParseDate)
where one could be broken without anyone noticing.

Sub-second precision: unified handling across all formats, accumulating
up to 7 fractional digits as hectonanoseconds (100ns), matching the
internal FACTOR_100NS_PER_SECOND resolution.

All 998 smoke tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 00:24:10 -06:00

2.4 KiB

Generated Files

Do not hand-edit generated files in this repository. Edit the source input and regenerate the derived output instead.

Review Rule

  • If a generated file changes, the diff should also include the source input or the regeneration step that justifies that output change.
  • If only the generated output changed, treat that as suspicious until proven otherwise.

Generated File Map

Generated file Edit this instead Regenerate with
mux/modules/engine/art_scan.cpp mux/modules/engine/art_scan.rl ragel -G2
mux/modules/engine/ast_scan.cpp mux/modules/engine/ast_scan.rl ragel -G2
mux/lib/color_ops.c mux/lib/color_ops.rl ragel -G2 -C
mux/lib/date_scan.cpp mux/lib/date_scan.rl ragel -G2
mux/muxescape/muxescape.cpp mux/muxescape/muxescape.rl ragel -G2
mux/include/utf8tables.h Unicode inputs under utf/ utf/ pipeline / make
mux/lib/utf8tables.cpp Unicode inputs under utf/ utf/ pipeline / make
mux/include/unicode_tables_c.h Unicode inputs under utf/ utf/ pipeline / make
mux/lib/unicode_tables.c Unicode inputs under utf/ utf/ pipeline / make
mux/include/ducet_cetable.h utf/allkeys.txt utf/gen_ducet.pl
mux/rv64/src/unicode_tables.c Unicode inputs under utf/ utf/ pipeline / make
mux/configure mux/configure.ac autoconf
mux/aclocal.m4 Autoconf inputs aclocal / autoconf toolchain
client/*/src/hydra.pb.h mux/proxy/hydra.proto protoc
client/*/src/hydra.pb.cc mux/proxy/hydra.proto protoc
client/*/src/hydra.grpc.pb.h mux/proxy/hydra.proto protoc
client/*/src/hydra.grpc.pb.cc mux/proxy/hydra.proto protoc
client/*/src/proto/hydra.pb.h mux/proxy/hydra.proto protoc
client/*/src/proto/hydra.pb.cc mux/proxy/hydra.proto protoc
client/*/src/proto/hydra.grpc.pb.h mux/proxy/hydra.proto protoc
client/*/src/proto/hydra.grpc.pb.cc mux/proxy/hydra.proto protoc
mux/sqlite/sqlite3.c SQLite upstream source replace generated amalgamation
mux/sqlite/sqlite3.h SQLite upstream source replace generated amalgamation

Notes

  • Generated files may also be marked read-only on disk or checked by hooks, but those safeguards do not replace review discipline.
  • When in doubt, search for the generator before editing the output.