Index: src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
===================================================================
--- src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj	(revision 18367)
+++ src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj	(working copy)
@@ -7,6 +7,8 @@
 PARSER_BEGIN(MapCSSParser)
 package org.openstreetmap.josm.gui.mappaint.mapcss.parsergen;
 
+import static org.openstreetmap.josm.tools.I18n.tr;
+
 import java.io.InputStream;
 import java.io.Reader;
 import java.util.ArrayList;
@@ -14,7 +16,10 @@
 import java.util.Collections;
 import java.util.List;
 
+import javax.swing.JOptionPane;
+
 import org.openstreetmap.josm.data.preferences.NamedColorProperty;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.mappaint.Keyword;
 import org.openstreetmap.josm.gui.mappaint.Range;
 import org.openstreetmap.josm.gui.mappaint.mapcss.Condition;
@@ -36,6 +41,7 @@
 import org.openstreetmap.josm.gui.mappaint.mapcss.Selector.GeneralSelector;
 import org.openstreetmap.josm.gui.mappaint.mapcss.Selector.LinkSelector;
 import org.openstreetmap.josm.gui.mappaint.mapcss.Subpart;
+import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.tools.ColorHelper;
 import org.openstreetmap.josm.tools.JosmRuntimeException;
 import org.openstreetmap.josm.tools.Logging;
@@ -78,7 +84,7 @@
             this.idx = idx;
         }
     }
-    
+
     /**
      * Constructor which initializes the parser with a certain lexical state.
      * @param in input
@@ -1150,7 +1156,7 @@
     if (token.kind == EOF)
         throw new ParseException("Reached end of file while parsing");
         
-    Exception e = null;        
+    Exception e;
     ParseException pe = generateParseException();
 
     if (me != null) {
@@ -1164,6 +1170,18 @@
     
     Logging.error("Skipping to the next rule, because of an error:");
     Logging.error(e);
+
+    GuiHelper.runInEDT(new Runnable() {
+        @Override
+        public void run() {
+            JOptionPane.showMessageDialog(
+                    MainApplication.getMainFrame(),
+                    e.getMessage(),
+                    tr("MapCSS rule parsing error"),
+                    JOptionPane.ERROR_MESSAGE);
+        }
+    });
+
     if (sheet != null) {
         sheet.logError(e);
     }
