xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hill...@apache.org
Subject cvs commit: xml-batik/sources/org/apache/batik/css/parser Parser.java
Date Fri, 02 Nov 2001 15:31:11 GMT
hillion     01/11/02 07:31:11

  Modified:    sources/org/apache/batik/css/parser Parser.java
  Log:
  Fixed an error-recovery bug.
  
  Revision  Changes    Path
  1.14      +3 -31     xml-batik/sources/org/apache/batik/css/parser/Parser.java
  
  Index: Parser.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/css/parser/Parser.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Parser.java	2001/10/22 06:45:29	1.13
  +++ Parser.java	2001/11/02 15:31:10	1.14
  @@ -43,7 +43,7 @@
    * This class implements the {@link org.w3c.css.sac.Parser} interface.
    *
    * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  - * @version $Id: Parser.java,v 1.13 2001/10/22 06:45:29 hillion Exp $
  + * @version $Id: Parser.java,v 1.14 2001/11/02 15:31:10 hillion Exp $
    */
   public class Parser
       implements org.w3c.css.sac.Parser,
  @@ -477,21 +477,11 @@
               } else {
                   nextIgnoreSpaces();
           
  -                boolean err = false;
                   try {
                       parseStyleDeclaration(true);
                   } catch (CSSParseException e) {
                       reportError(e);
  -                    err = true;
                   }
  -
  -                if (!err) {
  -                    if (current != LexicalUnits.RIGHT_CURLY_BRACE) {
  -                        reportError("right.curly.brace");
  -                    } else {
  -                        nextIgnoreSpaces();
  -                    }
  -                }
               }
           } finally {
               documentHandler.endFontFace();
  @@ -529,21 +519,11 @@
               } else {
                   nextIgnoreSpaces();
           
  -                boolean err = false;
                   try {
                       parseStyleDeclaration(true);
                   } catch (CSSParseException e) {
                       reportError(e);
  -                    err = true;
                   }
  -
  -                if (!err) {
  -                    if (current != LexicalUnits.RIGHT_CURLY_BRACE) {
  -                        reportError("right.curly.brace");
  -                    } else {
  -                        nextIgnoreSpaces();
  -                    }
  -                }
               }
           } finally {
               documentHandler.endPage(page, ppage);
  @@ -609,20 +589,10 @@
               } else {
                   nextIgnoreSpaces();
           
  -                boolean err = false;
                   try {
                       parseStyleDeclaration(true);
                   } catch (CSSParseException e) {
                       reportError(e);
  -                    err = true;
  -                }
  -
  -                if (!err) {
  -                    if (current != LexicalUnits.RIGHT_CURLY_BRACE) {
  -                        reportError("right.curly.brace");
  -                    } else {
  -                        nextIgnoreSpaces();
  -                    }
                   }
               }
           } finally {
  @@ -860,6 +830,7 @@
                   if (!inSheet) {
                       throw createCSSParseException("eof.expected");
                   }
  +                nextIgnoreSpaces();
                   return;
               case LexicalUnits.SEMI_COLON:
                   nextIgnoreSpaces();
  @@ -1681,6 +1652,7 @@
               case LexicalUnits.SEMI_COLON:
               case LexicalUnits.RIGHT_CURLY_BRACE:
                   if (--cbraces == 0) {
  +                    nextIgnoreSpaces();
                       return;
                   }
               case LexicalUnits.LEFT_CURLY_BRACE:
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org


Mime
View raw message