Attachment 'ana-mode.el'
Download;;; ana-mode-el -- Major mode for Analys code
;; Author: Gibelin Julien <gibelin_at-nospam-please-_rarfaxp_dot_riken_dot_go_dot_jp>
;; Created: May 2003
;; Keywords: ANA major-mode
;; 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 2 of
;; the License, 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; if not, write to the Free
;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
;; MA 02111-1307 USA
;;; Code:
(defvar ana-mode-hook nil)
(defvar ana-mode-map ()
"Keymap for ANA major mode.")
(if ana-mode-map nil
(setq ana-mode-map (make-sparse-keymap)))
(defconst ana-font-lock-keywords-1
(list
; These define the beginning and end of each ANA entity definition
; "analys" "gate" "or" "and" "xygate" "hst1" "hst2" "c" "profile"
; '("^analys\\>" 0 font-lock-keyword-face )
; '("^\\(and\\|gate\\|or\\|xygate\\|hst.?\\|e.*\\)" 1 font-lock-keyword-face )
; '("^\\(prof\\|profile\\|profi\\|profil\\)\\b" 1 font-lock-keyword-face )
'("analys\\>" 0 font-lock-keyword-face )
'("\\(and\\|gate\\|or\\|xygate\\|include\\|cc\\|stop\\)" 1 font-lock-keyword-face )
; '("^c.*" 0 font-lock-comment-face)
'("^#.*" 0 font-lock-comment-face)
'("\\," 0 font-lock-warning-face)
'("'.*'" 0 font-lock-string-face))
"Minimal highlighting expressions for ANA mode.")
(defvar ana-font-lock-keywords ana-font-lock-keywords-1
"Default highlighting expressions for ANA mode.")
(defvar ana-mode-syntax-table nil
"Syntax table for ana-mode.")
(defun ana-create-syntax-table ()
(if ana-mode-syntax-table
()
(setq ana-mode-syntax-table (make-syntax-table))
; This is added so entity names with underscores can be more easily parsed
(modify-syntax-entry ?_ "w" ana-mode-syntax-table)
; Comment styles are same as C++
(modify-syntax-entry ?/ ". 124b" ana-mode-syntax-table)
(modify-syntax-entry ?* ". 23" ana-mode-syntax-table)
(modify-syntax-entry ?\n "> b" ana-mode-syntax-table))
(set-syntax-table ana-mode-syntax-table))
(defun ana-mode ()
"Major Analys files."
(interactive)
(kill-all-local-variables)
(ana-create-syntax-table)
;; Set up font-lock
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults
'(ana-font-lock-keywords))
;; Register our indentation function
;; (make-local-variable 'indent-line-function)
;; (setq indent-line-function 'ana-indent-line)
(setq major-mode 'ana-mode)
(setq mode-name "ANA")
(run-hooks 'ana-mode-hook))
(provide 'ana-mode)
;;; ana-mode.el ends here
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.- [get | view] (2012-10-17 06:59:08, 278.1 KB) [[attachment:ANAROOT講習会資料.pdf]]
- [get | view] (2013-06-25 06:26:53, 0.5 KB) [[attachment:CounterExample.cc]]
- [get | view] (2012-10-17 06:53:24, 1.6 KB) [[attachment:MakePlaHist.C]]
- [get | view] (2012-08-20 06:37:41, 6.2 KB) [[attachment:TArtCSVParameter.cc]]
- [get | view] (2012-08-20 06:37:53, 1.0 KB) [[attachment:TArtCSVParameter.hh]]
- [get | view] (2013-06-25 06:26:20, 5.3 KB) [[attachment:TArtCounter.cc]]
- [get | view] (2013-06-25 06:26:40, 1.2 KB) [[attachment:TArtCounter.hh]]
- [get | view] (2012-11-29 12:05:55, 4.8 KB) [[attachment:TArtParameters.cc]]
- [get | view] (2012-11-29 12:05:35, 1.0 KB) [[attachment:TArtParameters.hh]]
- [get | view] (2012-12-04 15:34:16, 6.3 KB) [[attachment:TArtUserParameters.cc]]
- [get | view] (2012-12-04 15:34:00, 1.6 KB) [[attachment:TArtUserParameters.hh]]
- [get | view] (2012-12-04 15:34:38, 1.6 KB) [[attachment:UserParameters.xml]]
- [get | view] (2012-04-19 08:38:22, 3.0 KB) [[attachment:ana-mode.el]]
- [get | view] (2012-04-20 03:38:36, 2.7 KB) [[attachment:anaroot_filter.ver1.00.jar]]
- [get | view] (2012-06-04 04:07:52, 2.6 KB) [[attachment:anaroot_filter.ver1.01.jar]]
- [get | view] (2012-06-01 17:27:17, 4.7 KB) [[attachment:calc2xml.v2.xsl]]
- [get | view] (2012-04-20 03:33:51, 6.3 KB) [[attachment:calc2xml.xsl]]
- [get | view] (2012-10-17 07:32:11, 1.0 KB) [[attachment:install-example.txt]]
- [get | view] (2012-11-29 12:06:11, 1.0 KB) [[attachment:parameters.xml]]
- [get | view] (2012-04-20 03:33:17, 3.1 KB) [[attachment:xml2calc.xsl]]
You are not allowed to attach a file to this page.