Return-Path: Delivered-To: apmail-xml-batik-dev-archive@xml.apache.org Received: (qmail 9212 invoked by uid 500); 2 Nov 2001 15:41:30 -0000 Mailing-List: contact batik-dev-help@xml.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: batik-dev@xml.apache.org Delivered-To: mailing list batik-dev@xml.apache.org Received: (qmail 9201 invoked by uid 500); 2 Nov 2001 15:41:30 -0000 Delivered-To: apmail-xml-batik-cvs@apache.org Date: 2 Nov 2001 15:31:11 -0000 Message-ID: <20011102153111.51436.qmail@icarus.apache.org> From: hillion@apache.org To: xml-batik-cvs@apache.org Subject: cvs commit: xml-batik/sources/org/apache/batik/css/parser Parser.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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 Stephane Hillion - * @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