Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
bec61dbd
...
bec61dbdc6b638b4db03d40233c77727a7fcf692
authored
2006-07-06 07:09:28 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Adopt for the new output format of snarf_doc
1 parent
076a0b55
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
scripts/guile-1.6/guile-doc-snarf.awk
scripts/guile-1.6/guile-doc-snarf.awk
View file @
bec61db
...
...
@@ -53,16 +53,15 @@ function error(s) {
exit
1
}
state
==
0
&&
$
1
==
"{"
{
flush
()
cname
=
$
3
next
}
#{print NR ": " state}
state
==
0
&&
NF
!=
0
{
state
=
1
}
state
==
0
&&
/
fname
/
{
fname
=
substr
(
$
2
,
2
,
length
(
$
2
)
-
2
);
next
}
state
==
0
&&
/
type
/
{
type
=
$
2
;
next
}
state
==
0
&&
/
location
/
{
loc_source
=
$
2
;
loc_line
=
$
3
}
state
==
0
&&
/
arglist
/
{
state
==
1
&&
$
1
==
"cname"
{
cname
=
$
2
;
next
}
state
==
1
&&
$
1
==
"fname"
{
fname
=
substr
(
$
2
,
2
,
length
(
$
2
)
-
2
);
next
}
state
==
1
&&
$
1
==
"type"
{
type
=
$
2
;
next
}
state
==
1
&&
$
1
==
"location"
{
loc_source
=
$
2
;
loc_line
=
$
3
;
next
}
state
==
1
&&
$
1
==
"arglist"
{
match
(
$
0
,
"
\\
(.*
\\
)"
)
s
=
substr
(
$
0
,
RSTART
+
1
,
RLENGTH
-
2
)
numargs
=
split
(
s
,
a
,
","
)
...
...
@@ -80,10 +79,13 @@ state == 0 && /arglist/ {
error
(
cname
": wrong argument type for arg "
i
" "
t
)
arglist
[
i
]
=
n
}
next
}
state
==
0
&&
/
argsig
/
{
arg_req
=
$
2
;
arg_opt
=
$
3
;
arg_var
=
$
4
}
state
==
0
&&
/
.
*
\
"/ {
state
==
1
&&
$
1
==
"argsig"
{
arg_req
=
$
2
;
arg_opt
=
$
3
;
arg_var
=
$
4
;
next
}
state
==
1
&&
$
1
==
"argpos"
{
argpos
[
$2
]
=
$
3
;
next
}
state
==
1
&&
/
*
\
"/ {
# Concatenate strings. A very simplified version, but
# works for us
gsub("
\\\\
n
\
" *
\"
"
,
"
\n
"
)
...
...
@@ -93,7 +95,7 @@ state == 0 && /.*\"/ {
docstring
=
substr
(
$
0
,
RSTART
+
1
,
RLENGTH
-
2
)
}
/
argpos
/
{
argpos
[
$2
]
=
$
3
}
state
==
1
&&
NF
==
0
{
flush
();
state
=
0
;
}
END
{
flush
()
...
...
Please
register
or
sign in
to post a comment