From 6753d6a26d6b1e38c28b055d7521137f7fb44bb8 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Sun, 16 Nov 2014 23:40:19 +0100 Subject: [PATCH] Slightly better docs for the XPath/CSS parsers. --- lib/oga/css/parser.y | 7 +++++++ lib/oga/xpath/parser.y | 2 ++ 2 files changed, 9 insertions(+) diff --git a/lib/oga/css/parser.y b/lib/oga/css/parser.y index c297dee..1fdd105 100644 --- a/lib/oga/css/parser.y +++ b/lib/oga/css/parser.y @@ -1,6 +1,13 @@ ## # AST parser for CSS expressions. # +# This parser does _not_ build a CSS specific AST, instead it directly produces +# an XPath AST. This removes the need to transform the AST or generate +# corresponding XPath expressions as a String. +# +# Similar to {Oga::XPath::Parser} this parser only takes String instances as +# input. +# class Oga::CSS::Parser token T_IDENT T_PIPE T_LBRACK T_RBRACK T_COLON T_SPACE T_LPAREN T_RPAREN T_MINUS diff --git a/lib/oga/xpath/parser.y b/lib/oga/xpath/parser.y index 0a5a9cc..a2f5542 100644 --- a/lib/oga/xpath/parser.y +++ b/lib/oga/xpath/parser.y @@ -2,6 +2,8 @@ # AST parser for XPath expressions. The AST is built using {AST::Node} # instances. # +# Unlike {Oga::XML::Parser} this parser only takes String instances as input. +# class Oga::XPath::Parser token T_AXIS T_COLON T_COMMA T_FLOAT T_INT T_IDENT T_TYPE_TEST