1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
%{
#define _GPERF_
#include <string.h>
#include "grok_matchconf_macro.h"
%}
%define hash-function-name _patname_macro_hash
%define lookup-function-name patname2macro
%define slot-name str
%readonly-tables
%language=ANSI-C
%compare-strncmp
%switch=1
%struct-type
struct strmacro {
const char *str;
int code;
};
%%
@LINE,VALUE_LINE
@MATCH,VALUE_MATCH
@JSON_COMPLEX,VALUE_JSON_COMPLEX
@JSON,VALUE_JSON_SIMPLE
@START,VALUE_START
@END,VALUE_END
@LENGTH,VALUE_LENGTH
%%
|