]>
Commit | Line | Data |
---|---|---|
2f51d6ab JF |
1 | #!/usr/bin/env bash |
2 | ||
3 | cat << EOF | |
4 | %{ | |
5 | #include <cstring> | |
6 | #include "Execute.hpp" | |
7 | %} | |
8 | ||
9 | %language=ANSI-C | |
10 | ||
11 | %define lookup-function-name CYBridgeHash_ | |
12 | %define slot-name name_ | |
13 | ||
14 | %struct-type | |
15 | %omit-struct-type | |
16 | ||
17 | %pic | |
18 | ||
19 | struct CYBridgeEntry { | |
20 | int name_; | |
21 | const char *value_; | |
22 | }; | |
23 | ||
24 | %% | |
25 | EOF | |
26 | ||
27 | grep '^[CFV]' "$1" | sed -e 's/^C/0/;s/^F/1/;s/^V/2/' | sed -e 's/"/\\"/g;s/^\([^ ]*\) \([^ ]*\) \(.*\)$/\1\2, "\3"/'; | |
28 | grep '^[EST]' "$1" | sed -e 's/^S/3/;s/^T/4/;s/^E/5/' | sed -e 's/^5\(.*\)$/4\1 i/;s/"/\\"/g' | sed -e 's/^\([^ ]*\) \([^ ]*\) \(.*\)$/\1\2, "\3"/'; | |
29 | grep '^:' "$1" | sed -e 's/^: \([^ ]*\) \(.*\)/6\1, "\2"/'; |