blob: 49045ae0b457050a6f9be08c424ee01c5da7e02a (
plain)
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
68
69
70
71
72
73
|
.Dd September, 2002
.Dt REPC 1
.Os Rep 2.3
.Sh NAME
.Nm repc
.Nd compiler for the
.Xr rep 1
scripting language
.Sh SYNOPSIS
.Nm
.Op Fl rp
.Op Fl z Ar buffsize
.Ar script
.Ar outfile
.Nm
.Fl d
.Ar script
.Sh DESCRIPTION
The
.Nm
command compiles
.Xr rep 1
scripts into an byte code format. This speeds up execution as compilation is not
required at run time. Also useful when using the
.Xr rlib 3
library.
.Pp
.Ar script
is compiled into
.Ar output .
The
.Fl z
and
.Fl p
options are stored with the compiled script, and will be used as defaults when the
script is executed.
.Sh OPTIONS
The options are as follows:
.Bl -tag -width Fl
.It Fl d
Dump dissassembled byte code.
.It Fl p
Default to parse mode. When the script is executed only replaments
will be written out, rather than unreplaced text.
.It Fl r
Compile into raw byte code format. For use with the
.Xr rlib 3
library. Any options are not stored with the code.
.Xr rep 3
cannot read this format.
.It Fl z
Set the default buffer size to
.Ar buffsize
and store it along with the compiled script. See
.Xr rep 1
for a description of the buffer size.
.Sh NOTE
The
.Nm
command uses
.Xr getopt 3
to parse it's arguments, which allows it to accept
the
.Sq Li --
option which will stop processing of flag options at that point. This allows
the processing of files with names that begin with a dash
.Pq Sq - .
.Sh SEE ALSO
.Xr rep 1 ,
.Xr rlib 3 ,
.Xr pcre 3
.Sh AUTHOR
.An Nate Nielsen Aq nielsen@memberwebs.com
|