
















   Purpose: Extract predicate names and descriptions from files.



:- public
	h
0,
	help/1,
	help/2.

:- mode
	help(+),
	help(+,+),
	search_help_file(+,+,-)
earch_source_file(+,+),
		look_for_predicate(+,+),
		print_if_not_end_of
ment(+),
	parse_help_line(+,+,-,+,?),
		has_paren(+,-,+,?),
		get_fi
,+,?),
		get_arity(+,?,+,?),
			get_arity(+,+,-,+,?),
	parse_sou
line(+,+,+,?),
	read_a_line(-),
	skip_string(+,+,?),
	skip_s

















































































































































































































































































































































































































35, Line, Rest_of_line), %  Find 
followed by "#"
	!,
	writef('
,[Rest_of_line]), nl.

lo
or_comment :-
	repeat
ead_a_line(Line),
ip_string(37,
 Line, Rest_of_line), %  Find "%" followed by "^"
	!,
	writef(' %s',[Rest_of_line]), nl.


t_comment :-				 %  Failure driven
	repeat,
	read_a_line(Line),
























6, 






























Line, Rest_of_line),		%  Scrap in
l "%"
	writef('%s',[Rest_of_l
), nl,
	fail.



%   pars
lp_line(Pred, Arity, 
) has to parse a 
 line.
%   Th
are no le
g spa
o























































































































































 !.
has_



































































 get_arity(Depth, SoFar, Arity)
	| 
"",!, skip_string(34), get_arit
pth, SoFar, Arity)
	|   "("
 {E is Depth+1},  get_a
(E, SoFar, Arity)
	
")", {Depth = 0
, {Arity = 
r}
	|  
, !












































































),	

















































































character.
%   If there is 
a next line, Line is un
d with 'end_of_file
read_a_line(Lin
-
	get0(Cha
	read_a
e(C































































































































































!, sk
p







