GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
oct-tex-parser.cc
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 3.0.2. */
2 
3 /* Bison implementation for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
6 
7  This program is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 
20 /* As a special exception, you may create a larger work that contains
21  part or all of the Bison parser skeleton and distribute that work
22  under terms of your choice, so long as that work isn't itself a
23  parser generator using the skeleton or a modified version thereof
24  as a parser skeleton. Alternatively, if you modify or redistribute
25  the parser skeleton itself, you may (at your option) remove this
26  special exception, which will cause the skeleton and the resulting
27  Bison output files to be licensed under the GNU General Public
28  License without this special exception.
29 
30  This special exception was added by the Free Software Foundation in
31  version 2.2 of Bison. */
32 
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34  simplifying the original so-called "semantic" parser. */
35 
36 /* All symbols defined below should begin with yy or YY, to avoid
37  infringing on user name space. This should be done even for local
38  variables, as they might otherwise be expanded by user macros.
39  There are some unavoidable exceptions within include files to
40  define necessary library symbols; they are noted "INFRINGES ON
41  USER NAME SPACE" below. */
42 
43 /* Identify Bison output. */
44 #define YYBISON 1
45 
46 /* Bison version. */
47 #define YYBISON_VERSION "3.0.2"
48 
49 /* Skeleton name. */
50 #define YYSKELETON_NAME "yacc.c"
51 
52 /* Pure parsers. */
53 #define YYPURE 1
54 
55 /* Push parsers. */
56 #define YYPUSH 0
57 
58 /* Pull parsers. */
59 #define YYPULL 1
60 
61 /* Substitute the type names. */
62 #define YYSTYPE OCTAVE_TEX_STYPE
63 /* Substitute the variable and function names. */
64 #define yyparse octave_tex_parse
65 #define yylex octave_tex_lex
66 #define yyerror octave_tex_error
67 #define yydebug octave_tex_debug
68 #define yynerrs octave_tex_nerrs
69 
70 
71 /* Copy the first part of user declarations. */
72 #line 23 "corefcn/oct-tex-parser.yy" /* yacc.c:339 */
73 
74 #define YYDEBUG 1
75 
76 #ifdef HAVE_CONFIG_H
77 #include <config.h>
78 #endif
79 
80 #include "txt-eng.h"
81 #include "oct-tex-parser.h"
82 
83 extern int octave_tex_lex (YYSTYPE *, void *);
84 static void yyerror (text_parser_tex& parser, const char *s);
85 
86 #if defined (GNULIB_NAMESPACE)
87 // Calls to the following functions appear in the generated output from
88 // Bison without the namespace tag. Redefine them so we will use them
89 // via the gnulib namespace.
90 #define fclose GNULIB_NAMESPACE::fclose
91 #define fprintf GNULIB_NAMESPACE::fprintf
92 #define malloc GNULIB_NAMESPACE::malloc
93 #endif
94 
95 #define scanner parser.get_scanner ()
96 
97 #line 98 "corefcn/oct-tex-parser.cc" /* yacc.c:339 */
98 
99 # ifndef YY_NULLPTR
100 # if defined __cplusplus && 201103L <= __cplusplus
101 # define YY_NULLPTR nullptr
102 # else
103 # define YY_NULLPTR 0
104 # endif
105 # endif
106 
107 /* Enabling verbose error messages. */
108 #ifdef YYERROR_VERBOSE
109 # undef YYERROR_VERBOSE
110 # define YYERROR_VERBOSE 1
111 #else
112 # define YYERROR_VERBOSE 0
113 #endif
114 
115 /* In a future release of Bison, this section will be replaced
116  by #include "y.tab.h". */
117 #ifndef YY_OCTAVE_TEX_COREFCN_OCT_TEX_PARSER_H_INCLUDED
118 # define YY_OCTAVE_TEX_COREFCN_OCT_TEX_PARSER_H_INCLUDED
119 /* Debug traces. */
120 #ifndef OCTAVE_TEX_DEBUG
121 # if defined YYDEBUG
122 #if YYDEBUG
123 # define OCTAVE_TEX_DEBUG 1
124 # else
125 # define OCTAVE_TEX_DEBUG 0
126 # endif
127 # else /* ! defined YYDEBUG */
128 # define OCTAVE_TEX_DEBUG 0
129 # endif /* ! defined YYDEBUG */
130 #endif /* ! defined OCTAVE_TEX_DEBUG */
131 #if OCTAVE_TEX_DEBUG
132 extern int octave_tex_debug;
133 #endif
134 /* "%code requires" blocks. */
135 #line 54 "corefcn/oct-tex-parser.yy" /* yacc.c:355 */
136 #include <string>
137 
138 #line 139 "corefcn/oct-tex-parser.cc" /* yacc.c:355 */
139 
140 /* Token type. */
141 #ifndef OCTAVE_TEX_TOKENTYPE
142 # define OCTAVE_TEX_TOKENTYPE
144  {
145  BF = 258,
146  IT = 259,
147  SL = 260,
148  RM = 261,
149  FONTNAME = 262,
150  FONTSIZE = 263,
151  COLOR = 264,
152  COLOR_RGB = 265,
153  START = 266,
154  END = 267,
155  SUPER = 268,
156  SUB = 269,
157  CH = 270,
158  NUM = 271,
159  SYM = 272,
160  SCRIPT = 273,
161  STR = 274
162  };
163 #endif
164 /* Tokens. */
165 #define BF 258
166 #define IT 259
167 #define SL 260
168 #define RM 261
169 #define FONTNAME 262
170 #define FONTSIZE 263
171 #define COLOR 264
172 #define COLOR_RGB 265
173 #define START 266
174 #define END 267
175 #define SUPER 268
176 #define SUB 269
177 #define CH 270
178 #define NUM 271
179 #define SYM 272
180 #define SCRIPT 273
181 #define STR 274
182 
183 /* Value type. */
184 #if ! defined OCTAVE_TEX_STYPE && ! defined OCTAVE_TEX_STYPE_IS_DECLARED
185 typedef union OCTAVE_TEX_STYPE OCTAVE_TEX_STYPE;
186 union OCTAVE_TEX_STYPE
187 {
188 #line 56 "corefcn/oct-tex-parser.yy" /* yacc.c:355 */
189 
190  /* Leaf symbols produced by the scanner */
191  char ch;
192  double num;
193  int sym;
194 
195  /* Used for string buffering */
196  std::string* str;
197 
198  /* Objects produced by the parser */
201 
202 #line 203 "corefcn/oct-tex-parser.cc" /* yacc.c:355 */
203 };
204 # define OCTAVE_TEX_STYPE_IS_TRIVIAL 1
205 # define OCTAVE_TEX_STYPE_IS_DECLARED 1
206 #endif
207 
208 
209 
211 
212 #endif /* !YY_OCTAVE_TEX_COREFCN_OCT_TEX_PARSER_H_INCLUDED */
213 
214 /* Copy the second part of user declarations. */
215 
216 #line 217 "corefcn/oct-tex-parser.cc" /* yacc.c:358 */
217 
218 #ifdef short
219 # undef short
220 #endif
221 
222 #ifdef YYTYPE_UINT8
223 typedef YYTYPE_UINT8 yytype_uint8;
224 #else
225 typedef unsigned char yytype_uint8;
226 #endif
227 
228 #ifdef YYTYPE_INT8
229 typedef YYTYPE_INT8 yytype_int8;
230 #else
231 typedef signed char yytype_int8;
232 #endif
233 
234 #ifdef YYTYPE_UINT16
235 typedef YYTYPE_UINT16 yytype_uint16;
236 #else
237 typedef unsigned short int yytype_uint16;
238 #endif
239 
240 #ifdef YYTYPE_INT16
241 typedef YYTYPE_INT16 yytype_int16;
242 #else
243 typedef short int yytype_int16;
244 #endif
245 
246 #ifndef YYSIZE_T
247 # ifdef __SIZE_TYPE__
248 # define YYSIZE_T __SIZE_TYPE__
249 # elif defined size_t
250 # define YYSIZE_T size_t
251 # elif ! defined YYSIZE_T
252 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
253 # define YYSIZE_T size_t
254 # else
255 # define YYSIZE_T unsigned int
256 # endif
257 #endif
258 
259 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
260 
261 #ifndef YY_
262 # if defined YYENABLE_NLS && YYENABLE_NLS
263 # if ENABLE_NLS
264 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
265 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
266 # endif
267 # endif
268 # ifndef YY_
269 # define YY_(Msgid) Msgid
270 # endif
271 #endif
272 
273 #ifndef YY_ATTRIBUTE
274 # if (defined __GNUC__ \
275  && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
276  || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
277 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
278 # else
279 # define YY_ATTRIBUTE(Spec) /* empty */
280 # endif
281 #endif
282 
283 #ifndef YY_ATTRIBUTE_PURE
284 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
285 #endif
286 
287 #ifndef YY_ATTRIBUTE_UNUSED
288 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
289 #endif
290 
291 #if !defined _Noreturn \
292  && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
293 # if defined _MSC_VER && 1200 <= _MSC_VER
294 # define _Noreturn __declspec (noreturn)
295 # else
296 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
297 # endif
298 #endif
299 
300 /* Suppress unused-variable warnings by "using" E. */
301 #if ! defined lint || defined __GNUC__
302 # define YYUSE(E) ((void) (E))
303 #else
304 # define YYUSE(E) /* empty */
305 #endif
306 
307 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
308 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
309 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
310  _Pragma ("GCC diagnostic push") \
311  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
312  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
313 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
314  _Pragma ("GCC diagnostic pop")
315 #else
316 # define YY_INITIAL_VALUE(Value) Value
317 #endif
318 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
319 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
320 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
321 #endif
322 #ifndef YY_INITIAL_VALUE
323 # define YY_INITIAL_VALUE(Value) /* Nothing. */
324 #endif
325 
326 
327 #if ! defined yyoverflow || YYERROR_VERBOSE
328 
329 /* The parser invokes alloca or malloc; define the necessary symbols. */
330 
331 # ifdef YYSTACK_USE_ALLOCA
332 # if YYSTACK_USE_ALLOCA
333 # ifdef __GNUC__
334 # define YYSTACK_ALLOC __builtin_alloca
335 # elif defined __BUILTIN_VA_ARG_INCR
336 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
337 # elif defined _AIX
338 # define YYSTACK_ALLOC __alloca
339 # elif defined _MSC_VER
340 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
341 # define alloca _alloca
342 # else
343 # define YYSTACK_ALLOC alloca
344 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
345 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
346  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
347 # ifndef EXIT_SUCCESS
348 # define EXIT_SUCCESS 0
349 # endif
350 # endif
351 # endif
352 # endif
353 # endif
354 
355 # ifdef YYSTACK_ALLOC
356  /* Pacify GCC's 'empty if-body' warning. */
357 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
358 # ifndef YYSTACK_ALLOC_MAXIMUM
359  /* The OS might guarantee only one guard page at the bottom of the stack,
360  and a page size can be as small as 4096 bytes. So we cannot safely
361  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
362  to allow for a few compiler-allocated temporary stack slots. */
363 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
364 # endif
365 # else
366 # define YYSTACK_ALLOC YYMALLOC
367 # define YYSTACK_FREE YYFREE
368 # ifndef YYSTACK_ALLOC_MAXIMUM
369 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
370 # endif
371 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
372  && ! ((defined YYMALLOC || defined malloc) \
373  && (defined YYFREE || defined free)))
374 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
375 # ifndef EXIT_SUCCESS
376 # define EXIT_SUCCESS 0
377 # endif
378 # endif
379 # ifndef YYMALLOC
380 # define YYMALLOC malloc
381 # if ! defined malloc && ! defined EXIT_SUCCESS
382 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
383 # endif
384 # endif
385 # ifndef YYFREE
386 # define YYFREE free
387 # if ! defined free && ! defined EXIT_SUCCESS
388 void free (void *); /* INFRINGES ON USER NAME SPACE */
389 # endif
390 # endif
391 # endif
392 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
393 
394 
395 #if (! defined yyoverflow \
396  && (! defined __cplusplus \
397  || (defined OCTAVE_TEX_STYPE_IS_TRIVIAL && OCTAVE_TEX_STYPE_IS_TRIVIAL)))
398 
399 /* A type that is properly aligned for any stack member. */
400 union yyalloc
401 {
404 };
405 
406 /* The size of the maximum gap between one aligned stack and the next. */
407 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
408 
409 /* The size of an array large to enough to hold all stacks, each with
410  N elements. */
411 # define YYSTACK_BYTES(N) \
412  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
413  + YYSTACK_GAP_MAXIMUM)
414 
415 # define YYCOPY_NEEDED 1
416 
417 /* Relocate STACK from its old location to the new one. The
418  local variables YYSIZE and YYSTACKSIZE give the old and new number of
419  elements in the stack, and YYPTR gives the new location of the
420  stack. Advance YYPTR to a properly aligned location for the next
421  stack. */
422 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
423  do \
424  { \
425  YYSIZE_T yynewbytes; \
426  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
427  Stack = &yyptr->Stack_alloc; \
428  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
429  yyptr += yynewbytes / sizeof (*yyptr); \
430  } \
431  while (0)
432 
433 #endif
434 
435 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
436 /* Copy COUNT objects from SRC to DST. The source and destination do
437  not overlap. */
438 # ifndef YYCOPY
439 # if defined __GNUC__ && 1 < __GNUC__
440 # define YYCOPY(Dst, Src, Count) \
441  __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
442 # else
443 # define YYCOPY(Dst, Src, Count) \
444  do \
445  { \
446  YYSIZE_T yyi; \
447  for (yyi = 0; yyi < (Count); yyi++) \
448  (Dst)[yyi] = (Src)[yyi]; \
449  } \
450  while (0)
451 # endif
452 # endif
453 #endif /* !YYCOPY_NEEDED */
454 
455 /* YYFINAL -- State number of the termination state. */
456 #define YYFINAL 43
457 /* YYLAST -- Last index in YYTABLE. */
458 #define YYLAST 81
459 
460 /* YYNTOKENS -- Number of terminals. */
461 #define YYNTOKENS 20
462 /* YYNNTS -- Number of nonterminals. */
463 #define YYNNTS 14
464 /* YYNRULES -- Number of rules. */
465 #define YYNRULES 36
466 /* YYNSTATES -- Number of states. */
467 #define YYNSTATES 55
468 
469 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
470  by yylex, with out-of-bounds checking. */
471 #define YYUNDEFTOK 2
472 #define YYMAXUTOK 274
473 
474 #define YYTRANSLATE(YYX) \
475  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
476 
477 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
478  as returned by yylex, without out-of-bounds checking. */
479 static const yytype_uint8 yytranslate[] =
480 {
481  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
482  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
483  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
484  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
485  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
486  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
487  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
488  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
489  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
490  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
491  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
492  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
493  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
494  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
495  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
496  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
497  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
498  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
499  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
500  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
501  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
502  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
503  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
504  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
505  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
506  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
507  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
508  15, 16, 17, 18, 19
509 };
510 
511 #if OCTAVE_TEX_DEBUG
512  /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
513 static const yytype_uint8 yyrline[] =
514 {
515  0, 98, 98, 100, 104, 108, 110, 112, 114, 118,
516  122, 129, 134, 140, 145, 148, 149, 150, 151, 152,
517  153, 154, 155, 158, 160, 162, 166, 168, 170, 174,
518  176, 180, 182, 186, 188, 193, 194
519 };
520 #endif
521 
522 #if OCTAVE_TEX_DEBUG || YYERROR_VERBOSE || 0
523 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
524  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
525 static const char *const yytname[] =
526 {
527  "$end", "error", "$undefined", "BF", "IT", "SL", "RM", "FONTNAME",
528  "FONTSIZE", "COLOR", "COLOR_RGB", "START", "END", "SUPER", "SUB", "CH",
529  "NUM", "SYM", "SCRIPT", "STR", "$accept", "simple_string",
530  "symbol_element", "font_modifier_element", "fontsize_element",
531  "fontname_element", "color_element", "string_element",
532  "superscript_element", "subscript_element", "combined_script_element",
533  "string_element_list", "scoped_string_element_list", "string", YY_NULLPTR
534 };
535 #endif
536 
537 # ifdef YYPRINT
538 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
539  (internal) symbol number NUM (which must be that of a token). */
540 static const yytype_uint16 yytoknum[] =
541 {
542  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
543  265, 266, 267, 268, 269, 270, 271, 272, 273, 274
544 };
545 # endif
546 
547 #define YYPACT_NINF -4
548 
549 #define yypact_value_is_default(Yystate) \
550  (!!((Yystate) == (-4)))
551 
552 #define YYTABLE_NINF -1
553 
554 #define yytable_value_is_error(Yytable_value) \
555  0
556 
557  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
558  STATE-NUM. */
559 static const yytype_int8 yypact[] =
560 {
561  27, -4, -4, -4, -4, 2, 17, 32, 37, -3,
562  34, 35, -4, -4, 40, -4, -4, -4, -4, -4,
563  -4, 45, 52, -4, 27, -4, 66, 54, 55, 54,
564  56, -4, 12, -4, -4, -4, -4, -4, -4, -4,
565  -4, -4, -4, -4, 41, 58, 42, 57, -4, -4,
566  -4, -4, 59, 62, -4
567 };
568 
569  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
570  Performed when YYTABLE does not specify something else to do. Zero
571  means the default is an error. */
572 static const yytype_uint8 yydefact[] =
573 {
574  35, 5, 6, 7, 8, 0, 0, 0, 0, 0,
575  0, 0, 2, 4, 13, 15, 16, 17, 18, 19,
576  31, 20, 21, 22, 36, 14, 0, 0, 0, 0,
577  0, 34, 0, 23, 25, 24, 26, 28, 27, 3,
578  30, 29, 32, 1, 0, 0, 0, 0, 33, 10,
579  9, 11, 0, 0, 12
580 };
581 
582  /* YYPGOTO[NTERM-NUM]. */
583 static const yytype_int8 yypgoto[] =
584 {
585  -4, 31, 51, -4, -4, -4, -4, 15, 46, 60,
586  -4, 67, 53, -4
587 };
588 
589  /* YYDEFGOTO[NTERM-NUM]. */
590 static const yytype_int8 yydefgoto[] =
591 {
592  -1, 14, 15, 16, 17, 18, 19, 20, 21, 22,
593  23, 24, 25, 26
594 };
595 
596  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
597  positive, shift that token. If negative, reduce the rule whose
598  number is the opposite. If YYTABLE_NINF, syntax error. */
599 static const yytype_uint8 yytable[] =
600 {
601  1, 2, 3, 4, 5, 6, 7, 8, 9, 31,
602  10, 11, 12, 27, 13, 1, 2, 3, 4, 5,
603  6, 7, 8, 9, 48, 10, 11, 12, 28, 13,
604  1, 2, 3, 4, 5, 6, 7, 8, 9, 42,
605  10, 11, 12, 29, 13, 9, 9, 42, 30, 33,
606  36, 13, 13, 49, 51, 39, 39, 39, 44, 11,
607  46, 34, 37, 35, 38, 10, 43, 0, 41, 12,
608  50, 45, 47, 52, 54, 53, 32, 0, 0, 0,
609  0, 40
610 };
611 
612 static const yytype_int8 yycheck[] =
613 {
614  3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
615  13, 14, 15, 11, 17, 3, 4, 5, 6, 7,
616  8, 9, 10, 11, 12, 13, 14, 15, 11, 17,
617  3, 4, 5, 6, 7, 8, 9, 10, 11, 24,
618  13, 14, 15, 11, 17, 11, 11, 32, 11, 15,
619  15, 17, 17, 12, 12, 15, 15, 15, 27, 14,
620  29, 10, 11, 10, 11, 13, 0, -1, 22, 15,
621  12, 16, 16, 16, 12, 16, 9, -1, -1, -1,
622  -1, 21
623 };
624 
625  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
626  symbol of state STATE-NUM. */
627 static const yytype_uint8 yystos[] =
628 {
629  0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
630  13, 14, 15, 17, 21, 22, 23, 24, 25, 26,
631  27, 28, 29, 30, 31, 32, 33, 11, 11, 11,
632  11, 12, 31, 15, 22, 32, 15, 22, 32, 15,
633  29, 28, 27, 0, 21, 16, 21, 16, 12, 12,
634  12, 12, 16, 16, 12
635 };
636 
637  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
638 static const yytype_uint8 yyr1[] =
639 {
640  0, 20, 21, 21, 22, 23, 23, 23, 23, 24,
641  25, 26, 26, 27, 27, 27, 27, 27, 27, 27,
642  27, 27, 27, 28, 28, 28, 29, 29, 29, 30,
643  30, 31, 31, 32, 32, 33, 33
644 };
645 
646  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
647 static const yytype_uint8 yyr2[] =
648 {
649  0, 2, 1, 2, 1, 1, 1, 1, 1, 4,
650  4, 4, 6, 1, 1, 1, 1, 1, 1, 1,
651  1, 1, 1, 2, 2, 2, 2, 2, 2, 2,
652  2, 1, 2, 3, 2, 0, 1
653 };
654 
655 
656 #define yyerrok (yyerrstatus = 0)
657 #define yyclearin (yychar = YYEMPTY)
658 #define YYEMPTY (-2)
659 #define YYEOF 0
660 
661 #define YYACCEPT goto yyacceptlab
662 #define YYABORT goto yyabortlab
663 #define YYERROR goto yyerrorlab
664 
665 
666 #define YYRECOVERING() (!!yyerrstatus)
667 
668 #define YYBACKUP(Token, Value) \
669 do \
670  if (yychar == YYEMPTY) \
671  { \
672  yychar = (Token); \
673  yylval = (Value); \
674  YYPOPSTACK (yylen); \
675  yystate = *yyssp; \
676  goto yybackup; \
677  } \
678  else \
679  { \
680  yyerror (parser, YY_("syntax error: cannot back up")); \
681  YYERROR; \
682  } \
683 while (0)
684 
685 /* Error token number */
686 #define YYTERROR 1
687 #define YYERRCODE 256
688 
689 
690 
691 /* Enable debugging if requested. */
692 #if OCTAVE_TEX_DEBUG
693 
694 # ifndef YYFPRINTF
695 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
696 # define YYFPRINTF fprintf
697 # endif
698 
699 # define YYDPRINTF(Args) \
700 do { \
701  if (yydebug) \
702  YYFPRINTF Args; \
703 } while (0)
704 
705 /* This macro is provided for backward compatibility. */
706 #ifndef YY_LOCATION_PRINT
707 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
708 #endif
709 
710 
711 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
712 do { \
713  if (yydebug) \
714  { \
715  YYFPRINTF (stderr, "%s ", Title); \
716  yy_symbol_print (stderr, \
717  Type, Value, parser); \
718  YYFPRINTF (stderr, "\n"); \
719  } \
720 } while (0)
721 
722 
723 /*----------------------------------------.
724 | Print this symbol's value on YYOUTPUT. |
725 `----------------------------------------*/
726 
727 static void
728 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, text_parser_tex& parser)
729 {
730  FILE *yyo = yyoutput;
731  YYUSE (yyo);
732  YYUSE (parser);
733  if (!yyvaluep)
734  return;
735 # ifdef YYPRINT
736  if (yytype < YYNTOKENS)
737  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
738 # endif
739  YYUSE (yytype);
740 }
741 
742 
743 /*--------------------------------.
744 | Print this symbol on YYOUTPUT. |
745 `--------------------------------*/
746 
747 static void
748 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, text_parser_tex& parser)
749 {
750  YYFPRINTF (yyoutput, "%s %s (",
751  yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
752 
753  yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser);
754  YYFPRINTF (yyoutput, ")");
755 }
756 
757 /*------------------------------------------------------------------.
758 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
759 | TOP (included). |
760 `------------------------------------------------------------------*/
761 
762 static void
763 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
764 {
765  YYFPRINTF (stderr, "Stack now");
766  for (; yybottom <= yytop; yybottom++)
767  {
768  int yybot = *yybottom;
769  YYFPRINTF (stderr, " %d", yybot);
770  }
771  YYFPRINTF (stderr, "\n");
772 }
773 
774 # define YY_STACK_PRINT(Bottom, Top) \
775 do { \
776  if (yydebug) \
777  yy_stack_print ((Bottom), (Top)); \
778 } while (0)
779 
780 
781 /*------------------------------------------------.
782 | Report that the YYRULE is going to be reduced. |
783 `------------------------------------------------*/
784 
785 static void
786 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, text_parser_tex& parser)
787 {
788  unsigned long int yylno = yyrline[yyrule];
789  int yynrhs = yyr2[yyrule];
790  int yyi;
791  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
792  yyrule - 1, yylno);
793  /* The symbols being reduced. */
794  for (yyi = 0; yyi < yynrhs; yyi++)
795  {
796  YYFPRINTF (stderr, " $%d = ", yyi + 1);
797  yy_symbol_print (stderr,
798  yystos[yyssp[yyi + 1 - yynrhs]],
799  &(yyvsp[(yyi + 1) - (yynrhs)])
800  , parser);
801  YYFPRINTF (stderr, "\n");
802  }
803 }
804 
805 # define YY_REDUCE_PRINT(Rule) \
806 do { \
807  if (yydebug) \
808  yy_reduce_print (yyssp, yyvsp, Rule, parser); \
809 } while (0)
810 
811 /* Nonzero means print parse trace. It is left uninitialized so that
812  multiple parsers can coexist. */
813 int yydebug;
814 #else /* !OCTAVE_TEX_DEBUG */
815 # define YYDPRINTF(Args)
816 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
817 # define YY_STACK_PRINT(Bottom, Top)
818 # define YY_REDUCE_PRINT(Rule)
819 #endif /* !OCTAVE_TEX_DEBUG */
820 
821 
822 /* YYINITDEPTH -- initial size of the parser's stacks. */
823 #ifndef YYINITDEPTH
824 # define YYINITDEPTH 200
825 #endif
826 
827 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
828  if the built-in stack extension method is used).
829 
830  Do not make this value too large; the results are undefined if
831  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
832  evaluated with infinite-precision integer arithmetic. */
833 
834 #ifndef YYMAXDEPTH
835 # define YYMAXDEPTH 10000
836 #endif
837 
838 
839 #if YYERROR_VERBOSE
840 
841 # ifndef yystrlen
842 # if defined __GLIBC__ && defined _STRING_H
843 # define yystrlen strlen
844 # else
845 /* Return the length of YYSTR. */
846 static YYSIZE_T
847 yystrlen (const char *yystr)
848 {
849  YYSIZE_T yylen;
850  for (yylen = 0; yystr[yylen]; yylen++)
851  continue;
852  return yylen;
853 }
854 # endif
855 # endif
856 
857 # ifndef yystpcpy
858 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
859 # define yystpcpy stpcpy
860 # else
861 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
862  YYDEST. */
863 static char *
864 yystpcpy (char *yydest, const char *yysrc)
865 {
866  char *yyd = yydest;
867  const char *yys = yysrc;
868 
869  while ((*yyd++ = *yys++) != '\0')
870  continue;
871 
872  return yyd - 1;
873 }
874 # endif
875 # endif
876 
877 # ifndef yytnamerr
878 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
879  quotes and backslashes, so that it's suitable for yyerror. The
880  heuristic is that double-quoting is unnecessary unless the string
881  contains an apostrophe, a comma, or backslash (other than
882  backslash-backslash). YYSTR is taken from yytname. If YYRES is
883  null, do not copy; instead, return the length of what the result
884  would have been. */
885 static YYSIZE_T
886 yytnamerr (char *yyres, const char *yystr)
887 {
888  if (*yystr == '"')
889  {
890  YYSIZE_T yyn = 0;
891  char const *yyp = yystr;
892 
893  for (;;)
894  switch (*++yyp)
895  {
896  case '\'':
897  case ',':
898  goto do_not_strip_quotes;
899 
900  case '\\':
901  if (*++yyp != '\\')
902  goto do_not_strip_quotes;
903  /* Fall through. */
904  default:
905  if (yyres)
906  yyres[yyn] = *yyp;
907  yyn++;
908  break;
909 
910  case '"':
911  if (yyres)
912  yyres[yyn] = '\0';
913  return yyn;
914  }
915  do_not_strip_quotes: ;
916  }
917 
918  if (! yyres)
919  return yystrlen (yystr);
920 
921  return yystpcpy (yyres, yystr) - yyres;
922 }
923 # endif
924 
925 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
926  about the unexpected token YYTOKEN for the state stack whose top is
927  YYSSP.
928 
929  Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
930  not large enough to hold the message. In that case, also set
931  *YYMSG_ALLOC to the required number of bytes. Return 2 if the
932  required number of bytes is too large to store. */
933 static int
934 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
935  yytype_int16 *yyssp, int yytoken)
936 {
937  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
938  YYSIZE_T yysize = yysize0;
939  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
940  /* Internationalized format string. */
941  const char *yyformat = YY_NULLPTR;
942  /* Arguments of yyformat. */
943  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
944  /* Number of reported tokens (one for the "unexpected", one per
945  "expected"). */
946  int yycount = 0;
947 
948  /* There are many possibilities here to consider:
949  - If this state is a consistent state with a default action, then
950  the only way this function was invoked is if the default action
951  is an error action. In that case, don't check for expected
952  tokens because there are none.
953  - The only way there can be no lookahead present (in yychar) is if
954  this state is a consistent state with a default action. Thus,
955  detecting the absence of a lookahead is sufficient to determine
956  that there is no unexpected or expected token to report. In that
957  case, just report a simple "syntax error".
958  - Don't assume there isn't a lookahead just because this state is a
959  consistent state with a default action. There might have been a
960  previous inconsistent state, consistent state with a non-default
961  action, or user semantic action that manipulated yychar.
962  - Of course, the expected token list depends on states to have
963  correct lookahead information, and it depends on the parser not
964  to perform extra reductions after fetching a lookahead from the
965  scanner and before detecting a syntax error. Thus, state merging
966  (from LALR or IELR) and default reductions corrupt the expected
967  token list. However, the list is correct for canonical LR with
968  one exception: it will still contain any token that will not be
969  accepted due to an error action in a later state.
970  */
971  if (yytoken != YYEMPTY)
972  {
973  int yyn = yypact[*yyssp];
974  yyarg[yycount++] = yytname[yytoken];
975  if (!yypact_value_is_default (yyn))
976  {
977  /* Start YYX at -YYN if negative to avoid negative indexes in
978  YYCHECK. In other words, skip the first -YYN actions for
979  this state because they are default actions. */
980  int yyxbegin = yyn < 0 ? -yyn : 0;
981  /* Stay within bounds of both yycheck and yytname. */
982  int yychecklim = YYLAST - yyn + 1;
983  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
984  int yyx;
985 
986  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
987  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
988  && !yytable_value_is_error (yytable[yyx + yyn]))
989  {
990  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
991  {
992  yycount = 1;
993  yysize = yysize0;
994  break;
995  }
996  yyarg[yycount++] = yytname[yyx];
997  {
998  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
999  if (! (yysize <= yysize1
1000  && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1001  return 2;
1002  yysize = yysize1;
1003  }
1004  }
1005  }
1006  }
1007 
1008  switch (yycount)
1009  {
1010 # define YYCASE_(N, S) \
1011  case N: \
1012  yyformat = S; \
1013  break
1014  YYCASE_(0, YY_("syntax error"));
1015  YYCASE_(1, YY_("syntax error, unexpected %s"));
1016  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1017  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1018  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1019  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1020 # undef YYCASE_
1021  }
1022 
1023  {
1024  YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1025  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1026  return 2;
1027  yysize = yysize1;
1028  }
1029 
1030  if (*yymsg_alloc < yysize)
1031  {
1032  *yymsg_alloc = 2 * yysize;
1033  if (! (yysize <= *yymsg_alloc
1034  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1035  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1036  return 1;
1037  }
1038 
1039  /* Avoid sprintf, as that infringes on the user's name space.
1040  Don't have undefined behavior even if the translation
1041  produced a string with the wrong number of "%s"s. */
1042  {
1043  char *yyp = *yymsg;
1044  int yyi = 0;
1045  while ((*yyp = *yyformat) != '\0')
1046  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1047  {
1048  yyp += yytnamerr (yyp, yyarg[yyi++]);
1049  yyformat += 2;
1050  }
1051  else
1052  {
1053  yyp++;
1054  yyformat++;
1055  }
1056  }
1057  return 0;
1058 }
1059 #endif /* YYERROR_VERBOSE */
1060 
1061 /*-----------------------------------------------.
1062 | Release the memory associated to this symbol. |
1063 `-----------------------------------------------*/
1064 
1065 static void
1066 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, text_parser_tex& parser)
1067 {
1068  YYUSE (yyvaluep);
1069  YYUSE (parser);
1070  if (!yymsg)
1071  yymsg = "Deleting";
1072  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1073 
1075  switch (yytype)
1076  {
1077  case 15: /* CH */
1078 #line 85 "corefcn/oct-tex-parser.yy" /* yacc.c:1257 */
1079  { }
1080 #line 1081 "corefcn/oct-tex-parser.cc" /* yacc.c:1257 */
1081  break;
1082 
1083  case 16: /* NUM */
1084 #line 85 "corefcn/oct-tex-parser.yy" /* yacc.c:1257 */
1085  { }
1086 #line 1087 "corefcn/oct-tex-parser.cc" /* yacc.c:1257 */
1087  break;
1088 
1089  case 17: /* SYM */
1090 #line 85 "corefcn/oct-tex-parser.yy" /* yacc.c:1257 */
1091  { }
1092 #line 1093 "corefcn/oct-tex-parser.cc" /* yacc.c:1257 */
1093  break;
1094 
1095  case 21: /* simple_string */
1096 #line 86 "corefcn/oct-tex-parser.yy" /* yacc.c:1257 */
1097  { delete ((*yyvaluep).str); }
1098 #line 1099 "corefcn/oct-tex-parser.cc" /* yacc.c:1257 */
1099  break;
1100 
1101  case 22: /* symbol_element */
1102 #line 86 "corefcn/oct-tex-parser.yy" /* yacc.c:1257 */
1103  { delete ((*yyvaluep).e_base); }
1104 #line 1105 "corefcn/oct-tex-parser.cc" /* yacc.c:1257 */
1105  break;
1106 
1107  case 23: /* font_modifier_element */
1108 #line 86 "corefcn/oct-tex-parser.yy" /* yacc.c:1257 */
1109  { delete ((*yyvaluep).e_base); }
1110 #line 1111 "corefcn/oct-tex-parser.cc" /* yacc.c:1257 */
1111  break;
1112 
1113  case 24: /* fontsize_element */
1114 #line 86 "corefcn/oct-tex-parser.yy" /* yacc.c:1257 */
1115  { delete ((*yyvaluep).e_base); }
1116 #line 1117 "corefcn/oct-tex-parser.cc" /* yacc.c:1257 */
1117  break;
1118 
1119  case 25: /* fontname_element */
1120 #line 86 "corefcn/oct-tex-parser.yy" /* yacc.c:1257 */
1121  { delete ((*yyvaluep).e_base); }
1122 #line 1123 "corefcn/oct-tex-parser.cc" /* yacc.c:1257 */
1123  break;
1124 
1125  case 26: /* color_element */
1126 #line 86 "corefcn/oct-tex-parser.yy" /* yacc.c:1257 */
1127  { delete ((*yyvaluep).e_base); }
1128 #line 1129 "corefcn/oct-tex-parser.cc" /* yacc.c:1257 */
1129  break;
1130 
1131  case 27: /* string_element */
1132 #line 86 "corefcn/oct-tex-parser.yy" /* yacc.c:1257 */
1133  { delete ((*yyvaluep).e_base); }
1134 #line 1135 "corefcn/oct-tex-parser.cc" /* yacc.c:1257 */
1135  break;
1136 
1137  case 28: /* superscript_element */
1138 #line 86 "corefcn/oct-tex-parser.yy" /* yacc.c:1257 */
1139  { delete ((*yyvaluep).e_base); }
1140 #line 1141 "corefcn/oct-tex-parser.cc" /* yacc.c:1257 */
1141  break;
1142 
1143  case 29: /* subscript_element */
1144 #line 86 "corefcn/oct-tex-parser.yy" /* yacc.c:1257 */
1145  { delete ((*yyvaluep).e_base); }
1146 #line 1147 "corefcn/oct-tex-parser.cc" /* yacc.c:1257 */
1147  break;
1148 
1149  case 30: /* combined_script_element */
1150 #line 86 "corefcn/oct-tex-parser.yy" /* yacc.c:1257 */
1151  { delete ((*yyvaluep).e_base); }
1152 #line 1153 "corefcn/oct-tex-parser.cc" /* yacc.c:1257 */
1153  break;
1154 
1155  case 31: /* string_element_list */
1156 #line 86 "corefcn/oct-tex-parser.yy" /* yacc.c:1257 */
1157  { delete ((*yyvaluep).e_list); }
1158 #line 1159 "corefcn/oct-tex-parser.cc" /* yacc.c:1257 */
1159  break;
1160 
1161  case 32: /* scoped_string_element_list */
1162 #line 86 "corefcn/oct-tex-parser.yy" /* yacc.c:1257 */
1163  { delete ((*yyvaluep).e_list); }
1164 #line 1165 "corefcn/oct-tex-parser.cc" /* yacc.c:1257 */
1165  break;
1166 
1167 
1168  default:
1169  break;
1170  }
1172 }
1173 
1174 
1175 
1176 
1177 /*----------.
1178 | yyparse. |
1179 `----------*/
1180 
1181 int
1183 {
1184 /* The lookahead symbol. */
1185 int yychar;
1186 
1187 
1188 /* The semantic value of the lookahead symbol. */
1189 /* Default value used for initialization, for pacifying older GCCs
1190  or non-GCC compilers. */
1191 YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
1192 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
1193 
1194  /* Number of syntax errors so far. */
1195  int yynerrs;
1196 
1197  int yystate;
1198  /* Number of tokens to shift before error messages enabled. */
1199  int yyerrstatus;
1200 
1201  /* The stacks and their tools:
1202  'yyss': related to states.
1203  'yyvs': related to semantic values.
1204 
1205  Refer to the stacks through separate pointers, to allow yyoverflow
1206  to reallocate them elsewhere. */
1207 
1208  /* The state stack. */
1210  yytype_int16 *yyss;
1212 
1213  /* The semantic value stack. */
1215  YYSTYPE *yyvs;
1216  YYSTYPE *yyvsp;
1217 
1219 
1220  int yyn;
1221  int yyresult;
1222  /* Lookahead token as an internal (translated) token number. */
1223  int yytoken = 0;
1224  /* The variables used to return semantic value and location from the
1225  action routines. */
1226  YYSTYPE yyval;
1227 
1228 #if YYERROR_VERBOSE
1229  /* Buffer for error messages, and its allocated size. */
1230  char yymsgbuf[128];
1231  char *yymsg = yymsgbuf;
1232  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1233 #endif
1234 
1235 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1236 
1237  /* The number of symbols on the RHS of the reduced rule.
1238  Keep to zero when no symbol should be popped. */
1239  int yylen = 0;
1240 
1241  yyssp = yyss = yyssa;
1242  yyvsp = yyvs = yyvsa;
1243  yystacksize = YYINITDEPTH;
1244 
1245  YYDPRINTF ((stderr, "Starting parse\n"));
1246 
1247  yystate = 0;
1248  yyerrstatus = 0;
1249  yynerrs = 0;
1250  yychar = YYEMPTY; /* Cause a token to be read. */
1251  goto yysetstate;
1252 
1253 /*------------------------------------------------------------.
1254 | yynewstate -- Push a new state, which is found in yystate. |
1255 `------------------------------------------------------------*/
1256  yynewstate:
1257  /* In all cases, when you get here, the value and location stacks
1258  have just been pushed. So pushing a state here evens the stacks. */
1259  yyssp++;
1260 
1261  yysetstate:
1262  *yyssp = yystate;
1263 
1264  if (yyss + yystacksize - 1 <= yyssp)
1265  {
1266  /* Get the current used size of the three stacks, in elements. */
1267  YYSIZE_T yysize = yyssp - yyss + 1;
1268 
1269 #ifdef yyoverflow
1270  {
1271  /* Give user a chance to reallocate the stack. Use copies of
1272  these so that the &'s don't force the real ones into
1273  memory. */
1274  YYSTYPE *yyvs1 = yyvs;
1275  yytype_int16 *yyss1 = yyss;
1276 
1277  /* Each stack pointer address is followed by the size of the
1278  data in use in that stack, in bytes. This used to be a
1279  conditional around just the two extra args, but that might
1280  be undefined if yyoverflow is a macro. */
1281  yyoverflow (YY_("memory exhausted"),
1282  &yyss1, yysize * sizeof (*yyssp),
1283  &yyvs1, yysize * sizeof (*yyvsp),
1284  &yystacksize);
1285 
1286  yyss = yyss1;
1287  yyvs = yyvs1;
1288  }
1289 #else /* no yyoverflow */
1290 # ifndef YYSTACK_RELOCATE
1291  goto yyexhaustedlab;
1292 # else
1293  /* Extend the stack our own way. */
1294  if (YYMAXDEPTH <= yystacksize)
1295  goto yyexhaustedlab;
1296  yystacksize *= 2;
1297  if (YYMAXDEPTH < yystacksize)
1298  yystacksize = YYMAXDEPTH;
1299 
1300  {
1301  yytype_int16 *yyss1 = yyss;
1302  union yyalloc *yyptr =
1303  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1304  if (! yyptr)
1305  goto yyexhaustedlab;
1306  YYSTACK_RELOCATE (yyss_alloc, yyss);
1307  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1308 # undef YYSTACK_RELOCATE
1309  if (yyss1 != yyssa)
1310  YYSTACK_FREE (yyss1);
1311  }
1312 # endif
1313 #endif /* no yyoverflow */
1314 
1315  yyssp = yyss + yysize - 1;
1316  yyvsp = yyvs + yysize - 1;
1317 
1318  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1319  (unsigned long int) yystacksize));
1320 
1321  if (yyss + yystacksize - 1 <= yyssp)
1322  YYABORT;
1323  }
1324 
1325  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1326 
1327  if (yystate == YYFINAL)
1328  YYACCEPT;
1329 
1330  goto yybackup;
1331 
1332 /*-----------.
1333 | yybackup. |
1334 `-----------*/
1335 yybackup:
1336 
1337  /* Do appropriate processing given the current state. Read a
1338  lookahead token if we need one and don't already have one. */
1339 
1340  /* First try to decide what to do without reference to lookahead token. */
1341  yyn = yypact[yystate];
1342  if (yypact_value_is_default (yyn))
1343  goto yydefault;
1344 
1345  /* Not known => get a lookahead token if don't already have one. */
1346 
1347  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1348  if (yychar == YYEMPTY)
1349  {
1350  YYDPRINTF ((stderr, "Reading a token: "));
1351  yychar = yylex (&yylval, scanner);
1352  }
1353 
1354  if (yychar <= YYEOF)
1355  {
1356  yychar = yytoken = YYEOF;
1357  YYDPRINTF ((stderr, "Now at end of input.\n"));
1358  }
1359  else
1360  {
1361  yytoken = YYTRANSLATE (yychar);
1362  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1363  }
1364 
1365  /* If the proper action on seeing token YYTOKEN is to reduce or to
1366  detect an error, take that action. */
1367  yyn += yytoken;
1368  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1369  goto yydefault;
1370  yyn = yytable[yyn];
1371  if (yyn <= 0)
1372  {
1373  if (yytable_value_is_error (yyn))
1374  goto yyerrlab;
1375  yyn = -yyn;
1376  goto yyreduce;
1377  }
1378 
1379  /* Count tokens shifted since error; after three, turn off error
1380  status. */
1381  if (yyerrstatus)
1382  yyerrstatus--;
1383 
1384  /* Shift the lookahead token. */
1385  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1386 
1387  /* Discard the shifted token. */
1388  yychar = YYEMPTY;
1389 
1390  yystate = yyn;
1392  *++yyvsp = yylval;
1394 
1395  goto yynewstate;
1396 
1397 
1398 /*-----------------------------------------------------------.
1399 | yydefault -- do the default action for the current state. |
1400 `-----------------------------------------------------------*/
1401 yydefault:
1402  yyn = yydefact[yystate];
1403  if (yyn == 0)
1404  goto yyerrlab;
1405  goto yyreduce;
1406 
1407 
1408 /*-----------------------------.
1409 | yyreduce -- Do a reduction. |
1410 `-----------------------------*/
1411 yyreduce:
1412  /* yyn is the number of a rule to reduce with. */
1413  yylen = yyr2[yyn];
1414 
1415  /* If YYLEN is nonzero, implement the default value of the action:
1416  '$$ = $1'.
1417 
1418  Otherwise, the following line sets YYVAL to garbage.
1419  This behavior is undocumented and Bison
1420  users should not rely upon it. Assigning to YYVAL
1421  unconditionally makes the parser a bit smaller, and it avoids a
1422  GCC warning that YYVAL may be used uninitialized. */
1423  yyval = yyvsp[1-yylen];
1424 
1425 
1426  YY_REDUCE_PRINT (yyn);
1427  switch (yyn)
1428  {
1429  case 2:
1430 #line 99 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1431  { (yyval.str) = new std::string (1, (yyvsp[0].ch)); }
1432 #line 1433 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1433  break;
1434 
1435  case 3:
1436 #line 101 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1437  { (yyvsp[-1].str)->append (1, (yyvsp[0].ch)); (yyval.str) = (yyvsp[-1].str); }
1438 #line 1439 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1439  break;
1440 
1441  case 4:
1442 #line 105 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1443  { (yyval.e_base) = new text_element_symbol ((yyvsp[0].sym)); }
1444 #line 1445 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1445  break;
1446 
1447  case 5:
1448 #line 109 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1449  { (yyval.e_base) = new text_element_fontstyle (text_element_fontstyle::bold); }
1450 #line 1451 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1451  break;
1452 
1453  case 6:
1454 #line 111 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1455  { (yyval.e_base) = new text_element_fontstyle (text_element_fontstyle::italic); }
1456 #line 1457 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1457  break;
1458 
1459  case 7:
1460 #line 113 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1461  { (yyval.e_base) = new text_element_fontstyle (text_element_fontstyle::oblique); }
1462 #line 1463 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1463  break;
1464 
1465  case 8:
1466 #line 115 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1467  { (yyval.e_base) = new text_element_fontstyle (text_element_fontstyle::normal); }
1468 #line 1469 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1469  break;
1470 
1471  case 9:
1472 #line 119 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1473  { (yyval.e_base) = new text_element_fontsize ((yyvsp[-1].num)); }
1474 #line 1475 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1475  break;
1476 
1477  case 10:
1478 #line 123 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1479  {
1480  (yyval.e_base) = new text_element_fontname (*(yyvsp[-1].str));
1481  delete (yyvsp[-1].str);
1482  }
1483 #line 1484 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1484  break;
1485 
1486  case 11:
1487 #line 130 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1488  {
1489  (yyval.e_base) = new text_element_color (*(yyvsp[-1].str));
1490  delete (yyvsp[-1].str);
1491  }
1492 #line 1493 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1493  break;
1494 
1495  case 12:
1496 #line 135 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1497  {
1498  (yyval.e_base) = new text_element_color ((yyvsp[-3].num), (yyvsp[-2].num), (yyvsp[-1].num));
1499  }
1500 #line 1501 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1501  break;
1502 
1503  case 13:
1504 #line 141 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1505  {
1506  (yyval.e_base) = new text_element_string (*(yyvsp[0].str));
1507  delete (yyvsp[0].str);
1508  }
1509 #line 1510 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1510  break;
1511 
1512  case 14:
1513 #line 147 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1514  { (yyval.e_base) = (yyvsp[0].e_list); }
1515 #line 1516 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1516  break;
1517 
1518  case 23:
1519 #line 159 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1520  { (yyval.e_base) = new text_element_superscript ((yyvsp[0].ch)); }
1521 #line 1522 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1522  break;
1523 
1524  case 24:
1525 #line 161 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1526  { (yyval.e_base) = new text_element_superscript ((yyvsp[0].e_list)); }
1527 #line 1528 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1528  break;
1529 
1530  case 25:
1531 #line 163 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1532  { (yyval.e_base) = new text_element_superscript ((yyvsp[0].e_base)); }
1533 #line 1534 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1534  break;
1535 
1536  case 26:
1537 #line 167 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1538  { (yyval.e_base) = new text_element_subscript ((yyvsp[0].ch)); }
1539 #line 1540 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1540  break;
1541 
1542  case 27:
1543 #line 169 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1544  { (yyval.e_base) = new text_element_subscript ((yyvsp[0].e_list)); }
1545 #line 1546 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1546  break;
1547 
1548  case 28:
1549 #line 171 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1550  { (yyval.e_base) = new text_element_subscript ((yyvsp[0].e_base)); }
1551 #line 1552 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1552  break;
1553 
1554  case 29:
1555 #line 175 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1556  { (yyval.e_base) = new text_element_combined ((yyvsp[-1].e_base), (yyvsp[0].e_base)); }
1557 #line 1558 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1558  break;
1559 
1560  case 30:
1561 #line 177 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1562  { (yyval.e_base) = new text_element_combined ((yyvsp[-1].e_base), (yyvsp[0].e_base)); }
1563 #line 1564 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1564  break;
1565 
1566  case 31:
1567 #line 181 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1568  { (yyval.e_list) = new text_element_list ((yyvsp[0].e_base)); }
1569 #line 1570 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1570  break;
1571 
1572  case 32:
1573 #line 183 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1574  { (yyvsp[-1].e_list)->push_back ((yyvsp[0].e_base)); (yyval.e_list) = (yyvsp[-1].e_list); }
1575 #line 1576 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1576  break;
1577 
1578  case 33:
1579 #line 187 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1580  { (yyval.e_list) = (yyvsp[-1].e_list); }
1581 #line 1582 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1582  break;
1583 
1584  case 34:
1585 #line 189 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1586  { (yyval.e_list) = new text_element_list (); }
1587 #line 1588 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1588  break;
1589 
1590  case 35:
1591 #line 193 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1592  { parser.set_parse_result (new text_element_string ("")); }
1593 #line 1594 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1594  break;
1595 
1596  case 36:
1597 #line 195 "corefcn/oct-tex-parser.yy" /* yacc.c:1646 */
1598  { parser.set_parse_result ((yyvsp[0].e_list)); }
1599 #line 1600 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1600  break;
1601 
1602 
1603 #line 1604 "corefcn/oct-tex-parser.cc" /* yacc.c:1646 */
1604  default: break;
1605  }
1606  /* User semantic actions sometimes alter yychar, and that requires
1607  that yytoken be updated with the new translation. We take the
1608  approach of translating immediately before every use of yytoken.
1609  One alternative is translating here after every semantic action,
1610  but that translation would be missed if the semantic action invokes
1611  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1612  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1613  incorrect destructor might then be invoked immediately. In the
1614  case of YYERROR or YYBACKUP, subsequent parser actions might lead
1615  to an incorrect destructor call or verbose syntax error message
1616  before the lookahead is translated. */
1617  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1618 
1619  YYPOPSTACK (yylen);
1620  yylen = 0;
1621  YY_STACK_PRINT (yyss, yyssp);
1622 
1623  *++yyvsp = yyval;
1624 
1625  /* Now 'shift' the result of the reduction. Determine what state
1626  that goes to, based on the state we popped back to and the rule
1627  number reduced by. */
1628 
1629  yyn = yyr1[yyn];
1630 
1631  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1632  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1633  yystate = yytable[yystate];
1634  else
1635  yystate = yydefgoto[yyn - YYNTOKENS];
1636 
1637  goto yynewstate;
1638 
1639 
1640 /*--------------------------------------.
1641 | yyerrlab -- here on detecting error. |
1642 `--------------------------------------*/
1643 yyerrlab:
1644  /* Make sure we have latest lookahead translation. See comments at
1645  user semantic actions for why this is necessary. */
1646  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1647 
1648  /* If not already recovering from an error, report this error. */
1649  if (!yyerrstatus)
1650  {
1651  ++yynerrs;
1652 #if ! YYERROR_VERBOSE
1653  yyerror (parser, YY_("syntax error"));
1654 #else
1655 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1656  yyssp, yytoken)
1657  {
1658  char const *yymsgp = YY_("syntax error");
1659  int yysyntax_error_status;
1660  yysyntax_error_status = YYSYNTAX_ERROR;
1661  if (yysyntax_error_status == 0)
1662  yymsgp = yymsg;
1663  else if (yysyntax_error_status == 1)
1664  {
1665  if (yymsg != yymsgbuf)
1666  YYSTACK_FREE (yymsg);
1667  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1668  if (!yymsg)
1669  {
1670  yymsg = yymsgbuf;
1671  yymsg_alloc = sizeof yymsgbuf;
1672  yysyntax_error_status = 2;
1673  }
1674  else
1675  {
1676  yysyntax_error_status = YYSYNTAX_ERROR;
1677  yymsgp = yymsg;
1678  }
1679  }
1680  yyerror (parser, yymsgp);
1681  if (yysyntax_error_status == 2)
1682  goto yyexhaustedlab;
1683  }
1684 # undef YYSYNTAX_ERROR
1685 #endif
1686  }
1687 
1688 
1689 
1690  if (yyerrstatus == 3)
1691  {
1692  /* If just tried and failed to reuse lookahead token after an
1693  error, discard it. */
1694 
1695  if (yychar <= YYEOF)
1696  {
1697  /* Return failure if at end of input. */
1698  if (yychar == YYEOF)
1699  YYABORT;
1700  }
1701  else
1702  {
1703  yydestruct ("Error: discarding",
1704  yytoken, &yylval, parser);
1705  yychar = YYEMPTY;
1706  }
1707  }
1708 
1709  /* Else will try to reuse lookahead token after shifting the error
1710  token. */
1711  goto yyerrlab1;
1712 
1713 
1714 /*---------------------------------------------------.
1715 | yyerrorlab -- error raised explicitly by YYERROR. |
1716 `---------------------------------------------------*/
1717 yyerrorlab:
1718 
1719  /* Pacify compilers like GCC when the user code never invokes
1720  YYERROR and the label yyerrorlab therefore never appears in user
1721  code. */
1722  if (/*CONSTCOND*/ 0)
1723  goto yyerrorlab;
1724 
1725  /* Do not reclaim the symbols of the rule whose action triggered
1726  this YYERROR. */
1727  YYPOPSTACK (yylen);
1728  yylen = 0;
1729  YY_STACK_PRINT (yyss, yyssp);
1730  yystate = *yyssp;
1731  goto yyerrlab1;
1732 
1733 
1734 /*-------------------------------------------------------------.
1735 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1736 `-------------------------------------------------------------*/
1737 yyerrlab1:
1738  yyerrstatus = 3; /* Each real token shifted decrements this. */
1739 
1740  for (;;)
1741  {
1742  yyn = yypact[yystate];
1743  if (!yypact_value_is_default (yyn))
1744  {
1745  yyn += YYTERROR;
1746  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1747  {
1748  yyn = yytable[yyn];
1749  if (0 < yyn)
1750  break;
1751  }
1752  }
1753 
1754  /* Pop the current state because it cannot handle the error token. */
1755  if (yyssp == yyss)
1756  YYABORT;
1757 
1758 
1759  yydestruct ("Error: popping",
1760  yystos[yystate], yyvsp, parser);
1761  YYPOPSTACK (1);
1762  yystate = *yyssp;
1763  YY_STACK_PRINT (yyss, yyssp);
1764  }
1765 
1767  *++yyvsp = yylval;
1769 
1770 
1771  /* Shift the error token. */
1772  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1773 
1774  yystate = yyn;
1775  goto yynewstate;
1776 
1777 
1778 /*-------------------------------------.
1779 | yyacceptlab -- YYACCEPT comes here. |
1780 `-------------------------------------*/
1781 yyacceptlab:
1782  yyresult = 0;
1783  goto yyreturn;
1784 
1785 /*-----------------------------------.
1786 | yyabortlab -- YYABORT comes here. |
1787 `-----------------------------------*/
1788 yyabortlab:
1789  yyresult = 1;
1790  goto yyreturn;
1791 
1792 #if !defined yyoverflow || YYERROR_VERBOSE
1793 /*-------------------------------------------------.
1794 | yyexhaustedlab -- memory exhaustion comes here. |
1795 `-------------------------------------------------*/
1796 yyexhaustedlab:
1797  yyerror (parser, YY_("memory exhausted"));
1798  yyresult = 2;
1799  /* Fall through. */
1800 #endif
1801 
1802 yyreturn:
1803  if (yychar != YYEMPTY)
1804  {
1805  /* Make sure we have latest lookahead translation. See comments at
1806  user semantic actions for why this is necessary. */
1807  yytoken = YYTRANSLATE (yychar);
1808  yydestruct ("Cleanup: discarding lookahead",
1809  yytoken, &yylval, parser);
1810  }
1811  /* Do not reclaim the symbols of the rule whose action triggered
1812  this YYABORT or YYACCEPT. */
1813  YYPOPSTACK (yylen);
1814  YY_STACK_PRINT (yyss, yyssp);
1815  while (yyssp != yyss)
1816  {
1817  yydestruct ("Cleanup: popping",
1818  yystos[*yyssp], yyvsp, parser);
1819  YYPOPSTACK (1);
1820  }
1821 #ifndef yyoverflow
1822  if (yyss != yyssa)
1823  YYSTACK_FREE (yyss);
1824 #endif
1825 #if YYERROR_VERBOSE
1826  if (yymsg != yymsgbuf)
1827  YYSTACK_FREE (yymsg);
1828 #endif
1829  return yyresult;
1830 }
1831 #line 198 "corefcn/oct-tex-parser.yy" /* yacc.c:1906 */
1832 
1833 
1834 text_element*
1835 text_parser_tex::parse (const std::string& s)
1836 {
1837  octave_tex_debug = 0;
1838 
1839  if (init_lexer (s))
1840  {
1841  result = 0;
1842 
1843  if (octave_tex_parse (*this) == 0)
1844  return result;
1845  }
1846 
1847  return new text_element_string (s);
1848 }
1849 
1850 static void
1851 yyerror (text_parser_tex&, const char *s)
1852 {
1853  fprintf (stderr, "TeX parse error: %s\n", s);
1854 }
std::string * str
static const yytype_int8 yycheck[]
#define yyssa
Definition: oct-parse.cc:3044
#define YY_NULLPTR
#define YYSTACK_ALLOC_MAXIMUM
bool init_lexer(const std::string &s)
signed char yytype_int8
#define yyparse
#define CH
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
#define YYTERROR
short int yytype_int16
text_element_list * e_list
static const yytype_uint8 yytable[]
static const yytype_uint8 yydefact[]
OCTAVE_TEX_STYPE yyvs_alloc
#define yyvsa
Definition: oct-parse.cc:3047
#define YYUSE(E)
#define yydebug
static const yytype_int8 yypact[]
int octave_tex_lex(OCTAVE_TEX_STYPE *, void *)
The main scanner function which does all the work.
static const yytype_int8 yydefgoto[]
void set_parse_result(text_element *e)
Definition: txt-eng.h:421
#define SUPER
#define YYSIZE_T
#define YYDPRINTF(Args)
#define YYACCEPT
static const yytype_uint8 yytranslate[]
#define yyssp
Definition: oct-parse.cc:3046
#define END
This class gets nodes and searchs inside of 'info files'.
Definition: parser.h:49
#define COLOR
#define yypact_value_is_default(Yystate)
#define YYMAXDEPTH
unsigned short int yytype_uint16
#define YYEOF
static const yytype_uint8 yyr2[]
static const yytype_int8 yypgoto[]
#define YY_INITIAL_VALUE(Value)
yytype_int16 yyss_alloc
#define START
#define yyvs
Definition: oct-parse.cc:3048
unsigned char yytype_uint8
#define NUM
#define YYFINAL
int octave_tex_parse(text_parser_tex &parser)
#define YYLAST
#define FONTNAME
#define yyerror
#define yystacksize
Definition: oct-parse.cc:3050
#define YYNTOKENS
static const yytype_uint8 yyr1[]
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define yyss
Definition: oct-parse.cc:3045
text_element * result
Definition: txt-eng.h:435
#define YY_STACK_PRINT(Bottom, Top)
#define YYSTACK_BYTES(N)
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
#define YYPOPSTACK(N)
static const yytype_uint8 yystos[]
#define SYM
#define FONTSIZE
#define BF
#define YY_REDUCE_PRINT(Rule)
#define YYSTYPE
#define yylex
#define SUB
#define yystate
Definition: oct-parse.cc:3042
void free(void *)
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
#define yynerrs
#define YYINITDEPTH
#define yylval
#define scanner
#define yyerrstatus
Definition: oct-parse.cc:3043
#define YYEMPTY
#define COLOR_RGB
#define STR
#define SCRIPT
#define YYSTACK_ALLOC
#define yyvsp
Definition: oct-parse.cc:3049
void * malloc(size_t)
octave_tex_tokentype
#define IT
static void yydestruct(const char *yymsg, int yytype, OCTAVE_TEX_STYPE *yyvaluep, text_parser_tex &parser)
#define YYSTACK_FREE
#define SL
#define YY_(Msgid)
text_element * e_base
#define yytable_value_is_error(Yytable_value)
#define YYABORT
#define RM
text_element * parse(const std::string &s)
#define YYTRANSLATE(YYX)