Handling indentation (etc) for various programming languages
is a critical part of our handling of Monospace
Fortunately, the venerable Ctags
solves a large part of this problem very nicely.
Basically, it scans a file of program source code,
recording the locations of any "names" it finds.
Given this information and a bit of post-processing,
AxAp should be able to identify modules and functions,
classes and methods, etc.
supports 64 (!) input languages,
including the C family, Python, and Ruby:
ada, ant, asm, asp, automake, awk, basic, beta, c, clojure, cobol,
css, dbusintrospect, diff, dosbatch, dts, eiffel, erlang, falcon,
flex, fortran, glade, go, html, jprop, jscript, json, lisp, lua,
make, matlab, maven2, myrddin, objc, ocaml, pascal, perl, perl6,
php, plist, protobuf, python, r, relaxng, rexx, rpmspec, rst,
ruby, rust, scheme, sh, slang, sml, sql, svg, tcl, tex, ttcn,
verilog, vhdl, vim, windres, xslt, yacc
We'd be happy to have any of these as part of AxAp,
but we expect to wait for someone else to port them (:-).
Unlike the default (vi-specific) file format for Ctags,
format is editor-neutral.
An Etags file contains one section per input source file.
Each section is formatted as follows:
We plan to use this as our de facto
for tag position metadata.
Although parsers for Universal Ctags must be written in C,
use parsers written in any language,
as long as they support the Etags file format.
For example, it might be interesting to write one in Elixir,
taking advantage of its pattern matching capabilities.
This wiki page is maintained by Rich Morin
an independent consultant specializing in software design, development, and documentation.
Please feel free to email
comments, inquiries, suggestions, etc!