diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-27 15:48:45 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-27 15:48:45 +0100 |
commit | ef44077310b4ebf8d3cb31ccb57d15b96a94c9d3 (patch) | |
tree | c2bb690ccc1be37c03f6dcdcf892fbf3e17f5067 /tools/sed-enums | |
parent | dbb2c5713e11489dfaeb318a82785017f1794dde (diff) | |
parent | b030c490265bb13ee98a650da419a033495042ed (diff) | |
download | ffi-efl-ef44077310b4ebf8d3cb31ccb57d15b96a94c9d3.zip ffi-efl-ef44077310b4ebf8d3cb31ccb57d15b96a94c9d3.tar.gz |
Merge branch 'wip'
Conflicts:
tools/genruby.rb
Diffstat (limited to 'tools/sed-enums')
-rw-r--r-- | tools/sed-enums | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/sed-enums b/tools/sed-enums index 14738ac..aa44675 100644 --- a/tools/sed-enums +++ b/tools/sed-enums @@ -1,15 +1,15 @@ # drop if don't start with (typedef)? enum /^\s*(typedef\s)?\s*enum/ ! b # -s/^\s*(typedef\s)?\s*(enum(\s+\w+)?).*$/typedef \2 { / +s/^\s*(typedef\s)?\s*(enum(\s+\w+)?).*$/\1\2 { / # drop if substitution fail, copy pattern to hold space T;h :attrs;n # read again if { /^\s*\{/ b attrs -# append each item -s/^\s*([A-Z0-9_]+)(\s*=\s*-?[0-9]+)?.*$/\1\2, / -# goto next if subsitution fails, append pattern, loop +# append each item finished by , or \/ +s/^\s*([A-Z0-9_]+)(\s*=\s*[^,\/]+)?\s*([,|\)])?[\/]?.*$/\1\2\3 / +# goto next if subsitution fails, append pattern, loop to attrs T next;H;b attrs :next # try again if } not found @@ -29,4 +29,5 @@ H;x s/\n//g # replace multi spaces with one s/ {2,}/ /g -s/, }/ }/p +s/, }/ }/ +p |