-
Notifications
You must be signed in to change notification settings - Fork 6
/
pattern.h
67 lines (44 loc) · 1.54 KB
/
pattern.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* $Id: pattern.h,v 1.6 2003/11/02 00:03:37 gray Exp $ */
#ifndef PATTERN_H
#define PATTERN_H
#include "cstream.h"
typedef struct patterns_struct * Patterns;
typedef struct domain_struct * Domain;
Domain get_domain( const char* name );
int read_patterns ( CIStream s, const char* default_domain, boolean undef );
typedef struct goal_state* Goal;
/* Read from `in', translate according to `p', and write the result
to `out', until the next characters to be read matches `goal'.
Returns TRUE on success, or FALSE if the translation fails or if
end-of-file is reached before the goal string is found. */
boolean translate ( CIStream in, Domain d, COStream out, Goal goal_info );
extern boolean line_mode;
extern boolean token_mode;
extern boolean discard_unmatched;
extern boolean case_insensitive;
extern char* idchars;
extern char* filechars;
/* maximum length of a "*" argument: */
extern int MAX_ARG_LEN;
extern boolean debug_switch;
extern boolean trace_switch;
extern boolean keep_going;
extern boolean ignore_whitespace;
extern COStream output_stream;
void pattern_help( FILE* f ); /* write help info to f */
void initialize_syntax(void);
boolean set_syntax( int type, const char* char_set );
#ifdef TRACE
/* Compile with -DTRACE to enable use of the -trace option */
extern boolean trace_switch;
extern int trace_indent;
struct trace_enter_struct
{ int level; long line; int column; int ch; int domain; };
extern struct trace_enter_struct trace_enter;
#else
#define trace_switch FALSE
#endif
#if 0
#define Arg_Delim '\0'
#endif
#endif