ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
xml_internal.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <stddef.h>
18#include <stdint.h>
19
20#include "ra8_attributes.h"
21#include "xml.h"
22
60
76RA8_PRIV bool priv_xml_span_valid(size_t source_len, xml_span_t span);
77
96RA8_PRIV bool
97priv_xml_bytes_equal(const uint8_t* source, size_t offset, const char* literal, size_t length);
98
116RA8_PRIV ra8_err_t priv_xml_qname(const uint8_t* source, size_t end, size_t start, size_t* out_end);
117
134RA8_PRIV ra8_err_t priv_xml_raw(const uint8_t* source, size_t start, size_t end);
135
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
Pull-reader state; initialise before each pass.
Definition xml.h:93
Immutable byte span expressed relative to the source.
Definition xml.h:44
Bounded, caller-owned, no-heap XML pull reader.
ra8_err_t priv_xml_doctype(xml_reader_t *reader)
Validate and skip one supported pre-root external DOCTYPE.
bool priv_xml_bytes_equal(const uint8_t *source, size_t offset, const char *literal, size_t length)
Compare bounded source bytes with an ASCII character sequence.
Definition xml_decode.c:260
priv_xml_encoding_t
XML 1.0 scalar bounds and canonical UTF-8 bit geometry.
@ k_priv_xml_decimal_base
Numeric-entity decimal radix.
@ k_priv_utf8_shift_second
Shift for the second payload group.
@ k_priv_xml_scalar_max
Last Unicode scalar.
@ k_priv_utf8_continuation_tag
Continuation tag and ASCII ceiling.
@ k_priv_utf8_two_lead_tag
Encoded two-byte lead tag.
@ k_priv_xml_bmp_second_min
First scalar after surrogates.
@ k_priv_utf8_scalar_mask
Scalar bits per continuation byte.
@ k_priv_utf8_three_lead_min
First three-byte lead.
@ k_priv_utf8_shift_third
Shift for the third payload group.
@ k_priv_xml_bmp_second_max
Last permitted BMP scalar.
@ k_priv_xml_doctype_open_bytes
Bytes in the DOCTYPE opener.
@ k_priv_xml_line_feed
XML line-feed character.
@ k_priv_xml_encoding_bytes
Bytes in the UTF-8 encoding label.
@ k_priv_utf8_four_lead_min
First four-byte lead.
@ k_priv_xml_cdata_open_bytes
Bytes in the CDATA opener.
@ k_priv_xml_printable_min
First ordinary XML character.
@ k_priv_utf8_four_lead_tag
Encoded four-byte lead tag.
@ k_priv_utf8_bom_second
Second UTF-8 BOM byte.
@ k_priv_utf8_two_lead_min
First canonical two-byte lead.
@ k_priv_xml_tab
XML tab character.
@ k_priv_utf8_four_lead_max
Last canonical four-byte lead.
@ k_priv_utf8_two_payload_mask
Payload bits in a two-byte lead.
@ k_priv_utf8_bom_first
First UTF-8 BOM byte.
@ k_priv_utf8_four_payload_mask
Payload bits in a four-byte lead.
@ k_priv_utf8_three_lead_tag
Encoded three-byte lead tag.
@ k_priv_utf8_three_payload_mask
Payload bits in a three-byte lead.
@ k_priv_utf8_three_lead_max
Last three-byte lead.
@ k_priv_utf8_three_scalar_min
First scalar needing three bytes.
@ k_priv_utf8_bom_third
Third UTF-8 BOM byte.
@ k_priv_xml_bmp_first_max
Last scalar before surrogates.
@ k_priv_xml_carriage_return
XML carriage-return character.
@ k_priv_utf8_continuation_mask
Continuation tag mask.
@ k_priv_utf8_two_lead_max
Last two-byte lead.
@ k_priv_xml_supplementary_min
First supplementary scalar.
bool priv_xml_span_valid(size_t source_len, xml_span_t span)
Check that a source-relative span is in range.
Definition xml_decode.c:161
ra8_err_t priv_xml_qname(const uint8_t *source, size_t end, size_t start, size_t *out_end)
Scan the supported QName subset over a bounded byte range.
Definition xml.c:47
ra8_err_t priv_xml_raw(const uint8_t *source, size_t start, size_t end)
Validate canonical UTF-8 XML 1.0 characters over a byte range.
Definition xml_decode.c:610