yomidict.h (530B)
1 /* See LICENSE for license details. */ 2 typedef enum { 3 YOMI_UNDEF = 0, 4 YOMI_ENTRY = 1, 5 YOMI_ARRAY = 2, 6 YOMI_STR = 4, 7 YOMI_NUM = 8 8 } YomiType; 9 10 typedef struct { 11 unsigned long start; 12 unsigned long end; 13 unsigned long len; 14 int parent; /* parent tok number */ 15 YomiType type; 16 } YomiTok; 17 18 typedef struct YomiScanner YomiScanner; 19 20 enum { 21 YOMI_ERROR_NOMEM = -1, 22 YOMI_ERROR_INVAL = -2, 23 YOMI_ERROR_MALFO = -3 24 }; 25 26 YomiScanner *yomi_scanner_new(const char *, unsigned long); 27 int yomi_scan(YomiScanner *, YomiTok *, unsigned long);