4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
8 #define yy_create_buffer sensors_yy_create_buffer
9 #define yy_delete_buffer sensors_yy_delete_buffer
10 #define yy_flex_debug sensors_yy_flex_debug
11 #define yy_init_buffer sensors_yy_init_buffer
12 #define yy_flush_buffer sensors_yy_flush_buffer
13 #define yy_load_buffer_state sensors_yy_load_buffer_state
14 #define yy_switch_to_buffer sensors_yy_switch_to_buffer
15 #define yyin sensors_yyin
16 #define yyleng sensors_yyleng
17 #define yylex sensors_yylex
18 #define yylineno sensors_yylineno
19 #define yyout sensors_yyout
20 #define yyrestart sensors_yyrestart
21 #define yytext sensors_yytext
22 #define yywrap sensors_yywrap
23 #define yyalloc sensors_yyalloc
24 #define yyrealloc sensors_yyrealloc
25 #define yyfree sensors_yyfree
28 #define YY_FLEX_MAJOR_VERSION 2
29 #define YY_FLEX_MINOR_VERSION 5
30 #define YY_FLEX_SUBMINOR_VERSION 35
31 #if YY_FLEX_SUBMINOR_VERSION > 0
35 /* First, we deal with platform-specific or compiler-specific issues. */
37 /* begin standard C headers. */
43 /* end standard C headers. */
45 /* flex integer type definitions */
50 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
52 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
54 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
55 * if you want the limit (max/min) macros for int types.
57 #ifndef __STDC_LIMIT_MACROS
58 #define __STDC_LIMIT_MACROS 1
62 typedef int8_t flex_int8_t;
63 typedef uint8_t flex_uint8_t;
64 typedef int16_t flex_int16_t;
65 typedef uint16_t flex_uint16_t;
66 typedef int32_t flex_int32_t;
67 typedef uint32_t flex_uint32_t;
69 typedef signed char flex_int8_t;
70 typedef short int flex_int16_t;
71 typedef int flex_int32_t;
72 typedef unsigned char flex_uint8_t;
73 typedef unsigned short int flex_uint16_t;
74 typedef unsigned int flex_uint32_t;
76 /* Limits of integral types. */
78 #define INT8_MIN (-128)
81 #define INT16_MIN (-32767-1)
84 #define INT32_MIN (-2147483647-1)
87 #define INT8_MAX (127)
90 #define INT16_MAX (32767)
93 #define INT32_MAX (2147483647)
96 #define UINT8_MAX (255U)
99 #define UINT16_MAX (65535U)
102 #define UINT32_MAX (4294967295U)
107 #endif /* ! FLEXINT_H */
111 /* The "const" storage-class-modifier is valid. */
114 #else /* ! __cplusplus */
116 /* C99 requires __STDC__ to be defined as 1. */
117 #if defined (__STDC__)
121 #endif /* defined (__STDC__) */
122 #endif /* ! __cplusplus */
125 #define yyconst const
130 /* Returned upon end-of-file. */
133 /* Promotes a possibly negative, possibly signed char to an unsigned
134 * integer for use as an array index. If the signed char is negative,
135 * we want to instead treat it as an 8-bit unsigned char, hence the
138 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
140 /* Enter a start condition. This macro really ought to take a parameter,
141 * but we do it the disgusting crufty way forced on us by the ()-less
142 * definition of BEGIN.
144 #define BEGIN (yy_start) = 1 + 2 *
146 /* Translate the current start state into a value that can be later handed
147 * to BEGIN to return to the state. The YYSTATE alias is for lex
150 #define YY_START (((yy_start) - 1) / 2)
151 #define YYSTATE YY_START
153 /* Action number for EOF rule of a given start state. */
154 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
156 /* Special action meaning "start processing a new file". */
157 #define YY_NEW_FILE sensors_yyrestart(sensors_yyin )
159 #define YY_END_OF_BUFFER_CHAR 0
161 /* Size of default input buffer. */
164 /* On IA-64, the buffer size is 16k, not 8k.
165 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
166 * Ditto for the __ia64__ case accordingly.
168 #define YY_BUF_SIZE 32768
170 #define YY_BUF_SIZE 16384
171 #endif /* __ia64__ */
174 /* The state buf must be large enough to hold one state per character in the main buffer.
176 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
178 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
179 #define YY_TYPEDEF_YY_BUFFER_STATE
180 typedef struct yy_buffer_state *YY_BUFFER_STATE;
183 extern int sensors_yyleng;
185 extern FILE *sensors_yyin, *sensors_yyout;
187 #define EOB_ACT_CONTINUE_SCAN 0
188 #define EOB_ACT_END_OF_FILE 1
189 #define EOB_ACT_LAST_MATCH 2
191 #define YY_LESS_LINENO(n)
193 /* Return all but the first "n" matched characters back to the input stream. */
197 /* Undo effects of setting up sensors_yytext. */ \
198 int yyless_macro_arg = (n); \
199 YY_LESS_LINENO(yyless_macro_arg);\
200 *yy_cp = (yy_hold_char); \
201 YY_RESTORE_YY_MORE_OFFSET \
202 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
203 YY_DO_BEFORE_ACTION; /* set up sensors_yytext again */ \
207 #define unput(c) yyunput( c, (yytext_ptr) )
209 #ifndef YY_TYPEDEF_YY_SIZE_T
210 #define YY_TYPEDEF_YY_SIZE_T
211 typedef size_t yy_size_t;
214 #ifndef YY_STRUCT_YY_BUFFER_STATE
215 #define YY_STRUCT_YY_BUFFER_STATE
216 struct yy_buffer_state
220 char *yy_ch_buf; /* input buffer */
221 char *yy_buf_pos; /* current position in input buffer */
223 /* Size of input buffer in bytes, not including room for EOB
226 yy_size_t yy_buf_size;
228 /* Number of characters read into yy_ch_buf, not including EOB
233 /* Whether we "own" the buffer - i.e., we know we created it,
234 * and can realloc() it to grow it, and should free() it to
237 int yy_is_our_buffer;
239 /* Whether this is an "interactive" input source; if so, and
240 * if we're using stdio for input, then we want to use getc()
241 * instead of fread(), to make sure we stop fetching input after
244 int yy_is_interactive;
246 /* Whether we're considered to be at the beginning of a line.
247 * If so, '^' rules will be active on the next match, otherwise
252 int yy_bs_lineno; /**< The line count. */
253 int yy_bs_column; /**< The column count. */
255 /* Whether to try to fill the input buffer when we reach the
260 int yy_buffer_status;
262 #define YY_BUFFER_NEW 0
263 #define YY_BUFFER_NORMAL 1
264 /* When an EOF's been seen but there's still some text to process
265 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
266 * shouldn't try reading from the input source any more. We might
267 * still have a bunch of tokens to match, though, because of
268 * possible backing-up.
270 * When we actually see the EOF, we change the status to "new"
271 * (via sensors_yyrestart()), so that the user can continue scanning by
272 * just pointing sensors_yyin at a new input file.
274 #define YY_BUFFER_EOF_PENDING 2
277 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
279 /* Stack of input buffers. */
280 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
281 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
282 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
284 /* We provide macros for accessing buffer states in case in the
285 * future we want to put the buffer states in a more general
288 * Returns the top of the stack, or NULL.
290 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
291 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
294 /* Same as previous macro, but useful when we know that the buffer stack is not
295 * NULL or when we need an lvalue. For internal use only.
297 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
299 /* yy_hold_char holds the character lost when sensors_yytext is formed. */
300 static char yy_hold_char;
301 static int yy_n_chars; /* number of characters read into yy_ch_buf */
304 /* Points to current character in buffer. */
305 static char *yy_c_buf_p = (char *) 0;
306 static int yy_init = 0; /* whether we need to initialize */
307 static int yy_start = 0; /* start state number */
309 /* Flag which is used to allow sensors_yywrap()'s to do buffer switches
310 * instead of setting up a fresh sensors_yyin. A bit of a hack ...
312 static int yy_did_buffer_switch_on_eof;
314 void sensors_yyrestart (FILE *input_file );
315 void sensors_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
316 YY_BUFFER_STATE sensors_yy_create_buffer (FILE *file,int size );
317 void sensors_yy_delete_buffer (YY_BUFFER_STATE b );
318 void sensors_yy_flush_buffer (YY_BUFFER_STATE b );
319 void sensors_yypush_buffer_state (YY_BUFFER_STATE new_buffer );
320 void sensors_yypop_buffer_state (void );
322 static void sensors_yyensure_buffer_stack (void );
323 static void sensors_yy_load_buffer_state (void );
324 static void sensors_yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
326 #define YY_FLUSH_BUFFER sensors_yy_flush_buffer(YY_CURRENT_BUFFER )
328 YY_BUFFER_STATE sensors_yy_scan_buffer (char *base,yy_size_t size );
329 YY_BUFFER_STATE sensors_yy_scan_string (yyconst char *yy_str );
330 YY_BUFFER_STATE sensors_yy_scan_bytes (yyconst char *bytes,int len );
332 void *sensors_yyalloc (yy_size_t );
333 void *sensors_yyrealloc (void *,yy_size_t );
334 void sensors_yyfree (void * );
336 #define yy_new_buffer sensors_yy_create_buffer
338 #define yy_set_interactive(is_interactive) \
340 if ( ! YY_CURRENT_BUFFER ){ \
341 sensors_yyensure_buffer_stack (); \
342 YY_CURRENT_BUFFER_LVALUE = \
343 sensors_yy_create_buffer(sensors_yyin,YY_BUF_SIZE ); \
345 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
348 #define yy_set_bol(at_bol) \
350 if ( ! YY_CURRENT_BUFFER ){\
351 sensors_yyensure_buffer_stack (); \
352 YY_CURRENT_BUFFER_LVALUE = \
353 sensors_yy_create_buffer(sensors_yyin,YY_BUF_SIZE ); \
355 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
358 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
360 /* Begin user sect3 */
362 #define sensors_yywrap(n) 1
363 #define YY_SKIP_YYWRAP
365 typedef unsigned char YY_CHAR;
367 FILE *sensors_yyin = (FILE *) 0, *sensors_yyout = (FILE *) 0;
369 typedef int yy_state_type;
371 extern int sensors_yylineno;
373 int sensors_yylineno = 1;
375 extern char *sensors_yytext;
376 #define yytext_ptr sensors_yytext
377 static yyconst flex_int16_t yy_nxt[][39] =
380 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
381 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
382 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
383 0, 0, 0, 0, 0, 0, 0, 0, 0
387 9, 10, 11, 12, 10, 13, 10, 10, 10, 10,
388 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
389 14, 15, 16, 14, 14, 14, 14, 14, 17, 18,
390 14, 14, 14, 14, 14, 19, 14, 14, 14
394 9, 10, 11, 12, 10, 13, 10, 10, 10, 10,
395 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
397 14, 15, 16, 14, 14, 14, 14, 14, 17, 18,
398 14, 14, 14, 14, 14, 19, 14, 14, 14
402 9, 20, 21, 22, 23, 24, 25, 26, 27, 28,
403 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
404 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
405 35, 35, 35, 35, 35, 35, 35, 35, 35
409 9, 20, 21, 22, 23, 24, 25, 26, 27, 28,
410 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
411 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
412 35, 35, 35, 35, 35, 35, 35, 35, 35
417 9, 39, 39, 40, 41, 39, 39, 39, 39, 39,
418 39, 39, 39, 39, 39, 39, 39, 42, 39, 39,
419 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
420 39, 39, 39, 39, 39, 39, 39, 39, 39
424 9, 39, 39, 40, 41, 39, 39, 39, 39, 39,
425 39, 39, 39, 39, 39, 39, 39, 42, 39, 39,
426 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
427 39, 39, 39, 39, 39, 39, 39, 39, 39
431 9, 43, 43, 44, 43, 43, 43, 43, 43, 43,
432 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
434 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
435 43, 43, 43, 43, 43, 43, 43, 43, 43
439 9, 43, 43, 44, 43, 43, 43, 43, 43, 43,
440 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
441 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
442 43, 43, 43, 43, 43, 43, 43, 43, 43
446 -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
447 -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
448 -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
449 -9, -9, -9, -9, -9, -9, -9, -9, -9
454 9, -10, -10, -10, -10, -10, -10, -10, -10, -10,
455 -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
456 -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
457 -10, -10, -10, -10, -10, -10, -10, -10, -10
461 9, -11, 45, 46, -11, -11, -11, -11, -11, -11,
462 -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
463 -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
464 -11, -11, -11, -11, -11, -11, -11, -11, -11
468 9, -12, -12, -12, -12, -12, -12, -12, -12, -12,
469 -12, -12, -12, -12, -12, -12, -12, -12, -12, -12,
471 -12, -12, -12, -12, -12, -12, -12, -12, -12, -12,
472 -12, -12, -12, -12, -12, -12, -12, -12, -12
476 9, 47, 47, 48, 47, 47, 47, 47, 47, 47,
477 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
478 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
479 47, 47, 47, 47, 47, 47, 47, 47, 47
483 9, -14, -14, -14, -14, -14, -14, -14, -14, -14,
484 -14, -14, -14, -14, -14, -14, -14, -14, -14, -14,
485 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
486 49, 49, 49, 49, 49, 49, 49, 49, 49
491 9, -15, -15, -15, -15, -15, -15, -15, -15, -15,
492 -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
493 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
494 49, 49, 49, 49, 49, 49, 49, 50, 49
498 9, -16, -16, -16, -16, -16, -16, -16, -16, -16,
499 -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
500 49, 49, 49, 49, 49, 49, 49, 51, 49, 49,
501 49, 49, 52, 49, 49, 49, 49, 49, 49
505 9, -17, -17, -17, -17, -17, -17, -17, -17, -17,
506 -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
508 49, 49, 49, 49, 49, 49, 53, 49, 49, 49,
509 49, 49, 49, 49, 49, 49, 49, 49, 49
513 9, -18, -18, -18, -18, -18, -18, -18, -18, -18,
514 -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
515 54, 49, 49, 49, 49, 49, 49, 49, 49, 49,
516 49, 49, 49, 49, 49, 49, 49, 49, 49
520 9, -19, -19, -19, -19, -19, -19, -19, -19, -19,
521 -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
522 49, 49, 49, 49, 55, 49, 49, 49, 49, 49,
523 49, 49, 49, 49, 49, 49, 49, 49, 49
528 9, -20, -20, -20, -20, -20, -20, -20, -20, -20,
529 -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
530 -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
531 -20, -20, -20, -20, -20, -20, -20, -20, -20
535 9, -21, 56, -21, -21, -21, -21, -21, -21, -21,
536 -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
537 -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
538 -21, -21, -21, -21, -21, -21, -21, -21, -21
542 9, -22, -22, -22, -22, -22, -22, -22, -22, -22,
543 -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
545 -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
546 -22, -22, -22, -22, -22, -22, -22, -22, -22
550 9, -23, -23, -23, -23, -23, -23, -23, -23, -23,
551 -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
552 -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
553 -23, -23, -23, -23, -23, -23, -23, -23, -23
557 9, 57, 57, 58, 57, 57, 57, 57, 57, 57,
558 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
559 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
560 57, 57, 57, 57, 57, 57, 57, 57, 57
565 9, -25, -25, -25, -25, -25, -25, -25, -25, -25,
566 -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
567 -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
568 -25, -25, -25, -25, -25, -25, -25, -25, -25
572 9, -26, -26, -26, -26, -26, -26, -26, -26, -26,
573 -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
574 -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
575 -26, -26, -26, -26, -26, -26, -26, -26, -26
579 9, -27, -27, -27, -27, -27, -27, -27, -27, -27,
580 -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
582 -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
583 -27, -27, -27, -27, -27, -27, -27, -27, -27
587 9, -28, -28, -28, -28, -28, -28, -28, -28, -28,
588 -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
589 -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
590 -28, -28, -28, -28, -28, -28, -28, -28, -28
594 9, -29, -29, -29, -29, -29, -29, -29, -29, -29,
595 -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
596 -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
597 -29, -29, -29, -29, -29, -29, -29, -29, -29
602 9, -30, -30, -30, -30, -30, -30, -30, -30, -30,
603 -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
604 -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
605 -30, -30, -30, -30, -30, -30, -30, -30, -30
609 9, -31, -31, -31, -31, -31, -31, -31, -31, -31,
610 -31, -31, -31, -31, 59, -31, -31, -31, -31, -31,
611 -31, -31, -31, -31, -31, -31, -31, -31, -31, -31,
612 -31, -31, -31, -31, -31, -31, -31, -31, -31
616 9, -32, -32, -32, -32, -32, -32, -32, -32, -32,
617 -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
619 -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
620 -32, -32, -32, -32, -32, -32, -32, -32, -32
624 9, -33, -33, -33, -33, -33, -33, -33, -33, -33,
625 -33, -33, 60, -33, 61, -33, 62, -33, -33, -33,
626 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
627 62, 62, 62, 62, 62, 62, 62, 62, 62
631 9, -34, -34, -34, -34, -34, -34, -34, -34, -34,
632 -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
633 -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
634 -34, -34, -34, -34, -34, -34, -34, -34, -34
639 9, -35, -35, -35, -35, -35, -35, -35, -35, -35,
640 -35, -35, -35, -35, 62, -35, 62, -35, -35, -35,
641 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
642 62, 62, 62, 62, 62, 62, 62, 62, 62
646 9, -36, 63, 64, -36, -36, -36, -36, -36, -36,
647 -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
648 -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
649 -36, -36, -36, -36, -36, -36, -36, -36, -36
653 9, -37, -37, -37, -37, -37, -37, -37, -37, -37,
654 -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
656 -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
657 -37, -37, -37, -37, -37, -37, -37, -37, -37
661 9, -38, -38, -38, -38, -38, -38, -38, -38, -38,
662 -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
663 -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
664 -38, -38, -38, -38, -38, -38, -38, -38, -38
668 9, 65, 65, -39, -39, 65, 65, 65, 65, 65,
669 65, 65, 65, 65, 65, 65, 65, -39, 65, 65,
670 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
671 65, 65, 65, 65, 65, 65, 65, 65, 65
676 9, -40, -40, -40, -40, -40, -40, -40, -40, -40,
677 -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
678 -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
679 -40, -40, -40, -40, -40, -40, -40, -40, -40
683 9, -41, -41, -41, 66, -41, -41, -41, -41, -41,
684 -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
685 -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
686 -41, -41, -41, -41, -41, -41, -41, -41, -41
690 9, 67, 67, 68, 67, 67, 67, 67, 67, 67,
691 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
693 69, 70, 67, 67, 67, 71, 67, 67, 67, 67,
694 67, 72, 67, 67, 73, 67, 74, 67, 75
698 9, 76, 76, -43, 76, 76, 76, 76, 76, 76,
699 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
700 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
701 76, 76, 76, 76, 76, 76, 76, 76, 76
705 9, -44, -44, -44, -44, -44, -44, -44, -44, -44,
706 -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
707 -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
708 -44, -44, -44, -44, -44, -44, -44, -44, -44
713 9, -45, 45, 46, -45, -45, -45, -45, -45, -45,
714 -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
715 -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
716 -45, -45, -45, -45, -45, -45, -45, -45, -45
720 9, -46, -46, -46, -46, -46, -46, -46, -46, -46,
721 -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
722 -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
723 -46, -46, -46, -46, -46, -46, -46, -46, -46
727 9, 47, 47, 48, 47, 47, 47, 47, 47, 47,
728 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
730 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
731 47, 47, 47, 47, 47, 47, 47, 47, 47
735 9, -48, -48, -48, -48, -48, -48, -48, -48, -48,
736 -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
737 -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
738 -48, -48, -48, -48, -48, -48, -48, -48, -48
742 9, -49, -49, -49, -49, -49, -49, -49, -49, -49,
743 -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
744 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
745 49, 49, 49, 49, 49, 49, 49, 49, 49
750 9, -50, -50, -50, -50, -50, -50, -50, -50, -50,
751 -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
752 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
753 49, 49, 49, 49, 49, 77, 49, 49, 49
757 9, -51, -51, -51, -51, -51, -51, -51, -51, -51,
758 -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
759 49, 49, 49, 49, 49, 49, 49, 49, 78, 49,
760 49, 49, 49, 49, 49, 49, 49, 49, 49
764 9, -52, -52, -52, -52, -52, -52, -52, -52, -52,
765 -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
767 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
768 79, 49, 49, 49, 49, 49, 49, 49, 49
772 9, -53, -53, -53, -53, -53, -53, -53, -53, -53,
773 -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
774 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
775 49, 80, 49, 49, 49, 49, 49, 49, 49
779 9, -54, -54, -54, -54, -54, -54, -54, -54, -54,
780 -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
781 49, 81, 49, 49, 49, 49, 49, 49, 49, 49,
782 49, 49, 49, 49, 49, 49, 49, 49, 49
787 9, -55, -55, -55, -55, -55, -55, -55, -55, -55,
788 -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
789 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
790 49, 49, 49, 49, 49, 49, 82, 49, 49
794 9, -56, 56, -56, -56, -56, -56, -56, -56, -56,
795 -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
796 -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
797 -56, -56, -56, -56, -56, -56, -56, -56, -56
801 9, 57, 57, 58, 57, 57, 57, 57, 57, 57,
802 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
804 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
805 57, 57, 57, 57, 57, 57, 57, 57, 57
809 9, -58, -58, -58, -58, -58, -58, -58, -58, -58,
810 -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
811 -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
812 -58, -58, -58, -58, -58, -58, -58, -58, -58
816 9, -59, -59, -59, -59, -59, -59, -59, -59, -59,
817 -59, -59, -59, -59, 59, -59, -59, -59, -59, -59,
818 -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
819 -59, -59, -59, -59, -59, -59, -59, -59, -59
824 9, -60, -60, -60, -60, -60, -60, -60, -60, -60,
825 -60, -60, -60, -60, 59, -60, -60, -60, -60, -60,
826 -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
827 -60, -60, -60, -60, -60, -60, -60, -60, -60
831 9, -61, -61, -61, -61, -61, -61, -61, -61, -61,
832 -61, -61, 60, -61, 61, -61, 62, -61, -61, -61,
833 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
834 62, 62, 62, 62, 62, 62, 62, 62, 62
838 9, -62, -62, -62, -62, -62, -62, -62, -62, -62,
839 -62, -62, -62, -62, 62, -62, 62, -62, -62, -62,
841 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
842 62, 62, 62, 62, 62, 62, 62, 62, 62
846 9, -63, 63, 64, -63, -63, -63, -63, -63, -63,
847 -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
848 -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
849 -63, -63, -63, -63, -63, -63, -63, -63, -63
853 9, -64, -64, -64, -64, -64, -64, -64, -64, -64,
854 -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
855 -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
856 -64, -64, -64, -64, -64, -64, -64, -64, -64
861 9, 65, 65, -65, -65, 65, 65, 65, 65, 65,
862 65, 65, 65, 65, 65, 65, 65, -65, 65, 65,
863 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
864 65, 65, 65, 65, 65, 65, 65, 65, 65
868 9, -66, -66, -66, -66, -66, -66, -66, -66, -66,
869 -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
870 -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
871 -66, -66, -66, -66, -66, -66, -66, -66, -66
875 9, -67, -67, -67, -67, -67, -67, -67, -67, -67,
876 -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
878 -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
879 -67, -67, -67, -67, -67, -67, -67, -67, -67
883 9, -68, -68, -68, -68, -68, -68, -68, -68, -68,
884 -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
885 -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
886 -68, -68, -68, -68, -68, -68, -68, -68, -68
890 9, -69, -69, -69, -69, -69, -69, -69, -69, -69,
891 -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
892 -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
893 -69, -69, -69, -69, -69, -69, -69, -69, -69
898 9, -70, -70, -70, -70, -70, -70, -70, -70, -70,
899 -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
900 -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
901 -70, -70, -70, -70, -70, -70, -70, -70, -70
905 9, -71, -71, -71, -71, -71, -71, -71, -71, -71,
906 -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
907 -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
908 -71, -71, -71, -71, -71, -71, -71, -71, -71
912 9, -72, -72, -72, -72, -72, -72, -72, -72, -72,
913 -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
915 -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
916 -72, -72, -72, -72, -72, -72, -72, -72, -72
920 9, -73, -73, -73, -73, -73, -73, -73, -73, -73,
921 -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
922 -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
923 -73, -73, -73, -73, -73, -73, -73, -73, -73
927 9, -74, -74, -74, -74, -74, -74, -74, -74, -74,
928 -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
929 -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
930 -74, -74, -74, -74, -74, -74, -74, -74, -74
935 9, -75, -75, -75, -75, -75, -75, -75, -75, -75,
936 -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
937 -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
938 -75, -75, -75, -75, -75, -75, -75, -75, -75
942 9, 76, 76, -76, 76, 76, 76, 76, 76, 76,
943 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
944 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
945 76, 76, 76, 76, 76, 76, 76, 76, 76
949 9, -77, 83, -77, -77, -77, -77, -77, -77, -77,
950 -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
952 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
953 49, 49, 49, 49, 49, 49, 49, 49, 49
957 9, -78, -78, -78, -78, -78, -78, -78, -78, -78,
958 -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
959 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
960 49, 49, 49, 84, 49, 49, 49, 49, 49
964 9, -79, -79, -79, -79, -79, -79, -79, -79, -79,
965 -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
966 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
967 49, 49, 49, 85, 49, 49, 49, 49, 49
972 9, -80, -80, -80, -80, -80, -80, -80, -80, -80,
973 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
974 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
975 49, 49, 86, 49, 49, 49, 49, 49, 49
979 9, -81, -81, -81, -81, -81, -81, -81, -81, -81,
980 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
981 49, 49, 49, 49, 87, 49, 49, 49, 49, 49,
982 49, 49, 49, 49, 49, 49, 49, 49, 49
986 9, -82, 88, -82, -82, -82, -82, -82, -82, -82,
987 -82, -82, -82, -82, -82, -82, -82, -82, -82, -82,
989 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
990 49, 49, 49, 49, 49, 49, 49, 49, 49
994 9, -83, 83, -83, -83, -83, -83, -83, -83, -83,
995 -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
996 -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
997 -83, -83, -83, -83, -83, -83, -83, -83, -83
1001 9, -84, 89, -84, -84, -84, -84, -84, -84, -84,
1002 -84, -84, -84, -84, -84, -84, -84, -84, -84, -84,
1003 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1004 49, 49, 49, 49, 49, 49, 49, 49, 49
1009 9, -85, -85, -85, -85, -85, -85, -85, -85, -85,
1010 -85, -85, -85, -85, -85, -85, -85, -85, -85, -85,
1011 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1012 49, 49, 49, 49, 49, 49, 49, 90, 49
1016 9, -86, -86, -86, -86, -86, -86, -86, -86, -86,
1017 -86, -86, -86, -86, -86, -86, -86, -86, -86, -86,
1018 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1019 49, 49, 49, 49, 91, 49, 49, 49, 49
1023 9, -87, -87, -87, -87, -87, -87, -87, -87, -87,
1024 -87, -87, -87, -87, -87, -87, -87, -87, -87, -87,
1026 49, 49, 49, 49, 49, 49, 49, 49, 49, 92,
1027 49, 49, 49, 49, 49, 49, 49, 49, 49
1031 9, -88, 88, -88, -88, -88, -88, -88, -88, -88,
1032 -88, -88, -88, -88, -88, -88, -88, -88, -88, -88,
1033 -88, -88, -88, -88, -88, -88, -88, -88, -88, -88,
1034 -88, -88, -88, -88, -88, -88, -88, -88, -88
1038 9, -89, 89, -89, -89, -89, -89, -89, -89, -89,
1039 -89, -89, -89, -89, -89, -89, -89, -89, -89, -89,
1040 -89, -89, -89, -89, -89, -89, -89, -89, -89, -89,
1041 -89, -89, -89, -89, -89, -89, -89, -89, -89
1046 9, -90, -90, -90, -90, -90, -90, -90, -90, -90,
1047 -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
1048 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1049 49, 49, 49, 49, 49, 49, 93, 49, 49
1053 9, -91, -91, -91, -91, -91, -91, -91, -91, -91,
1054 -91, -91, -91, -91, -91, -91, -91, -91, -91, -91,
1055 49, 49, 49, 49, 94, 49, 49, 49, 49, 49,
1056 49, 49, 49, 49, 49, 49, 49, 49, 49
1060 9, -92, 95, -92, -92, -92, -92, -92, -92, -92,
1061 -92, -92, -92, -92, -92, -92, -92, -92, -92, -92,
1063 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1064 49, 49, 49, 49, 49, 49, 49, 49, 49
1068 9, -93, -93, -93, -93, -93, -93, -93, -93, -93,
1069 -93, -93, -93, -93, -93, -93, -93, -93, -93, -93,
1070 49, 49, 49, 49, 96, 49, 49, 49, 49, 49,
1071 49, 49, 49, 49, 49, 49, 49, 49, 49
1075 9, -94, 97, -94, -94, -94, -94, -94, -94, -94,
1076 -94, -94, -94, -94, -94, -94, -94, -94, -94, -94,
1077 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1078 49, 49, 49, 49, 49, 49, 49, 49, 49
1083 9, -95, 95, -95, -95, -95, -95, -95, -95, -95,
1084 -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
1085 -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
1086 -95, -95, -95, -95, -95, -95, -95, -95, -95
1090 9, -96, 98, -96, -96, -96, -96, -96, -96, -96,
1091 -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
1092 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1093 49, 49, 49, 49, 49, 49, 49, 49, 49
1097 9, -97, 97, -97, -97, -97, -97, -97, -97, -97,
1098 -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
1100 -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
1101 -97, -97, -97, -97, -97, -97, -97, -97, -97
1105 9, -98, 98, -98, -98, -98, -98, -98, -98, -98,
1106 -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
1107 -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
1108 -98, -98, -98, -98, -98, -98, -98, -98, -98
1113 static yy_state_type yy_get_previous_state (void );
1114 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
1115 static int yy_get_next_buffer (void );
1116 static void yy_fatal_error (yyconst char msg[] );
1118 /* Done after the current pattern has been matched and before the
1119 * corresponding action - sets up sensors_yytext.
1121 #define YY_DO_BEFORE_ACTION \
1122 (yytext_ptr) = yy_bp; \
1123 sensors_yyleng = (size_t) (yy_cp - yy_bp); \
1124 (yy_hold_char) = *yy_cp; \
1126 (yy_c_buf_p) = yy_cp;
1128 #define YY_NUM_RULES 50
1129 #define YY_END_OF_BUFFER 51
1130 /* This struct is not used in this scanner,
1131 but its presence is necessary. */
1132 struct yy_trans_info
1134 flex_int32_t yy_verify;
1135 flex_int32_t yy_nxt;
1137 static yyconst flex_int16_t yy_accept[99] =
1139 0, 0, 0, 0, 0, 0, 13, 13, 51, 12,
1140 1, 2, 3, 11, 11, 11, 11, 11, 11, 33,
1141 15, 16, 31, 18, 25, 26, 23, 21, 27, 22,
1142 33, 24, 20, 28, 32, 33, 29, 30, 49, 36,
1143 39, 48, 13, 14, 1, 2, 3, 4, 11, 11,
1144 11, 11, 11, 11, 11, 15, 18, 19, 20, 34,
1145 20, 32, 35, 17, 49, 38, 47, 37, 40, 41,
1146 42, 43, 44, 45, 46, 13, 8, 11, 11, 11,
1147 11, 6, 8, 9, 11, 11, 11, 6, 9, 11,
1148 11, 5, 11, 10, 5, 7, 10, 7
1152 static yyconst flex_int32_t yy_ec[256] =
1154 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1155 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
1156 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1157 1, 2, 1, 4, 5, 1, 1, 1, 1, 6,
1158 7, 8, 9, 10, 11, 12, 13, 14, 14, 14,
1159 14, 14, 14, 14, 14, 14, 14, 1, 1, 1,
1160 1, 1, 1, 15, 16, 16, 16, 16, 16, 16,
1161 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1162 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1163 1, 17, 1, 18, 16, 19, 20, 21, 22, 23,
1165 24, 25, 26, 27, 28, 23, 23, 29, 30, 31,
1166 32, 33, 23, 34, 35, 36, 37, 38, 23, 23,
1167 23, 23, 1, 1, 1, 1, 1, 1, 1, 1,
1168 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1169 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1170 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1171 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1172 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1173 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1174 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1176 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1177 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1178 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1179 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1180 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1184 extern int sensors_yy_flex_debug;
1185 int sensors_yy_flex_debug = 0;
1187 /* The intent behind this definition is that it'll catch
1188 * any uses of REJECT which flex missed.
1190 #define REJECT reject_used_but_not_detected
1191 #define yymore() yymore_used_but_not_detected
1192 #define YY_MORE_ADJ 0
1193 #define YY_RESTORE_YY_MORE_OFFSET
1194 char *sensors_yytext;
1195 #line 1 "lib/conf-lex.l"
1196 #line 2 "lib/conf-lex.l"
1198 conf-lex.l - Part of libsensors, a Linux library for reading sensor data.
1199 Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>
1201 This library is free software; you can redistribute it and/or
1202 modify it under the terms of the GNU Lesser General Public
1203 License as published by the Free Software Foundation; either
1204 version 2.1 of the License, or (at your option) any later version.
1206 This library is distributed in the hope that it will be useful,
1207 but WITHOUT ANY WARRANTY; without even the implied warranty of
1208 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1209 GNU Lesser General Public License for more details.
1211 You should have received a copy of the GNU General Public License
1212 along with this program; if not, write to the Free Software
1213 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
1220 #include "general.h"
1222 #include "conf-parse.h"
1224 #include "scanner.h"
1226 static int buffer_count;
1227 static int buffer_max;
1228 static char *buffer;
1230 char sensors_lex_error[100];
1232 const char *sensors_yyfilename;
1233 int sensors_yylineno;
1235 #define buffer_malloc() sensors_malloc_array(&buffer,&buffer_count,\
1237 #define buffer_free() sensors_free_array(&buffer,&buffer_count,\
1239 #define buffer_add_char(c) sensors_add_array_el(c,&buffer,\
1242 #define buffer_add_string(s) sensors_add_array_els(s,strlen(s),\
1244 &buffer_count,&buffer_max,1)
1246 /* Scanner for configuration files */
1247 /* All states are exclusive */
1251 /* Any whitespace-like character */
1252 /* Note: `10', `10.4' and `.4' are valid, `10.' is not */
1253 /* Only positive whole numbers are recognized here */
1254 #line 1255 "<stdout>"
1261 #ifndef YY_NO_UNISTD_H
1262 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1263 * down here because we want the user's section 1 to have been scanned first.
1264 * The user has a chance to override it with an option.
1269 #ifndef YY_EXTRA_TYPE
1270 #define YY_EXTRA_TYPE void *
1273 static int yy_init_globals (void );
1275 /* Accessor methods to globals.
1276 These are made visible to non-reentrant scanners for convenience. */
1278 int sensors_yylex_destroy (void );
1280 int sensors_yyget_debug (void );
1282 void sensors_yyset_debug (int debug_flag );
1284 YY_EXTRA_TYPE sensors_yyget_extra (void );
1286 void sensors_yyset_extra (YY_EXTRA_TYPE user_defined );
1288 FILE *sensors_yyget_in (void );
1290 void sensors_yyset_in (FILE * in_str );
1292 FILE *sensors_yyget_out (void );
1294 void sensors_yyset_out (FILE * out_str );
1296 int sensors_yyget_leng (void );
1298 char *sensors_yyget_text (void );
1300 int sensors_yyget_lineno (void );
1302 void sensors_yyset_lineno (int line_number );
1304 /* Macros after this point can all be overridden by user definitions in
1308 #ifndef YY_SKIP_YYWRAP
1310 extern "C" int sensors_yywrap (void );
1312 extern int sensors_yywrap (void );
1317 static void yy_flex_strncpy (char *,yyconst char *,int );
1320 #ifdef YY_NEED_STRLEN
1321 static int yy_flex_strlen (yyconst char * );
1327 static int yyinput (void );
1329 static int input (void );
1334 /* Amount of stuff to slurp up with each read. */
1335 #ifndef YY_READ_BUF_SIZE
1337 /* On IA-64, the buffer size is 16k, not 8k */
1338 #define YY_READ_BUF_SIZE 16384
1340 #define YY_READ_BUF_SIZE 8192
1341 #endif /* __ia64__ */
1344 /* Copy whatever the last rule matched to the standard output. */
1346 /* This used to be an fputs(), but since the string might contain NUL's,
1347 * we now use fwrite().
1349 #define ECHO do { if (fwrite( sensors_yytext, sensors_yyleng, 1, sensors_yyout )) {} } while (0)
1352 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1353 * is returned in "result".
1356 #define YY_INPUT(buf,result,max_size) \
1357 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1361 for ( n = 0; n < max_size && \
1362 (c = getc( sensors_yyin )) != EOF && c != '\n'; ++n ) \
1363 buf[n] = (char) c; \
1365 buf[n++] = (char) c; \
1366 if ( c == EOF && ferror( sensors_yyin ) ) \
1367 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1373 while ( (result = fread(buf, 1, max_size, sensors_yyin))==0 && ferror(sensors_yyin)) \
1375 if( errno != EINTR) \
1377 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1381 clearerr(sensors_yyin); \
1388 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1389 * we don't want an extra ';' after the "return" because that will cause
1390 * some compilers to complain about unreachable statements.
1393 #define yyterminate() return YY_NULL
1396 /* Number of entries by which start-condition stack grows. */
1397 #ifndef YY_START_STACK_INCR
1398 #define YY_START_STACK_INCR 25
1401 /* Report a fatal error. */
1402 #ifndef YY_FATAL_ERROR
1403 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1406 /* end tables serialization structures and prototypes */
1408 /* Default declaration of generated scanner - a define so the user can
1409 * easily add parameters.
1412 #define YY_DECL_IS_OURS 1
1414 extern int sensors_yylex (void);
1416 #define YY_DECL int sensors_yylex (void)
1417 #endif /* !YY_DECL */
1419 /* Code executed at the beginning of each rule, after sensors_yytext and sensors_yyleng
1422 #ifndef YY_USER_ACTION
1423 #define YY_USER_ACTION
1426 /* Code executed at the end of each rule. */
1428 #define YY_BREAK break;
1431 #define YY_RULE_SETUP \
1434 /** The main scanner function which does all the work.
1438 register yy_state_type yy_current_state;
1439 register char *yy_cp, *yy_bp;
1440 register int yy_act;
1442 #line 80 "lib/conf-lex.l"
1449 #line 1450 "<stdout>"
1460 (yy_start) = 1; /* first start state */
1462 if ( ! sensors_yyin )
1463 sensors_yyin = stdin;
1465 if ( ! sensors_yyout )
1466 sensors_yyout = stdout;
1468 if ( ! YY_CURRENT_BUFFER ) {
1469 sensors_yyensure_buffer_stack ();
1470 YY_CURRENT_BUFFER_LVALUE =
1471 sensors_yy_create_buffer(sensors_yyin,YY_BUF_SIZE );
1474 sensors_yy_load_buffer_state( );
1477 while ( 1 ) /* loops until end-of-file is reached */
1479 yy_cp = (yy_c_buf_p);
1481 /* Support of sensors_yytext. */
1482 *yy_cp = (yy_hold_char);
1484 /* yy_bp points to the position in yy_ch_buf of the start of
1489 yy_current_state = (yy_start);
1491 while ( (yy_current_state = yy_nxt[yy_current_state][ yy_ec[YY_SC_TO_UI(*yy_cp)] ]) > 0 )
1494 yy_current_state = -yy_current_state;
1497 yy_act = yy_accept[yy_current_state];
1499 YY_DO_BEFORE_ACTION;
1501 do_action: /* This label is used only to access EOF actions. */
1504 { /* beginning of action switch */
1506 case YY_STATE_EOF(INITIAL):
1507 #line 88 "lib/conf-lex.l"
1508 { /* EOF from this state terminates */
1514 #line 92 "lib/conf-lex.l"
1515 ; /* eat as many blanks as possible at once */
1518 /* rule 2 can match eol */
1520 #line 94 "lib/conf-lex.l"
1521 { /* eat a bare newline (possibly preceded by blanks) */
1528 #line 100 "lib/conf-lex.l"
1529 ; /* eat the rest of the line after comment char */
1532 /* rule 4 can match eol */
1534 #line 102 "lib/conf-lex.l"
1535 { /* eat the rest of the line after comment char */
1540 * Keywords must be followed by whitespace - eat that too.
1541 * If there isn't trailing whitespace, we still need to
1542 * accept it as lexically correct (even though the parser
1543 * will reject it anyway.)
1547 #line 113 "lib/conf-lex.l"
1549 sensors_yylval.line.filename = sensors_yyfilename;
1550 sensors_yylval.line.lineno = sensors_yylineno;
1557 #line 120 "lib/conf-lex.l"
1559 sensors_yylval.line.filename = sensors_yyfilename;
1560 sensors_yylval.line.lineno = sensors_yylineno;
1567 #line 127 "lib/conf-lex.l"
1569 sensors_yylval.line.filename = sensors_yyfilename;
1570 sensors_yylval.line.lineno = sensors_yylineno;
1577 #line 134 "lib/conf-lex.l"
1579 sensors_yylval.line.filename = sensors_yyfilename;
1580 sensors_yylval.line.lineno = sensors_yylineno;
1587 #line 141 "lib/conf-lex.l"
1589 sensors_yylval.line.filename = sensors_yyfilename;
1590 sensors_yylval.line.lineno = sensors_yylineno;
1597 #line 148 "lib/conf-lex.l"
1599 sensors_yylval.line.filename = sensors_yyfilename;
1600 sensors_yylval.line.lineno = sensors_yylineno;
1605 /* Anything else at the beginning of a line is an error */
1607 #line 158 "lib/conf-lex.l"
1610 #line 158 "lib/conf-lex.l"
1613 strcpy(sensors_lex_error,"Invalid keyword");
1624 #line 171 "lib/conf-lex.l"
1625 ; /* eat whatever is left on this line */
1628 /* rule 14 can match eol */
1630 #line 173 "lib/conf-lex.l"
1644 #line 186 "lib/conf-lex.l"
1645 ; /* eat as many blanks as possible at once */
1648 /* rule 16 can match eol */
1650 #line 188 "lib/conf-lex.l"
1651 { /* newline here sends EOL token to parser */
1657 case YY_STATE_EOF(MIDDLE):
1658 #line 194 "lib/conf-lex.l"
1659 { /* EOF here sends EOL token to parser also */
1665 /* rule 17 can match eol */
1667 #line 199 "lib/conf-lex.l"
1668 { /* eat an escaped newline with no state change */
1675 #line 205 "lib/conf-lex.l"
1676 ; /* eat the rest of the line after comment char */
1679 /* rule 19 can match eol */
1681 #line 207 "lib/conf-lex.l"
1682 { /* eat the rest of the line after comment char */
1691 #line 215 "lib/conf-lex.l"
1693 sensors_yylval.value = atof(sensors_yytext);
1697 /* Some operators */
1700 #line 222 "lib/conf-lex.l"
1705 #line 223 "lib/conf-lex.l"
1710 #line 224 "lib/conf-lex.l"
1715 #line 225 "lib/conf-lex.l"
1720 #line 226 "lib/conf-lex.l"
1725 #line 227 "lib/conf-lex.l"
1730 #line 228 "lib/conf-lex.l"
1735 #line 229 "lib/conf-lex.l"
1740 #line 230 "lib/conf-lex.l"
1745 #line 231 "lib/conf-lex.l"
1751 #line 235 "lib/conf-lex.l"
1757 /* A normal, unquoted identifier */
1760 #line 242 "lib/conf-lex.l"
1762 sensors_yylval.name = strdup(sensors_yytext);
1763 if (! sensors_yylval.name)
1764 sensors_fatal_error("conf-lex.l",
1765 "Allocating a new string");
1770 /* anything else is bogus */
1772 #line 254 "lib/conf-lex.l"
1774 #line 255 "lib/conf-lex.l"
1777 #line 255 "lib/conf-lex.l"
1788 /* Oops, newline or EOF while in a string is not good */
1790 /* rule 36 can match eol */
1791 #line 270 "lib/conf-lex.l"
1793 /* rule 37 can match eol */
1795 #line 270 "lib/conf-lex.l"
1797 buffer_add_char("\0");
1798 strcpy(sensors_lex_error,
1799 "No matching double quote.");
1806 case YY_STATE_EOF(STRING):
1807 #line 280 "lib/conf-lex.l"
1809 strcpy(sensors_lex_error,
1810 "Reached end-of-file without a matching double quote.");
1819 #line 290 "lib/conf-lex.l"
1821 buffer_add_char("\0");
1822 strcpy(sensors_lex_error,
1823 "Quoted strings must be separated by whitespace.");
1831 #line 299 "lib/conf-lex.l"
1833 buffer_add_char("\0");
1834 sensors_yylval.name = strdup(buffer);
1835 if (! sensors_yylval.name)
1836 sensors_fatal_error("conf-lex.l",
1837 "Allocating a new string");
1845 #line 310 "lib/conf-lex.l"
1846 buffer_add_char("\a");
1850 #line 311 "lib/conf-lex.l"
1851 buffer_add_char("\b");
1855 #line 312 "lib/conf-lex.l"
1856 buffer_add_char("\f");
1860 #line 313 "lib/conf-lex.l"
1861 buffer_add_char("\n");
1865 #line 314 "lib/conf-lex.l"
1866 buffer_add_char("\r");
1870 #line 315 "lib/conf-lex.l"
1871 buffer_add_char("\t");
1875 #line 316 "lib/conf-lex.l"
1876 buffer_add_char("\v");
1878 /* Other escapes: just copy the character behind the slash */
1881 #line 320 "lib/conf-lex.l"
1883 buffer_add_char(&sensors_yytext[1]);
1886 /* Anything else (including a bare '\' which may be followed by EOF) */
1888 #line 327 "lib/conf-lex.l"
1891 #line 327 "lib/conf-lex.l"
1893 buffer_add_string(sensors_yytext);
1899 #line 332 "lib/conf-lex.l"
1900 YY_FATAL_ERROR( "flex scanner jammed" );
1902 #line 1903 "<stdout>"
1903 case YY_STATE_EOF(ERR):
1906 case YY_END_OF_BUFFER:
1908 /* Amount of text matched not including the EOB char. */
1909 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1911 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1912 *yy_cp = (yy_hold_char);
1913 YY_RESTORE_YY_MORE_OFFSET
1915 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1917 /* We're scanning a new file or input source. It's
1918 * possible that this happened because the user
1919 * just pointed sensors_yyin at a new source and called
1920 * sensors_yylex(). If so, then we have to assure
1921 * consistency between YY_CURRENT_BUFFER and our
1922 * globals. Here is the right place to do so, because
1923 * this is the first action (other than possibly a
1924 * back-up) that will match for the new input source.
1926 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1927 YY_CURRENT_BUFFER_LVALUE->yy_input_file = sensors_yyin;
1928 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1931 /* Note that here we test for yy_c_buf_p "<=" to the position
1932 * of the first EOB in the buffer, since yy_c_buf_p will
1933 * already have been incremented past the NUL character
1934 * (since all states make transitions on EOB to the
1935 * end-of-buffer state). Contrast this with the test
1938 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1939 { /* This was really a NUL. */
1940 yy_state_type yy_next_state;
1942 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1944 yy_current_state = yy_get_previous_state( );
1946 /* Okay, we're now positioned to make the NUL
1947 * transition. We couldn't have
1948 * yy_get_previous_state() go ahead and do it
1949 * for us because it doesn't know how to deal
1950 * with the possibility of jamming (and we don't
1951 * want to build jamming into it because then it
1952 * will run more slowly).
1955 yy_next_state = yy_try_NUL_trans( yy_current_state );
1957 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1959 if ( yy_next_state )
1961 /* Consume the NUL. */
1962 yy_cp = ++(yy_c_buf_p);
1963 yy_current_state = yy_next_state;
1969 yy_cp = (yy_c_buf_p);
1970 goto yy_find_action;
1974 else switch ( yy_get_next_buffer( ) )
1976 case EOB_ACT_END_OF_FILE:
1978 (yy_did_buffer_switch_on_eof) = 0;
1980 if ( sensors_yywrap( ) )
1982 /* Note: because we've taken care in
1983 * yy_get_next_buffer() to have set up
1984 * sensors_yytext, we can now set up
1985 * yy_c_buf_p so that if some total
1986 * hoser (like flex itself) wants to
1987 * call the scanner after we return the
1988 * YY_NULL, it'll still work - another
1989 * YY_NULL will get returned.
1991 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1993 yy_act = YY_STATE_EOF(YY_START);
1999 if ( ! (yy_did_buffer_switch_on_eof) )
2005 case EOB_ACT_CONTINUE_SCAN:
2007 (yytext_ptr) + yy_amount_of_matched_text;
2009 yy_current_state = yy_get_previous_state( );
2011 yy_cp = (yy_c_buf_p);
2012 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2015 case EOB_ACT_LAST_MATCH:
2017 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2019 yy_current_state = yy_get_previous_state( );
2021 yy_cp = (yy_c_buf_p);
2022 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2023 goto yy_find_action;
2030 "fatal flex scanner internal error--no action found" );
2031 } /* end of action switch */
2032 } /* end of scanning one token */
2033 } /* end of sensors_yylex */
2035 /* yy_get_next_buffer - try to read in a new buffer
2037 * Returns a code representing an action:
2038 * EOB_ACT_LAST_MATCH -
2039 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2040 * EOB_ACT_END_OF_FILE - end of file
2042 static int yy_get_next_buffer (void)
2044 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2045 register char *source = (yytext_ptr);
2046 register int number_to_move, i;
2049 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2051 "fatal flex scanner internal error--end of buffer missed" );
2053 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2054 { /* Don't try to fill the buffer, so this is an EOF. */
2055 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2057 /* We matched a single character, the EOB, so
2058 * treat this as a final EOF.
2060 return EOB_ACT_END_OF_FILE;
2065 /* We matched some text prior to the EOB, first
2068 return EOB_ACT_LAST_MATCH;
2072 /* Try to read more data. */
2074 /* First move last chars to start of buffer. */
2075 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2077 for ( i = 0; i < number_to_move; ++i )
2078 *(dest++) = *(source++);
2080 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2081 /* don't do the read, it's not guaranteed to return an EOF,
2084 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2089 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2091 while ( num_to_read <= 0 )
2092 { /* Not enough room in the buffer - grow it. */
2094 /* just a shorter name for the current buffer */
2095 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2097 int yy_c_buf_p_offset =
2098 (int) ((yy_c_buf_p) - b->yy_ch_buf);
2100 if ( b->yy_is_our_buffer )
2102 int new_size = b->yy_buf_size * 2;
2104 if ( new_size <= 0 )
2105 b->yy_buf_size += b->yy_buf_size / 8;
2107 b->yy_buf_size *= 2;
2109 b->yy_ch_buf = (char *)
2110 /* Include room in for 2 EOB chars. */
2111 sensors_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
2114 /* Can't grow it, we don't own it. */
2117 if ( ! b->yy_ch_buf )
2119 "fatal error - scanner input buffer overflow" );
2121 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2123 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2128 if ( num_to_read > YY_READ_BUF_SIZE )
2129 num_to_read = YY_READ_BUF_SIZE;
2131 /* Read in more data. */
2132 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2133 (yy_n_chars), (size_t) num_to_read );
2135 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2138 if ( (yy_n_chars) == 0 )
2140 if ( number_to_move == YY_MORE_ADJ )
2142 ret_val = EOB_ACT_END_OF_FILE;
2143 sensors_yyrestart(sensors_yyin );
2148 ret_val = EOB_ACT_LAST_MATCH;
2149 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2150 YY_BUFFER_EOF_PENDING;
2155 ret_val = EOB_ACT_CONTINUE_SCAN;
2157 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2158 /* Extend the array by 50%, plus the number we really need. */
2159 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2160 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) sensors_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
2161 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2162 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2165 (yy_n_chars) += number_to_move;
2166 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2167 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2169 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2174 /* yy_get_previous_state - get the state just before the EOB char was reached */
2176 static yy_state_type yy_get_previous_state (void)
2178 register yy_state_type yy_current_state;
2179 register char *yy_cp;
2181 yy_current_state = (yy_start);
2183 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2185 yy_current_state = yy_nxt[yy_current_state][(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1)];
2188 return yy_current_state;
2191 /* yy_try_NUL_trans - try to make a transition on the NUL character
2194 * next_state = yy_try_NUL_trans( current_state );
2196 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2198 register int yy_is_jam;
2200 yy_current_state = yy_nxt[yy_current_state][1];
2201 yy_is_jam = (yy_current_state <= 0);
2203 return yy_is_jam ? 0 : yy_current_state;
2208 static int yyinput (void)
2210 static int input (void)
2216 *(yy_c_buf_p) = (yy_hold_char);
2218 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2220 /* yy_c_buf_p now points to the character we want to return.
2221 * If this occurs *before* the EOB characters, then it's a
2222 * valid NUL; if not, then we've hit the end of the buffer.
2224 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2225 /* This was really a NUL. */
2226 *(yy_c_buf_p) = '\0';
2229 { /* need more input */
2230 int offset = (yy_c_buf_p) - (yytext_ptr);
2233 switch ( yy_get_next_buffer( ) )
2235 case EOB_ACT_LAST_MATCH:
2236 /* This happens because yy_g_n_b()
2237 * sees that we've accumulated a
2238 * token and flags that we need to
2239 * try matching the token before
2240 * proceeding. But for input(),
2241 * there's no matching to consider.
2242 * So convert the EOB_ACT_LAST_MATCH
2243 * to EOB_ACT_END_OF_FILE.
2246 /* Reset buffer status. */
2247 sensors_yyrestart(sensors_yyin );
2251 case EOB_ACT_END_OF_FILE:
2253 if ( sensors_yywrap( ) )
2256 if ( ! (yy_did_buffer_switch_on_eof) )
2265 case EOB_ACT_CONTINUE_SCAN:
2266 (yy_c_buf_p) = (yytext_ptr) + offset;
2272 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2273 *(yy_c_buf_p) = '\0'; /* preserve sensors_yytext */
2274 (yy_hold_char) = *++(yy_c_buf_p);
2278 #endif /* ifndef YY_NO_INPUT */
2280 /** Immediately switch to a different input stream.
2281 * @param input_file A readable stream.
2283 * @note This function does not reset the start condition to @c INITIAL .
2285 void sensors_yyrestart (FILE * input_file )
2288 if ( ! YY_CURRENT_BUFFER ){
2289 sensors_yyensure_buffer_stack ();
2290 YY_CURRENT_BUFFER_LVALUE =
2291 sensors_yy_create_buffer(sensors_yyin,YY_BUF_SIZE );
2294 sensors_yy_init_buffer(YY_CURRENT_BUFFER,input_file );
2295 sensors_yy_load_buffer_state( );
2298 /** Switch to a different input buffer.
2299 * @param new_buffer The new input buffer.
2302 void sensors_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2305 /* TODO. We should be able to replace this entire function body
2307 * sensors_yypop_buffer_state();
2308 * sensors_yypush_buffer_state(new_buffer);
2310 sensors_yyensure_buffer_stack ();
2311 if ( YY_CURRENT_BUFFER == new_buffer )
2314 if ( YY_CURRENT_BUFFER )
2316 /* Flush out information for old buffer. */
2317 *(yy_c_buf_p) = (yy_hold_char);
2318 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2319 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2322 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2323 sensors_yy_load_buffer_state( );
2325 /* We don't actually know whether we did this switch during
2326 * EOF (sensors_yywrap()) processing, but the only time this flag
2327 * is looked at is after sensors_yywrap() is called, so it's safe
2328 * to go ahead and always set it.
2330 (yy_did_buffer_switch_on_eof) = 1;
2333 static void sensors_yy_load_buffer_state (void)
2335 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2336 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2337 sensors_yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2338 (yy_hold_char) = *(yy_c_buf_p);
2341 /** Allocate and initialize an input buffer state.
2342 * @param file A readable stream.
2343 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2345 * @return the allocated buffer state.
2347 YY_BUFFER_STATE sensors_yy_create_buffer (FILE * file, int size )
2351 b = (YY_BUFFER_STATE) sensors_yyalloc(sizeof( struct yy_buffer_state ) );
2353 YY_FATAL_ERROR( "out of dynamic memory in sensors_yy_create_buffer()" );
2355 b->yy_buf_size = size;
2357 /* yy_ch_buf has to be 2 characters longer than the size given because
2358 * we need to put in 2 end-of-buffer characters.
2360 b->yy_ch_buf = (char *) sensors_yyalloc(b->yy_buf_size + 2 );
2361 if ( ! b->yy_ch_buf )
2362 YY_FATAL_ERROR( "out of dynamic memory in sensors_yy_create_buffer()" );
2364 b->yy_is_our_buffer = 1;
2366 sensors_yy_init_buffer(b,file );
2371 /** Destroy the buffer.
2372 * @param b a buffer created with sensors_yy_create_buffer()
2375 void sensors_yy_delete_buffer (YY_BUFFER_STATE b )
2381 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2382 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2384 if ( b->yy_is_our_buffer )
2385 sensors_yyfree((void *) b->yy_ch_buf );
2387 sensors_yyfree((void *) b );
2391 extern int isatty (int );
2392 #endif /* __cplusplus */
2394 /* Initializes or reinitializes a buffer.
2395 * This function is sometimes called more than once on the same buffer,
2396 * such as during a sensors_yyrestart() or at EOF.
2398 static void sensors_yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
2403 sensors_yy_flush_buffer(b );
2405 b->yy_input_file = file;
2406 b->yy_fill_buffer = 1;
2408 /* If b is the current buffer, then sensors_yy_init_buffer was _probably_
2409 * called from sensors_yyrestart() or through yy_get_next_buffer.
2410 * In that case, we don't want to reset the lineno or column.
2412 if (b != YY_CURRENT_BUFFER){
2413 b->yy_bs_lineno = 1;
2414 b->yy_bs_column = 0;
2417 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2422 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2423 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2426 void sensors_yy_flush_buffer (YY_BUFFER_STATE b )
2433 /* We always need two end-of-buffer characters. The first causes
2434 * a transition to the end-of-buffer state. The second causes
2435 * a jam in that state.
2437 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2438 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2440 b->yy_buf_pos = &b->yy_ch_buf[0];
2443 b->yy_buffer_status = YY_BUFFER_NEW;
2445 if ( b == YY_CURRENT_BUFFER )
2446 sensors_yy_load_buffer_state( );
2449 /** Pushes the new state onto the stack. The new state becomes
2450 * the current state. This function will allocate the stack
2452 * @param new_buffer The new state.
2455 void sensors_yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2457 if (new_buffer == NULL)
2460 sensors_yyensure_buffer_stack();
2462 /* This block is copied from sensors_yy_switch_to_buffer. */
2463 if ( YY_CURRENT_BUFFER )
2465 /* Flush out information for old buffer. */
2466 *(yy_c_buf_p) = (yy_hold_char);
2467 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2468 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2471 /* Only push if top exists. Otherwise, replace top. */
2472 if (YY_CURRENT_BUFFER)
2473 (yy_buffer_stack_top)++;
2474 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2476 /* copied from sensors_yy_switch_to_buffer. */
2477 sensors_yy_load_buffer_state( );
2478 (yy_did_buffer_switch_on_eof) = 1;
2481 /** Removes and deletes the top of the stack, if present.
2482 * The next element becomes the new top.
2485 void sensors_yypop_buffer_state (void)
2487 if (!YY_CURRENT_BUFFER)
2490 sensors_yy_delete_buffer(YY_CURRENT_BUFFER );
2491 YY_CURRENT_BUFFER_LVALUE = NULL;
2492 if ((yy_buffer_stack_top) > 0)
2493 --(yy_buffer_stack_top);
2495 if (YY_CURRENT_BUFFER) {
2496 sensors_yy_load_buffer_state( );
2497 (yy_did_buffer_switch_on_eof) = 1;
2501 /* Allocates the stack if it does not exist.
2502 * Guarantees space for at least one push.
2504 static void sensors_yyensure_buffer_stack (void)
2508 if (!(yy_buffer_stack)) {
2510 /* First allocation is just for 2 elements, since we don't know if this
2511 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2512 * immediate realloc on the next call.
2515 (yy_buffer_stack) = (struct yy_buffer_state**)sensors_yyalloc
2516 (num_to_alloc * sizeof(struct yy_buffer_state*)
2518 if ( ! (yy_buffer_stack) )
2519 YY_FATAL_ERROR( "out of dynamic memory in sensors_yyensure_buffer_stack()" );
2521 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2523 (yy_buffer_stack_max) = num_to_alloc;
2524 (yy_buffer_stack_top) = 0;
2528 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2530 /* Increase the buffer to prepare for a possible push. */
2531 int grow_size = 8 /* arbitrary grow size */;
2533 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2534 (yy_buffer_stack) = (struct yy_buffer_state**)sensors_yyrealloc
2536 num_to_alloc * sizeof(struct yy_buffer_state*)
2538 if ( ! (yy_buffer_stack) )
2539 YY_FATAL_ERROR( "out of dynamic memory in sensors_yyensure_buffer_stack()" );
2541 /* zero only the new slots.*/
2542 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2543 (yy_buffer_stack_max) = num_to_alloc;
2547 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2548 * @param base the character buffer
2549 * @param size the size in bytes of the character buffer
2551 * @return the newly allocated buffer state object.
2553 YY_BUFFER_STATE sensors_yy_scan_buffer (char * base, yy_size_t size )
2558 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2559 base[size-1] != YY_END_OF_BUFFER_CHAR )
2560 /* They forgot to leave room for the EOB's. */
2563 b = (YY_BUFFER_STATE) sensors_yyalloc(sizeof( struct yy_buffer_state ) );
2565 YY_FATAL_ERROR( "out of dynamic memory in sensors_yy_scan_buffer()" );
2567 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2568 b->yy_buf_pos = b->yy_ch_buf = base;
2569 b->yy_is_our_buffer = 0;
2570 b->yy_input_file = 0;
2571 b->yy_n_chars = b->yy_buf_size;
2572 b->yy_is_interactive = 0;
2574 b->yy_fill_buffer = 0;
2575 b->yy_buffer_status = YY_BUFFER_NEW;
2577 sensors_yy_switch_to_buffer(b );
2582 /** Setup the input buffer state to scan a string. The next call to sensors_yylex() will
2583 * scan from a @e copy of @a str.
2584 * @param yystr a NUL-terminated string to scan
2586 * @return the newly allocated buffer state object.
2587 * @note If you want to scan bytes that may contain NUL values, then use
2588 * sensors_yy_scan_bytes() instead.
2590 YY_BUFFER_STATE sensors_yy_scan_string (yyconst char * yystr )
2593 return sensors_yy_scan_bytes(yystr,strlen(yystr) );
2596 /** Setup the input buffer state to scan the given bytes. The next call to sensors_yylex() will
2597 * scan from a @e copy of @a bytes.
2598 * @param yybytes the byte buffer to scan
2599 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2601 * @return the newly allocated buffer state object.
2603 YY_BUFFER_STATE sensors_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
2610 /* Get memory for full buffer, including space for trailing EOB's. */
2611 n = _yybytes_len + 2;
2612 buf = (char *) sensors_yyalloc(n );
2614 YY_FATAL_ERROR( "out of dynamic memory in sensors_yy_scan_bytes()" );
2616 for ( i = 0; i < _yybytes_len; ++i )
2617 buf[i] = yybytes[i];
2619 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2621 b = sensors_yy_scan_buffer(buf,n );
2623 YY_FATAL_ERROR( "bad buffer in sensors_yy_scan_bytes()" );
2625 /* It's okay to grow etc. this buffer, and we should throw it
2626 * away when we're done.
2628 b->yy_is_our_buffer = 1;
2633 #ifndef YY_EXIT_FAILURE
2634 #define YY_EXIT_FAILURE 2
2637 static void yy_fatal_error (yyconst char* msg )
2639 (void) fprintf( stderr, "%s\n", msg );
2640 exit( YY_EXIT_FAILURE );
2643 /* Redefine yyless() so it works in section 3 code. */
2649 /* Undo effects of setting up sensors_yytext. */ \
2650 int yyless_macro_arg = (n); \
2651 YY_LESS_LINENO(yyless_macro_arg);\
2652 sensors_yytext[sensors_yyleng] = (yy_hold_char); \
2653 (yy_c_buf_p) = sensors_yytext + yyless_macro_arg; \
2654 (yy_hold_char) = *(yy_c_buf_p); \
2655 *(yy_c_buf_p) = '\0'; \
2656 sensors_yyleng = yyless_macro_arg; \
2660 /* Accessor methods (get/set functions) to struct members. */
2662 /** Get the current line number.
2665 int sensors_yyget_lineno (void)
2668 return sensors_yylineno;
2671 /** Get the input stream.
2674 FILE *sensors_yyget_in (void)
2676 return sensors_yyin;
2679 /** Get the output stream.
2682 FILE *sensors_yyget_out (void)
2684 return sensors_yyout;
2687 /** Get the length of the current token.
2690 int sensors_yyget_leng (void)
2692 return sensors_yyleng;
2695 /** Get the current token.
2699 char *sensors_yyget_text (void)
2701 return sensors_yytext;
2704 /** Set the current line number.
2705 * @param line_number
2708 void sensors_yyset_lineno (int line_number )
2711 sensors_yylineno = line_number;
2714 /** Set the input stream. This does not discard the current
2716 * @param in_str A readable stream.
2718 * @see sensors_yy_switch_to_buffer
2720 void sensors_yyset_in (FILE * in_str )
2722 sensors_yyin = in_str ;
2725 void sensors_yyset_out (FILE * out_str )
2727 sensors_yyout = out_str ;
2730 int sensors_yyget_debug (void)
2732 return sensors_yy_flex_debug;
2735 void sensors_yyset_debug (int bdebug )
2737 sensors_yy_flex_debug = bdebug ;
2740 static int yy_init_globals (void)
2742 /* Initialization is the same as for the non-reentrant scanner.
2743 * This function is called from sensors_yylex_destroy(), so don't allocate here.
2746 (yy_buffer_stack) = 0;
2747 (yy_buffer_stack_top) = 0;
2748 (yy_buffer_stack_max) = 0;
2749 (yy_c_buf_p) = (char *) 0;
2753 /* Defined in main.c */
2755 sensors_yyin = stdin;
2756 sensors_yyout = stdout;
2758 sensors_yyin = (FILE *) 0;
2759 sensors_yyout = (FILE *) 0;
2762 /* For future reference: Set errno on error, since we are called by
2763 * sensors_yylex_init()
2768 /* sensors_yylex_destroy is for both reentrant and non-reentrant scanners. */
2769 int sensors_yylex_destroy (void)
2772 /* Pop the buffer stack, destroying each element. */
2773 while(YY_CURRENT_BUFFER){
2774 sensors_yy_delete_buffer(YY_CURRENT_BUFFER );
2775 YY_CURRENT_BUFFER_LVALUE = NULL;
2776 sensors_yypop_buffer_state();
2779 /* Destroy the stack itself. */
2780 sensors_yyfree((yy_buffer_stack) );
2781 (yy_buffer_stack) = NULL;
2783 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2784 * sensors_yylex() is called, initialization will occur. */
2791 * Internal utility routines.
2795 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2798 for ( i = 0; i < n; ++i )
2803 #ifdef YY_NEED_STRLEN
2804 static int yy_flex_strlen (yyconst char * s )
2807 for ( n = 0; s[n]; ++n )
2814 void *sensors_yyalloc (yy_size_t size )
2816 return (void *) malloc( size );
2819 void *sensors_yyrealloc (void * ptr, yy_size_t size )
2821 /* The cast to (char *) in the following accommodates both
2822 * implementations that use char* generic pointers, and those
2823 * that use void* generic pointers. It works with the latter
2824 * because both ANSI C and C++ allow castless assignment from
2825 * any pointer type to void*, and deal with argument conversions
2826 * as though doing an assignment.
2828 return (void *) realloc( (char *) ptr, size );
2831 void sensors_yyfree (void * ptr )
2833 free( (char *) ptr ); /* see sensors_yyrealloc() for (char *) cast */
2836 #define YYTABLES_NAME "yytables"
2838 #line 332 "lib/conf-lex.l"
2843 Do the buffer handling manually. This allows us to scan as many
2844 config files as we need to, while cleaning up properly after each
2845 one. The "BEGIN(0)" line ensures that we start in the default state,
2846 even if e.g. the previous config file was syntactically broken.
2848 Returns 0 if successful, !0 otherwise.
2851 static YY_BUFFER_STATE scan_buf = (YY_BUFFER_STATE)0;
2853 int sensors_scanner_init(FILE *input, const char *filename)
2856 if (!(scan_buf = sensors_yy_create_buffer(input, YY_BUF_SIZE)))
2859 sensors_yy_switch_to_buffer(scan_buf);
2860 sensors_yyfilename = filename;
2861 sensors_yylineno = 1;
2865 void sensors_scanner_exit(void)
2867 sensors_yy_delete_buffer(scan_buf);
2868 scan_buf = (YY_BUFFER_STATE)0;
2870 /* As of flex 2.5.9, sensors_yylex_destroy() must be called when done with the
2871 scaller, otherwise we'll leak memory. */
2872 #if defined(YY_FLEX_MAJOR_VERSION) && defined(YY_FLEX_MINOR_VERSION) && defined(YY_FLEX_SUBMINOR_VERSION)
2873 #if YY_FLEX_MAJOR_VERSION > 2 || \
2874 (YY_FLEX_MAJOR_VERSION == 2 && (YY_FLEX_MINOR_VERSION > 5 || \
2875 (YY_FLEX_MINOR_VERSION == 5 && YY_FLEX_SUBMINOR_VERSION >= 9)))
2876 sensors_yylex_destroy();