comparison src/syntax.h @ 21206:dac44ee5f772

(SYNTAX_FLAGS_COMSTART_FIRST): New macro. (SYNTAX_FLAGS_COMSTART_SECOND): Likewise. (SYNTAX_FLAGS_COMEND_FIRST, SYNTAX_FLAGS_COMEND_SECOND): Likewise. (SYNTAX_FLAGS_PREFIX, SYNTAX_FLAGS_COMMENT_STYLE): Likewise.
author Richard M. Stallman <rms@gnu.org>
date Tue, 17 Mar 1998 23:58:13 +0000
parents 9f8f791762a8
children e53c0d01cf31
comparison
equal deleted inserted replaced
21205:f63ba9821988 21206:dac44ee5f772
169 and bit 6 is used to determine whether a comment-end or Scommentend 169 and bit 6 is used to determine whether a comment-end or Scommentend
170 ends style a or b. Comment start sequences can start style a or b. 170 ends style a or b. Comment start sequences can start style a or b.
171 Style a is always the default. 171 Style a is always the default.
172 */ 172 */
173 173
174 /* These macros extract a particular flag for a given character. */
175
174 #define SYNTAX_COMSTART_FIRST(c) ((SYNTAX_WITH_FLAGS (c) >> 16) & 1) 176 #define SYNTAX_COMSTART_FIRST(c) ((SYNTAX_WITH_FLAGS (c) >> 16) & 1)
175 177
176 #define SYNTAX_COMSTART_SECOND(c) ((SYNTAX_WITH_FLAGS (c) >> 17) & 1) 178 #define SYNTAX_COMSTART_SECOND(c) ((SYNTAX_WITH_FLAGS (c) >> 17) & 1)
177 179
178 #define SYNTAX_COMEND_FIRST(c) ((SYNTAX_WITH_FLAGS (c) >> 18) & 1) 180 #define SYNTAX_COMEND_FIRST(c) ((SYNTAX_WITH_FLAGS (c) >> 18) & 1)
179 181
180 #define SYNTAX_COMEND_SECOND(c) ((SYNTAX_WITH_FLAGS (c) >> 19) & 1) 182 #define SYNTAX_COMEND_SECOND(c) ((SYNTAX_WITH_FLAGS (c) >> 19) & 1)
181 183
182 #define SYNTAX_PREFIX(c) ((SYNTAX_WITH_FLAGS (c) >> 20) & 1) 184 #define SYNTAX_PREFIX(c) ((SYNTAX_WITH_FLAGS (c) >> 20) & 1)
183 185
184 /* extract the comment style bit from the syntax table entry */
185 #define SYNTAX_COMMENT_STYLE(c) ((SYNTAX_WITH_FLAGS (c) >> 21) & 1) 186 #define SYNTAX_COMMENT_STYLE(c) ((SYNTAX_WITH_FLAGS (c) >> 21) & 1)
187
188 /* These macros extract specific flags from an integer
189 that holds the syntax code and the flags. */
190
191 #define SYNTAX_FLAGS_COMSTART_FIRST(flags) (((flags) >> 16) & 1)
192
193 #define SYNTAX_FLAGS_COMSTART_SECOND(flags) (((flags) >> 17) & 1)
194
195 #define SYNTAX_FLAGS_COMEND_FIRST(flags) (((flags) >> 18) & 1)
196
197 #define SYNTAX_FLAGS_COMEND_SECOND(flags) (((flags) >> 19) & 1)
198
199 #define SYNTAX_FLAGS_PREFIX(flags) (((flags) >> 20) & 1)
200
201 #define SYNTAX_FLAGS_COMMENT_STYLE(flags) (((flags) >> 21) & 1)
186 202
187 /* This array, indexed by a character, contains the syntax code which that 203 /* This array, indexed by a character, contains the syntax code which that
188 character signifies (as a char). For example, 204 character signifies (as a char). For example,
189 (enum syntaxcode) syntax_spec_code['w'] is Sword. */ 205 (enum syntaxcode) syntax_spec_code['w'] is Sword. */
190 206