hn.today

Overpass QL EBNF Grammar

github.com4 points0 comments
Screenshot of Overpass QL EBNF Grammar

This project provides a formal grammar for Overpass Query Language (Overpass QL), written in W3C EBNF - the notation also used in the XML 1.0 specification. It is intended to make the language’s syntax easier to work with: developers can consult it when building tools that generate queries, use it to validate queries before submitting them to an API, or explore the language’s structure. The grammar can be pasted into a railroad-diagram generator for interactive visual diagrams, or used with the REx Parser Generator to create a parser. Adapting it to other EBNF-style parser tools should also be feasible.

The grammar covers features described in the Overpass QL reference, language guide, and API blog, but those documents can be inconsistent. To improve reliability, the rules were checked against the Overpass API implementation and tested on a live instance running version 0.7.62.11. Features supported by the implementation but not documented are deliberately left out, so the grammar represents the documented language rather than every behavior the software may accept. Users are invited to report errors or omissions. The project also cautions against using the grammar to drive high-volume automated requests to public Overpass servers; workloads requiring substantial traffic should instead use a locally operated instance.

Read on github.com0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

I checked Clojure's core with Lean and found unreported bugs

I checked Clojure's core with Lean and found unreported bugs

Lean formal checks and differential testing of Clojure 1.12.7 uncovered 17 previously unreported bugs, including issues in `vector-of`, HAMT hash collisions, and Java functional-interface calls without type hints. Three million HAMT operations and vector boundary tests found no errors in the core tree structures; the bugs appeared in surrounding code and interactions such as equality and hashing. (s.conao3.com)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.