diff --git a/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj b/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
index bf50fd0..6049f80 100644
--- a/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
+++ b/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
@@ -154,7 +154,6 @@ TOKEN:
     < UFLOAT: ( ["0"-"9"] )+ ( "." ( ["0"-"9"] )+ )? >
 |   < #H: ["0"-"9","a"-"f","A"-"F"] >
 |   < HEXCOLOR: "#" ( <H><H><H><H><H><H><H><H> | <H><H><H><H><H><H> | <H><H><H> ) >
-|   < S: ( " " | "\t" | "\n" | "\r" | "\f" )+ >
 |   < STAR: "*" >
 |   < SLASH: "/" >
 |   < LSQUARE: "[" >
@@ -180,23 +179,22 @@ TOKEN:
 |   < FULLSTOP: "." >
 |   < ELEMENT_OF: "∈" >
 |   < CROSSING: "⧉" >
+}
+
+<DEFAULT>
+SKIP:
+{
+    < S: ( " " | "\t" | "\n" | "\r" | "\f" )+ >
 |   < COMMENT_START: "/*" > : COMMENT
-|   < UNEXPECTED_CHAR : ~[] > // avoid TokenMgrErrors because they are hard to recover from
 }
 
 <COMMENT>
-TOKEN:
+SKIP:
 {
     < COMMENT_END: "*/" > : DEFAULT
+|   < ~[] >
 }
 
-<COMMENT>
-SKIP:
-{
-    < ~[] >
-}
-
-
 /*************
  *
  * Preprocessor parser definitions:
@@ -428,26 +426,6 @@ String regex() :
 }
 
 /**
- * white-space
- */
-void s() :
-{
-}
-{
-    ( <S> )?
-}
-
-/**
- * mix of white-space and comments
- */
-void w() :
-{
-}
-{
-    ( <S> | <COMMENT_START> <COMMENT_END> )*
-}
-
-/**
  * comma delimited list of floats (at least 2, all &gt;= 0)
  */
 List<Float> float_array() :
@@ -458,7 +436,7 @@ List<Float> float_array() :
 {
     f=ufloat() { fs.add(f); }
     (
-        <COMMA> s()
+        <COMMA> 
         f=ufloat() { fs.add(f); }
     )+
     {
@@ -474,16 +452,15 @@ void sheet(MapCSSStyleSource sheet):
 }
 {
     { this.sheet = sheet; }
-    w()
     (
         try {
-            rule() w()
+            rule() 
         } catch (MapCSSException mex) {
             error_skipto(RBRACE, mex);
-            w();
+            ;
         } catch (ParseException ex) {
             error_skipto(RBRACE, null);
-            w();
+            ;
         }
     )*
     <EOF>
@@ -498,7 +475,7 @@ void rule():
 {
     sel=child_selector() { selectors.add(sel); }
     (
-        <COMMA> w()
+        <COMMA> 
         sel=child_selector() { selectors.add(sel); }
     )*
     decl=declaration()
@@ -519,7 +496,7 @@ Selector child_selector() :
     Selector selRight = null;
 }
 {
-    selLeft=selector() w()
+    selLeft=selector() 
     (
         (
             (
@@ -536,12 +513,11 @@ Selector child_selector() :
             |
                 <CROSSING> { type = Selector.ChildOrParentSelectorType.CROSSING; }
             )
-            w()
         |
             { /* <GREATER> is optional for child selector */ type = Selector.ChildOrParentSelectorType.CHILD; }
         )
         { selLink = new LinkSelector(conditions); }
-        selRight=selector() w()
+        selRight=selector() 
     )?
     { return selRight != null ? new ChildOrParentSelector(selLeft, selLink, selRight, type) : selLeft; }
 }
@@ -586,13 +562,13 @@ Condition condition(Context context) :
     Expression e;
 }
 {
-    <LSQUARE> s()
+    <LSQUARE> 
     (
-        LOOKAHEAD( simple_key_condition(context) s() <RSQUARE> )
-            c=simple_key_condition(context) s() <RSQUARE> { return c; }
+        LOOKAHEAD( simple_key_condition(context)  <RSQUARE> )
+            c=simple_key_condition(context)  <RSQUARE> { return c; }
         |
-        LOOKAHEAD( simple_key_value_condition(context) s() <RSQUARE> )
-            c=simple_key_value_condition(context) s() <RSQUARE> { return c; }
+        LOOKAHEAD( simple_key_value_condition(context)  <RSQUARE> )
+            c=simple_key_value_condition(context)  <RSQUARE> { return c; }
         |
             e=expression() <RSQUARE> { return Condition.createExpressionCondition(e, context); }
     )
@@ -637,7 +613,7 @@ Condition simple_key_value_condition(Context context) :
     boolean considerValAsKey = false;
 }
 {
-    key=tag_key() s()
+    key=tag_key() 
     (
         LOOKAHEAD(3)
             (
@@ -645,7 +621,6 @@ Condition simple_key_value_condition(Context context) :
                 |
                     <EXCLAMATION> <TILDE> { op=Condition.Op.NREGEX; }
             )
-            s()
             ( <STAR> { considerValAsKey=true; } )?
             val=regex()
         |
@@ -662,7 +637,6 @@ Condition simple_key_value_condition(Context context) :
                 |
                     <STAR> <EQUAL> { op=Condition.Op.CONTAINS; }
             )
-            s()
             ( <STAR> { considerValAsKey=true; } )?
             ( 
                 LOOKAHEAD(2) 
@@ -682,7 +656,6 @@ Condition simple_key_value_condition(Context context) :
                 |
                     <LESS> { op=Condition.Op.LESS; }
             )
-            s()
             f=float_() { val=Float.toString(f); }
     )
     { return Condition.createKeyValueCondition(key, val, op, context, considerValAsKey); }
@@ -724,31 +697,31 @@ Declaration declaration() :
     Object val = null;
 }
 {
-    <LBRACE> w()
+    <LBRACE> 
     (
         (
-            <SET> w()
+            <SET> 
             (<FULLSTOP>)? // specification allows "set .class" to set "class". we also support "set class"
-            key=<IDENT> w()
+            key=<IDENT> 
             ( <EQUAL> val=expression() )?
             { ins.add(new Instruction.AssignmentInstruction(key.image, val == null ? true : val, true)); }
-            ( <RBRACE> { return new Declaration(ins, declarationCounter++); } | <SEMICOLON> w() )
+            ( <RBRACE> { return new Declaration(ins, declarationCounter++); } | <SEMICOLON> )
         )
     |
-        key=<IDENT> w() <COLON> w()
+        key=<IDENT> <COLON> 
         (
-            LOOKAHEAD( float_array() w() ( <SEMICOLON> | <RBRACE> ) )
+            LOOKAHEAD( float_array()  ( <SEMICOLON> | <RBRACE> ) )
                 val=float_array()
                 { ins.add(new Instruction.AssignmentInstruction(key.image, val, false)); }
-                w()
-                ( <RBRACE> { return new Declaration(ins, declarationCounter++); } | <SEMICOLON> w() )
+                
+                ( <RBRACE> { return new Declaration(ins, declarationCounter++); } | <SEMICOLON> )
             |
             LOOKAHEAD( expression() ( <SEMICOLON> | <RBRACE> ) )
                 val=expression()
                 { ins.add(new Instruction.AssignmentInstruction(key.image, val, false)); }
-                ( <RBRACE> { return new Declaration(ins, declarationCounter++); } | <SEMICOLON> w() )
+                ( <RBRACE> { return new Declaration(ins, declarationCounter++); } | <SEMICOLON> )
             |
-                val=readRaw() w() { ins.add(new Instruction.AssignmentInstruction(key.image, val, false)); }
+                val=readRaw()  { ins.add(new Instruction.AssignmentInstruction(key.image, val, false)); }
         )
     )*
     <RBRACE>
@@ -763,37 +736,37 @@ Expression expression():
 }
 {
     (
-        <EXCLAMATION> { op = "not"; } w() e=primary() { args.add(e); } w()
+        <EXCLAMATION> { op = "not"; } e=primary() { args.add(e); } 
     |
-        <MINUS> { op = "minus"; } w() e=primary() { args.add(e); } w()
+        <MINUS> { op = "minus"; } e=primary() { args.add(e); } 
     |
 
         (
-            e=primary() { args.add(e); } w()
+            e=primary() { args.add(e); } 
             (
-                    ( <PLUS> { op = "plus"; } w() e=primary() { args.add(e); } w() )+
+                    ( <PLUS> { op = "plus"; } e=primary() { args.add(e); } )+
                 |
-                    ( <STAR> { op = "times"; } w() e=primary() { args.add(e); } w() )+
+                    ( <STAR> { op = "times"; } e=primary() { args.add(e); } )+
                 |
-                    ( <MINUS> { op = "minus"; } w() e=primary() { args.add(e); } w() )+
+                    ( <MINUS> { op = "minus"; } e=primary() { args.add(e); } )+
                 |
-                    ( <SLASH> { op = "divided_by"; } w() e=primary() { args.add(e); } w() )+
+                    ( <SLASH> { op = "divided_by"; } e=primary() { args.add(e); } )+
                 |
-                    <GREATER_EQUAL> { op = "greater_equal"; } w() e=primary() { args.add(e); } w()
+                    <GREATER_EQUAL> { op = "greater_equal"; } e=primary() { args.add(e); } 
                 |
-                    <LESS_EQUAL> { op = "less_equal"; } w() e=primary() { args.add(e); } w()
+                    <LESS_EQUAL> { op = "less_equal"; } e=primary() { args.add(e); } 
                 |
-                    <GREATER> { op = "greater"; } w() e=primary() { args.add(e); } w()
+                    <GREATER> { op = "greater"; } e=primary() { args.add(e); } 
                 |
-                    <EQUAL> ( <EQUAL> )? { op = "equal"; } w() e=primary() { args.add(e); } w()
+                    <EQUAL> ( <EQUAL> )? { op = "equal"; } e=primary() { args.add(e); } 
                 |
-                    <LESS> { op = "less"; } w() e=primary() { args.add(e); } w()
+                    <LESS> { op = "less"; } e=primary() { args.add(e); } 
                 |
-                    <AMPERSAND> <AMPERSAND> { op = "and"; } w() e=primary() { args.add(e); } w()
+                    <AMPERSAND> <AMPERSAND> { op = "and"; } e=primary() { args.add(e); } 
                 |
-                    <PIPE> <PIPE> { op = "or"; } w() e=primary() { args.add(e); } w()
+                    <PIPE> <PIPE> { op = "or"; } e=primary() { args.add(e); } 
                 |
-                    <QUESTION> { op = "cond"; } w() e=primary() { args.add(e); } w() <COLON> w() e=primary() { args.add(e); } w()
+                    <QUESTION> { op = "cond"; } e=primary() { args.add(e); } <COLON> e=primary() { args.add(e); } 
             )?
         )
     )
@@ -816,7 +789,7 @@ Expression primary() :
     |
         lit=literal() { return new LiteralExpression(lit); }
     |
-        <LPAR> w() nested=expression() <RPAR> { return nested; }
+        <LPAR> nested=expression() <RPAR> { return nested; }
 }
 
 Expression function() :
@@ -826,11 +799,11 @@ Expression function() :
     List<Expression> args = new ArrayList<Expression>();
 }
 {
-    name=ident() w()
-    <LPAR> w()
+    name=ident() 
+    <LPAR> 
     (
         arg=expression() { args.add(arg); }
-        ( <COMMA> w() arg=expression() { args.add(arg); } )*
+        ( <COMMA> arg=expression() { args.add(arg); } )*
     )?
     <RPAR>
     { return ExpressionFactory.createFunctionExpression(name, args); }
@@ -896,7 +869,7 @@ String readRaw() {
     StringBuilder s = new StringBuilder();
     while (true) {
         t = getNextToken();
-        if ((t.kind == S || t.kind == STRING || t.kind == UNEXPECTED_CHAR) &&
+        if ((t.kind == S || t.kind == STRING) &&
                 t.image.contains("\n")) {
             ParseException e = new ParseException(String.format("Warning: end of line while reading an unquoted string at line %s column %s.", t.beginLine, t.beginColumn));
             Main.error(e);
