Skip to content

Instantly share code, notes, and snippets.

View patrickgalbraith's full-sized avatar
🏠
Working from home

Patrick Galbraith patrickgalbraith

🏠
Working from home
View GitHub Profile
@patrickgalbraith
patrickgalbraith / jsonpath.grammar
Last active May 31, 2024 00:17
JsonPath Lezer Grammar
//
// RFC 9535 JSONPath Grammar for Lezer
//
// Parses all selectors defined in https://github.com/jsonpath-standard/jsonpath-compliance-test-suite
// Note however it is a bit looser than the grammar defined in the standard when it comes
// to allowed escape characters and certain nested path segments.
//
@top Query { JsonPathQuery }