Mercurial > emacs
annotate etc/srecode/wisent.srt @ 111841:25e3c2636c1f
* lisp/gnus/message.el: Use completion-at-point.
(message-completion-function): New fun, extracted from message-tab.
(message-mode): Use it for completion-at-point-functions.
(message-tab): Use it and completion-at-point.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 06 Dec 2010 21:01:00 -0500 |
parents | 1d1d5d9bd884 |
children | 376148b31b5e |
rev | line source |
---|---|
105407
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
1 ;; wisent.srt --- SRecode templates for Emacs/WISENT grammar files. |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
2 |
106815 | 3 ;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
105407
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
4 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
5 ;; Author: Eric M. Ludlam <eric@siege-engine.com> |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
6 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
7 ;; This file is part of GNU Emacs. |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
8 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
9 ;; GNU Emacs is free software: you can redistribute it and/or modify |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
10 ;; it under the terms of the GNU General Public License as published by |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
11 ;; the Free Software Foundation, either version 3 of the License, or |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
12 ;; (at your option) any later version. |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
13 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
14 ;; GNU Emacs is distributed in the hope that it will be useful, |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
17 ;; GNU General Public License for more details. |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
18 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
19 ;; You should have received a copy of the GNU General Public License |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
20 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
21 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
22 set mode "wisent-grammar-mode" |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
23 set comment_start ";;" |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
24 set comment_prefix ";;" |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
25 set comment_end "" |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
26 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
27 context file |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
28 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
29 template empty :file :user :time |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
30 "Insert a skeleton for a grammar file." |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
31 ---- |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
32 {{>:filecomment}} |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
33 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
34 ;;; Commentary: |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
35 ;; |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
36 ;; Parser for {{?TARGETMODE}} mode |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
37 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
38 %languagemode {{TARGETMODE}}-mode |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
39 %parsetable wisent-{{TARGETMODE}}-parser-tables |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
40 %keywordtable wisent-{{TARGETMODE}}-keywords |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
41 %tokentable wisent-{{TARGETMODE}}-tokens |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
42 %languagemode {{TARGETMODE}}-mode |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
43 %setupfunction wisent-{{TARGETMODE}}-default-setup |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
44 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
45 %start goal |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
46 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
47 ;;; KEYWORDS |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
48 %type <keyword> |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
49 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
50 %% |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
51 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
52 goal |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
53 : {{^}} |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
54 ; |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
55 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
56 %% |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
57 (define-lex wisent-{{TARGETMODE}}-lexer |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
58 "Lexical analzer to handle {{TARGETMODE}} buffers." |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
59 ;; semantic-lex-newline |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
60 semantic-lex-ignore-whitespace |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
61 semantic-lex-ignore-newline |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
62 semantic-lex-ignore-comments |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
63 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
64 semantic-lex-default-action |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
65 ) |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
66 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
67 ;; {{FILENAME}} ends here |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
68 ---- |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
69 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
70 context declaration |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
71 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
72 template function |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
73 ---- |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
74 {{?NAME}} |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
75 : {{^}} |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
76 ; |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
77 ---- |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
78 bind "f" |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
79 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
80 template keyword |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
81 ---- |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
82 %keyword {{?NAME:upcase}} "{{NAME:downcase}}" |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
83 %put {{NAME:upcase}} summary "{{NAME}} {{^}}" |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
84 ---- |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
85 bind "k" |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
86 |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
87 template token |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
88 ---- |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
89 %type <{{?LEXTOKEN}}> |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
90 %token <{{LEXTOKEN}}> {{LEXTOKEN}} |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
91 ---- |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
92 bind "t" |
84fc40980c51
* srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
93 |
105414 | 94 ;; end |