3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-09 19:01:50 +00:00
z3/ml/build.sed
Leonardo de Moura bcca613cb2 Added ml component
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-10-02 12:44:06 -07:00

83 lines
1.7 KiB
Sed

# attempt to clean up the mess with 'unsigned'
s/__in unsigned __/__in __/g
s/__out unsigned __/__out __/g
s/__out_opt unsigned __/__out_opt __/g
# '@name ' -> 'Section: '
# '\sa ' -> 'See also: '
# '\brief ' -> 'Summary: '
# '\remark ' -> 'Remark: '
# '\pre ' -> 'Precondition: '
# '\param ' -> '@param'
# '\warning ' -> 'Warning: '
# '\code' -> 'C Example:'
# '\endcode' -> ''
/\\pre/s/(/ /g;/\\pre/s/,//g;/\\pre/s/)//g;s/\\pre /- {b Precondition}: /g
/\\ccode/s/(/ /g;/\\ccode/s/\\,//g;/\\ccode/s/)//g;s/\\ccode{\(.*\)}/\[\1\]/g
s/\\defgroup .*//g
s/@name \(.*\)/{2 {L \1}}/g
s/\\sa \(.*\)/- {b See also}: {!Z3.\1}/g
s/\\see \(.*\)/- {b See}: {!Z3.\1}/g
s/<tt>/{e /g
s|</tt>| }|g
s/\\nicebox{/{e/g
s/\\brief /Summary: /g
s/\\remark /- {b Remarks}: /g
s/\\pre /- {b Precondition}: /g
s/\\param /@param /g
s/\\conly .*//g
s/\\warning /- {b Warning}: /g
s/\\code/{v /g
s/\\endcode/ v}/g
s/\\verbatim/{v /g
s/\\endverbatim/ v}/g
s/\\mlonly//g
s/\\endmlonly//g
s/\\mlh/\\\[ \[/g
s/\\endmlh/\] \\\]/g
s/\\deprecated/@deprecated/g
s/\\ / /g
# '\c code ' -> '[code]'
s/\\c \([^ .,:]*\)/[\1]/g
# '#Z3_' -> 'Z3.'
s/#Z3_\([^ \n\.\t,)]*\)/{!Z3.\1}/g
# '/*@}*/' -> ''
s/\/\*@{\*\///g
# '/*@{*/' -> ''
s/\/\*@}\*\///g
# '/*...*/' -> ''
s/\/\*.*\*\///g
s|(\*\*/\*\*)|(\*\*%\*\*)|g
# '/**' -> 'quote(mli,"(**'
s|/\*\*|quote(mli,\"(**|g
# '...*/' -> '*)");'
s|[ ]*\*/|*)\");|g
s|(\*\*%\*\*)|(\*\*/\*\*)|g
# 'extern "C"' -> 'extern ~~C~~'
# 'quote(foo,"bar")' -> quote(foo,~~bar~~)
# mltype("foo") -> mltype(~~foo~~)
s/extern \"C\"/extern ~~C~~/g
s/quote(\(.*\),\"\(.*\)\")/quote(\1,~~\2~~)/g
s/quote(\(.*\),\"/quote(\1,~~/g
s/\")\;/~~);/g
s/\;\"/;~~/g
s/mltype(\"\(.*\)\")/mltype(~~\1~~)/g
# '"' -> '\"'
s/\\\"/\"/g
s/\"/\\\"/g
# '~~' -> '"'
s/~~/\"/g