|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
HTML-subset parser entry point for reflow. More...
#include <stddef.h>#include <stdint.h>#include "ra8_err.h"#include "reflow.h"#include "reflow_tokenize_internal.h"Go to the source code of this file.
Functions | |
| ra8_err_t | reflow_parse_xhtml (reflow_t *engine, const uint8_t *xhtml_buf, size_t xhtml_len) |
| Parse the XHTML buffer into the engine's token stream. | |
HTML-subset parser entry point for reflow.
The actual scan lives in reflow_tokenize.c (a no-heap streaming tokenizer). This C TU is the public entry point: reflow_layout_chapter() dispatches into reflow_parse_xhtml(), which validates arguments, resets the pools, and forwards to priv_reflow_xml_walk().
Keeping this entry point small lets clang-tidy's readability-function-size rule act on a single small function.
[Ring 4 / Reflow] {World: NS}
Definition in file reflow_parse.c.
|
nodiscard |
Parse the XHTML buffer into the engine's token stream.
Internal helper used by reflow_layout_chapter(). Implemented by the no-heap streaming tokenizer in reflow_tokenize.c. Declared here so reflow_layout.c can call it without a forward declaration.
| [in,out] | engine | Engine whose token / text pools will be populated. |
| [in] | xhtml_buf | XHTML source bytes. |
| [in] | xhtml_len | Length of xhtml_buf. |
| k_ra8_ok | Tokens emitted. |
| k_ra8_err_validation_failed | XHTML did not parse. |
| k_ra8_err_no_mem | Token or text pool full. |
Definition at line 38 of file reflow_parse.c.