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] */
48 #define REGNODE_MAX $oind
51 EXTCONST U8 PL_regkind[];
53 EXTCONST U8 PL_regkind[] = {
57 while (++$ind <= $tot) {
59 $type[$ind], /* $name[$ind] */
69 static const U8 regarglen[] = {
73 while (++$ind <= $tot) {
75 $size = "EXTRA_SIZE(struct regnode_$args[$ind])" if $args[$ind];
78 $size, /* $name[$ind] */
85 static const char reg_off_by_arg[] = {
89 while (++$ind <= $tot) {
90 $size = $longj[$ind] || 0;
93 $size, /* $name[$ind] */
101 static const char * const reg_name[] = {
105 while (++$ind <= $tot) {
106 $hind = sprintf "%#4x", $ind-1;
107 $size = $longj[$ind] || 0;
110 "$name[$ind]", /* $hind */
117 static const int reg_num = $tot;
119 #endif /* DEBUGGING */
120 #endif /* REG_COMP_C */
125 close OUT or die "close $tmp_h: $!";
127 safer_rename $tmp_h, 'regnodes.h';