Index: sources/org/apache/batik/css/parser/Scanner.java =================================================================== --- sources/org/apache/batik/css/parser/Scanner.java (revision 812594) +++ sources/org/apache/batik/css/parser/Scanner.java (working copy) @@ -380,21 +380,6 @@ throw new ParseException("character", reader.getLine(), reader.getColumn()); - case '-': - nextChar(); - if (current != '-') { - type = LexicalUnits.MINUS; - return; - } - nextChar(); - if (current == '>') { - nextChar(); - type = LexicalUnits.CDC; - return; - } - throw new ParseException("character", - reader.getLine(), - reader.getColumn()); case '|': nextChar(); if (current == '=') { @@ -750,6 +735,28 @@ } type = LexicalUnits.IDENTIFIER; return; + case '-': + nextChar(); + if (current != '-') { + switch (current) { + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + type = LexicalUnits.MINUS; + return; + default: + } + } else { + nextChar(); + if (current == '>') { + nextChar(); + type = LexicalUnits.CDC; + return; + } + throw new ParseException("character", + reader.getLine(), + reader.getColumn()); + } + //$FALL-THROUGH$ default: if (ScannerUtilities.isCSSIdentifierStartCharacter ((char)current)) {