Reproducibility
Parsing C is sensitive to the exact preprocessor environment.
This chapter documents how to keep PARC-based workflows reproducible.
Main reproducibility risks
The biggest sources of drift are:
- different preprocessor executables
- different default include paths
- different predefined macros
- different parser flavor settings
- different preprocessed snapshots in tests
Best practices
For durable automation:
- prefer explicit
Configvalues over ambient defaults in CI - pin include paths with
-I...when they matter - use
-nostdincfor isolated fixture testing when appropriate - keep preprocessed snapshots for hard parser regressions
- keep the parser flavor explicit in tests
Deterministic parse debugging
If a real file parse is inconsistent across machines, a strong debugging move is:
- capture the preprocessed output
- switch the failing test to
parse_preprocessed - debug PARC against the stable snapshot
That separates:
- preprocessing differences
- parser differences
Reftests and snapshots
The reftest harness already encourages deterministic expectations by comparing against printed AST
output. For parser bugs that depend on preprocessing, a pinned .i file is often even better.
Consumer guidance
If PARC is part of a larger pipeline, keep the following recorded somewhere durable:
- preprocessor executable
- preprocessor arguments
- flavor
- representative fixtures
- expected parse outcome
Without that context, debugging parser regressions is much slower.