Logo Search packages:      
Sourcecode: yaz version File versions

cql.c File Reference


Detailed Description

Implements CQL parser.

This is a YACC parser, but since it must be reentrant, Bison is required. The original source file is cql.y.

Definition in file cql.c.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <yaz/xmalloc.h>
#include <yaz/nmem.h>
#include <yaz/cql.h>

Go to the source code of this file.

Classes

struct  cql_parser
struct  token
union  yyalloc

Defines

#define AND   259
#define GE   263
#define LE   264
#define NE   265
#define NOT   261
#define OR   260
#define PROX   262
#define TERM   258
#define YY_REDUCE_PRINT(Rule)
#define YY_STACK_PRINT(Bottom, Top)
#define YYABORT   goto yyabortlab
#define YYACCEPT   goto yyacceptlab
#define YYBACKUP(Token, Value)
#define YYBISON   1
#define yychar   cql_char
#define yyclearin   (yychar = YYEMPTY)
#define YYCOPY(To, From, Count)
#define YYDEBUG   0
#define yydebug   cql_debug
#define YYDPRINTF(Args)
#define YYDSYMPRINT(Args)
#define YYDSYMPRINTF(Title, Token, Value, Location)
#define YYEMPTY   (-2)
#define YYEOF   0
#define YYERRCODE   256
#define yyerrok   (yyerrstatus = 0)
#define YYERROR   goto yyerrorlab
#define yyerror   cql_error
#define YYERROR_VERBOSE   0
#define YYFAIL   goto yyerrlab
#define YYFINAL   3
#define YYFREE   free
#define YYINITDEPTH   200
#define YYLAST   75
#define YYLEX   yylex (&yylval, YYLEX_PARAM)
#define yylex   cql_lex
#define YYLEX_PARAM   parm
#define YYLLOC_DEFAULT(Current, Rhs, N)
#define YYLSP_NEEDED   0
#define yylval   cql_lval
#define YYMALLOC   malloc
#define YYMAXDEPTH   10000
#define YYMAXUTOK   265
#define yynerrs   cql_nerrs
#define YYNNTS   17
#define YYNRULES   43
#define YYNSTATES   56
#define YYNTOKENS   17
#define YYPACT_NINF   -39
#define yyparse   cql_parse
#define YYPARSE_PARAM   parm
#define YYPOPSTACK   (yyvsp--, yyssp--)
#define YYPURE   1
#define YYRECOVERING()   (!!yyerrstatus)
#define YYSIZE_T   unsigned int
#define YYSKELETON_NAME   "yacc.c"
#define YYSTACK_ALLOC   YYMALLOC
#define YYSTACK_BYTES(N)
#define YYSTACK_FREE   YYFREE
#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)
#define YYSTACK_RELOCATE(Stack)
#define YYSTYPE   token
#define YYTABLE_NINF   -39
#define YYTERROR   1
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
#define YYUNDEFTOK   2

Typedefs

typedef short int yysigned_char

Enumerations

enum  yytokentype {
  TERM = 258, AND = 259, OR = 260, NOT = 261,
  PROX = 262, GE = 263, LE = 264, NE = 265
}

Functions

CQL_parser cql_parser_create (void)
void cql_parser_destroy (CQL_parser cp)
struct cql_node * cql_parser_result (CQL_parser cp)
int cql_parser_stream (CQL_parser cp, int(*getbyte)(void *client_data), void(*ungetbyte)(int b, void *client_data), void *client_data)
static void putb (YYSTYPE *lval, CQL_parser cp, int c)
static void yydestruct (int yytype, YYSTYPE *yyvaluep)
int yyerror (char *s)
int yylex (YYSTYPE *lval, void *vp)
int yyparse (void *YYPARSE_PARAM)
int yyparse ()

Variables

static const yysigned_char yycheck []
static const unsigned char yydefact []
static const yysigned_char yydefgoto []
static const yysigned_char yypact []
static const yysigned_char yypgoto []
static const unsigned char yyr1 []
static const unsigned char yyr2 []
static const unsigned char yystos []
static const yysigned_char yytable []
static const unsigned char yytranslate []


Generated by  Doxygen 1.6.0   Back to index