Skip to content

Comments

odb: add LEF/DEF grammar railroad diagram docs#9509

Open
Bbn08 wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
Bbn08:grammar-railroad-diagrams
Open

odb: add LEF/DEF grammar railroad diagram docs#9509
Bbn08 wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
Bbn08:grammar-railroad-diagrams

Conversation

@Bbn08
Copy link

@Bbn08 Bbn08 commented Feb 20, 2026

Add documentation pages for the LEF and DEF grammars with EBNF summaries and links to the interactive railroad diagram generator.

Resolves #2488

Description

Add documentation pages for the LEF and DEF grammar files with EBNF summaries
and instructions for viewing interactive railroad diagrams.

Each page includes:

Files Changed

  • src/odb/doc/LEF_Grammar.md (new) LEF grammar documentation
  • src/odb/doc/DEF_Grammar.md (new) DEF grammar documentation
  • docs/toc.yml Added both pages under Database > ODB section

Design Note

Note

Rather than embedding the full EBNF grammars directly into the documentation pages (which would be very large), I opted for a lighter approach:

  • Each grammar page (LEF_Grammar.md, DEF_Grammar.md) includes a top-level summary of the grammar rules for quick reference.
  • The full EBNF (originally provided by @mingodad in Grammar railroad diagram #2488) is linked rather than duplicated, keeping the docs concise and the PR small.
  • Users are directed to the Railroad Diagram Generator to paste the EBNF and view interactive diagrams.

If you'd prefer the full EBNF grammars included directly in the Markdown files (or as separate .ebnf files committed to the repo), I'm happy to update the approach.

Add documentation pages for the LEF and DEF grammars with EBNF
summaries and links to the interactive railroad diagram generator.

Resolves The-OpenROAD-Project#2488

Signed-off-by: Bbn08 <atrancendentbeing@gmail.com>
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a valuable addition, providing clear documentation for the LEF and DEF grammars. Using an external tool for interactive railroad diagrams is a smart approach to keep the documentation concise and user-friendly. The new markdown files are well-written and the changes to toc.yml are correct. I have one minor suggestion regarding a typo in DEF_Grammar.md that originates from the source code.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Bbn08 <atrancendentbeing@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Grammar railroad diagram

1 participant