Build with Naz : Markdown parser in Rust and nom from r3bl_tui

Опубликовано: 16 Май 2026
на канале: developerlife․com
889
23

This tutorial and video are a deep dive in a real Markdown parser written using nom in Rust. This MD Parser is part of the r3bl_tui crate, which is part of the r3bl-open-core repo. It goes over the architecture of thinking about building complex parsers and the nitty gritty details the runtime nature and behavior when combining nom parsers.

Article: https://developerlife.com/2024/06/28/...

For comments and feedback please use these:
Repo: https://github.com/r3bl-org/r3bl-open...
Issues: https://github.com/nazmulidris/rust-s...

Chapters:
00:00:00 Introduction
00:30:00 Production grade MD parser in nom
00:01:00 Establish mental models for complex layered parsers
00:01:30 Repo with the MD parser r3bl-open-core
00:02:58 r3bl-cmdr, edi, and giti
00:03:22 edi is a MD editor that uses this parser
00:04:55 r3bl-open-core repo, tui folder, run examples
00:09:31 rn run examples in action visualizing the MD parser
00:11:00 Dive into the MD parser code
00:14:22 string slice into AST (MdDocument)
00:15:51 Parsing MD fragments in a single line
00:18:50 Building up from atomic to higher level parsers
00:20:45 Parser priority and precedence
00:27:30 parse_markdown function
00:30:00 Priority of parsers in a single line to extract fragments
00:33:00 Parser to MdLineFragment map
00:38:00 Lowest priority "catch all" parser
00:39:00 Source line tracing tests to visualize code
00:46:15 Run tests and see runtime behavior
00:52:25 Matching our expectations with reality
00:59:00 Parse a very complex line into fragments
01:04:20 Wrap up