code wiki / _hdl_build / nx_sitegen_parse.nx
nx_sitegen_parse.nx
buildroot/runtime/_hdl_build/nx_sitegen_parse.nx
about
nx_sitegen_parse.nx -- AUTONOMY CORE: parse a blueprint TEXT FILE (the ".site" format) into the engine's
block arrays, so a site is authored as a DATA FILE that the Nishi team / a human / a local LLM can drop in,
and an organ builds it -- no hardcoded blueprint, no AI in the build. The format is line-based + pipe-
delimited (human-readable + machine-writable):
title|<page title>
header|<brand>|<cta_label>|<cta_href>
hero|<headline>|<sub>|<cta_label>|<cta_href>
search|<action>|<placeholder>
cards|<heading> (then one or more) card|<title>|<body>
steps|<heading> (then one or more) step|<label>
trust| (then one or more) sig|<signal>
footer|<text>
card/step/sig attach to the most recent cards/steps/trust block. Unknown kinds + orphan items + blank /
pipe-less lines are SKIPPED gracefully (forward-compatible). Field strings are copied into a caller-owned
arena so they outlive the parse. Composes nx_sitegen (the block-kind vocabulary). license_tier: ORIGINAL
dependencies 2 imports · 4 importers
imports: nx_sitegen.nxnx_syscalls.nx
imported by: nx_site_compose.nxnx_sitegen_file_gate.nxnx_sitegen_llm_gate.nxnx_sitegen_studio.nx
structs
| none |
consts
| none |
functions
| 19 | func sgp_streq(s: *u8, lit: *u8) -> i64 |
| 32 | func sgp_strcpy(dst: *u8, src: *u8, cap: i64) -> i64 called by 1: sgp_parse |
| 42 | func sgp_tok(text: *u8, ls: i64, le: i64, arena: *u8, ap: *i64, fld: *i64, maxf: i64) -> i64 called by 1: sgp_parse |
| 64 | func sgp_parse(text: *u8, tn: i64, kind: *i64, a: *i64, b: *i64, c: *i64, d: *i64, list: *i64, lcount: *i64, maxblk: i64, arena: *u8, title_out: *u8, title_cap: i64) -> i64 called by 4: compose_buildf_parse_buildl_buildse_build_site calls 4: sys_mmapsgp_toksgp_streqsgp_strcpy |