47 #define YYBISON_VERSION "3.0.2"
50 #define YYSKELETON_NAME "yacc.c"
62 #define YYSTYPE OCTAVE_TEX_STYPE
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
72 #line 23 "corefcn/oct-tex-parser.yy"
86 #if defined (GNULIB_NAMESPACE)
90 #define fclose GNULIB_NAMESPACE::fclose
91 #define fprintf GNULIB_NAMESPACE::fprintf
92 #define malloc GNULIB_NAMESPACE::malloc
95 #define scanner parser.get_scanner ()
97 #line 98 "corefcn/oct-tex-parser.cc"
100 # if defined __cplusplus && 201103L <= __cplusplus
101 # define YY_NULLPTR nullptr
103 # define YY_NULLPTR 0
108 #ifdef YYERROR_VERBOSE
109 # undef YYERROR_VERBOSE
110 # define YYERROR_VERBOSE 1
112 # define YYERROR_VERBOSE 0
117 #ifndef YY_OCTAVE_TEX_COREFCN_OCT_TEX_PARSER_H_INCLUDED
118 # define YY_OCTAVE_TEX_COREFCN_OCT_TEX_PARSER_H_INCLUDED
120 #ifndef OCTAVE_TEX_DEBUG
123 # define OCTAVE_TEX_DEBUG 1
125 # define OCTAVE_TEX_DEBUG 0
128 # define OCTAVE_TEX_DEBUG 0
132 extern int octave_tex_debug;
135 #line 54 "corefcn/oct-tex-parser.yy"
138 #line 139 "corefcn/oct-tex-parser.cc"
141 #ifndef OCTAVE_TEX_TOKENTYPE
142 # define OCTAVE_TEX_TOKENTYPE
172 #define COLOR_RGB 265
184 #if ! defined OCTAVE_TEX_STYPE && ! defined OCTAVE_TEX_STYPE_IS_DECLARED
188 #line 56 "corefcn/oct-tex-parser.yy"
202 #line 203 "corefcn/oct-tex-parser.cc"
204 # define OCTAVE_TEX_STYPE_IS_TRIVIAL 1
205 # define OCTAVE_TEX_STYPE_IS_DECLARED 1
216 #line 217 "corefcn/oct-tex-parser.cc"
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
253 # define YYSIZE_T size_t
255 # define YYSIZE_T unsigned int
259 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
262 # if defined YYENABLE_NLS && YYENABLE_NLS
264 # include <libintl.h>
265 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
269 # define YY_(Msgid) Msgid
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)
279 # define YY_ATTRIBUTE(Spec)
283 #ifndef YY_ATTRIBUTE_PURE
284 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
287 #ifndef YY_ATTRIBUTE_UNUSED
288 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
291 #if !defined _Noreturn \
292 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
293 # if defined _MSC_VER && 1200 <= _MSC_VER
294 # define _Noreturn __declspec (noreturn)
296 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
301 #if ! defined lint || defined __GNUC__
302 # define YYUSE(E) ((void) (E))
307 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
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")
316 # define YY_INITIAL_VALUE(Value) Value
318 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
319 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
320 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
322 #ifndef YY_INITIAL_VALUE
323 # define YY_INITIAL_VALUE(Value)
327 #if ! defined yyoverflow || YYERROR_VERBOSE
331 # ifdef YYSTACK_USE_ALLOCA
332 # if YYSTACK_USE_ALLOCA
334 # define YYSTACK_ALLOC __builtin_alloca
335 # elif defined __BUILTIN_VA_ARG_INCR
338 # define YYSTACK_ALLOC __alloca
339 # elif defined _MSC_VER
341 # define alloca _alloca
343 # define YYSTACK_ALLOC alloca
344 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
347 # ifndef EXIT_SUCCESS
348 # define EXIT_SUCCESS 0
355 # ifdef YYSTACK_ALLOC
357 # define YYSTACK_FREE(Ptr) do { ; } while (0)
358 # ifndef YYSTACK_ALLOC_MAXIMUM
363 # define YYSTACK_ALLOC_MAXIMUM 4032
366 # define YYSTACK_ALLOC YYMALLOC
367 # define YYSTACK_FREE YYFREE
368 # ifndef YYSTACK_ALLOC_MAXIMUM
369 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
371 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
372 && ! ((defined YYMALLOC || defined malloc) \
373 && (defined YYFREE || defined free)))
375 # ifndef EXIT_SUCCESS
376 # define EXIT_SUCCESS 0
380 # define YYMALLOC malloc
381 # if ! defined malloc && ! defined EXIT_SUCCESS
387 # if ! defined free && ! defined EXIT_SUCCESS
395 #if (! defined yyoverflow \
396 && (! defined __cplusplus \
397 || (defined OCTAVE_TEX_STYPE_IS_TRIVIAL && OCTAVE_TEX_STYPE_IS_TRIVIAL)))
407 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
411 # define YYSTACK_BYTES(N) \
412 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
413 + YYSTACK_GAP_MAXIMUM)
415 # define YYCOPY_NEEDED 1
422 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
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); \
435 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
439 # if defined __GNUC__ && 1 < __GNUC__
440 # define YYCOPY(Dst, Src, Count) \
441 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
443 # define YYCOPY(Dst, Src, Count) \
447 for (yyi = 0; yyi < (Count); yyi++) \
448 (Dst)[yyi] = (Src)[yyi]; \
472 #define YYMAXUTOK 274
474 #define YYTRANSLATE(YYX) \
475 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
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,
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
522 #if OCTAVE_TEX_DEBUG || YYERROR_VERBOSE || 0
525 static const char *
const yytname[] =
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
542 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
543 265, 266, 267, 268, 269, 270, 271, 272, 273, 274
547 #define YYPACT_NINF -4
549 #define yypact_value_is_default(Yystate) \
550 (!!((Yystate) == (-4)))
552 #define YYTABLE_NINF -1
554 #define yytable_value_is_error(Yytable_value) \
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,
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,
585 -4, 31, 51, -4, -4, -4, -4, 15, 46, 60,
592 -1, 14, 15, 16, 17, 18, 19, 20, 21, 22,
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,
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,
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,
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
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,
656 #define yyerrok (yyerrstatus = 0)
657 #define yyclearin (yychar = YYEMPTY)
661 #define YYACCEPT goto yyacceptlab
662 #define YYABORT goto yyabortlab
663 #define YYERROR goto yyerrorlab
666 #define YYRECOVERING() (!!yyerrstatus)
668 #define YYBACKUP(Token, Value) \
670 if (yychar == YYEMPTY) \
674 YYPOPSTACK (yylen); \
680 yyerror (parser, YY_("syntax error: cannot back up")); \
687 #define YYERRCODE 256
696 # define YYFPRINTF fprintf
699 # define YYDPRINTF(Args) \
706 #ifndef YY_LOCATION_PRINT
707 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
711 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
715 YYFPRINTF (stderr, "%s ", Title); \
716 yy_symbol_print (stderr, \
717 Type, Value, parser); \
718 YYFPRINTF (stderr, "\n"); \
730 FILE *yyo = yyoutput;
737 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
750 YYFPRINTF (yyoutput,
"%s %s (",
751 yytype <
YYNTOKENS ?
"token" :
"nterm", yytname[yytype]);
753 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser);
754 YYFPRINTF (yyoutput,
")");
765 YYFPRINTF (stderr,
"Stack now");
766 for (; yybottom <= yytop; yybottom++)
768 int yybot = *yybottom;
769 YYFPRINTF (stderr,
" %d", yybot);
771 YYFPRINTF (stderr,
"\n");
774 # define YY_STACK_PRINT(Bottom, Top) \
777 yy_stack_print ((Bottom), (Top)); \
788 unsigned long int yylno = yyrline[yyrule];
789 int yynrhs =
yyr2[yyrule];
791 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
794 for (yyi = 0; yyi < yynrhs; yyi++)
796 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
797 yy_symbol_print (stderr,
798 yystos[yyssp[yyi + 1 - yynrhs]],
799 &(yyvsp[(yyi + 1) - (yynrhs)])
801 YYFPRINTF (stderr,
"\n");
805 # define YY_REDUCE_PRINT(Rule) \
808 yy_reduce_print (yyssp, yyvsp, Rule, parser); \
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)
824 # define YYINITDEPTH 200
835 # define YYMAXDEPTH 10000
842 # if defined __GLIBC__ && defined _STRING_H
843 # define yystrlen strlen
847 yystrlen (
const char *yystr)
850 for (yylen = 0; yystr[yylen]; yylen++)
858 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
859 # define yystpcpy stpcpy
864 yystpcpy (
char *yydest,
const char *yysrc)
867 const char *yys = yysrc;
869 while ((*yyd++ = *yys++) !=
'\0')
886 yytnamerr (
char *yyres,
const char *yystr)
891 char const *yyp = yystr;
898 goto do_not_strip_quotes;
902 goto do_not_strip_quotes;
915 do_not_strip_quotes: ;
919 return yystrlen (yystr);
921 return yystpcpy (yyres, yystr) - yyres;
934 yysyntax_error (
YYSIZE_T *yymsg_alloc,
char **yymsg,
939 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
943 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
974 yyarg[yycount++] = yytname[yytoken];
980 int yyxbegin = yyn < 0 ? -yyn : 0;
982 int yychecklim =
YYLAST - yyn + 1;
986 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
990 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
996 yyarg[yycount++] = yytname[yyx];
999 if (! (yysize <= yysize1
1010 # define YYCASE_(N, S) \
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"));
1024 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1030 if (*yymsg_alloc < yysize)
1032 *yymsg_alloc = 2 * yysize;
1033 if (! (yysize <= *yymsg_alloc
1045 while ((*yyp = *yyformat) !=
'\0')
1046 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1048 yyp += yytnamerr (yyp, yyarg[yyi++]);
1078 #line 85 "corefcn/oct-tex-parser.yy"
1080 #line 1081 "corefcn/oct-tex-parser.cc"
1084 #line 85 "corefcn/oct-tex-parser.yy"
1086 #line 1087 "corefcn/oct-tex-parser.cc"
1090 #line 85 "corefcn/oct-tex-parser.yy"
1092 #line 1093 "corefcn/oct-tex-parser.cc"
1096 #line 86 "corefcn/oct-tex-parser.yy"
1097 {
delete ((*yyvaluep).str); }
1098 #line 1099 "corefcn/oct-tex-parser.cc"
1102 #line 86 "corefcn/oct-tex-parser.yy"
1103 {
delete ((*yyvaluep).e_base); }
1104 #line 1105 "corefcn/oct-tex-parser.cc"
1108 #line 86 "corefcn/oct-tex-parser.yy"
1109 {
delete ((*yyvaluep).e_base); }
1110 #line 1111 "corefcn/oct-tex-parser.cc"
1114 #line 86 "corefcn/oct-tex-parser.yy"
1115 {
delete ((*yyvaluep).e_base); }
1116 #line 1117 "corefcn/oct-tex-parser.cc"
1120 #line 86 "corefcn/oct-tex-parser.yy"
1121 {
delete ((*yyvaluep).e_base); }
1122 #line 1123 "corefcn/oct-tex-parser.cc"
1126 #line 86 "corefcn/oct-tex-parser.yy"
1127 {
delete ((*yyvaluep).e_base); }
1128 #line 1129 "corefcn/oct-tex-parser.cc"
1132 #line 86 "corefcn/oct-tex-parser.yy"
1133 {
delete ((*yyvaluep).e_base); }
1134 #line 1135 "corefcn/oct-tex-parser.cc"
1138 #line 86 "corefcn/oct-tex-parser.yy"
1139 {
delete ((*yyvaluep).e_base); }
1140 #line 1141 "corefcn/oct-tex-parser.cc"
1144 #line 86 "corefcn/oct-tex-parser.yy"
1145 {
delete ((*yyvaluep).e_base); }
1146 #line 1147 "corefcn/oct-tex-parser.cc"
1150 #line 86 "corefcn/oct-tex-parser.yy"
1151 {
delete ((*yyvaluep).e_base); }
1152 #line 1153 "corefcn/oct-tex-parser.cc"
1156 #line 86 "corefcn/oct-tex-parser.yy"
1157 {
delete ((*yyvaluep).e_list); }
1158 #line 1159 "corefcn/oct-tex-parser.cc"
1162 #line 86 "corefcn/oct-tex-parser.yy"
1163 {
delete ((*yyvaluep).e_list); }
1164 #line 1165 "corefcn/oct-tex-parser.cc"
1231 char *yymsg = yymsgbuf;
1232 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1235 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1241 yyssp = yyss =
yyssa;
1242 yyvsp = yyvs =
yyvsa;
1245 YYDPRINTF ((stderr,
"Starting parse\n"));
1264 if (yyss + yystacksize - 1 <= yyssp)
1267 YYSIZE_T yysize = yyssp - yyss + 1;
1281 yyoverflow (
YY_(
"memory exhausted"),
1282 &yyss1, yysize *
sizeof (*yyssp),
1283 &yyvs1, yysize *
sizeof (*yyvsp),
1290 # ifndef YYSTACK_RELOCATE
1291 goto yyexhaustedlab;
1295 goto yyexhaustedlab;
1305 goto yyexhaustedlab;
1308 # undef YYSTACK_RELOCATE
1315 yyssp = yyss + yysize - 1;
1316 yyvsp = yyvs + yysize - 1;
1318 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1319 (
unsigned long int) yystacksize));
1321 if (yyss + yystacksize - 1 <= yyssp)
1325 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1350 YYDPRINTF ((stderr,
"Reading a token: "));
1354 if (yychar <=
YYEOF)
1356 yychar = yytoken =
YYEOF;
1357 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1423 yyval = yyvsp[1-yylen];
1430 #line 99 "corefcn/oct-tex-parser.yy"
1431 { (yyval.str) =
new std::string (1, (yyvsp[0].ch)); }
1432 #line 1433 "corefcn/oct-tex-parser.cc"
1436 #line 101 "corefcn/oct-tex-parser.yy"
1437 { (yyvsp[-1].str)->append (1, (yyvsp[0].ch)); (yyval.str) = (yyvsp[-1].str); }
1438 #line 1439 "corefcn/oct-tex-parser.cc"
1442 #line 105 "corefcn/oct-tex-parser.yy"
1444 #line 1445 "corefcn/oct-tex-parser.cc"
1448 #line 109 "corefcn/oct-tex-parser.yy"
1450 #line 1451 "corefcn/oct-tex-parser.cc"
1454 #line 111 "corefcn/oct-tex-parser.yy"
1456 #line 1457 "corefcn/oct-tex-parser.cc"
1460 #line 113 "corefcn/oct-tex-parser.yy"
1462 #line 1463 "corefcn/oct-tex-parser.cc"
1466 #line 115 "corefcn/oct-tex-parser.yy"
1468 #line 1469 "corefcn/oct-tex-parser.cc"
1472 #line 119 "corefcn/oct-tex-parser.yy"
1474 #line 1475 "corefcn/oct-tex-parser.cc"
1478 #line 123 "corefcn/oct-tex-parser.yy"
1481 delete (yyvsp[-1].str);
1483 #line 1484 "corefcn/oct-tex-parser.cc"
1487 #line 130 "corefcn/oct-tex-parser.yy"
1490 delete (yyvsp[-1].str);
1492 #line 1493 "corefcn/oct-tex-parser.cc"
1496 #line 135 "corefcn/oct-tex-parser.yy"
1498 (yyval.e_base) =
new text_element_color ((yyvsp[-3].num), (yyvsp[-2].num), (yyvsp[-1].num));
1500 #line 1501 "corefcn/oct-tex-parser.cc"
1504 #line 141 "corefcn/oct-tex-parser.yy"
1507 delete (yyvsp[0].str);
1509 #line 1510 "corefcn/oct-tex-parser.cc"
1513 #line 147 "corefcn/oct-tex-parser.yy"
1514 { (yyval.e_base) = (yyvsp[0].e_list); }
1515 #line 1516 "corefcn/oct-tex-parser.cc"
1519 #line 159 "corefcn/oct-tex-parser.yy"
1521 #line 1522 "corefcn/oct-tex-parser.cc"
1525 #line 161 "corefcn/oct-tex-parser.yy"
1527 #line 1528 "corefcn/oct-tex-parser.cc"
1531 #line 163 "corefcn/oct-tex-parser.yy"
1533 #line 1534 "corefcn/oct-tex-parser.cc"
1537 #line 167 "corefcn/oct-tex-parser.yy"
1539 #line 1540 "corefcn/oct-tex-parser.cc"
1543 #line 169 "corefcn/oct-tex-parser.yy"
1545 #line 1546 "corefcn/oct-tex-parser.cc"
1549 #line 171 "corefcn/oct-tex-parser.yy"
1551 #line 1552 "corefcn/oct-tex-parser.cc"
1555 #line 175 "corefcn/oct-tex-parser.yy"
1557 #line 1558 "corefcn/oct-tex-parser.cc"
1561 #line 177 "corefcn/oct-tex-parser.yy"
1563 #line 1564 "corefcn/oct-tex-parser.cc"
1567 #line 181 "corefcn/oct-tex-parser.yy"
1569 #line 1570 "corefcn/oct-tex-parser.cc"
1573 #line 183 "corefcn/oct-tex-parser.yy"
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"
1579 #line 187 "corefcn/oct-tex-parser.yy"
1580 { (yyval.e_list) = (yyvsp[-1].e_list); }
1581 #line 1582 "corefcn/oct-tex-parser.cc"
1585 #line 189 "corefcn/oct-tex-parser.yy"
1587 #line 1588 "corefcn/oct-tex-parser.cc"
1591 #line 193 "corefcn/oct-tex-parser.yy"
1593 #line 1594 "corefcn/oct-tex-parser.cc"
1597 #line 195 "corefcn/oct-tex-parser.yy"
1599 #line 1600 "corefcn/oct-tex-parser.cc"
1603 #line 1604 "corefcn/oct-tex-parser.cc"
1632 if (0 <= yystate && yystate <=
YYLAST &&
yycheck[yystate] == *yyssp)
1652 #if ! YYERROR_VERBOSE
1655 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1658 char const *yymsgp =
YY_(
"syntax error");
1659 int yysyntax_error_status;
1660 yysyntax_error_status = YYSYNTAX_ERROR;
1661 if (yysyntax_error_status == 0)
1663 else if (yysyntax_error_status == 1)
1665 if (yymsg != yymsgbuf)
1671 yymsg_alloc =
sizeof yymsgbuf;
1672 yysyntax_error_status = 2;
1676 yysyntax_error_status = YYSYNTAX_ERROR;
1681 if (yysyntax_error_status == 2)
1682 goto yyexhaustedlab;
1684 # undef YYSYNTAX_ERROR
1690 if (yyerrstatus == 3)
1695 if (yychar <=
YYEOF)
1698 if (yychar ==
YYEOF)
1704 yytoken, &
yylval, parser);
1760 yystos[yystate], yyvsp, parser);
1792 #if !defined yyoverflow || YYERROR_VERBOSE
1809 yytoken, &
yylval, parser);
1815 while (yyssp != yyss)
1818 yystos[*yyssp], yyvsp, parser);
1826 if (yymsg != yymsgbuf)
1831 #line 198 "corefcn/oct-tex-parser.yy"
1837 octave_tex_debug = 0;
1853 fprintf (stderr,
"TeX parse error: %s\n", s);
static const yytype_int8 yycheck[]
#define YYSTACK_ALLOC_MAXIMUM
bool init_lexer(const std::string &s)
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
text_element_list * e_list
static const yytype_uint8 yytable[]
static const yytype_uint8 yydefact[]
OCTAVE_TEX_STYPE yyvs_alloc
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)
static const yytype_uint8 yytranslate[]
This class gets nodes and searchs inside of 'info files'.
#define yypact_value_is_default(Yystate)
unsigned short int yytype_uint16
static const yytype_uint8 yyr2[]
static const yytype_int8 yypgoto[]
#define YY_INITIAL_VALUE(Value)
unsigned char yytype_uint8
int octave_tex_parse(text_parser_tex &parser)
static const yytype_uint8 yyr1[]
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YY_STACK_PRINT(Bottom, Top)
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
static const yytype_uint8 yystos[]
#define YY_REDUCE_PRINT(Rule)
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
static void yydestruct(const char *yymsg, int yytype, OCTAVE_TEX_STYPE *yyvaluep, text_parser_tex &parser)
#define yytable_value_is_error(Yytable_value)
text_element * parse(const std::string &s)