Changeset 169
- Timestamp:
- 05/20/06 18:43:15 (7 years ago)
- Location:
- libyaml/trunk
- Files:
-
- 14 added
- 1 copied
- 1 moved
-
LICENSE (copied) (copied from pyyaml/trunk/LICENSE)
-
Makefile.am (added)
-
README (added)
-
bootstrap (added)
-
config (added)
-
configure.ac (added)
-
include/Makefile.am (added)
-
include/yaml (added)
-
include/yaml/yaml.h (moved) (moved from libyaml/trunk/include/yaml.h) (14 diffs)
-
include/yaml/yaml_error.h (added)
-
include/yaml/yaml_version.h (added)
-
src/Makefile.am (added)
-
src/version.c (added)
-
tests (added)
-
tests/Makefile.am (added)
-
tests/test-version.c (added)
Legend:
- Unmodified
- Added
- Removed
-
libyaml/trunk/include/yaml/yaml.h
r162 r169 1 1 2 #ifndef _YAML_H3 #define _YAML_H2 #ifndef YAML_H 3 #define YAML_H 4 4 5 5 #ifdef __cplusplus … … 7 7 #endif 8 8 9 typedef enum { 10 YAML_READER_ERROR, 11 YAML_SCANNER_ERROR, 12 YAML_PARSER_ERROR, 13 YAML_EMITTER_ERROR 14 } yaml_error_type_t; 9 #include <stdlib.h> 10 11 #include "yaml_version.h" 12 #include "yaml_error.h" 15 13 16 14 typedef enum { 15 YAML_DETECT_ENCODING, 17 16 YAML_UTF8_ENCODING, 18 17 YAML_UTF16LE_ENCODING, … … 21 20 22 21 typedef enum { 22 YAML_ANY_SCALAR_STYLE, 23 23 YAML_PLAIN_SCALAR_STYLE, 24 24 YAML_SINGLE_QUOTED_SCALAR_STYLE, … … 29 29 30 30 typedef enum { 31 YAML_ANY_SEQUENCE_STYLE, 31 32 YAML_BLOCK_SEQUENCE_STYLE, 32 33 YAML_FLOW_SEQUENCE_STYLE … … 34 35 35 36 typedef enum { 37 YAML_ANY_MAPPING_STYLE, 36 38 YAML_BLOCK_MAPPING_STYLE, 37 39 YAML_FLOW_MAPPING_STYLE … … 41 43 YAML_STREAM_START_TOKEN, 42 44 YAML_STREAM_END_TOKEN, 45 43 46 YAML_VERSION_DIRECTIVE_TOKEN, 44 47 YAML_TAG_DIRECTIVE_TOKEN, 45 48 YAML_DOCUMENT_START_TOKEN, 46 49 YAML_DOCUMENT_END_TOKEN, 50 47 51 YAML_BLOCK_SEQUENCE_START_TOKEN, 48 52 YAML_BLOCK_MAPPING_START_TOKEN, 49 53 YAML_BLOCK_END_TOKEN, 54 50 55 YAML_FLOW_SEQUENCE_START_TOKEN, 51 56 YAML_FLOW_SEQUENCE_END_TOKEN, 52 57 YAML_FLOW_MAPPING_START_TOKEN, 53 58 YAML_FLOW_MAPPING_END_TOKEN, 59 54 60 YAML_BLOCK_ENTRY_TOKEN, 55 61 YAML_FLOW_ENTRY_TOKEN, 56 62 YAML_KEY_TOKEN, 57 63 YAML_VALUE_TOKEN, 64 58 65 YAML_ALIAS_TOKEN, 59 66 YAML_ANCHOR_TOKEN, … … 65 72 YAML_STREAM_START_EVENT, 66 73 YAML_STREAM_END_EVENT, 74 67 75 YAML_DOCUMENT_START_EVENT, 68 76 YAML_DOCUMENT_END_EVENT, 77 69 78 YAML_ALIAS_EVENT, 79 YAML_SCALAR_EVENT, 80 70 81 YAML_SEQUENCE_START_EVENT, 71 82 YAML_SEQUENCE_END_EVENT, 83 72 84 YAML_MAPPING_START_EVENT, 73 YAML_MAPPING_END_EVENT, 74 YAML_SCALAR_EVENT 85 YAML_MAPPING_END_EVENT 75 86 } yaml_event_type_t; 76 87 77 88 typedef struct { 78 char *value; 79 size_t length; 80 } yaml_string_t; 81 82 typedef struct { 89 size_t offset; 83 90 size_t index; 84 91 size_t line; … … 98 105 union { 99 106 yaml_encoding_t encoding; 100 yaml_string_tanchor;101 yaml_string_ttag;107 char *anchor; 108 char *tag; 102 109 struct { 103 yaml_string_t value; 110 char *value; 111 size_t length; 104 112 yaml_scalar_style_t style; 105 113 } scalar; … … 109 117 } version; 110 118 struct { 111 yaml_string_thandle;112 yaml_string_tprefix;119 char *handle; 120 char *prefix; 113 121 } tag_pair; 114 122 } data; … … 129 137 } version; 130 138 struct { 131 yaml_string_thandle;132 yaml_string_tprefix;139 char *handle; 140 char *prefix; 133 141 } **tag_pairs; 134 142 int implicit; … … 138 146 } document_end; 139 147 struct { 140 yaml_string_tanchor;148 char *anchor; 141 149 } alias; 142 150 struct { 143 yaml_string_t anchor; 144 yaml_string_t tag; 151 char *anchor; 152 char *tag; 153 char *value; 154 size_t length; 145 155 int plain_implicit; 146 156 int quoted_implicit; … … 148 158 } scalar; 149 159 struct { 150 yaml_string_tanchor;151 yaml_string_ttag;160 char *anchor; 161 char *tag; 152 162 int implicit; 153 163 yaml_sequence_style_t style; 154 164 } sequence_start; 155 165 struct { 156 yaml_string_tanchor;157 yaml_string_ttag;166 char *anchor; 167 char *tag; 158 168 int implicit; 159 169 yaml_mapping_style_t style; … … 164 174 } yaml_event_t; 165 175 166 typedef struct { 167 } yaml_scanner_t; 168 176 /* 169 177 typedef struct { 170 178 } yaml_parser_t; 171 179 172 180 typedef struct { 173 } yaml_composer_t;174 175 typedef struct {176 181 } yaml_emitter_t; 177 178 typedef struct { 179 } yaml_serializer_t; 182 */ 180 183 181 184 #ifdef __cplusplus … … 183 186 #endif 184 187 185 #endif /* #ifndef _YAML_H */188 #endif /* #ifndef YAML_H */ 186 189
Note: See TracChangeset
for help on using the changeset viewer.
