Architecture Overview

This project implements a multi-vendor network-config parser in Python with the following functions:

  • Chunk a large CLI config into top-level blocks
  • Dispatch each block to a specialized parser
  • Highlight which tokens are “modeled” versus “unmodeled”
  • Report per-parser coverage statistics
  • Emit both an expanded view for the nested BGP sections

1. Chunking & Dispatch

  1. Config Tree & Flattening
  2. Build an indentation-based tree (ConfigLine) from the raw file.
  3. Flatten into top-level chunks (e.g. interface, vlan, ip route, vrf definition, router bgp, etc.).

  4. Classification

  5. Each chunk’s first line is matched against known prefixes.
  6. Unknown types fall back to StubParser.

  7. Parser Interface
    ```python class BaseChunkParser(ABC): @abstractmethod def analyze(self, lines: List[str]) -> List[ParsedLine]: ...