Move RSP query hash table inside RSP2SQL

This commit is contained in:
Julien BLACHE 2011-04-01 19:48:27 +02:00
parent cc0555d986
commit 7e35068d46
3 changed files with 15 additions and 20 deletions

View File

@ -38,6 +38,21 @@ options {
#include "rsp_query.h"
}
@members {
#define RSP_TYPE_STRING 0
#define RSP_TYPE_INT 1
#define RSP_TYPE_DATE 2
struct rsp_query_field_map {
char *rsp_field;
int field_type;
/* RSP fields are named after the DB columns - or vice versa */
};
/* gperf static hash, rsp_query.gperf */
#include "rsp_query_hash.c"
}
query returns [ pANTLR3_STRING result ]
: e = expr
{

View File

@ -34,10 +34,6 @@
#include "RSP2SQL.h"
/* gperf static hash, rsp_query.gperf */
#include "rsp_query_hash.c"
char *
rsp_query_parse_sql(const char *rsp_query)
{

View File

@ -2,22 +2,6 @@
#ifndef __RSP_QUERY_H__
#define __RSP_QUERY_H__
#include <stdint.h>
#define RSP_TYPE_STRING 0
#define RSP_TYPE_INT 1
#define RSP_TYPE_DATE 2
struct rsp_query_field_map {
char *rsp_field;
int field_type;
/* RSP fields are named after the DB columns - or vice versa */
};
/* Generated by gperf - keep in sync, don't alter */
const struct rsp_query_field_map *
rsp_query_field_lookup (register const char *str, register unsigned int len);
char *
rsp_query_parse_sql(const char *rsp_query);