2 # Get function prototypes
3 require 'regen_lib.pl';
5 #use Fatal qw(open close rename chmod unlink);
6 open DESC, 'regcomp.sym';
13 ($name[$ind], $desc, $rest[$ind]) = split /\t+/, $_, 3;
14 ($type[$ind], $code[$ind], $args[$ind], $longj[$ind])
15 = split /[,\s]\s*/, $desc, 4;
19 die "Too many regexp opcodes! Maximum is 256, but there are $tot in file!"
24 unlink $tmp_h if -f $tmp_h;
30 /* -*- buffer-read-only: t -*-
31 !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
32 This file is built by regcomp.pl from regcomp.sym.
33 Any changes made here will be lost!
39 while (++$ind <= $tot) {
41 $hind = sprintf "%#4x", $oind;
43 #define $name[$ind] $oind /* $hind $rest[$ind] */
50 EXTCONST U8 PL_regkind[];
52 EXTCONST U8 PL_regkind[] = {
56 while (++$ind <= $tot) {
58 $type[$ind], /* $name[$ind] */
68 static const U8 regarglen[] = {
72 while (++$ind <= $tot) {
74 $size = "EXTRA_SIZE(struct regnode_$args[$ind])" if $args[$ind];
77 $size, /* $name[$ind] */
84 static const char reg_off_by_arg[] = {
88 while (++$ind <= $tot) {
89 $size = $longj[$ind] || 0;
92 $size, /* $name[$ind] */
100 static const char * const reg_name[] = {
104 while (++$ind <= $tot) {
105 $hind = sprintf "%#4x", $ind-1;
106 $size = $longj[$ind] || 0;
109 "$name[$ind]", /* $hind */
116 static const int reg_num = $tot;
118 #endif /* DEBUGGING */
119 #endif /* REG_COMP_C */
124 close OUT or die "close $tmp_h: $!";
126 safer_rename $tmp_h, 'regnodes.h';