Repository navigation
flowc: parse every .flow file the Python parser accepts (1002 -> 2082) - #1001
Merged
Merged
Conversation
This was referenced Sep 27, 2026
godofecht
added a commit
that referenced
this pull request
Sep 29, 2026
Rebased onto main containing #1003, #999, #998 and #989. Carries #1001's parse-only mode, located parse errors (flowc_parser_print_error, which the driver, emit and bundle paths now use), theorem/assume/therefore/claim references, flow blocks, handle, ui layout and pipeline blocks, let without initializer, contextual unit, distinct, effect rows, or-patterns, guards, nested patterns, [T; N], capability types, ?, vector literals, soft names, sort-by keys, entropy policies and module blocks, the parse coverage script and its CI floor, and the Python-grammar parser contract test. The #1001/#1003 reconciliation follows the one in #1012.
godofecht
force-pushed
the
fix/flowc-parse-coverage
branch
from
September 29, 2026 07:24
1727c27 to
4f6e81d
Compare
godofecht
added a commit
that referenced
this pull request
Sep 29, 2026
Rebased onto main containing #1003, #999, #998 and #989. Carries #1001's parse-only mode, located parse errors (flowc_parser_print_error, which the driver, emit and bundle paths now use), theorem/assume/therefore/claim references, flow blocks, handle, ui layout and pipeline blocks, let without initializer, contextual unit, distinct, effect rows, or-patterns, guards, nested patterns, [T; N], capability types, ?, vector literals, soft names, sort-by keys, entropy policies and module blocks, the parse coverage script and its CI floor, and the Python-grammar parser contract test. The #1001/#1003 reconciliation follows the one in #1012.
godofecht
force-pushed
the
fix/flowc-parse-coverage
branch
from
September 29, 2026 07:52
4f6e81d to
4ae3b13
Compare
Rebased onto main containing #1003, #999, #998 and #989. Carries #1001's parse-only mode, located parse errors (flowc_parser_print_error, which the driver, emit and bundle paths now use), theorem/assume/therefore/claim references, flow blocks, handle, ui layout and pipeline blocks, let without initializer, contextual unit, distinct, effect rows, or-patterns, guards, nested patterns, [T; N], capability types, ?, vector literals, soft names, sort-by keys, entropy policies and module blocks, the parse coverage script and its CI floor, and the Python-grammar parser contract test. The #1001/#1003 reconciliation follows the one in #1012.
godofecht
force-pushed
the
fix/flowc-parse-coverage
branch
from
September 29, 2026 08:27
4ae3b13 to
a94abc3
Compare
godofecht
added a commit
that referenced
this pull request
Sep 29, 2026
…ors as #1003 does roundtrip.sh builds the frontend module by module, so proof_lower.flow (called from cgen, jsgen and the typecheck) is compiled, given a header and linked into flowc_frontend.o and flowc_jsgen_fmt.o. driver.flow keeps #1003's flowc_parser_report where #1001 and #1003 both changed the same line; the roundtrip's keyword_param check (from
godofecht
added a commit
that referenced
this pull request
Sep 29, 2026
…ors as #1003 does roundtrip.sh builds the frontend module by module, so proof_lower.flow (called from cgen, jsgen and the typecheck) is compiled, given a header and linked into flowc_frontend.o and flowc_jsgen_fmt.o. driver.flow keeps #1003's flowc_parser_report where #1001 and #1003 both changed the same line; the roundtrip's keyword_param check (from
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
flowc now parses every tracked .flow file the Python parser accepts: 2082 of 2082, up from 1002 of 2072.
Measurement
FLOWC_PARSE_ONLY=1withFLOWC_INruns only the lexer and parser.path:line:coland the offending token. The position is the first token that failed, where before it was the point where parsing stopped. This applies to emit, bundle and driver modes too.compiler/scripts/parse_coverage.shruns the parser over every tracked .flow file and prints counts by area and a histogram of failing tokens. The 179 files the Python parser also rejects are recorded once incompiler/parse_coverage/python_rejects.txt, so the gate needs no Python.flowc parse coverage, runs--checkagainstcompiler/parse_coverage/floor.txt(2082).Coverage by commit
[T; N], capability types,?, vector literals, soft namesNo silent miscompiles
Constructs that Stage-A cannot lower parse into parse-only AST kinds (80 to 95 in
compiler/src/ast.flow, plusAST_HANDLE). cgen, jsgen, fmt and the typecheck entry refuse a program holding one withunsupported in Stage-A: <construct>.Three forms are real lowerings:
let x: Twith no initializer emits an uninitialized C local, as the Python host does.unitandshaderare no longer keywords, so they work as ordinary names.import .a.brelative multi-segment paths now parse.A differential emit over every tracked file shows the C from Stage-A is byte-identical to before for all 770 files the old compiler could emit. 13 more files now emit.
Verification
flowc: PASSbootstrap_from_c.sh --verify,self_host_full.shandroundtrip.shall pass.tests/lang/test_parser_python_forms.flow.roundtrip.shnow expects the new diagnostic formatch_unsupported.flow. The or-pattern parses and is refused, and no C is written.Follow-ups
|/^/&)0for identifiers named like sort modifiers