gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Help please (filetypes)


From: Miles Bader
Subject: Re: [Gnu-arch-users] Help please (filetypes)
Date: Fri, 2 Jan 2004 17:17:16 -0500
User-agent: Mutt/1.3.28i

On Fri, Jan 02, 2004 at 01:03:46PM +0100, Thomas Zander wrote:
> Please take the time to send me lines like these for the obvious and not-so 
> obvious filetypes (.pl, .c, .h included) and where you normally put your 
> arch-tag info.

This is the list that tla-tools auto-tag-generation uses; it's a two-level
mapping: extension/name -> file-type and then file-type -> tag-syntax
(they all go at the end).

In the extension/name -> file-type mapping, "ext" means file extension, and
"name" means a regexp matching the entire (non-directory) filename:

  # Filename to file-type rules

  tagline_type[10, "ext", "c"]          = "c"    #:  /* arch-tag: ...\n  ... */
  tagline_type[10, "ext", "h"]          = "c"
  tagline_type[10, "ext", "s"]          = "c"    # fed through cpp

  tagline_type[10, "ext", "el"]         = "lisp" #:  ;;; arch-tag: ...
  tagline_type[10, "ext", "l"]          = "lisp"

  tagline_type[10, "ext", "sh"]         = "sh"   #:  # arch-tag: ...
  tagline_type[10, "ext", "bash"]       = "sh"
  tagline_type[10, "ext", "csh"]        = "sh"
  tagline_type[10, "ext", "sed"]        = "sh"
  tagline_type[10, "ext", "awk"]        = "sh"
  tagline_type[10, "ext", "perl"]       = "sh"
  tagline_type[10, "ext", "pl"]         = "sh"   # perl
  tagline_type[10, "ext", "py"]         = "sh"   # python
  tagline_type[10, "ext", "tit"]        = "sh"   # by examination
  tagline_type[10, "ext", "inp"]        = "sh"   # by examination

  tagline_type[10, "ext", "m4"]         = "m4"

  tagline_type[10, "ext", "tex"]        = "tex"  #:  % arch-tag: ...

  tagline_type[10, "ext", "texi"]       = "texi" #:  @c arch-tag: ...
  tagline_type[10, "ext", "texinfo"]    = "texi"

  tagline_type[10, "ext", "[1-9]"]      = "roff" #:  .\" arch-tag: ...

  tagline_type[10, "ext", "html"]       = "html" #:  <!-- arch-tag: ...\n -->
  tagline_type[10, "ext", "xml"]        = "html"

  tagline_type[10, "ext", "bat"]        = "bat"  #:  rem arch-tag: ...

  tagline_type[10, "name", "\\.arch-inventory"] = "sh"
  tagline_type[10, "name", "ChangeLog.*"]       = "lisp"
  tagline_type[10, "name", "configure\\.in"]    = "autoconf"
  tagline_type[10, "name", "[Mm]akefile.*"]     = "sh"
  tagline_type[10, "name", "\\.gdbinit.*"]      = "sh"
  tagline_type[10, "name", "Imakefile"]         = "c" # run through cpp
  tagline_type[10, "name", "texinfo\\.tex"]     = "texi" # texinfo, not tex

  ## File-type tagline conventions

  file_type_tagline["sh"]       = "# arch-tag: %s"
  file_type_tagline["c"]        = "/* arch-tag: %s\n   (do not change this 
comment) */"
  file_type_tagline["html"]     = "<!-- arch-tag: %s\n     (do not change this 
comment) -->"
  file_type_tagline["lisp"]     = ";;; arch-tag: %s"
  file_type_tagline["null"]     = "arch-tag: %s"
  file_type_tagline["roff"]     = ".\\\" arch-tag: %s"
  file_type_tagline["tex"]      = "%% arch-tag: %s"

  # For the following types, the most natural comment syntaxes run
  # afoul of the rule that arch-tag: must only be preceded by
  # punctuation, so various workarounds are used instead; hopefully
  # this problem will be fixed with the switch to arch-id:.

  #file_type_tagline["m4"]      = "dnl arch-tag: %s"
  file_type_tagline["m4"]       = "ifelse(dnl\tDo not change this comment\n   
arch-tag: %s\n)dnl"
  #file_type_tagline["autoconf"] = "dnl arch-tag: %s"
  file_type_tagline["autoconf"] = "m4_if(dnl\tDo not change this comment\n   
arch-tag: %s\n)dnl"

  #file_type_tagline["texi"]    = "@c arch-tag: %s"
  file_type_tagline["texi"]     = "@ignore\n   arch-tag: address@hidden ignore"

  #file_type_tagline["bat"]     = "rem arch-tag: %s"
  file_type_tagline["bat"]      = "goto skipArchTag\n   arch-tag: 
%s\n:skipArchTag"

-Miles
-- 
I'd rather be consing.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]