Revision: 2868
          http://skim-app.svn.sourceforge.net/skim-app/?rev=2868&view=rev
Author:   hofman
Date:     2007-09-09 14:04:19 -0700 (Sun, 09 Sep 2007)

Log Message:
-----------
Ignore comments inside FDF dictionaries and arrays.

Modified Paths:
--------------
    trunk/SKFDFParser.m

Modified: trunk/SKFDFParser.m
===================================================================
--- trunk/SKFDFParser.m 2007-09-09 20:58:00 UTC (rev 2867)
+++ trunk/SKFDFParser.m 2007-09-09 21:04:19 UTC (rev 2868)
@@ -129,7 +129,7 @@
         while ([scanner scanFDFComment:NULL]);
         if (success = [scanner scanInt:&genNumber]) {
             while ([scanner scanFDFComment:NULL]);
-            if ([scanner scanString:@"obj" intoString:NULL]) {
+            if (success = [scanner scanString:@"obj" intoString:NULL]) {
                 if (success = [scanner scanFDFObject:&object]) {
                     if ([object isKindOfClass:[NSDictionary class]]) {
                         while ([scanner scanFDFComment:NULL]);
@@ -516,8 +516,7 @@
     BOOL success = [self scanString:@"[" intoString:NULL];
     
     while (success) {
-        [self scanCharactersFromSet:[NSCharacterSet 
whitespaceAndNewlineCharacterSet] intoString:NULL];
-        
+        while ([self scanFDFComment:NULL]);
         if ([self peekCharacter:&ch] == NO) {
             success = NO;
             break;
@@ -544,8 +543,8 @@
     BOOL success = [self scanString:@"<<" intoString:NULL];
     
     while (success) {
+        while ([self scanFDFComment:NULL]);
         if ([self scanFDFName:&key]) {
-            [self scanCharactersFromSet:[NSCharacterSet 
whitespaceAndNewlineCharacterSet] intoString:NULL];
             if ((success = [self scanFDFObject:&object]) && object)
                 [tmpDict setObject:object forKey:key];
         } else if ([self scanString:@">>" intoString:NULL]) {
@@ -553,7 +552,6 @@
         } else {
             success = NO;
         }
-        [self scanCharactersFromSet:[NSCharacterSet 
whitespaceAndNewlineCharacterSet] intoString:NULL];
     }
     
     if (success && dictionary)
@@ -668,8 +666,6 @@
         hexChar = 0;
         if ([hexCharSet characterIsMember:ch]) {
             hexChar += hexCharacterNumber(ch);
-        } else if ([[NSCharacterSet whitespaceAndNewlineCharacterSet] 
characterIsMember:ch]) {
-            // ignore
         } else if (ch == '>') {
             done = YES;
         } else {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to