Draft
Conversation
Add `nestable_block_element` to main, making for 2/3 top level rules done
jonnyfiveisonline
pushed a commit
to jonnyfiveisonline/odoc
that referenced
this pull request
Feb 13, 2026
Squash-merge of FayCarsons' menhir parser work (PR ocaml#1295) onto current master. The hand-written recursive descent parser (syntax.ml) is replaced by a menhir grammar (parser.mly) with supporting modules. Key changes: - Replace syntax.ml with parser.mly (menhir grammar) - Add tokens.ml (external token definitions for menhir) - Add parser_aux.ml (parser action helpers) - Add writer.ml (writer monad for warning collection) - Rewrite lexer.mll to emit menhir-compatible tokens - Update odoc_parser.ml entry point to use Parser.main - Add menhirLib dependency to dune and opam - Preserve master's code block box model (deindent/codeblock_content) - Preserve master's new tags (@children_order, @toc_status, etc.) - Update serialize.ml for current AST types - Add test_driver/tester.ml for parser comparison testing Note: expect tests have known behavioral differences from the old parser (different error messages, locations). These are documented in TODO.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
This is @FayCarson's work.
There are still some fixes that need to be made. See src/parser/TODO.md for a list.