1 ;;; semantic-erlang.el --- Semantic details for Erlang
3 ;; Copyright (C) 2001, 2002, 2003 Vladimir G. Sekissov
4 ;; Copyright (C) 2003 David Ponce
6 ;; Author: Vladimir G. Sekissov <svg@surnet.ru>
7 ;; David Ponce <david@dponce.com>
9 ;; X-RCS: $Id: semantic-erlang.el,v 1.1 2007-11-26 15:11:56 michaels Exp $
11 ;; This file is not part of GNU Emacs.
13 ;; This file is free software; you can redistribute it and/or modify
14 ;; it under the terms of the GNU General Public License as published by
15 ;; the Free Software Foundation; either version 2, or (at your option)
18 ;; This file is distributed in the hope that it will be useful,
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;; GNU General Public License for more details.
23 ;; You should have received a copy of the GNU General Public License
24 ;; along with GNU Emacs; see the file COPYING. If not, write to
25 ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
26 ;; Boston, MA 02110-1301, USA.
38 (require 'semantic-erlang-by)
39 (require 'erlang-edoc)
41 ;; Depending on what elements you include specialized support for
43 (require 'semantic-ctxt)
44 (require 'semantic-imenu)
48 (define-lex-simple-regex-analyzer semantic-erlang-lex-char
49 "Detect and create Erlang CHAR tokens."
50 "\\s/\\(\\(\\\\[0-9]\\{3\\}\\)\\|[^\\]\\|\\\\\\\\\\)"
53 (define-lex semantic-erlang-lexer
54 "Lexical Analyzer for Erlang code."
55 semantic-lex-ignore-whitespace
56 semantic-lex-ignore-newline
58 semantic-lex-symbol-or-keyword
59 semantic-erlang-lex-char
60 ;;semantic-lex-charquote
61 semantic-lex-paren-or-list
62 semantic-lex-close-paren
63 semantic-lex-ignore-comments
64 semantic-lex-punctuation
65 semantic-lex-default-action)
67 (defun semantic-erlang-default-setup ()
68 "Set up a buffer for semantic parsing of the Erlang language."
69 (semantic-erlang-by--install-parser)
72 semantic-lex-number-expression nil
73 semantic-lex-syntax-modifications '((?' "_")
76 semantic-lex-analyzer 'semantic-erlang-lexer
79 imenu-create-index-function 'semantic-create-imenu-index
80 semantic-type-relation-separator-character '(".")
81 semantic-command-separation-character ","
82 document-comment-start "%%**"
83 document-comment-line-prefix "%%"
84 document-comment-end "%%*"
85 ;; speedbar and imenu buckets name
86 semantic-symbol->name-assoc-list-for-type-parts
88 '((variable . "Definitions")
90 (function . "Functions"))
91 semantic-symbol->name-assoc-list
93 '((variable . "Definitions")
95 (function . "Functions")
96 (include . "Includes")
100 (add-hook 'erlang-mode-hook 'semantic-erlang-default-setup)
102 (provide 'semantic-erlang)
104 ;;; semantic-erlang.el ends here