Fast, correct AsciiDoc parser and converter written in Rust using PEG grammar.
For architecture and design decisions, see ARCHITECTURE.adoc.
# Parse and convert AsciiDoc to HTML
cargo run --bin acdc -- convert document.adoc
# Run the test suite
cargo nextest runSee acdc-cli README for all CLI options, backends, and feature flags.
acdc/
├── acdc-cli/ # Command-line interface
│ └── src/
│ └── main.rs # CLI entry point
├── acdc-lsp/ # Language Server Protocol implementation
│ └── src/
│ ├── capabilities/ # LSP features (completion, diagnostics, etc.)
│ └── state/ # Document and workspace state management
├── acdc-parser/ # Core parser and AST
│ ├── src/
│ │ ├── grammar/ # PEG grammar definitions
│ │ ├── model/ # AST data structures
│ │ ├── preprocessor/ # Include and conditional handling
│ │ └── proptests/ # Property-based testing
│ └── fixtures/ # Test fixtures
└── converters/ # Output converters
├── html/ # HTML5 converter
├── manpage/ # Native roff/troff manpage output
├── terminal/ # Rich terminal output
└── common/ # Shared converter utilities
-
acdc-cli - AsciiDoc processor (CLI)
-
acdc-lsp - Language Server Protocol implementation for editor integration
-
acdc-parser - AsciiDoc parser library
-
converters - collection of AsciiDoc converters
-
PEG-based: Uses the
pegcrate for grammar definition -
Two-pass inline processing: First identifies boundaries, then parses content
-
Fail-fast: Stops on first error (by design)
-
Preprocessor: Handles includes and conditionals before parsing
-
Table spanning: Row/column spanning not implemented
-
Inline markup in code/links: Bold/italic inside code spans and link text not parsed
-
Cross-file references: LSP and parser are single-file only
See acdc-parser README for detailed feature support and list handling notes.
# Build all crates
cargo build --all
# Run tests with detailed output
RUST_LOG=error cargo nextest run --no-fail-fast
# Run clippy with pedantic lints
cargo clippy --all-targets --all-features -- --deny clippy::pedantic
# Run property-based tests
PROPTEST_CASES=1000 cargo test --package acdc-parser --lib proptests# Enable trace logging for grammar module
RUST_LOG=acdc_parser::grammar::document=trace cargo run --bin acdc -- convert file.adoc-
Use conventional commits (
feat:,fix:,docs:, etc.) -
Run the full test suite before committing
-
asciidoctor - Reference implementation