52 #define YYBISON_VERSION "3.8.2"
55 #define YYSKELETON_NAME "yacc.c"
67 #define YYSTYPE OCTAVE_TEX_STYPE
69 #define yyparse octave_tex_parse
70 #define yylex octave_tex_lex
71 #define yyerror octave_tex_error
72 #define yydebug octave_tex_debug
73 #define yynerrs octave_tex_nerrs
76 #line 26 "../libinterp/corefcn/oct-tex-parser.yy"
81 #if defined (HAVE_CONFIG_H)
93 #define m_scanner parser.get_scanner ()
94 #define yyalloc octave_tex_yyalloc
96 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
101 # pragma GCC diagnostic push
102 # pragma GCC diagnostic ignored "-Wold-style-cast"
106 #line 107 "libinterp/corefcn/oct-tex-parser.cc"
110 # define YY_CAST(Type, Val) static_cast<Type> (Val)
111 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
113 # define YY_CAST(Type, Val) ((Type) (Val))
114 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
118 # if defined __cplusplus
119 # if 201103L <= __cplusplus
120 # define YY_NULLPTR nullptr
122 # define YY_NULLPTR 0
125 # define YY_NULLPTR ((void*)0)
182 #ifndef __PTRDIFF_MAX__
184 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
195 #ifdef __INT_LEAST8_MAX__
197 #elif defined YY_STDINT_H
203 #ifdef __INT_LEAST16_MAX__
205 #elif defined YY_STDINT_H
217 # undef UINT_LEAST8_MAX
218 # undef UINT_LEAST16_MAX
219 # define UINT_LEAST8_MAX 255
220 # define UINT_LEAST16_MAX 65535
223 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
225 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
226 && UINT_LEAST8_MAX <= INT_MAX)
228 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
234 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
236 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
237 && UINT_LEAST16_MAX <= INT_MAX)
239 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
246 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
247 # define YYPTRDIFF_T __PTRDIFF_TYPE__
248 # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
249 # elif defined PTRDIFF_MAX
253 # define YYPTRDIFF_T ptrdiff_t
254 # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
256 # define YYPTRDIFF_T long
257 # define YYPTRDIFF_MAXIMUM LONG_MAX
262 # ifdef __SIZE_TYPE__
263 # define YYSIZE_T __SIZE_TYPE__
264 # elif defined size_t
265 # define YYSIZE_T size_t
266 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
268 # define YYSIZE_T size_t
270 # define YYSIZE_T unsigned
274 #define YYSIZE_MAXIMUM \
275 YY_CAST (YYPTRDIFF_T, \
276 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
277 ? YYPTRDIFF_MAXIMUM \
278 : YY_CAST (YYSIZE_T, -1)))
280 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
290 # if defined YYENABLE_NLS && YYENABLE_NLS
292 # include <libintl.h>
293 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
297 # define YY_(Msgid) Msgid
302 #ifndef YY_ATTRIBUTE_PURE
303 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
304 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
306 # define YY_ATTRIBUTE_PURE
310 #ifndef YY_ATTRIBUTE_UNUSED
311 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
312 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
314 # define YY_ATTRIBUTE_UNUSED
319 #if ! defined lint || defined __GNUC__
320 # define YY_USE(E) ((void) (E))
326 #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
327 # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
328 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
329 _Pragma ("GCC diagnostic push") \
330 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
332 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
333 _Pragma ("GCC diagnostic push") \
334 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
335 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
337 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
338 _Pragma ("GCC diagnostic pop")
340 # define YY_INITIAL_VALUE(Value) Value
342 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
343 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
344 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
346 #ifndef YY_INITIAL_VALUE
347 # define YY_INITIAL_VALUE(Value)
350 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
351 # define YY_IGNORE_USELESS_CAST_BEGIN \
352 _Pragma ("GCC diagnostic push") \
353 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
354 # define YY_IGNORE_USELESS_CAST_END \
355 _Pragma ("GCC diagnostic pop")
357 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
358 # define YY_IGNORE_USELESS_CAST_BEGIN
359 # define YY_IGNORE_USELESS_CAST_END
363 #define YY_ASSERT(E) ((void) (0 && (E)))
365 #if !defined yyoverflow
369 # ifdef YYSTACK_USE_ALLOCA
370 # if YYSTACK_USE_ALLOCA
372 # define YYSTACK_ALLOC __builtin_alloca
373 # elif defined __BUILTIN_VA_ARG_INCR
376 # define YYSTACK_ALLOC __alloca
377 # elif defined _MSC_VER
379 # define alloca _alloca
381 # define YYSTACK_ALLOC alloca
382 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
385 # ifndef EXIT_SUCCESS
386 # define EXIT_SUCCESS 0
393 # ifdef YYSTACK_ALLOC
395 # define YYSTACK_FREE(Ptr) do { ; } while (0)
396 # ifndef YYSTACK_ALLOC_MAXIMUM
401 # define YYSTACK_ALLOC_MAXIMUM 4032
404 # define YYSTACK_ALLOC YYMALLOC
405 # define YYSTACK_FREE YYFREE
406 # ifndef YYSTACK_ALLOC_MAXIMUM
407 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
409 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
410 && ! ((defined YYMALLOC || defined malloc) \
411 && (defined YYFREE || defined free)))
413 # ifndef EXIT_SUCCESS
414 # define EXIT_SUCCESS 0
418 # define YYMALLOC malloc
419 # if ! defined malloc && ! defined EXIT_SUCCESS
425 # if ! defined free && ! defined EXIT_SUCCESS
432 #if (! defined yyoverflow \
433 && (! defined __cplusplus \
434 || (defined OCTAVE_TEX_STYPE_IS_TRIVIAL && OCTAVE_TEX_STYPE_IS_TRIVIAL)))
444 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
448 # define YYSTACK_BYTES(N) \
449 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
450 + YYSTACK_GAP_MAXIMUM)
452 # define YYCOPY_NEEDED 1
459 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
462 YYPTRDIFF_T yynewbytes; \
463 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
464 Stack = &yyptr->Stack_alloc; \
465 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
466 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
472 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
476 # if defined __GNUC__ && 1 < __GNUC__
477 # define YYCOPY(Dst, Src, Count) \
478 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
480 # define YYCOPY(Dst, Src, Count) \
484 for (yyi = 0; yyi < (Count); yyi++) \
485 (Dst)[yyi] = (Src)[yyi]; \
507 #define YYMAXUTOK 274
512 #define YYTRANSLATE(YYX) \
513 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
514 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
521 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
522 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
523 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
524 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
525 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
526 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
527 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
528 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
529 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
530 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
532 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
533 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
534 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
535 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
536 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
538 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
541 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
542 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
543 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
546 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
547 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
555 0, 108, 108, 110, 114, 118, 120, 122, 124, 128,
556 132, 139, 144, 150, 155, 157, 158, 159, 160, 161,
557 162, 163, 164, 167, 169, 171, 175, 177, 179, 183,
558 185, 189, 191, 196, 198, 203, 204
563 #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
565 #if OCTAVE_TEX_DEBUG || 0
572 static const char *
const yytname[] =
574 "\"end of file\"",
"error",
"\"invalid token\"",
"BF",
"IT",
"SL",
"RM",
575 "FONTNAME",
"FONTSIZE",
"COLOR",
"COLOR_RGB",
"START",
"END",
"SUPER",
576 "SUB",
"CH",
"NUM",
"SYM",
"SCRIPT",
"STR",
"$accept",
"simple_string",
577 "symbol_element",
"font_modifier_element",
"fontsize_element",
578 "fontname_element",
"color_element",
"string_element",
579 "superscript_element",
"subscript_element",
"combined_script_element",
580 "string_element_list",
"scoped_string_element_list",
"string",
YY_NULLPTR
586 return yytname[yysymbol];
590 #define YYPACT_NINF (-4)
592 #define yypact_value_is_default(Yyn) \
593 ((Yyn) == YYPACT_NINF)
595 #define YYTABLE_NINF (-1)
597 #define yytable_value_is_error(Yyn) \
604 27, -4, -4, -4, -4, 2, 17, 32, 37, -3,
605 34, 35, -4, -4, 40, -4, -4, -4, -4, -4,
606 -4, 45, 52, -4, 27, -4, 66, 54, 55, 54,
607 56, -4, 12, -4, -4, -4, -4, -4, -4, -4,
608 -4, -4, -4, -4, 41, 58, 42, 57, -4, -4,
617 35, 5, 6, 7, 8, 0, 0, 0, 0, 0,
618 0, 0, 2, 4, 13, 15, 16, 17, 18, 19,
619 31, 20, 21, 22, 36, 14, 0, 0, 0, 0,
620 0, 34, 0, 23, 25, 24, 26, 28, 27, 3,
621 30, 29, 32, 1, 0, 0, 0, 0, 33, 10,
628 -4, 31, 51, -4, -4, -4, -4, 15, 46, 60,
635 0, 14, 15, 16, 17, 18, 19, 20, 21, 22,
644 1, 2, 3, 4, 5, 6, 7, 8, 9, 31,
645 10, 11, 12, 27, 13, 1, 2, 3, 4, 5,
646 6, 7, 8, 9, 48, 10, 11, 12, 28, 13,
647 1, 2, 3, 4, 5, 6, 7, 8, 9, 42,
648 10, 11, 12, 29, 13, 9, 9, 42, 30, 33,
649 36, 13, 13, 49, 51, 39, 39, 39, 44, 11,
650 46, 34, 37, 35, 38, 10, 43, 0, 41, 12,
651 50, 45, 47, 52, 54, 53, 32, 0, 0, 0,
657 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
658 13, 14, 15, 11, 17, 3, 4, 5, 6, 7,
659 8, 9, 10, 11, 12, 13, 14, 15, 11, 17,
660 3, 4, 5, 6, 7, 8, 9, 10, 11, 24,
661 13, 14, 15, 11, 17, 11, 11, 32, 11, 15,
662 15, 17, 17, 12, 12, 15, 15, 15, 27, 14,
663 29, 10, 11, 10, 11, 13, 0, -1, 22, 15,
664 12, 16, 16, 16, 12, 16, 9, -1, -1, -1,
672 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
673 13, 14, 15, 17, 21, 22, 23, 24, 25, 26,
674 27, 28, 29, 30, 31, 32, 33, 11, 11, 11,
675 11, 12, 31, 15, 22, 32, 15, 22, 32, 15,
676 29, 28, 27, 0, 21, 16, 21, 16, 12, 12,
683 0, 20, 21, 21, 22, 23, 23, 23, 23, 24,
684 25, 26, 26, 27, 27, 27, 27, 27, 27, 27,
685 27, 27, 27, 28, 28, 28, 29, 29, 29, 30,
686 30, 31, 31, 32, 32, 33, 33
692 0, 2, 1, 2, 1, 1, 1, 1, 1, 4,
693 4, 4, 6, 1, 1, 1, 1, 1, 1, 1,
694 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,
701 #define yyerrok (yyerrstatus = 0)
702 #define yyclearin (yychar = OCTAVE_TEX_EMPTY)
704 #define YYACCEPT goto yyacceptlab
705 #define YYABORT goto yyabortlab
706 #define YYERROR goto yyerrorlab
707 #define YYNOMEM goto yyexhaustedlab
710 #define YYRECOVERING() (!!yyerrstatus)
712 #define YYBACKUP(Token, Value) \
714 if (yychar == OCTAVE_TEX_EMPTY) \
718 YYPOPSTACK (yylen); \
724 yyerror (parser, YY_("syntax error: cannot back up")); \
731 #define YYERRCODE OCTAVE_TEX_UNDEF
739 # define YYFPRINTF fprintf
742 # define YYDPRINTF(Args) \
751 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
755 YYFPRINTF (stderr, "%s ", Title); \
756 yy_symbol_print (stderr, \
757 Kind, Value, parser); \
758 YYFPRINTF (stderr, "\n"); \
768 yy_symbol_value_print (FILE *yyo,
771 FILE *yyoutput = yyo;
787 yy_symbol_print (FILE *yyo,
790 YYFPRINTF (yyo,
"%s %s (",
791 yykind <
YYNTOKENS ?
"token" :
"nterm", yysymbol_name (yykind));
793 yy_symbol_value_print (yyo, yykind, yyvaluep,
parser);
794 YYFPRINTF (yyo,
")");
805 YYFPRINTF (stderr,
"Stack now");
806 for (; yybottom <= yytop; yybottom++)
808 int yybot = *yybottom;
809 YYFPRINTF (stderr,
" %d", yybot);
811 YYFPRINTF (stderr,
"\n");
814 # define YY_STACK_PRINT(Bottom, Top) \
817 yy_stack_print ((Bottom), (Top)); \
827 int yyrule, octave::text_parser_tex&
parser)
829 int yylno = yyrline[yyrule];
830 int yynrhs = yyr2[yyrule];
832 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %d):\n",
835 for (yyi = 0; yyi < yynrhs; yyi++)
837 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
838 yy_symbol_print (stderr,
841 YYFPRINTF (stderr,
"\n");
845 # define YY_REDUCE_PRINT(Rule) \
848 yy_reduce_print (yyssp, yyvsp, Rule, parser); \
855 # define YYDPRINTF(Args) ((void) 0)
856 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
857 # define YY_STACK_PRINT(Bottom, Top)
858 # define YY_REDUCE_PRINT(Rule)
864 # define YYINITDEPTH 200
875 # define YYMAXDEPTH 10000
888 yydestruct (
const char *yymsg,
901 #line 95 "../libinterp/corefcn/oct-tex-parser.yy"
903 #line 904 "libinterp/corefcn/oct-tex-parser.cc"
907 #line 95 "../libinterp/corefcn/oct-tex-parser.yy"
909 #line 910 "libinterp/corefcn/oct-tex-parser.cc"
913 #line 95 "../libinterp/corefcn/oct-tex-parser.yy"
915 #line 916 "libinterp/corefcn/oct-tex-parser.cc"
919 #line 96 "../libinterp/corefcn/oct-tex-parser.yy"
920 {
delete ((*yyvaluep).str); }
921 #line 922 "libinterp/corefcn/oct-tex-parser.cc"
925 #line 96 "../libinterp/corefcn/oct-tex-parser.yy"
926 {
delete ((*yyvaluep).e_base); }
927 #line 928 "libinterp/corefcn/oct-tex-parser.cc"
931 #line 96 "../libinterp/corefcn/oct-tex-parser.yy"
932 {
delete ((*yyvaluep).e_base); }
933 #line 934 "libinterp/corefcn/oct-tex-parser.cc"
937 #line 96 "../libinterp/corefcn/oct-tex-parser.yy"
938 {
delete ((*yyvaluep).e_base); }
939 #line 940 "libinterp/corefcn/oct-tex-parser.cc"
943 #line 96 "../libinterp/corefcn/oct-tex-parser.yy"
944 {
delete ((*yyvaluep).e_base); }
945 #line 946 "libinterp/corefcn/oct-tex-parser.cc"
949 #line 96 "../libinterp/corefcn/oct-tex-parser.yy"
950 {
delete ((*yyvaluep).e_base); }
951 #line 952 "libinterp/corefcn/oct-tex-parser.cc"
955 #line 96 "../libinterp/corefcn/oct-tex-parser.yy"
956 {
delete ((*yyvaluep).e_base); }
957 #line 958 "libinterp/corefcn/oct-tex-parser.cc"
961 #line 96 "../libinterp/corefcn/oct-tex-parser.yy"
962 {
delete ((*yyvaluep).e_base); }
963 #line 964 "libinterp/corefcn/oct-tex-parser.cc"
967 #line 96 "../libinterp/corefcn/oct-tex-parser.yy"
968 {
delete ((*yyvaluep).e_base); }
969 #line 970 "libinterp/corefcn/oct-tex-parser.cc"
973 #line 96 "../libinterp/corefcn/oct-tex-parser.yy"
974 {
delete ((*yyvaluep).e_base); }
975 #line 976 "libinterp/corefcn/oct-tex-parser.cc"
979 #line 96 "../libinterp/corefcn/oct-tex-parser.yy"
980 {
delete ((*yyvaluep).e_list); }
981 #line 982 "libinterp/corefcn/oct-tex-parser.cc"
985 #line 96 "../libinterp/corefcn/oct-tex-parser.yy"
986 {
delete ((*yyvaluep).e_list); }
987 #line 988 "libinterp/corefcn/oct-tex-parser.cc"
1052 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1058 YYDPRINTF ((stderr,
"Starting parse\n"));
1086 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1093 # if defined yyoverflow
1105 yyoverflow (
YY_(
"memory exhausted"),
1129 # undef YYSTACK_RELOCATE
1139 YYDPRINTF ((stderr,
"Stack size increased to %ld\n",
1172 YYDPRINTF ((stderr,
"Reading a token\n"));
1180 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1201 if (yyn < 0 ||
YYLAST < yyn || yycheck[yyn] != yytoken)
1254 yyval =
yyvsp[1-yylen];
1261 #line 109 "../libinterp/corefcn/oct-tex-parser.yy"
1262 { (yyval.str) =
new std::string (1, (
yyvsp[0].ch)); }
1263 #line 1264 "libinterp/corefcn/oct-tex-parser.cc"
1267 #line 111 "../libinterp/corefcn/oct-tex-parser.yy"
1268 { (
yyvsp[-1].str)->append (1, (
yyvsp[0].ch)); (yyval.str) = (
yyvsp[-1].str); }
1269 #line 1270 "libinterp/corefcn/oct-tex-parser.cc"
1273 #line 115 "../libinterp/corefcn/oct-tex-parser.yy"
1274 { (yyval.e_base) =
new octave::text_element_symbol ((
yyvsp[0].sym)); }
1275 #line 1276 "libinterp/corefcn/oct-tex-parser.cc"
1279 #line 119 "../libinterp/corefcn/oct-tex-parser.yy"
1280 { (yyval.e_base) =
new octave::text_element_fontstyle (octave::text_element_fontstyle::bold); }
1281 #line 1282 "libinterp/corefcn/oct-tex-parser.cc"
1285 #line 121 "../libinterp/corefcn/oct-tex-parser.yy"
1286 { (yyval.e_base) =
new octave::text_element_fontstyle (octave::text_element_fontstyle::italic); }
1287 #line 1288 "libinterp/corefcn/oct-tex-parser.cc"
1291 #line 123 "../libinterp/corefcn/oct-tex-parser.yy"
1292 { (yyval.e_base) =
new octave::text_element_fontstyle (octave::text_element_fontstyle::oblique); }
1293 #line 1294 "libinterp/corefcn/oct-tex-parser.cc"
1297 #line 125 "../libinterp/corefcn/oct-tex-parser.yy"
1298 { (yyval.e_base) =
new octave::text_element_fontstyle (octave::text_element_fontstyle::normal); }
1299 #line 1300 "libinterp/corefcn/oct-tex-parser.cc"
1303 #line 129 "../libinterp/corefcn/oct-tex-parser.yy"
1304 { (yyval.e_base) =
new octave::text_element_fontsize ((
yyvsp[-1].num)); }
1305 #line 1306 "libinterp/corefcn/oct-tex-parser.cc"
1309 #line 133 "../libinterp/corefcn/oct-tex-parser.yy"
1311 (yyval.e_base) =
new octave::text_element_fontname (*(
yyvsp[-1].str));
1312 delete (
yyvsp[-1].str);
1314 #line 1315 "libinterp/corefcn/oct-tex-parser.cc"
1318 #line 140 "../libinterp/corefcn/oct-tex-parser.yy"
1320 (yyval.e_base) =
new octave::text_element_color (*(
yyvsp[-1].str));
1321 delete (
yyvsp[-1].str);
1323 #line 1324 "libinterp/corefcn/oct-tex-parser.cc"
1327 #line 145 "../libinterp/corefcn/oct-tex-parser.yy"
1329 (yyval.e_base) =
new octave::text_element_color ((
yyvsp[-3].num), (
yyvsp[-2].num), (
yyvsp[-1].num));
1331 #line 1332 "libinterp/corefcn/oct-tex-parser.cc"
1335 #line 151 "../libinterp/corefcn/oct-tex-parser.yy"
1337 (yyval.e_base) =
new octave::text_element_string (*(
yyvsp[0].str));
1338 delete (
yyvsp[0].str);
1340 #line 1341 "libinterp/corefcn/oct-tex-parser.cc"
1344 #line 156 "../libinterp/corefcn/oct-tex-parser.yy"
1345 { (yyval.e_base) = (
yyvsp[0].e_list); }
1346 #line 1347 "libinterp/corefcn/oct-tex-parser.cc"
1350 #line 168 "../libinterp/corefcn/oct-tex-parser.yy"
1351 { (yyval.e_base) =
new octave::text_element_superscript ((
yyvsp[0].ch)); }
1352 #line 1353 "libinterp/corefcn/oct-tex-parser.cc"
1356 #line 170 "../libinterp/corefcn/oct-tex-parser.yy"
1357 { (yyval.e_base) =
new octave::text_element_superscript ((
yyvsp[0].e_list)); }
1358 #line 1359 "libinterp/corefcn/oct-tex-parser.cc"
1362 #line 172 "../libinterp/corefcn/oct-tex-parser.yy"
1363 { (yyval.e_base) =
new octave::text_element_superscript ((
yyvsp[0].e_base)); }
1364 #line 1365 "libinterp/corefcn/oct-tex-parser.cc"
1368 #line 176 "../libinterp/corefcn/oct-tex-parser.yy"
1369 { (yyval.e_base) =
new octave::text_element_subscript ((
yyvsp[0].ch)); }
1370 #line 1371 "libinterp/corefcn/oct-tex-parser.cc"
1374 #line 178 "../libinterp/corefcn/oct-tex-parser.yy"
1375 { (yyval.e_base) =
new octave::text_element_subscript ((
yyvsp[0].e_list)); }
1376 #line 1377 "libinterp/corefcn/oct-tex-parser.cc"
1380 #line 180 "../libinterp/corefcn/oct-tex-parser.yy"
1381 { (yyval.e_base) =
new octave::text_element_subscript ((
yyvsp[0].e_base)); }
1382 #line 1383 "libinterp/corefcn/oct-tex-parser.cc"
1386 #line 184 "../libinterp/corefcn/oct-tex-parser.yy"
1387 { (yyval.e_base) =
new octave::text_element_combined ((
yyvsp[-1].e_base), (
yyvsp[0].e_base)); }
1388 #line 1389 "libinterp/corefcn/oct-tex-parser.cc"
1392 #line 186 "../libinterp/corefcn/oct-tex-parser.yy"
1393 { (yyval.e_base) =
new octave::text_element_combined ((
yyvsp[-1].e_base), (
yyvsp[0].e_base)); }
1394 #line 1395 "libinterp/corefcn/oct-tex-parser.cc"
1398 #line 190 "../libinterp/corefcn/oct-tex-parser.yy"
1399 { (yyval.e_list) =
new octave::text_element_list ((
yyvsp[0].e_base)); }
1400 #line 1401 "libinterp/corefcn/oct-tex-parser.cc"
1404 #line 192 "../libinterp/corefcn/oct-tex-parser.yy"
1405 { (
yyvsp[-1].e_list)->push_back ((
yyvsp[0].e_base)); (yyval.e_list) = (
yyvsp[-1].e_list); }
1406 #line 1407 "libinterp/corefcn/oct-tex-parser.cc"
1410 #line 197 "../libinterp/corefcn/oct-tex-parser.yy"
1411 { (yyval.e_list) = (
yyvsp[-1].e_list); }
1412 #line 1413 "libinterp/corefcn/oct-tex-parser.cc"
1416 #line 199 "../libinterp/corefcn/oct-tex-parser.yy"
1417 { (yyval.e_list) =
new octave::text_element_list (); }
1418 #line 1419 "libinterp/corefcn/oct-tex-parser.cc"
1422 #line 203 "../libinterp/corefcn/oct-tex-parser.yy"
1423 {
parser.set_parse_result (
new octave::text_element_string (
"")); }
1424 #line 1425 "libinterp/corefcn/oct-tex-parser.cc"
1428 #line 205 "../libinterp/corefcn/oct-tex-parser.yy"
1430 #line 1431 "libinterp/corefcn/oct-tex-parser.cc"
1434 #line 1435 "libinterp/corefcn/oct-tex-parser.cc"
1460 const int yylhs = yyr1[yyn] -
YYNTOKENS;
1461 const int yyi = yypgoto[yylhs] + *
yyssp;
1464 : yydefgoto[yylhs]);
1497 yydestruct (
"Error: discarding",
1553 yydestruct (
"Error: popping",
1606 yydestruct (
"Cleanup: discarding lookahead",
1615 yydestruct (
"Cleanup: popping",
1627 #line 208 "../libinterp/corefcn/oct-tex-parser.yy"
1630 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
1632 # pragma GCC diagnostic pop
1640 octave_tex_debug = 0;
1653 OCTAVE_END_NAMESPACE(
octave)
1656 yyerror (octave::text_parser_tex&,
const char *s)
1658 fprintf (stderr,
"TeX parse error: %s\n", s);
text_element * parse(const std::string &s)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
@ YYSYMBOL_string_element_list
@ YYSYMBOL_fontsize_element
@ YYSYMBOL_scoped_string_element_list
@ YYSYMBOL_subscript_element
@ YYSYMBOL_superscript_element
@ YYSYMBOL_fontname_element
@ YYSYMBOL_combined_script_element
@ YYSYMBOL_symbol_element
@ YYSYMBOL_string_element
@ YYSYMBOL_font_modifier_element
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
#define YY_IGNORE_USELESS_CAST_END
#define YY_REDUCE_PRINT(Rule)
#define YY_CAST(Type, Val)
#define YY_ACCESSING_SYMBOL(State)
Accessing symbol of state STATE.
#define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
#define YY_INITIAL_VALUE(Value)
int octave_tex_parse(octave::text_parser_tex &parser)
unsigned char yytype_uint8
#define YY_STACK_PRINT(Bottom, Top)
#define YY_IGNORE_USELESS_CAST_BEGIN
#define yytable_value_is_error(Yyn)
#define YY_ATTRIBUTE_UNUSED
int octave_tex_lex(OCTAVE_TEX_STYPE *, void *)
The main scanner function which does all the work.
unsigned short yytype_uint16
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
#define yypact_value_is_default(Yyn)