Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj	(revision 7165)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj	(revision 7166)
@@ -524,18 +524,22 @@
         (
             (
-                <GREATER> { type = Selector.ChildOrParentSelectorType.CHILD; }
+                (
+                    <GREATER> { type = Selector.ChildOrParentSelectorType.CHILD; }
+                |
+                    <LESS> { type = Selector.ChildOrParentSelectorType.PARENT; }
+                |
+                    <PLUS> { type = Selector.ChildOrParentSelectorType.SIBLING; }
+                )
+                ( ( c=condition(Context.LINK) | c=class_or_pseudoclass(Context.LINK) ) { conditions.add(c); } )*
             |
-                <LESS> { type = Selector.ChildOrParentSelectorType.PARENT; }
+                <ELEMENT_OF> { type = Selector.ChildOrParentSelectorType.ELEMENT_OF; }
             |
-                <PLUS> { type = Selector.ChildOrParentSelectorType.SIBLING; }
+                <CROSSING> { type = Selector.ChildOrParentSelectorType.CROSSING; }
             )
-            ( ( c=condition(Context.LINK) | c=class_or_pseudoclass(Context.LINK) ) { conditions.add(c); } )*
-        |
-            <ELEMENT_OF> { type = Selector.ChildOrParentSelectorType.ELEMENT_OF; }
-        |
-            <CROSSING> { type = Selector.ChildOrParentSelectorType.CROSSING; }
+            w()
+        |
+            { /* <GREATER> is optional for child selector */ type = Selector.ChildOrParentSelectorType.CHILD; }
         )
         { selLink = new LinkSelector(conditions); }
-        w()
         selRight=selector() w()
     )?
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 7165)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 7166)
@@ -97,4 +97,8 @@
          */
         public ChildOrParentSelector(Selector a, LinkSelector link, Selector b, ChildOrParentSelectorType type) {
+            CheckParameterUtil.ensureParameterNotNull(a, "a");
+            CheckParameterUtil.ensureParameterNotNull(b, "b");
+            CheckParameterUtil.ensureParameterNotNull(link, "link");
+            CheckParameterUtil.ensureParameterNotNull(type, "type");
             this.left = a;
             this.link = link;
Index: /trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy	(revision 7165)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy	(revision 7166)
@@ -257,4 +257,10 @@
 
     @Test
+    public void testChildSelectorGreaterThanSignIsOptional() throws Exception {
+        assert getParser("relation[type=route] way[highway]").child_selector().toString() ==
+                getParser("relation[type=route] > way[highway]").child_selector().toString()
+    }
+
+    @Test
     public void testSiblingSelector() throws Exception {
         def s1 = (Selector.ChildOrParentSelector) getParser("*[a?][parent_tag(\"highway\")=\"unclassified\"] + *[b?]").child_selector()
