yyast/types.h File Reference

#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 Documentation

#define _GNU_SOURCE

Definition at line 28 of file types.h.

#define restrict

Definition at line 36 of file types.h.

#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

Decimal floating point, encoded as a 'big endian' decimal64 or decimal128 IEEE-754.

Definition at line 51 of file types.h.

#define YA_NODE_TYPE_LEAF   1

Leaf node which doesn't have data.

Definition at line 45 of file types.h.

Referenced by ya_leaf().

#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

Lex and Yacc needs to know what type should be used.

To pass tokens and nodes around.

Definition at line 94 of file types.h.


Typedef Documentation

typedef __uint128_t uint128_t

Definition at line 39 of file types.h.

typedef uint64_t ya_name_t

Definition at line 41 of file types.h.

typedef struct ya_node_s ya_node_t

Definition at line 78 of file types.h.

typedef struct ya_position_s ya_position_t

Definition at line 63 of file types.h.

typedef uint8_t ya_type_t

Definition at line 42 of file types.h.


Variable Documentation

struct ya_node_s packed

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.

Definition at line 27 of file yyast.c.

Referenced by ya_main().


Generated for yyast-1.0.1 by doxygen 1.5.6