/
bison-mode.elc
228 lines (215 loc) · 22.7 KB
/
bison-mode.elc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
;ELC
;;; Compiled by philipp@philipp-desktop on Tue Apr 13 20:22:52 2010
;;; from file /home/philipp/elisp/bison-mode.el
;;; in Emacs version 22.2.1
;;; with all optimizations.
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
(< (aref emacs-version (1- (length emacs-version))) ?A)
(or (and (boundp 'epoch::version) epoch::version)
(string-lessp emacs-version "19.29")))
(error "`bison-mode.el' was compiled for Emacs 19.29 or later"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(byte-code "\300\301!\210\300\302!\207" [require derived make-regexp] 2)
#@50 commands which can declare a token or state type
(defvar bison--declarers '("%union" "%token" "%type" "%left" "%right" "%nonassoc") (#$ . 648))
(byte-code "\301B\302\301!\204 \303\301\304\"\210\305B\302\305!\204! \303\305\306 \307Q\"\210\301\207" [current-load-list bison--word-constituent-re default-boundp set-default "\\(\\sw\\|_\\)" bison--production-re "^" "+:"] 5)
#@63 section before c-declarations-section, if that section exists
(defvar bison--pre-c-decls-section 0 (#$ . 1030))
#@76 section denoted by %{ and $} for c-declarations at the top of a bison file
(defvar bison--c-decls-section 1 (#$ . 1148))
#@34 section before the rules section
(defvar bison--bison-decls-section 2 (#$ . 1275))
#@70 section delimited by %%'s where productions and rules are enumerated
(defvar bison--grammar-rules-section 3 (#$ . 1364))
#@56 section after the second %% where c-code can be placed
(defvar bison--c-code-section 4 (#$ . 1491))
(byte-code "\301B\302\301!\204 \303\301\304\"\210\305B\302\305!\204 \303\305\306\"\210\307B\302\307!\204- \303\307\310\"\210\301\207" [current-load-list bison--c-decls-section-opener default-boundp set-default "%{" bison--c-decls-section-closer "%}" bison--grammar-rules-section-delimeter "%%"] 3)
#@55 column for rule and production separators "|" and ";"
(defvar bison-rule-separator-column 8 (#$ . 1903))
#@58 column for beginning enumeration of a production's rules
(defvar bison-rule-enumeration-column 16 (#$ . 2014))
#@68 columnn in which tokens' and states' types should be when declared
(defvar bison-decl-type-column 8 (#$ . 2131))
#@88 column in which tokens and states are listed when declared,
as with %token, %type, ...
(defvar bison-decl-token-column 24 (#$ . 2250))
#@155 non-nil means all electric keys will be disabled,
nil means that a bison-electric-* key will be on or off based on the individual
key's electric variable
(defvar bison-all-electricity-off nil (#$ . 2392))
#@37 non-nil means use an electric colon
(defvar bison-electric-colon-v t (#$ . 2603))
#@36 non-nil means use an electric pipe
(defvar bison-electric-pipe-v t (#$ . 2691))
#@42 non-nil means use an electric open-brace
(defvar bison-electric-open-brace-v t (#$ . 2777))
#@43 non-nil means use an electric close-brace
(defvar bison-electric-close-brace-v t (#$ . 2875))
#@41 non-nil means use an electric semicolon
(defvar bison-electric-semicolon-v t (#$ . 2975))
#@39 non-nil means use an electric percent
(defvar bison-electric-percent-v t (#$ . 3071))
#@41 non-nil means use an electric less-than
(defvar bison-electric-less-than-v t (#$ . 3163))
#@44 non-nil means use an electric greater-than
(defvar bison-electric-greater-than-v t (#$ . 3259))
#@36 Basic highlighting for Bison mode.
(defvar bison-font-lock-keywords-1 c-font-lock-keywords (#$ . 3361))
#@36 Gaudy highlighting for Bison mode.
(defvar bison-font-lock-keywords-2 (byte-code "\302\303\304!\305Q\306BC \"\207" [bison--declarers bison-font-lock-keywords-1 append "^\\(" make-regexp "\\)" (1 font-lock-keyword-face)] 4) (#$ . 3471))
#@48 Default expressions to highlight in Bison mode
(defvar bison-font-lock-keywords bison-font-lock-keywords-2 (#$ . 3714))
#@48 return a new list with the same elements as LS
(defalias 'copy-list #[(ls) "\204 \301\207@\302A!B\207" [ls nil copy-list] 3 (#$ . 3840)])
(defalias 'same-line-p #[(pt1 pt2 &optional bol eol) "\206\n \212\304 \210`) \206 \212\305\210`)\211\nX\205+ X\205+ \nY\205+ Y*\207" [bol eol pt1 pt2 beginning-of-line nil] 3])
#@61 Delete all spaces and tabs around point, leaving no spaces.
(defalias 'just-no-space #[nil "\300\301x\210`\300\301w\210`|\210\302\207" [" " nil t] 3 (#$ . 4175) "*"])
#@79 return t if there is nothing but whitespace between pt1 and pt2 not
inclusive
(defalias 'white-space-separation #[(pt1 pt2) "\212Tb\210\302\303 \304#)?\207" [pt1 pt2 re-search-forward "[^ \n]" t] 4 (#$ . 4349)])
#@91 return t if there is whitespace between the beginning of the line and the
current (point)
(defalias 'previous-white-space-p #[nil "\212`\301 \210\302\303\304#\205 \304*\207" [current-point beginning-of-line re-search-forward "\\s " t] 4 (#$ . 4569)])
#@87 return t if there are non-whitespace characters between beginning of line
and (point)
(defalias 'previous-non-ws-p #[nil "\212`\301 \210\302\303\304#*\207" [current-point beginning-of-line re-search-forward "[^ ]" t] 4 (#$ . 4829)])
#@61 return t if there are non-whitespace characters on the line
(defalias 'following-non-ws-p #[nil "\212`\301\210\302\303\304#*\207" [current-point nil re-search-backward "[^ ]+" t] 4 (#$ . 5071)])
#@73 return t if the line consists of nothiing but whitespace, nil otherwise
(defalias 'line-of-whitespace-p #[nil "\212\301\210`\302 \210\303\304\305#*?\207" [eol nil beginning-of-line re-search-forward "[^ \n]" t] 4 (#$ . 5276)])
#@53 goto and return pt of next non-whitespace character
(defalias 'goto-next-non-ws #[nil "\300\207" ["goto and return pt of next non-whitespace character"] 1 (#$ . 5513)])
(byte-code "\302\303N\204\f \304\302\303\305#\210\306\307!\204 \304\307\310\311#\210\307B\312\307!\204( \313\307\314 \"\210\306\315!\2044 \304\315\310\311#\210\315B\312\315!\204D \313\315\316 \"\210\304\301\310\311#\210\301B\312\301!\204^ \313\301\317\301\320\"\210 \"\210\304\311\321\322#\207" [current-load-list bison-mode-abbrev-table bison-mode-hook variable-documentation put "Hook run when entering Bison mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp bison-mode-map definition-name bison-mode default-boundp set-default make-sparse-keymap bison-mode-syntax-table make-syntax-table define-abbrev-table nil derived-mode-parent flex-mode] 5)
#@216 Major mode for editing bison/yacc files
In addition to any hooks its parent mode `flex-mode' might have run,
this mode runs the hook `bison-mode-hook', as the final step
during initialization.
\{bison-mode-map}
(defalias 'bison-mode #[nil "\306\300!\210\307\310 \210\311\312\310\313N\203 \314\311\313\310\313N#\210\315!\204'