Add 2012 to FSF copyright years for Emacs files
[bpt/emacs.git] / lisp / cedet / semantic / bovine / scm-by.el
CommitLineData
4feec2f5
CY
1;;; semantic-scm-by.el --- Generated parser support file
2
acaf905b 3;; Copyright (C) 2001, 2003, 2009-2012 Free Software Foundation, Inc.
4feec2f5
CY
4
5;; This file is part of GNU Emacs.
6
7;; GNU Emacs is free software: you can redistribute it and/or modify
8;; it under the terms of the GNU General Public License as published by
9;; the Free Software Foundation, either version 3 of the License, or
10;; (at your option) any later version.
11
12;; GNU Emacs is distributed in the hope that it will be useful,
13;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;; GNU General Public License for more details.
16
17;; You should have received a copy of the GNU General Public License
18;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19
20;;; Commentary:
21;;
811954e3 22;; This file was generated from etc/grammars/scm.by.
4feec2f5
CY
23
24;;; Code:
25
b90caf50
CY
26(require 'semantic/lex)
27
4feec2f5
CY
28(eval-when-compile (require 'semantic/bovine))
29\f
30;;; Prologue
31;;
32\f
33;;; Declarations
34;;
35(defconst semantic-scm-by--keyword-table
36 (semantic-lex-make-keyword-table
37 '(("define" . DEFINE)
38 ("define-module" . DEFINE-MODULE)
39 ("load" . LOAD))
40 '(("load" summary "Function: (load \"filename\")")
41 ("define-module" summary "Function: (define-module (name arg1 ...)) ")
42 ("define" summary "Function: (define symbol expression)")))
43 "Table of language keywords.")
44
45(defconst semantic-scm-by--token-table
46 (semantic-lex-make-type-table
47 '(("close-paren"
48 (CLOSEPAREN . ")"))
49 ("open-paren"
50 (OPENPAREN . "(")))
51 'nil)
52 "Table of lexical tokens.")
53
54(defconst semantic-scm-by--parse-table
55 `(
56 (bovine-toplevel
57 (scheme)
58 ) ;; end bovine-toplevel
59
60 (scheme
61 (semantic-list
62 ,(lambda (vals start end)
63 (semantic-bovinate-from-nonterminal
64 (car
65 (nth 0 vals))
66 (cdr
67 (nth 0 vals))
68 'scheme-list))
69 )
70 ) ;; end scheme
71
72 (scheme-list
73 (open-paren
74 "("
75 scheme-in-list
76 close-paren
77 ")"
78 ,(semantic-lambda
79 (nth 1 vals))
80 )
81 ) ;; end scheme-list
82
83 (scheme-in-list
84 (DEFINE
85 symbol
86 expression
87 ,(semantic-lambda
88 (semantic-tag-new-variable
89 (nth 1 vals) nil
90 (nth 2 vals)))
91 )
92 (DEFINE
93 name-args
94 opt-doc
95 sequence
96 ,(semantic-lambda
97 (semantic-tag-new-function
98 (car
99 (nth 1 vals)) nil
100 (cdr
101 (nth 1 vals))))
102 )
103 (DEFINE-MODULE
104 name-args
105 ,(semantic-lambda
106 (semantic-tag-new-package
107 (nth
108 (length
109 (nth 1 vals))
110 (nth 1 vals)) nil))
111 )
112 (LOAD
113 string
114 ,(semantic-lambda
115 (semantic-tag-new-include
116 (file-name-nondirectory
117 (read
118 (nth 1 vals)))
119 (read
120 (nth 1 vals))))
121 )
122 (symbol
123 ,(semantic-lambda
124 (semantic-tag-new-code
125 (nth 0 vals) nil))
126 )
127 ) ;; end scheme-in-list
128
129 (name-args
130 (semantic-list
131 ,(lambda (vals start end)
132 (semantic-bovinate-from-nonterminal
133 (car
134 (nth 0 vals))
135 (cdr
136 (nth 0 vals))
137 'name-arg-expand))
138 )
139 ) ;; end name-args
140
141 (name-arg-expand
142 (open-paren
143 name-arg-expand
144 ,(semantic-lambda
145 (nth 1 vals))
146 )
147 (symbol
148 name-arg-expand
149 ,(semantic-lambda
150 (cons
151 (nth 0 vals)
152 (nth 1 vals)))
153 )
154 ( ;;EMPTY
155 ,(semantic-lambda)
156 )
157 ) ;; end name-arg-expand
158
159 (opt-doc
160 (string)
161 ( ;;EMPTY
162 )
163 ) ;; end opt-doc
164
165 (sequence
166 (expression
167 sequence)
168 (expression)
169 ) ;; end sequence
170
171 (expression
172 (symbol)
173 (semantic-list)
174 (string)
175 (number)
176 ) ;; end expression
177 )
178 "Parser table.")
179
180(defun semantic-scm-by--install-parser ()
181 "Setup the Semantic Parser."
182 (setq semantic--parse-table semantic-scm-by--parse-table
183 semantic-debug-parser-source "scheme.by"
184 semantic-debug-parser-class 'semantic-bovine-debug-parser
185 semantic-flex-keywords-obarray semantic-scm-by--keyword-table
186 ))
187
4feec2f5
CY
188(provide 'semantic/bovine/scm-by)
189
190;;; semantic/bovine/scm-by.el ends here