From 101259e3e4c70a5d093dafdd30c0991b15ea190c Mon Sep 17 00:00:00 2001 From: fredkiefer Date: Sun, 15 Jun 2014 21:38:40 +0000 Subject: [PATCH] Add support to parse link fields in RTF. This enables copying of links in NSTextView. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37946 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 9 + TextConverters/RTF/RTFConsumer.m | 54 + TextConverters/RTF/RTFConsumerFunctions.h | 2 + TextConverters/RTF/rtfGrammar.tab.h | 192 +- TextConverters/RTF/rtfGrammar.tab.m | 2662 +++++++++++---------- TextConverters/RTF/rtfGrammar.y | 48 +- TextConverters/RTF/rtfScanner.m | 9 + 7 files changed, 1637 insertions(+), 1339 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b3b849df..7ae2d5ca7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2014-06-15 Fred Kiefer + + * TextConverters/RTF/rtfScanner.m, + * TextConverters/RTF/rtfGrammar.y, + * TextConverters/RTF/RTFConsumerFunctions.h, + * TextConverters/RTF/RTFConsumer.m: Add support for parsing link fields. + * TextConverters/RTF/rtfGrammar.tab.h, + * TextConverters/RTF/rtfGrammar.tab.m: Regenerated. + 2014-06-09 Fred Kiefer * Source/externs.m: Correct many string values that where diff --git a/TextConverters/RTF/RTFConsumer.m b/TextConverters/RTF/RTFConsumer.m index 331da8fa1..e4931a20d 100644 --- a/TextConverters/RTF/RTFConsumer.m +++ b/TextConverters/RTF/RTFConsumer.m @@ -284,6 +284,8 @@ static BOOL classInheritsFromNSMutableAttributedString (Class c) - (void) appendString: (NSString*)string; - (void) appendHelpLink: (NSString*)fileName marker: (NSString *)markerName; - (void) appendHelpMarker: (NSString*)markerName; +- (void) appendField: (NSString*)instruction + result: (NSString*)result; - (void) reset; @end @@ -778,6 +780,40 @@ static BOOL classInheritsFromNSMutableAttributedString (Class c) } } +- (void) appendField: (NSString*)instruction + result: (NSString*)fieldResult +{ + if (!ignore) + { + int oldPosition = [result length]; + int textlen = [fieldResult length]; + NSRange insertionRange = NSMakeRange(oldPosition, textlen); + + [self appendString: fieldResult]; + + if ([instruction hasPrefix: @"HYPERLINK "]) + { + NSDictionary *attributes; + NSString *link = [instruction substringFromIndex: 10]; + + if ([link characterAtIndex: 0] == (unichar)'\"') + { + link = [link substringWithRange: NSMakeRange(1, [link length] - 2)]; + } + + attributes = [[NSDictionary alloc] + initWithObjectsAndKeys: + link, NSLinkAttributeName, + [NSNumber numberWithInt : 1], NSUnderlineStyleAttributeName, + [NSColor blueColor], NSForegroundColorAttributeName, + nil]; + [result addAttributes: attributes + range: insertionRange]; + DESTROY(attributes); + } + } +} + @end #undef IGNORE @@ -1349,3 +1385,21 @@ void GSRTFNeXTHelpMarker (void *ctxt, int num, const char *markername) [(RTFDConsumer *)ctxt appendHelpMarker: markerName]; } +void GSRTFaddField (void *ctxt, const char *inst, const char *result) +{ + NSString *fieldResult = [[NSString alloc] initWithCString: result + encoding: ENCODING]; + NSString *fieldInstruction; + + // Ignore leading blanks + while (inst[0] == ' ') + { + inst++; + } + fieldInstruction = [[NSString alloc] initWithCString: inst + encoding: ENCODING]; + + [(RTFDConsumer *)ctxt appendField: fieldInstruction result: fieldResult]; + DESTROY(fieldInstruction); + DESTROY(fieldResult); +} diff --git a/TextConverters/RTF/RTFConsumerFunctions.h b/TextConverters/RTF/RTFConsumerFunctions.h index 7f4ea687e..a5a01c7ac 100644 --- a/TextConverters/RTF/RTFConsumerFunctions.h +++ b/TextConverters/RTF/RTFConsumerFunctions.h @@ -147,5 +147,7 @@ void GSRTFNeXTHelpLink(void *ctxt, int num, const char *markername, /* NeXTHelpMarker */ void GSRTFNeXTHelpMarker(void *ctxt, int num, const char *markername); +void GSRTFaddField (void *ctxt, const char *inst, const char *result); + #endif diff --git a/TextConverters/RTF/rtfGrammar.tab.h b/TextConverters/RTF/rtfGrammar.tab.h index 35c01f95a..bc68a916f 100644 --- a/TextConverters/RTF/rtfGrammar.tab.h +++ b/TextConverters/RTF/rtfGrammar.tab.h @@ -1,10 +1,8 @@ +/* A Bison parser, made by GNU Bison 2.7. */ -/* A Bison parser, made by GNU Bison 2.4.1. */ - -/* Skeleton interface for Bison's Yacc-like parsers in C +/* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -32,6 +30,15 @@ This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ +#ifndef YY_GSRTF_RTFGRAMMAR_TAB_H_INCLUDED +# define YY_GSRTF_RTFGRAMMAR_TAB_H_INCLUDED +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int GSRTFdebug; +#endif /* Tokens. */ #ifndef YYTOKENTYPE @@ -63,87 +70,94 @@ RTFemspace = 279, RTFenspace = 280, RTFbullet = 281, - RTFlquote = 282, - RTFrquote = 283, - RTFldblquote = 284, - RTFrdblquote = 285, - RTFred = 286, - RTFgreen = 287, - RTFblue = 288, - RTFcolorbg = 289, - RTFcolorfg = 290, - RTFunderlinecolor = 291, - RTFcolortable = 292, - RTFfont = 293, - RTFfontSize = 294, - RTFNeXTGraphic = 295, - RTFNeXTGraphicWidth = 296, - RTFNeXTGraphicHeight = 297, - RTFNeXTHelpLink = 298, - RTFNeXTHelpMarker = 299, - RTFNeXTfilename = 300, - RTFNeXTmarkername = 301, - RTFNeXTlinkFilename = 302, - RTFNeXTlinkMarkername = 303, - RTFpaperWidth = 304, - RTFpaperHeight = 305, - RTFmarginLeft = 306, - RTFmarginRight = 307, - RTFmarginTop = 308, - RTFmarginButtom = 309, - RTFfirstLineIndent = 310, - RTFleftIndent = 311, - RTFrightIndent = 312, - RTFalignCenter = 313, - RTFalignJustified = 314, - RTFalignLeft = 315, - RTFalignRight = 316, - RTFlineSpace = 317, - RTFspaceAbove = 318, - RTFstyle = 319, - RTFbold = 320, - RTFitalic = 321, - RTFunderline = 322, - RTFunderlineDot = 323, - RTFunderlineDash = 324, - RTFunderlineDashDot = 325, - RTFunderlineDashDotDot = 326, - RTFunderlineDouble = 327, - RTFunderlineStop = 328, - RTFunderlineThick = 329, - RTFunderlineThickDot = 330, - RTFunderlineThickDash = 331, - RTFunderlineThickDashDot = 332, - RTFunderlineThickDashDotDot = 333, - RTFunderlineWord = 334, - RTFstrikethrough = 335, - RTFstrikethroughDouble = 336, - RTFunichar = 337, - RTFsubscript = 338, - RTFsuperscript = 339, - RTFtabstop = 340, - RTFfcharset = 341, - RTFfprq = 342, - RTFcpg = 343, - RTFOtherStatement = 344, - RTFfontListStart = 345, - RTFfamilyNil = 346, - RTFfamilyRoman = 347, - RTFfamilySwiss = 348, - RTFfamilyModern = 349, - RTFfamilyScript = 350, - RTFfamilyDecor = 351, - RTFfamilyTech = 352 + RTFfield = 282, + RTFfldinst = 283, + RTFfldalt = 284, + RTFfldrslt = 285, + RTFflddirty = 286, + RTFfldedit = 287, + RTFfldlock = 288, + RTFfldpriv = 289, + RTFfttruetype = 290, + RTFlquote = 291, + RTFrquote = 292, + RTFldblquote = 293, + RTFrdblquote = 294, + RTFred = 295, + RTFgreen = 296, + RTFblue = 297, + RTFcolorbg = 298, + RTFcolorfg = 299, + RTFunderlinecolor = 300, + RTFcolortable = 301, + RTFfont = 302, + RTFfontSize = 303, + RTFNeXTGraphic = 304, + RTFNeXTGraphicWidth = 305, + RTFNeXTGraphicHeight = 306, + RTFNeXTHelpLink = 307, + RTFNeXTHelpMarker = 308, + RTFNeXTfilename = 309, + RTFNeXTmarkername = 310, + RTFNeXTlinkFilename = 311, + RTFNeXTlinkMarkername = 312, + RTFpaperWidth = 313, + RTFpaperHeight = 314, + RTFmarginLeft = 315, + RTFmarginRight = 316, + RTFmarginTop = 317, + RTFmarginButtom = 318, + RTFfirstLineIndent = 319, + RTFleftIndent = 320, + RTFrightIndent = 321, + RTFalignCenter = 322, + RTFalignJustified = 323, + RTFalignLeft = 324, + RTFalignRight = 325, + RTFlineSpace = 326, + RTFspaceAbove = 327, + RTFstyle = 328, + RTFbold = 329, + RTFitalic = 330, + RTFunderline = 331, + RTFunderlineDot = 332, + RTFunderlineDash = 333, + RTFunderlineDashDot = 334, + RTFunderlineDashDotDot = 335, + RTFunderlineDouble = 336, + RTFunderlineStop = 337, + RTFunderlineThick = 338, + RTFunderlineThickDot = 339, + RTFunderlineThickDash = 340, + RTFunderlineThickDashDot = 341, + RTFunderlineThickDashDotDot = 342, + RTFunderlineWord = 343, + RTFstrikethrough = 344, + RTFstrikethroughDouble = 345, + RTFunichar = 346, + RTFsubscript = 347, + RTFsuperscript = 348, + RTFtabstop = 349, + RTFfcharset = 350, + RTFfprq = 351, + RTFcpg = 352, + RTFOtherStatement = 353, + RTFfontListStart = 354, + RTFfamilyNil = 355, + RTFfamilyRoman = 356, + RTFfamilySwiss = 357, + RTFfamilyModern = 358, + RTFfamilyScript = 359, + RTFfamilyDecor = 360, + RTFfamilyTech = 361 }; #endif - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { - -/* Line 1676 of yacc.c */ +/* Line 2058 of yacc.c */ #line 82 "rtfGrammar.y" int number; @@ -151,9 +165,8 @@ typedef union YYSTYPE RTFcmd cmd; - -/* Line 1676 of yacc.c */ -#line 157 "rtfGrammar.tab.h" +/* Line 2058 of yacc.c */ +#line 170 "rtfGrammar.tab.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -161,5 +174,18 @@ typedef union YYSTYPE #endif +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int GSRTFparse (void *YYPARSE_PARAM); +#else +int GSRTFparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int GSRTFparse (void *ctxt, void *lctxt); +#else +int GSRTFparse (); +#endif +#endif /* ! YYPARSE_PARAM */ - +#endif /* !YY_GSRTF_RTFGRAMMAR_TAB_H_INCLUDED */ diff --git a/TextConverters/RTF/rtfGrammar.tab.m b/TextConverters/RTF/rtfGrammar.tab.m index 29130c87d..1195630f2 100644 --- a/TextConverters/RTF/rtfGrammar.tab.m +++ b/TextConverters/RTF/rtfGrammar.tab.m @@ -1,10 +1,8 @@ +/* A Bison parser, made by GNU Bison 2.7. */ -/* A Bison parser, made by GNU Bison 2.4.1. */ - -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -46,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.1" +#define YYBISON_VERSION "2.7" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -60,8 +58,6 @@ /* Pull parsers. */ #define YYPULL 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse GSRTFparse @@ -72,10 +68,8 @@ #define yydebug GSRTFdebug #define yynerrs GSRTFnerrs - /* Copy the first part of user declarations. */ - -/* Line 189 of yacc.c */ +/* Line 371 of yacc.c */ #line 36 "rtfGrammar.y" @@ -112,21 +106,23 @@ typedef void *GSRTFctxt; #define CTXT ctxt #define YYERROR_VERBOSE -#define YYDEBUG 0 +#define YYDEBUG 1 #include "RTFConsumerFunctions.h" /*int GSRTFlex (YYSTYPE *lvalp, RTFscannerCtxt *lctxt); */ int GSRTFlex(void *lvalp, void *lctxt); +/* Line 371 of yacc.c */ +#line 118 "rtfGrammar.tab.m" -/* Line 189 of yacc.c */ -#line 125 "rtfGrammar.tab.m" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif +# ifndef YY_NULL +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULL nullptr +# else +# define YY_NULL 0 +# endif +# endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE @@ -136,11 +132,17 @@ int GSRTFlex(void *lvalp, void *lctxt); # define YYERROR_VERBOSE 0 #endif -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 +/* In a future release of Bison, this section will be replaced + by #include "rtfGrammar.tab.h". */ +#ifndef YY_GSRTF_RTFGRAMMAR_TAB_H_INCLUDED +# define YY_GSRTF_RTFGRAMMAR_TAB_H_INCLUDED +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int GSRTFdebug; #endif - /* Tokens. */ #ifndef YYTOKENTYPE @@ -172,87 +174,94 @@ int GSRTFlex(void *lvalp, void *lctxt); RTFemspace = 279, RTFenspace = 280, RTFbullet = 281, - RTFlquote = 282, - RTFrquote = 283, - RTFldblquote = 284, - RTFrdblquote = 285, - RTFred = 286, - RTFgreen = 287, - RTFblue = 288, - RTFcolorbg = 289, - RTFcolorfg = 290, - RTFunderlinecolor = 291, - RTFcolortable = 292, - RTFfont = 293, - RTFfontSize = 294, - RTFNeXTGraphic = 295, - RTFNeXTGraphicWidth = 296, - RTFNeXTGraphicHeight = 297, - RTFNeXTHelpLink = 298, - RTFNeXTHelpMarker = 299, - RTFNeXTfilename = 300, - RTFNeXTmarkername = 301, - RTFNeXTlinkFilename = 302, - RTFNeXTlinkMarkername = 303, - RTFpaperWidth = 304, - RTFpaperHeight = 305, - RTFmarginLeft = 306, - RTFmarginRight = 307, - RTFmarginTop = 308, - RTFmarginButtom = 309, - RTFfirstLineIndent = 310, - RTFleftIndent = 311, - RTFrightIndent = 312, - RTFalignCenter = 313, - RTFalignJustified = 314, - RTFalignLeft = 315, - RTFalignRight = 316, - RTFlineSpace = 317, - RTFspaceAbove = 318, - RTFstyle = 319, - RTFbold = 320, - RTFitalic = 321, - RTFunderline = 322, - RTFunderlineDot = 323, - RTFunderlineDash = 324, - RTFunderlineDashDot = 325, - RTFunderlineDashDotDot = 326, - RTFunderlineDouble = 327, - RTFunderlineStop = 328, - RTFunderlineThick = 329, - RTFunderlineThickDot = 330, - RTFunderlineThickDash = 331, - RTFunderlineThickDashDot = 332, - RTFunderlineThickDashDotDot = 333, - RTFunderlineWord = 334, - RTFstrikethrough = 335, - RTFstrikethroughDouble = 336, - RTFunichar = 337, - RTFsubscript = 338, - RTFsuperscript = 339, - RTFtabstop = 340, - RTFfcharset = 341, - RTFfprq = 342, - RTFcpg = 343, - RTFOtherStatement = 344, - RTFfontListStart = 345, - RTFfamilyNil = 346, - RTFfamilyRoman = 347, - RTFfamilySwiss = 348, - RTFfamilyModern = 349, - RTFfamilyScript = 350, - RTFfamilyDecor = 351, - RTFfamilyTech = 352 + RTFfield = 282, + RTFfldinst = 283, + RTFfldalt = 284, + RTFfldrslt = 285, + RTFflddirty = 286, + RTFfldedit = 287, + RTFfldlock = 288, + RTFfldpriv = 289, + RTFfttruetype = 290, + RTFlquote = 291, + RTFrquote = 292, + RTFldblquote = 293, + RTFrdblquote = 294, + RTFred = 295, + RTFgreen = 296, + RTFblue = 297, + RTFcolorbg = 298, + RTFcolorfg = 299, + RTFunderlinecolor = 300, + RTFcolortable = 301, + RTFfont = 302, + RTFfontSize = 303, + RTFNeXTGraphic = 304, + RTFNeXTGraphicWidth = 305, + RTFNeXTGraphicHeight = 306, + RTFNeXTHelpLink = 307, + RTFNeXTHelpMarker = 308, + RTFNeXTfilename = 309, + RTFNeXTmarkername = 310, + RTFNeXTlinkFilename = 311, + RTFNeXTlinkMarkername = 312, + RTFpaperWidth = 313, + RTFpaperHeight = 314, + RTFmarginLeft = 315, + RTFmarginRight = 316, + RTFmarginTop = 317, + RTFmarginButtom = 318, + RTFfirstLineIndent = 319, + RTFleftIndent = 320, + RTFrightIndent = 321, + RTFalignCenter = 322, + RTFalignJustified = 323, + RTFalignLeft = 324, + RTFalignRight = 325, + RTFlineSpace = 326, + RTFspaceAbove = 327, + RTFstyle = 328, + RTFbold = 329, + RTFitalic = 330, + RTFunderline = 331, + RTFunderlineDot = 332, + RTFunderlineDash = 333, + RTFunderlineDashDot = 334, + RTFunderlineDashDotDot = 335, + RTFunderlineDouble = 336, + RTFunderlineStop = 337, + RTFunderlineThick = 338, + RTFunderlineThickDot = 339, + RTFunderlineThickDash = 340, + RTFunderlineThickDashDot = 341, + RTFunderlineThickDashDotDot = 342, + RTFunderlineWord = 343, + RTFstrikethrough = 344, + RTFstrikethroughDouble = 345, + RTFunichar = 346, + RTFsubscript = 347, + RTFsuperscript = 348, + RTFtabstop = 349, + RTFfcharset = 350, + RTFfprq = 351, + RTFcpg = 352, + RTFOtherStatement = 353, + RTFfontListStart = 354, + RTFfamilyNil = 355, + RTFfamilyRoman = 356, + RTFfamilySwiss = 357, + RTFfamilyModern = 358, + RTFfamilyScript = 359, + RTFfamilyDecor = 360, + RTFfamilyTech = 361 }; #endif - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { - -/* Line 214 of yacc.c */ +/* Line 387 of yacc.c */ #line 82 "rtfGrammar.y" int number; @@ -260,9 +269,8 @@ typedef union YYSTYPE RTFcmd cmd; - -/* Line 214 of yacc.c */ -#line 266 "rtfGrammar.tab.m" +/* Line 387 of yacc.c */ +#line 274 "rtfGrammar.tab.m" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -270,11 +278,26 @@ typedef union YYSTYPE #endif +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int GSRTFparse (void *YYPARSE_PARAM); +#else +int GSRTFparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int GSRTFparse (void *ctxt, void *lctxt); +#else +int GSRTFparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + +#endif /* !YY_GSRTF_RTFGRAMMAR_TAB_H_INCLUDED */ + /* Copy the second part of user declarations. */ - -/* Line 264 of yacc.c */ -#line 278 "rtfGrammar.tab.m" +/* Line 390 of yacc.c */ +#line 301 "rtfGrammar.tab.m" #ifdef short # undef short @@ -324,27 +347,27 @@ typedef short int yytype_int16; #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if YYENABLE_NLS +# if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ -# define YY_(msgid) msgid +# define YY_(Msgid) Msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) +# define YYUSE(E) ((void) (E)) #else -# define YYUSE(e) /* empty */ +# define YYUSE(E) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint -# define YYID(n) (n) +# define YYID(N) (N) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) @@ -377,11 +400,12 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # endif @@ -404,24 +428,24 @@ YYID (yyi) # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined _STDLIB_H \ +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif @@ -450,23 +474,7 @@ union yyalloc ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of @@ -486,23 +494,43 @@ union yyalloc #endif +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + /* YYFINAL -- State number of the termination state. */ #define YYFINAL 4 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1300 +#define YYLAST 1698 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 100 +#define YYNTOKENS 109 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 34 +#define YYNNTS 44 /* YYNRULES -- Number of rules. */ -#define YYNRULES 116 +#define YYNRULES 141 /* YYNRULES -- Number of states. */ -#define YYNSTATES 168 +#define YYNSTATES 213 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 352 +#define YYMAXUTOK 361 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -522,7 +550,7 @@ static const yytype_uint8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 98, 2, 99, 2, 2, 2, 2, + 2, 2, 2, 107, 2, 108, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -545,7 +573,8 @@ static const yytype_uint8 yytranslate[] = 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97 + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106 }; #if YYDEBUG @@ -556,72 +585,87 @@ static const yytype_uint16 yyprhs[] = 0, 0, 3, 4, 5, 13, 15, 17, 19, 21, 23, 24, 27, 30, 33, 36, 39, 42, 43, 49, 50, 56, 57, 63, 64, 70, 71, 77, 78, 84, - 85, 91, 92, 98, 102, 104, 106, 108, 110, 112, - 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, - 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, - 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, - 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, - 194, 196, 197, 199, 201, 203, 204, 205, 215, 216, - 217, 230, 231, 232, 241, 246, 247, 250, 255, 262, - 267, 268, 271, 274, 277, 280, 282, 284, 286, 288, - 290, 292, 294, 299, 300, 303, 308 + 85, 91, 92, 98, 99, 105, 109, 113, 115, 116, + 119, 122, 125, 128, 129, 131, 138, 139, 140, 152, + 156, 157, 159, 165, 174, 178, 179, 182, 185, 187, + 189, 191, 193, 195, 197, 199, 201, 203, 205, 207, + 209, 211, 213, 215, 217, 219, 221, 223, 225, 227, + 229, 231, 233, 235, 237, 239, 241, 243, 245, 247, + 249, 251, 253, 255, 257, 259, 261, 263, 265, 267, + 269, 271, 273, 275, 277, 279, 280, 282, 284, 286, + 287, 288, 298, 299, 300, 313, 314, 315, 324, 329, + 330, 333, 338, 345, 350, 351, 354, 357, 360, 363, + 366, 368, 370, 372, 374, 376, 378, 380, 385, 386, + 389, 394 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 101, 0, -1, -1, -1, 98, 102, 4, 104, 105, - 103, 99, -1, 5, -1, 6, -1, 7, -1, 8, - -1, 89, -1, -1, 105, 126, -1, 105, 131, -1, - 105, 115, -1, 105, 3, -1, 105, 106, -1, 105, - 1, -1, -1, 98, 107, 105, 116, 99, -1, -1, - 98, 108, 9, 105, 99, -1, -1, 98, 109, 10, - 105, 99, -1, -1, 98, 110, 11, 105, 99, -1, - -1, 98, 111, 12, 105, 99, -1, -1, 98, 112, - 13, 105, 99, -1, -1, 98, 113, 14, 105, 99, - -1, -1, 98, 114, 15, 105, 99, -1, 98, 1, - 99, -1, 38, -1, 39, -1, 49, -1, 50, -1, - 51, -1, 52, -1, 53, -1, 54, -1, 55, -1, - 56, -1, 57, -1, 85, -1, 58, -1, 59, -1, - 60, -1, 61, -1, 63, -1, 62, -1, 18, -1, - 64, -1, 34, -1, 35, -1, 36, -1, 83, -1, - 84, -1, 65, -1, 66, -1, 67, -1, 68, -1, - 69, -1, 70, -1, 71, -1, 72, -1, 73, -1, - 74, -1, 75, -1, 76, -1, 77, -1, 78, -1, - 79, -1, 80, -1, 81, -1, 82, -1, 16, -1, - 17, -1, 19, -1, 89, -1, -1, 117, -1, 120, - -1, 123, -1, -1, -1, 98, 40, 3, 41, 42, - 99, 118, 105, 119, -1, -1, -1, 98, 43, 46, - 3, 47, 3, 48, 3, 99, 121, 105, 122, -1, - -1, -1, 98, 44, 46, 3, 99, 124, 105, 125, - -1, 98, 90, 127, 99, -1, -1, 127, 128, -1, - 127, 98, 128, 99, -1, 127, 98, 128, 106, 3, - 99, -1, 38, 130, 129, 3, -1, -1, 129, 86, - -1, 129, 87, -1, 129, 88, -1, 129, 106, -1, - 91, -1, 92, -1, 93, -1, 94, -1, 95, -1, - 96, -1, 97, -1, 98, 37, 132, 99, -1, -1, - 132, 133, -1, 31, 32, 33, 3, -1, 3, -1 + 110, 0, -1, -1, -1, 107, 111, 4, 113, 114, + 112, 108, -1, 5, -1, 6, -1, 7, -1, 8, + -1, 98, -1, -1, 114, 145, -1, 114, 150, -1, + 114, 134, -1, 114, 3, -1, 114, 115, -1, 114, + 1, -1, -1, 107, 116, 114, 135, 108, -1, -1, + 107, 117, 9, 114, 108, -1, -1, 107, 118, 10, + 114, 108, -1, -1, 107, 119, 11, 114, 108, -1, + -1, 107, 120, 12, 114, 108, -1, -1, 107, 121, + 13, 114, 108, -1, -1, 107, 122, 14, 114, 108, + -1, -1, 107, 123, 15, 114, 108, -1, -1, 107, + 124, 27, 125, 108, -1, 107, 1, 108, -1, 126, + 128, 132, -1, 1, -1, -1, 126, 31, -1, 126, + 32, -1, 126, 33, -1, 126, 34, -1, -1, 9, + -1, 107, 127, 28, 3, 131, 108, -1, -1, -1, + 107, 127, 28, 107, 129, 133, 3, 131, 108, 130, + 108, -1, 107, 1, 108, -1, -1, 29, -1, 107, + 127, 30, 3, 108, -1, 107, 127, 30, 107, 133, + 3, 108, 108, -1, 107, 1, 108, -1, -1, 133, + 134, -1, 133, 115, -1, 47, -1, 48, -1, 58, + -1, 59, -1, 60, -1, 61, -1, 62, -1, 63, + -1, 64, -1, 65, -1, 66, -1, 94, -1, 67, + -1, 68, -1, 69, -1, 70, -1, 72, -1, 71, + -1, 18, -1, 73, -1, 43, -1, 44, -1, 45, + -1, 92, -1, 93, -1, 74, -1, 75, -1, 76, + -1, 77, -1, 78, -1, 79, -1, 80, -1, 81, + -1, 82, -1, 83, -1, 84, -1, 85, -1, 86, + -1, 87, -1, 88, -1, 89, -1, 90, -1, 91, + -1, 16, -1, 17, -1, 19, -1, 98, -1, -1, + 136, -1, 139, -1, 142, -1, -1, -1, 107, 49, + 3, 50, 51, 108, 137, 114, 138, -1, -1, -1, + 107, 52, 55, 3, 56, 3, 57, 3, 108, 140, + 114, 141, -1, -1, -1, 107, 53, 55, 3, 108, + 143, 114, 144, -1, 107, 99, 146, 108, -1, -1, + 146, 147, -1, 146, 107, 147, 108, -1, 146, 107, + 147, 115, 3, 108, -1, 47, 149, 148, 3, -1, + -1, 148, 95, -1, 148, 96, -1, 148, 97, -1, + 148, 35, -1, 148, 115, -1, 100, -1, 101, -1, + 102, -1, 103, -1, 104, -1, 105, -1, 106, -1, + 107, 46, 151, 108, -1, -1, 151, 152, -1, 40, + 41, 42, 3, -1, 3, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 195, 195, 195, 195, 198, 199, 200, 201, 203, - 206, 207, 208, 209, 210, 211, 212, 215, 215, 216, - 216, 217, 217, 218, 218, 219, 219, 220, 220, 221, - 221, 222, 222, 223, 231, 238, 245, 252, 259, 266, - 273, 280, 287, 294, 301, 308, 315, 316, 317, 318, - 319, 326, 327, 328, 329, 336, 343, 350, 357, 364, - 371, 378, 385, 392, 399, 406, 413, 420, 421, 428, - 435, 442, 449, 456, 463, 469, 470, 471, 472, 473, - 474, 478, 479, 480, 481, 493, 493, 493, 508, 508, - 508, 522, 522, 522, 531, 534, 535, 536, 537, 543, - 547, 548, 549, 550, 551, 556, 557, 558, 559, 560, - 561, 562, 570, 573, 574, 578, 583 + 0, 205, 205, 205, 205, 208, 209, 210, 211, 213, + 216, 217, 218, 219, 220, 221, 222, 225, 225, 226, + 226, 227, 227, 228, 228, 229, 229, 230, 230, 231, + 231, 232, 232, 233, 233, 234, 238, 239, 242, 243, + 244, 245, 246, 249, 250, 253, 254, 254, 254, 255, + 258, 259, 262, 263, 264, 267, 268, 269, 276, 283, + 290, 297, 304, 311, 318, 325, 332, 339, 346, 353, + 360, 361, 362, 363, 364, 371, 372, 373, 374, 381, + 388, 395, 402, 409, 416, 423, 430, 437, 444, 451, + 458, 465, 466, 473, 480, 487, 494, 501, 508, 514, + 515, 516, 517, 518, 519, 523, 524, 525, 526, 538, + 538, 538, 553, 553, 553, 567, 567, 567, 576, 579, + 580, 581, 582, 588, 592, 593, 594, 595, 596, 597, + 602, 603, 604, 605, 606, 607, 608, 616, 619, 620, + 624, 629 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +#if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = @@ -631,14 +675,16 @@ static const char *const yytname[] = "RTFfootnote", "RTFheader", "RTFfooter", "RTFpict", "RTFplain", "RTFparagraph", "RTFdefaultParagraph", "RTFrow", "RTFcell", "RTFtabulator", "RTFemdash", "RTFendash", "RTFemspace", "RTFenspace", - "RTFbullet", "RTFlquote", "RTFrquote", "RTFldblquote", "RTFrdblquote", - "RTFred", "RTFgreen", "RTFblue", "RTFcolorbg", "RTFcolorfg", - "RTFunderlinecolor", "RTFcolortable", "RTFfont", "RTFfontSize", - "RTFNeXTGraphic", "RTFNeXTGraphicWidth", "RTFNeXTGraphicHeight", - "RTFNeXTHelpLink", "RTFNeXTHelpMarker", "RTFNeXTfilename", - "RTFNeXTmarkername", "RTFNeXTlinkFilename", "RTFNeXTlinkMarkername", - "RTFpaperWidth", "RTFpaperHeight", "RTFmarginLeft", "RTFmarginRight", - "RTFmarginTop", "RTFmarginButtom", "RTFfirstLineIndent", "RTFleftIndent", + "RTFbullet", "RTFfield", "RTFfldinst", "RTFfldalt", "RTFfldrslt", + "RTFflddirty", "RTFfldedit", "RTFfldlock", "RTFfldpriv", "RTFfttruetype", + "RTFlquote", "RTFrquote", "RTFldblquote", "RTFrdblquote", "RTFred", + "RTFgreen", "RTFblue", "RTFcolorbg", "RTFcolorfg", "RTFunderlinecolor", + "RTFcolortable", "RTFfont", "RTFfontSize", "RTFNeXTGraphic", + "RTFNeXTGraphicWidth", "RTFNeXTGraphicHeight", "RTFNeXTHelpLink", + "RTFNeXTHelpMarker", "RTFNeXTfilename", "RTFNeXTmarkername", + "RTFNeXTlinkFilename", "RTFNeXTlinkMarkername", "RTFpaperWidth", + "RTFpaperHeight", "RTFmarginLeft", "RTFmarginRight", "RTFmarginTop", + "RTFmarginButtom", "RTFfirstLineIndent", "RTFleftIndent", "RTFrightIndent", "RTFalignCenter", "RTFalignJustified", "RTFalignLeft", "RTFalignRight", "RTFlineSpace", "RTFspaceAbove", "RTFstyle", "RTFbold", "RTFitalic", "RTFunderline", "RTFunderlineDot", "RTFunderlineDash", @@ -652,10 +698,13 @@ static const char *const yytname[] = "RTFfamilyModern", "RTFfamilyScript", "RTFfamilyDecor", "RTFfamilyTech", "'{'", "'}'", "$accept", "rtfFile", "$@1", "$@2", "rtfCharset", "rtfIngredients", "rtfBlock", "$@3", "$@4", "$@5", "$@6", "$@7", "$@8", - "$@9", "$@10", "rtfStatement", "rtfNeXTstuff", "rtfNeXTGraphic", "$@11", - "$@12", "rtfNeXTHelpLink", "$@13", "$@14", "rtfNeXTHelpMarker", "$@15", - "$@16", "rtfFontList", "rtfFonts", "rtfFontStatement", "rtfFontAttrs", - "rtfFontFamily", "rtfColorDef", "rtfColors", "rtfColorStatement", 0 + "$@9", "$@10", "$@11", "rtfField", "rtfFieldMod", "rtfIgnore", + "rtfFieldinst", "$@12", "$@13", "rtfFieldalt", "rtfFieldrslt", + "rtfStatementList", "rtfStatement", "rtfNeXTstuff", "rtfNeXTGraphic", + "$@14", "$@15", "rtfNeXTHelpLink", "$@16", "$@17", "rtfNeXTHelpMarker", + "$@18", "$@19", "rtfFontList", "rtfFonts", "rtfFontStatement", + "rtfFontAttrs", "rtfFontFamily", "rtfColorDef", "rtfColors", + "rtfColorStatement", YY_NULL }; #endif @@ -673,25 +722,29 @@ static const yytype_uint16 yytoknum[] = 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, 123, 125 + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 123, 125 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 100, 102, 103, 101, 104, 104, 104, 104, 104, - 105, 105, 105, 105, 105, 105, 105, 107, 106, 108, - 106, 109, 106, 110, 106, 111, 106, 112, 106, 113, - 106, 114, 106, 106, 115, 115, 115, 115, 115, 115, - 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, - 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, - 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, - 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, - 115, 116, 116, 116, 116, 118, 119, 117, 121, 122, - 120, 124, 125, 123, 126, 127, 127, 127, 127, 128, - 129, 129, 129, 129, 129, 130, 130, 130, 130, 130, - 130, 130, 131, 132, 132, 133, 133 + 0, 109, 111, 112, 110, 113, 113, 113, 113, 113, + 114, 114, 114, 114, 114, 114, 114, 116, 115, 117, + 115, 118, 115, 119, 115, 120, 115, 121, 115, 122, + 115, 123, 115, 124, 115, 115, 125, 125, 126, 126, + 126, 126, 126, 127, 127, 128, 129, 130, 128, 128, + 131, 131, 132, 132, 132, 133, 133, 133, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 135, 135, 135, 135, 137, + 138, 136, 140, 141, 139, 143, 144, 142, 145, 146, + 146, 146, 146, 147, 148, 148, 148, 148, 148, 148, + 149, 149, 149, 149, 149, 149, 149, 150, 151, 151, + 152, 152 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -700,145 +753,145 @@ static const yytype_uint8 yyr2[] = 0, 2, 0, 0, 7, 1, 1, 1, 1, 1, 0, 2, 2, 2, 2, 2, 2, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, - 5, 0, 5, 3, 1, 1, 1, 1, 1, 1, + 5, 0, 5, 0, 5, 3, 3, 1, 0, 2, + 2, 2, 2, 0, 1, 6, 0, 0, 11, 3, + 0, 1, 5, 8, 3, 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 0, 1, 1, 1, 0, 0, 9, 0, 0, - 12, 0, 0, 8, 4, 0, 2, 4, 6, 4, - 0, 2, 2, 2, 2, 1, 1, 1, 1, 1, - 1, 1, 4, 0, 2, 4, 1 + 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, + 0, 9, 0, 0, 12, 0, 0, 8, 4, 0, + 2, 4, 6, 4, 0, 2, 2, 2, 2, 2, + 1, 1, 1, 1, 1, 1, 1, 4, 0, 2, + 4, 1 }; -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 0, 2, 0, 0, 1, 0, 5, 6, 7, 8, - 9, 10, 0, 16, 14, 77, 78, 52, 79, 54, - 55, 56, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 46, 47, 48, 49, 51, 50, 53, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 57, 58, - 45, 80, 0, 0, 15, 13, 11, 12, 0, 113, - 95, 10, 0, 0, 0, 0, 0, 0, 0, 4, - 33, 0, 0, 0, 10, 10, 10, 10, 10, 10, - 10, 116, 0, 112, 114, 0, 0, 94, 96, 0, - 0, 82, 83, 84, 0, 0, 0, 0, 0, 0, - 0, 0, 105, 106, 107, 108, 109, 110, 111, 100, - 0, 0, 0, 0, 18, 20, 22, 24, 26, 28, - 30, 32, 0, 0, 0, 97, 0, 0, 0, 0, - 115, 99, 101, 102, 103, 104, 0, 0, 0, 0, - 98, 0, 0, 91, 85, 0, 10, 10, 0, 0, - 0, 0, 93, 87, 88, 10, 0, 90 + 9, 10, 0, 16, 14, 101, 102, 76, 103, 78, + 79, 80, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 70, 71, 72, 73, 75, 74, 77, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 81, 82, + 69, 104, 0, 0, 15, 13, 11, 12, 0, 138, + 119, 10, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 35, 0, 0, 0, 10, 10, 10, 10, 10, + 10, 10, 0, 141, 0, 137, 139, 0, 0, 118, + 120, 0, 0, 106, 107, 108, 0, 0, 0, 0, + 0, 0, 0, 37, 0, 0, 0, 130, 131, 132, + 133, 134, 135, 136, 124, 0, 0, 0, 0, 18, + 20, 22, 24, 26, 28, 30, 32, 34, 39, 40, + 41, 42, 0, 0, 0, 0, 0, 121, 0, 0, + 0, 0, 0, 44, 0, 0, 36, 140, 123, 128, + 125, 126, 127, 129, 0, 0, 0, 0, 49, 0, + 0, 0, 122, 0, 0, 115, 50, 46, 54, 0, + 109, 0, 10, 51, 0, 55, 0, 55, 10, 0, + 0, 45, 0, 52, 0, 0, 0, 117, 50, 57, + 56, 0, 111, 112, 0, 0, 10, 47, 53, 0, + 0, 114, 48 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 2, 3, 63, 11, 12, 64, 71, 72, 73, - 74, 75, 76, 77, 78, 65, 100, 101, 157, 163, - 102, 165, 167, 103, 156, 162, 66, 82, 98, 133, - 119, 67, 81, 94 + 74, 75, 76, 77, 78, 79, 114, 115, 154, 143, + 185, 210, 184, 156, 192, 65, 102, 103, 188, 202, + 104, 206, 211, 105, 182, 197, 66, 83, 100, 145, + 124, 67, 82, 96 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -114 +#define YYPACT_NINF -158 static const yytype_int16 yypact[] = { - -97, -114, 23, 20, -114, -2, -114, -114, -114, -114, - -114, -114, 266, -114, -114, -114, -114, -114, -114, -114, - -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, - -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, - -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, - -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, - -114, -114, 90, -73, -114, -114, -114, -114, -71, -114, - -114, -114, 21, 19, 29, 32, 18, 27, 17, -114, - -114, 16, -13, 351, -114, -114, -114, -114, -114, -114, - -114, -114, 13, -114, -114, 113, 8, -114, -114, -1, - -9, -114, -114, -114, 436, 521, 606, 691, 776, 861, - 946, 59, -114, -114, -114, -114, -114, -114, -114, -114, - -77, 91, 49, 50, -114, -114, -114, -114, -114, -114, - -114, -114, 110, 24, 181, -114, 111, 75, 115, 116, - -114, -114, -114, -114, -114, -114, 22, 78, 76, 38, - -114, 39, 173, -114, -114, 129, -114, -114, 175, 1031, - 1116, 82, -114, -114, -114, -114, 1201, -114 + -100, -158, 24, 25, -158, 4, -158, -158, -158, -158, + -158, -158, 372, -158, -158, -158, -158, -158, -158, -158, + -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, + -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, + -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, + -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, + -158, -158, 178, -72, -158, -158, -158, -158, -65, -158, + -158, -158, 35, 36, 34, 45, 46, 33, 43, 37, + -158, -158, 1, -42, 466, -158, -158, -158, -158, -158, + -158, -158, 0, -158, 7, -158, -158, -50, 13, -158, + -158, 78, -47, -158, -158, -158, 560, 654, 748, 842, + 936, 1030, 1124, -158, -46, -6, 26, -158, -158, -158, + -158, -158, -158, -158, -158, -68, 60, 14, 16, -158, + -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, + -158, -158, 21, -40, 70, 3, 278, -158, 71, 27, + 72, 73, -30, -158, 52, 12, -158, -158, -158, -158, + -158, -158, -158, -158, -26, 32, 28, -23, -158, -1, + -22, 74, -158, -5, 105, -158, 84, -158, -158, 5, + -158, 57, -158, -158, 8, -158, 10, -158, -158, 112, + 1218, -158, 1499, -158, 1591, 1312, 11, -158, 84, -158, + -158, 20, -158, -158, 65, 66, -158, -158, -158, 1406, + 67, -158, -158 }; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = +static const yytype_int16 yypgoto[] = { - -114, -114, -114, -114, -114, 46, -113, -114, -114, -114, - -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, - -114, -114, -114, -114, -114, -114, -114, -114, 87, -114, - -114, -114, -114, -114 + -158, -158, -158, -158, -158, -71, -122, -158, -158, -158, + -158, -158, -158, -158, -158, -158, -158, -158, -35, -158, + -158, -158, -69, -158, -55, -157, -158, -158, -158, -158, + -158, -158, -158, -158, -158, -158, -158, -158, 80, -158, + -158, -158, -158, -158 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -93 + number is the opposite. If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -117 static const yytype_int16 yytable[] = { - 68, 1, -17, 6, 7, 8, 9, 136, -19, -21, - -23, -25, -27, -29, -31, -17, -17, -17, -17, 91, - 145, 134, 135, 4, 5, 95, 79, 141, 80, 85, - 84, 88, 90, -17, -17, -17, 69, -17, -17, 121, - 86, 89, 122, 123, 87, 111, 95, 92, -17, -17, + 84, 113, 176, 148, 93, 97, 158, 1, 186, 6, + 7, 8, 9, 170, 106, 107, 108, 109, 110, 111, + 112, 153, 152, 163, 4, 138, 139, 140, 141, 5, + 153, -38, -38, -38, -38, 200, 80, 200, 159, 146, + 147, 94, -43, 81, 85, 87, 86, 90, 116, -43, + 117, 118, 119, 120, 121, 122, 123, 88, 91, 89, + 97, 129, 137, 149, 92, 98, 99, 155, 144, 150, + 199, 151, 199, 157, 164, 166, 167, 165, 168, 68, + 169, -17, 172, 173, 174, 175, 178, -19, -21, -23, + -25, -27, -29, -31, -17, -17, -17, -17, 160, 161, + 162, 142, 10, 180, 179, -33, 177, -38, 181, 95, + 146, 190, 187, 183, 189, 196, 191, 195, 193, 203, + 171, -17, -17, -17, 69, -17, -17, 126, 205, 204, + 127, 128, 194, 0, 0, 209, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, 96, 97, 10, -17, 70, - 124, 68, 132, -17, 137, 138, 139, -17, -17, -19, - -21, -23, -25, -27, -29, -31, -17, -17, -17, -17, - 142, 143, 144, 140, 146, 93, 147, 83, 148, 149, - 151, 150, 134, 152, -17, -17, -17, 69, -17, -17, - 104, 105, 106, 107, 108, 109, 110, 153, 154, -17, - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, -17, 155, 158, 161, -17, - 70, 164, 68, 120, -17, 0, 0, 0, -17, -17, - -19, -21, -23, -25, -27, -29, -31, -17, -17, -17, - -17, 0, 159, 160, 112, 113, 114, 115, 116, 117, - 118, 166, 0, 0, 0, -17, -17, -17, 0, -17, - -17, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, -17, -17, 13, 0, 14, - -17, 0, 0, 0, 0, 0, 0, 0, 0, -17, - -17, 0, 15, 16, 17, 18, 0, 0, 0, 0, + -17, -17, -17, 207, 208, 212, -17, 70, 125, 68, + 0, -17, 0, 0, 0, -17, -17, -19, -21, -23, + -25, -27, -29, -31, -17, -17, -17, -17, 0, 0, + 0, 0, 0, 0, 0, -33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 19, 20, 21, 0, 22, 23, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 13, 0, 14, 61, 0, 0, 0, 0, - 0, 0, 0, 0, 62, -3, 0, 15, 16, 17, - 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 19, 20, 21, 0, 22, - 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 13, 0, 14, - 61, 0, 0, 0, 0, 0, 0, 0, 0, 99, - -81, 0, 15, 16, 17, 18, 0, 0, 0, 0, + 0, -17, -17, -17, 69, -17, -17, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -17, -17, -17, -17, + -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, + -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, + -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, + -17, -17, -17, 0, 0, 0, -17, 70, 0, 68, + 0, -17, 0, 0, 0, -17, -17, -19, -21, -23, + -25, -27, -29, -31, -17, -17, -17, -17, 0, 0, + 0, 0, 0, 0, 0, -33, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -17, -17, -17, 0, -17, -17, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -17, -17, -17, -17, + -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, + -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, + -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, + -17, -17, -17, 13, 0, 14, -17, 0, 0, 0, + 0, 0, 0, 0, 0, -17, -17, 0, 15, 16, + 17, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 19, 20, 21, 0, 22, 23, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 13, 0, 14, 61, 0, 0, 0, 0, - 0, 0, 0, 0, 62, 125, 0, 15, 16, 17, - 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 20, 21, 0, 22, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, @@ -846,16 +899,46 @@ static const yytype_int16 yytable[] = 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 13, 0, 14, 61, 0, 0, 0, 0, 0, 0, 0, 0, 62, - 126, 0, 15, 16, 17, 18, 0, 0, 0, 0, + -3, 0, 15, 16, 17, 18, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 20, 21, 0, 22, 23, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 13, 0, 14, 61, 0, 0, 0, 0, 0, + 0, 0, 0, 101, -105, 0, 15, 16, 17, 18, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 19, 20, 21, 0, 22, 23, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 13, 0, 14, 61, 0, + 0, 0, 0, 0, 0, 0, 0, 62, 130, 0, + 15, 16, 17, 18, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 19, 20, 21, + 0, 22, 23, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 13, + 0, 14, 61, 0, 0, 0, 0, 0, 0, 0, + 0, 62, 131, 0, 15, 16, 17, 18, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 19, 20, 21, 0, 22, 23, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 13, 0, 14, 61, 0, 0, 0, + 0, 0, 0, 0, 0, 62, 132, 0, 15, 16, + 17, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 19, 20, 21, 0, 22, 23, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 13, 0, 14, 61, 0, 0, 0, 0, - 0, 0, 0, 0, 62, 127, 0, 15, 16, 17, - 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 20, 21, 0, 22, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, @@ -863,16 +946,46 @@ static const yytype_int16 yytable[] = 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 13, 0, 14, 61, 0, 0, 0, 0, 0, 0, 0, 0, 62, - 128, 0, 15, 16, 17, 18, 0, 0, 0, 0, + 133, 0, 15, 16, 17, 18, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 20, 21, 0, 22, 23, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 13, 0, 14, 61, 0, 0, 0, 0, 0, + 0, 0, 0, 62, 134, 0, 15, 16, 17, 18, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 19, 20, 21, 0, 22, 23, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 13, 0, 14, 61, 0, + 0, 0, 0, 0, 0, 0, 0, 62, 135, 0, + 15, 16, 17, 18, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 19, 20, 21, + 0, 22, 23, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 13, + 0, 14, 61, 0, 0, 0, 0, 0, 0, 0, + 0, 62, 136, 0, 15, 16, 17, 18, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 19, 20, 21, 0, 22, 23, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 13, 0, 14, 61, 0, 0, 0, + 0, 0, 0, 0, 0, 62, -116, 0, 15, 16, + 17, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 19, 20, 21, 0, 22, 23, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 13, 0, 14, 61, 0, 0, 0, 0, - 0, 0, 0, 0, 62, 129, 0, 15, 16, 17, - 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 20, 21, 0, 22, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, @@ -880,199 +993,242 @@ static const yytype_int16 yytable[] = 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 13, 0, 14, 61, 0, 0, 0, 0, 0, 0, 0, 0, 62, - 130, 0, 15, 16, 17, 18, 0, 0, 0, 0, + -110, 0, 15, 16, 17, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 19, 20, 21, 0, 22, 23, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 13, 0, 14, 61, 0, 0, 0, 0, - 0, 0, 0, 0, 62, 131, 0, 15, 16, 17, - 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 19, 20, 21, 0, 22, - 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 13, 0, 14, - 61, 0, 0, 0, 0, 0, 0, 0, 0, 62, - -92, 0, 15, 16, 17, 18, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 20, 21, 0, 22, 23, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 0, 198, 0, 61, 0, 0, 0, 0, 0, + 0, 0, 0, 62, -113, 15, 16, 17, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 19, 20, 21, 0, 22, 23, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 13, 0, 14, 61, 0, 0, 0, 0, - 0, 0, 0, 0, 62, -86, 0, 15, 16, 17, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 19, 20, 21, 0, 22, 23, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 201, 0, 0, 61, 0, 0, + 0, 0, 0, 0, 0, 0, 146, 15, 16, 17, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 19, 20, 21, 0, 22, - 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 0, 0, 0, - 61, 0, 0, 0, 0, 0, 0, 0, 0, 62, - -89 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 19, 20, 21, 0, 22, 23, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 0, 0, 0, 61, + 0, 0, 0, 0, 0, 0, 0, 0, 146 }; +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-158))) + +#define yytable_value_is_error(Yytable_value) \ + YYID (0) + static const yytype_int16 yycheck[] = { - 1, 98, 3, 5, 6, 7, 8, 120, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 3, - 133, 98, 99, 0, 4, 38, 99, 3, 99, 10, - 9, 13, 15, 34, 35, 36, 37, 38, 39, 40, - 11, 14, 43, 44, 12, 32, 38, 31, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 98, 99, 89, 89, 90, - 99, 1, 33, 3, 3, 46, 46, 98, 99, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 86, 87, 88, 3, 3, 99, 41, 71, 3, 3, - 42, 99, 98, 47, 34, 35, 36, 37, 38, 39, - 84, 85, 86, 87, 88, 89, 90, 99, 99, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 71, 1, 3, 125, 3, 47, 3, 107, 3, 5, + 6, 7, 8, 1, 85, 86, 87, 88, 89, 90, + 91, 9, 1, 145, 0, 31, 32, 33, 34, 4, + 9, 31, 32, 33, 34, 192, 108, 194, 35, 107, + 108, 40, 30, 108, 9, 11, 10, 14, 41, 28, + 100, 101, 102, 103, 104, 105, 106, 12, 15, 13, + 47, 108, 108, 3, 27, 107, 108, 107, 42, 55, + 192, 55, 194, 3, 3, 3, 3, 50, 108, 1, + 28, 3, 108, 51, 56, 108, 108, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 95, 96, + 97, 107, 98, 108, 30, 27, 107, 107, 3, 108, + 107, 182, 107, 29, 57, 3, 108, 188, 108, 108, + 155, 43, 44, 45, 46, 47, 48, 49, 108, 198, + 52, 53, 187, -1, -1, 206, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 108, 108, 108, 98, 99, 98, 1, + -1, 3, -1, -1, -1, 107, 108, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, -1, -1, + -1, -1, -1, -1, -1, 27, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 43, 44, 45, 46, 47, 48, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, -1, -1, -1, 98, 99, -1, 1, + -1, 3, -1, -1, -1, 107, 108, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, -1, -1, + -1, -1, -1, -1, -1, 27, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 43, 44, 45, -1, 47, 48, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 1, -1, 3, 98, -1, -1, -1, + -1, -1, -1, -1, -1, 107, 108, -1, 16, 17, + 18, 19, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 43, 44, 45, -1, 47, + 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 1, -1, 3, + 98, -1, -1, -1, -1, -1, -1, -1, -1, 107, + 108, -1, 16, 17, 18, 19, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 43, + 44, 45, -1, 47, 48, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 1, -1, 3, 98, -1, -1, -1, -1, -1, + -1, -1, -1, 107, 108, -1, 16, 17, 18, 19, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 43, 44, 45, -1, 47, 48, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 3, 48, 3, 89, - 90, 99, 1, 96, 3, -1, -1, -1, 98, 99, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, -1, 156, 157, 91, 92, 93, 94, 95, 96, - 97, 165, -1, -1, -1, 34, 35, 36, -1, 38, - 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 1, -1, 3, - 89, -1, -1, -1, -1, -1, -1, -1, -1, 98, - 99, -1, 16, 17, 18, 19, -1, -1, -1, -1, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 1, -1, 3, 98, -1, + -1, -1, -1, -1, -1, -1, -1, 107, 108, -1, + 16, 17, 18, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 34, 35, 36, -1, 38, 39, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + -1, -1, -1, -1, -1, -1, -1, 43, 44, 45, + -1, 47, 48, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 1, + -1, 3, 98, -1, -1, -1, -1, -1, -1, -1, + -1, 107, 108, -1, 16, 17, 18, 19, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 43, 44, 45, -1, 47, 48, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 1, -1, 3, 98, -1, -1, -1, + -1, -1, -1, -1, -1, 107, 108, -1, 16, 17, + 18, 19, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 43, 44, 45, -1, 47, + 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 1, -1, 3, + 98, -1, -1, -1, -1, -1, -1, -1, -1, 107, + 108, -1, 16, 17, 18, 19, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 43, + 44, 45, -1, 47, 48, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 1, -1, 3, 89, -1, -1, -1, -1, - -1, -1, -1, -1, 98, 99, -1, 16, 17, 18, - 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 34, 35, 36, -1, 38, - 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 1, -1, 3, - 89, -1, -1, -1, -1, -1, -1, -1, -1, 98, - 99, -1, 16, 17, 18, 19, -1, -1, -1, -1, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 1, -1, 3, 98, -1, -1, -1, -1, -1, + -1, -1, -1, 107, 108, -1, 16, 17, 18, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 34, 35, 36, -1, 38, 39, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 43, 44, 45, -1, 47, 48, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 1, -1, 3, 98, -1, + -1, -1, -1, -1, -1, -1, -1, 107, 108, -1, + 16, 17, 18, 19, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 43, 44, 45, + -1, 47, 48, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 1, + -1, 3, 98, -1, -1, -1, -1, -1, -1, -1, + -1, 107, 108, -1, 16, 17, 18, 19, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 43, 44, 45, -1, 47, 48, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 1, -1, 3, 98, -1, -1, -1, + -1, -1, -1, -1, -1, 107, 108, -1, 16, 17, + 18, 19, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 43, 44, 45, -1, 47, + 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 1, -1, 3, + 98, -1, -1, -1, -1, -1, -1, -1, -1, 107, + 108, -1, 16, 17, 18, 19, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 43, + 44, 45, -1, 47, 48, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 1, -1, 3, 89, -1, -1, -1, -1, - -1, -1, -1, -1, 98, 99, -1, 16, 17, 18, - 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 34, 35, 36, -1, 38, - 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 1, -1, 3, - 89, -1, -1, -1, -1, -1, -1, -1, -1, 98, - 99, -1, 16, 17, 18, 19, -1, -1, -1, -1, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, -1, 3, -1, 98, -1, -1, -1, -1, -1, + -1, -1, -1, 107, 108, 16, 17, 18, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 34, 35, 36, -1, 38, 39, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 1, -1, 3, 89, -1, -1, -1, -1, - -1, -1, -1, -1, 98, 99, -1, 16, 17, 18, - 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 34, 35, 36, -1, 38, - 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 1, -1, 3, - 89, -1, -1, -1, -1, -1, -1, -1, -1, 98, - 99, -1, 16, 17, 18, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 34, 35, 36, -1, 38, 39, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 1, -1, 3, 89, -1, -1, -1, -1, - -1, -1, -1, -1, 98, 99, -1, 16, 17, 18, + -1, -1, 43, 44, 45, -1, 47, 48, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 3, -1, -1, 98, -1, -1, + -1, -1, -1, -1, -1, -1, 107, 16, 17, 18, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 34, 35, 36, -1, 38, - 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 1, -1, 3, - 89, -1, -1, -1, -1, -1, -1, -1, -1, 98, - 99, -1, 16, 17, 18, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 34, 35, 36, -1, 38, 39, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 1, -1, 3, 89, -1, -1, -1, -1, - -1, -1, -1, -1, 98, 99, -1, 16, 17, 18, - 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 34, 35, 36, -1, 38, - 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + -1, -1, -1, -1, 43, 44, 45, -1, 47, 48, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 1, -1, 3, - 89, -1, -1, -1, -1, -1, -1, -1, -1, 98, - 99, -1, 16, 17, 18, 19, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 34, 35, 36, -1, 38, 39, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 1, -1, 3, 89, -1, -1, -1, -1, - -1, -1, -1, -1, 98, 99, -1, 16, 17, 18, - 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 34, 35, 36, -1, 38, - 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, -1, -1, -1, - 89, -1, -1, -1, -1, -1, -1, -1, -1, 98, - 99 + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, -1, -1, -1, 98, + -1, -1, -1, -1, -1, -1, -1, -1, 107 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 98, 101, 102, 0, 4, 5, 6, 7, 8, - 89, 104, 105, 1, 3, 16, 17, 18, 19, 34, - 35, 36, 38, 39, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 89, 98, 103, 106, 115, 126, 131, 1, 37, - 90, 107, 108, 109, 110, 111, 112, 113, 114, 99, - 99, 132, 127, 105, 9, 10, 11, 12, 13, 14, - 15, 3, 31, 99, 133, 38, 98, 99, 128, 98, - 116, 117, 120, 123, 105, 105, 105, 105, 105, 105, - 105, 32, 91, 92, 93, 94, 95, 96, 97, 130, - 128, 40, 43, 44, 99, 99, 99, 99, 99, 99, - 99, 99, 33, 129, 98, 99, 106, 3, 46, 46, - 3, 3, 86, 87, 88, 106, 3, 41, 3, 3, - 99, 42, 47, 99, 99, 3, 124, 118, 48, 105, - 105, 3, 125, 119, 99, 121, 105, 122 + 0, 107, 110, 111, 0, 4, 5, 6, 7, 8, + 98, 113, 114, 1, 3, 16, 17, 18, 19, 43, + 44, 45, 47, 48, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 98, 107, 112, 115, 134, 145, 150, 1, 46, + 99, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 108, 108, 151, 146, 114, 9, 10, 11, 12, 13, + 14, 15, 27, 3, 40, 108, 152, 47, 107, 108, + 147, 107, 135, 136, 139, 142, 114, 114, 114, 114, + 114, 114, 114, 1, 125, 126, 41, 100, 101, 102, + 103, 104, 105, 106, 149, 147, 49, 52, 53, 108, + 108, 108, 108, 108, 108, 108, 108, 108, 31, 32, + 33, 34, 107, 128, 42, 148, 107, 108, 115, 3, + 55, 55, 1, 9, 127, 107, 132, 3, 3, 35, + 95, 96, 97, 115, 3, 50, 3, 3, 108, 28, + 1, 127, 108, 51, 56, 108, 3, 107, 108, 30, + 108, 3, 143, 29, 131, 129, 3, 107, 137, 57, + 114, 108, 133, 108, 133, 114, 3, 144, 3, 115, + 134, 3, 138, 108, 131, 108, 140, 108, 108, 114, + 130, 141, 108 }; #define yyerrok (yyerrstatus = 0) @@ -1087,78 +1243,50 @@ static const yytype_uint8 yystos[] = /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ #define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ yyerror (ctxt, lctxt, YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) - +/* Error token number */ #define YYTERROR 1 #define YYERRCODE 256 -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - +/* This macro is provided for backward compatibility. */ #ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif /* YYLEX -- calling `yylex' with the right arguments. */ - #ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, YYLEX_PARAM) #else @@ -1210,6 +1338,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, ctxt, lctxt) void *lctxt; #endif { + FILE *yyo = yyoutput; + YYUSE (yyo); if (!yyvaluep) return; YYUSE (ctxt); @@ -1223,7 +1353,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, ctxt, lctxt) switch (yytype) { default: - break; + break; } } @@ -1353,7 +1483,6 @@ int yydebug; # define YYMAXDEPTH 10000 #endif - #if YYERROR_VERBOSE @@ -1456,115 +1585,145 @@ yytnamerr (char *yyres, const char *yystr) } # endif -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) { - int yyn = yypact[yystate]; + YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULL; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + + for details. YYERROR is fine as it does not invoke this + function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; - - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; } #endif /* YYERROR_VERBOSE */ - /*-----------------------------------------------. | Release the memory associated to this symbol. | @@ -1597,32 +1756,16 @@ yydestruct (yymsg, yytype, yyvaluep, ctxt, lctxt) { default: - break; + break; } } -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void *ctxt, void *lctxt); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ +/*----------. +| yyparse. | +`----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1650,8 +1793,31 @@ yyparse (ctxt, lctxt) /* The lookahead symbol. */ int yychar; + +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +static YYSTYPE yyval_default; +# define YY_INITIAL_VALUE(Value) = Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + /* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; +YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); /* Number of syntax errors so far. */ int yynerrs; @@ -1664,7 +1830,7 @@ YYSTYPE yylval; `yyss': related to states. `yyvs': related to semantic values. - Refer to the stacks thru separate pointers, to allow yyoverflow + Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ @@ -1682,7 +1848,7 @@ YYSTYPE yylval; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ - int yytoken; + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; @@ -1700,9 +1866,8 @@ YYSTYPE yylval; Keep to zero when no symbol should be popped. */ int yylen = 0; - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); @@ -1711,14 +1876,6 @@ YYSTYPE yylval; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - goto yysetstate; /*------------------------------------------------------------. @@ -1810,7 +1967,7 @@ yybackup: /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ @@ -1841,8 +1998,8 @@ yybackup: yyn = yytable[yyn]; if (yyn <= 0) { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; + if (yytable_value_is_error (yyn)) + goto yyerrlab; yyn = -yyn; goto yyreduce; } @@ -1859,7 +2016,9 @@ yybackup: yychar = YYEMPTY; yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; @@ -1896,859 +2055,844 @@ yyreduce: switch (yyn) { case 2: - -/* Line 1455 of yacc.c */ -#line 195 "rtfGrammar.y" - { GSRTFstart(CTXT); ;} +/* Line 1792 of yacc.c */ +#line 205 "rtfGrammar.y" + { GSRTFstart(CTXT); } break; case 3: - -/* Line 1455 of yacc.c */ -#line 195 "rtfGrammar.y" - { GSRTFstop(CTXT); ;} +/* Line 1792 of yacc.c */ +#line 205 "rtfGrammar.y" + { GSRTFstop(CTXT); } break; case 5: - -/* Line 1455 of yacc.c */ -#line 198 "rtfGrammar.y" - { (yyval.number) = 1; ;} +/* Line 1792 of yacc.c */ +#line 208 "rtfGrammar.y" + { (yyval.number) = 1; } break; case 6: - -/* Line 1455 of yacc.c */ -#line 199 "rtfGrammar.y" - { (yyval.number) = 2; ;} +/* Line 1792 of yacc.c */ +#line 209 "rtfGrammar.y" + { (yyval.number) = 2; } break; case 7: - -/* Line 1455 of yacc.c */ -#line 200 "rtfGrammar.y" - { (yyval.number) = 3; ;} +/* Line 1792 of yacc.c */ +#line 210 "rtfGrammar.y" + { (yyval.number) = 3; } break; case 8: - -/* Line 1455 of yacc.c */ -#line 201 "rtfGrammar.y" - { (yyval.number) = 4; ;} +/* Line 1792 of yacc.c */ +#line 211 "rtfGrammar.y" + { (yyval.number) = 4; } break; case 9: - -/* Line 1455 of yacc.c */ -#line 203 "rtfGrammar.y" - { (yyval.number) = 1; free((void*)(yyvsp[(1) - (1)].cmd).name); ;} +/* Line 1792 of yacc.c */ +#line 213 "rtfGrammar.y" + { (yyval.number) = 1; free((void*)(yyvsp[(1) - (1)].cmd).name); } break; case 14: - -/* Line 1455 of yacc.c */ -#line 210 "rtfGrammar.y" - { GSRTFmangleText(CTXT, (yyvsp[(2) - (2)].text)); free((void *)(yyvsp[(2) - (2)].text)); ;} +/* Line 1792 of yacc.c */ +#line 220 "rtfGrammar.y" + { GSRTFmangleText(CTXT, (yyvsp[(2) - (2)].text)); free((void *)(yyvsp[(2) - (2)].text)); } break; case 17: - -/* Line 1455 of yacc.c */ -#line 215 "rtfGrammar.y" - { GSRTFopenBlock(CTXT, NO); ;} +/* Line 1792 of yacc.c */ +#line 225 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, NO); } break; case 18: - -/* Line 1455 of yacc.c */ -#line 215 "rtfGrammar.y" - { GSRTFcloseBlock(CTXT, NO); ;} +/* Line 1792 of yacc.c */ +#line 225 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, NO); } break; case 19: - -/* Line 1455 of yacc.c */ -#line 216 "rtfGrammar.y" - { GSRTFopenBlock(CTXT, YES); ;} +/* Line 1792 of yacc.c */ +#line 226 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, YES); } break; case 20: - -/* Line 1455 of yacc.c */ -#line 216 "rtfGrammar.y" - { GSRTFcloseBlock(CTXT, YES); ;} +/* Line 1792 of yacc.c */ +#line 226 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, YES); } break; case 21: - -/* Line 1455 of yacc.c */ -#line 217 "rtfGrammar.y" - { GSRTFopenBlock(CTXT, YES); ;} +/* Line 1792 of yacc.c */ +#line 227 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, YES); } break; case 22: - -/* Line 1455 of yacc.c */ -#line 217 "rtfGrammar.y" - { GSRTFcloseBlock(CTXT, YES); ;} +/* Line 1792 of yacc.c */ +#line 227 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, YES); } break; case 23: - -/* Line 1455 of yacc.c */ -#line 218 "rtfGrammar.y" - { GSRTFopenBlock(CTXT, YES); ;} +/* Line 1792 of yacc.c */ +#line 228 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, YES); } break; case 24: - -/* Line 1455 of yacc.c */ -#line 218 "rtfGrammar.y" - { GSRTFcloseBlock(CTXT, YES); ;} +/* Line 1792 of yacc.c */ +#line 228 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, YES); } break; case 25: - -/* Line 1455 of yacc.c */ -#line 219 "rtfGrammar.y" - { GSRTFopenBlock(CTXT, YES); ;} +/* Line 1792 of yacc.c */ +#line 229 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, YES); } break; case 26: - -/* Line 1455 of yacc.c */ -#line 219 "rtfGrammar.y" - { GSRTFcloseBlock(CTXT, YES); ;} +/* Line 1792 of yacc.c */ +#line 229 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, YES); } break; case 27: - -/* Line 1455 of yacc.c */ -#line 220 "rtfGrammar.y" - { GSRTFopenBlock(CTXT, YES); ;} +/* Line 1792 of yacc.c */ +#line 230 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, YES); } break; case 28: - -/* Line 1455 of yacc.c */ -#line 220 "rtfGrammar.y" - { GSRTFcloseBlock(CTXT, YES); ;} +/* Line 1792 of yacc.c */ +#line 230 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, YES); } break; case 29: - -/* Line 1455 of yacc.c */ -#line 221 "rtfGrammar.y" - { GSRTFopenBlock(CTXT, YES); ;} +/* Line 1792 of yacc.c */ +#line 231 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, YES); } break; case 30: - -/* Line 1455 of yacc.c */ -#line 221 "rtfGrammar.y" - { GSRTFcloseBlock(CTXT, YES); ;} +/* Line 1792 of yacc.c */ +#line 231 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, YES); } break; case 31: - -/* Line 1455 of yacc.c */ -#line 222 "rtfGrammar.y" - { GSRTFopenBlock(CTXT, YES); ;} +/* Line 1792 of yacc.c */ +#line 232 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, YES); } break; case 32: +/* Line 1792 of yacc.c */ +#line 232 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, YES); } + break; -/* Line 1455 of yacc.c */ -#line 222 "rtfGrammar.y" - { GSRTFcloseBlock(CTXT, YES); ;} + case 33: +/* Line 1792 of yacc.c */ +#line 233 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, NO); } break; case 34: +/* Line 1792 of yacc.c */ +#line 233 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, NO); } + break; -/* Line 1455 of yacc.c */ -#line 231 "rtfGrammar.y" + case 36: +/* Line 1792 of yacc.c */ +#line 238 "rtfGrammar.y" + { GSRTFaddField(CTXT, (yyvsp[(2) - (3)].text), (yyvsp[(3) - (3)].text)); free((void *)(yyvsp[(2) - (3)].text)); free((void *)(yyvsp[(3) - (3)].text)); } + break; + + case 45: +/* Line 1792 of yacc.c */ +#line 253 "rtfGrammar.y" + { (yyval.text) = (yyvsp[(4) - (6)].text);} + break; + + case 46: +/* Line 1792 of yacc.c */ +#line 254 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, YES); } + break; + + case 47: +/* Line 1792 of yacc.c */ +#line 254 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, YES); } + break; + + case 48: +/* Line 1792 of yacc.c */ +#line 254 "rtfGrammar.y" + { (yyval.text) = (yyvsp[(7) - (11)].text);} + break; + + case 49: +/* Line 1792 of yacc.c */ +#line 255 "rtfGrammar.y" + { (yyval.text) = NULL;} + break; + + case 52: +/* Line 1792 of yacc.c */ +#line 262 "rtfGrammar.y" + { (yyval.text) = (yyvsp[(4) - (5)].text);} + break; + + case 53: +/* Line 1792 of yacc.c */ +#line 263 "rtfGrammar.y" + { (yyval.text) = (yyvsp[(6) - (8)].text);} + break; + + case 54: +/* Line 1792 of yacc.c */ +#line 264 "rtfGrammar.y" + { (yyval.text) = NULL;} + break; + + case 58: +/* Line 1792 of yacc.c */ +#line 276 "rtfGrammar.y" { int font; if ((yyvsp[(1) - (1)].cmd).isEmpty) font = 0; else font = (yyvsp[(1) - (1)].cmd).parameter; - GSRTFfontNumber(CTXT, font); ;} + GSRTFfontNumber(CTXT, font); } break; - case 35: - -/* Line 1455 of yacc.c */ -#line 238 "rtfGrammar.y" + case 59: +/* Line 1792 of yacc.c */ +#line 283 "rtfGrammar.y" { int size; if ((yyvsp[(1) - (1)].cmd).isEmpty) size = 24; else size = (yyvsp[(1) - (1)].cmd).parameter; - GSRTFfontSize(CTXT, size); ;} + GSRTFfontSize(CTXT, size); } break; - case 36: - -/* Line 1455 of yacc.c */ -#line 245 "rtfGrammar.y" + case 60: +/* Line 1792 of yacc.c */ +#line 290 "rtfGrammar.y" { int width; if ((yyvsp[(1) - (1)].cmd).isEmpty) width = 12240; else width = (yyvsp[(1) - (1)].cmd).parameter; - GSRTFpaperWidth(CTXT, width);;} + GSRTFpaperWidth(CTXT, width);} break; - case 37: - -/* Line 1455 of yacc.c */ -#line 252 "rtfGrammar.y" + case 61: +/* Line 1792 of yacc.c */ +#line 297 "rtfGrammar.y" { int height; if ((yyvsp[(1) - (1)].cmd).isEmpty) height = 15840; else height = (yyvsp[(1) - (1)].cmd).parameter; - GSRTFpaperHeight(CTXT, height);;} + GSRTFpaperHeight(CTXT, height);} break; - case 38: - -/* Line 1455 of yacc.c */ -#line 259 "rtfGrammar.y" + case 62: +/* Line 1792 of yacc.c */ +#line 304 "rtfGrammar.y" { int margin; if ((yyvsp[(1) - (1)].cmd).isEmpty) margin = 1800; else margin = (yyvsp[(1) - (1)].cmd).parameter; - GSRTFmarginLeft(CTXT, margin);;} + GSRTFmarginLeft(CTXT, margin);} break; - case 39: - -/* Line 1455 of yacc.c */ -#line 266 "rtfGrammar.y" + case 63: +/* Line 1792 of yacc.c */ +#line 311 "rtfGrammar.y" { int margin; if ((yyvsp[(1) - (1)].cmd).isEmpty) margin = 1800; else margin = (yyvsp[(1) - (1)].cmd).parameter; - GSRTFmarginRight(CTXT, margin); ;} + GSRTFmarginRight(CTXT, margin); } break; - case 40: - -/* Line 1455 of yacc.c */ -#line 273 "rtfGrammar.y" + case 64: +/* Line 1792 of yacc.c */ +#line 318 "rtfGrammar.y" { int margin; if ((yyvsp[(1) - (1)].cmd).isEmpty) margin = 1440; else margin = (yyvsp[(1) - (1)].cmd).parameter; - GSRTFmarginTop(CTXT, margin); ;} + GSRTFmarginTop(CTXT, margin); } break; - case 41: - -/* Line 1455 of yacc.c */ -#line 280 "rtfGrammar.y" + case 65: +/* Line 1792 of yacc.c */ +#line 325 "rtfGrammar.y" { int margin; if ((yyvsp[(1) - (1)].cmd).isEmpty) margin = 1440; else margin = (yyvsp[(1) - (1)].cmd).parameter; - GSRTFmarginButtom(CTXT, margin); ;} + GSRTFmarginButtom(CTXT, margin); } break; - case 42: - -/* Line 1455 of yacc.c */ -#line 287 "rtfGrammar.y" + case 66: +/* Line 1792 of yacc.c */ +#line 332 "rtfGrammar.y" { int indent; if ((yyvsp[(1) - (1)].cmd).isEmpty) indent = 0; else indent = (yyvsp[(1) - (1)].cmd).parameter; - GSRTFfirstLineIndent(CTXT, indent); ;} + GSRTFfirstLineIndent(CTXT, indent); } break; - case 43: - -/* Line 1455 of yacc.c */ -#line 294 "rtfGrammar.y" + case 67: +/* Line 1792 of yacc.c */ +#line 339 "rtfGrammar.y" { int indent; if ((yyvsp[(1) - (1)].cmd).isEmpty) indent = 0; else indent = (yyvsp[(1) - (1)].cmd).parameter; - GSRTFleftIndent(CTXT, indent);;} + GSRTFleftIndent(CTXT, indent);} break; - case 44: - -/* Line 1455 of yacc.c */ -#line 301 "rtfGrammar.y" + case 68: +/* Line 1792 of yacc.c */ +#line 346 "rtfGrammar.y" { int indent; if ((yyvsp[(1) - (1)].cmd).isEmpty) indent = 0; else indent = (yyvsp[(1) - (1)].cmd).parameter; - GSRTFrightIndent(CTXT, indent);;} + GSRTFrightIndent(CTXT, indent);} break; - case 45: - -/* Line 1455 of yacc.c */ -#line 308 "rtfGrammar.y" + case 69: +/* Line 1792 of yacc.c */ +#line 353 "rtfGrammar.y" { int location; if ((yyvsp[(1) - (1)].cmd).isEmpty) location = 0; else location = (yyvsp[(1) - (1)].cmd).parameter; - GSRTFtabstop(CTXT, location);;} + GSRTFtabstop(CTXT, location);} break; - case 46: - -/* Line 1455 of yacc.c */ -#line 315 "rtfGrammar.y" - { GSRTFalignCenter(CTXT); ;} + case 70: +/* Line 1792 of yacc.c */ +#line 360 "rtfGrammar.y" + { GSRTFalignCenter(CTXT); } break; - case 47: - -/* Line 1455 of yacc.c */ -#line 316 "rtfGrammar.y" - { GSRTFalignJustified(CTXT); ;} + case 71: +/* Line 1792 of yacc.c */ +#line 361 "rtfGrammar.y" + { GSRTFalignJustified(CTXT); } break; - case 48: - -/* Line 1455 of yacc.c */ -#line 317 "rtfGrammar.y" - { GSRTFalignLeft(CTXT); ;} + case 72: +/* Line 1792 of yacc.c */ +#line 362 "rtfGrammar.y" + { GSRTFalignLeft(CTXT); } break; - case 49: - -/* Line 1455 of yacc.c */ -#line 318 "rtfGrammar.y" - { GSRTFalignRight(CTXT); ;} + case 73: +/* Line 1792 of yacc.c */ +#line 363 "rtfGrammar.y" + { GSRTFalignRight(CTXT); } break; - case 50: - -/* Line 1455 of yacc.c */ -#line 319 "rtfGrammar.y" + case 74: +/* Line 1792 of yacc.c */ +#line 364 "rtfGrammar.y" { int space; if ((yyvsp[(1) - (1)].cmd).isEmpty) space = 0; else space = (yyvsp[(1) - (1)].cmd).parameter; - GSRTFspaceAbove(CTXT, space); ;} + GSRTFspaceAbove(CTXT, space); } break; - case 51: - -/* Line 1455 of yacc.c */ -#line 326 "rtfGrammar.y" - { GSRTFlineSpace(CTXT, (yyvsp[(1) - (1)].cmd).parameter); ;} - break; - - case 52: - -/* Line 1455 of yacc.c */ -#line 327 "rtfGrammar.y" - { GSRTFdefaultParagraph(CTXT); ;} - break; - - case 53: - -/* Line 1455 of yacc.c */ -#line 328 "rtfGrammar.y" - { GSRTFstyle(CTXT, (yyvsp[(1) - (1)].cmd).parameter); ;} - break; - - case 54: - -/* Line 1455 of yacc.c */ -#line 329 "rtfGrammar.y" - { int color; - - if ((yyvsp[(1) - (1)].cmd).isEmpty) - color = 0; - else - color = (yyvsp[(1) - (1)].cmd).parameter; - GSRTFcolorbg(CTXT, color); ;} - break; - - case 55: - -/* Line 1455 of yacc.c */ -#line 336 "rtfGrammar.y" - { int color; - - if ((yyvsp[(1) - (1)].cmd).isEmpty) - color = 0; - else - color = (yyvsp[(1) - (1)].cmd).parameter; - GSRTFcolorfg(CTXT, color); ;} - break; - - case 56: - -/* Line 1455 of yacc.c */ -#line 343 "rtfGrammar.y" - { int color; - - if ((yyvsp[(1) - (1)].cmd).isEmpty) - color = 0; - else - color = (yyvsp[(1) - (1)].cmd).parameter; - GSRTFunderlinecolor(CTXT, color); ;} - break; - - case 57: - -/* Line 1455 of yacc.c */ -#line 350 "rtfGrammar.y" - { int script; - - if ((yyvsp[(1) - (1)].cmd).isEmpty) - script = 6; - else - script = (yyvsp[(1) - (1)].cmd).parameter; - GSRTFsubscript(CTXT, script); ;} - break; - - case 58: - -/* Line 1455 of yacc.c */ -#line 357 "rtfGrammar.y" - { int script; - - if ((yyvsp[(1) - (1)].cmd).isEmpty) - script = 6; - else - script = (yyvsp[(1) - (1)].cmd).parameter; - GSRTFsuperscript(CTXT, script); ;} - break; - - case 59: - -/* Line 1455 of yacc.c */ -#line 364 "rtfGrammar.y" - { BOOL on; - - if ((yyvsp[(1) - (1)].cmd).isEmpty || (yyvsp[(1) - (1)].cmd).parameter) - on = YES; - else - on = NO; - GSRTFbold(CTXT, on); ;} - break; - - case 60: - -/* Line 1455 of yacc.c */ + case 75: +/* Line 1792 of yacc.c */ #line 371 "rtfGrammar.y" + { GSRTFlineSpace(CTXT, (yyvsp[(1) - (1)].cmd).parameter); } + break; + + case 76: +/* Line 1792 of yacc.c */ +#line 372 "rtfGrammar.y" + { GSRTFdefaultParagraph(CTXT); } + break; + + case 77: +/* Line 1792 of yacc.c */ +#line 373 "rtfGrammar.y" + { GSRTFstyle(CTXT, (yyvsp[(1) - (1)].cmd).parameter); } + break; + + case 78: +/* Line 1792 of yacc.c */ +#line 374 "rtfGrammar.y" + { int color; + + if ((yyvsp[(1) - (1)].cmd).isEmpty) + color = 0; + else + color = (yyvsp[(1) - (1)].cmd).parameter; + GSRTFcolorbg(CTXT, color); } + break; + + case 79: +/* Line 1792 of yacc.c */ +#line 381 "rtfGrammar.y" + { int color; + + if ((yyvsp[(1) - (1)].cmd).isEmpty) + color = 0; + else + color = (yyvsp[(1) - (1)].cmd).parameter; + GSRTFcolorfg(CTXT, color); } + break; + + case 80: +/* Line 1792 of yacc.c */ +#line 388 "rtfGrammar.y" + { int color; + + if ((yyvsp[(1) - (1)].cmd).isEmpty) + color = 0; + else + color = (yyvsp[(1) - (1)].cmd).parameter; + GSRTFunderlinecolor(CTXT, color); } + break; + + case 81: +/* Line 1792 of yacc.c */ +#line 395 "rtfGrammar.y" + { int script; + + if ((yyvsp[(1) - (1)].cmd).isEmpty) + script = 6; + else + script = (yyvsp[(1) - (1)].cmd).parameter; + GSRTFsubscript(CTXT, script); } + break; + + case 82: +/* Line 1792 of yacc.c */ +#line 402 "rtfGrammar.y" + { int script; + + if ((yyvsp[(1) - (1)].cmd).isEmpty) + script = 6; + else + script = (yyvsp[(1) - (1)].cmd).parameter; + GSRTFsuperscript(CTXT, script); } + break; + + case 83: +/* Line 1792 of yacc.c */ +#line 409 "rtfGrammar.y" { BOOL on; if ((yyvsp[(1) - (1)].cmd).isEmpty || (yyvsp[(1) - (1)].cmd).parameter) on = YES; else on = NO; - GSRTFitalic(CTXT, on); ;} + GSRTFbold(CTXT, on); } break; - case 61: - -/* Line 1455 of yacc.c */ -#line 378 "rtfGrammar.y" + case 84: +/* Line 1792 of yacc.c */ +#line 416 "rtfGrammar.y" { BOOL on; if ((yyvsp[(1) - (1)].cmd).isEmpty || (yyvsp[(1) - (1)].cmd).parameter) on = YES; else on = NO; - GSRTFunderline(CTXT, on, NSUnderlineStyleSingle | NSUnderlinePatternSolid); ;} + GSRTFitalic(CTXT, on); } break; - case 62: - -/* Line 1455 of yacc.c */ -#line 385 "rtfGrammar.y" + case 85: +/* Line 1792 of yacc.c */ +#line 423 "rtfGrammar.y" { BOOL on; if ((yyvsp[(1) - (1)].cmd).isEmpty || (yyvsp[(1) - (1)].cmd).parameter) on = YES; else on = NO; - GSRTFunderline(CTXT, on, NSUnderlineStyleSingle | NSUnderlinePatternDot); ;} + GSRTFunderline(CTXT, on, NSUnderlineStyleSingle | NSUnderlinePatternSolid); } break; - case 63: - -/* Line 1455 of yacc.c */ -#line 392 "rtfGrammar.y" + case 86: +/* Line 1792 of yacc.c */ +#line 430 "rtfGrammar.y" { BOOL on; if ((yyvsp[(1) - (1)].cmd).isEmpty || (yyvsp[(1) - (1)].cmd).parameter) on = YES; else on = NO; - GSRTFunderline(CTXT, on, NSUnderlineStyleSingle | NSUnderlinePatternDash); ;} + GSRTFunderline(CTXT, on, NSUnderlineStyleSingle | NSUnderlinePatternDot); } break; - case 64: - -/* Line 1455 of yacc.c */ -#line 399 "rtfGrammar.y" + case 87: +/* Line 1792 of yacc.c */ +#line 437 "rtfGrammar.y" { BOOL on; if ((yyvsp[(1) - (1)].cmd).isEmpty || (yyvsp[(1) - (1)].cmd).parameter) on = YES; else on = NO; - GSRTFunderline(CTXT, on, NSUnderlineStyleSingle | NSUnderlinePatternDashDot); ;} + GSRTFunderline(CTXT, on, NSUnderlineStyleSingle | NSUnderlinePatternDash); } break; - case 65: - -/* Line 1455 of yacc.c */ -#line 406 "rtfGrammar.y" + case 88: +/* Line 1792 of yacc.c */ +#line 444 "rtfGrammar.y" { BOOL on; if ((yyvsp[(1) - (1)].cmd).isEmpty || (yyvsp[(1) - (1)].cmd).parameter) on = YES; else on = NO; - GSRTFunderline(CTXT, on, NSUnderlineStyleSingle | NSUnderlinePatternDashDotDot); ;} + GSRTFunderline(CTXT, on, NSUnderlineStyleSingle | NSUnderlinePatternDashDot); } break; - case 66: - -/* Line 1455 of yacc.c */ -#line 413 "rtfGrammar.y" + case 89: +/* Line 1792 of yacc.c */ +#line 451 "rtfGrammar.y" { BOOL on; if ((yyvsp[(1) - (1)].cmd).isEmpty || (yyvsp[(1) - (1)].cmd).parameter) on = YES; else on = NO; - GSRTFunderline(CTXT, on, NSUnderlineStyleDouble | NSUnderlinePatternSolid); ;} + GSRTFunderline(CTXT, on, NSUnderlineStyleSingle | NSUnderlinePatternDashDotDot); } break; - case 67: - -/* Line 1455 of yacc.c */ -#line 420 "rtfGrammar.y" - { GSRTFunderline(CTXT, NO, NSUnderlineStyleNone); ;} - break; - - case 68: - -/* Line 1455 of yacc.c */ -#line 421 "rtfGrammar.y" + case 90: +/* Line 1792 of yacc.c */ +#line 458 "rtfGrammar.y" { BOOL on; if ((yyvsp[(1) - (1)].cmd).isEmpty || (yyvsp[(1) - (1)].cmd).parameter) on = YES; else on = NO; - GSRTFunderline(CTXT, on, NSUnderlineStyleThick | NSUnderlinePatternSolid); ;} + GSRTFunderline(CTXT, on, NSUnderlineStyleDouble | NSUnderlinePatternSolid); } break; - case 69: + case 91: +/* Line 1792 of yacc.c */ +#line 465 "rtfGrammar.y" + { GSRTFunderline(CTXT, NO, NSUnderlineStyleNone); } + break; -/* Line 1455 of yacc.c */ -#line 428 "rtfGrammar.y" + case 92: +/* Line 1792 of yacc.c */ +#line 466 "rtfGrammar.y" { BOOL on; if ((yyvsp[(1) - (1)].cmd).isEmpty || (yyvsp[(1) - (1)].cmd).parameter) on = YES; else on = NO; - GSRTFunderline(CTXT, on, NSUnderlineStyleThick | NSUnderlinePatternDot); ;} + GSRTFunderline(CTXT, on, NSUnderlineStyleThick | NSUnderlinePatternSolid); } break; - case 70: - -/* Line 1455 of yacc.c */ -#line 435 "rtfGrammar.y" + case 93: +/* Line 1792 of yacc.c */ +#line 473 "rtfGrammar.y" { BOOL on; if ((yyvsp[(1) - (1)].cmd).isEmpty || (yyvsp[(1) - (1)].cmd).parameter) on = YES; else on = NO; - GSRTFunderline(CTXT, on, NSUnderlineStyleThick | NSUnderlinePatternDash); ;} + GSRTFunderline(CTXT, on, NSUnderlineStyleThick | NSUnderlinePatternDot); } break; - case 71: - -/* Line 1455 of yacc.c */ -#line 442 "rtfGrammar.y" + case 94: +/* Line 1792 of yacc.c */ +#line 480 "rtfGrammar.y" { BOOL on; if ((yyvsp[(1) - (1)].cmd).isEmpty || (yyvsp[(1) - (1)].cmd).parameter) on = YES; else on = NO; - GSRTFunderline(CTXT, on, NSUnderlineStyleThick | NSUnderlinePatternDashDot); ;} + GSRTFunderline(CTXT, on, NSUnderlineStyleThick | NSUnderlinePatternDash); } break; - case 72: - -/* Line 1455 of yacc.c */ -#line 449 "rtfGrammar.y" + case 95: +/* Line 1792 of yacc.c */ +#line 487 "rtfGrammar.y" { BOOL on; if ((yyvsp[(1) - (1)].cmd).isEmpty || (yyvsp[(1) - (1)].cmd).parameter) on = YES; else on = NO; - GSRTFunderline(CTXT, on, NSUnderlineStyleThick | NSUnderlinePatternDashDotDot); ;} + GSRTFunderline(CTXT, on, NSUnderlineStyleThick | NSUnderlinePatternDashDot); } break; - case 73: - -/* Line 1455 of yacc.c */ -#line 456 "rtfGrammar.y" + case 96: +/* Line 1792 of yacc.c */ +#line 494 "rtfGrammar.y" { BOOL on; if ((yyvsp[(1) - (1)].cmd).isEmpty || (yyvsp[(1) - (1)].cmd).parameter) on = YES; else on = NO; - GSRTFunderline(CTXT, on, NSUnderlineStyleSingle | NSUnderlinePatternSolid | NSUnderlineByWordMask); ;} + GSRTFunderline(CTXT, on, NSUnderlineStyleThick | NSUnderlinePatternDashDotDot); } break; - case 74: + case 97: +/* Line 1792 of yacc.c */ +#line 501 "rtfGrammar.y" + { BOOL on; -/* Line 1455 of yacc.c */ -#line 463 "rtfGrammar.y" + if ((yyvsp[(1) - (1)].cmd).isEmpty || (yyvsp[(1) - (1)].cmd).parameter) + on = YES; + else + on = NO; + GSRTFunderline(CTXT, on, NSUnderlineStyleSingle | NSUnderlinePatternSolid | NSUnderlineByWordMask); } + break; + + case 98: +/* Line 1792 of yacc.c */ +#line 508 "rtfGrammar.y" { NSInteger style; if ((yyvsp[(1) - (1)].cmd).isEmpty || (yyvsp[(1) - (1)].cmd).parameter) style = NSUnderlineStyleSingle | NSUnderlinePatternSolid; else style = NSUnderlineStyleNone; - GSRTFstrikethrough(CTXT, style); ;} - break; - - case 75: - -/* Line 1455 of yacc.c */ -#line 469 "rtfGrammar.y" - { GSRTFstrikethrough(CTXT, NSUnderlineStyleDouble | NSUnderlinePatternSolid); ;} - break; - - case 76: - -/* Line 1455 of yacc.c */ -#line 470 "rtfGrammar.y" - { GSRTFunicode(CTXT, (yyvsp[(1) - (1)].cmd).parameter); ;} - break; - - case 77: - -/* Line 1455 of yacc.c */ -#line 471 "rtfGrammar.y" - { GSRTFdefaultCharacterStyle(CTXT); ;} - break; - - case 78: - -/* Line 1455 of yacc.c */ -#line 472 "rtfGrammar.y" - { GSRTFparagraph(CTXT); ;} - break; - - case 79: - -/* Line 1455 of yacc.c */ -#line 473 "rtfGrammar.y" - { GSRTFparagraph(CTXT); ;} - break; - - case 80: - -/* Line 1455 of yacc.c */ -#line 474 "rtfGrammar.y" - { GSRTFgenericRTFcommand(CTXT, (yyvsp[(1) - (1)].cmd)); - free((void*)(yyvsp[(1) - (1)].cmd).name); ;} - break; - - case 85: - -/* Line 1455 of yacc.c */ -#line 493 "rtfGrammar.y" - { GSRTFopenBlock(CTXT, YES); ;} - break; - - case 86: - -/* Line 1455 of yacc.c */ -#line 493 "rtfGrammar.y" - { GSRTFcloseBlock(CTXT, YES); ;} - break; - - case 87: - -/* Line 1455 of yacc.c */ -#line 494 "rtfGrammar.y" - { - GSRTFNeXTGraphic (CTXT, (yyvsp[(3) - (9)].text), (yyvsp[(4) - (9)].cmd).parameter, (yyvsp[(5) - (9)].cmd).parameter); - ;} - break; - - case 88: - -/* Line 1455 of yacc.c */ -#line 508 "rtfGrammar.y" - { GSRTFopenBlock(CTXT, YES); ;} - break; - - case 89: - -/* Line 1455 of yacc.c */ -#line 508 "rtfGrammar.y" - { GSRTFcloseBlock(CTXT, YES); ;} - break; - - case 90: - -/* Line 1455 of yacc.c */ -#line 509 "rtfGrammar.y" - { - GSRTFNeXTHelpLink (CTXT, (yyvsp[(2) - (12)].cmd).parameter, (yyvsp[(4) - (12)].text), (yyvsp[(6) - (12)].text), (yyvsp[(8) - (12)].text)); - ;} - break; - - case 91: - -/* Line 1455 of yacc.c */ -#line 522 "rtfGrammar.y" - { GSRTFopenBlock(CTXT, YES); ;} - break; - - case 92: - -/* Line 1455 of yacc.c */ -#line 522 "rtfGrammar.y" - { GSRTFcloseBlock(CTXT, YES); ;} - break; - - case 93: - -/* Line 1455 of yacc.c */ -#line 523 "rtfGrammar.y" - { - GSRTFNeXTHelpMarker (CTXT, (yyvsp[(2) - (8)].cmd).parameter, (yyvsp[(4) - (8)].text)); - ;} - break; - - case 98: - -/* Line 1455 of yacc.c */ -#line 538 "rtfGrammar.y" - { free((void *)(yyvsp[(5) - (6)].text));;} + GSRTFstrikethrough(CTXT, style); } break; case 99: - -/* Line 1455 of yacc.c */ -#line 543 "rtfGrammar.y" - { GSRTFregisterFont(CTXT, (yyvsp[(4) - (4)].text), (yyvsp[(2) - (4)].number), (yyvsp[(1) - (4)].cmd).parameter); - free((void *)(yyvsp[(4) - (4)].text)); ;} +/* Line 1792 of yacc.c */ +#line 514 "rtfGrammar.y" + { GSRTFstrikethrough(CTXT, NSUnderlineStyleDouble | NSUnderlinePatternSolid); } break; - case 105: - -/* Line 1455 of yacc.c */ -#line 556 "rtfGrammar.y" - { (yyval.number) = RTFfamilyNil - RTFfamilyNil; ;} + case 100: +/* Line 1792 of yacc.c */ +#line 515 "rtfGrammar.y" + { GSRTFunicode(CTXT, (yyvsp[(1) - (1)].cmd).parameter); } break; - case 106: - -/* Line 1455 of yacc.c */ -#line 557 "rtfGrammar.y" - { (yyval.number) = RTFfamilyRoman - RTFfamilyNil; ;} + case 101: +/* Line 1792 of yacc.c */ +#line 516 "rtfGrammar.y" + { GSRTFdefaultCharacterStyle(CTXT); } break; - case 107: - -/* Line 1455 of yacc.c */ -#line 558 "rtfGrammar.y" - { (yyval.number) = RTFfamilySwiss - RTFfamilyNil; ;} + case 102: +/* Line 1792 of yacc.c */ +#line 517 "rtfGrammar.y" + { GSRTFparagraph(CTXT); } break; - case 108: + case 103: +/* Line 1792 of yacc.c */ +#line 518 "rtfGrammar.y" + { GSRTFparagraph(CTXT); } + break; -/* Line 1455 of yacc.c */ -#line 559 "rtfGrammar.y" - { (yyval.number) = RTFfamilyModern - RTFfamilyNil; ;} + case 104: +/* Line 1792 of yacc.c */ +#line 519 "rtfGrammar.y" + { GSRTFgenericRTFcommand(CTXT, (yyvsp[(1) - (1)].cmd)); + free((void*)(yyvsp[(1) - (1)].cmd).name); } break; case 109: - -/* Line 1455 of yacc.c */ -#line 560 "rtfGrammar.y" - { (yyval.number) = RTFfamilyScript - RTFfamilyNil; ;} +/* Line 1792 of yacc.c */ +#line 538 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, YES); } break; case 110: - -/* Line 1455 of yacc.c */ -#line 561 "rtfGrammar.y" - { (yyval.number) = RTFfamilyDecor - RTFfamilyNil; ;} +/* Line 1792 of yacc.c */ +#line 538 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, YES); } break; case 111: +/* Line 1792 of yacc.c */ +#line 539 "rtfGrammar.y" + { + GSRTFNeXTGraphic (CTXT, (yyvsp[(3) - (9)].text), (yyvsp[(4) - (9)].cmd).parameter, (yyvsp[(5) - (9)].cmd).parameter); + } + break; -/* Line 1455 of yacc.c */ -#line 562 "rtfGrammar.y" - { (yyval.number) = RTFfamilyTech - RTFfamilyNil; ;} + case 112: +/* Line 1792 of yacc.c */ +#line 553 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, YES); } + break; + + case 113: +/* Line 1792 of yacc.c */ +#line 553 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, YES); } + break; + + case 114: +/* Line 1792 of yacc.c */ +#line 554 "rtfGrammar.y" + { + GSRTFNeXTHelpLink (CTXT, (yyvsp[(2) - (12)].cmd).parameter, (yyvsp[(4) - (12)].text), (yyvsp[(6) - (12)].text), (yyvsp[(8) - (12)].text)); + } break; case 115: - -/* Line 1455 of yacc.c */ -#line 579 "rtfGrammar.y" - { - GSRTFaddColor(CTXT, (yyvsp[(1) - (4)].cmd).parameter, (yyvsp[(2) - (4)].cmd).parameter, (yyvsp[(3) - (4)].cmd).parameter); - free((void *)(yyvsp[(4) - (4)].text)); - ;} +/* Line 1792 of yacc.c */ +#line 567 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, YES); } break; case 116: +/* Line 1792 of yacc.c */ +#line 567 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, YES); } + break; -/* Line 1455 of yacc.c */ -#line 584 "rtfGrammar.y" + case 117: +/* Line 1792 of yacc.c */ +#line 568 "rtfGrammar.y" + { + GSRTFNeXTHelpMarker (CTXT, (yyvsp[(2) - (8)].cmd).parameter, (yyvsp[(4) - (8)].text)); + } + break; + + case 122: +/* Line 1792 of yacc.c */ +#line 583 "rtfGrammar.y" + { free((void *)(yyvsp[(5) - (6)].text));} + break; + + case 123: +/* Line 1792 of yacc.c */ +#line 588 "rtfGrammar.y" + { GSRTFregisterFont(CTXT, (yyvsp[(4) - (4)].text), (yyvsp[(2) - (4)].number), (yyvsp[(1) - (4)].cmd).parameter); + free((void *)(yyvsp[(4) - (4)].text)); } + break; + + case 130: +/* Line 1792 of yacc.c */ +#line 602 "rtfGrammar.y" + { (yyval.number) = RTFfamilyNil - RTFfamilyNil; } + break; + + case 131: +/* Line 1792 of yacc.c */ +#line 603 "rtfGrammar.y" + { (yyval.number) = RTFfamilyRoman - RTFfamilyNil; } + break; + + case 132: +/* Line 1792 of yacc.c */ +#line 604 "rtfGrammar.y" + { (yyval.number) = RTFfamilySwiss - RTFfamilyNil; } + break; + + case 133: +/* Line 1792 of yacc.c */ +#line 605 "rtfGrammar.y" + { (yyval.number) = RTFfamilyModern - RTFfamilyNil; } + break; + + case 134: +/* Line 1792 of yacc.c */ +#line 606 "rtfGrammar.y" + { (yyval.number) = RTFfamilyScript - RTFfamilyNil; } + break; + + case 135: +/* Line 1792 of yacc.c */ +#line 607 "rtfGrammar.y" + { (yyval.number) = RTFfamilyDecor - RTFfamilyNil; } + break; + + case 136: +/* Line 1792 of yacc.c */ +#line 608 "rtfGrammar.y" + { (yyval.number) = RTFfamilyTech - RTFfamilyNil; } + break; + + case 140: +/* Line 1792 of yacc.c */ +#line 625 "rtfGrammar.y" + { + GSRTFaddColor(CTXT, (yyvsp[(1) - (4)].cmd).parameter, (yyvsp[(2) - (4)].cmd).parameter, (yyvsp[(3) - (4)].cmd).parameter); + free((void *)(yyvsp[(4) - (4)].text)); + } + break; + + case 141: +/* Line 1792 of yacc.c */ +#line 630 "rtfGrammar.y" { GSRTFaddDefaultColor(CTXT); free((void *)(yyvsp[(1) - (1)].text)); - ;} + } break; - -/* Line 1455 of yacc.c */ -#line 2750 "rtfGrammar.tab.m" +/* Line 1792 of yacc.c */ +#line 2883 "rtfGrammar.tab.m" default: break; } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); @@ -2776,6 +2920,10 @@ yyreduce: | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { @@ -2783,37 +2931,36 @@ yyerrlab: #if ! YYERROR_VERBOSE yyerror (ctxt, lctxt, YY_("syntax error")); #else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (ctxt, lctxt, yymsg); - } - else - { - yyerror (ctxt, lctxt, YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (ctxt, lctxt, yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; } +# undef YYSYNTAX_ERROR #endif } @@ -2872,7 +3019,7 @@ yyerrlab1: for (;;) { yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) + if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) @@ -2895,7 +3042,9 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ @@ -2919,7 +3068,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#if !defined(yyoverflow) || YYERROR_VERBOSE +#if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -2931,8 +3080,13 @@ yyexhaustedlab: yyreturn: if (yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, ctxt, lctxt); + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, ctxt, lctxt); + } /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); @@ -2956,11 +3110,9 @@ yyreturn: } - -/* Line 1675 of yacc.c */ -#line 596 "rtfGrammar.y" +/* Line 2055 of yacc.c */ +#line 642 "rtfGrammar.y" /* some C code here */ - diff --git a/TextConverters/RTF/rtfGrammar.y b/TextConverters/RTF/rtfGrammar.y index 8450e634e..704038fdb 100644 --- a/TextConverters/RTF/rtfGrammar.y +++ b/TextConverters/RTF/rtfGrammar.y @@ -68,7 +68,7 @@ typedef void *GSRTFctxt; #define CTXT ctxt #define YYERROR_VERBOSE -#define YYDEBUG 0 +#define YYDEBUG 1 #include "RTFConsumerFunctions.h" /*int GSRTFlex (YYSTYPE *lvalp, RTFscannerCtxt *lctxt); */ @@ -110,6 +110,15 @@ int GSRTFlex(void *lvalp, void *lctxt); %token RTFemspace %token RTFenspace %token RTFbullet +%token RTFfield +%token RTFfldinst +%token RTFfldalt +%token RTFfldrslt +%token RTFflddirty +%token RTFfldedit +%token RTFfldlock +%token RTFfldpriv +%token RTFfttruetype %token RTFlquote %token RTFrquote %token RTFldblquote @@ -187,6 +196,7 @@ int GSRTFlex(void *lvalp, void *lctxt); %token RTFfamilyTech %type rtfFontFamily rtfCharset rtfFontStatement +%type rtfFieldinst rtfFieldrslt /* let's go */ @@ -220,10 +230,45 @@ rtfBlock: '{' { GSRTFopenBlock(CTXT, NO); } rtfIngredients rtfNeXTstuff '}' { GS | '{' { GSRTFopenBlock(CTXT, YES); } RTFheader rtfIngredients '}' { GSRTFcloseBlock(CTXT, YES); } | '{' { GSRTFopenBlock(CTXT, YES); } RTFfooter rtfIngredients '}' { GSRTFcloseBlock(CTXT, YES); } | '{' { GSRTFopenBlock(CTXT, YES); } RTFpict rtfIngredients '}' { GSRTFcloseBlock(CTXT, YES); } + | '{' { GSRTFopenBlock(CTXT, NO); } RTFfield rtfField '}' { GSRTFcloseBlock(CTXT, NO); } | '{' error '}' ; +rtfField: rtfFieldMod rtfFieldinst rtfFieldrslt { GSRTFaddField(CTXT, $2, $3); free((void *)$2); free((void *)$3); } + | error + ; + +rtfFieldMod: /* empty */ + | rtfFieldMod RTFflddirty + | rtfFieldMod RTFfldedit + | rtfFieldMod RTFfldlock + | rtfFieldMod RTFfldpriv + ; + +rtfIgnore: /* empty */ + | RTFignore + ; + +rtfFieldinst: '{' rtfIgnore RTFfldinst RTFtext rtfFieldalt '}' { $$ = $4;} + | '{' rtfIgnore RTFfldinst '{' { GSRTFopenBlock(CTXT, YES); } rtfStatementList RTFtext rtfFieldalt '}' { GSRTFcloseBlock(CTXT, YES); } '}' { $$ = $7;} + | '{' error '}' { $$ = NULL;} + ; + +rtfFieldalt: /* empty */ + | RTFfldalt + ; + +rtfFieldrslt: '{' rtfIgnore RTFfldrslt RTFtext '}' { $$ = $4;} + | '{' rtfIgnore RTFfldrslt '{' rtfStatementList RTFtext '}' '}' { $$ = $6;} + | '{' error '}' { $$ = NULL;} + ; + +rtfStatementList: /* empty */ + | rtfStatementList rtfStatement + | rtfStatementList rtfBlock + ; + /* RTF statements start with a '\', have a alpha name and a number argument */ @@ -548,6 +593,7 @@ rtfFontAttrs: /* empty */ | rtfFontAttrs RTFfcharset | rtfFontAttrs RTFfprq | rtfFontAttrs RTFcpg + | rtfFontAttrs RTFfttruetype | rtfFontAttrs rtfBlock ; diff --git a/TextConverters/RTF/rtfScanner.m b/TextConverters/RTF/rtfScanner.m index 0a29608c8..22a7cf980 100644 --- a/TextConverters/RTF/rtfScanner.m +++ b/TextConverters/RTF/rtfScanner.m @@ -180,7 +180,15 @@ LexKeyword RTFcommands[] = {"fcharset", token(RTFfcharset)}, {"fdecor", token(RTFfamilyDecor)}, {"fi", token(RTFfirstLineIndent)}, + {"field", token(RTFfield)}, {"filename", token(RTFNeXTfilename)}, + {"fldalt", token(RTFfldalt)}, + {"flddirty", token(RTFflddirty)}, + {"fldedit", token(RTFfldedit)}, + {"fldinst", token(RTFfldinst)}, + {"fldlock", token(RTFfldlock)}, + {"fldpriv", token(RTFfldpriv)}, + {"fldrslt", token(RTFfldrslt)}, {"fmodern", token(RTFfamilyModern)}, {"fnil", token(RTFfamilyNil)}, {"fonttbl", token(RTFfontListStart)}, @@ -196,6 +204,7 @@ LexKeyword RTFcommands[] = {"fscript", token(RTFfamilyScript)}, {"fswiss", token(RTFfamilySwiss)}, {"ftech", token(RTFfamilyTech)}, + {"fttruetype", token(RTFfttruetype)}, {"green", token(RTFgreen)}, /* All headers are mapped on one entry */ {"header", token(RTFheader)},