From e2b36ad9a4a23e790349b3615c375d3422c6bb95 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Sun, 5 Oct 2014 23:36:15 +0200 Subject: [PATCH] Merge the CSS "expression" and "path" parser rules --- lib/oga/css/parser.y | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/oga/css/parser.y b/lib/oga/css/parser.y index 44d1008..f42dc59 100644 --- a/lib/oga/css/parser.y +++ b/lib/oga/css/parser.y @@ -7,16 +7,10 @@ options no_result_var rule css - : expression { val[0] } + : path { val[0] } | /* none */ { nil } ; - expression - : path - | node_test - | axis - ; - path_member : node_test | axis @@ -29,6 +23,7 @@ rule path : path_members { s(:path, *val[0]) } + | path_member ; node_test