code wiki / (root) / nx_rfc_ingest.nx

nx_rfc_ingest.nx

buildroot/runtime/nx_rfc_ingest.nx

7027 B206 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_rfc_ingest.nx -- ingest IETF RFC plaintext. RFCs (rfc-editor.org) are PD-equivalent under the IETF Trust Legal Provisions and are an enormous source of clean, well-specified algorithms. This parser walks plaintext .txt files and extracts numbered section headers, which in practice name the algorithms and procedures defined within the RFC. Recognized pattern (line-anchored): ^[ ]{0,3}<digits>(\.<digits>)*\.?[ ]+<Title>... Examples: "1. Executive Summary" "3.1. Algorithm Description" "4.1.1. Step Definition" The decl `name` is the title text (whitespace trimmed). genealogy_id: ietf_trust_legal_provisions_2025 lineage_id: plaintext_section_header_parser

dependencies 2 imports · 2 importers

nx_syscalls.nx nx_tier.nx nx_rfc_ingest.nx nx_rfc_dir_ingest.nx nx_rfc_stream_ingest.nx

imports: nx_syscalls.nxnx_tier.nx

imported by: nx_rfc_dir_ingest.nxnx_rfc_stream_ingest.nx

structs

40struct RfcDecl
47struct RfcDb

consts

32const NX_RFC_KIND_SECTION: nx_int = 1
33const NX_RFC_KIND_DEFINITION: nx_int = 2
35const NX_RFC_MAX_NAME_LEN: nx_int = 256
36const NX_RFC_MAX_DECLS: nx_int = 65536
45const NX_RFC_DECL_BYTES: nx_int = 16

functions

53func nx_rfc_db_alloc() -> *RfcDb
called by 1: nx_rfc_ingest_corpus calls 1: sys_mmap
62func nx_rfc_decl_at(db: *RfcDb, i: nx_int) -> *RfcDecl
69func nx_rfc_is_digit(c: nx_int) -> nx_int
77func nx_rfc_sanitize_char(c: nx_int) -> nx_int
called by 1: nx_rfc_emit_title
86func nx_rfc_skip_ws(buf: *u8, pos: nx_int, eol: nx_int) -> nx_int
108func nx_rfc_section_title_start(buf: *u8, pos: nx_int, eol: nx_int) -> nx_int
141func nx_rfc_emit_title(buf: *u8, lo: nx_int, eol: nx_int, out: *u8) -> nx_int
175func nx_rfc_ingest_corpus(buf: *u8, len: nx_int) -> *RfcDb