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)
97 static void yyerror (octave::text_parser_tex&
parser,
const char *s);
99#define m_scanner parser.get_scanner ()
100#define yyalloc octave_tex_yyalloc
102#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
107# pragma GCC diagnostic push
108# pragma GCC diagnostic ignored "-Wold-style-cast"
112#line 113 "libinterp/corefcn/oct-tex-parser.cc"
116# define YY_CAST(Type, Val) static_cast<Type> (Val)
117# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
119# define YY_CAST(Type, Val) ((Type) (Val))
120# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
124# if defined __cplusplus
125# if 201103L <= __cplusplus
126# define YY_NULLPTR nullptr
131# define YY_NULLPTR ((void*)0)
188#ifndef __PTRDIFF_MAX__
190# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
201#ifdef __INT_LEAST8_MAX__
203#elif defined YY_STDINT_H
209#ifdef __INT_LEAST16_MAX__
211#elif defined YY_STDINT_H
223# undef UINT_LEAST8_MAX
224# undef UINT_LEAST16_MAX
225# define UINT_LEAST8_MAX 255
226# define UINT_LEAST16_MAX 65535
229#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
231#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
232 && UINT_LEAST8_MAX <= INT_MAX)
234#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
240#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
242#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
243 && UINT_LEAST16_MAX <= INT_MAX)
245#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
252# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
253# define YYPTRDIFF_T __PTRDIFF_TYPE__
254# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
255# elif defined PTRDIFF_MAX
259# define YYPTRDIFF_T ptrdiff_t
260# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
262# define YYPTRDIFF_T long
263# define YYPTRDIFF_MAXIMUM LONG_MAX
269# define YYSIZE_T __SIZE_TYPE__
271# define YYSIZE_T size_t
272# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
274# define YYSIZE_T size_t
276# define YYSIZE_T unsigned
280#define YYSIZE_MAXIMUM \
281 YY_CAST (YYPTRDIFF_T, \
282 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
283 ? YYPTRDIFF_MAXIMUM \
284 : YY_CAST (YYSIZE_T, -1)))
286#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
296# if defined YYENABLE_NLS && YYENABLE_NLS
299# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
303# define YY_(Msgid) Msgid
308#ifndef YY_ATTRIBUTE_PURE
309# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
310# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
312# define YY_ATTRIBUTE_PURE
316#ifndef YY_ATTRIBUTE_UNUSED
317# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
318# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
320# define YY_ATTRIBUTE_UNUSED
325#if ! defined lint || defined __GNUC__
326# define YY_USE(E) ((void) (E))
332#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
333# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
334# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
335 _Pragma ("GCC diagnostic push") \
336 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
338# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
339 _Pragma ("GCC diagnostic push") \
340 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
341 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
343# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
344 _Pragma ("GCC diagnostic pop")
346# define YY_INITIAL_VALUE(Value) Value
348#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
349# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
350# define YY_IGNORE_MAYBE_UNINITIALIZED_END
352#ifndef YY_INITIAL_VALUE
353# define YY_INITIAL_VALUE(Value)
356#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
357# define YY_IGNORE_USELESS_CAST_BEGIN \
358 _Pragma ("GCC diagnostic push") \
359 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
360# define YY_IGNORE_USELESS_CAST_END \
361 _Pragma ("GCC diagnostic pop")
363#ifndef YY_IGNORE_USELESS_CAST_BEGIN
364# define YY_IGNORE_USELESS_CAST_BEGIN
365# define YY_IGNORE_USELESS_CAST_END
369#define YY_ASSERT(E) ((void) (0 && (E)))
371#if !defined yyoverflow
377# define YYSTACK_FREE(Ptr) do { ; } while (0)
378# ifndef YYSTACK_ALLOC_MAXIMUM
383# define YYSTACK_ALLOC_MAXIMUM 4032
386# define YYSTACK_ALLOC YYMALLOC
387# define YYSTACK_FREE YYFREE
388# ifndef YYSTACK_ALLOC_MAXIMUM
389# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
391# if (defined __cplusplus && ! defined EXIT_SUCCESS \
392 && ! ((defined YYMALLOC || defined malloc) \
393 && (defined YYFREE || defined free)))
396# define EXIT_SUCCESS 0
400# define YYMALLOC malloc
401# if ! defined malloc && ! defined EXIT_SUCCESS
407# if ! defined free && ! defined EXIT_SUCCESS
414#if (! defined yyoverflow \
415 && (! defined __cplusplus \
416 || (defined OCTAVE_TEX_STYPE_IS_TRIVIAL && OCTAVE_TEX_STYPE_IS_TRIVIAL)))
426# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
430# define YYSTACK_BYTES(N) \
431 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
432 + YYSTACK_GAP_MAXIMUM)
434# define YYCOPY_NEEDED 1
441# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
444 YYPTRDIFF_T yynewbytes; \
445 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
446 Stack = &yyptr->Stack_alloc; \
447 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
448 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
454#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
458# if defined __GNUC__ && 1 < __GNUC__
459# define YYCOPY(Dst, Src, Count) \
460 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
462# define YYCOPY(Dst, Src, Count) \
466 for (yyi = 0; yyi < (Count); yyi++) \
467 (Dst)[yyi] = (Src)[yyi]; \
494#define YYTRANSLATE(YYX) \
495 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
496 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
503 0, 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, 2, 2, 2, 2,
527 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
528 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
529 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
537 0, 109, 109, 111, 115, 119, 121, 123, 125, 129,
538 133, 140, 145, 151, 156, 158, 159, 160, 161, 162,
539 163, 164, 165, 168, 170, 172, 176, 178, 180, 184,
540 186, 190, 192, 197, 199, 204, 205
545#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
547#if OCTAVE_TEX_DEBUG || 0
554static const char *
const yytname[] =
556 "\"end of file\"",
"error",
"\"invalid token\"",
"BF",
"IT",
"SL",
"RM",
557 "FONTNAME",
"FONTSIZE",
"COLOR",
"COLOR_RGB",
"START",
"END",
"SUPER",
558 "SUB",
"CH",
"NUM",
"SYM",
"SCRIPT",
"STR",
"$accept",
"simple_string",
559 "symbol_element",
"font_modifier_element",
"fontsize_element",
560 "fontname_element",
"color_element",
"string_element",
561 "superscript_element",
"subscript_element",
"combined_script_element",
562 "string_element_list",
"scoped_string_element_list",
"string",
YY_NULLPTR
568 return yytname[yysymbol];
572#define YYPACT_NINF (-4)
574#define yypact_value_is_default(Yyn) \
575 ((Yyn) == YYPACT_NINF)
577#define YYTABLE_NINF (-1)
579#define yytable_value_is_error(Yyn) \
586 27, -4, -4, -4, -4, 2, 17, 32, 37, -3,
587 34, 35, -4, -4, 40, -4, -4, -4, -4, -4,
588 -4, 45, 52, -4, 27, -4, 66, 54, 55, 54,
589 56, -4, 12, -4, -4, -4, -4, -4, -4, -4,
590 -4, -4, -4, -4, 41, 58, 42, 57, -4, -4,
599 35, 5, 6, 7, 8, 0, 0, 0, 0, 0,
600 0, 0, 2, 4, 13, 15, 16, 17, 18, 19,
601 31, 20, 21, 22, 36, 14, 0, 0, 0, 0,
602 0, 34, 0, 23, 25, 24, 26, 28, 27, 3,
603 30, 29, 32, 1, 0, 0, 0, 0, 33, 10,
610 -4, 31, 51, -4, -4, -4, -4, 15, 46, 60,
617 0, 14, 15, 16, 17, 18, 19, 20, 21, 22,
626 1, 2, 3, 4, 5, 6, 7, 8, 9, 31,
627 10, 11, 12, 27, 13, 1, 2, 3, 4, 5,
628 6, 7, 8, 9, 48, 10, 11, 12, 28, 13,
629 1, 2, 3, 4, 5, 6, 7, 8, 9, 42,
630 10, 11, 12, 29, 13, 9, 9, 42, 30, 33,
631 36, 13, 13, 49, 51, 39, 39, 39, 44, 11,
632 46, 34, 37, 35, 38, 10, 43, 0, 41, 12,
633 50, 45, 47, 52, 54, 53, 32, 0, 0, 0,
639 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
640 13, 14, 15, 11, 17, 3, 4, 5, 6, 7,
641 8, 9, 10, 11, 12, 13, 14, 15, 11, 17,
642 3, 4, 5, 6, 7, 8, 9, 10, 11, 24,
643 13, 14, 15, 11, 17, 11, 11, 32, 11, 15,
644 15, 17, 17, 12, 12, 15, 15, 15, 27, 14,
645 29, 10, 11, 10, 11, 13, 0, -1, 22, 15,
646 12, 16, 16, 16, 12, 16, 9, -1, -1, -1,
654 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
655 13, 14, 15, 17, 21, 22, 23, 24, 25, 26,
656 27, 28, 29, 30, 31, 32, 33, 11, 11, 11,
657 11, 12, 31, 15, 22, 32, 15, 22, 32, 15,
658 29, 28, 27, 0, 21, 16, 21, 16, 12, 12,
665 0, 20, 21, 21, 22, 23, 23, 23, 23, 24,
666 25, 26, 26, 27, 27, 27, 27, 27, 27, 27,
667 27, 27, 27, 28, 28, 28, 29, 29, 29, 30,
668 30, 31, 31, 32, 32, 33, 33
674 0, 2, 1, 2, 1, 1, 1, 1, 1, 4,
675 4, 4, 6, 1, 1, 1, 1, 1, 1, 1,
676 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,
683#define yyerrok (yyerrstatus = 0)
684#define yyclearin (yychar = OCTAVE_TEX_EMPTY)
686#define YYACCEPT goto yyacceptlab
687#define YYABORT goto yyabortlab
688#define YYERROR goto yyerrorlab
689#define YYNOMEM goto yyexhaustedlab
692#define YYRECOVERING() (!!yyerrstatus)
694#define YYBACKUP(Token, Value) \
696 if (yychar == OCTAVE_TEX_EMPTY) \
700 YYPOPSTACK (yylen); \
706 yyerror (parser, YY_("syntax error: cannot back up")); \
713#define YYERRCODE OCTAVE_TEX_UNDEF
721# define YYFPRINTF fprintf
724# define YYDPRINTF(Args) \
733# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
737 YYFPRINTF (stderr, "%s ", Title); \
738 yy_symbol_print (stderr, \
739 Kind, Value, parser); \
740 YYFPRINTF (stderr, "\n"); \
750yy_symbol_value_print (FILE *yyo,
753 FILE *yyoutput = yyo;
769yy_symbol_print (FILE *yyo,
772 YYFPRINTF (yyo,
"%s %s (",
773 yykind <
YYNTOKENS ?
"token" :
"nterm", yysymbol_name (yykind));
775 yy_symbol_value_print (yyo, yykind, yyvaluep,
parser);
776 YYFPRINTF (yyo,
")");
787 YYFPRINTF (stderr,
"Stack now");
788 for (; yybottom <= yytop; yybottom++)
790 int yybot = *yybottom;
791 YYFPRINTF (stderr,
" %d", yybot);
793 YYFPRINTF (stderr,
"\n");
796# define YY_STACK_PRINT(Bottom, Top) \
799 yy_stack_print ((Bottom), (Top)); \
809 int yyrule, octave::text_parser_tex&
parser)
811 int yylno = yyrline[yyrule];
812 int yynrhs = yyr2[yyrule];
814 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %d):\n",
817 for (yyi = 0; yyi < yynrhs; yyi++)
819 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
820 yy_symbol_print (stderr,
823 YYFPRINTF (stderr,
"\n");
827# define YY_REDUCE_PRINT(Rule) \
830 yy_reduce_print (yyssp, yyvsp, Rule, parser); \
837# define YYDPRINTF(Args) ((void) 0)
838# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
839# define YY_STACK_PRINT(Bottom, Top)
840# define YY_REDUCE_PRINT(Rule)
846# define YYINITDEPTH 200
857# define YYMAXDEPTH 10000
899yydestruct (
const char *yymsg,
912#line 96 "../libinterp/corefcn/oct-tex-parser.yy"
914#line 915 "libinterp/corefcn/oct-tex-parser.cc"
918#line 96 "../libinterp/corefcn/oct-tex-parser.yy"
920#line 921 "libinterp/corefcn/oct-tex-parser.cc"
924#line 96 "../libinterp/corefcn/oct-tex-parser.yy"
926#line 927 "libinterp/corefcn/oct-tex-parser.cc"
930#line 97 "../libinterp/corefcn/oct-tex-parser.yy"
931 {
delete ((*yyvaluep).str); }
932#line 933 "libinterp/corefcn/oct-tex-parser.cc"
936#line 97 "../libinterp/corefcn/oct-tex-parser.yy"
937 {
delete ((*yyvaluep).e_base); }
938#line 939 "libinterp/corefcn/oct-tex-parser.cc"
942#line 97 "../libinterp/corefcn/oct-tex-parser.yy"
943 {
delete ((*yyvaluep).e_base); }
944#line 945 "libinterp/corefcn/oct-tex-parser.cc"
948#line 97 "../libinterp/corefcn/oct-tex-parser.yy"
949 {
delete ((*yyvaluep).e_base); }
950#line 951 "libinterp/corefcn/oct-tex-parser.cc"
954#line 97 "../libinterp/corefcn/oct-tex-parser.yy"
955 {
delete ((*yyvaluep).e_base); }
956#line 957 "libinterp/corefcn/oct-tex-parser.cc"
960#line 97 "../libinterp/corefcn/oct-tex-parser.yy"
961 {
delete ((*yyvaluep).e_base); }
962#line 963 "libinterp/corefcn/oct-tex-parser.cc"
966#line 97 "../libinterp/corefcn/oct-tex-parser.yy"
967 {
delete ((*yyvaluep).e_base); }
968#line 969 "libinterp/corefcn/oct-tex-parser.cc"
972#line 97 "../libinterp/corefcn/oct-tex-parser.yy"
973 {
delete ((*yyvaluep).e_base); }
974#line 975 "libinterp/corefcn/oct-tex-parser.cc"
978#line 97 "../libinterp/corefcn/oct-tex-parser.yy"
979 {
delete ((*yyvaluep).e_base); }
980#line 981 "libinterp/corefcn/oct-tex-parser.cc"
984#line 97 "../libinterp/corefcn/oct-tex-parser.yy"
985 {
delete ((*yyvaluep).e_base); }
986#line 987 "libinterp/corefcn/oct-tex-parser.cc"
990#line 97 "../libinterp/corefcn/oct-tex-parser.yy"
991 {
delete ((*yyvaluep).e_list); }
992#line 993 "libinterp/corefcn/oct-tex-parser.cc"
996#line 97 "../libinterp/corefcn/oct-tex-parser.yy"
997 {
delete ((*yyvaluep).e_list); }
998#line 999 "libinterp/corefcn/oct-tex-parser.cc"
1038#define octave_tex_nerrs yyps->octave_tex_nerrs
1039#define yystate yyps->yystate
1040#define yyerrstatus yyps->yyerrstatus
1041#define yyssa yyps->yyssa
1042#define yyss yyps->yyss
1043#define yyssp yyps->yyssp
1044#define yyvsa yyps->yyvsa
1045#define yyvs yyps->yyvs
1046#define yyvsp yyps->yyvsp
1047#define yystacksize yyps->yystacksize
1104 int yypushed_char,
YYSTYPE const *yypushed_val, octave::text_parser_tex&
parser)
1127#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1133 switch (yyps->yynew)
1137 goto yyread_pushed_token;
1147 YYDPRINTF ((stderr,
"Starting parse\n"));
1175#if !defined yyoverflow && !defined YYSTACK_RELOCATE
1182# if defined yyoverflow
1194 yyoverflow (
YY_(
"memory exhausted"),
1218# undef YYSTACK_RELOCATE
1228 YYDPRINTF ((stderr,
"Stack size increased to %ld\n",
1263 YYDPRINTF ((stderr,
"Return for a new token:\n"));
1269 YYDPRINTF ((stderr,
"Reading a token\n"));
1270 yychar = yypushed_char;
1279 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1300 if (yyn < 0 ||
YYLAST < yyn || yycheck[yyn] != yytoken)
1353 yyval =
yyvsp[1-yylen];
1360#line 110 "../libinterp/corefcn/oct-tex-parser.yy"
1361 { (yyval.str) =
new std::string (1, (
yyvsp[0].ch)); }
1362#line 1363 "libinterp/corefcn/oct-tex-parser.cc"
1366#line 112 "../libinterp/corefcn/oct-tex-parser.yy"
1367 { (
yyvsp[-1].str)->append (1, (
yyvsp[0].ch)); (yyval.str) = (
yyvsp[-1].str); }
1368#line 1369 "libinterp/corefcn/oct-tex-parser.cc"
1372#line 116 "../libinterp/corefcn/oct-tex-parser.yy"
1373 { (yyval.e_base) =
new octave::text_element_symbol ((
yyvsp[0].sym)); }
1374#line 1375 "libinterp/corefcn/oct-tex-parser.cc"
1378#line 120 "../libinterp/corefcn/oct-tex-parser.yy"
1379 { (yyval.e_base) =
new octave::text_element_fontstyle (octave::text_element_fontstyle::bold); }
1380#line 1381 "libinterp/corefcn/oct-tex-parser.cc"
1384#line 122 "../libinterp/corefcn/oct-tex-parser.yy"
1385 { (yyval.e_base) =
new octave::text_element_fontstyle (octave::text_element_fontstyle::italic); }
1386#line 1387 "libinterp/corefcn/oct-tex-parser.cc"
1390#line 124 "../libinterp/corefcn/oct-tex-parser.yy"
1391 { (yyval.e_base) =
new octave::text_element_fontstyle (octave::text_element_fontstyle::oblique); }
1392#line 1393 "libinterp/corefcn/oct-tex-parser.cc"
1396#line 126 "../libinterp/corefcn/oct-tex-parser.yy"
1397 { (yyval.e_base) =
new octave::text_element_fontstyle (octave::text_element_fontstyle::normal); }
1398#line 1399 "libinterp/corefcn/oct-tex-parser.cc"
1402#line 130 "../libinterp/corefcn/oct-tex-parser.yy"
1403 { (yyval.e_base) =
new octave::text_element_fontsize ((
yyvsp[-1].num)); }
1404#line 1405 "libinterp/corefcn/oct-tex-parser.cc"
1408#line 134 "../libinterp/corefcn/oct-tex-parser.yy"
1410 (yyval.e_base) =
new octave::text_element_fontname (*(
yyvsp[-1].str));
1411 delete (
yyvsp[-1].str);
1413#line 1414 "libinterp/corefcn/oct-tex-parser.cc"
1417#line 141 "../libinterp/corefcn/oct-tex-parser.yy"
1419 (yyval.e_base) =
new octave::text_element_color (*(
yyvsp[-1].str));
1420 delete (
yyvsp[-1].str);
1422#line 1423 "libinterp/corefcn/oct-tex-parser.cc"
1426#line 146 "../libinterp/corefcn/oct-tex-parser.yy"
1428 (yyval.e_base) =
new octave::text_element_color ((
yyvsp[-3].num), (
yyvsp[-2].num), (
yyvsp[-1].num));
1430#line 1431 "libinterp/corefcn/oct-tex-parser.cc"
1434#line 152 "../libinterp/corefcn/oct-tex-parser.yy"
1436 (yyval.e_base) =
new octave::text_element_string (*(
yyvsp[0].str));
1437 delete (
yyvsp[0].str);
1439#line 1440 "libinterp/corefcn/oct-tex-parser.cc"
1443#line 157 "../libinterp/corefcn/oct-tex-parser.yy"
1444 { (yyval.e_base) = (
yyvsp[0].e_list); }
1445#line 1446 "libinterp/corefcn/oct-tex-parser.cc"
1449#line 169 "../libinterp/corefcn/oct-tex-parser.yy"
1450 { (yyval.e_base) =
new octave::text_element_superscript ((
yyvsp[0].ch)); }
1451#line 1452 "libinterp/corefcn/oct-tex-parser.cc"
1455#line 171 "../libinterp/corefcn/oct-tex-parser.yy"
1456 { (yyval.e_base) =
new octave::text_element_superscript ((
yyvsp[0].e_list)); }
1457#line 1458 "libinterp/corefcn/oct-tex-parser.cc"
1461#line 173 "../libinterp/corefcn/oct-tex-parser.yy"
1462 { (yyval.e_base) =
new octave::text_element_superscript ((
yyvsp[0].e_base)); }
1463#line 1464 "libinterp/corefcn/oct-tex-parser.cc"
1467#line 177 "../libinterp/corefcn/oct-tex-parser.yy"
1468 { (yyval.e_base) =
new octave::text_element_subscript ((
yyvsp[0].ch)); }
1469#line 1470 "libinterp/corefcn/oct-tex-parser.cc"
1473#line 179 "../libinterp/corefcn/oct-tex-parser.yy"
1474 { (yyval.e_base) =
new octave::text_element_subscript ((
yyvsp[0].e_list)); }
1475#line 1476 "libinterp/corefcn/oct-tex-parser.cc"
1479#line 181 "../libinterp/corefcn/oct-tex-parser.yy"
1480 { (yyval.e_base) =
new octave::text_element_subscript ((
yyvsp[0].e_base)); }
1481#line 1482 "libinterp/corefcn/oct-tex-parser.cc"
1485#line 185 "../libinterp/corefcn/oct-tex-parser.yy"
1486 { (yyval.e_base) =
new octave::text_element_combined ((
yyvsp[-1].e_base), (
yyvsp[0].e_base)); }
1487#line 1488 "libinterp/corefcn/oct-tex-parser.cc"
1491#line 187 "../libinterp/corefcn/oct-tex-parser.yy"
1492 { (yyval.e_base) =
new octave::text_element_combined ((
yyvsp[-1].e_base), (
yyvsp[0].e_base)); }
1493#line 1494 "libinterp/corefcn/oct-tex-parser.cc"
1497#line 191 "../libinterp/corefcn/oct-tex-parser.yy"
1498 { (yyval.e_list) =
new octave::text_element_list ((
yyvsp[0].e_base)); }
1499#line 1500 "libinterp/corefcn/oct-tex-parser.cc"
1503#line 193 "../libinterp/corefcn/oct-tex-parser.yy"
1504 { (
yyvsp[-1].e_list)->push_back ((
yyvsp[0].e_base)); (yyval.e_list) = (
yyvsp[-1].e_list); }
1505#line 1506 "libinterp/corefcn/oct-tex-parser.cc"
1509#line 198 "../libinterp/corefcn/oct-tex-parser.yy"
1510 { (yyval.e_list) = (
yyvsp[-1].e_list); }
1511#line 1512 "libinterp/corefcn/oct-tex-parser.cc"
1515#line 200 "../libinterp/corefcn/oct-tex-parser.yy"
1516 { (yyval.e_list) =
new octave::text_element_list (); }
1517#line 1518 "libinterp/corefcn/oct-tex-parser.cc"
1521#line 204 "../libinterp/corefcn/oct-tex-parser.yy"
1522 {
parser.set_parse_result (
new octave::text_element_string (
"")); }
1523#line 1524 "libinterp/corefcn/oct-tex-parser.cc"
1527#line 206 "../libinterp/corefcn/oct-tex-parser.yy"
1529#line 1530 "libinterp/corefcn/oct-tex-parser.cc"
1533#line 1534 "libinterp/corefcn/oct-tex-parser.cc"
1559 const int yylhs = yyr1[yyn] -
YYNTOKENS;
1560 const int yyi = yypgoto[yylhs] + *
yyssp;
1563 : yydefgoto[yylhs]);
1596 yydestruct (
"Error: discarding",
1652 yydestruct (
"Error: popping",
1705 yydestruct (
"Cleanup: discarding lookahead",
1714 yydestruct (
"Cleanup: popping",
1729#undef octave_tex_nerrs
1739#line 209 "../libinterp/corefcn/oct-tex-parser.yy"
1742#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
1744# pragma GCC diagnostic pop
1752 octave_tex_debug = 0;
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)