Authors:

See AUTHORS file

Summary:

Otags can be used to build TAGS tables for emacs and vi, like etags
does, but for Ocaml code source files. It is based on camlp4 parsers
of caml, which makes it more accurate than versions based on regexps :
otags finds references to constructors of sum types, fields of
records, etc.

Usage :

To build TAGS for a set of files:

   otags file1.ml file2.ml ...

To build TAGS for all .ml files in a directory:

   otags dir

To build TAGS recusively:

   otags -r dir

Theses syntaxes can be mixed, see

  otags -help

for list of options available.

When searching directories, processed files are those matching the
"suffix list", which is set by default to: [".mli"; ".ml"]. This list
can be edited using the options -sc, -sa and -sr which, respectively
clears, add entries and removes entries in this list.

Addtional parser can be trown to Camlp4 using the -pa option

Otags X.Y version number match Ocaml version number. See HISTORY for
old versions / Ocaml matching.

===========================================================================

INSTALLATION

1- configure with

   ./configure

Recognized options are:
  --prefix <path>       installation prefix [/usr/local]
  --bindir <path>       user executables [PREFIX/bin]
  --libdir <path>       camlp4 libraries [PREFIX/lib/ocaml]
  --ocamlsrc <path>     ocaml source directory [no default]

The first three options set the directories where the binaries and 
the camlp4 parser libraries are installed.

The --ocamlsrc option is completely optional. Use it if you have 
a ocaml source tree that is
- fully configured
- not cleaned
- in sync with your default ocaml compiler
The --ocamlsrc option enables the native-code compilation of the
camlp4 parsers that are used inside otags to parse your sources. This
results in 10 times faster tags generation.

2- compile with

   make all

3- acquire suitable rights and install

   make install

===========================================================================

Supposed syntax for emacs TAGS (.tags) files, as analysed from output
of etags, read in etags.c and discussed with Francesco Potorti.

<file> ::= <page>+

<page> ::= <header><body>

<header> ::= <NP><CR><file-name>,<body-length><CR>

<body> ::= <tag-line>*

<tag-line> ::= <prefix><DEL><tag><SOH><line-number>,<begin-char-index><CR>

<NP> ::= ascii NP, (emacs ^L) 
<DEL> ::= ascii DEL, (emacs ^?)
<SOH> ::= ascii SOH, (emacs ^A)
<CR> :: ascii CR

===========================================================================
Wish list:

  - tagging qualified names (e.g. Yetanothertbl.create)
  - handling .ml4 files of Coq sources
