YAZ  5.23.1
Functions
ccltoken.c File Reference

Implements CCL lexical analyzer (scanner) More...

#include <string.h>
#include <stdlib.h>
#include <yaz/yaz-iconv.h>
#include "cclp.h"

Go to the source code of this file.

Functions

static int token_cmp (CCL_parser cclp, const char **kw, struct ccl_token *token)
 
struct ccl_tokenccl_parser_tokenize (CCL_parser cclp, const char *command)
 
struct ccl_tokenccl_token_add (struct ccl_token *at)
 
void ccl_token_del (struct ccl_token *list)
 
static const char ** create_ar (const char *v1, const char *v2)
 
static void destroy_ar (const char **a)
 
CCL_parser ccl_parser_create (CCL_bibset bibset)
 
void ccl_parser_destroy (CCL_parser p)
 
void ccl_parser_set_case (CCL_parser p, int case_sensitivity_flag)
 
int ccl_parser_get_error (CCL_parser cclp, int *pos)
 

Detailed Description

Implements CCL lexical analyzer (scanner)

Definition in file ccltoken.c.

Function Documentation

CCL_parser ccl_parser_create ( CCL_bibset  bibset)
void ccl_parser_destroy ( CCL_parser  p)
int ccl_parser_get_error ( CCL_parser  cclp,
int *  pos 
)

Definition at line 282 of file ccltoken.c.

References ccl_parser::error_code, ccl_parser::error_pos, and ccl_parser::start_pos.

void ccl_parser_set_case ( CCL_parser  p,
int  case_sensitivity_flag 
)

Set case sensitivity for parser

Definition at line 276 of file ccltoken.c.

References ccl_parser::ccl_case_sensitive.

struct ccl_token* ccl_parser_tokenize ( CCL_parser  cclp,
const char *  command 
)
struct ccl_token* ccl_token_add ( struct ccl_token at)
void ccl_token_del ( struct ccl_token list)

Deletes token list

Definition at line 209 of file ccltoken.c.

References ccl_token::next, and xfree.

Referenced by ccl_find_str(), and ccl_parser_find_str().

static const char** create_ar ( const char *  v1,
const char *  v2 
)
static

Definition at line 221 of file ccltoken.c.

References xmalloc, and xstrdup.

Referenced by ccl_parser_create().

static void destroy_ar ( const char **  a)
static

Definition at line 235 of file ccltoken.c.

References xfree.

Referenced by ccl_parser_destroy().

static int token_cmp ( CCL_parser  cclp,
const char **  kw,
struct ccl_token token 
)
static