This library provides a program that checks the source form of a Prolog program and creates a tags file for use with the UNIX editors ex and vi, similar to ctags(1). The library is loaded using
and the predicates ptags/1, ptags/2 and tags/2 become global. The utility is invoked by:- lib(ptags).
or:- ptags(+File)
+TagsFile is the name of the tags file. If +TagsFile is omitted, it defaults to tags.:- ptags(+File, +TagsFile)
The tags file created by the ptags/1, 2 predicates can be used as a tags file for vi or ex. A procedures specified as Name/Arity can be found using the command
If there are several procedures with the same name and different arity, the above command will find only one of them. In this case the command:ta Name
should be used. If the clauses for the procedure are not consecutive or if the procedure occurs in more than one file, only one occurrence will be put into the tags file. Which one it will be depends on the file name and on the contents of the line that is being sought by the :ta command.:ta Name/Arity