NAME
std/path/z/parser - Pure Zuzu parser for ZPath expressions.
IMPLEMENTATION SUPPORT
This module is supported by all implementations of ZuzuScript.
DESCRIPTION
This module provides the pure-Zuzu parser used by ZPath.
EXPORTS
Classes
Parser({ lexer_class?, allowed_operators })Constructs a ZPath parser. Returns:
Parser.parser.parse_top_level_terms(src)Parameters:
srcis a ZPath expression string. Returns:Array. Parses comma-separated top-level expression terms.parser.parse_expression(lx)Parameters:
lxis aLexer. Returns:Dict. Parses an expression.parser.parse_ternary(lx)Parameters:
lxis aLexer. Returns:Dict. Parses ternary and Elvis expressions.parser.parse_subexpression(lx, min_prec)Parameters:
lxis aLexerandmin_precis a precedence floor. Returns:Dict. Parses a precedence-climbing subexpression.parser.parse_primary(lx)Parameters:
lxis aLexer. Returns:Dict. Parses a primary expression.
COPYRIGHT AND LICENCE
std/path/z/parser is copyright Toby Inkster.
It is free software; you may redistribute it and/or modify it under the terms of either the Artistic License 1.0 or the GNU General Public License version 2.