%{
#include <cstring>
%}
%define hash-function-name hash_json_token
%define lookup-function-name lookup_json_token
%compare-lengths
%global-table
%language=C++
%null-strings
%readonly-tables
%struct-type
%switch=1

struct JsonToken {
  const char* name;
  int token_id;
};

%%
"preconditions", 1
"operations", 2
"request_id", 3
"leader_id", 4
"read_version", 5
"type", 6
"key", 7
"begin", 8
"end", 9
"value", 10
"version", 11
"point_read", 12
"range_read", 13
"write", 14
"delete", 15
"range_delete", 16
%%
