IDZEBRA
2.2.7
|
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <assert.h>
#include <idzebra/util.h>
#include <yaz/yaz-util.h>
#include <dfa.h>
#include "imalloc.h"
Go to the source code of this file.
Data Structures | |
struct | MatchContext |
Macros | |
#define | WORD_BITS 32 |
#define | INFBUF_SIZE 16384 |
#define | INLINE |
Typedefs | |
typedef unsigned | MatchWord |
Functions | |
static INLINE void | set_bit (MatchContext *mc, MatchWord *m, int ch, int state) |
static INLINE void | reset_bit (MatchContext *mc, MatchWord *m, int ch, int state) |
static INLINE MatchWord | get_bit (MatchContext *mc, MatchWord *m, int ch, int state) |
static MatchContext * | mk_MatchContext (struct DFA *dfa, int range) |
static void | mask_shift (MatchContext *mc, MatchWord *Rdst, MatchWord *Rsrc, struct DFA *dfa, int ch) |
static void | shift (MatchContext *mc, MatchWord *Rdst, MatchWord *Rsrc, struct DFA *dfa) |
static void | or (MatchContext *mc, MatchWord *Rdst, MatchWord *Rsrc1, MatchWord *Rsrc2) |
static int | go (MatchContext *mc, struct DFA *dfa, FILE *inf) |
static int | grep_file (struct DFA *dfa, const char *fname, int range) |
int | main (int argc, char **argv) |
Variables | |
char * | prog |
static int | show_line = 0 |
|
static |
Definition at line 68 of file grepper.c.
References MatchContext::n, and WORD_BITS.
Referenced by go().
|
static |
Definition at line 227 of file grepper.c.
References get_bit(), icalloc(), ifree(), imalloc(), inf, inf_ptr, INFBUF_SIZE, mask_shift(), MatchContext::n, DFA::no_states, or(), MatchContext::range, reset_bit(), DFA_state::rule_no, set_bit(), shift(), show_line, DFA::states, DFA_tran::to, DFA_state::tran_no, and DFA_state::trans.
Referenced by grep_file().
|
static |
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 349 of file grepper.c.
References debug_dfa_followpos, debug_dfa_tran, debug_dfa_trav, dfa_delete(), dfa_init(), dfa_mkstate(), dfa_parse(), dfa_verbose, grep_file(), prog, and show_line.
|
static |
Definition at line 106 of file grepper.c.
References DFA_tran::ch, MatchContext::n, DFA::no_states, set_bit(), DFA::states, DFA_tran::to, DFA_state::tran_no, DFA_state::trans, and WORD_BITS.
Referenced by go().
|
static |
Definition at line 77 of file grepper.c.
References DFA_tran::ch, icalloc(), imalloc(), MatchContext::n, DFA::no_states, MatchContext::range, MatchContext::Sc, set_bit(), DFA::states, DFA_state::tran_no, DFA_state::trans, and WORD_BITS.
Referenced by grep_file().
|
static |
|
static |
Definition at line 59 of file grepper.c.
References MatchContext::n, and WORD_BITS.
Referenced by go().
|
static |
Definition at line 51 of file grepper.c.
References MatchContext::n, and WORD_BITS.
Referenced by go(), mask_shift(), mk_MatchContext(), and shift().
|
static |
Definition at line 167 of file grepper.c.
References MatchContext::n, DFA::no_states, set_bit(), DFA::states, DFA_tran::to, DFA_state::tran_no, DFA_state::trans, and WORD_BITS.
Referenced by go().