]> www.ginac.de Git - ginac.git/blob - ginsh/ginsh_fcn_help.sed
parser: change order of the constructor optional arguments.
[ginac.git] / ginsh / ginsh_fcn_help.sed
1 # Convert help for ginsh functions from man page to C source
2 /GINSH_FCN_HELP_START/,/GINSH_FCN_HELP_END/{
3
4 # .BI lines contain the function synopsis
5 /\.BI/{
6
7 # extract function name
8 h
9 s/\.BI \(.*\)(.*/insert_help("\1",/p
10 g
11
12 # extract synopsis
13 s/"//g
14 s/ , /,/g
15 s/\.BI /"/
16 s/( /(/
17 s/ )/)"/
18 p
19 # handle multi-line synopsis
20 s/.br/);/p
21 }
22
23 # \- lines contain the function description
24 /\\-/{
25 s/"/'/g
26 s/\\-/" -/
27 s/$/"/
28 p
29 }
30
31 # .br lines start the next function
32 /.br/s//);/p
33 }