Stylesheet contribution for a2ps: go.ssh

Scott Pakin <[email protected]> Fri, 19 Feb 2010 17:17:45 -0700
Newsgroups gmane.comp.printing.a2ps.patches
Organization Los Alamos National Laboratory
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------090406000908030607000208
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

I wrote a brief stylesheet for Google's Go programming language
(http://golang.org/).  Perhaps you'd like to include this in the
next version of a2ps?

Regards,
-- Scott

--------------090406000908030607000208
Content-Type: text/plain;
 name="go.ssh"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="go.ssh"

# Style sheet for Go
# Copyright (C) 2010 Scott Pakin

#
# This file is part of a2ps.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING.  If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#

style Go is
written by "Scott Pakin <[email protected]>"
version is 1.1
requires a2ps version 4.14

first alphabet is
   "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_"
second alphabet is
   "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_0123456789"
case sensitive

documentation is
  "Keywords used are everything listed in the"
  "Go Programming Language Specification."
end documentation

keywords in Keyword are
   bool,    byte,  float32, float64, int8,   int16, int32, int64,
   string,  uint8, uint16,  uint32,  uint64,
   float,   int,   uint,    uintptr,
   true,    false, iota,
   nil,
   cap,     close, closed,  copy,    len,    make,  new,   panic,
   panicln, print, println
end keywords

keywords in Keyword_strong are
  break,    default,     func,   interface, select,
  "case",   defer,       go,     map,       struct,
  chan,     else,        goto,   package,   switch,
  const,    fallthrough, if,     range,     type,
  continue, for,         import, return,    var
end keywords

optional operators are
   # Actual
   && \wedge,
   || \vee,
   <= \leq,
   >= \geq,
   ! \not,
   # Protected from the above
   <<=,
   >>=,
   !=
end operators

sequences are
   "/*" Comment Comment "*/" Comment,
   "//" Comment,
   C-string
end sequences
end style

--------------090406000908030607000208
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
a2ps-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/a2ps-patches

--------------090406000908030607000208--