Go to the documentation of this file.00001 # if ! defined(TS_CONFIG_PARSE_EVENTS_HEADER)
00002 # define TS_CONFIG_PARSE_EVENTS_HEADER
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 # include "TsConfigTypes.h"
00028
00029 typedef void (*TsConfigEventFunction)(void* data, YYSTYPE* token);
00030 struct TsConfigEventHandler {
00031 TsConfigEventFunction _f;
00032 void* _data;
00033 };
00034 typedef int (*TsConfigErrorFunction)(void* data, char const* text);
00035 struct TsConfigErrorHandler {
00036 TsConfigErrorFunction _f;
00037 void* _data;
00038 };
00039
00040 enum TsConfigEventType {
00041 TsConfigEventGroupOpen,
00042 TsConfigEventGroupName,
00043 TsConfigEventGroupClose,
00044 TsConfigEventListOpen,
00045 TsConfigEventListClose,
00046 TsConfigEventPathOpen,
00047 TsConfigEventPathTag,
00048 TsConfigEventPathIndex,
00049 TsConfigEventPathClose,
00050 TsConfigEventLiteralValue,
00051 TsConfigEventInvalidToken
00052 };
00053
00054 # if defined(__cplusplus)
00055 static const size_t TS_CONFIG_N_EVENT_TYPES = TsConfigEventInvalidToken + 1;
00056 # else
00057 # define TS_CONFIG_N_EVENT_TYPES (TsConfigEventInvalidToken + 1)
00058 # endif
00059
00060 struct TsConfigHandlers {
00061 struct TsConfigErrorHandler error;
00062
00063
00064 struct TsConfigEventHandler handler[TS_CONFIG_N_EVENT_TYPES];
00065 };
00066
00067 # endif // TS_CONFIG_PARSE_EVENTS_HEADER