dvreeze / xpathparser   0.8.0

Apache License 2.0 GitHub

XPath parser, for static analysis of XPath

Scala versions: 3.x 2.13 2.12 2.11
Scala.js versions: 1.x 0.6

XPath Parser

XPath parser, for static analysis of XPath. A use case could be static analysis of XPath expressions in XBRL formula or table linkbases. For example, used custom functions could be found, or syntax errors in XPath could be found at an early stage.

At this point only the AST that results from parsing can be queried. This AST has no knowledge other than the structure of the parsed XPath expression.

This XPath parser makes use of the excellent cats-parse library for the generation of the XPath parser.

Older versions of this project (before 0.7.0) used the also excellent FastParse library. Support for Scala 3 was the reason to move to cats-parse. Increased type safety and opt-in backtracking were other reasons for this move.

XPath 3.1 is the supported XPath version.