ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_rabook_xml_shim.h
Go to the documentation of this file.
1
14#pragma once
15
16#include <stddef.h>
17#include <stdint.h>
18
19#include "book.h"
20#include "ra8_err.h"
21#include "rabook_compile.h"
22#include "xml.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
33
44
78[[nodiscard]] ra8_err_t ra8_rabook_xml_parse_chapter(const uint8_t* xhtml_bytes,
79 size_t xhtml_len,
81 const char* chapter_href,
82 const char* chapter_title,
84
85#ifdef __cplusplus
86} /* extern "C" */
87#endif
Flat, execute-in-place container for a build-time "compiled" e-book.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
ra8_err_t ra8_rabook_xml_parse_chapter(const uint8_t *xhtml_bytes, size_t xhtml_len, ra8_rabook_ctx_t *ctx, const char *chapter_href, const char *chapter_title, ra8_rabook_xml_workspace_t *workspace)
Parse one XHTML chapter and append it to ctx.
ra8_rabook_xml_limits_t
XHTML consumer limits matching the established format contract.
@ k_ra8_rabook_xml_max_attributes
Attributes accepted per element.
@ k_ra8_rabook_xml_body_siblings
Direct children searched for body.
Zero-heap builder that emits a RABOOK1 blob (the #149 compiler back-end).
One name="value" attribute on an element.
Definition book.h:317
Builder state: the arenas plus running counts and a sticky-fail flag.
Caller-owned storage for one parser invocation.
uint32_t element_nodes[k_xml_workspace_frames]
Element node at each selected-subtree depth.
uint32_t last_children[k_xml_workspace_frames]
Last emitted child at each selected-subtree depth.
xml_workspace_t xml
Strict reader nesting stack (4096 bytes).
book_attr_t attributes[k_ra8_rabook_xml_max_attributes]
Source-order attributes for the element currently emitted.
Exactly bounded caller-owned nesting storage.
Definition xml.h:57
Bounded, caller-owned, no-heap XML pull reader.
@ k_xml_workspace_frames
Physical frame capacity with headroom.
Definition xml.h:40