#include <stddef.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sys/param.h>
Go to the source code of this file.
Data Structures | |
struct | ya_position_s |
Position in the text file. More... | |
struct | ya_node_s |
The data as it will be when writing this node and its subnodes to disk. More... | |
struct | ya_t |
Structure to pass around on the stack for the parser. More... | |
Defines | |
#define | _GNU_SOURCE |
#define | restrict |
#define | YA_NODE_TYPE_NULL 0 |
A NULL node for an unused child. | |
#define | YA_NODE_TYPE_LEAF 1 |
Leaf node which doesn't have data. | |
#define | YA_NODE_TYPE_BRANCH 2 |
Branch node with 0 or more childs. | |
#define | YA_NODE_TYPE_TEXT 3 |
Text node with null terminated UTF-8 string. | |
#define | YA_NODE_TYPE_POSITIVE_INTEGER 4 |
Positive integer, encoded as a big endian unsigned integer. | |
#define | YA_NODE_TYPE_NEGATIVE_INTEGER 5 |
Negative integer, encoded as a big endian unsigned integer. | |
#define | YA_NODE_TYPE_BINARY_FLOAT 6 |
Binary floating point, encoded as a 'big endian' binary64 or binary128 IEEE-754. | |
#define | YA_NODE_TYPE_DECIMAL_FLOAT 7 |
Decimal floating point, encoded as a 'big endian' decimal64 or decimal128 IEEE-754. | |
#define | YA_NODE_TYPE_LIST 254 |
List node which links child lists together. Never encoded in the output file. | |
#define | YA_NODE_TYPE_COUNT 255 |
Count node, which is never encoded in the output file. | |
#define | YYSTYPE ya_t |
Lex and Yacc needs to know what type should be used. | |
Typedefs | |
typedef __uint128_t | uint128_t |
typedef uint64_t | ya_name_t |
typedef uint8_t | ya_type_t |
typedef struct ya_position_s | ya_position_t |
typedef struct ya_node_s | ya_node_t |
Variables | |
struct ya_position_s | packed |
Position in the text file. | |
struct ya_position_s | aligned |
ya_t | ya_start |
#define YA_NODE_TYPE_BINARY_FLOAT 6 |
Binary floating point, encoded as a 'big endian' binary64 or binary128 IEEE-754.
Definition at line 50 of file types.h.
Referenced by node_decode(), and ya_binary_float().
#define YA_NODE_TYPE_BRANCH 2 |
Branch node with 0 or more childs.
Definition at line 46 of file types.h.
Referenced by node_decode(), and ya_branch().
#define YA_NODE_TYPE_COUNT 255 |
Count node, which is never encoded in the output file.
Definition at line 54 of file types.h.
Referenced by ya_count(), and ya_generic_nodev().
#define YA_NODE_TYPE_DECIMAL_FLOAT 7 |
#define YA_NODE_TYPE_LEAF 1 |
#define YA_NODE_TYPE_LIST 254 |
List node which links child lists together. Never encoded in the output file.
Definition at line 53 of file types.h.
Referenced by ya_generic_nodev(), and ya_list().
#define YA_NODE_TYPE_NEGATIVE_INTEGER 5 |
Negative integer, encoded as a big endian unsigned integer.
Definition at line 49 of file types.h.
Referenced by node_decode(), and ya_negative_integer().
#define YA_NODE_TYPE_NULL 0 |
A NULL node for an unused child.
Definition at line 44 of file types.h.
Referenced by node_decode(), and ya_null().
#define YA_NODE_TYPE_POSITIVE_INTEGER 4 |
Positive integer, encoded as a big endian unsigned integer.
Definition at line 48 of file types.h.
Referenced by node_decode(), and ya_positive_integer().
#define YA_NODE_TYPE_TEXT 3 |
Text node with null terminated UTF-8 string.
Definition at line 47 of file types.h.
Referenced by node_decode(), and ya_text().
#define YYSTYPE ya_t |
typedef struct ya_position_s ya_position_t |
Position in the text file.
The data as it will be when writing this node and its subnodes to disk.
This structure is allocated and free-ed as it passed along. In priciple it shouldn't leak in the end.