From e86fae67c3725933c7bafbdc47d8191feeb385e5 Mon Sep 17 00:00:00 2001 From: wlux Date: Mon, 3 Jan 2011 11:48:57 +0000 Subject: [PATCH] Add some support for help links and markers in RTF documents. These end up as dedicated attachments in attributed strings. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31828 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 28 + .../Additions/GNUstepGUI/GSHelpAttachment.h | 56 + Images/GNUmakefile | 1 + Images/common_HelpLink.tiff | Bin 0 -> 382 bytes Source/GNUmakefile | 6 +- Source/GSHelpAttachment.m | 108 ++ Source/NSFileWrapper.m | 2 +- TextConverters/RTF/RTFConsumer.m | 122 +- TextConverters/RTF/RTFConsumerFunctions.h | 5 + TextConverters/RTF/RTFProducer.m | 130 +- TextConverters/RTF/rtfGrammar.tab.c | 1082 ++++++++++------- TextConverters/RTF/rtfGrammar.tab.h | 158 +-- TextConverters/RTF/rtfGrammar.y | 10 +- 13 files changed, 1104 insertions(+), 604 deletions(-) create mode 100644 Headers/Additions/GNUstepGUI/GSHelpAttachment.h create mode 100644 Images/common_HelpLink.tiff create mode 100644 Source/GSHelpAttachment.m diff --git a/ChangeLog b/ChangeLog index 46100840f..315d2fe44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,31 @@ +2011-01-03 Wolfgang Lux + + * Source/GNUmakefile: + * Headers/Additions/GNUstepGUI/GSHelpAttachment.h: + * Source/GSHelpAttachment.m: + Introduce new classes GSHelpLinkAttachment and + GSHelpMarkerAttachment to implement help links and markers in RTF + documents. + + * TextConverters/RTF/rtfGrammar.y: + * TextConverters/RTF/RTFConsumerFunctions.h: + * TextConverters/RTF/RTFConsumer.m (-addHelpLink:marker:, + -addHelpMarker:, GSRTFNeXTHelpLink, GSRTFNeXTHelpMarker): + Create attachments for help links and markers in RTF documents. + + * TextConverters/RTF/RTFProducer.m (-_addAttributesString:): + Properly write out help links and markers to RTF documents. + + * TextConverters/RTF/rtfGrammar.tab.h: + * TextConverters/RTF/rtfGrammar.tab.c: Regenerated. + + * Images/GNUmakefile: + * Images/common_HelpLink.tiff: + New icon for help link attachments. + + * Source/NSFileWrapper.m (-icon): Bug fix: Don't return a default + icon for a wrapper without a file name. + 2011-01-03 Wolfgang Lux * TextConverters/RTF/rtfGrammar.y: diff --git a/Headers/Additions/GNUstepGUI/GSHelpAttachment.h b/Headers/Additions/GNUstepGUI/GSHelpAttachment.h new file mode 100644 index 000000000..7cfe8d18f --- /dev/null +++ b/Headers/Additions/GNUstepGUI/GSHelpAttachment.h @@ -0,0 +1,56 @@ +/** GSHelpAttachment + + Copyright (C) 2011 Free Software Foundation, Inc. + + Author: Wolfgang Lux + Date: Jan 2011 + + This file is part of the GNUstep GUI Library. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; see the file COPYING.LIB. + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef _GNUstep_H_GSHelpAttachment +#define _GNUstep_H_GSHelpAttachment + +#import + +@interface GSHelpLinkAttachment : NSTextAttachment +{ + NSString *fileName, *markerName; +} + +- (id) initWithFileName: (NSString *)aFileName + markerName: (NSString *)aMarkerName; +- (void) dealloc; +- (NSString *)fileName; +- (NSString *)markerName; + +@end + +@interface GSHelpMarkerAttachment : NSTextAttachment +{ + NSString *markerName; +} + +- (id) initWithMarkerName: (NSString *)aMarkerName; +- (void) dealloc; +- (NSString *)markerName; + +@end + +#endif /* _GNUstep_H_GSHelpAttachment */ diff --git a/Images/GNUmakefile b/Images/GNUmakefile index a015b19ee..23ffe7023 100644 --- a/Images/GNUmakefile +++ b/Images/GNUmakefile @@ -74,6 +74,7 @@ Images_RESOURCE_FILES = \ common_Folder.tiff \ common_GSFolder.tiff \ common_HelpCursor.tiff \ + common_HelpLink.tiff \ common_Home.tiff \ common_HomeDirectory.tiff \ common_ImageFolder.tiff \ diff --git a/Images/common_HelpLink.tiff b/Images/common_HelpLink.tiff new file mode 100644 index 0000000000000000000000000000000000000000..d35aea218cdf065497a8d21372f162d6a3bc2ac2 GIT binary patch literal 382 zcmebEWzb?^VCZRJPzbP45#wP}@f50Tvt#f{Y9d%s|&L zGH?S4MkF>9n9Twdjbmhnin9WFY*026kS)jnln3f%VBlaBf{FuqjG|CBNVgb-&9w^1 z7Kf{EVU%J3ng-I#n8qj#XXi1>Aeo~9WrOUpMPdgbv4g>EkWFPk^MEdaKo5xF3@{pK H6Bq&j3, # but does not implement 's methods itself (it inherits @@ -447,7 +448,8 @@ GSInstantiator.h \ GSSoundSink.h \ GSSoundSource.h \ GSWindowDecorationView.h \ -GSXibLoading.h +GSXibLoading.h \ +GSHelpAttachment.h libgnustep-gui_HEADER_FILES = ${GUI_HEADERS} diff --git a/Source/GSHelpAttachment.m b/Source/GSHelpAttachment.m new file mode 100644 index 000000000..1c7e0f30e --- /dev/null +++ b/Source/GSHelpAttachment.m @@ -0,0 +1,108 @@ +/** GSHelpAttachment + + Copyright (C) 2011 Free Software Foundation, Inc. + + Author: Wolfgang Lux + Date: Jan 2011 + + This file is part of the GNUstep GUI Library. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; see the file COPYING.LIB. + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + + +#import "AppKit/NSFileWrapper.h" +#import "AppKit/NSImage.h" +#import "GNUstepGUI/GSHelpAttachment.h" + +@implementation GSHelpLinkAttachment + +static NSImage *sharedHelpLinkIcon; + ++ (void) initialize +{ + sharedHelpLinkIcon = [NSImage imageNamed: @"common_HelpLink"]; +} + +- (id) initWithFileName: (NSString *)aFileName + markerName: (NSString *)aMarkerName +{ + NSFileWrapper *wrapper; + + /* Create an empty wrapper so that we can supply an icon to the + attachment cell. */ + wrapper = [[NSFileWrapper alloc] init]; + [wrapper setIcon: sharedHelpLinkIcon]; + + if ((self = [super initWithFileWrapper: wrapper]) != nil) + { + ASSIGN(fileName, aFileName); + ASSIGN(markerName, aMarkerName); + } + RELEASE(wrapper); + return self; +} + +- (void) dealloc +{ + RELEASE(fileName); + RELEASE(markerName); + [super dealloc]; +} + +- (NSString *) fileName +{ + return fileName; +} + +- (NSString *) markerName +{ + return markerName; +} + +@end + +@implementation GSHelpMarkerAttachment + +- (id) initWithMarkerName: (NSString *)aMarkerName +{ + NSFileWrapper *wrapper; + + /* Create an empty wrapper so that we can supply an (nil) icon to + the attachment cell. */ + wrapper = [[NSFileWrapper alloc] init]; + + if ((self = [super initWithFileWrapper: wrapper]) != nil) + { + ASSIGN(markerName, aMarkerName); + } + RELEASE(wrapper); + return self; +} + +- (void) dealloc +{ + RELEASE(markerName); + [super dealloc]; +} + +- (NSString *) markerName +{ + return markerName; +} + +@end diff --git a/Source/NSFileWrapper.m b/Source/NSFileWrapper.m index e4e9feba2..ac1a8c794 100644 --- a/Source/NSFileWrapper.m +++ b/Source/NSFileWrapper.m @@ -339,7 +339,7 @@ - (NSImage*) icon { - if (_iconImage == nil) + if (_iconImage == nil && [self filename]) { return [[NSWorkspace sharedWorkspace] iconForFile: [self filename]]; } diff --git a/TextConverters/RTF/RTFConsumer.m b/TextConverters/RTF/RTFConsumer.m index e7a877e89..523183881 100644 --- a/TextConverters/RTF/RTFConsumer.m +++ b/TextConverters/RTF/RTFConsumer.m @@ -26,11 +26,12 @@ Boston, MA 02110-1301, USA. */ -#include -#include -#include "RTFConsumer.h" -#include "RTFConsumerFunctions.h" -#include "RTFProducer.h" +#import +#import +#import +#import "RTFConsumer.h" +#import "RTFConsumerFunctions.h" +#import "RTFProducer.h" /* we have to satisfy the scanner with a stream reading function */ typedef struct { @@ -266,6 +267,8 @@ static BOOL classInheritsFromNSMutableAttributedString (Class c) - (void) push; - (void) pop; - (void) appendString: (NSString*)string; +- (void) appendHelpLink: (NSString*)fileName marker: (NSString *)markerName; +- (void) appendHelpMarker: (NSString*)markerName; @end @@ -662,6 +665,84 @@ static BOOL classInheritsFromNSMutableAttributedString (Class c) } } +- (void) appendHelpLink: (NSString*)fileName marker: (NSString*)markerName +{ + int oldPosition = [result length]; + NSRange insertionRange = NSMakeRange(oldPosition,0); + + if (!ignore) + { + GSHelpLinkAttachment* attachment; + RTFAttribute* attr = [self attr]; + NSMutableDictionary* attributes = nil; + NSMutableAttributedString* str = nil; + + attachment = + [[GSHelpLinkAttachment alloc] + initWithFileName: fileName + markerName: markerName]; + if (attachment == nil) + { + NSLog(@"No attachment at %d", oldPosition); + return; + } + + attributes = [[NSMutableDictionary alloc] + initWithObjectsAndKeys: + [attr currentFont], NSFontAttributeName, + attr->paragraph, NSParagraphStyleAttributeName, + nil]; + + str = (NSMutableAttributedString*) [NSMutableAttributedString + attributedStringWithAttachment: attachment]; + + [str addAttributes: attributes range: NSMakeRange (0, [str length])]; + + [result replaceCharactersInRange: insertionRange withAttributedString: str]; + attr->changed = YES; + RELEASE(attributes); + RELEASE(attachment); + } +} + +- (void) appendHelpMarker: (NSString*)markerName +{ + int oldPosition = [result length]; + NSRange insertionRange = NSMakeRange(oldPosition,0); + + if (!ignore) + { + GSHelpMarkerAttachment* attachment; + RTFAttribute* attr = [self attr]; + NSMutableDictionary* attributes = nil; + NSMutableAttributedString* str = nil; + + attachment = + [[GSHelpMarkerAttachment alloc] initWithMarkerName: markerName]; + if (attachment == nil) + { + NSLog(@"No attachment at %d", oldPosition); + return; + } + + attributes = [[NSMutableDictionary alloc] + initWithObjectsAndKeys: + [attr currentFont], NSFontAttributeName, + attr->paragraph, NSParagraphStyleAttributeName, + nil]; + + str = (NSMutableAttributedString*) [NSMutableAttributedString + attributedStringWithAttachment: attachment]; + + [str addAttributes: attributes range: NSMakeRange (0, [str length])]; + + [result replaceCharactersInRange: insertionRange withAttributedString: str]; + attr->changed = YES; + RELEASE(attributes); + RELEASE(attachment); + } +} + @end #undef IGNORE @@ -1162,3 +1243,34 @@ void GSRTFNeXTGraphic (void *ctxt, const char *fileName, int width, int height) [(RTFDConsumer *)ctxt appendImage: [NSString stringWithCString: fileName]]; } +void GSRTFNeXTHelpLink (void *ctxt, int num, const char *markername, + const char *linkFilename, const char *linkMarkername) +{ + NSRange range; + NSString *fileName = [NSString stringWithCString: linkFilename]; + NSString *markerName = [NSString stringWithCString: linkMarkername]; + + range = [fileName rangeOfString: @";"]; + if (range.location != NSNotFound) + fileName = [fileName substringToIndex:range.location]; + + range = [markerName rangeOfString: @";"]; + if (range.location == 0) + markerName = nil; + else if (range.location != NSNotFound) + markerName = [markerName substringToIndex:range.location]; + + [(RTFDConsumer *)ctxt appendHelpLink: fileName marker: markerName]; +} + +void GSRTFNeXTHelpMarker (void *ctxt, int num, const char *markername) +{ + NSRange range; + NSString *markerName = [NSString stringWithCString: markername]; + + range = [markerName rangeOfString: @";"]; + if (range.location != NSNotFound) + markerName = [markerName substringToIndex:range.location]; + [(RTFDConsumer *)ctxt appendHelpMarker: markerName]; +} + diff --git a/TextConverters/RTF/RTFConsumerFunctions.h b/TextConverters/RTF/RTFConsumerFunctions.h index b301fb305..ebf042a2e 100644 --- a/TextConverters/RTF/RTFConsumerFunctions.h +++ b/TextConverters/RTF/RTFConsumerFunctions.h @@ -137,6 +137,11 @@ void GSRTFunderline(void *ctxt, BOOL on); void GSRTFparagraph(void *ctxt); /* NeXTGraphic */ void GSRTFNeXTGraphic(void *ctxt, const char *fileName, int width, int height); +/* NeXTHelpLink */ +void GSRTFNeXTHelpLink(void *ctxt, int num, const char *markername, + const char *linkFilename, const char *linkMarkername); +/* NeXTHelpMarker */ +void GSRTFNeXTHelpMarker(void *ctxt, int num, const char *markername); #endif diff --git a/TextConverters/RTF/RTFProducer.m b/TextConverters/RTF/RTFProducer.m index a68864f6d..fd00f3724 100644 --- a/TextConverters/RTF/RTFProducer.m +++ b/TextConverters/RTF/RTFProducer.m @@ -30,9 +30,10 @@ Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include "RTFProducer.h" +#import +#import +#import +#import "RTFProducer.h" // FIXME: Should be defined in a central place #define PAPERSIZE @"PaperSize" @@ -928,60 +929,93 @@ NSString *attachmentFilename; NSSize cellSize; - attachmentFileWrapper = [attachment fileWrapper]; - attachmentFilename = [attachmentFileWrapper filename]; - if (! attachmentFilename) - { - attachmentFilename = - [attachmentFileWrapper preferredFilename]; + if ([attachment isKindOfClass: [GSHelpLinkAttachment class]]) + { + GSHelpLinkAttachment *link = + (GSHelpLinkAttachment *)attachment; - if (! attachmentFilename) - { - // If we do not have a proper filename, we set it here, incrementing - // the number of unnamed attachment so we do not overwrite existing ones. + [result appendString: @"{{\\NeXTHelpLink"]; + [result appendString: @" \\markername "]; + [result appendString: @";\\linkFilename "]; + [result appendString: [link fileName]]; + [result appendString: @";\\linkMarkername "]; + [result appendString: [link markerName]]; + [result appendString: @";}"]; + } + else if ([attachment + isKindOfClass: [GSHelpMarkerAttachment class]]) + { + GSHelpMarkerAttachment *marker = + (GSHelpMarkerAttachment *)attachment; - // FIXME: setting the filename extension to tiff is not that great, but as - // we anyway append \NeXTGraphic just after it makes sense... (without the - // extension the file is not loaded) + [result appendString: @"{{\\NeXTHelpMarker"]; + [result appendString: @" \\markername "]; + [result appendString: [marker markerName]]; + [result appendString: @";}"]; + } + else + { + attachmentFileWrapper = [attachment fileWrapper]; + attachmentFilename = [attachmentFileWrapper filename]; + if (! attachmentFilename) + { + attachmentFilename = + [attachmentFileWrapper preferredFilename]; - attachmentFilename = [NSString stringWithFormat: @"__unnamed_file_%d.tiff", - unnamedAttachmentCounter++]; - [attachmentFileWrapper setPreferredFilename: - attachmentFilename]; - } - } + if (! attachmentFilename) + { + // If we do not have a proper filename, we set it + // here, incrementing the number of unnamed attachment + // so we do not overwrite existing ones. - /* - if ([attachmentFilename respondsToSelector: - @selector(fileSystemRepresentation)]) - { - const char *fileSystemRepresentation; + // FIXME: setting the filename extension to tiff + // is not that great, but as we anyway append + // \NeXTGraphic just after it makes sense... (without + // the extension the file is not loaded) - fileSystemRepresentation = - [attachmentFilename fileSystemRepresentation]; + attachmentFilename = + [NSString stringWithFormat: + @"__unnamed_file_%d.tiff", + unnamedAttachmentCounter++]; + [attachmentFileWrapper + setPreferredFilename: attachmentFilename]; + } + } - attachmentFilename = [self _encodedFilenameRepresentation: - fileSystemRepresentation]; - } - else - */ - { - attachmentFilename = - [self _ASCIIfiedString: attachmentFilename]; - } + /* + if ([attachmentFilename respondsToSelector: + @selector(fileSystemRepresentation)]) + { + const char *fileSystemRepresentation; - cellSize = [[attachment attachmentCell] cellSize]; + fileSystemRepresentation = + [attachmentFilename fileSystemRepresentation]; - [result appendString: @"{{\\NeXTGraphic "]; - [result appendString: [attachmentFilename lastPathComponent]]; - [result appendFormat: @" \\width%d \\height%d}", - (short)points2twips(cellSize.width), - (short)points2twips(cellSize.height)]; + attachmentFilename = + [self _encodedFilenameRepresentation: + fileSystemRepresentation]; + } + else + */ + { + attachmentFilename = + [self _ASCIIfiedString: attachmentFilename]; + } - [attachmentFileWrapper setFilename: attachmentFilename]; - [attachmentFileWrapper setPreferredFilename: attachmentFilename]; - if (attachmentFileWrapper) - [attachments addObject: attachmentFileWrapper]; + cellSize = [[attachment attachmentCell] cellSize]; + + [result appendString: @"{{\\NeXTGraphic "]; + [result appendString: [attachmentFilename lastPathComponent]]; + [result appendFormat: @" \\width%d \\height%d}", + (short)points2twips(cellSize.width), + (short)points2twips(cellSize.height)]; + + [attachmentFileWrapper setFilename: attachmentFilename]; + [attachmentFileWrapper + setPreferredFilename: attachmentFilename]; + if (attachmentFileWrapper) + [attachments addObject: attachmentFileWrapper]; + } } } else diff --git a/TextConverters/RTF/rtfGrammar.tab.c b/TextConverters/RTF/rtfGrammar.tab.c index 07932465f..b33f58f1d 100644 --- a/TextConverters/RTF/rtfGrammar.tab.c +++ b/TextConverters/RTF/rtfGrammar.tab.c @@ -113,42 +113,48 @@ RTFNeXTGraphic = 294, RTFNeXTGraphicWidth = 295, RTFNeXTGraphicHeight = 296, - RTFpaperWidth = 297, - RTFpaperHeight = 298, - RTFmarginLeft = 299, - RTFmarginRight = 300, - RTFmarginTop = 301, - RTFmarginButtom = 302, - RTFfirstLineIndent = 303, - RTFleftIndent = 304, - RTFrightIndent = 305, - RTFalignCenter = 306, - RTFalignJustified = 307, - RTFalignLeft = 308, - RTFalignRight = 309, - RTFlineSpace = 310, - RTFspaceAbove = 311, - RTFstyle = 312, - RTFbold = 313, - RTFitalic = 314, - RTFunderline = 315, - RTFunderlineStop = 316, - RTFunichar = 317, - RTFsubscript = 318, - RTFsuperscript = 319, - RTFtabstop = 320, - RTFfcharset = 321, - RTFfprq = 322, - RTFcpg = 323, - RTFOtherStatement = 324, - RTFfontListStart = 325, - RTFfamilyNil = 326, - RTFfamilyRoman = 327, - RTFfamilySwiss = 328, - RTFfamilyModern = 329, - RTFfamilyScript = 330, - RTFfamilyDecor = 331, - RTFfamilyTech = 332 + RTFNeXTHelpLink = 297, + RTFNeXTHelpMarker = 298, + RTFNeXTfilename = 299, + RTFNeXTmarkername = 300, + RTFNeXTlinkFilename = 301, + RTFNeXTlinkMarkername = 302, + RTFpaperWidth = 303, + RTFpaperHeight = 304, + RTFmarginLeft = 305, + RTFmarginRight = 306, + RTFmarginTop = 307, + RTFmarginButtom = 308, + RTFfirstLineIndent = 309, + RTFleftIndent = 310, + RTFrightIndent = 311, + RTFalignCenter = 312, + RTFalignJustified = 313, + RTFalignLeft = 314, + RTFalignRight = 315, + RTFlineSpace = 316, + RTFspaceAbove = 317, + RTFstyle = 318, + RTFbold = 319, + RTFitalic = 320, + RTFunderline = 321, + RTFunderlineStop = 322, + RTFunichar = 323, + RTFsubscript = 324, + RTFsuperscript = 325, + RTFtabstop = 326, + RTFfcharset = 327, + RTFfprq = 328, + RTFcpg = 329, + RTFOtherStatement = 330, + RTFfontListStart = 331, + RTFfamilyNil = 332, + RTFfamilyRoman = 333, + RTFfamilySwiss = 334, + RTFfamilyModern = 335, + RTFfamilyScript = 336, + RTFfamilyDecor = 337, + RTFfamilyTech = 338 }; #endif /* Tokens. */ @@ -191,42 +197,48 @@ #define RTFNeXTGraphic 294 #define RTFNeXTGraphicWidth 295 #define RTFNeXTGraphicHeight 296 -#define RTFpaperWidth 297 -#define RTFpaperHeight 298 -#define RTFmarginLeft 299 -#define RTFmarginRight 300 -#define RTFmarginTop 301 -#define RTFmarginButtom 302 -#define RTFfirstLineIndent 303 -#define RTFleftIndent 304 -#define RTFrightIndent 305 -#define RTFalignCenter 306 -#define RTFalignJustified 307 -#define RTFalignLeft 308 -#define RTFalignRight 309 -#define RTFlineSpace 310 -#define RTFspaceAbove 311 -#define RTFstyle 312 -#define RTFbold 313 -#define RTFitalic 314 -#define RTFunderline 315 -#define RTFunderlineStop 316 -#define RTFunichar 317 -#define RTFsubscript 318 -#define RTFsuperscript 319 -#define RTFtabstop 320 -#define RTFfcharset 321 -#define RTFfprq 322 -#define RTFcpg 323 -#define RTFOtherStatement 324 -#define RTFfontListStart 325 -#define RTFfamilyNil 326 -#define RTFfamilyRoman 327 -#define RTFfamilySwiss 328 -#define RTFfamilyModern 329 -#define RTFfamilyScript 330 -#define RTFfamilyDecor 331 -#define RTFfamilyTech 332 +#define RTFNeXTHelpLink 297 +#define RTFNeXTHelpMarker 298 +#define RTFNeXTfilename 299 +#define RTFNeXTmarkername 300 +#define RTFNeXTlinkFilename 301 +#define RTFNeXTlinkMarkername 302 +#define RTFpaperWidth 303 +#define RTFpaperHeight 304 +#define RTFmarginLeft 305 +#define RTFmarginRight 306 +#define RTFmarginTop 307 +#define RTFmarginButtom 308 +#define RTFfirstLineIndent 309 +#define RTFleftIndent 310 +#define RTFrightIndent 311 +#define RTFalignCenter 312 +#define RTFalignJustified 313 +#define RTFalignLeft 314 +#define RTFalignRight 315 +#define RTFlineSpace 316 +#define RTFspaceAbove 317 +#define RTFstyle 318 +#define RTFbold 319 +#define RTFitalic 320 +#define RTFunderline 321 +#define RTFunderlineStop 322 +#define RTFunichar 323 +#define RTFsubscript 324 +#define RTFsuperscript 325 +#define RTFtabstop 326 +#define RTFfcharset 327 +#define RTFfprq 328 +#define RTFcpg 329 +#define RTFOtherStatement 330 +#define RTFfontListStart 331 +#define RTFfamilyNil 332 +#define RTFfamilyRoman 333 +#define RTFfamilySwiss 334 +#define RTFfamilyModern 335 +#define RTFfamilyScript 336 +#define RTFfamilyDecor 337 +#define RTFfamilyTech 338 @@ -302,7 +314,7 @@ typedef union YYSTYPE RTFcmd cmd; } /* Line 193 of yacc.c. */ -#line 306 "rtfGrammar.tab.c" +#line 318 "rtfGrammar.tab.c" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -315,7 +327,7 @@ typedef union YYSTYPE /* Line 216 of yacc.c. */ -#line 319 "rtfGrammar.tab.c" +#line 331 "rtfGrammar.tab.c" #ifdef short # undef short @@ -530,20 +542,20 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 4 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 799 +#define YYLAST 1144 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 80 +#define YYNTOKENS 86 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 27 +#define YYNNTS 34 /* YYNRULES -- Number of rules. */ -#define YYNRULES 93 +#define YYNRULES 102 /* YYNRULES -- Number of states. */ -#define YYNSTATES 134 +#define YYNSTATES 154 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 332 +#define YYMAXUTOK 338 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -563,7 +575,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, 78, 2, 79, 2, 2, 2, 2, + 2, 2, 2, 84, 2, 85, 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, @@ -584,70 +596,75 @@ static const yytype_uint8 yytranslate[] = 45, 46, 47, 48, 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 + 75, 76, 77, 78, 79, 80, 81, 82, 83 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ -static const yytype_uint8 yyprhs[] = +static const yytype_uint16 yyprhs[] = { 0, 0, 3, 4, 5, 13, 15, 17, 19, 21, - 23, 24, 27, 30, 33, 36, 39, 42, 45, 46, - 51, 52, 58, 59, 65, 66, 72, 73, 79, 80, - 86, 87, 93, 94, 100, 104, 106, 108, 110, 112, + 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, 171, - 172, 184, 189, 190, 193, 198, 205, 210, 211, 214, - 217, 220, 223, 225, 227, 229, 231, 233, 235, 237, - 242, 243, 246, 251 + 154, 156, 158, 160, 162, 164, 166, 168, 169, 171, + 173, 175, 176, 177, 187, 188, 189, 202, 203, 204, + 213, 218, 219, 222, 227, 234, 239, 240, 243, 246, + 249, 252, 254, 256, 258, 260, 262, 264, 266, 271, + 272, 275, 280 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { - 81, 0, -1, -1, -1, 78, 82, 4, 84, 85, - 83, 79, -1, 5, -1, 6, -1, 7, -1, 8, - -1, 69, -1, -1, 85, 96, -1, 85, 99, -1, - 85, 104, -1, 85, 95, -1, 85, 3, -1, 85, - 86, -1, 85, 1, -1, -1, 78, 87, 85, 79, - -1, -1, 78, 88, 9, 85, 79, -1, -1, 78, - 89, 10, 85, 79, -1, -1, 78, 90, 11, 85, - 79, -1, -1, 78, 91, 12, 85, 79, -1, -1, - 78, 92, 13, 85, 79, -1, -1, 78, 93, 14, - 85, 79, -1, -1, 78, 94, 15, 85, 79, -1, - 78, 1, 79, -1, 37, -1, 38, -1, 42, -1, - 43, -1, 44, -1, 45, -1, 46, -1, 47, -1, - 48, -1, 49, -1, 50, -1, 65, -1, 51, -1, - 52, -1, 53, -1, 54, -1, 56, -1, 55, -1, - 18, -1, 57, -1, 34, -1, 35, -1, 63, -1, - 64, -1, 58, -1, 59, -1, 60, -1, 61, -1, - 62, -1, 16, -1, 17, -1, 19, -1, 69, -1, - -1, -1, 78, 78, 39, 3, 40, 41, 79, 97, - 85, 98, 79, -1, 78, 70, 100, 79, -1, -1, - 100, 101, -1, 100, 78, 101, 79, -1, 100, 78, - 101, 86, 3, 79, -1, 37, 103, 102, 3, -1, - -1, 102, 66, -1, 102, 67, -1, 102, 68, -1, - 102, 86, -1, 71, -1, 72, -1, 73, -1, 74, - -1, 75, -1, 76, -1, 77, -1, 78, 36, 105, - 79, -1, -1, 105, 106, -1, 31, 32, 33, 3, - -1, 3, -1 + 87, 0, -1, -1, -1, 84, 88, 4, 90, 91, + 89, 85, -1, 5, -1, 6, -1, 7, -1, 8, + -1, 75, -1, -1, 91, 112, -1, 91, 117, -1, + 91, 101, -1, 91, 3, -1, 91, 92, -1, 91, + 1, -1, -1, 84, 93, 91, 102, 85, -1, -1, + 84, 94, 9, 91, 85, -1, -1, 84, 95, 10, + 91, 85, -1, -1, 84, 96, 11, 91, 85, -1, + -1, 84, 97, 12, 91, 85, -1, -1, 84, 98, + 13, 91, 85, -1, -1, 84, 99, 14, 91, 85, + -1, -1, 84, 100, 15, 91, 85, -1, 84, 1, + 85, -1, 37, -1, 38, -1, 48, -1, 49, -1, + 50, -1, 51, -1, 52, -1, 53, -1, 54, -1, + 55, -1, 56, -1, 71, -1, 57, -1, 58, -1, + 59, -1, 60, -1, 62, -1, 61, -1, 18, -1, + 63, -1, 34, -1, 35, -1, 69, -1, 70, -1, + 64, -1, 65, -1, 66, -1, 67, -1, 68, -1, + 16, -1, 17, -1, 19, -1, 75, -1, -1, 103, + -1, 106, -1, 109, -1, -1, -1, 84, 39, 3, + 40, 41, 85, 104, 91, 105, -1, -1, -1, 84, + 42, 45, 3, 46, 3, 47, 3, 85, 107, 91, + 108, -1, -1, -1, 84, 43, 45, 3, 85, 110, + 91, 111, -1, 84, 76, 113, 85, -1, -1, 113, + 114, -1, 113, 84, 114, 85, -1, 113, 84, 114, + 92, 3, 85, -1, 37, 116, 115, 3, -1, -1, + 115, 72, -1, 115, 73, -1, 115, 74, -1, 115, + 92, -1, 77, -1, 78, -1, 79, -1, 80, -1, + 81, -1, 82, -1, 83, -1, 84, 36, 118, 85, + -1, -1, 118, 119, -1, 31, 32, 33, 3, -1, + 3, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 174, 174, 174, 174, 177, 178, 179, 180, 182, - 185, 186, 187, 188, 189, 190, 191, 192, 195, 195, - 196, 196, 197, 197, 198, 198, 199, 199, 200, 200, - 201, 201, 202, 202, 203, 211, 218, 225, 232, 239, - 246, 253, 260, 267, 274, 281, 288, 295, 296, 297, - 298, 299, 306, 307, 308, 309, 316, 323, 330, 337, - 344, 351, 358, 359, 360, 361, 362, 363, 376, 376, - 376, 385, 388, 389, 390, 391, 397, 401, 402, 403, - 404, 405, 410, 411, 412, 413, 414, 415, 416, 424, - 427, 428, 432, 437 + 0, 180, 180, 180, 180, 183, 184, 185, 186, 188, + 191, 192, 193, 194, 195, 196, 197, 200, 200, 201, + 201, 202, 202, 203, 203, 204, 204, 205, 205, 206, + 206, 207, 207, 208, 216, 223, 230, 237, 244, 251, + 258, 265, 272, 279, 286, 293, 300, 301, 302, 303, + 304, 311, 312, 313, 314, 321, 328, 335, 342, 349, + 356, 363, 364, 365, 366, 367, 368, 372, 373, 374, + 375, 387, 387, 387, 402, 402, 402, 416, 416, 416, + 425, 428, 429, 430, 431, 437, 441, 442, 443, 444, + 445, 450, 451, 452, 453, 454, 455, 456, 464, 467, + 468, 472, 477 }; #endif @@ -664,7 +681,9 @@ static const char *const yytname[] = "RTFbullet", "RTFlquote", "RTFrquote", "RTFldblquote", "RTFrdblquote", "RTFred", "RTFgreen", "RTFblue", "RTFcolorbg", "RTFcolorfg", "RTFcolortable", "RTFfont", "RTFfontSize", "RTFNeXTGraphic", - "RTFNeXTGraphicWidth", "RTFNeXTGraphicHeight", "RTFpaperWidth", + "RTFNeXTGraphicWidth", "RTFNeXTGraphicHeight", "RTFNeXTHelpLink", + "RTFNeXTHelpMarker", "RTFNeXTfilename", "RTFNeXTmarkername", + "RTFNeXTlinkFilename", "RTFNeXTlinkMarkername", "RTFpaperWidth", "RTFpaperHeight", "RTFmarginLeft", "RTFmarginRight", "RTFmarginTop", "RTFmarginButtom", "RTFfirstLineIndent", "RTFleftIndent", "RTFrightIndent", "RTFalignCenter", "RTFalignJustified", "RTFalignLeft", @@ -675,9 +694,11 @@ static const char *const yytname[] = "RTFfamilyRoman", "RTFfamilySwiss", "RTFfamilyModern", "RTFfamilyScript", "RTFfamilyDecor", "RTFfamilyTech", "'{'", "'}'", "$accept", "rtfFile", "@1", "@2", "rtfCharset", "rtfIngredients", "rtfBlock", "@3", "@4", "@5", - "@6", "@7", "@8", "@9", "@10", "rtfStatement", "rtfNeXTGraphic", "@11", - "@12", "rtfFontList", "rtfFonts", "rtfFontStatement", "rtfFontAttrs", - "rtfFontFamily", "rtfColorDef", "rtfColors", "rtfColorStatement", 0 + "@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 }; #endif @@ -693,38 +714,41 @@ static const yytype_uint16 yytoknum[] = 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 123, 125 + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 123, 125 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 80, 82, 83, 81, 84, 84, 84, 84, 84, - 85, 85, 85, 85, 85, 85, 85, 85, 87, 86, - 88, 86, 89, 86, 90, 86, 91, 86, 92, 86, - 93, 86, 94, 86, 86, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 97, 98, - 96, 99, 100, 100, 100, 100, 101, 102, 102, 102, - 102, 102, 103, 103, 103, 103, 103, 103, 103, 104, - 105, 105, 106, 106 + 0, 86, 88, 89, 87, 90, 90, 90, 90, 90, + 91, 91, 91, 91, 91, 91, 91, 93, 92, 94, + 92, 95, 92, 96, 92, 97, 92, 98, 92, 99, + 92, 100, 92, 92, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 102, 102, 102, + 102, 104, 105, 103, 107, 108, 106, 110, 111, 109, + 112, 113, 113, 113, 113, 114, 115, 115, 115, 115, + 115, 116, 116, 116, 116, 116, 116, 116, 117, 118, + 118, 119, 119 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 0, 7, 1, 1, 1, 1, 1, - 0, 2, 2, 2, 2, 2, 2, 2, 0, 4, - 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, - 0, 5, 0, 5, 3, 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, 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, 0, - 11, 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, 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 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -733,249 +757,327 @@ static const yytype_uint8 yyr2[] = static const yytype_uint8 yydefact[] = { 0, 2, 0, 0, 1, 0, 5, 6, 7, 8, - 9, 10, 0, 17, 15, 64, 65, 53, 66, 55, - 56, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 47, 48, 49, 50, 52, 51, 54, 59, - 60, 61, 62, 63, 57, 58, 46, 67, 0, 0, - 16, 14, 11, 12, 13, 0, 90, 72, 0, 10, - 0, 0, 0, 0, 0, 0, 0, 4, 34, 0, - 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, - 93, 0, 89, 91, 0, 0, 71, 73, 0, 19, - 0, 0, 0, 0, 0, 0, 0, 0, 82, 83, - 84, 85, 86, 87, 88, 77, 0, 0, 21, 23, - 25, 27, 29, 31, 33, 0, 0, 0, 74, 0, - 0, 92, 76, 78, 79, 80, 81, 0, 68, 75, - 10, 0, 0, 70 + 9, 10, 0, 16, 14, 63, 64, 52, 65, 54, + 55, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 46, 47, 48, 49, 51, 50, 53, 58, + 59, 60, 61, 62, 56, 57, 45, 66, 0, 0, + 15, 13, 11, 12, 0, 99, 81, 10, 0, 0, + 0, 0, 0, 0, 0, 4, 33, 0, 0, 0, + 10, 10, 10, 10, 10, 10, 10, 102, 0, 98, + 100, 0, 0, 80, 82, 0, 0, 68, 69, 70, + 0, 0, 0, 0, 0, 0, 0, 0, 91, 92, + 93, 94, 95, 96, 97, 86, 0, 0, 0, 0, + 18, 20, 22, 24, 26, 28, 30, 32, 0, 0, + 0, 83, 0, 0, 0, 0, 101, 85, 87, 88, + 89, 90, 0, 0, 0, 0, 84, 0, 0, 77, + 71, 0, 10, 10, 0, 0, 0, 0, 79, 73, + 74, 10, 0, 76 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 2, 3, 49, 11, 12, 50, 59, 60, 61, - 62, 63, 64, 65, 66, 51, 52, 130, 132, 53, - 70, 87, 116, 105, 54, 69, 83 + -1, 2, 3, 49, 11, 12, 50, 57, 58, 59, + 60, 61, 62, 63, 64, 51, 86, 87, 143, 149, + 88, 151, 153, 89, 142, 148, 52, 68, 84, 119, + 105, 53, 67, 80 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -79 +#define YYPACT_NINF -99 static const yytype_int16 yypact[] = { - -77, -79, 6, 3, -79, 89, -79, -79, -79, -79, - -79, -79, 135, -79, -79, -79, -79, -79, -79, -79, - -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, - -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, - -79, -79, -79, -79, -79, -79, -79, -79, -1, -53, - -79, -79, -79, -79, -79, -50, -79, -79, -9, -79, - 22, 29, 21, 28, 53, 56, 52, -79, -79, 62, - 64, 69, 200, -79, -79, -79, -79, -79, -79, -79, - -79, 42, -79, -79, 88, 38, -79, -79, 58, -79, - 265, 330, 395, 460, 525, 590, 655, 66, -79, -79, - -79, -79, -79, -79, -79, -79, -75, 59, -79, -79, - -79, -79, -79, -79, -79, 100, 24, 70, -79, 103, - 30, -79, -79, -79, -79, -79, -79, 31, -79, -79, - -79, 720, 32, -79 + -81, -99, 11, 8, -99, -1, -99, -99, -99, -99, + -99, -99, 278, -99, -99, -99, -99, -99, -99, -99, + -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, + -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, + -99, -99, -99, -99, -99, -99, -99, -99, 130, -65, + -99, -99, -99, -99, -54, -99, -99, -99, 21, 22, + 23, 24, 20, 25, 26, -99, -99, -2, -35, 349, + -99, -99, -99, -99, -99, -99, -99, -99, 3, -99, + -99, -55, 0, -99, -99, 53, -47, -99, -99, -99, + 420, 491, 562, 633, 704, 775, 846, 7, -99, -99, + -99, -99, -99, -99, -99, -99, -75, 39, 1, 2, + -99, -99, -99, -99, -99, -99, -99, -99, 40, 78, + 207, -99, 41, 5, 45, 48, -99, -99, -99, -99, + -99, -99, -33, 12, 9, -28, -99, -27, 56, -99, + -99, 13, -99, -99, 58, 917, 988, -12, -99, -99, + -99, -99, 1059, -99 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -79, -79, -79, -79, -79, -54, -78, -79, -79, -79, - -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, - -79, 55, -79, -79, -79, -79, -79 + -99, -99, -99, -99, -99, -57, -98, -99, -99, -99, + -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, + -99, -99, -99, -99, -99, -99, -99, -99, -7, -99, + -99, -99, -99, -99 }; /* 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 -70 +#define YYTABLE_NINF -79 static const yytype_int16 yytable[] = { - 55, 1, -18, 117, 118, 72, 4, 5, -20, -22, - -24, -26, -28, -30, -32, -18, -18, -18, -18, 90, - 91, 92, 93, 94, 95, 96, 67, 122, 119, 68, - 71, 73, 75, -18, -18, 56, -18, -18, 126, 74, - 76, -18, -18, -18, -18, -18, -18, -18, -18, -18, - -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, - -18, -18, -18, -18, -18, 80, 77, 79, -18, 57, - 78, 55, 88, -18, 97, 84, 131, 58, -18, -20, - -22, -24, -26, -28, -30, -32, -18, -18, -18, -18, - 123, 124, 125, 81, 6, 7, 8, 9, 107, 115, - 120, 84, 117, 121, -18, -18, 127, -18, -18, 128, - 129, 133, -18, -18, -18, -18, -18, -18, -18, -18, - -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, - -18, -18, -18, -18, -18, -18, 13, 0, 14, -18, - 106, 82, 85, 86, 0, 0, 0, 0, -18, -18, - 0, 15, 16, 17, 18, 0, 0, 0, 10, 98, - 99, 100, 101, 102, 103, 104, 0, 0, 0, 19, - 20, 0, 21, 22, 0, 0, 0, 23, 24, 25, + 69, 77, 81, 1, 6, 7, 8, 9, 122, 120, + 121, 4, 5, 90, 91, 92, 93, 94, 95, 96, + 65, 131, 98, 99, 100, 101, 102, 103, 104, 78, + 70, 66, 71, 74, 72, 97, 73, 81, 110, 75, + 118, 76, 123, 126, 132, 133, 124, 125, 134, 82, + 83, 135, 136, 137, 54, 138, -17, 139, 140, 141, + 144, 147, -19, -21, -23, -25, -27, -29, -31, -17, + -17, -17, -17, 150, 10, 106, 0, 0, 0, 0, + 0, 127, 0, 79, 0, 145, 146, -17, -17, 55, + -17, -17, 107, 0, 152, 108, 109, 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, 0, 0, 0, -17, 56, + 0, 54, 0, -17, 0, 0, 0, -17, -17, -19, + -21, -23, -25, -27, -29, -31, -17, -17, -17, -17, + 128, 129, 130, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 120, 0, -17, -17, 55, -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, 0, 0, 0, -17, 56, 0, 54, 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, 0, 0, 0, 0, 0, 0, + 0, -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, 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, 19, 20, 0, 21, 22, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 13, 0, 14, 47, 0, 0, 0, 0, 0, 0, + 0, 0, 48, -3, 0, 15, 16, 17, 18, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 19, 20, 0, 21, 22, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 13, 0, 14, 47, 0, 0, 0, 0, 0, - 0, 0, 0, 48, -3, 0, 15, 16, 17, 18, + 0, 0, 0, 85, -67, 0, 15, 16, 17, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 20, 0, 21, 22, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 13, 0, 14, 47, 0, 0, 0, 0, + 0, 0, 0, 0, 48, 111, 0, 15, 16, 17, + 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 19, 20, 0, 21, 22, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 13, 0, 14, 47, 0, 0, 0, + 0, 0, 0, 0, 0, 48, 112, 0, 15, 16, + 17, 18, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 19, 20, 0, 21, + 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 13, 0, 14, 47, 0, 0, + 0, 0, 0, 0, 0, 0, 48, 113, 0, 15, + 16, 17, 18, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 19, 20, 0, + 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 13, 0, 14, 47, 0, + 0, 0, 0, 0, 0, 0, 0, 48, 114, 0, + 15, 16, 17, 18, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 19, 20, + 0, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 13, 0, 14, 47, - 0, 0, 0, 0, 0, 0, 0, 0, 48, 89, + 0, 0, 0, 0, 0, 0, 0, 0, 48, 115, 0, 15, 16, 17, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, - 20, 0, 21, 22, 0, 0, 0, 23, 24, 25, + 20, 0, 21, 22, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 13, 0, 14, + 47, 0, 0, 0, 0, 0, 0, 0, 0, 48, + 116, 0, 15, 16, 17, 18, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 19, 20, 0, 21, 22, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 13, 0, + 14, 47, 0, 0, 0, 0, 0, 0, 0, 0, + 48, 117, 0, 15, 16, 17, 18, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 19, 20, 0, 21, 22, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 13, + 0, 14, 47, 0, 0, 0, 0, 0, 0, 0, + 0, 48, -78, 0, 15, 16, 17, 18, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 19, 20, 0, 21, 22, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 13, 0, 14, 47, 0, 0, 0, 0, 0, 0, + 0, 0, 48, -72, 0, 15, 16, 17, 18, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 19, 20, 0, 21, 22, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 13, 0, 14, 47, 0, 0, 0, 0, 0, - 0, 0, 0, 48, 108, 0, 15, 16, 17, 18, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 19, 20, 0, 21, 22, 0, - 0, 0, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 13, 0, 14, 47, - 0, 0, 0, 0, 0, 0, 0, 0, 48, 109, - 0, 15, 16, 17, 18, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, - 20, 0, 21, 22, 0, 0, 0, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 13, 0, 14, 47, 0, 0, 0, 0, 0, - 0, 0, 0, 48, 110, 0, 15, 16, 17, 18, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 19, 20, 0, 21, 22, 0, - 0, 0, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 13, 0, 14, 47, - 0, 0, 0, 0, 0, 0, 0, 0, 48, 111, - 0, 15, 16, 17, 18, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, - 20, 0, 21, 22, 0, 0, 0, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 13, 0, 14, 47, 0, 0, 0, 0, 0, - 0, 0, 0, 48, 112, 0, 15, 16, 17, 18, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 19, 20, 0, 21, 22, 0, - 0, 0, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 13, 0, 14, 47, - 0, 0, 0, 0, 0, 0, 0, 0, 48, 113, - 0, 15, 16, 17, 18, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, - 20, 0, 21, 22, 0, 0, 0, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 13, 0, 14, 47, 0, 0, 0, 0, 0, - 0, 0, 0, 48, 114, 0, 15, 16, 17, 18, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 19, 20, 0, 21, 22, 0, - 0, 0, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 0, 0, 0, 47, - 0, 0, 0, 0, 0, 0, 0, 0, 48, -69 + 46, 0, 0, 0, 47, 0, 0, 0, 0, 0, + 0, 0, 0, 48, -75 }; static const yytype_int16 yycheck[] = { - 1, 78, 3, 78, 79, 59, 0, 4, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 73, - 74, 75, 76, 77, 78, 79, 79, 3, 106, 79, - 39, 9, 11, 34, 35, 36, 37, 38, 116, 10, - 12, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 3, 13, 15, 69, 70, - 14, 1, 3, 3, 32, 37, 130, 78, 79, 9, + 57, 3, 37, 84, 5, 6, 7, 8, 106, 84, + 85, 0, 4, 70, 71, 72, 73, 74, 75, 76, + 85, 119, 77, 78, 79, 80, 81, 82, 83, 31, + 9, 85, 10, 13, 11, 32, 12, 37, 85, 14, + 33, 15, 3, 3, 3, 40, 45, 45, 3, 84, + 85, 3, 85, 41, 1, 46, 3, 85, 85, 3, + 47, 3, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 85, 75, 82, -1, -1, -1, -1, + -1, 3, -1, 85, -1, 142, 143, 34, 35, 36, + 37, 38, 39, -1, 151, 42, 43, -1, -1, -1, + -1, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, -1, -1, -1, 75, 76, + -1, 1, -1, 3, -1, -1, -1, 84, 85, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 66, 67, 68, 31, 5, 6, 7, 8, 40, 33, - 41, 37, 78, 3, 34, 35, 3, 37, 38, 79, - 79, 79, 42, 43, 44, 45, 46, 47, 48, 49, + 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 84, -1, 34, 35, 36, 37, 38, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 1, -1, 3, 69, - 85, 79, 78, 79, -1, -1, -1, -1, 78, 79, - -1, 16, 17, 18, 19, -1, -1, -1, 69, 71, - 72, 73, 74, 75, 76, 77, -1, -1, -1, 34, - 35, -1, 37, 38, -1, -1, -1, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 1, -1, 3, 69, -1, -1, -1, -1, -1, - -1, -1, -1, 78, 79, -1, 16, 17, 18, 19, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, -1, -1, -1, 75, 76, -1, 1, -1, + 3, -1, -1, -1, 84, 85, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 34, 35, -1, 37, 38, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 1, + -1, 3, 75, -1, -1, -1, -1, -1, -1, -1, + -1, 84, 85, -1, 16, 17, 18, 19, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 34, 35, -1, 37, 38, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 1, -1, 3, 75, -1, -1, -1, -1, -1, -1, + -1, -1, 84, 85, -1, 16, 17, 18, 19, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 34, 35, -1, 37, 38, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 1, -1, 3, 75, -1, -1, -1, -1, -1, + -1, -1, -1, 84, 85, -1, 16, 17, 18, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 34, 35, -1, 37, 38, -1, - -1, -1, 42, 43, 44, 45, 46, 47, 48, 49, + -1, -1, -1, -1, -1, -1, -1, -1, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 1, -1, 3, 69, - -1, -1, -1, -1, -1, -1, -1, -1, 78, 79, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 1, -1, 3, 75, -1, -1, -1, -1, + -1, -1, -1, -1, 84, 85, -1, 16, 17, 18, + 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 34, 35, -1, 37, 38, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 1, -1, 3, 75, -1, -1, -1, + -1, -1, -1, -1, -1, 84, 85, -1, 16, 17, + 18, 19, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 34, 35, -1, 37, + 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 1, -1, 3, 75, -1, -1, + -1, -1, -1, -1, -1, -1, 84, 85, -1, 16, + 17, 18, 19, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 34, 35, -1, + 37, 38, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 1, -1, 3, 75, -1, + -1, -1, -1, -1, -1, -1, -1, 84, 85, -1, + 16, 17, 18, 19, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 34, 35, + -1, 37, 38, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 1, -1, 3, 75, + -1, -1, -1, -1, -1, -1, -1, -1, 84, 85, -1, 16, 17, 18, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 34, - 35, -1, 37, 38, -1, -1, -1, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 35, -1, 37, 38, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 1, -1, 3, 69, -1, -1, -1, -1, -1, - -1, -1, -1, 78, 79, -1, 16, 17, 18, 19, + 65, 66, 67, 68, 69, 70, 71, 1, -1, 3, + 75, -1, -1, -1, -1, -1, -1, -1, -1, 84, + 85, -1, 16, 17, 18, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 34, 35, -1, 37, 38, -1, - -1, -1, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 1, -1, 3, 69, - -1, -1, -1, -1, -1, -1, -1, -1, 78, 79, - -1, 16, 17, 18, 19, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 34, - 35, -1, 37, 38, -1, -1, -1, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 1, -1, 3, 69, -1, -1, -1, -1, -1, - -1, -1, -1, 78, 79, -1, 16, 17, 18, 19, + 34, 35, -1, 37, 38, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 1, -1, + 3, 75, -1, -1, -1, -1, -1, -1, -1, -1, + 84, 85, -1, 16, 17, 18, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 34, 35, -1, 37, 38, -1, - -1, -1, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 1, -1, 3, 69, - -1, -1, -1, -1, -1, -1, -1, -1, 78, 79, - -1, 16, 17, 18, 19, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 34, - 35, -1, 37, 38, -1, -1, -1, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 1, -1, 3, 69, -1, -1, -1, -1, -1, - -1, -1, -1, 78, 79, -1, 16, 17, 18, 19, + -1, 34, 35, -1, 37, 38, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 1, + -1, 3, 75, -1, -1, -1, -1, -1, -1, -1, + -1, 84, 85, -1, 16, 17, 18, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 34, 35, -1, 37, 38, -1, - -1, -1, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 1, -1, 3, 69, - -1, -1, -1, -1, -1, -1, -1, -1, 78, 79, - -1, 16, 17, 18, 19, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 34, - 35, -1, 37, 38, -1, -1, -1, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 1, -1, 3, 69, -1, -1, -1, -1, -1, - -1, -1, -1, 78, 79, -1, 16, 17, 18, 19, + -1, -1, 34, 35, -1, 37, 38, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 1, -1, 3, 75, -1, -1, -1, -1, -1, -1, + -1, -1, 84, 85, -1, 16, 17, 18, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 34, 35, -1, 37, 38, -1, - -1, -1, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, -1, -1, -1, 69, - -1, -1, -1, -1, -1, -1, -1, -1, 78, 79 + -1, -1, -1, 34, 35, -1, 37, 38, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, -1, -1, -1, 75, -1, -1, -1, -1, -1, + -1, -1, -1, 84, 85 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 78, 81, 82, 0, 4, 5, 6, 7, 8, - 69, 84, 85, 1, 3, 16, 17, 18, 19, 34, - 35, 37, 38, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 69, 78, 83, - 86, 95, 96, 99, 104, 1, 36, 70, 78, 87, - 88, 89, 90, 91, 92, 93, 94, 79, 79, 105, - 100, 39, 85, 9, 10, 11, 12, 13, 14, 15, - 3, 31, 79, 106, 37, 78, 79, 101, 3, 79, - 85, 85, 85, 85, 85, 85, 85, 32, 71, 72, - 73, 74, 75, 76, 77, 103, 101, 40, 79, 79, - 79, 79, 79, 79, 79, 33, 102, 78, 79, 86, - 41, 3, 3, 66, 67, 68, 86, 3, 79, 79, - 97, 85, 98, 79 + 0, 84, 87, 88, 0, 4, 5, 6, 7, 8, + 75, 90, 91, 1, 3, 16, 17, 18, 19, 34, + 35, 37, 38, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 75, 84, 89, + 92, 101, 112, 117, 1, 36, 76, 93, 94, 95, + 96, 97, 98, 99, 100, 85, 85, 118, 113, 91, + 9, 10, 11, 12, 13, 14, 15, 3, 31, 85, + 119, 37, 84, 85, 114, 84, 102, 103, 106, 109, + 91, 91, 91, 91, 91, 91, 91, 32, 77, 78, + 79, 80, 81, 82, 83, 116, 114, 39, 42, 43, + 85, 85, 85, 85, 85, 85, 85, 85, 33, 115, + 84, 85, 92, 3, 45, 45, 3, 3, 72, 73, + 74, 92, 3, 40, 3, 3, 85, 41, 46, 85, + 85, 3, 110, 104, 47, 91, 91, 3, 111, 105, + 85, 107, 91, 108 }; #define yyerrok (yyerrstatus = 0) @@ -1803,127 +1905,127 @@ yyreduce: switch (yyn) { case 2: -#line 174 "rtfGrammar.y" +#line 180 "rtfGrammar.y" { GSRTFstart(CTXT); ;} break; case 3: -#line 174 "rtfGrammar.y" +#line 180 "rtfGrammar.y" { GSRTFstop(CTXT); ;} break; case 5: -#line 177 "rtfGrammar.y" +#line 183 "rtfGrammar.y" { (yyval.number) = 1; ;} break; case 6: -#line 178 "rtfGrammar.y" +#line 184 "rtfGrammar.y" { (yyval.number) = 2; ;} break; case 7: -#line 179 "rtfGrammar.y" +#line 185 "rtfGrammar.y" { (yyval.number) = 3; ;} break; case 8: -#line 180 "rtfGrammar.y" +#line 186 "rtfGrammar.y" { (yyval.number) = 4; ;} break; case 9: -#line 182 "rtfGrammar.y" +#line 188 "rtfGrammar.y" { (yyval.number) = 1; free((void*)(yyvsp[(1) - (1)].cmd).name); ;} break; - case 15: -#line 190 "rtfGrammar.y" + case 14: +#line 195 "rtfGrammar.y" { GSRTFmangleText(CTXT, (yyvsp[(2) - (2)].text)); free((void *)(yyvsp[(2) - (2)].text)); ;} break; - case 18: -#line 195 "rtfGrammar.y" + case 17: +#line 200 "rtfGrammar.y" { GSRTFopenBlock(CTXT, NO); ;} break; - case 19: -#line 195 "rtfGrammar.y" + case 18: +#line 200 "rtfGrammar.y" { GSRTFcloseBlock(CTXT, NO); ;} break; - case 20: -#line 196 "rtfGrammar.y" + case 19: +#line 201 "rtfGrammar.y" { GSRTFopenBlock(CTXT, YES); ;} break; + case 20: +#line 201 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, YES); ;} + break; + case 21: -#line 196 "rtfGrammar.y" - { GSRTFcloseBlock(CTXT, YES); ;} +#line 202 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, YES); ;} break; case 22: -#line 197 "rtfGrammar.y" - { GSRTFopenBlock(CTXT, YES); ;} +#line 202 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, YES); ;} break; case 23: -#line 197 "rtfGrammar.y" - { GSRTFcloseBlock(CTXT, YES); ;} +#line 203 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, YES); ;} break; case 24: -#line 198 "rtfGrammar.y" - { GSRTFopenBlock(CTXT, YES); ;} +#line 203 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, YES); ;} break; case 25: -#line 198 "rtfGrammar.y" - { GSRTFcloseBlock(CTXT, YES); ;} +#line 204 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, YES); ;} break; case 26: -#line 199 "rtfGrammar.y" - { GSRTFopenBlock(CTXT, YES); ;} +#line 204 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, YES); ;} break; case 27: -#line 199 "rtfGrammar.y" - { GSRTFcloseBlock(CTXT, YES); ;} +#line 205 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, YES); ;} break; case 28: -#line 200 "rtfGrammar.y" - { GSRTFopenBlock(CTXT, YES); ;} +#line 205 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, YES); ;} break; case 29: -#line 200 "rtfGrammar.y" - { GSRTFcloseBlock(CTXT, YES); ;} +#line 206 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, YES); ;} break; case 30: -#line 201 "rtfGrammar.y" - { GSRTFopenBlock(CTXT, YES); ;} +#line 206 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, YES); ;} break; case 31: -#line 201 "rtfGrammar.y" - { GSRTFcloseBlock(CTXT, YES); ;} - break; - - case 32: -#line 202 "rtfGrammar.y" +#line 207 "rtfGrammar.y" { GSRTFopenBlock(CTXT, YES); ;} break; - case 33: -#line 202 "rtfGrammar.y" + case 32: +#line 207 "rtfGrammar.y" { GSRTFcloseBlock(CTXT, YES); ;} break; - case 35: -#line 211 "rtfGrammar.y" + case 34: +#line 216 "rtfGrammar.y" { int font; if ((yyvsp[(1) - (1)].cmd).isEmpty) @@ -1933,8 +2035,8 @@ yyreduce: GSRTFfontNumber(CTXT, font); ;} break; - case 36: -#line 218 "rtfGrammar.y" + case 35: +#line 223 "rtfGrammar.y" { int size; if ((yyvsp[(1) - (1)].cmd).isEmpty) @@ -1944,8 +2046,8 @@ yyreduce: GSRTFfontSize(CTXT, size); ;} break; - case 37: -#line 225 "rtfGrammar.y" + case 36: +#line 230 "rtfGrammar.y" { int width; if ((yyvsp[(1) - (1)].cmd).isEmpty) @@ -1955,8 +2057,8 @@ yyreduce: GSRTFpaperWidth(CTXT, width);;} break; - case 38: -#line 232 "rtfGrammar.y" + case 37: +#line 237 "rtfGrammar.y" { int height; if ((yyvsp[(1) - (1)].cmd).isEmpty) @@ -1966,8 +2068,8 @@ yyreduce: GSRTFpaperHeight(CTXT, height);;} break; - case 39: -#line 239 "rtfGrammar.y" + case 38: +#line 244 "rtfGrammar.y" { int margin; if ((yyvsp[(1) - (1)].cmd).isEmpty) @@ -1977,8 +2079,8 @@ yyreduce: GSRTFmarginLeft(CTXT, margin);;} break; - case 40: -#line 246 "rtfGrammar.y" + case 39: +#line 251 "rtfGrammar.y" { int margin; if ((yyvsp[(1) - (1)].cmd).isEmpty) @@ -1988,8 +2090,8 @@ yyreduce: GSRTFmarginRight(CTXT, margin); ;} break; - case 41: -#line 253 "rtfGrammar.y" + case 40: +#line 258 "rtfGrammar.y" { int margin; if ((yyvsp[(1) - (1)].cmd).isEmpty) @@ -1999,8 +2101,8 @@ yyreduce: GSRTFmarginTop(CTXT, margin); ;} break; - case 42: -#line 260 "rtfGrammar.y" + case 41: +#line 265 "rtfGrammar.y" { int margin; if ((yyvsp[(1) - (1)].cmd).isEmpty) @@ -2010,8 +2112,8 @@ yyreduce: GSRTFmarginButtom(CTXT, margin); ;} break; - case 43: -#line 267 "rtfGrammar.y" + case 42: +#line 272 "rtfGrammar.y" { int indent; if ((yyvsp[(1) - (1)].cmd).isEmpty) @@ -2021,8 +2123,8 @@ yyreduce: GSRTFfirstLineIndent(CTXT, indent); ;} break; - case 44: -#line 274 "rtfGrammar.y" + case 43: +#line 279 "rtfGrammar.y" { int indent; if ((yyvsp[(1) - (1)].cmd).isEmpty) @@ -2032,8 +2134,8 @@ yyreduce: GSRTFleftIndent(CTXT, indent);;} break; - case 45: -#line 281 "rtfGrammar.y" + case 44: +#line 286 "rtfGrammar.y" { int indent; if ((yyvsp[(1) - (1)].cmd).isEmpty) @@ -2043,8 +2145,8 @@ yyreduce: GSRTFrightIndent(CTXT, indent);;} break; - case 46: -#line 288 "rtfGrammar.y" + case 45: +#line 293 "rtfGrammar.y" { int location; if ((yyvsp[(1) - (1)].cmd).isEmpty) @@ -2054,28 +2156,28 @@ yyreduce: GSRTFtabstop(CTXT, location);;} break; - case 47: -#line 295 "rtfGrammar.y" + case 46: +#line 300 "rtfGrammar.y" { GSRTFalignCenter(CTXT); ;} break; - case 48: -#line 296 "rtfGrammar.y" + case 47: +#line 301 "rtfGrammar.y" { GSRTFalignJustified(CTXT); ;} break; - case 49: -#line 297 "rtfGrammar.y" + case 48: +#line 302 "rtfGrammar.y" { GSRTFalignLeft(CTXT); ;} break; - case 50: -#line 298 "rtfGrammar.y" + case 49: +#line 303 "rtfGrammar.y" { GSRTFalignRight(CTXT); ;} break; - case 51: -#line 299 "rtfGrammar.y" + case 50: +#line 304 "rtfGrammar.y" { int space; if ((yyvsp[(1) - (1)].cmd).isEmpty) @@ -2085,23 +2187,23 @@ yyreduce: GSRTFspaceAbove(CTXT, space); ;} break; - case 52: -#line 306 "rtfGrammar.y" + case 51: +#line 311 "rtfGrammar.y" { GSRTFlineSpace(CTXT, (yyvsp[(1) - (1)].cmd).parameter); ;} break; - case 53: -#line 307 "rtfGrammar.y" + case 52: +#line 312 "rtfGrammar.y" { GSRTFdefaultParagraph(CTXT); ;} break; - case 54: -#line 308 "rtfGrammar.y" + case 53: +#line 313 "rtfGrammar.y" { GSRTFstyle(CTXT, (yyvsp[(1) - (1)].cmd).parameter); ;} break; - case 55: -#line 309 "rtfGrammar.y" + case 54: +#line 314 "rtfGrammar.y" { int color; if ((yyvsp[(1) - (1)].cmd).isEmpty) @@ -2111,8 +2213,8 @@ yyreduce: GSRTFcolorbg(CTXT, color); ;} break; - case 56: -#line 316 "rtfGrammar.y" + case 55: +#line 321 "rtfGrammar.y" { int color; if ((yyvsp[(1) - (1)].cmd).isEmpty) @@ -2122,8 +2224,8 @@ yyreduce: GSRTFcolorfg(CTXT, color); ;} break; - case 57: -#line 323 "rtfGrammar.y" + case 56: +#line 328 "rtfGrammar.y" { int script; if ((yyvsp[(1) - (1)].cmd).isEmpty) @@ -2133,8 +2235,8 @@ yyreduce: GSRTFsubscript(CTXT, script); ;} break; - case 58: -#line 330 "rtfGrammar.y" + case 57: +#line 335 "rtfGrammar.y" { int script; if ((yyvsp[(1) - (1)].cmd).isEmpty) @@ -2144,8 +2246,8 @@ yyreduce: GSRTFsuperscript(CTXT, script); ;} break; - case 59: -#line 337 "rtfGrammar.y" + case 58: +#line 342 "rtfGrammar.y" { BOOL on; if ((yyvsp[(1) - (1)].cmd).isEmpty || (yyvsp[(1) - (1)].cmd).parameter) @@ -2155,8 +2257,8 @@ yyreduce: GSRTFbold(CTXT, on); ;} break; - case 60: -#line 344 "rtfGrammar.y" + case 59: +#line 349 "rtfGrammar.y" { BOOL on; if ((yyvsp[(1) - (1)].cmd).isEmpty || (yyvsp[(1) - (1)].cmd).parameter) @@ -2166,8 +2268,8 @@ yyreduce: GSRTFitalic(CTXT, on); ;} break; - case 61: -#line 351 "rtfGrammar.y" + case 60: +#line 356 "rtfGrammar.y" { BOOL on; if ((yyvsp[(1) - (1)].cmd).isEmpty || (yyvsp[(1) - (1)].cmd).parameter) @@ -2177,110 +2279,144 @@ yyreduce: GSRTFunderline(CTXT, on); ;} break; - case 62: -#line 358 "rtfGrammar.y" + case 61: +#line 363 "rtfGrammar.y" { GSRTFunderline(CTXT, NO); ;} break; - case 63: -#line 359 "rtfGrammar.y" + case 62: +#line 364 "rtfGrammar.y" { GSRTFunicode(CTXT, (yyvsp[(1) - (1)].cmd).parameter); ;} break; - case 64: -#line 360 "rtfGrammar.y" + case 63: +#line 365 "rtfGrammar.y" { GSRTFdefaultCharacterStyle(CTXT); ;} break; + case 64: +#line 366 "rtfGrammar.y" + { GSRTFparagraph(CTXT); ;} + break; + case 65: -#line 361 "rtfGrammar.y" +#line 367 "rtfGrammar.y" { GSRTFparagraph(CTXT); ;} break; case 66: -#line 362 "rtfGrammar.y" - { GSRTFparagraph(CTXT); ;} - break; - - case 67: -#line 363 "rtfGrammar.y" +#line 368 "rtfGrammar.y" { GSRTFgenericRTFcommand(CTXT, (yyvsp[(1) - (1)].cmd)); free((void*)(yyvsp[(1) - (1)].cmd).name); ;} break; - case 68: -#line 376 "rtfGrammar.y" + case 71: +#line 387 "rtfGrammar.y" { GSRTFopenBlock(CTXT, YES); ;} break; - case 69: -#line 376 "rtfGrammar.y" + case 72: +#line 387 "rtfGrammar.y" { GSRTFcloseBlock(CTXT, YES); ;} break; - case 70: -#line 377 "rtfGrammar.y" + case 73: +#line 388 "rtfGrammar.y" { - GSRTFNeXTGraphic (CTXT, (yyvsp[(4) - (11)].text), (yyvsp[(5) - (11)].cmd).parameter, (yyvsp[(6) - (11)].cmd).parameter); + GSRTFNeXTGraphic (CTXT, (yyvsp[(3) - (9)].text), (yyvsp[(4) - (9)].cmd).parameter, (yyvsp[(5) - (9)].cmd).parameter); ;} break; + case 74: +#line 402 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, YES); ;} + break; + case 75: -#line 392 "rtfGrammar.y" - { free((void *)(yyvsp[(5) - (6)].text));;} +#line 402 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, YES); ;} break; case 76: -#line 397 "rtfGrammar.y" +#line 403 "rtfGrammar.y" + { + GSRTFNeXTHelpLink (CTXT, (yyvsp[(2) - (12)].cmd).parameter, (yyvsp[(4) - (12)].text), (yyvsp[(6) - (12)].text), (yyvsp[(8) - (12)].text)); + ;} + break; + + case 77: +#line 416 "rtfGrammar.y" + { GSRTFopenBlock(CTXT, YES); ;} + break; + + case 78: +#line 416 "rtfGrammar.y" + { GSRTFcloseBlock(CTXT, YES); ;} + break; + + case 79: +#line 417 "rtfGrammar.y" + { + GSRTFNeXTHelpMarker (CTXT, (yyvsp[(2) - (8)].cmd).parameter, (yyvsp[(4) - (8)].text)); + ;} + break; + + case 84: +#line 432 "rtfGrammar.y" + { free((void *)(yyvsp[(5) - (6)].text));;} + break; + + case 85: +#line 437 "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 82: -#line 410 "rtfGrammar.y" + case 91: +#line 450 "rtfGrammar.y" { (yyval.number) = RTFfamilyNil - RTFfamilyNil; ;} break; - case 83: -#line 411 "rtfGrammar.y" + case 92: +#line 451 "rtfGrammar.y" { (yyval.number) = RTFfamilyRoman - RTFfamilyNil; ;} break; - case 84: -#line 412 "rtfGrammar.y" + case 93: +#line 452 "rtfGrammar.y" { (yyval.number) = RTFfamilySwiss - RTFfamilyNil; ;} break; - case 85: -#line 413 "rtfGrammar.y" + case 94: +#line 453 "rtfGrammar.y" { (yyval.number) = RTFfamilyModern - RTFfamilyNil; ;} break; - case 86: -#line 414 "rtfGrammar.y" + case 95: +#line 454 "rtfGrammar.y" { (yyval.number) = RTFfamilyScript - RTFfamilyNil; ;} break; - case 87: -#line 415 "rtfGrammar.y" + case 96: +#line 455 "rtfGrammar.y" { (yyval.number) = RTFfamilyDecor - RTFfamilyNil; ;} break; - case 88: -#line 416 "rtfGrammar.y" + case 97: +#line 456 "rtfGrammar.y" { (yyval.number) = RTFfamilyTech - RTFfamilyNil; ;} break; - case 92: -#line 433 "rtfGrammar.y" + case 101: +#line 473 "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 93: -#line 438 "rtfGrammar.y" + case 102: +#line 478 "rtfGrammar.y" { GSRTFaddDefaultColor(CTXT); free((void *)(yyvsp[(1) - (1)].text)); @@ -2289,7 +2425,7 @@ yyreduce: /* Line 1267 of yacc.c. */ -#line 2293 "rtfGrammar.tab.c" +#line 2429 "rtfGrammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -2503,7 +2639,7 @@ yyreturn: } -#line 450 "rtfGrammar.y" +#line 490 "rtfGrammar.y" /* some C code here */ diff --git a/TextConverters/RTF/rtfGrammar.tab.h b/TextConverters/RTF/rtfGrammar.tab.h index 160d352d7..3fad5dc72 100644 --- a/TextConverters/RTF/rtfGrammar.tab.h +++ b/TextConverters/RTF/rtfGrammar.tab.h @@ -78,42 +78,48 @@ RTFNeXTGraphic = 294, RTFNeXTGraphicWidth = 295, RTFNeXTGraphicHeight = 296, - RTFpaperWidth = 297, - RTFpaperHeight = 298, - RTFmarginLeft = 299, - RTFmarginRight = 300, - RTFmarginTop = 301, - RTFmarginButtom = 302, - RTFfirstLineIndent = 303, - RTFleftIndent = 304, - RTFrightIndent = 305, - RTFalignCenter = 306, - RTFalignJustified = 307, - RTFalignLeft = 308, - RTFalignRight = 309, - RTFlineSpace = 310, - RTFspaceAbove = 311, - RTFstyle = 312, - RTFbold = 313, - RTFitalic = 314, - RTFunderline = 315, - RTFunderlineStop = 316, - RTFunichar = 317, - RTFsubscript = 318, - RTFsuperscript = 319, - RTFtabstop = 320, - RTFfcharset = 321, - RTFfprq = 322, - RTFcpg = 323, - RTFOtherStatement = 324, - RTFfontListStart = 325, - RTFfamilyNil = 326, - RTFfamilyRoman = 327, - RTFfamilySwiss = 328, - RTFfamilyModern = 329, - RTFfamilyScript = 330, - RTFfamilyDecor = 331, - RTFfamilyTech = 332 + RTFNeXTHelpLink = 297, + RTFNeXTHelpMarker = 298, + RTFNeXTfilename = 299, + RTFNeXTmarkername = 300, + RTFNeXTlinkFilename = 301, + RTFNeXTlinkMarkername = 302, + RTFpaperWidth = 303, + RTFpaperHeight = 304, + RTFmarginLeft = 305, + RTFmarginRight = 306, + RTFmarginTop = 307, + RTFmarginButtom = 308, + RTFfirstLineIndent = 309, + RTFleftIndent = 310, + RTFrightIndent = 311, + RTFalignCenter = 312, + RTFalignJustified = 313, + RTFalignLeft = 314, + RTFalignRight = 315, + RTFlineSpace = 316, + RTFspaceAbove = 317, + RTFstyle = 318, + RTFbold = 319, + RTFitalic = 320, + RTFunderline = 321, + RTFunderlineStop = 322, + RTFunichar = 323, + RTFsubscript = 324, + RTFsuperscript = 325, + RTFtabstop = 326, + RTFfcharset = 327, + RTFfprq = 328, + RTFcpg = 329, + RTFOtherStatement = 330, + RTFfontListStart = 331, + RTFfamilyNil = 332, + RTFfamilyRoman = 333, + RTFfamilySwiss = 334, + RTFfamilyModern = 335, + RTFfamilyScript = 336, + RTFfamilyDecor = 337, + RTFfamilyTech = 338 }; #endif /* Tokens. */ @@ -156,42 +162,48 @@ #define RTFNeXTGraphic 294 #define RTFNeXTGraphicWidth 295 #define RTFNeXTGraphicHeight 296 -#define RTFpaperWidth 297 -#define RTFpaperHeight 298 -#define RTFmarginLeft 299 -#define RTFmarginRight 300 -#define RTFmarginTop 301 -#define RTFmarginButtom 302 -#define RTFfirstLineIndent 303 -#define RTFleftIndent 304 -#define RTFrightIndent 305 -#define RTFalignCenter 306 -#define RTFalignJustified 307 -#define RTFalignLeft 308 -#define RTFalignRight 309 -#define RTFlineSpace 310 -#define RTFspaceAbove 311 -#define RTFstyle 312 -#define RTFbold 313 -#define RTFitalic 314 -#define RTFunderline 315 -#define RTFunderlineStop 316 -#define RTFunichar 317 -#define RTFsubscript 318 -#define RTFsuperscript 319 -#define RTFtabstop 320 -#define RTFfcharset 321 -#define RTFfprq 322 -#define RTFcpg 323 -#define RTFOtherStatement 324 -#define RTFfontListStart 325 -#define RTFfamilyNil 326 -#define RTFfamilyRoman 327 -#define RTFfamilySwiss 328 -#define RTFfamilyModern 329 -#define RTFfamilyScript 330 -#define RTFfamilyDecor 331 -#define RTFfamilyTech 332 +#define RTFNeXTHelpLink 297 +#define RTFNeXTHelpMarker 298 +#define RTFNeXTfilename 299 +#define RTFNeXTmarkername 300 +#define RTFNeXTlinkFilename 301 +#define RTFNeXTlinkMarkername 302 +#define RTFpaperWidth 303 +#define RTFpaperHeight 304 +#define RTFmarginLeft 305 +#define RTFmarginRight 306 +#define RTFmarginTop 307 +#define RTFmarginButtom 308 +#define RTFfirstLineIndent 309 +#define RTFleftIndent 310 +#define RTFrightIndent 311 +#define RTFalignCenter 312 +#define RTFalignJustified 313 +#define RTFalignLeft 314 +#define RTFalignRight 315 +#define RTFlineSpace 316 +#define RTFspaceAbove 317 +#define RTFstyle 318 +#define RTFbold 319 +#define RTFitalic 320 +#define RTFunderline 321 +#define RTFunderlineStop 322 +#define RTFunichar 323 +#define RTFsubscript 324 +#define RTFsuperscript 325 +#define RTFtabstop 326 +#define RTFfcharset 327 +#define RTFfprq 328 +#define RTFcpg 329 +#define RTFOtherStatement 330 +#define RTFfontListStart 331 +#define RTFfamilyNil 332 +#define RTFfamilyRoman 333 +#define RTFfamilySwiss 334 +#define RTFfamilyModern 335 +#define RTFfamilyScript 336 +#define RTFfamilyDecor 337 +#define RTFfamilyTech 338 @@ -205,7 +217,7 @@ typedef union YYSTYPE RTFcmd cmd; } /* Line 1529 of yacc.c. */ -#line 209 "rtfGrammar.tab.h" +#line 221 "rtfGrammar.tab.h" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 diff --git a/TextConverters/RTF/rtfGrammar.y b/TextConverters/RTF/rtfGrammar.y index 99a39df5c..01f70623f 100644 --- a/TextConverters/RTF/rtfGrammar.y +++ b/TextConverters/RTF/rtfGrammar.y @@ -399,7 +399,10 @@ rtfNeXTGraphic: '{' RTFNeXTGraphic RTFtext RTFNeXTGraphicWidth RTFNeXTGraphicHei other commands. */ -rtfNeXTHelpLink: '{' RTFNeXTHelpLink RTFNeXTmarkername RTFtext RTFNeXTlinkFilename RTFtext RTFNeXTlinkMarkername RTFtext '}' { GSRTFopenBlock(CTXT, YES); } rtfIngredients { GSRTFcloseBlock(CTXT, YES); }; +rtfNeXTHelpLink: '{' RTFNeXTHelpLink RTFNeXTmarkername RTFtext RTFNeXTlinkFilename RTFtext RTFNeXTlinkMarkername RTFtext '}' { GSRTFopenBlock(CTXT, YES); } rtfIngredients { GSRTFcloseBlock(CTXT, YES); } + { + GSRTFNeXTHelpLink (CTXT, $2.parameter, $4, $6, $8); + }; /* NeXTHelpMarker @@ -410,7 +413,10 @@ rtfNeXTHelpLink: '{' RTFNeXTHelpLink RTFNeXTmarkername RTFtext RTFNeXTlinkFilena other commands. */ -rtfNeXTHelpMarker: '{' RTFNeXTHelpMarker RTFNeXTmarkername RTFtext '}' { GSRTFopenBlock(CTXT, YES); } rtfIngredients { GSRTFcloseBlock(CTXT, YES); }; +rtfNeXTHelpMarker: '{' RTFNeXTHelpMarker RTFNeXTmarkername RTFtext '}' { GSRTFopenBlock(CTXT, YES); } rtfIngredients { GSRTFcloseBlock(CTXT, YES); } + { + GSRTFNeXTHelpMarker (CTXT, $2.parameter, $4); + }; /* Font description