#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.
|
| 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) |
◆ INFBUF_SIZE
| #define INFBUF_SIZE 16384 |
◆ INLINE
◆ WORD_BITS
Definition at line 39 of file grepper.c.
Referenced by get_bit(), get_bit(), mask_shift(), mask_shift(), mk_MatchContext(), mk_MatchContext(), reset_bit(), set_bit(), set_bit(), shift(), and shift().
◆ MatchWord
◆ get_bit()
◆ go()
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().
◆ grep_file()
| int grep_file |
( |
struct DFA * | dfa, |
|
|
const char * | fname, |
|
|
int | range ) |
|
static |
◆ main()
| 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.
◆ mask_shift()
◆ mk_MatchContext()
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().
◆ or()
◆ reset_bit()
◆ set_bit()
◆ shift()
◆ prog
◆ show_line