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 yypush_parse octave_tex_push_parse
71#define yypull_parse octave_tex_pull_parse
72#define yypstate_new octave_tex_pstate_new
73#define yypstate_clear octave_tex_pstate_clear
74#define yypstate_delete octave_tex_pstate_delete
75#define yypstate octave_tex_pstate
76#define yylex octave_tex_lex
77#define yyerror octave_tex_error
78#define yydebug octave_tex_debug
79#define yynerrs octave_tex_nerrs
82#line 26 "../libinterp/corefcn/oct-tex-parser.yy"
87#if defined (HAVE_CONFIG_H)
96static void yyerror (octave::text_parser_tex&
parser,
const char *s);
98#define m_scanner parser.get_scanner ()
99#define yyalloc octave_tex_yyalloc
101#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
105# pragma GCC diagnostic push
106# pragma GCC diagnostic ignored "-Wold-style-cast"
110#line 111 "libinterp/corefcn/oct-tex-parser.cc"
114# define YY_CAST(Type, Val) static_cast<Type> (Val)
115# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
117# define YY_CAST(Type, Val) ((Type) (Val))
118# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
122# if defined __cplusplus
123# if 201103L <= __cplusplus
124# define YY_NULLPTR nullptr
129# define YY_NULLPTR ((void*)0)
186#ifndef __PTRDIFF_MAX__
188# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
199#ifdef __INT_LEAST8_MAX__
201#elif defined YY_STDINT_H
207#ifdef __INT_LEAST16_MAX__
209#elif defined YY_STDINT_H
221# undef UINT_LEAST8_MAX
222# undef UINT_LEAST16_MAX
223# define UINT_LEAST8_MAX 255
224# define UINT_LEAST16_MAX 65535
227#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
229#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
230 && UINT_LEAST8_MAX <= INT_MAX)
232#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
238#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
240#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
241 && UINT_LEAST16_MAX <= INT_MAX)
243#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
250# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
251# define YYPTRDIFF_T __PTRDIFF_TYPE__
252# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
253# elif defined PTRDIFF_MAX
257# define YYPTRDIFF_T ptrdiff_t
258# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
260# define YYPTRDIFF_T long
261# define YYPTRDIFF_MAXIMUM LONG_MAX
267# define YYSIZE_T __SIZE_TYPE__
269# define YYSIZE_T size_t
270# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
272# define YYSIZE_T size_t
274# define YYSIZE_T unsigned
278#define YYSIZE_MAXIMUM \
279 YY_CAST (YYPTRDIFF_T, \
280 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
281 ? YYPTRDIFF_MAXIMUM \
282 : YY_CAST (YYSIZE_T, -1)))
284#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
294# if defined YYENABLE_NLS && YYENABLE_NLS
297# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
301# define YY_(Msgid) Msgid
306#ifndef YY_ATTRIBUTE_PURE
307# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
308# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
310# define YY_ATTRIBUTE_PURE
314#ifndef YY_ATTRIBUTE_UNUSED
315# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
316# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
318# define YY_ATTRIBUTE_UNUSED
323#if ! defined lint || defined __GNUC__
324# define YY_USE(E) ((void) (E))
330#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
331# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
332# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
333 _Pragma ("GCC diagnostic push") \
334 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
336# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
337 _Pragma ("GCC diagnostic push") \
338 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
339 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
341# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
342 _Pragma ("GCC diagnostic pop")
344# define YY_INITIAL_VALUE(Value) Value
346#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
347# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
348# define YY_IGNORE_MAYBE_UNINITIALIZED_END
350#ifndef YY_INITIAL_VALUE
351# define YY_INITIAL_VALUE(Value)
354#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
355# define YY_IGNORE_USELESS_CAST_BEGIN \
356 _Pragma ("GCC diagnostic push") \
357 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
358# define YY_IGNORE_USELESS_CAST_END \
359 _Pragma ("GCC diagnostic pop")
361#ifndef YY_IGNORE_USELESS_CAST_BEGIN
362# define YY_IGNORE_USELESS_CAST_BEGIN
363# define YY_IGNORE_USELESS_CAST_END
367#define YY_ASSERT(E) ((void) (0 && (E)))
369#if !defined yyoverflow
375# define YYSTACK_FREE(Ptr) do { ; } while (0)
376# ifndef YYSTACK_ALLOC_MAXIMUM
381# define YYSTACK_ALLOC_MAXIMUM 4032
384# define YYSTACK_ALLOC YYMALLOC
385# define YYSTACK_FREE YYFREE
386# ifndef YYSTACK_ALLOC_MAXIMUM
387# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
389# if (defined __cplusplus && ! defined EXIT_SUCCESS \
390 && ! ((defined YYMALLOC || defined malloc) \
391 && (defined YYFREE || defined free)))
394# define EXIT_SUCCESS 0
398# define YYMALLOC malloc
399# if ! defined malloc && ! defined EXIT_SUCCESS
405# if ! defined free && ! defined EXIT_SUCCESS
412#if (! defined yyoverflow \
413 && (! defined __cplusplus \
414 || (defined OCTAVE_TEX_STYPE_IS_TRIVIAL && OCTAVE_TEX_STYPE_IS_TRIVIAL)))
424# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
428# define YYSTACK_BYTES(N) \
429 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
430 + YYSTACK_GAP_MAXIMUM)
432# define YYCOPY_NEEDED 1
439# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
442 YYPTRDIFF_T yynewbytes; \
443 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
444 Stack = &yyptr->Stack_alloc; \
445 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
446 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
452#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
456# if defined __GNUC__ && 1 < __GNUC__
457# define YYCOPY(Dst, Src, Count) \
458 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
460# define YYCOPY(Dst, Src, Count) \
464 for (yyi = 0; yyi < (Count); yyi++) \
465 (Dst)[yyi] = (Src)[yyi]; \
492#define YYTRANSLATE(YYX) \
493 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
494 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
501 0, 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, 2, 2, 2, 2,
511 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
512 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
513 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
514 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
515 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
516 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
517 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
518 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
519 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
520 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
521 2, 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, 1, 2, 3, 4,
527 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
535 0, 107, 107, 109, 113, 117, 119, 121, 123, 127,
536 131, 138, 143, 149, 154, 156, 157, 158, 159, 160,
537 161, 162, 163, 166, 168, 170, 174, 176, 178, 182,
538 184, 188, 190, 195, 197, 202, 203
543#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
545#if OCTAVE_TEX_DEBUG || 0
552static const char *
const yytname[] =
554 "\"end of file\"",
"error",
"\"invalid token\"",
"BF",
"IT",
"SL",
"RM",
555 "FONTNAME",
"FONTSIZE",
"COLOR",
"COLOR_RGB",
"START",
"END",
"SUPER",
556 "SUB",
"CH",
"NUM",
"SYM",
"SCRIPT",
"STR",
"$accept",
"simple_string",
557 "symbol_element",
"font_modifier_element",
"fontsize_element",
558 "fontname_element",
"color_element",
"string_element",
559 "superscript_element",
"subscript_element",
"combined_script_element",
560 "string_element_list",
"scoped_string_element_list",
"string",
YY_NULLPTR
566 return yytname[yysymbol];
570#define YYPACT_NINF (-4)
572#define yypact_value_is_default(Yyn) \
573 ((Yyn) == YYPACT_NINF)
575#define YYTABLE_NINF (-1)
577#define yytable_value_is_error(Yyn) \
584 27, -4, -4, -4, -4, 2, 17, 32, 37, -3,
585 34, 35, -4, -4, 40, -4, -4, -4, -4, -4,
586 -4, 45, 52, -4, 27, -4, 66, 54, 55, 54,
587 56, -4, 12, -4, -4, -4, -4, -4, -4, -4,
588 -4, -4, -4, -4, 41, 58, 42, 57, -4, -4,
597 35, 5, 6, 7, 8, 0, 0, 0, 0, 0,
598 0, 0, 2, 4, 13, 15, 16, 17, 18, 19,
599 31, 20, 21, 22, 36, 14, 0, 0, 0, 0,
600 0, 34, 0, 23, 25, 24, 26, 28, 27, 3,
601 30, 29, 32, 1, 0, 0, 0, 0, 33, 10,
608 -4, 31, 51, -4, -4, -4, -4, 15, 46, 60,
615 0, 14, 15, 16, 17, 18, 19, 20, 21, 22,
624 1, 2, 3, 4, 5, 6, 7, 8, 9, 31,
625 10, 11, 12, 27, 13, 1, 2, 3, 4, 5,
626 6, 7, 8, 9, 48, 10, 11, 12, 28, 13,
627 1, 2, 3, 4, 5, 6, 7, 8, 9, 42,
628 10, 11, 12, 29, 13, 9, 9, 42, 30, 33,
629 36, 13, 13, 49, 51, 39, 39, 39, 44, 11,
630 46, 34, 37, 35, 38, 10, 43, 0, 41, 12,
631 50, 45, 47, 52, 54, 53, 32, 0, 0, 0,
637 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
638 13, 14, 15, 11, 17, 3, 4, 5, 6, 7,
639 8, 9, 10, 11, 12, 13, 14, 15, 11, 17,
640 3, 4, 5, 6, 7, 8, 9, 10, 11, 24,
641 13, 14, 15, 11, 17, 11, 11, 32, 11, 15,
642 15, 17, 17, 12, 12, 15, 15, 15, 27, 14,
643 29, 10, 11, 10, 11, 13, 0, -1, 22, 15,
644 12, 16, 16, 16, 12, 16, 9, -1, -1, -1,
652 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
653 13, 14, 15, 17, 21, 22, 23, 24, 25, 26,
654 27, 28, 29, 30, 31, 32, 33, 11, 11, 11,
655 11, 12, 31, 15, 22, 32, 15, 22, 32, 15,
656 29, 28, 27, 0, 21, 16, 21, 16, 12, 12,
663 0, 20, 21, 21, 22, 23, 23, 23, 23, 24,
664 25, 26, 26, 27, 27, 27, 27, 27, 27, 27,
665 27, 27, 27, 28, 28, 28, 29, 29, 29, 30,
666 30, 31, 31, 32, 32, 33, 33
672 0, 2, 1, 2, 1, 1, 1, 1, 1, 4,
673 4, 4, 6, 1, 1, 1, 1, 1, 1, 1,
674 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,
681#define yyerrok (yyerrstatus = 0)
682#define yyclearin (yychar = OCTAVE_TEX_EMPTY)
684#define YYACCEPT goto yyacceptlab
685#define YYABORT goto yyabortlab
686#define YYERROR goto yyerrorlab
687#define YYNOMEM goto yyexhaustedlab
690#define YYRECOVERING() (!!yyerrstatus)
692#define YYBACKUP(Token, Value) \
694 if (yychar == OCTAVE_TEX_EMPTY) \
698 YYPOPSTACK (yylen); \
704 yyerror (parser, YY_("syntax error: cannot back up")); \
711#define YYERRCODE OCTAVE_TEX_UNDEF
719# define YYFPRINTF fprintf
722# define YYDPRINTF(Args) \
731# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
735 YYFPRINTF (stderr, "%s ", Title); \
736 yy_symbol_print (stderr, \
737 Kind, Value, parser); \
738 YYFPRINTF (stderr, "\n"); \
748yy_symbol_value_print (FILE *yyo,
751 FILE *yyoutput = yyo;
767yy_symbol_print (FILE *yyo,
770 YYFPRINTF (yyo,
"%s %s (",
771 yykind <
YYNTOKENS ?
"token" :
"nterm", yysymbol_name (yykind));
773 yy_symbol_value_print (yyo, yykind, yyvaluep,
parser);
774 YYFPRINTF (yyo,
")");
785 YYFPRINTF (stderr,
"Stack now");
786 for (; yybottom <= yytop; yybottom++)
788 int yybot = *yybottom;
789 YYFPRINTF (stderr,
" %d", yybot);
791 YYFPRINTF (stderr,
"\n");
794# define YY_STACK_PRINT(Bottom, Top) \
797 yy_stack_print ((Bottom), (Top)); \
807 int yyrule, octave::text_parser_tex&
parser)
809 int yylno = yyrline[yyrule];
810 int yynrhs = yyr2[yyrule];
812 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %d):\n",
815 for (yyi = 0; yyi < yynrhs; yyi++)
817 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
818 yy_symbol_print (stderr,
821 YYFPRINTF (stderr,
"\n");
825# define YY_REDUCE_PRINT(Rule) \
828 yy_reduce_print (yyssp, yyvsp, Rule, parser); \
835# define YYDPRINTF(Args) ((void) 0)
836# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
837# define YY_STACK_PRINT(Bottom, Top)
838# define YY_REDUCE_PRINT(Rule)
844# define YYINITDEPTH 200
855# define YYMAXDEPTH 10000
897yydestruct (
const char *yymsg,
910#line 94 "../libinterp/corefcn/oct-tex-parser.yy"
912#line 913 "libinterp/corefcn/oct-tex-parser.cc"
916#line 94 "../libinterp/corefcn/oct-tex-parser.yy"
918#line 919 "libinterp/corefcn/oct-tex-parser.cc"
922#line 94 "../libinterp/corefcn/oct-tex-parser.yy"
924#line 925 "libinterp/corefcn/oct-tex-parser.cc"
928#line 95 "../libinterp/corefcn/oct-tex-parser.yy"
929 {
delete ((*yyvaluep).str); }
930#line 931 "libinterp/corefcn/oct-tex-parser.cc"
934#line 95 "../libinterp/corefcn/oct-tex-parser.yy"
935 {
delete ((*yyvaluep).e_base); }
936#line 937 "libinterp/corefcn/oct-tex-parser.cc"
940#line 95 "../libinterp/corefcn/oct-tex-parser.yy"
941 {
delete ((*yyvaluep).e_base); }
942#line 943 "libinterp/corefcn/oct-tex-parser.cc"
946#line 95 "../libinterp/corefcn/oct-tex-parser.yy"
947 {
delete ((*yyvaluep).e_base); }
948#line 949 "libinterp/corefcn/oct-tex-parser.cc"
952#line 95 "../libinterp/corefcn/oct-tex-parser.yy"
953 {
delete ((*yyvaluep).e_base); }
954#line 955 "libinterp/corefcn/oct-tex-parser.cc"
958#line 95 "../libinterp/corefcn/oct-tex-parser.yy"
959 {
delete ((*yyvaluep).e_base); }
960#line 961 "libinterp/corefcn/oct-tex-parser.cc"
964#line 95 "../libinterp/corefcn/oct-tex-parser.yy"
965 {
delete ((*yyvaluep).e_base); }
966#line 967 "libinterp/corefcn/oct-tex-parser.cc"
970#line 95 "../libinterp/corefcn/oct-tex-parser.yy"
971 {
delete ((*yyvaluep).e_base); }
972#line 973 "libinterp/corefcn/oct-tex-parser.cc"
976#line 95 "../libinterp/corefcn/oct-tex-parser.yy"
977 {
delete ((*yyvaluep).e_base); }
978#line 979 "libinterp/corefcn/oct-tex-parser.cc"
982#line 95 "../libinterp/corefcn/oct-tex-parser.yy"
983 {
delete ((*yyvaluep).e_base); }
984#line 985 "libinterp/corefcn/oct-tex-parser.cc"
988#line 95 "../libinterp/corefcn/oct-tex-parser.yy"
989 {
delete ((*yyvaluep).e_list); }
990#line 991 "libinterp/corefcn/oct-tex-parser.cc"
994#line 95 "../libinterp/corefcn/oct-tex-parser.yy"
995 {
delete ((*yyvaluep).e_list); }
996#line 997 "libinterp/corefcn/oct-tex-parser.cc"
1036#define octave_tex_nerrs yyps->octave_tex_nerrs
1037#define yystate yyps->yystate
1038#define yyerrstatus yyps->yyerrstatus
1039#define yyssa yyps->yyssa
1040#define yyss yyps->yyss
1041#define yyssp yyps->yyssp
1042#define yyvsa yyps->yyvsa
1043#define yyvs yyps->yyvs
1044#define yyvsp yyps->yyvsp
1045#define yystacksize yyps->yystacksize
1102 int yypushed_char,
YYSTYPE const *yypushed_val, octave::text_parser_tex&
parser)
1125#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1131 switch (yyps->yynew)
1135 goto yyread_pushed_token;
1145 YYDPRINTF ((stderr,
"Starting parse\n"));
1173#if !defined yyoverflow && !defined YYSTACK_RELOCATE
1180# if defined yyoverflow
1192 yyoverflow (
YY_(
"memory exhausted"),
1216# undef YYSTACK_RELOCATE
1226 YYDPRINTF ((stderr,
"Stack size increased to %ld\n",
1261 YYDPRINTF ((stderr,
"Return for a new token:\n"));
1267 YYDPRINTF ((stderr,
"Reading a token\n"));
1268 yychar = yypushed_char;
1277 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1298 if (yyn < 0 ||
YYLAST < yyn || yycheck[yyn] != yytoken)
1351 yyval =
yyvsp[1-yylen];
1358#line 108 "../libinterp/corefcn/oct-tex-parser.yy"
1359 { (yyval.str) =
new std::string (1, (
yyvsp[0].ch)); }
1360#line 1361 "libinterp/corefcn/oct-tex-parser.cc"
1364#line 110 "../libinterp/corefcn/oct-tex-parser.yy"
1365 { (
yyvsp[-1].str)->append (1, (
yyvsp[0].ch)); (yyval.str) = (
yyvsp[-1].str); }
1366#line 1367 "libinterp/corefcn/oct-tex-parser.cc"
1370#line 114 "../libinterp/corefcn/oct-tex-parser.yy"
1371 { (yyval.e_base) =
new octave::text_element_symbol ((
yyvsp[0].sym)); }
1372#line 1373 "libinterp/corefcn/oct-tex-parser.cc"
1376#line 118 "../libinterp/corefcn/oct-tex-parser.yy"
1377 { (yyval.e_base) =
new octave::text_element_fontstyle (octave::text_element_fontstyle::bold); }
1378#line 1379 "libinterp/corefcn/oct-tex-parser.cc"
1382#line 120 "../libinterp/corefcn/oct-tex-parser.yy"
1383 { (yyval.e_base) =
new octave::text_element_fontstyle (octave::text_element_fontstyle::italic); }
1384#line 1385 "libinterp/corefcn/oct-tex-parser.cc"
1388#line 122 "../libinterp/corefcn/oct-tex-parser.yy"
1389 { (yyval.e_base) =
new octave::text_element_fontstyle (octave::text_element_fontstyle::oblique); }
1390#line 1391 "libinterp/corefcn/oct-tex-parser.cc"
1394#line 124 "../libinterp/corefcn/oct-tex-parser.yy"
1395 { (yyval.e_base) =
new octave::text_element_fontstyle (octave::text_element_fontstyle::normal); }
1396#line 1397 "libinterp/corefcn/oct-tex-parser.cc"
1400#line 128 "../libinterp/corefcn/oct-tex-parser.yy"
1401 { (yyval.e_base) =
new octave::text_element_fontsize ((
yyvsp[-1].num)); }
1402#line 1403 "libinterp/corefcn/oct-tex-parser.cc"
1406#line 132 "../libinterp/corefcn/oct-tex-parser.yy"
1408 (yyval.e_base) =
new octave::text_element_fontname (*(
yyvsp[-1].str));
1409 delete (
yyvsp[-1].str);
1411#line 1412 "libinterp/corefcn/oct-tex-parser.cc"
1415#line 139 "../libinterp/corefcn/oct-tex-parser.yy"
1417 (yyval.e_base) =
new octave::text_element_color (*(
yyvsp[-1].str));
1418 delete (
yyvsp[-1].str);
1420#line 1421 "libinterp/corefcn/oct-tex-parser.cc"
1424#line 144 "../libinterp/corefcn/oct-tex-parser.yy"
1426 (yyval.e_base) =
new octave::text_element_color ((
yyvsp[-3].num), (
yyvsp[-2].num), (
yyvsp[-1].num));
1428#line 1429 "libinterp/corefcn/oct-tex-parser.cc"
1432#line 150 "../libinterp/corefcn/oct-tex-parser.yy"
1434 (yyval.e_base) =
new octave::text_element_string (*(
yyvsp[0].str));
1435 delete (
yyvsp[0].str);
1437#line 1438 "libinterp/corefcn/oct-tex-parser.cc"
1441#line 155 "../libinterp/corefcn/oct-tex-parser.yy"
1442 { (yyval.e_base) = (
yyvsp[0].e_list); }
1443#line 1444 "libinterp/corefcn/oct-tex-parser.cc"
1447#line 167 "../libinterp/corefcn/oct-tex-parser.yy"
1448 { (yyval.e_base) =
new octave::text_element_superscript ((
yyvsp[0].ch)); }
1449#line 1450 "libinterp/corefcn/oct-tex-parser.cc"
1453#line 169 "../libinterp/corefcn/oct-tex-parser.yy"
1454 { (yyval.e_base) =
new octave::text_element_superscript ((
yyvsp[0].e_list)); }
1455#line 1456 "libinterp/corefcn/oct-tex-parser.cc"
1459#line 171 "../libinterp/corefcn/oct-tex-parser.yy"
1460 { (yyval.e_base) =
new octave::text_element_superscript ((
yyvsp[0].e_base)); }
1461#line 1462 "libinterp/corefcn/oct-tex-parser.cc"
1465#line 175 "../libinterp/corefcn/oct-tex-parser.yy"
1466 { (yyval.e_base) =
new octave::text_element_subscript ((
yyvsp[0].ch)); }
1467#line 1468 "libinterp/corefcn/oct-tex-parser.cc"
1471#line 177 "../libinterp/corefcn/oct-tex-parser.yy"
1472 { (yyval.e_base) =
new octave::text_element_subscript ((
yyvsp[0].e_list)); }
1473#line 1474 "libinterp/corefcn/oct-tex-parser.cc"
1477#line 179 "../libinterp/corefcn/oct-tex-parser.yy"
1478 { (yyval.e_base) =
new octave::text_element_subscript ((
yyvsp[0].e_base)); }
1479#line 1480 "libinterp/corefcn/oct-tex-parser.cc"
1483#line 183 "../libinterp/corefcn/oct-tex-parser.yy"
1484 { (yyval.e_base) =
new octave::text_element_combined ((
yyvsp[-1].e_base), (
yyvsp[0].e_base)); }
1485#line 1486 "libinterp/corefcn/oct-tex-parser.cc"
1489#line 185 "../libinterp/corefcn/oct-tex-parser.yy"
1490 { (yyval.e_base) =
new octave::text_element_combined ((
yyvsp[-1].e_base), (
yyvsp[0].e_base)); }
1491#line 1492 "libinterp/corefcn/oct-tex-parser.cc"
1495#line 189 "../libinterp/corefcn/oct-tex-parser.yy"
1496 { (yyval.e_list) =
new octave::text_element_list ((
yyvsp[0].e_base)); }
1497#line 1498 "libinterp/corefcn/oct-tex-parser.cc"
1501#line 191 "../libinterp/corefcn/oct-tex-parser.yy"
1502 { (
yyvsp[-1].e_list)->push_back ((
yyvsp[0].e_base)); (yyval.e_list) = (
yyvsp[-1].e_list); }
1503#line 1504 "libinterp/corefcn/oct-tex-parser.cc"
1507#line 196 "../libinterp/corefcn/oct-tex-parser.yy"
1508 { (yyval.e_list) = (
yyvsp[-1].e_list); }
1509#line 1510 "libinterp/corefcn/oct-tex-parser.cc"
1513#line 198 "../libinterp/corefcn/oct-tex-parser.yy"
1514 { (yyval.e_list) =
new octave::text_element_list (); }
1515#line 1516 "libinterp/corefcn/oct-tex-parser.cc"
1519#line 202 "../libinterp/corefcn/oct-tex-parser.yy"
1520 {
parser.set_parse_result (
new octave::text_element_string (
"")); }
1521#line 1522 "libinterp/corefcn/oct-tex-parser.cc"
1525#line 204 "../libinterp/corefcn/oct-tex-parser.yy"
1527#line 1528 "libinterp/corefcn/oct-tex-parser.cc"
1531#line 1532 "libinterp/corefcn/oct-tex-parser.cc"
1557 const int yylhs = yyr1[yyn] -
YYNTOKENS;
1558 const int yyi = yypgoto[yylhs] + *
yyssp;
1561 : yydefgoto[yylhs]);
1594 yydestruct (
"Error: discarding",
1650 yydestruct (
"Error: popping",
1703 yydestruct (
"Cleanup: discarding lookahead",
1712 yydestruct (
"Cleanup: popping",
1727#undef octave_tex_nerrs
1737#line 207 "../libinterp/corefcn/oct-tex-parser.yy"
1740#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
1742 #pragma GCC diagnostic pop
1751 octave_tex_debug = 1;
1765OCTAVE_END_NAMESPACE(octave)
1768yyerror (octave::text_parser_tex&,
const char *s)
1770 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)