47 #define YYBISON_VERSION "3.0.4"
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 "libinterp/corefcn/oct-tex-parser.yy"
77 #if defined (HAVE_CONFIG_H)
87 #define scanner parser.get_scanner ()
88 #define yyalloc octave_tex_yyalloc
90 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
94 #pragma GCC diagnostic push
95 #pragma GCC diagnostic ignored "-Wold-style-cast"
99 #line 100 "libinterp/corefcn/oct-tex-parser.cc"
102 # if defined __cplusplus && 201103L <= __cplusplus
103 # define YY_NULLPTR nullptr
105 # define YY_NULLPTR 0
110 #ifdef YYERROR_VERBOSE
111 # undef YYERROR_VERBOSE
112 # define YYERROR_VERBOSE 1
114 # define YYERROR_VERBOSE 0
119 #ifndef YY_OCTAVE_TEX_LIBINTERP_COREFCN_OCT_TEX_PARSER_H_INCLUDED
120 # define YY_OCTAVE_TEX_LIBINTERP_COREFCN_OCT_TEX_PARSER_H_INCLUDED
122 #ifndef OCTAVE_TEX_DEBUG
125 # define OCTAVE_TEX_DEBUG 1
127 # define OCTAVE_TEX_DEBUG 0
130 # define OCTAVE_TEX_DEBUG 0
134 extern int octave_tex_debug;
137 #line 56 "libinterp/corefcn/oct-tex-parser.yy"
140 #line 141 "libinterp/corefcn/oct-tex-parser.cc"
143 #ifndef OCTAVE_TEX_TOKENTYPE
144 # define OCTAVE_TEX_TOKENTYPE
174 #define COLOR_RGB 265
186 #if ! defined OCTAVE_TEX_STYPE && ! defined OCTAVE_TEX_STYPE_IS_DECLARED
190 #line 59 "libinterp/corefcn/oct-tex-parser.yy"
204 #line 205 "libinterp/corefcn/oct-tex-parser.cc"
208 # define OCTAVE_TEX_STYPE_IS_TRIVIAL 1
209 # define OCTAVE_TEX_STYPE_IS_DECLARED 1
220 #line 221 "libinterp/corefcn/oct-tex-parser.cc"
251 # ifdef __SIZE_TYPE__
252 # define YYSIZE_T __SIZE_TYPE__
253 # elif defined size_t
254 # define YYSIZE_T size_t
255 # elif ! defined YYSIZE_T
257 # define YYSIZE_T size_t
259 # define YYSIZE_T unsigned int
263 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
266 # if defined YYENABLE_NLS && YYENABLE_NLS
268 # include <libintl.h>
269 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
273 # define YY_(Msgid) Msgid
278 # if (defined __GNUC__ \
279 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
280 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
281 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
283 # define YY_ATTRIBUTE(Spec)
287 #ifndef YY_ATTRIBUTE_PURE
288 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
291 #ifndef YY_ATTRIBUTE_UNUSED
292 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
295 #if !defined _Noreturn \
296 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
297 # if defined _MSC_VER && 1200 <= _MSC_VER
298 # define _Noreturn __declspec (noreturn)
300 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
305 #if ! defined lint || defined __GNUC__
306 # define YYUSE(E) ((void) (E))
311 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
313 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
314 _Pragma ("GCC diagnostic push") \
315 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
316 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
317 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
318 _Pragma ("GCC diagnostic pop")
320 # define YY_INITIAL_VALUE(Value) Value
322 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
323 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
324 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
326 #ifndef YY_INITIAL_VALUE
327 # define YY_INITIAL_VALUE(Value)
331 #if ! defined yyoverflow || YYERROR_VERBOSE
335 # ifdef YYSTACK_USE_ALLOCA
336 # if YYSTACK_USE_ALLOCA
338 # define YYSTACK_ALLOC __builtin_alloca
339 # elif defined __BUILTIN_VA_ARG_INCR
342 # define YYSTACK_ALLOC __alloca
343 # elif defined _MSC_VER
345 # define alloca _alloca
347 # define YYSTACK_ALLOC alloca
348 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
351 # ifndef EXIT_SUCCESS
352 # define EXIT_SUCCESS 0
359 # ifdef YYSTACK_ALLOC
361 # define YYSTACK_FREE(Ptr) do { ; } while (0)
362 # ifndef YYSTACK_ALLOC_MAXIMUM
367 # define YYSTACK_ALLOC_MAXIMUM 4032
370 # define YYSTACK_ALLOC YYMALLOC
371 # define YYSTACK_FREE YYFREE
372 # ifndef YYSTACK_ALLOC_MAXIMUM
373 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
375 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
376 && ! ((defined YYMALLOC || defined malloc) \
377 && (defined YYFREE || defined free)))
379 # ifndef EXIT_SUCCESS
380 # define EXIT_SUCCESS 0
384 # define YYMALLOC malloc
385 # if ! defined malloc && ! defined EXIT_SUCCESS
391 # if ! defined free && ! defined EXIT_SUCCESS
399 #if (! defined yyoverflow \
400 && (! defined __cplusplus \
401 || (defined OCTAVE_TEX_STYPE_IS_TRIVIAL && OCTAVE_TEX_STYPE_IS_TRIVIAL)))
411 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
415 # define YYSTACK_BYTES(N) \
416 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
417 + YYSTACK_GAP_MAXIMUM)
419 # define YYCOPY_NEEDED 1
426 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
429 YYSIZE_T yynewbytes; \
430 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
431 Stack = &yyptr->Stack_alloc; \
432 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
433 yyptr += yynewbytes / sizeof (*yyptr); \
439 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
443 # if defined __GNUC__ && 1 < __GNUC__
444 # define YYCOPY(Dst, Src, Count) \
445 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
447 # define YYCOPY(Dst, Src, Count) \
451 for (yyi = 0; yyi < (Count); yyi++) \
452 (Dst)[yyi] = (Src)[yyi]; \
476 #define YYMAXUTOK 274
478 #define YYTRANSLATE(YYX) \
479 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
485 0, 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, 2, 2, 2, 2,
507 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
508 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
509 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
510 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
511 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
519 0, 102, 102, 104, 108, 112, 114, 116, 118, 122,
520 126, 133, 138, 144, 149, 151, 152, 153, 154, 155,
521 156, 157, 158, 161, 163, 165, 169, 171, 173, 177,
522 179, 183, 185, 189, 191, 196, 197
526 #if OCTAVE_TEX_DEBUG || YYERROR_VERBOSE || 0
529 static const char *
const yytname[] =
531 "$end",
"error",
"$undefined",
"BF",
"IT",
"SL",
"RM",
"FONTNAME",
532 "FONTSIZE",
"COLOR",
"COLOR_RGB",
"START",
"END",
"SUPER",
"SUB",
"CH",
533 "NUM",
"SYM",
"SCRIPT",
"STR",
"$accept",
"simple_string",
534 "symbol_element",
"font_modifier_element",
"fontsize_element",
535 "fontname_element",
"color_element",
"string_element",
536 "superscript_element",
"subscript_element",
"combined_script_element",
537 "string_element_list",
"scoped_string_element_list",
"string",
YY_NULLPTR
546 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
547 265, 266, 267, 268, 269, 270, 271, 272, 273, 274
551 #define YYPACT_NINF -4
553 #define yypact_value_is_default(Yystate) \
554 (!!((Yystate) == (-4)))
556 #define YYTABLE_NINF -1
558 #define yytable_value_is_error(Yytable_value) \
565 27, -4, -4, -4, -4, 2, 17, 32, 37, -3,
566 34, 35, -4, -4, 40, -4, -4, -4, -4, -4,
567 -4, 45, 52, -4, 27, -4, 66, 54, 55, 54,
568 56, -4, 12, -4, -4, -4, -4, -4, -4, -4,
569 -4, -4, -4, -4, 41, 58, 42, 57, -4, -4,
578 35, 5, 6, 7, 8, 0, 0, 0, 0, 0,
579 0, 0, 2, 4, 13, 15, 16, 17, 18, 19,
580 31, 20, 21, 22, 36, 14, 0, 0, 0, 0,
581 0, 34, 0, 23, 25, 24, 26, 28, 27, 3,
582 30, 29, 32, 1, 0, 0, 0, 0, 33, 10,
589 -4, 31, 51, -4, -4, -4, -4, 15, 46, 60,
596 -1, 14, 15, 16, 17, 18, 19, 20, 21, 22,
605 1, 2, 3, 4, 5, 6, 7, 8, 9, 31,
606 10, 11, 12, 27, 13, 1, 2, 3, 4, 5,
607 6, 7, 8, 9, 48, 10, 11, 12, 28, 13,
608 1, 2, 3, 4, 5, 6, 7, 8, 9, 42,
609 10, 11, 12, 29, 13, 9, 9, 42, 30, 33,
610 36, 13, 13, 49, 51, 39, 39, 39, 44, 11,
611 46, 34, 37, 35, 38, 10, 43, 0, 41, 12,
612 50, 45, 47, 52, 54, 53, 32, 0, 0, 0,
618 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
619 13, 14, 15, 11, 17, 3, 4, 5, 6, 7,
620 8, 9, 10, 11, 12, 13, 14, 15, 11, 17,
621 3, 4, 5, 6, 7, 8, 9, 10, 11, 24,
622 13, 14, 15, 11, 17, 11, 11, 32, 11, 15,
623 15, 17, 17, 12, 12, 15, 15, 15, 27, 14,
624 29, 10, 11, 10, 11, 13, 0, -1, 22, 15,
625 12, 16, 16, 16, 12, 16, 9, -1, -1, -1,
633 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
634 13, 14, 15, 17, 21, 22, 23, 24, 25, 26,
635 27, 28, 29, 30, 31, 32, 33, 11, 11, 11,
636 11, 12, 31, 15, 22, 32, 15, 22, 32, 15,
637 29, 28, 27, 0, 21, 16, 21, 16, 12, 12,
644 0, 20, 21, 21, 22, 23, 23, 23, 23, 24,
645 25, 26, 26, 27, 27, 27, 27, 27, 27, 27,
646 27, 27, 27, 28, 28, 28, 29, 29, 29, 30,
647 30, 31, 31, 32, 32, 33, 33
653 0, 2, 1, 2, 1, 1, 1, 1, 1, 4,
654 4, 4, 6, 1, 1, 1, 1, 1, 1, 1,
655 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,
660 #define yyerrok (yyerrstatus = 0)
661 #define yyclearin (yychar = YYEMPTY)
665 #define YYACCEPT goto yyacceptlab
666 #define YYABORT goto yyabortlab
667 #define YYERROR goto yyerrorlab
670 #define YYRECOVERING() (!!yyerrstatus)
672 #define YYBACKUP(Token, Value) \
674 if (yychar == YYEMPTY) \
678 YYPOPSTACK (yylen); \
684 yyerror (parser, YY_("syntax error: cannot back up")); \
691 #define YYERRCODE 256
700 # define YYFPRINTF fprintf
703 # define YYDPRINTF(Args) \
710 #ifndef YY_LOCATION_PRINT
711 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
715 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
719 YYFPRINTF (stderr, "%s ", Title); \
720 yy_symbol_print (stderr, \
721 Type, Value, parser); \
722 YYFPRINTF (stderr, "\n"); \
734 FILE *yyo = yyoutput;
741 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
754 YYFPRINTF (yyoutput,
"%s %s (",
755 yytype <
YYNTOKENS ?
"token" :
"nterm", yytname[yytype]);
757 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser);
758 YYFPRINTF (yyoutput,
")");
769 YYFPRINTF (stderr,
"Stack now");
770 for (; yybottom <= yytop; yybottom++)
772 int yybot = *yybottom;
773 YYFPRINTF (stderr,
" %d", yybot);
775 YYFPRINTF (stderr,
"\n");
778 # define YY_STACK_PRINT(Bottom, Top) \
781 yy_stack_print ((Bottom), (Top)); \
792 unsigned long int yylno = yyrline[yyrule];
793 int yynrhs =
yyr2[yyrule];
795 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
798 for (yyi = 0; yyi < yynrhs; yyi++)
800 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
801 yy_symbol_print (stderr,
802 yystos[yyssp[yyi + 1 - yynrhs]],
803 &(yyvsp[(yyi + 1) - (yynrhs)])
805 YYFPRINTF (stderr,
"\n");
809 # define YY_REDUCE_PRINT(Rule) \
812 yy_reduce_print (yyssp, yyvsp, Rule, parser); \
819 # define YYDPRINTF(Args)
820 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
821 # define YY_STACK_PRINT(Bottom, Top)
822 # define YY_REDUCE_PRINT(Rule)
828 # define YYINITDEPTH 200
839 # define YYMAXDEPTH 10000
846 # if defined __GLIBC__ && defined _STRING_H
847 # define yystrlen strlen
851 yystrlen (
const char *yystr)
854 for (yylen = 0; yystr[yylen]; yylen++)
862 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
863 # define yystpcpy stpcpy
868 yystpcpy (
char *yydest,
const char *yysrc)
871 const char *yys = yysrc;
873 while ((*yyd++ = *yys++) !=
'\0')
890 yytnamerr (
char *yyres,
const char *yystr)
895 char const *yyp = yystr;
902 goto do_not_strip_quotes;
906 goto do_not_strip_quotes;
919 do_not_strip_quotes: ;
923 return yystrlen (yystr);
925 return yystpcpy (yyres, yystr) - yyres;
938 yysyntax_error (
YYSIZE_T *yymsg_alloc,
char **yymsg,
943 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
947 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
978 yyarg[yycount++] = yytname[yytoken];
984 int yyxbegin = yyn < 0 ? -yyn : 0;
986 int yychecklim =
YYLAST - yyn + 1;
990 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
994 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1000 yyarg[yycount++] = yytname[yyx];
1003 if (! (yysize <= yysize1
1014 # define YYCASE_(N, S) \
1018 YYCASE_(0,
YY_(
"syntax error"));
1019 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
1020 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1021 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1022 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1023 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1028 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1034 if (*yymsg_alloc < yysize)
1036 *yymsg_alloc = 2 * yysize;
1037 if (! (yysize <= *yymsg_alloc
1049 while ((*yyp = *yyformat) !=
'\0')
1050 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1052 yyp += yytnamerr (yyp, yyarg[yyi++]);
1082 #line 89 "libinterp/corefcn/oct-tex-parser.yy"
1084 #line 1085 "libinterp/corefcn/oct-tex-parser.cc"
1088 #line 89 "libinterp/corefcn/oct-tex-parser.yy"
1090 #line 1091 "libinterp/corefcn/oct-tex-parser.cc"
1094 #line 89 "libinterp/corefcn/oct-tex-parser.yy"
1096 #line 1097 "libinterp/corefcn/oct-tex-parser.cc"
1100 #line 90 "libinterp/corefcn/oct-tex-parser.yy"
1101 {
delete ((*yyvaluep).str); }
1102 #line 1103 "libinterp/corefcn/oct-tex-parser.cc"
1106 #line 90 "libinterp/corefcn/oct-tex-parser.yy"
1107 {
delete ((*yyvaluep).e_base); }
1108 #line 1109 "libinterp/corefcn/oct-tex-parser.cc"
1112 #line 90 "libinterp/corefcn/oct-tex-parser.yy"
1113 {
delete ((*yyvaluep).e_base); }
1114 #line 1115 "libinterp/corefcn/oct-tex-parser.cc"
1118 #line 90 "libinterp/corefcn/oct-tex-parser.yy"
1119 {
delete ((*yyvaluep).e_base); }
1120 #line 1121 "libinterp/corefcn/oct-tex-parser.cc"
1124 #line 90 "libinterp/corefcn/oct-tex-parser.yy"
1125 {
delete ((*yyvaluep).e_base); }
1126 #line 1127 "libinterp/corefcn/oct-tex-parser.cc"
1130 #line 90 "libinterp/corefcn/oct-tex-parser.yy"
1131 {
delete ((*yyvaluep).e_base); }
1132 #line 1133 "libinterp/corefcn/oct-tex-parser.cc"
1136 #line 90 "libinterp/corefcn/oct-tex-parser.yy"
1137 {
delete ((*yyvaluep).e_base); }
1138 #line 1139 "libinterp/corefcn/oct-tex-parser.cc"
1142 #line 90 "libinterp/corefcn/oct-tex-parser.yy"
1143 {
delete ((*yyvaluep).e_base); }
1144 #line 1145 "libinterp/corefcn/oct-tex-parser.cc"
1148 #line 90 "libinterp/corefcn/oct-tex-parser.yy"
1149 {
delete ((*yyvaluep).e_base); }
1150 #line 1151 "libinterp/corefcn/oct-tex-parser.cc"
1154 #line 90 "libinterp/corefcn/oct-tex-parser.yy"
1155 {
delete ((*yyvaluep).e_base); }
1156 #line 1157 "libinterp/corefcn/oct-tex-parser.cc"
1160 #line 90 "libinterp/corefcn/oct-tex-parser.yy"
1161 {
delete ((*yyvaluep).e_list); }
1162 #line 1163 "libinterp/corefcn/oct-tex-parser.cc"
1166 #line 90 "libinterp/corefcn/oct-tex-parser.yy"
1167 {
delete ((*yyvaluep).e_list); }
1168 #line 1169 "libinterp/corefcn/oct-tex-parser.cc"
1235 char *yymsg = yymsgbuf;
1236 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1239 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1245 yyssp = yyss =
yyssa;
1246 yyvsp = yyvs =
yyvsa;
1249 YYDPRINTF ((stderr,
"Starting parse\n"));
1268 if (yyss + yystacksize - 1 <= yyssp)
1271 YYSIZE_T yysize = yyssp - yyss + 1;
1285 yyoverflow (
YY_(
"memory exhausted"),
1286 &yyss1, yysize *
sizeof (*yyssp),
1287 &yyvs1, yysize *
sizeof (*yyvsp),
1294 # ifndef YYSTACK_RELOCATE
1295 goto yyexhaustedlab;
1299 goto yyexhaustedlab;
1309 goto yyexhaustedlab;
1312 # undef YYSTACK_RELOCATE
1319 yyssp = yyss + yysize - 1;
1320 yyvsp = yyvs + yysize - 1;
1322 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1323 (
unsigned long int) yystacksize));
1325 if (yyss + yystacksize - 1 <= yyssp)
1329 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1354 YYDPRINTF ((stderr,
"Reading a token: "));
1358 if (yychar <=
YYEOF)
1360 yychar = yytoken =
YYEOF;
1361 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1427 yyval = yyvsp[1-yylen];
1434 #line 103 "libinterp/corefcn/oct-tex-parser.yy"
1435 { (yyval.str) =
new std::string (1, (yyvsp[0].ch)); }
1436 #line 1437 "libinterp/corefcn/oct-tex-parser.cc"
1440 #line 105 "libinterp/corefcn/oct-tex-parser.yy"
1441 { (yyvsp[-1].str)->
append (1, (yyvsp[0].ch)); (yyval.str) = (yyvsp[-1].
str); }
1442 #line 1443 "libinterp/corefcn/oct-tex-parser.cc"
1446 #line 109 "libinterp/corefcn/oct-tex-parser.yy"
1448 #line 1449 "libinterp/corefcn/oct-tex-parser.cc"
1452 #line 113 "libinterp/corefcn/oct-tex-parser.yy"
1454 #line 1455 "libinterp/corefcn/oct-tex-parser.cc"
1458 #line 115 "libinterp/corefcn/oct-tex-parser.yy"
1460 #line 1461 "libinterp/corefcn/oct-tex-parser.cc"
1464 #line 117 "libinterp/corefcn/oct-tex-parser.yy"
1466 #line 1467 "libinterp/corefcn/oct-tex-parser.cc"
1470 #line 119 "libinterp/corefcn/oct-tex-parser.yy"
1472 #line 1473 "libinterp/corefcn/oct-tex-parser.cc"
1476 #line 123 "libinterp/corefcn/oct-tex-parser.yy"
1478 #line 1479 "libinterp/corefcn/oct-tex-parser.cc"
1482 #line 127 "libinterp/corefcn/oct-tex-parser.yy"
1485 delete (yyvsp[-1].str);
1487 #line 1488 "libinterp/corefcn/oct-tex-parser.cc"
1491 #line 134 "libinterp/corefcn/oct-tex-parser.yy"
1494 delete (yyvsp[-1].str);
1496 #line 1497 "libinterp/corefcn/oct-tex-parser.cc"
1500 #line 139 "libinterp/corefcn/oct-tex-parser.yy"
1502 (yyval.e_base) =
new text_element_color ((yyvsp[-3].num), (yyvsp[-2].num), (yyvsp[-1].num));
1504 #line 1505 "libinterp/corefcn/oct-tex-parser.cc"
1508 #line 145 "libinterp/corefcn/oct-tex-parser.yy"
1511 delete (yyvsp[0].str);
1513 #line 1514 "libinterp/corefcn/oct-tex-parser.cc"
1517 #line 150 "libinterp/corefcn/oct-tex-parser.yy"
1518 { (yyval.e_base) = (yyvsp[0].e_list); }
1519 #line 1520 "libinterp/corefcn/oct-tex-parser.cc"
1523 #line 162 "libinterp/corefcn/oct-tex-parser.yy"
1525 #line 1526 "libinterp/corefcn/oct-tex-parser.cc"
1529 #line 164 "libinterp/corefcn/oct-tex-parser.yy"
1531 #line 1532 "libinterp/corefcn/oct-tex-parser.cc"
1535 #line 166 "libinterp/corefcn/oct-tex-parser.yy"
1537 #line 1538 "libinterp/corefcn/oct-tex-parser.cc"
1541 #line 170 "libinterp/corefcn/oct-tex-parser.yy"
1543 #line 1544 "libinterp/corefcn/oct-tex-parser.cc"
1547 #line 172 "libinterp/corefcn/oct-tex-parser.yy"
1549 #line 1550 "libinterp/corefcn/oct-tex-parser.cc"
1553 #line 174 "libinterp/corefcn/oct-tex-parser.yy"
1555 #line 1556 "libinterp/corefcn/oct-tex-parser.cc"
1559 #line 178 "libinterp/corefcn/oct-tex-parser.yy"
1561 #line 1562 "libinterp/corefcn/oct-tex-parser.cc"
1565 #line 180 "libinterp/corefcn/oct-tex-parser.yy"
1567 #line 1568 "libinterp/corefcn/oct-tex-parser.cc"
1571 #line 184 "libinterp/corefcn/oct-tex-parser.yy"
1573 #line 1574 "libinterp/corefcn/oct-tex-parser.cc"
1577 #line 186 "libinterp/corefcn/oct-tex-parser.yy"
1578 { (yyvsp[-1].e_list)->push_back ((yyvsp[0].e_base)); (yyval.e_list) = (yyvsp[-1].e_list); }
1579 #line 1580 "libinterp/corefcn/oct-tex-parser.cc"
1583 #line 190 "libinterp/corefcn/oct-tex-parser.yy"
1584 { (yyval.e_list) = (yyvsp[-1].e_list); }
1585 #line 1586 "libinterp/corefcn/oct-tex-parser.cc"
1589 #line 192 "libinterp/corefcn/oct-tex-parser.yy"
1591 #line 1592 "libinterp/corefcn/oct-tex-parser.cc"
1595 #line 196 "libinterp/corefcn/oct-tex-parser.yy"
1597 #line 1598 "libinterp/corefcn/oct-tex-parser.cc"
1601 #line 198 "libinterp/corefcn/oct-tex-parser.yy"
1603 #line 1604 "libinterp/corefcn/oct-tex-parser.cc"
1607 #line 1608 "libinterp/corefcn/oct-tex-parser.cc"
1636 if (0 <= yystate && yystate <=
YYLAST &&
yycheck[yystate] == *yyssp)
1656 #if ! YYERROR_VERBOSE
1659 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1662 char const *yymsgp =
YY_(
"syntax error");
1663 int yysyntax_error_status;
1664 yysyntax_error_status = YYSYNTAX_ERROR;
1665 if (yysyntax_error_status == 0)
1667 else if (yysyntax_error_status == 1)
1669 if (yymsg != yymsgbuf)
1675 yymsg_alloc =
sizeof yymsgbuf;
1676 yysyntax_error_status = 2;
1680 yysyntax_error_status = YYSYNTAX_ERROR;
1685 if (yysyntax_error_status == 2)
1686 goto yyexhaustedlab;
1688 # undef YYSYNTAX_ERROR
1694 if (yyerrstatus == 3)
1699 if (yychar <=
YYEOF)
1702 if (yychar ==
YYEOF)
1708 yytoken, &
yylval, parser);
1764 yystos[yystate], yyvsp, parser);
1796 #if !defined yyoverflow || YYERROR_VERBOSE
1813 yytoken, &
yylval, parser);
1819 while (yyssp != yyss)
1822 yystos[*yyssp], yyvsp, parser);
1830 if (yymsg != yymsgbuf)
1835 #line 201 "libinterp/corefcn/oct-tex-parser.yy"
1838 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
1840 #pragma GCC diagnostic pop
1846 octave_tex_debug = 0;
1862 fprintf (stderr,
"TeX parse error: %s\n", s);
static const yytype_int8 yycheck[]
#define YYSTACK_ALLOC_MAXIMUM
bool init_lexer(const std::string &s)
OCTAVE_TEX_STYPE yyvs_alloc
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
text_element_list * e_list
static const yytype_uint8 yytable[]
static const yytype_uint8 yydefact[]
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)
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
#define yytable_value_is_error(Yytable_value)
text_element * parse(const std::string &s)