GNU Octave 11.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
oct-tex-lexer.cc
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2013-2026 The Octave Project Developers
4//
5// See the file COPYRIGHT.md in the top-level directory of this
6// distribution or <https://octave.org/copyright/>.
7//
8// This file is part of Octave.
9//
10// Octave is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// Octave is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Octave; see the file COPYING. If not, see
22// <https://www.gnu.org/licenses/>.
23//
24////////////////////////////////////////////////////////////////////////
25
26// #define OCTAVE_TEX_DEBUG 1
27
28#if defined (HAVE_CONFIG_H)
29# include "config.h"
30#endif
31
32#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
33 // This one needs to be global.
34# pragma GCC diagnostic ignored "-Wunused-function"
35
36 // Disable these warnings for code that is generated by flex, including
37 // pattern rules. Push the current state so we can restore the warning
38 // state prior to functions we define at the bottom of the file.
39# pragma GCC diagnostic push
40# pragma GCC diagnostic ignored "-Wold-style-cast"
41# pragma GCC diagnostic ignored "-Wsign-compare"
42# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
43#endif
44
45// Define away the deprecated register storage class specifier to avoid
46// potential warnings about it.
47#if ! defined (register)
48# define register
49#endif
50
51#line 52 "libinterp/corefcn/oct-tex-lexer.cc"
52
53#define YY_INT_ALIGNED short int
54
55/* A lexical scanner generated by flex */
56
57#define FLEX_SCANNER
58#define YY_FLEX_MAJOR_VERSION 2
59#define YY_FLEX_MINOR_VERSION 6
60#define YY_FLEX_SUBMINOR_VERSION 4
61#if YY_FLEX_SUBMINOR_VERSION > 0
62#define FLEX_BETA
63#endif
64
65#ifdef yy_create_buffer
66#define octave_tex__create_buffer_ALREADY_DEFINED
67#else
68#define yy_create_buffer octave_tex__create_buffer
69#endif
70
71#ifdef yy_delete_buffer
72#define octave_tex__delete_buffer_ALREADY_DEFINED
73#else
74#define yy_delete_buffer octave_tex__delete_buffer
75#endif
76
77#ifdef yy_scan_buffer
78#define octave_tex__scan_buffer_ALREADY_DEFINED
79#else
80#define yy_scan_buffer octave_tex__scan_buffer
81#endif
82
83#ifdef yy_scan_string
84#define octave_tex__scan_string_ALREADY_DEFINED
85#else
86#define yy_scan_string octave_tex__scan_string
87#endif
88
89#ifdef yy_scan_bytes
90#define octave_tex__scan_bytes_ALREADY_DEFINED
91#else
92#define yy_scan_bytes octave_tex__scan_bytes
93#endif
94
95#ifdef yy_init_buffer
96#define octave_tex__init_buffer_ALREADY_DEFINED
97#else
98#define yy_init_buffer octave_tex__init_buffer
99#endif
100
101#ifdef yy_flush_buffer
102#define octave_tex__flush_buffer_ALREADY_DEFINED
103#else
104#define yy_flush_buffer octave_tex__flush_buffer
105#endif
106
107#ifdef yy_load_buffer_state
108#define octave_tex__load_buffer_state_ALREADY_DEFINED
109#else
110#define yy_load_buffer_state octave_tex__load_buffer_state
111#endif
112
113#ifdef yy_switch_to_buffer
114#define octave_tex__switch_to_buffer_ALREADY_DEFINED
115#else
116#define yy_switch_to_buffer octave_tex__switch_to_buffer
117#endif
118
119#ifdef yypush_buffer_state
120#define octave_tex_push_buffer_state_ALREADY_DEFINED
121#else
122#define yypush_buffer_state octave_tex_push_buffer_state
123#endif
124
125#ifdef yypop_buffer_state
126#define octave_tex_pop_buffer_state_ALREADY_DEFINED
127#else
128#define yypop_buffer_state octave_tex_pop_buffer_state
129#endif
130
131#ifdef yyensure_buffer_stack
132#define octave_tex_ensure_buffer_stack_ALREADY_DEFINED
133#else
134#define yyensure_buffer_stack octave_tex_ensure_buffer_stack
135#endif
136
137#ifdef yylex
138#define octave_tex_lex_ALREADY_DEFINED
139#else
140#define yylex octave_tex_lex
141#endif
142
143#ifdef yyrestart
144#define octave_tex_restart_ALREADY_DEFINED
145#else
146#define yyrestart octave_tex_restart
147#endif
148
149#ifdef yylex_init
150#define octave_tex_lex_init_ALREADY_DEFINED
151#else
152#define yylex_init octave_tex_lex_init
153#endif
154
155#ifdef yylex_init_extra
156#define octave_tex_lex_init_extra_ALREADY_DEFINED
157#else
158#define yylex_init_extra octave_tex_lex_init_extra
159#endif
160
161#ifdef yylex_destroy
162#define octave_tex_lex_destroy_ALREADY_DEFINED
163#else
164#define yylex_destroy octave_tex_lex_destroy
165#endif
166
167#ifdef yyget_debug
168#define octave_tex_get_debug_ALREADY_DEFINED
169#else
170#define yyget_debug octave_tex_get_debug
171#endif
172
173#ifdef yyset_debug
174#define octave_tex_set_debug_ALREADY_DEFINED
175#else
176#define yyset_debug octave_tex_set_debug
177#endif
178
179#ifdef yyget_extra
180#define octave_tex_get_extra_ALREADY_DEFINED
181#else
182#define yyget_extra octave_tex_get_extra
183#endif
184
185#ifdef yyset_extra
186#define octave_tex_set_extra_ALREADY_DEFINED
187#else
188#define yyset_extra octave_tex_set_extra
189#endif
190
191#ifdef yyget_in
192#define octave_tex_get_in_ALREADY_DEFINED
193#else
194#define yyget_in octave_tex_get_in
195#endif
196
197#ifdef yyset_in
198#define octave_tex_set_in_ALREADY_DEFINED
199#else
200#define yyset_in octave_tex_set_in
201#endif
202
203#ifdef yyget_out
204#define octave_tex_get_out_ALREADY_DEFINED
205#else
206#define yyget_out octave_tex_get_out
207#endif
208
209#ifdef yyset_out
210#define octave_tex_set_out_ALREADY_DEFINED
211#else
212#define yyset_out octave_tex_set_out
213#endif
214
215#ifdef yyget_leng
216#define octave_tex_get_leng_ALREADY_DEFINED
217#else
218#define yyget_leng octave_tex_get_leng
219#endif
220
221#ifdef yyget_text
222#define octave_tex_get_text_ALREADY_DEFINED
223#else
224#define yyget_text octave_tex_get_text
225#endif
226
227#ifdef yyget_lineno
228#define octave_tex_get_lineno_ALREADY_DEFINED
229#else
230#define yyget_lineno octave_tex_get_lineno
231#endif
232
233#ifdef yyset_lineno
234#define octave_tex_set_lineno_ALREADY_DEFINED
235#else
236#define yyset_lineno octave_tex_set_lineno
237#endif
238
239#ifdef yyget_column
240#define octave_tex_get_column_ALREADY_DEFINED
241#else
242#define yyget_column octave_tex_get_column
243#endif
244
245#ifdef yyset_column
246#define octave_tex_set_column_ALREADY_DEFINED
247#else
248#define yyset_column octave_tex_set_column
249#endif
250
251#ifdef yywrap
252#define octave_tex_wrap_ALREADY_DEFINED
253#else
254#define yywrap octave_tex_wrap
255#endif
256
257#ifdef yyget_lval
258#define octave_tex_get_lval_ALREADY_DEFINED
259#else
260#define yyget_lval octave_tex_get_lval
261#endif
262
263#ifdef yyset_lval
264#define octave_tex_set_lval_ALREADY_DEFINED
265#else
266#define yyset_lval octave_tex_set_lval
267#endif
268
269#ifdef yyalloc
270#define octave_tex_alloc_ALREADY_DEFINED
271#else
272#define yyalloc octave_tex_alloc
273#endif
274
275#ifdef yyrealloc
276#define octave_tex_realloc_ALREADY_DEFINED
277#else
278#define yyrealloc octave_tex_realloc
279#endif
280
281#ifdef yyfree
282#define octave_tex_free_ALREADY_DEFINED
283#else
284#define yyfree octave_tex_free
285#endif
286
287/* First, we deal with platform-specific or compiler-specific issues. */
288
289/* begin standard C headers. */
290#include <stdio.h>
291#include <string.h>
292#include <errno.h>
293#include <stdlib.h>
294
295/* end standard C headers. */
296
297/* flex integer type definitions */
298
299#ifndef FLEXINT_H
300#define FLEXINT_H
301
302/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
303
304#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
305
306/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
307 * if you want the limit (max/min) macros for int types.
308 */
309#ifndef __STDC_LIMIT_MACROS
310#define __STDC_LIMIT_MACROS 1
311#endif
312
313#include <inttypes.h>
314typedef int8_t flex_int8_t;
315typedef uint8_t flex_uint8_t;
316typedef int16_t flex_int16_t;
317typedef uint16_t flex_uint16_t;
318typedef int32_t flex_int32_t;
319typedef uint32_t flex_uint32_t;
320#else
321typedef signed char flex_int8_t;
322typedef short int flex_int16_t;
323typedef int flex_int32_t;
324typedef unsigned char flex_uint8_t;
325typedef unsigned short int flex_uint16_t;
326typedef unsigned int flex_uint32_t;
327
328/* Limits of integral types. */
329#ifndef INT8_MIN
330#define INT8_MIN (-128)
331#endif
332#ifndef INT16_MIN
333#define INT16_MIN (-32767-1)
334#endif
335#ifndef INT32_MIN
336#define INT32_MIN (-2147483647-1)
337#endif
338#ifndef INT8_MAX
339#define INT8_MAX (127)
340#endif
341#ifndef INT16_MAX
342#define INT16_MAX (32767)
343#endif
344#ifndef INT32_MAX
345#define INT32_MAX (2147483647)
346#endif
347#ifndef UINT8_MAX
348#define UINT8_MAX (255U)
349#endif
350#ifndef UINT16_MAX
351#define UINT16_MAX (65535U)
352#endif
353#ifndef UINT32_MAX
354#define UINT32_MAX (4294967295U)
355#endif
356
357#ifndef SIZE_MAX
358#define SIZE_MAX (~(size_t)0)
359#endif
360
361#endif /* ! C99 */
362
363#endif /* ! FLEXINT_H */
364
365/* begin standard C++ headers. */
366
367/* TODO: this is always defined, so inline it */
368#define yyconst const
369
370#if defined(__GNUC__) && __GNUC__ >= 3
371#define yynoreturn __attribute__((__noreturn__))
372#else
373#define yynoreturn
374#endif
375
376/* Returned upon end-of-file. */
377#define YY_NULL 0
378
379/* Promotes a possibly negative, possibly signed char to an
380 * integer in range [0..255] for use as an array index.
381 */
382#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
383
384/* An opaque pointer. */
385#ifndef YY_TYPEDEF_YY_SCANNER_T
386#define YY_TYPEDEF_YY_SCANNER_T
387typedef void* yyscan_t;
388#endif
389
390/* For convenience, these vars (plus the bison vars far below)
391 are macros in the reentrant scanner. */
392#define yyin yyg->yyin_r
393#define yyout yyg->yyout_r
394#define yyextra yyg->yyextra_r
395#define yyleng yyg->yyleng_r
396#define yytext yyg->yytext_r
397#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
398#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
399#define yy_flex_debug yyg->yy_flex_debug_r
400
401/* Enter a start condition. This macro really ought to take a parameter,
402 * but we do it the disgusting crufty way forced on us by the ()-less
403 * definition of BEGIN.
404 */
405#define BEGIN yyg->yy_start = 1 + 2 *
406/* Translate the current start state into a value that can be later handed
407 * to BEGIN to return to the state. The YYSTATE alias is for lex
408 * compatibility.
409 */
410#define YY_START ((yyg->yy_start - 1) / 2)
411#define YYSTATE YY_START
412/* Action number for EOF rule of a given start state. */
413#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
414/* Special action meaning "start processing a new file". */
415#define YY_NEW_FILE yyrestart( yyin , yyscanner )
416#define YY_END_OF_BUFFER_CHAR 0
417
418/* Size of default input buffer. */
419#ifndef YY_BUF_SIZE
420#ifdef __ia64__
421/* On IA-64, the buffer size is 16k, not 8k.
422 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
423 * Ditto for the __ia64__ case accordingly.
424 */
425#define YY_BUF_SIZE 32768
426#else
427#define YY_BUF_SIZE 16384
428#endif /* __ia64__ */
429#endif
430
431/* The state buf must be large enough to hold one state per character in the main buffer.
432 */
433#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
434
435#ifndef YY_TYPEDEF_YY_BUFFER_STATE
436#define YY_TYPEDEF_YY_BUFFER_STATE
437typedef struct yy_buffer_state *YY_BUFFER_STATE;
438#endif
439
440#ifndef YY_TYPEDEF_YY_SIZE_T
441#define YY_TYPEDEF_YY_SIZE_T
442typedef size_t yy_size_t;
443#endif
444
445#define EOB_ACT_CONTINUE_SCAN 0
446#define EOB_ACT_END_OF_FILE 1
447#define EOB_ACT_LAST_MATCH 2
448
449 #define YY_LESS_LINENO(n)
450 #define YY_LINENO_REWIND_TO(ptr)
451
452/* Return all but the first "n" matched characters back to the input stream. */
453#define yyless(n) \
454 do \
455 { \
456 /* Undo effects of setting up yytext. */ \
457 int yyless_macro_arg = (n); \
458 YY_LESS_LINENO(yyless_macro_arg);\
459 *yy_cp = yyg->yy_hold_char; \
460 YY_RESTORE_YY_MORE_OFFSET \
461 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
462 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
463 } \
464 while ( 0 )
465#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
466
467#ifndef YY_STRUCT_YY_BUFFER_STATE
468#define YY_STRUCT_YY_BUFFER_STATE
469struct yy_buffer_state
470 {
471 FILE *yy_input_file;
472
473 char *yy_ch_buf; /* input buffer */
474 char *yy_buf_pos; /* current position in input buffer */
475
476 /* Size of input buffer in bytes, not including room for EOB
477 * characters.
478 */
479 int yy_buf_size;
480
481 /* Number of characters read into yy_ch_buf, not including EOB
482 * characters.
483 */
484 int yy_n_chars;
485
486 /* Whether we "own" the buffer - i.e., we know we created it,
487 * and can realloc() it to grow it, and should free() it to
488 * delete it.
489 */
490 int yy_is_our_buffer;
491
492 /* Whether this is an "interactive" input source; if so, and
493 * if we're using stdio for input, then we want to use getc()
494 * instead of fread(), to make sure we stop fetching input after
495 * each newline.
496 */
497 int yy_is_interactive;
498
499 /* Whether we're considered to be at the beginning of a line.
500 * If so, '^' rules will be active on the next match, otherwise
501 * not.
502 */
503 int yy_at_bol;
504
505 int yy_bs_lineno; /**< The line count. */
506 int yy_bs_column; /**< The column count. */
507
508 /* Whether to try to fill the input buffer when we reach the
509 * end of it.
510 */
511 int yy_fill_buffer;
512
513 int yy_buffer_status;
514
515#define YY_BUFFER_NEW 0
516#define YY_BUFFER_NORMAL 1
517 /* When an EOF's been seen but there's still some text to process
518 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
519 * shouldn't try reading from the input source any more. We might
520 * still have a bunch of tokens to match, though, because of
521 * possible backing-up.
522 *
523 * When we actually see the EOF, we change the status to "new"
524 * (via yyrestart()), so that the user can continue scanning by
525 * just pointing yyin at a new input file.
526 */
527#define YY_BUFFER_EOF_PENDING 2
528
529 };
530#endif /* !YY_STRUCT_YY_BUFFER_STATE */
531
532/* We provide macros for accessing buffer states in case in the
533 * future we want to put the buffer states in a more general
534 * "scanner state".
535 *
536 * Returns the top of the stack, or NULL.
537 */
538#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
539 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
540 : NULL)
541/* Same as previous macro, but useful when we know that the buffer stack is not
542 * NULL or when we need an lvalue. For internal use only.
543 */
544#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
545
546void yyrestart ( FILE *input_file , yyscan_t yyscanner );
547void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
548YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
549void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
550void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
551void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
552void yypop_buffer_state ( yyscan_t yyscanner );
553
554static void yyensure_buffer_stack ( yyscan_t yyscanner );
555static void yy_load_buffer_state ( yyscan_t yyscanner );
556static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
557#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
558
559YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
560YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
561YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
562
563void *yyalloc ( yy_size_t , yyscan_t yyscanner );
564void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
565void yyfree ( void * , yyscan_t yyscanner );
566
567#define yy_new_buffer yy_create_buffer
568#define yy_set_interactive(is_interactive) \
569 { \
570 if ( ! YY_CURRENT_BUFFER ){ \
571 yyensure_buffer_stack (yyscanner); \
572 YY_CURRENT_BUFFER_LVALUE = \
573 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
574 } \
575 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
576 }
577#define yy_set_bol(at_bol) \
578 { \
579 if ( ! YY_CURRENT_BUFFER ){\
580 yyensure_buffer_stack (yyscanner); \
581 YY_CURRENT_BUFFER_LVALUE = \
582 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
583 } \
584 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
585 }
586#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
587
588/* Begin user sect3 */
589
590#define octave_tex_wrap(yyscanner) (/*CONSTCOND*/1)
591#define YY_SKIP_YYWRAP
593
594typedef int yy_state_type;
595
596#define yytext_ptr yytext_r
597
598static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
599static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner);
600static int yy_get_next_buffer ( yyscan_t yyscanner );
601static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
602
603/* Done after the current pattern has been matched and before the
604 * corresponding action - sets up yytext.
605 */
606#define YY_DO_BEFORE_ACTION \
607 yyg->yytext_ptr = yy_bp; \
608 yyleng = (int) (yy_cp - yy_bp); \
609 yyg->yy_hold_char = *yy_cp; \
610 *yy_cp = '\0'; \
611 yyg->yy_c_buf_p = yy_cp;
612#define YY_NUM_RULES 128
613#define YY_END_OF_BUFFER 129
614/* This struct is not used in this scanner,
615 but its presence is necessary. */
616struct yy_trans_info
617 {
618 flex_int32_t yy_verify;
619 flex_int32_t yy_nxt;
620 };
621static const flex_int16_t yy_accept[465] =
622 { 0,
623 0, 0, 0, 0, 0, 0, 129, 127, 126, 127,
624 16, 17, 14, 15, 3, 2, 3, 1, 5, 4,
625 123, 0, 0, 0, 0, 0, 0, 0, 0, 0,
626 0, 0, 22, 20, 21, 0, 0, 0, 0, 0,
627 0, 0, 0, 0, 0, 0, 0, 0, 38, 0,
628 0, 0, 0, 0, 0, 0, 0, 0, 18, 19,
629 2, 1, 1, 1, 0, 0, 64, 0, 0, 0,
630 0, 55, 0, 63, 0, 0, 0, 0, 54, 0,
631 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
632 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
633
634 0, 0, 0, 0, 96, 0, 7, 0, 0, 0,
635 0, 0, 0, 0, 35, 0, 0, 100, 36, 0,
636 0, 0, 0, 0, 0, 0, 39, 79, 0, 0,
637 0, 0, 0, 0, 0, 9, 0, 8, 0, 0,
638 0, 0, 0, 0, 0, 0, 0, 62, 37, 0,
639 1, 0, 0, 0, 0, 0, 58, 59, 0, 0,
640 0, 0, 0, 0, 0, 0, 82, 0, 0, 86,
641 0, 47, 0, 0, 0, 0, 0, 87, 125, 0,
642 0, 85, 0, 0, 0, 29, 0, 0, 0, 0,
643 97, 0, 0, 78, 0, 0, 0, 0, 0, 0,
644
645 0, 93, 0, 101, 0, 73, 121, 0, 0, 0,
646 0, 0, 0, 46, 0, 0, 48, 0, 0, 0,
647 41, 0, 0, 103, 0, 0, 0, 0, 44, 0,
648 0, 0, 0, 0, 88, 0, 0, 0, 0, 0,
649 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
650 24, 0, 80, 83, 0, 0, 105, 0, 0, 0,
651 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,
652 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
653 0, 0, 0, 107, 0, 0, 0, 0, 0, 0,
654 0, 0, 0, 0, 69, 0, 0, 0, 0, 0,
655
656 0, 0, 0, 28, 51, 50, 0, 0, 60, 0,
657 56, 52, 0, 61, 23, 70, 0, 0, 0, 13,
658 0, 26, 0, 0, 0, 102, 0, 0, 0, 0,
659 25, 0, 66, 33, 0, 0, 117, 122, 0, 0,
660 0, 68, 49, 90, 0, 0, 0, 67, 0, 0,
661 120, 0, 0, 42, 0, 0, 0, 30, 81, 0,
662 0, 40, 0, 0, 89, 53, 0, 0, 0, 104,
663 84, 0, 0, 0, 0, 0, 0, 72, 0, 0,
664 71, 0, 34, 116, 0, 0, 115, 92, 91, 0,
665 106, 119, 118, 0, 0, 94, 98, 0, 0, 0,
666
667 0, 0, 0, 57, 0, 0, 0, 0, 0, 27,
668 0, 0, 0, 0, 0, 65, 0, 0, 0, 0,
669 113, 45, 0, 0, 0, 0, 74, 0, 0, 0,
670 0, 10, 11, 0, 0, 0, 0, 0, 95, 99,
671 43, 31, 109, 0, 0, 124, 0, 114, 76, 108,
672 0, 0, 77, 111, 12, 0, 0, 110, 75, 0,
673 0, 0, 112, 0
674 } ;
675
676static const YY_CHAR yy_ec[256] =
677 { 0,
678 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
679 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
680 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
681 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
682 1, 1, 1, 2, 1, 4, 1, 5, 6, 6,
683 6, 6, 6, 6, 6, 6, 6, 1, 1, 1,
684 1, 1, 1, 1, 1, 1, 1, 7, 1, 1,
685 8, 1, 9, 1, 1, 10, 1, 1, 11, 12,
686 1, 13, 14, 15, 16, 1, 1, 17, 1, 1,
687 18, 19, 20, 21, 22, 1, 23, 24, 25, 26,
688
689 27, 28, 29, 30, 31, 1, 32, 33, 34, 35,
690 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
691 46, 47, 48, 1, 49, 1, 1, 1, 1, 1,
692 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
693 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
694 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
695 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
696 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
697 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
698 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
699
700 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
701 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
702 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
703 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
704 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
705 1, 1, 1, 1, 1
706 } ;
707
708static const YY_CHAR yy_meta[50] =
709 { 0,
710 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
711 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
712 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
713 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
714 1, 1, 1, 1, 1, 1, 1, 1, 1
715 } ;
716
717static const flex_int16_t yy_base[468] =
718 { 0,
719 0, 4, 0, 6, 434, 433, 480, 483, 483, 49,
720 483, 483, 483, 483, 483, 477, 8, 11, 483, 483,
721 483, 451, 454, 442, 1, 441, 0, 2, 443, 443,
722 435, 440, 483, 483, 483, 1, 72, 79, 8, 5,
723 434, 24, 442, 72, 445, 97, 64, 103, 95, 110,
724 123, 125, 88, 430, 104, 0, 435, 438, 483, 483,
725 462, 98, 111, 155, 430, 428, 483, 427, 432, 432,
726 427, 483, 426, 483, 427, 426, 427, 413, 483, 18,
727 423, 414, 409, 408, 483, 415, 410, 410, 414, 405,
728 401, 131, 405, 109, 44, 397, 400, 397, 415, 406,
729
730 104, 402, 397, 411, 124, 392, 483, 395, 135, 404,
731 394, 135, 396, 402, 483, 403, 142, 483, 483, 399,
732 392, 391, 392, 383, 382, 389, 483, 483, 141, 388,
733 383, 390, 383, 379, 385, 483, 145, 483, 390, 151,
734 370, 384, 376, 153, 370, 381, 381, 483, 483, 365,
735 176, 364, 370, 379, 361, 372, 483, 483, 370, 365,
736 357, 366, 359, 365, 361, 354, 483, 369, 358, 483,
737 349, 483, 364, 364, 351, 357, 339, 483, 483, 343,
738 349, 483, 347, 350, 349, 483, 339, 337, 354, 342,
739 483, 336, 333, 483, 350, 335, 347, 341, 338, 327,
740
741 326, 483, 330, 483, 332, 483, 483, 335, 321, 339,
742 327, 319, 322, 483, 324, 320, 483, 327, 324, 318,
743 483, 323, 318, 483, 325, 310, 309, 322, 483, 306,
744 319, 306, 313, 146, 483, 314, 319, 318, 317, 313,
745 315, 314, 295, 312, 311, 300, 302, 308, 303, 293,
746 483, 301, 483, 483, 287, 287, 483, 286, 301, 287,
747 299, 288, 277, 278, 149, 285, 294, 275, 269, 483,
748 291, 287, 279, 278, 270, 155, 273, 285, 284, 266,
749 265, 277, 272, 483, 275, 260, 267, 266, 262, 256,
750 273, 268, 267, 266, 483, 269, 251, 251, 256, 257,
751
752 256, 256, 258, 483, 483, 483, 261, 244, 483, 259,
753 483, 483, 245, 483, 483, 483, 235, 238, 236, 259,
754 245, 483, 240, 235, 237, 483, 232, 248, 239, 236,
755 483, 228, 483, 483, 244, 239, 483, 483, 226, 233,
756 224, 483, 483, 483, 232, 221, 237, 483, 223, 231,
757 483, 218, 233, 483, 215, 213, 212, 483, 483, 216,
758 215, 483, 221, 222, 483, 483, 209, 208, 211, 483,
759 483, 214, 205, 214, 216, 202, 205, 483, 205, 191,
760 483, 195, 483, 483, 197, 206, 483, 483, 483, 201,
761 483, 483, 483, 194, 190, 204, 203, 185, 193, 193,
762
763 185, 189, 185, 483, 182, 193, 191, 180, 183, 483,
764 191, 190, 185, 179, 184, 483, 174, 181, 173, 172,
765 483, 483, 186, 185, 163, 170, 483, 181, 163, 161,
766 158, 483, 483, 160, 156, 158, 162, 156, 483, 483,
767 483, 483, 483, 152, 175, 483, 161, 483, 483, 483,
768 168, 141, 483, 483, 483, 114, 108, 483, 483, 89,
769 65, 25, 483, 483, 17, 8, 0
770 } ;
771
772static const flex_int16_t yy_def[468] =
773 { 0,
774 465, 465, 466, 466, 467, 467, 464, 464, 464, 464,
775 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
776 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
777 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
778 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
779 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
780 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
781 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
782 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
783 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
784
785 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
786 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
787 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
788 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
789 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
790 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
791 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
792 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
793 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
794 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
795
796 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
797 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
798 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
799 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
800 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
801 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
802 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
803 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
804 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
805 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
806
807 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
808 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
809 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
810 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
811 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
812 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
813 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
814 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
815 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
816 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
817
818 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
819 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
820 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
821 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
822 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
823 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
824 464, 464, 464, 0, 464, 464, 464
825 } ;
826
827static const flex_int16_t yy_nxt[533] =
828 { 0,
829 19, 16, 9, 17, 18, 18, 9, 16, 15, 17,
830 18, 18, 62, 62, 63, 64, 64, 8, 10, 464,
831 11, 12, 10, 68, 11, 12, 147, 69, 74, 71,
832 72, 464, 75, 80, 94, 81, 148, 82, 95, 73,
833 83, 97, 98, 96, 163, 99, 102, 13, 14, 100,
834 103, 13, 14, 21, 164, 22, 23, 24, 25, 26,
835 27, 28, 29, 30, 31, 32, 181, 33, 463, 34,
836 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
837 45, 46, 47, 48, 49, 50, 182, 51, 52, 53,
838 54, 55, 56, 57, 114, 58, 59, 60, 84, 85,
839
840 462, 87, 62, 62, 88, 115, 105, 106, 89, 90,
841 141, 91, 107, 86, 92, 151, 151, 142, 143, 109,
842 93, 110, 111, 112, 113, 116, 145, 461, 120, 117,
843 146, 121, 124, 118, 122, 123, 125, 179, 188, 126,
844 127, 180, 189, 128, 119, 131, 460, 132, 129, 130,
845 133, 193, 134, 135, 459, 137, 136, 138, 63, 64,
846 64, 139, 201, 175, 194, 176, 140, 177, 197, 198,
847 206, 215, 202, 223, 226, 232, 216, 339, 224, 207,
848 151, 151, 300, 328, 458, 301, 302, 227, 329, 228,
849 457, 456, 233, 340, 455, 454, 453, 452, 451, 450,
850
851 449, 448, 447, 446, 445, 444, 443, 442, 441, 440,
852 439, 438, 437, 436, 435, 434, 433, 432, 431, 430,
853 429, 428, 427, 426, 425, 424, 423, 422, 421, 420,
854 419, 418, 417, 416, 415, 414, 413, 412, 411, 410,
855 409, 408, 407, 406, 405, 404, 403, 402, 401, 400,
856 399, 398, 397, 396, 395, 394, 393, 392, 391, 390,
857 389, 388, 387, 386, 385, 384, 383, 382, 381, 380,
858 379, 378, 377, 376, 375, 374, 373, 372, 371, 370,
859 369, 368, 367, 366, 365, 364, 363, 362, 361, 360,
860 359, 358, 357, 356, 355, 354, 353, 352, 351, 350,
861
862 349, 348, 347, 346, 345, 344, 343, 342, 341, 338,
863 337, 336, 335, 334, 333, 332, 331, 330, 327, 326,
864 325, 324, 323, 322, 321, 320, 319, 318, 317, 316,
865 315, 314, 313, 312, 311, 310, 309, 308, 307, 306,
866 305, 304, 303, 299, 298, 297, 296, 295, 294, 293,
867 292, 291, 290, 289, 288, 287, 286, 285, 284, 283,
868 282, 281, 280, 279, 278, 277, 276, 275, 274, 273,
869 272, 271, 270, 269, 268, 267, 266, 265, 264, 263,
870 262, 261, 260, 259, 258, 257, 256, 255, 254, 253,
871 252, 251, 250, 249, 248, 247, 246, 245, 244, 243,
872
873 242, 241, 240, 239, 238, 237, 236, 235, 234, 231,
874 230, 229, 225, 222, 221, 220, 219, 218, 217, 214,
875 213, 212, 211, 210, 209, 208, 205, 204, 203, 200,
876 199, 196, 195, 192, 191, 190, 187, 186, 185, 184,
877 183, 178, 174, 173, 172, 171, 170, 169, 168, 167,
878 166, 165, 162, 161, 160, 159, 158, 157, 156, 155,
879 154, 153, 152, 61, 150, 149, 144, 108, 104, 101,
880 79, 78, 77, 76, 70, 67, 66, 65, 61, 464,
881 20, 20, 7, 464, 464, 464, 464, 464, 464, 464,
882 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
883
884 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
885 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
886 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
887 464, 464
888 } ;
889
890static const flex_int16_t yy_chk[533] =
891 { 0,
892 467, 3, 1, 3, 3, 3, 2, 4, 466, 4,
893 4, 4, 17, 17, 18, 18, 18, 465, 1, 0,
894 1, 1, 2, 25, 2, 2, 56, 25, 28, 27,
895 27, 0, 28, 36, 39, 36, 56, 36, 39, 27,
896 36, 40, 40, 39, 80, 40, 42, 1, 1, 40,
897 42, 2, 2, 10, 80, 10, 10, 10, 10, 10,
898 10, 10, 10, 10, 10, 10, 95, 10, 462, 10,
899 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
900 10, 10, 10, 10, 10, 10, 95, 10, 10, 10,
901 10, 10, 10, 10, 47, 10, 10, 10, 37, 37,
902
903 461, 38, 62, 62, 38, 47, 44, 44, 38, 38,
904 53, 38, 44, 37, 38, 63, 63, 53, 53, 46,
905 38, 46, 46, 46, 46, 48, 55, 460, 49, 48,
906 55, 49, 50, 48, 49, 49, 50, 94, 101, 50,
907 50, 94, 101, 50, 48, 51, 457, 51, 50, 50,
908 51, 105, 51, 51, 456, 52, 51, 52, 64, 64,
909 64, 52, 112, 92, 105, 92, 52, 92, 109, 109,
910 117, 129, 112, 137, 140, 144, 129, 276, 137, 117,
911 151, 151, 234, 265, 452, 234, 234, 140, 265, 140,
912 451, 447, 144, 276, 445, 444, 438, 437, 436, 435,
913
914 434, 431, 430, 429, 428, 426, 425, 424, 423, 420,
915 419, 418, 417, 415, 414, 413, 412, 411, 409, 408,
916 407, 406, 405, 403, 402, 401, 400, 399, 398, 397,
917 396, 395, 394, 390, 386, 385, 382, 380, 379, 377,
918 376, 375, 374, 373, 372, 369, 368, 367, 364, 363,
919 361, 360, 357, 356, 355, 353, 352, 350, 349, 347,
920 346, 345, 341, 340, 339, 336, 335, 332, 330, 329,
921 328, 327, 325, 324, 323, 321, 320, 319, 318, 317,
922 313, 310, 308, 307, 303, 302, 301, 300, 299, 298,
923 297, 296, 294, 293, 292, 291, 290, 289, 288, 287,
924
925 286, 285, 283, 282, 281, 280, 279, 278, 277, 275,
926 274, 273, 272, 271, 269, 268, 267, 266, 264, 263,
927 262, 261, 260, 259, 258, 256, 255, 252, 250, 249,
928 248, 247, 246, 245, 244, 243, 242, 241, 240, 239,
929 238, 237, 236, 233, 232, 231, 230, 228, 227, 226,
930 225, 223, 222, 220, 219, 218, 216, 215, 213, 212,
931 211, 210, 209, 208, 205, 203, 201, 200, 199, 198,
932 197, 196, 195, 193, 192, 190, 189, 188, 187, 185,
933 184, 183, 181, 180, 177, 176, 175, 174, 173, 171,
934 169, 168, 166, 165, 164, 163, 162, 161, 160, 159,
935
936 156, 155, 154, 153, 152, 150, 147, 146, 145, 143,
937 142, 141, 139, 135, 134, 133, 132, 131, 130, 126,
938 125, 124, 123, 122, 121, 120, 116, 114, 113, 111,
939 110, 108, 106, 104, 103, 102, 100, 99, 98, 97,
940 96, 93, 91, 90, 89, 88, 87, 86, 84, 83,
941 82, 81, 78, 77, 76, 75, 73, 71, 70, 69,
942 68, 66, 65, 61, 58, 57, 54, 45, 43, 41,
943 32, 31, 30, 29, 26, 24, 23, 22, 16, 7,
944 6, 5, 464, 464, 464, 464, 464, 464, 464, 464,
945 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
946
947 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
948 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
949 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
950 464, 464
951 } ;
952
953/* The intent behind this definition is that it'll catch
954 * any uses of REJECT which flex missed.
955 */
956#define REJECT reject_used_but_not_detected
957#define yymore() yymore_used_but_not_detected
958#define YY_MORE_ADJ 0
959#define YY_RESTORE_YY_MORE_OFFSET
960#line 1 "libinterp/corefcn/oct-tex-lexer.ll"
961/* DO NOT EDIT. AUTOMATICALLY GENERATED FROM oct-tex-lexer.in.ll and oct-tex-symbols.in. */
962
963
964
965#line 68 "libinterp/corefcn/oct-tex-lexer.ll"
966
967#include "unistd-wrappers.h"
968
969#include "text-engine.h"
970// oct-tex-parser.h must be included after text-engine.h
971#include "oct-tex-parser.h"
972
973// FIXME: with bison 3.x, OCTAVE_TEX_STYPE appears in the generated
974// oct-parse.h file, but there is no definition for YYSTYPE, which is
975// needed by the code that is generated by flex. I can't seem to find
976// a way to tell flex to use OCTAVE_TEX_STYPE instead of YYSTYPE in
977// the code it generates, or to tell bison to provide the definition
978// of YYSTYPE in the generated oct-parse.h file.
979
980#if defined (OCTAVE_TEX_STYPE_IS_DECLARED) && ! defined YYSTYPE
981# define YYSTYPE OCTAVE_TEX_STYPE
982#endif
983
984#define YY_NO_UNISTD_H 1
985#define isatty octave_isatty_wrapper
986#define yyguts_t octave_tex_yyguts_t
987
988#line 989 "libinterp/corefcn/oct-tex-lexer.cc"
989#line 990 "libinterp/corefcn/oct-tex-lexer.cc"
990
991#define INITIAL 0
992#define NUM_MODE 1
993#define MAYBE_NUM_MODE 2
994
995#ifndef YY_NO_UNISTD_H
996/* Special case for "unistd.h", since it is non-ANSI. We include it way
997 * down here because we want the user's section 1 to have been scanned first.
998 * The user has a chance to override it with an option.
999 */
1000#include <unistd.h>
1001#endif
1002
1003#ifndef YY_EXTRA_TYPE
1004#define YY_EXTRA_TYPE void *
1005#endif
1006
1007/* Holds the entire state of the reentrant scanner. */
1008struct yyguts_t
1009 {
1010
1011 /* User-defined. Not touched by flex. */
1012 YY_EXTRA_TYPE yyextra_r;
1013
1014 /* The rest are the same as the globals declared in the non-reentrant scanner. */
1015 FILE *yyin_r, *yyout_r;
1016 size_t yy_buffer_stack_top; /**< index of top of stack. */
1017 size_t yy_buffer_stack_max; /**< capacity of stack. */
1018 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
1019 char yy_hold_char;
1020 int yy_n_chars;
1021 int yyleng_r;
1022 char *yy_c_buf_p;
1023 int yy_init;
1024 int yy_start;
1025 int yy_did_buffer_switch_on_eof;
1026 int yy_start_stack_ptr;
1027 int yy_start_stack_depth;
1028 int *yy_start_stack;
1029 yy_state_type yy_last_accepting_state;
1030 char* yy_last_accepting_cpos;
1031
1032 int yylineno_r;
1033 int yy_flex_debug_r;
1034
1035 char *yytext_r;
1036 int yy_more_flag;
1037 int yy_more_len;
1038
1039 YYSTYPE * yylval_r;
1040
1041 }; /* end struct yyguts_t */
1042
1043static int yy_init_globals ( yyscan_t yyscanner );
1044
1045 /* This must go here because YYSTYPE and YYLTYPE are included
1046 * from bison output in section 1.*/
1047 # define yylval yyg->yylval_r
1048
1050
1051int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
1052
1053/* Accessor methods to globals.
1054 These are made visible to non-reentrant scanners for convenience. */
1055
1056int yylex_destroy ( yyscan_t yyscanner );
1057
1058int yyget_debug ( yyscan_t yyscanner );
1059
1060void yyset_debug ( int debug_flag , yyscan_t yyscanner );
1061
1062YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
1063
1064void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
1065
1066FILE *yyget_in ( yyscan_t yyscanner );
1067
1068void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
1069
1070FILE *yyget_out ( yyscan_t yyscanner );
1071
1072void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
1073
1074 int yyget_leng ( yyscan_t yyscanner );
1075
1076char *yyget_text ( yyscan_t yyscanner );
1077
1078int yyget_lineno ( yyscan_t yyscanner );
1079
1080void yyset_lineno ( int _line_number , yyscan_t yyscanner );
1081
1082int yyget_column ( yyscan_t yyscanner );
1083
1084void yyset_column ( int _column_no , yyscan_t yyscanner );
1085
1086YYSTYPE * yyget_lval ( yyscan_t yyscanner );
1087
1088void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
1089
1090/* Macros after this point can all be overridden by user definitions in
1091 * section 1.
1092 */
1093
1094#ifndef YY_SKIP_YYWRAP
1095#ifdef __cplusplus
1096extern "C" int yywrap ( yyscan_t yyscanner );
1097#else
1098extern int yywrap ( yyscan_t yyscanner );
1099#endif
1100#endif
1101
1102#ifndef YY_NO_UNPUT
1103
1104 static void yyunput ( int c, char *buf_ptr , yyscan_t yyscanner);
1105
1106#endif
1107
1108#ifndef yytext_ptr
1109static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
1110#endif
1111
1112#ifdef YY_NEED_STRLEN
1113static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
1114#endif
1115
1116#ifndef YY_NO_INPUT
1117#ifdef __cplusplus
1118static int yyinput ( yyscan_t yyscanner );
1119#else
1120static int input ( yyscan_t yyscanner );
1121#endif
1122
1123#endif
1124
1125/* Amount of stuff to slurp up with each read. */
1126#ifndef YY_READ_BUF_SIZE
1127#ifdef __ia64__
1128/* On IA-64, the buffer size is 16k, not 8k */
1129#define YY_READ_BUF_SIZE 16384
1130#else
1131#define YY_READ_BUF_SIZE 8192
1132#endif /* __ia64__ */
1133#endif
1134
1135/* Copy whatever the last rule matched to the standard output. */
1136#ifndef ECHO
1137/* This used to be an fputs(), but since the string might contain NUL's,
1138 * we now use fwrite().
1139 */
1140#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1141#endif
1142
1143/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1144 * is returned in "result".
1145 */
1146#ifndef YY_INPUT
1147#define YY_INPUT(buf,result,max_size) \
1148 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1149 { \
1150 int c = '*'; \
1151 int n; \
1152 for ( n = 0; n < max_size && \
1153 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1154 buf[n] = (char) c; \
1155 if ( c == '\n' ) \
1156 buf[n++] = (char) c; \
1157 if ( c == EOF && ferror( yyin ) ) \
1158 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1159 result = n; \
1160 } \
1161 else \
1162 { \
1163 errno=0; \
1164 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1165 { \
1166 if( errno != EINTR) \
1167 { \
1168 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1169 break; \
1170 } \
1171 errno=0; \
1172 clearerr(yyin); \
1173 } \
1174 }\
1175\
1176
1177#endif
1178
1179/* No semi-colon after return; correct usage is to write "yyterminate();" -
1180 * we don't want an extra ';' after the "return" because that will cause
1181 * some compilers to complain about unreachable statements.
1182 */
1183#ifndef yyterminate
1184#define yyterminate() return YY_NULL
1185#endif
1186
1187/* Number of entries by which start-condition stack grows. */
1188#ifndef YY_START_STACK_INCR
1189#define YY_START_STACK_INCR 25
1190#endif
1191
1192/* Report a fatal error. */
1193#ifndef YY_FATAL_ERROR
1194#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1195#endif
1196
1197/* end tables serialization structures and prototypes */
1198
1199/* Default declaration of generated scanner - a define so the user can
1200 * easily add parameters.
1201 */
1202#ifndef YY_DECL
1203#define YY_DECL_IS_OURS 1
1204
1205extern int yylex \
1206 (YYSTYPE * yylval_param , yyscan_t yyscanner);
1207
1208#define YY_DECL int yylex \
1209 (YYSTYPE * yylval_param , yyscan_t yyscanner)
1210#endif /* !YY_DECL */
1211
1212/* Code executed at the beginning of each rule, after yytext and yyleng
1213 * have been set up.
1214 */
1215#ifndef YY_USER_ACTION
1216#define YY_USER_ACTION
1217#endif
1218
1219/* Code executed at the end of each rule. */
1220#ifndef YY_BREAK
1221#define YY_BREAK /*LINTED*/break;
1222#endif
1223
1224#define YY_RULE_SETUP \
1225 YY_USER_ACTION
1226
1227/** The main scanner function which does all the work.
1228 */
1230{
1231 yy_state_type yy_current_state;
1232 char *yy_cp, *yy_bp;
1233 int yy_act;
1234 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1235
1236 yylval = yylval_param;
1237
1238 if ( !yyg->yy_init )
1239 {
1240 yyg->yy_init = 1;
1241
1242#ifdef YY_USER_INIT
1243 YY_USER_INIT;
1244#endif
1245
1246 if ( ! yyg->yy_start )
1247 yyg->yy_start = 1; /* first start state */
1248
1249 if ( ! yyin )
1250 yyin = stdin;
1251
1252 if ( ! yyout )
1253 yyout = stdout;
1254
1255 if ( ! YY_CURRENT_BUFFER ) {
1256 yyensure_buffer_stack (yyscanner);
1258 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
1259 }
1260
1261 yy_load_buffer_state( yyscanner );
1262 }
1263
1264 {
1265#line 95 "libinterp/corefcn/oct-tex-lexer.ll"
1266
1267
1268
1269#line 99 "libinterp/corefcn/oct-tex-lexer.ll"
1270// Numeric values.
1271
1272
1273#line 1274 "libinterp/corefcn/oct-tex-lexer.cc"
1274
1275 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1276 {
1277 yy_cp = yyg->yy_c_buf_p;
1278
1279 /* Support of yytext. */
1280 *yy_cp = yyg->yy_hold_char;
1281
1282 /* yy_bp points to the position in yy_ch_buf of the start of
1283 * the current run.
1284 */
1285 yy_bp = yy_cp;
1286
1287 yy_current_state = yyg->yy_start;
1288yy_match:
1289 do
1290 {
1291 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1292 if ( yy_accept[yy_current_state] )
1293 {
1294 yyg->yy_last_accepting_state = yy_current_state;
1295 yyg->yy_last_accepting_cpos = yy_cp;
1296 }
1297 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1298 {
1299 yy_current_state = (int) yy_def[yy_current_state];
1300 if ( yy_current_state >= 465 )
1301 yy_c = yy_meta[yy_c];
1302 }
1303 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1304 ++yy_cp;
1305 }
1306 while ( yy_base[yy_current_state] != 483 );
1307
1308yy_find_action:
1309 yy_act = yy_accept[yy_current_state];
1310 if ( yy_act == 0 )
1311 { /* have to back up */
1312 yy_cp = yyg->yy_last_accepting_cpos;
1313 yy_current_state = yyg->yy_last_accepting_state;
1314 yy_act = yy_accept[yy_current_state];
1315 }
1316
1318
1319do_action: /* This label is used only to access EOF actions. */
1320
1321 switch ( yy_act )
1322 { /* beginning of action switch */
1323 case 0: /* must back up */
1324 /* undo the effects of YY_DO_BEFORE_ACTION */
1325 *yy_cp = yyg->yy_hold_char;
1326 yy_cp = yyg->yy_last_accepting_cpos;
1327 yy_current_state = yyg->yy_last_accepting_state;
1328 goto yy_find_action;
1329
1330case 1:
1332#line 102 "libinterp/corefcn/oct-tex-lexer.ll"
1333{
1334 int nread = sscanf (yytext, "%lf", &(yylval->num));
1335
1336 if (nread == 1)
1337 return NUM;
1338 }
1339 YY_BREAK
1340case 2:
1342#line 109 "libinterp/corefcn/oct-tex-lexer.ll"
1343{ }
1344 YY_BREAK
1345case 3:
1346/* rule 3 can match eol */
1348#line 111 "libinterp/corefcn/oct-tex-lexer.ll"
1349{
1350 yyless (0);
1351 BEGIN (INITIAL);
1352 }
1353 YY_BREAK
1354case 4:
1356#line 116 "libinterp/corefcn/oct-tex-lexer.ll"
1357{
1358 BEGIN (NUM_MODE);
1359 return START;
1360 }
1361 YY_BREAK
1362case 5:
1363/* rule 5 can match eol */
1365#line 121 "libinterp/corefcn/oct-tex-lexer.ll"
1366{
1367 yyless (0);
1368 BEGIN (INITIAL);
1369 }
1370 YY_BREAK
1371
1372// Simple commands.
1373
1374case 6:
1376#line 130 "libinterp/corefcn/oct-tex-lexer.ll"
1377{ return BF; }
1378 YY_BREAK
1379case 7:
1381#line 131 "libinterp/corefcn/oct-tex-lexer.ll"
1382{ return IT; }
1383 YY_BREAK
1384case 8:
1386#line 132 "libinterp/corefcn/oct-tex-lexer.ll"
1387{ return SL; }
1388 YY_BREAK
1389case 9:
1391#line 133 "libinterp/corefcn/oct-tex-lexer.ll"
1392{ return RM; }
1393 YY_BREAK
1394
1395// Generic font commands.
1396
1397case 10:
1399#line 139 "libinterp/corefcn/oct-tex-lexer.ll"
1400{ return FONTNAME; }
1401 YY_BREAK
1402case 11:
1404#line 141 "libinterp/corefcn/oct-tex-lexer.ll"
1405{
1407 return FONTSIZE;
1408 }
1409 YY_BREAK
1410case 12:
1412#line 146 "libinterp/corefcn/oct-tex-lexer.ll"
1413{
1415 return COLOR_RGB;
1416 }
1417 YY_BREAK
1418case 13:
1420#line 151 "libinterp/corefcn/oct-tex-lexer.ll"
1421{ return COLOR; }
1422 YY_BREAK
1423
1424// Special characters.
1425
1426case 14:
1428#line 157 "libinterp/corefcn/oct-tex-lexer.ll"
1429{ return START; }
1430 YY_BREAK
1431case 15:
1433#line 158 "libinterp/corefcn/oct-tex-lexer.ll"
1434{ return END; }
1435 YY_BREAK
1436case 16:
1438#line 159 "libinterp/corefcn/oct-tex-lexer.ll"
1439{ return SUPER; }
1440 YY_BREAK
1441case 17:
1443#line 160 "libinterp/corefcn/oct-tex-lexer.ll"
1444{ return SUB; }
1445 YY_BREAK
1446case 18:
1447#line 163 "libinterp/corefcn/oct-tex-lexer.ll"
1448case 19:
1449#line 164 "libinterp/corefcn/oct-tex-lexer.ll"
1450case 20:
1451#line 165 "libinterp/corefcn/oct-tex-lexer.ll"
1452case 21:
1453#line 166 "libinterp/corefcn/oct-tex-lexer.ll"
1454case 22:
1456#line 166 "libinterp/corefcn/oct-tex-lexer.ll"
1457{
1458 yylval->ch = yytext[1];
1459 return CH;
1460 }
1461 YY_BREAK
1462
1463// Symbols.
1464
1465case 23:
1467#line 175 "libinterp/corefcn/oct-tex-lexer.ll"
1468{ yylval->sym = 0; return SYM; }
1469 YY_BREAK
1470case 24:
1472#line 176 "libinterp/corefcn/oct-tex-lexer.ll"
1473{ yylval->sym = 1; return SYM; }
1474 YY_BREAK
1475case 25:
1477#line 177 "libinterp/corefcn/oct-tex-lexer.ll"
1478{ yylval->sym = 2; return SYM; }
1479 YY_BREAK
1480case 26:
1482#line 178 "libinterp/corefcn/oct-tex-lexer.ll"
1483{ yylval->sym = 3; return SYM; }
1484 YY_BREAK
1485case 27:
1487#line 179 "libinterp/corefcn/oct-tex-lexer.ll"
1488{ yylval->sym = 4; return SYM; }
1489 YY_BREAK
1490case 28:
1492#line 180 "libinterp/corefcn/oct-tex-lexer.ll"
1493{ yylval->sym = 5; return SYM; }
1494 YY_BREAK
1495case 29:
1497#line 181 "libinterp/corefcn/oct-tex-lexer.ll"
1498{ yylval->sym = 6; return SYM; }
1499 YY_BREAK
1500case 30:
1502#line 182 "libinterp/corefcn/oct-tex-lexer.ll"
1503{ yylval->sym = 7; return SYM; }
1504 YY_BREAK
1505case 31:
1507#line 183 "libinterp/corefcn/oct-tex-lexer.ll"
1508{ yylval->sym = 8; return SYM; }
1509 YY_BREAK
1510case 32:
1512#line 184 "libinterp/corefcn/oct-tex-lexer.ll"
1513{ yylval->sym = 9; return SYM; }
1514 YY_BREAK
1515case 33:
1517#line 185 "libinterp/corefcn/oct-tex-lexer.ll"
1518{ yylval->sym = 10; return SYM; }
1519 YY_BREAK
1520case 34:
1522#line 186 "libinterp/corefcn/oct-tex-lexer.ll"
1523{ yylval->sym = 11; return SYM; }
1524 YY_BREAK
1525case 35:
1527#line 187 "libinterp/corefcn/oct-tex-lexer.ll"
1528{ yylval->sym = 12; return SYM; }
1529 YY_BREAK
1530case 36:
1532#line 188 "libinterp/corefcn/oct-tex-lexer.ll"
1533{ yylval->sym = 13; return SYM; }
1534 YY_BREAK
1535case 37:
1537#line 189 "libinterp/corefcn/oct-tex-lexer.ll"
1538{ yylval->sym = 14; return SYM; }
1539 YY_BREAK
1540case 38:
1542#line 190 "libinterp/corefcn/oct-tex-lexer.ll"
1543{ yylval->sym = 15; return SYM; }
1544 YY_BREAK
1545case 39:
1547#line 191 "libinterp/corefcn/oct-tex-lexer.ll"
1548{ yylval->sym = 16; return SYM; }
1549 YY_BREAK
1550case 40:
1552#line 192 "libinterp/corefcn/oct-tex-lexer.ll"
1553{ yylval->sym = 17; return SYM; }
1554 YY_BREAK
1555case 41:
1557#line 193 "libinterp/corefcn/oct-tex-lexer.ll"
1558{ yylval->sym = 18; return SYM; }
1559 YY_BREAK
1560case 42:
1562#line 194 "libinterp/corefcn/oct-tex-lexer.ll"
1563{ yylval->sym = 19; return SYM; }
1564 YY_BREAK
1565case 43:
1567#line 195 "libinterp/corefcn/oct-tex-lexer.ll"
1568{ yylval->sym = 20; return SYM; }
1569 YY_BREAK
1570case 44:
1572#line 196 "libinterp/corefcn/oct-tex-lexer.ll"
1573{ yylval->sym = 21; return SYM; }
1574 YY_BREAK
1575case 45:
1577#line 197 "libinterp/corefcn/oct-tex-lexer.ll"
1578{ yylval->sym = 22; return SYM; }
1579 YY_BREAK
1580case 46:
1582#line 198 "libinterp/corefcn/oct-tex-lexer.ll"
1583{ yylval->sym = 23; return SYM; }
1584 YY_BREAK
1585case 47:
1587#line 199 "libinterp/corefcn/oct-tex-lexer.ll"
1588{ yylval->sym = 24; return SYM; }
1589 YY_BREAK
1590case 48:
1592#line 200 "libinterp/corefcn/oct-tex-lexer.ll"
1593{ yylval->sym = 25; return SYM; }
1594 YY_BREAK
1595case 49:
1597#line 201 "libinterp/corefcn/oct-tex-lexer.ll"
1598{ yylval->sym = 26; return SYM; }
1599 YY_BREAK
1600case 50:
1602#line 202 "libinterp/corefcn/oct-tex-lexer.ll"
1603{ yylval->sym = 27; return SYM; }
1604 YY_BREAK
1605case 51:
1607#line 203 "libinterp/corefcn/oct-tex-lexer.ll"
1608{ yylval->sym = 28; return SYM; }
1609 YY_BREAK
1610case 52:
1612#line 204 "libinterp/corefcn/oct-tex-lexer.ll"
1613{ yylval->sym = 29; return SYM; }
1614 YY_BREAK
1615case 53:
1617#line 205 "libinterp/corefcn/oct-tex-lexer.ll"
1618{ yylval->sym = 30; return SYM; }
1619 YY_BREAK
1620case 54:
1622#line 206 "libinterp/corefcn/oct-tex-lexer.ll"
1623{ yylval->sym = 31; return SYM; }
1624 YY_BREAK
1625case 55:
1627#line 207 "libinterp/corefcn/oct-tex-lexer.ll"
1628{ yylval->sym = 32; return SYM; }
1629 YY_BREAK
1630case 56:
1632#line 208 "libinterp/corefcn/oct-tex-lexer.ll"
1633{ yylval->sym = 33; return SYM; }
1634 YY_BREAK
1635case 57:
1637#line 209 "libinterp/corefcn/oct-tex-lexer.ll"
1638{ yylval->sym = 34; return SYM; }
1639 YY_BREAK
1640case 58:
1642#line 210 "libinterp/corefcn/oct-tex-lexer.ll"
1643{ yylval->sym = 35; return SYM; }
1644 YY_BREAK
1645case 59:
1647#line 211 "libinterp/corefcn/oct-tex-lexer.ll"
1648{ yylval->sym = 36; return SYM; }
1649 YY_BREAK
1650case 60:
1652#line 212 "libinterp/corefcn/oct-tex-lexer.ll"
1653{ yylval->sym = 37; return SYM; }
1654 YY_BREAK
1655case 61:
1657#line 213 "libinterp/corefcn/oct-tex-lexer.ll"
1658{ yylval->sym = 38; return SYM; }
1659 YY_BREAK
1660case 62:
1662#line 214 "libinterp/corefcn/oct-tex-lexer.ll"
1663{ yylval->sym = 39; return SYM; }
1664 YY_BREAK
1665case 63:
1667#line 215 "libinterp/corefcn/oct-tex-lexer.ll"
1668{ yylval->sym = 40; return SYM; }
1669 YY_BREAK
1670case 64:
1672#line 216 "libinterp/corefcn/oct-tex-lexer.ll"
1673{ yylval->sym = 41; return SYM; }
1674 YY_BREAK
1675case 65:
1677#line 217 "libinterp/corefcn/oct-tex-lexer.ll"
1678{ yylval->sym = 42; return SYM; }
1679 YY_BREAK
1680case 66:
1682#line 218 "libinterp/corefcn/oct-tex-lexer.ll"
1683{ yylval->sym = 43; return SYM; }
1684 YY_BREAK
1685case 67:
1687#line 219 "libinterp/corefcn/oct-tex-lexer.ll"
1688{ yylval->sym = 44; return SYM; }
1689 YY_BREAK
1690case 68:
1692#line 220 "libinterp/corefcn/oct-tex-lexer.ll"
1693{ yylval->sym = 45; return SYM; }
1694 YY_BREAK
1695case 69:
1697#line 221 "libinterp/corefcn/oct-tex-lexer.ll"
1698{ yylval->sym = 46; return SYM; }
1699 YY_BREAK
1700case 70:
1702#line 222 "libinterp/corefcn/oct-tex-lexer.ll"
1703{ yylval->sym = 47; return SYM; }
1704 YY_BREAK
1705case 71:
1707#line 223 "libinterp/corefcn/oct-tex-lexer.ll"
1708{ yylval->sym = 48; return SYM; }
1709 YY_BREAK
1710case 72:
1712#line 224 "libinterp/corefcn/oct-tex-lexer.ll"
1713{ yylval->sym = 49; return SYM; }
1714 YY_BREAK
1715case 73:
1717#line 225 "libinterp/corefcn/oct-tex-lexer.ll"
1718{ yylval->sym = 50; return SYM; }
1719 YY_BREAK
1720case 74:
1722#line 226 "libinterp/corefcn/oct-tex-lexer.ll"
1723{ yylval->sym = 51; return SYM; }
1724 YY_BREAK
1725case 75:
1727#line 227 "libinterp/corefcn/oct-tex-lexer.ll"
1728{ yylval->sym = 52; return SYM; }
1729 YY_BREAK
1730case 76:
1732#line 228 "libinterp/corefcn/oct-tex-lexer.ll"
1733{ yylval->sym = 53; return SYM; }
1734 YY_BREAK
1735case 77:
1737#line 229 "libinterp/corefcn/oct-tex-lexer.ll"
1738{ yylval->sym = 54; return SYM; }
1739 YY_BREAK
1740case 78:
1742#line 230 "libinterp/corefcn/oct-tex-lexer.ll"
1743{ yylval->sym = 55; return SYM; }
1744 YY_BREAK
1745case 79:
1747#line 231 "libinterp/corefcn/oct-tex-lexer.ll"
1748{ yylval->sym = 56; return SYM; }
1749 YY_BREAK
1750case 80:
1752#line 232 "libinterp/corefcn/oct-tex-lexer.ll"
1753{ yylval->sym = 57; return SYM; }
1754 YY_BREAK
1755case 81:
1757#line 233 "libinterp/corefcn/oct-tex-lexer.ll"
1758{ yylval->sym = 58; return SYM; }
1759 YY_BREAK
1760case 82:
1762#line 234 "libinterp/corefcn/oct-tex-lexer.ll"
1763{ yylval->sym = 59; return SYM; }
1764 YY_BREAK
1765case 83:
1767#line 235 "libinterp/corefcn/oct-tex-lexer.ll"
1768{ yylval->sym = 60; return SYM; }
1769 YY_BREAK
1770case 84:
1772#line 236 "libinterp/corefcn/oct-tex-lexer.ll"
1773{ yylval->sym = 61; return SYM; }
1774 YY_BREAK
1775case 85:
1777#line 237 "libinterp/corefcn/oct-tex-lexer.ll"
1778{ yylval->sym = 62; return SYM; }
1779 YY_BREAK
1780case 86:
1782#line 238 "libinterp/corefcn/oct-tex-lexer.ll"
1783{ yylval->sym = 63; return SYM; }
1784 YY_BREAK
1785case 87:
1787#line 239 "libinterp/corefcn/oct-tex-lexer.ll"
1788{ yylval->sym = 64; return SYM; }
1789 YY_BREAK
1790case 88:
1792#line 240 "libinterp/corefcn/oct-tex-lexer.ll"
1793{ yylval->sym = 65; return SYM; }
1794 YY_BREAK
1795case 89:
1797#line 241 "libinterp/corefcn/oct-tex-lexer.ll"
1798{ yylval->sym = 66; return SYM; }
1799 YY_BREAK
1800case 90:
1802#line 242 "libinterp/corefcn/oct-tex-lexer.ll"
1803{ yylval->sym = 67; return SYM; }
1804 YY_BREAK
1805case 91:
1807#line 243 "libinterp/corefcn/oct-tex-lexer.ll"
1808{ yylval->sym = 68; return SYM; }
1809 YY_BREAK
1810case 92:
1812#line 244 "libinterp/corefcn/oct-tex-lexer.ll"
1813{ yylval->sym = 69; return SYM; }
1814 YY_BREAK
1815case 93:
1817#line 245 "libinterp/corefcn/oct-tex-lexer.ll"
1818{ yylval->sym = 70; return SYM; }
1819 YY_BREAK
1820case 94:
1822#line 246 "libinterp/corefcn/oct-tex-lexer.ll"
1823{ yylval->sym = 71; return SYM; }
1824 YY_BREAK
1825case 95:
1827#line 247 "libinterp/corefcn/oct-tex-lexer.ll"
1828{ yylval->sym = 72; return SYM; }
1829 YY_BREAK
1830case 96:
1832#line 248 "libinterp/corefcn/oct-tex-lexer.ll"
1833{ yylval->sym = 73; return SYM; }
1834 YY_BREAK
1835case 97:
1837#line 249 "libinterp/corefcn/oct-tex-lexer.ll"
1838{ yylval->sym = 74; return SYM; }
1839 YY_BREAK
1840case 98:
1842#line 250 "libinterp/corefcn/oct-tex-lexer.ll"
1843{ yylval->sym = 75; return SYM; }
1844 YY_BREAK
1845case 99:
1847#line 251 "libinterp/corefcn/oct-tex-lexer.ll"
1848{ yylval->sym = 76; return SYM; }
1849 YY_BREAK
1850case 100:
1852#line 252 "libinterp/corefcn/oct-tex-lexer.ll"
1853{ yylval->sym = 77; return SYM; }
1854 YY_BREAK
1855case 101:
1857#line 253 "libinterp/corefcn/oct-tex-lexer.ll"
1858{ yylval->sym = 78; return SYM; }
1859 YY_BREAK
1860case 102:
1862#line 254 "libinterp/corefcn/oct-tex-lexer.ll"
1863{ yylval->sym = 79; return SYM; }
1864 YY_BREAK
1865case 103:
1867#line 255 "libinterp/corefcn/oct-tex-lexer.ll"
1868{ yylval->sym = 80; return SYM; }
1869 YY_BREAK
1870case 104:
1872#line 256 "libinterp/corefcn/oct-tex-lexer.ll"
1873{ yylval->sym = 81; return SYM; }
1874 YY_BREAK
1875case 105:
1877#line 257 "libinterp/corefcn/oct-tex-lexer.ll"
1878{ yylval->sym = 82; return SYM; }
1879 YY_BREAK
1880case 106:
1882#line 258 "libinterp/corefcn/oct-tex-lexer.ll"
1883{ yylval->sym = 83; return SYM; }
1884 YY_BREAK
1885case 107:
1887#line 259 "libinterp/corefcn/oct-tex-lexer.ll"
1888{ yylval->sym = 84; return SYM; }
1889 YY_BREAK
1890case 108:
1892#line 260 "libinterp/corefcn/oct-tex-lexer.ll"
1893{ yylval->sym = 85; return SYM; }
1894 YY_BREAK
1895case 109:
1897#line 261 "libinterp/corefcn/oct-tex-lexer.ll"
1898{ yylval->sym = 86; return SYM; }
1899 YY_BREAK
1900case 110:
1902#line 262 "libinterp/corefcn/oct-tex-lexer.ll"
1903{ yylval->sym = 87; return SYM; }
1904 YY_BREAK
1905case 111:
1907#line 263 "libinterp/corefcn/oct-tex-lexer.ll"
1908{ yylval->sym = 88; return SYM; }
1909 YY_BREAK
1910case 112:
1912#line 264 "libinterp/corefcn/oct-tex-lexer.ll"
1913{ yylval->sym = 89; return SYM; }
1914 YY_BREAK
1915case 113:
1917#line 265 "libinterp/corefcn/oct-tex-lexer.ll"
1918{ yylval->sym = 90; return SYM; }
1919 YY_BREAK
1920case 114:
1922#line 266 "libinterp/corefcn/oct-tex-lexer.ll"
1923{ yylval->sym = 91; return SYM; }
1924 YY_BREAK
1925case 115:
1927#line 267 "libinterp/corefcn/oct-tex-lexer.ll"
1928{ yylval->sym = 92; return SYM; }
1929 YY_BREAK
1930case 116:
1932#line 268 "libinterp/corefcn/oct-tex-lexer.ll"
1933{ yylval->sym = 93; return SYM; }
1934 YY_BREAK
1935case 117:
1937#line 269 "libinterp/corefcn/oct-tex-lexer.ll"
1938{ yylval->sym = 94; return SYM; }
1939 YY_BREAK
1940case 118:
1942#line 270 "libinterp/corefcn/oct-tex-lexer.ll"
1943{ yylval->sym = 95; return SYM; }
1944 YY_BREAK
1945case 119:
1947#line 271 "libinterp/corefcn/oct-tex-lexer.ll"
1948{ yylval->sym = 96; return SYM; }
1949 YY_BREAK
1950case 120:
1952#line 272 "libinterp/corefcn/oct-tex-lexer.ll"
1953{ yylval->sym = 97; return SYM; }
1954 YY_BREAK
1955case 121:
1957#line 273 "libinterp/corefcn/oct-tex-lexer.ll"
1958{ yylval->sym = 98; return SYM; }
1959 YY_BREAK
1960case 122:
1962#line 274 "libinterp/corefcn/oct-tex-lexer.ll"
1963{ yylval->sym = 99; return SYM; }
1964 YY_BREAK
1965case 123:
1967#line 275 "libinterp/corefcn/oct-tex-lexer.ll"
1968{ yylval->sym = 100; return SYM; }
1969 YY_BREAK
1970case 124:
1972#line 276 "libinterp/corefcn/oct-tex-lexer.ll"
1973{ yylval->sym = 101; return SYM; }
1974 YY_BREAK
1975case 125:
1977#line 277 "libinterp/corefcn/oct-tex-lexer.ll"
1978{ yylval->sym = 102; return SYM; }
1979 YY_BREAK
1980
1981// Generic character.
1982
1983case 126:
1984/* rule 126 can match eol */
1985#line 284 "libinterp/corefcn/oct-tex-lexer.ll"
1986case 127:
1987/* rule 127 can match eol */
1989#line 284 "libinterp/corefcn/oct-tex-lexer.ll"
1990{
1991 yylval->ch = yytext[0];
1992 return CH;
1993 }
1994 YY_BREAK
1995
1996#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
1997 // Also disable this warning for functions that are generated by flex
1998 // after the pattern rules.
1999# pragma GCC diagnostic ignored "-Wunused-parameter"
2000#endif
2001
2002case 128:
2004#line 297 "libinterp/corefcn/oct-tex-lexer.ll"
2005ECHO;
2006 YY_BREAK
2007#line 2008 "libinterp/corefcn/oct-tex-lexer.cc"
2008case YY_STATE_EOF(INITIAL):
2011 yyterminate();
2012
2013 case YY_END_OF_BUFFER:
2014 {
2015 /* Amount of text matched not including the EOB char. */
2016 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
2017
2018 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2019 *yy_cp = yyg->yy_hold_char;
2021
2022 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2023 {
2024 /* We're scanning a new file or input source. It's
2025 * possible that this happened because the user
2026 * just pointed yyin at a new source and called
2027 * yylex(). If so, then we have to assure
2028 * consistency between YY_CURRENT_BUFFER and our
2029 * globals. Here is the right place to do so, because
2030 * this is the first action (other than possibly a
2031 * back-up) that will match for the new input source.
2032 */
2033 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2034 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2035 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2036 }
2037
2038 /* Note that here we test for yy_c_buf_p "<=" to the position
2039 * of the first EOB in the buffer, since yy_c_buf_p will
2040 * already have been incremented past the NUL character
2041 * (since all states make transitions on EOB to the
2042 * end-of-buffer state). Contrast this with the test
2043 * in input().
2044 */
2045 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2046 { /* This was really a NUL. */
2047 yy_state_type yy_next_state;
2048
2049 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
2050
2051 yy_current_state = yy_get_previous_state( yyscanner );
2052
2053 /* Okay, we're now positioned to make the NUL
2054 * transition. We couldn't have
2055 * yy_get_previous_state() go ahead and do it
2056 * for us because it doesn't know how to deal
2057 * with the possibility of jamming (and we don't
2058 * want to build jamming into it because then it
2059 * will run more slowly).
2060 */
2061
2062 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
2063
2064 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2065
2066 if ( yy_next_state )
2067 {
2068 /* Consume the NUL. */
2069 yy_cp = ++yyg->yy_c_buf_p;
2070 yy_current_state = yy_next_state;
2071 goto yy_match;
2072 }
2073
2074 else
2075 {
2076 yy_cp = yyg->yy_c_buf_p;
2077 goto yy_find_action;
2078 }
2079 }
2080
2081 else switch ( yy_get_next_buffer( yyscanner ) )
2082 {
2084 {
2085 yyg->yy_did_buffer_switch_on_eof = 0;
2086
2087 if ( yywrap( yyscanner ) )
2088 {
2089 /* Note: because we've taken care in
2090 * yy_get_next_buffer() to have set up
2091 * yytext, we can now set up
2092 * yy_c_buf_p so that if some total
2093 * hoser (like flex itself) wants to
2094 * call the scanner after we return the
2095 * YY_NULL, it'll still work - another
2096 * YY_NULL will get returned.
2097 */
2098 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
2099
2100 yy_act = YY_STATE_EOF(YY_START);
2101 goto do_action;
2102 }
2103
2104 else
2105 {
2106 if ( ! yyg->yy_did_buffer_switch_on_eof )
2108 }
2109 break;
2110 }
2111
2113 yyg->yy_c_buf_p =
2114 yyg->yytext_ptr + yy_amount_of_matched_text;
2115
2116 yy_current_state = yy_get_previous_state( yyscanner );
2117
2118 yy_cp = yyg->yy_c_buf_p;
2119 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2120 goto yy_match;
2121
2122 case EOB_ACT_LAST_MATCH:
2123 yyg->yy_c_buf_p =
2124 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
2125
2126 yy_current_state = yy_get_previous_state( yyscanner );
2127
2128 yy_cp = yyg->yy_c_buf_p;
2129 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2130 goto yy_find_action;
2131 }
2132 break;
2133 }
2134
2135 default:
2137 "fatal flex scanner internal error--no action found" );
2138 } /* end of action switch */
2139 } /* end of scanning one token */
2140 } /* end of user's declarations */
2141} /* end of yylex */
2142
2143/* yy_get_next_buffer - try to read in a new buffer
2144 *
2145 * Returns a code representing an action:
2146 * EOB_ACT_LAST_MATCH -
2147 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2148 * EOB_ACT_END_OF_FILE - end of file
2149 */
2150static int yy_get_next_buffer (yyscan_t yyscanner)
2151{
2152 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2153 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2154 char *source = yyg->yytext_ptr;
2155 int number_to_move, i;
2156 int ret_val;
2157
2158 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
2160 "fatal flex scanner internal error--end of buffer missed" );
2161
2162 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2163 { /* Don't try to fill the buffer, so this is an EOF. */
2164 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
2165 {
2166 /* We matched a single character, the EOB, so
2167 * treat this as a final EOF.
2168 */
2169 return EOB_ACT_END_OF_FILE;
2170 }
2171
2172 else
2173 {
2174 /* We matched some text prior to the EOB, first
2175 * process it.
2176 */
2177 return EOB_ACT_LAST_MATCH;
2178 }
2179 }
2180
2181 /* Try to read more data. */
2182
2183 /* First move last chars to start of buffer. */
2184 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
2185
2186 for ( i = 0; i < number_to_move; ++i )
2187 *(dest++) = *(source++);
2188
2189 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2190 /* don't do the read, it's not guaranteed to return an EOF,
2191 * just force an EOF
2192 */
2193 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
2194
2195 else
2196 {
2197 int num_to_read =
2198 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2199
2200 while ( num_to_read <= 0 )
2201 { /* Not enough room in the buffer - grow it. */
2202
2203 /* just a shorter name for the current buffer */
2205
2206 int yy_c_buf_p_offset =
2207 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
2208
2209 if ( b->yy_is_our_buffer )
2210 {
2211 int new_size = b->yy_buf_size * 2;
2212
2213 if ( new_size <= 0 )
2214 b->yy_buf_size += b->yy_buf_size / 8;
2215 else
2216 b->yy_buf_size *= 2;
2217
2218 b->yy_ch_buf = (char *)
2219 /* Include room in for 2 EOB chars. */
2220 yyrealloc( (void *) b->yy_ch_buf,
2221 (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
2222 }
2223 else
2224 /* Can't grow it, we don't own it. */
2225 b->yy_ch_buf = NULL;
2226
2227 if ( ! b->yy_ch_buf )
2229 "fatal error - scanner input buffer overflow" );
2230
2231 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2232
2233 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2234 number_to_move - 1;
2235
2236 }
2237
2238 if ( num_to_read > YY_READ_BUF_SIZE )
2239 num_to_read = YY_READ_BUF_SIZE;
2240
2241 /* Read in more data. */
2242 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2243 yyg->yy_n_chars, num_to_read );
2244
2245 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2246 }
2247
2248 if ( yyg->yy_n_chars == 0 )
2249 {
2250 if ( number_to_move == YY_MORE_ADJ )
2251 {
2252 ret_val = EOB_ACT_END_OF_FILE;
2253 yyrestart( yyin , yyscanner);
2254 }
2255
2256 else
2257 {
2258 ret_val = EOB_ACT_LAST_MATCH;
2259 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2261 }
2262 }
2263
2264 else
2265 ret_val = EOB_ACT_CONTINUE_SCAN;
2266
2267 if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2268 /* Extend the array by 50%, plus the number we really need. */
2269 int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
2270 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
2271 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
2272 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2273 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2274 /* "- 2" to take care of EOB's */
2275 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
2276 }
2277
2278 yyg->yy_n_chars += number_to_move;
2279 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2280 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2281
2282 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2283
2284 return ret_val;
2285}
2286
2287/* yy_get_previous_state - get the state just before the EOB char was reached */
2288
2289 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
2290{
2291 yy_state_type yy_current_state;
2292 char *yy_cp;
2293 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2294
2295 yy_current_state = yyg->yy_start;
2296
2297 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
2298 {
2299 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2300 if ( yy_accept[yy_current_state] )
2301 {
2302 yyg->yy_last_accepting_state = yy_current_state;
2303 yyg->yy_last_accepting_cpos = yy_cp;
2304 }
2305 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2306 {
2307 yy_current_state = (int) yy_def[yy_current_state];
2308 if ( yy_current_state >= 465 )
2309 yy_c = yy_meta[yy_c];
2310 }
2311 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2312 }
2313
2314 return yy_current_state;
2315}
2316
2317/* yy_try_NUL_trans - try to make a transition on the NUL character
2318 *
2319 * synopsis
2320 * next_state = yy_try_NUL_trans( current_state );
2321 */
2322 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
2323{
2324 int yy_is_jam;
2325 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
2326 char *yy_cp = yyg->yy_c_buf_p;
2327
2328 YY_CHAR yy_c = 1;
2329 if ( yy_accept[yy_current_state] )
2330 {
2331 yyg->yy_last_accepting_state = yy_current_state;
2332 yyg->yy_last_accepting_cpos = yy_cp;
2333 }
2334 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2335 {
2336 yy_current_state = (int) yy_def[yy_current_state];
2337 if ( yy_current_state >= 465 )
2338 yy_c = yy_meta[yy_c];
2339 }
2340 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2341 yy_is_jam = (yy_current_state == 464);
2342
2343 (void)yyg;
2344 return yy_is_jam ? 0 : yy_current_state;
2345}
2346
2347#ifndef YY_NO_UNPUT
2348
2349 static void yyunput (int c, char * yy_bp , yyscan_t yyscanner)
2350{
2351 char *yy_cp;
2352 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2353
2354 yy_cp = yyg->yy_c_buf_p;
2355
2356 /* undo effects of setting up yytext */
2357 *yy_cp = yyg->yy_hold_char;
2358
2359 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2360 { /* need to shift things up to make room */
2361 /* +2 for EOB chars. */
2362 int number_to_move = yyg->yy_n_chars + 2;
2363 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2364 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2365 char *source =
2366 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2367
2368 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2369 *--dest = *--source;
2370
2371 yy_cp += (int) (dest - source);
2372 yy_bp += (int) (dest - source);
2373 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2374 yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2375
2376 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2377 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2378 }
2379
2380 *--yy_cp = (char) c;
2381
2382 yyg->yytext_ptr = yy_bp;
2383 yyg->yy_hold_char = *yy_cp;
2384 yyg->yy_c_buf_p = yy_cp;
2385}
2386
2387#endif
2388
2389#ifndef YY_NO_INPUT
2390#ifdef __cplusplus
2391 static int yyinput (yyscan_t yyscanner)
2392#else
2393 static int input (yyscan_t yyscanner)
2394#endif
2395
2396{
2397 int c;
2398 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2399
2400 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2401
2402 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2403 {
2404 /* yy_c_buf_p now points to the character we want to return.
2405 * If this occurs *before* the EOB characters, then it's a
2406 * valid NUL; if not, then we've hit the end of the buffer.
2407 */
2408 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2409 /* This was really a NUL. */
2410 *yyg->yy_c_buf_p = '\0';
2411
2412 else
2413 { /* need more input */
2414 int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
2415 ++yyg->yy_c_buf_p;
2416
2417 switch ( yy_get_next_buffer( yyscanner ) )
2418 {
2419 case EOB_ACT_LAST_MATCH:
2420 /* This happens because yy_g_n_b()
2421 * sees that we've accumulated a
2422 * token and flags that we need to
2423 * try matching the token before
2424 * proceeding. But for input(),
2425 * there's no matching to consider.
2426 * So convert the EOB_ACT_LAST_MATCH
2427 * to EOB_ACT_END_OF_FILE.
2428 */
2429
2430 /* Reset buffer status. */
2431 yyrestart( yyin , yyscanner);
2432
2433 /*FALLTHROUGH*/
2434
2436 {
2437 if ( yywrap( yyscanner ) )
2438 return 0;
2439
2440 if ( ! yyg->yy_did_buffer_switch_on_eof )
2442#ifdef __cplusplus
2443 return yyinput(yyscanner);
2444#else
2445 return input(yyscanner);
2446#endif
2447 }
2448
2450 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
2451 break;
2452 }
2453 }
2454 }
2455
2456 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
2457 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
2458 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
2459
2460 return c;
2461}
2462#endif /* ifndef YY_NO_INPUT */
2463
2464/** Immediately switch to a different input stream.
2465 * @param input_file A readable stream.
2466 * @param yyscanner The scanner object.
2467 * @note This function does not reset the start condition to @c INITIAL .
2468 */
2469 void yyrestart (FILE * input_file , yyscan_t yyscanner)
2470{
2471 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2472
2473 if ( ! YY_CURRENT_BUFFER ){
2474 yyensure_buffer_stack (yyscanner);
2476 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
2477 }
2478
2479 yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
2480 yy_load_buffer_state( yyscanner );
2481}
2482
2483/** Switch to a different input buffer.
2484 * @param new_buffer The new input buffer.
2485 * @param yyscanner The scanner object.
2486 */
2487 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2488{
2489 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2490
2491 /* TODO. We should be able to replace this entire function body
2492 * with
2493 * yypop_buffer_state();
2494 * yypush_buffer_state(new_buffer);
2495 */
2496 yyensure_buffer_stack (yyscanner);
2497 if ( YY_CURRENT_BUFFER == new_buffer )
2498 return;
2499
2500 if ( YY_CURRENT_BUFFER )
2501 {
2502 /* Flush out information for old buffer. */
2503 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2504 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2505 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2506 }
2507
2508 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2509 yy_load_buffer_state( yyscanner );
2510
2511 /* We don't actually know whether we did this switch during
2512 * EOF (yywrap()) processing, but the only time this flag
2513 * is looked at is after yywrap() is called, so it's safe
2514 * to go ahead and always set it.
2515 */
2516 yyg->yy_did_buffer_switch_on_eof = 1;
2517}
2518
2519static void yy_load_buffer_state (yyscan_t yyscanner)
2520{
2521 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2522 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2523 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2524 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2525 yyg->yy_hold_char = *yyg->yy_c_buf_p;
2526}
2527
2528/** Allocate and initialize an input buffer state.
2529 * @param file A readable stream.
2530 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2531 * @param yyscanner The scanner object.
2532 * @return the allocated buffer state.
2533 */
2534 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
2535{
2537
2538 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
2539 if ( ! b )
2540 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2541
2542 b->yy_buf_size = size;
2543
2544 /* yy_ch_buf has to be 2 characters longer than the size given because
2545 * we need to put in 2 end-of-buffer characters.
2546 */
2547 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
2548 if ( ! b->yy_ch_buf )
2549 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2550
2551 b->yy_is_our_buffer = 1;
2552
2553 yy_init_buffer( b, file , yyscanner);
2554
2555 return b;
2556}
2557
2558/** Destroy the buffer.
2559 * @param b a buffer created with yy_create_buffer()
2560 * @param yyscanner The scanner object.
2561 */
2563{
2564 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2565
2566 if ( ! b )
2567 return;
2568
2569 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2571
2572 if ( b->yy_is_our_buffer )
2573 yyfree( (void *) b->yy_ch_buf , yyscanner );
2574
2575 yyfree( (void *) b , yyscanner );
2576}
2577
2578/* Initializes or reinitializes a buffer.
2579 * This function is sometimes called more than once on the same buffer,
2580 * such as during a yyrestart() or at EOF.
2581 */
2582 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
2583
2584{
2585 int oerrno = errno;
2586 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2587
2588 yy_flush_buffer( b , yyscanner);
2589
2590 b->yy_input_file = file;
2591 b->yy_fill_buffer = 1;
2592
2593 /* If b is the current buffer, then yy_init_buffer was _probably_
2594 * called from yyrestart() or through yy_get_next_buffer.
2595 * In that case, we don't want to reset the lineno or column.
2596 */
2597 if (b != YY_CURRENT_BUFFER){
2598 b->yy_bs_lineno = 1;
2599 b->yy_bs_column = 0;
2600 }
2601
2602 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2603
2604 errno = oerrno;
2605}
2606
2607/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2608 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2609 * @param yyscanner The scanner object.
2610 */
2612{
2613 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2614 if ( ! b )
2615 return;
2616
2617 b->yy_n_chars = 0;
2618
2619 /* We always need two end-of-buffer characters. The first causes
2620 * a transition to the end-of-buffer state. The second causes
2621 * a jam in that state.
2622 */
2623 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2624 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2625
2626 b->yy_buf_pos = &b->yy_ch_buf[0];
2627
2628 b->yy_at_bol = 1;
2629 b->yy_buffer_status = YY_BUFFER_NEW;
2630
2631 if ( b == YY_CURRENT_BUFFER )
2632 yy_load_buffer_state( yyscanner );
2633}
2634
2635/** Pushes the new state onto the stack. The new state becomes
2636 * the current state. This function will allocate the stack
2637 * if necessary.
2638 * @param new_buffer The new state.
2639 * @param yyscanner The scanner object.
2640 */
2641void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2642{
2643 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2644 if (new_buffer == NULL)
2645 return;
2646
2647 yyensure_buffer_stack(yyscanner);
2648
2649 /* This block is copied from yy_switch_to_buffer. */
2650 if ( YY_CURRENT_BUFFER )
2651 {
2652 /* Flush out information for old buffer. */
2653 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2654 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2655 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2656 }
2657
2658 /* Only push if top exists. Otherwise, replace top. */
2660 yyg->yy_buffer_stack_top++;
2661 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2662
2663 /* copied from yy_switch_to_buffer. */
2664 yy_load_buffer_state( yyscanner );
2665 yyg->yy_did_buffer_switch_on_eof = 1;
2666}
2667
2668/** Removes and deletes the top of the stack, if present.
2669 * The next element becomes the new top.
2670 * @param yyscanner The scanner object.
2671 */
2673{
2674 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2675 if (!YY_CURRENT_BUFFER)
2676 return;
2677
2680 if (yyg->yy_buffer_stack_top > 0)
2681 --yyg->yy_buffer_stack_top;
2682
2683 if (YY_CURRENT_BUFFER) {
2684 yy_load_buffer_state( yyscanner );
2685 yyg->yy_did_buffer_switch_on_eof = 1;
2686 }
2687}
2688
2689/* Allocates the stack if it does not exist.
2690 * Guarantees space for at least one push.
2691 */
2692static void yyensure_buffer_stack (yyscan_t yyscanner)
2693{
2694 yy_size_t num_to_alloc;
2695 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2696
2697 if (!yyg->yy_buffer_stack) {
2698
2699 /* First allocation is just for 2 elements, since we don't know if this
2700 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2701 * immediate realloc on the next call.
2702 */
2703 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2704 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
2705 (num_to_alloc * sizeof(struct yy_buffer_state*)
2706 , yyscanner);
2707 if ( ! yyg->yy_buffer_stack )
2708 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2709
2710 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2711
2712 yyg->yy_buffer_stack_max = num_to_alloc;
2713 yyg->yy_buffer_stack_top = 0;
2714 return;
2715 }
2716
2717 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
2718
2719 /* Increase the buffer to prepare for a possible push. */
2720 yy_size_t grow_size = 8 /* arbitrary grow size */;
2721
2722 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
2723 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
2724 (yyg->yy_buffer_stack,
2725 num_to_alloc * sizeof(struct yy_buffer_state*)
2726 , yyscanner);
2727 if ( ! yyg->yy_buffer_stack )
2728 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2729
2730 /* zero only the new slots.*/
2731 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
2732 yyg->yy_buffer_stack_max = num_to_alloc;
2733 }
2734}
2735
2736/** Setup the input buffer state to scan directly from a user-specified character buffer.
2737 * @param base the character buffer
2738 * @param size the size in bytes of the character buffer
2739 * @param yyscanner The scanner object.
2740 * @return the newly allocated buffer state object.
2741 */
2742YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
2743{
2745
2746 if ( size < 2 ||
2747 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2748 base[size-1] != YY_END_OF_BUFFER_CHAR )
2749 /* They forgot to leave room for the EOB's. */
2750 return NULL;
2751
2752 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
2753 if ( ! b )
2754 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2755
2756 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
2757 b->yy_buf_pos = b->yy_ch_buf = base;
2758 b->yy_is_our_buffer = 0;
2759 b->yy_input_file = NULL;
2760 b->yy_n_chars = b->yy_buf_size;
2761 b->yy_is_interactive = 0;
2762 b->yy_at_bol = 1;
2763 b->yy_fill_buffer = 0;
2764 b->yy_buffer_status = YY_BUFFER_NEW;
2765
2766 yy_switch_to_buffer( b , yyscanner );
2767
2768 return b;
2769}
2770
2771/** Setup the input buffer state to scan a string. The next call to yylex() will
2772 * scan from a @e copy of @a str.
2773 * @param yystr a NUL-terminated string to scan
2774 * @param yyscanner The scanner object.
2775 * @return the newly allocated buffer state object.
2776 * @note If you want to scan bytes that may contain NUL values, then use
2777 * yy_scan_bytes() instead.
2778 */
2779YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
2780{
2781
2782 return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
2783}
2784
2785/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2786 * scan from a @e copy of @a bytes.
2787 * @param yybytes the byte buffer to scan
2788 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2789 * @param yyscanner The scanner object.
2790 * @return the newly allocated buffer state object.
2791 */
2792YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
2793{
2795 char *buf;
2796 yy_size_t n;
2797 int i;
2798
2799 /* Get memory for full buffer, including space for trailing EOB's. */
2800 n = (yy_size_t) (_yybytes_len + 2);
2801 buf = (char *) yyalloc( n , yyscanner );
2802 if ( ! buf )
2803 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2804
2805 for ( i = 0; i < _yybytes_len; ++i )
2806 buf[i] = yybytes[i];
2807
2808 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2809
2810 b = yy_scan_buffer( buf, n , yyscanner);
2811 if ( ! b )
2812 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2813
2814 /* It's okay to grow etc. this buffer, and we should throw it
2815 * away when we're done.
2816 */
2817 b->yy_is_our_buffer = 1;
2818
2819 return b;
2820}
2821
2822#ifndef YY_EXIT_FAILURE
2823#define YY_EXIT_FAILURE 2
2824#endif
2825
2826static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
2827{
2828 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2829 (void)yyg;
2830 fprintf( stderr, "%s\n", msg );
2831 exit( YY_EXIT_FAILURE );
2832}
2833
2834/* Redefine yyless() so it works in section 3 code. */
2835
2836#undef yyless
2837#define yyless(n) \
2838 do \
2839 { \
2840 /* Undo effects of setting up yytext. */ \
2841 int yyless_macro_arg = (n); \
2842 YY_LESS_LINENO(yyless_macro_arg);\
2843 yytext[yyleng] = yyg->yy_hold_char; \
2844 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2845 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2846 *yyg->yy_c_buf_p = '\0'; \
2847 yyleng = yyless_macro_arg; \
2848 } \
2849 while ( 0 )
2850
2851/* Accessor methods (get/set functions) to struct members. */
2852
2853/** Get the user-defined data for this scanner.
2854 * @param yyscanner The scanner object.
2855 */
2857{
2858 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2859 return yyextra;
2860}
2861
2862/** Get the current line number.
2863 * @param yyscanner The scanner object.
2864 */
2865int yyget_lineno (yyscan_t yyscanner)
2866{
2867 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2868
2869 if (! YY_CURRENT_BUFFER)
2870 return 0;
2871
2872 return yylineno;
2873}
2874
2875/** Get the current column number.
2876 * @param yyscanner The scanner object.
2877 */
2878int yyget_column (yyscan_t yyscanner)
2879{
2880 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2881
2882 if (! YY_CURRENT_BUFFER)
2883 return 0;
2884
2885 return yycolumn;
2886}
2887
2888/** Get the input stream.
2889 * @param yyscanner The scanner object.
2890 */
2891FILE *yyget_in (yyscan_t yyscanner)
2892{
2893 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2894 return yyin;
2895}
2896
2897/** Get the output stream.
2898 * @param yyscanner The scanner object.
2899 */
2900FILE *yyget_out (yyscan_t yyscanner)
2901{
2902 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2903 return yyout;
2904}
2905
2906/** Get the length of the current token.
2907 * @param yyscanner The scanner object.
2908 */
2909int yyget_leng (yyscan_t yyscanner)
2910{
2911 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2912 return yyleng;
2913}
2914
2915/** Get the current token.
2916 * @param yyscanner The scanner object.
2917 */
2918
2919char *yyget_text (yyscan_t yyscanner)
2920{
2921 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2922 return yytext;
2923}
2924
2925/** Set the user-defined data. This data is never touched by the scanner.
2926 * @param user_defined The data to be associated with this scanner.
2927 * @param yyscanner The scanner object.
2928 */
2929void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
2930{
2931 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2932 yyextra = user_defined ;
2933}
2934
2935/** Set the current line number.
2936 * @param _line_number line number
2937 * @param yyscanner The scanner object.
2938 */
2939void yyset_lineno (int _line_number , yyscan_t yyscanner)
2940{
2941 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2942
2943 /* lineno is only valid if an input buffer exists. */
2944 if (! YY_CURRENT_BUFFER )
2945 YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
2946
2947 yylineno = _line_number;
2948}
2949
2950/** Set the current column.
2951 * @param _column_no column number
2952 * @param yyscanner The scanner object.
2953 */
2954void yyset_column (int _column_no , yyscan_t yyscanner)
2955{
2956 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2957
2958 /* column is only valid if an input buffer exists. */
2959 if (! YY_CURRENT_BUFFER )
2960 YY_FATAL_ERROR( "yyset_column called with no buffer" );
2961
2962 yycolumn = _column_no;
2963}
2964
2965/** Set the input stream. This does not discard the current
2966 * input buffer.
2967 * @param _in_str A readable stream.
2968 * @param yyscanner The scanner object.
2969 * @see yy_switch_to_buffer
2970 */
2971void yyset_in (FILE * _in_str , yyscan_t yyscanner)
2972{
2973 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2974 yyin = _in_str ;
2975}
2976
2977void yyset_out (FILE * _out_str , yyscan_t yyscanner)
2978{
2979 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2980 yyout = _out_str ;
2981}
2982
2983int yyget_debug (yyscan_t yyscanner)
2984{
2985 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2986 return yy_flex_debug;
2987}
2988
2989void yyset_debug (int _bdebug , yyscan_t yyscanner)
2990{
2991 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2992 yy_flex_debug = _bdebug ;
2993}
2994
2995/* Accessor methods for yylval and yylloc */
2996
2998{
2999 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3000 return yylval;
3001}
3002
3003void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
3004{
3005 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3006 yylval = yylval_param;
3007}
3008
3009/* User-visible API */
3010
3011/* yylex_init is special because it creates the scanner itself, so it is
3012 * the ONLY reentrant function that doesn't take the scanner as the last argument.
3013 * That's why we explicitly handle the declaration, instead of using our macros.
3014 */
3015int yylex_init(yyscan_t* ptr_yy_globals)
3016{
3017 if (ptr_yy_globals == NULL){
3018 errno = EINVAL;
3019 return 1;
3020 }
3021
3022 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
3023
3024 if (*ptr_yy_globals == NULL){
3025 errno = ENOMEM;
3026 return 1;
3027 }
3028
3029 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
3030 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
3031
3032 return yy_init_globals ( *ptr_yy_globals );
3033}
3034
3035/* yylex_init_extra has the same functionality as yylex_init, but follows the
3036 * convention of taking the scanner as the last argument. Note however, that
3037 * this is a *pointer* to a scanner, as it will be allocated by this call (and
3038 * is the reason, too, why this function also must handle its own declaration).
3039 * The user defined value in the first argument will be available to yyalloc in
3040 * the yyextra field.
3041 */
3042int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
3043{
3044 struct yyguts_t dummy_yyguts;
3045
3046 yyset_extra (yy_user_defined, &dummy_yyguts);
3047
3048 if (ptr_yy_globals == NULL){
3049 errno = EINVAL;
3050 return 1;
3051 }
3052
3053 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
3054
3055 if (*ptr_yy_globals == NULL){
3056 errno = ENOMEM;
3057 return 1;
3058 }
3059
3060 /* By setting to 0xAA, we expose bugs in
3061 yy_init_globals. Leave at 0x00 for releases. */
3062 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
3063
3064 yyset_extra (yy_user_defined, *ptr_yy_globals);
3065
3066 return yy_init_globals ( *ptr_yy_globals );
3067}
3068
3069static int yy_init_globals (yyscan_t yyscanner)
3070{
3071 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3072 /* Initialization is the same as for the non-reentrant scanner.
3073 * This function is called from yylex_destroy(), so don't allocate here.
3074 */
3075
3076 yyg->yy_buffer_stack = NULL;
3077 yyg->yy_buffer_stack_top = 0;
3078 yyg->yy_buffer_stack_max = 0;
3079 yyg->yy_c_buf_p = NULL;
3080 yyg->yy_init = 0;
3081 yyg->yy_start = 0;
3082
3083 yyg->yy_start_stack_ptr = 0;
3084 yyg->yy_start_stack_depth = 0;
3085 yyg->yy_start_stack = NULL;
3086
3087/* Defined in main.c */
3088#ifdef YY_STDINIT
3089 yyin = stdin;
3090 yyout = stdout;
3091#else
3092 yyin = NULL;
3093 yyout = NULL;
3094#endif
3095
3096 /* For future reference: Set errno on error, since we are called by
3097 * yylex_init()
3098 */
3099 return 0;
3100}
3101
3102/* yylex_destroy is for both reentrant and non-reentrant scanners. */
3104{
3105 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3106
3107 /* Pop the buffer stack, destroying each element. */
3108 while(YY_CURRENT_BUFFER){
3109 yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
3111 yypop_buffer_state(yyscanner);
3112 }
3113
3114 /* Destroy the stack itself. */
3115 yyfree(yyg->yy_buffer_stack , yyscanner);
3116 yyg->yy_buffer_stack = NULL;
3117
3118 /* Destroy the start condition stack. */
3119 yyfree( yyg->yy_start_stack , yyscanner );
3120 yyg->yy_start_stack = NULL;
3121
3122 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3123 * yylex() is called, initialization will occur. */
3124 yy_init_globals( yyscanner);
3125
3126 /* Destroy the main struct (reentrant only). */
3127 yyfree ( yyscanner , yyscanner );
3128 yyscanner = NULL;
3129 return 0;
3130}
3131
3132/*
3133 * Internal utility routines.
3134 */
3135
3136#ifndef yytext_ptr
3137static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
3138{
3139 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3140 (void)yyg;
3141
3142 int i;
3143 for ( i = 0; i < n; ++i )
3144 s1[i] = s2[i];
3145}
3146#endif
3147
3148#ifdef YY_NEED_STRLEN
3149static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
3150{
3151 int n;
3152 for ( n = 0; s[n]; ++n )
3153 ;
3154
3155 return n;
3156}
3157#endif
3158
3159#define YYTABLES_NAME "yytables"
3160
3161#line 297 "libinterp/corefcn/oct-tex-lexer.ll"
3162
3163
3164#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
3165 // Restore prevailing warning state for remainder of the file.
3166# pragma GCC diagnostic pop
3167#endif
3168
3169void *
3171{
3172 return malloc (size);
3173}
3174
3175void *
3177{
3178return realloc (ptr, size);
3179}
3180
3181void
3183{
3184 free (ptr);
3185}
3186
3188
3189bool text_parser_tex::init_lexer (const std::string& s)
3190{
3191 if (! m_scanner)
3193
3194 if (m_scanner)
3195 {
3196 if (m_buffer_state)
3197 {
3198 octave_tex__delete_buffer (reinterpret_cast<YY_BUFFER_STATE> (m_buffer_state),
3199 m_scanner);
3200 m_buffer_state = nullptr;
3201 }
3202
3203 m_buffer_state = octave_tex__scan_bytes (s.data (), s.length (),
3204 m_scanner);
3205 }
3206
3207 return (m_scanner && m_buffer_state);
3208}
3209
3210void text_parser_tex::destroy_lexer ()
3211{
3212 if (m_buffer_state)
3213 {
3214 octave_tex__delete_buffer (reinterpret_cast<YY_BUFFER_STATE> (m_buffer_state),
3215 m_scanner);
3216 m_buffer_state = nullptr;
3217 }
3218
3219 if (m_scanner)
3220 {
3222 m_scanner = nullptr;
3223 }
3224}
3225
3226OCTAVE_END_NAMESPACE(octave)
3227
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
#define scanner
Definition oct-parse.cc:152
T::size_type strlen(const typename T::value_type *str)
Definition oct-string.cc:95
#define yy_load_buffer_state
#define YY_NEW_FILE
#define yyset_extra
#define yytext
#define yyget_lval
#define yyget_column
unsigned char flex_uint8_t
#define yyset_lineno
#define yyset_lval
void * yyscan_t
#define yylex_init
#define yyrestart
#define yyset_debug
#define YY_EXTRA_TYPE
#define YYSTYPE
void octave_tex__delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner)
Destroy the buffer.
short int flex_int16_t
#define yy_flex_debug
#define yyget_out
unsigned int flex_uint32_t
void * octave_tex_realloc(void *, yy_size_t, yyscan_t yyscanner)
#define yy_scan_bytes
#define YY_BREAK
#define yylex_init_extra
int octave_tex_lex_init(yyscan_t *scanner)
#define yynoreturn
#define yyget_debug
#define yypush_buffer_state
struct yy_buffer_state * YY_BUFFER_STATE
#define yyfree
#define yyout
#define YY_BUFFER_NEW
#define yyget_lineno
#define yylex
#define YY_RESTORE_YY_MORE_OFFSET
#define yywrap
void * octave_tex_alloc(yy_size_t, yyscan_t yyscanner)
#define yyget_text
#define YY_BUFFER_NORMAL
#define yyensure_buffer_stack
#define yy_scan_buffer
#define YY_MORE_ADJ
#define YY_RULE_SETUP
#define yy_scan_string
#define yyextra
int octave_tex_lex_destroy(yyscan_t yyscanner)
#define yylval
signed char flex_int8_t
#define yyget_leng
#define EOB_ACT_END_OF_FILE
#define yyalloc
#define yypop_buffer_state
#define YY_CURRENT_BUFFER_LVALUE
int flex_int32_t
#define yylex_destroy
#define YY_START
#define yyset_column
#define yy_switch_to_buffer
int yy_state_type
#define YY_CURRENT_BUFFER
#define yy_init_buffer
#define INITIAL
#define yyget_extra
#define yyin
#define MAYBE_NUM_MODE
#define YY_READ_BUF_SIZE
#define YY_INPUT(buf, result, max_size)
#define ECHO
#define yy_flush_buffer
#define yyrealloc
#define YY_END_OF_BUFFER
#define YY_STATE_EOF(state)
#define BEGIN
#define YY_END_OF_BUFFER_CHAR
#define YY_FATAL_ERROR(msg)
#define yyterminate()
unsigned short int flex_uint16_t
#define yy_create_buffer
flex_uint8_t YY_CHAR
#define YY_DO_BEFORE_ACTION
#define yy_delete_buffer
#define EOB_ACT_LAST_MATCH
#define yyget_in
size_t yy_size_t
#define YY_BUFFER_EOF_PENDING
#define yylineno
#define yyguts_t
#define yycolumn
void octave_tex_free(void *, yyscan_t yyscanner)
#define yyset_out
#define EOB_ACT_CONTINUE_SCAN
#define YY_DECL
#define yyless(n)
#define YY_BUF_SIZE
#define YY_EXIT_FAILURE
#define isatty
#define NUM_MODE
#define YY_SC_TO_UI(c)
YY_BUFFER_STATE octave_tex__scan_bytes(const char *bytes, int len, yyscan_t yyscanner)
Setup the input buffer state to scan the given bytes.
#define yyleng
#define yyset_in
void * malloc(unsigned)
#define m_scanner
void free(void *)
@ SUB
@ START
@ FONTSIZE
@ NUM
@ CH
@ BF
@ SYM
@ COLOR
@ RM
@ SL
@ FONTNAME
@ END
@ COLOR_RGB
@ IT
@ SUPER
F77_RET_T len
Definition xerbla.cc:61