Debian Codegraph @

genconstants

raw
1 #!/usr/bin/perl
2
3 my @names;
4 while(<DATA>) {
5 chomp;
6 next if /^\s*(?:#.*)?$/;
7 push @names, $_
8 }
9
10 my $n = @names;
11 my $n2 = $n*2;
12
13 print "static char * const my_constant_names[] = {\n";
14 for (@names) {
15 print qq( "$_",\n)
16 }
17 print qq( 0,\n);
18 print "};\n";
19 print "static const unsigned int my_constant_values[] = {\n";
20 for (@names) {
21 print qq( $_,\n)
22 }
23 print "};\n";
24
25 __DATA__
26
27 # enum fann_train_enum:
28 FANN_TRAIN_INCREMENTAL
29 FANN_TRAIN_BATCH
30 FANN_TRAIN_RPROP
31 FANN_TRAIN_QUICKPROP
32
33 # enum fann_activationfunc_enum:
34 FANN_LINEAR
35 FANN_THRESHOLD
36 FANN_THRESHOLD_SYMMETRIC
37 FANN_SIGMOID
38 FANN_SIGMOID_STEPWISE
39 FANN_SIGMOID_SYMMETRIC
40 FANN_SIGMOID_SYMMETRIC_STEPWISE
41 FANN_GAUSSIAN
42 FANN_GAUSSIAN_SYMMETRIC
43 FANN_GAUSSIAN_STEPWISE
44 FANN_ELLIOT
45 FANN_ELLIOT_SYMMETRIC
46 FANN_LINEAR_PIECE
47 FANN_LINEAR_PIECE_SYMMETRIC
48 FANN_SIN_SYMMETRIC
49 FANN_COS_SYMMETRIC
50 FANN_SIN
51 FANN_COS
52
53 # enum fann_errorfunc_enum:
54 FANN_ERRORFUNC_LINEAR
55 FANN_ERRORFUNC_TANH
56
57 # enum fann_stopfunc_enum:
58 FANN_STOPFUNC_MSE
59 FANN_STOPFUNC_BIT
60