antlr/grammars-v4
View on GitHub ↗ ★ 11,056 ANTLR
Grammars written for ANTLR v4; expectation that the grammars are free of actions.
23 mentions on Hacker News by 22 people: 1 story, 22 comments · first 2017-04-24 · latest 2025-11-11
20082026
-
…would assume that this should also work with datalog [2]. [1] https://arxiv.org/abs/2505.20047 [2] https://github.com/antlr/grammars-v4/blob/master/datalog/dat...
comment by barthelomew · 2025-10-04 · in ProofOfThought: LLM-based reasoning using Z3 theorem proving -
I found some benchmarks in the ANTLR project: https://github.com/antlr/grammars-v4/blob/master/java/java/B... Project Parsing/Lexing Ratio ---------------------------------------- jdk8 5.34x Spring Framework 3.81x Elasticsearch 5.76x…
comment by pdubroy · 2025-02-12 · in Ohm: A user-friendly parsing toolkit for JavaScript and TypeScript -
…grammar[1] as a starting point. See here[2] for more details. 0 - https://www.antlr.org/ 1 - https://github.com/antlr/grammars-v4/blob/master/javascript/... 2 - https://github.com/antlr/grammars-v4/wiki
comment by AdieuToLogic · 2025-01-04 · in Swc4j: SWC for Java -
Perhaps this ANTLR v4 sqlite grammar? [1] -- 1: https://github.com/antlr/grammars-v4/tree/master/sql/sqlite
comment by emmanueloga_ · 2024-11-08 · in Rust for tokenising and parsing -
…the browser back button and deeplink bookmarks with URI fragments that "don't break the web": https://github.com/antlr/grammars-v4/blob/master/hypertalk/H... TodoMVC or HyperTalk? False dilemma.
comment by westurner · 2024-06-26 · in HyperCard Simulator -
…elsewhere). It does require knowing ANTLR's meta syntax, but it's not that far from (E)BNF. [0] https://github.com/antlr/grammars-v4/tree/master/vb6
comment by signaru · 2023-12-10 · in Visual Basic for Applications Language Specification [pdf] -
Where is the SQLite test suite, please? I'd be very interested. There are already SQL grammars, check https://github.com/antlr/grammars-v4 specifically in here I think https://github.com/antlr/grammars-v4/tree/master/sql I contributed to…
comment by _a_a_a_ · 2023-12-09 · in Postgres Language Server: Implementing the Parser -
This grammar "library" was cited as an example of what the format could look like:. https://github.com/antlr/grammars-v4 There is everything from assembly and C++ to glsl and scripting languages, arithmetic, games, and other weird formats…
comment by brucethemoose2 · 2023-07-21 · in Llama: Add grammar-based sampling -
…support arbitrary grammar files to constrain token generation, similar to the grammar files here: https://github.com/antlr/grammars-v4
comment by brucethemoose2 · 2023-07-17 · in Show HN: Structured output from LLMs without reprompting -
…are a bit overwhelming. Fortunately, ANTLR project has ~dozen FOSS grammars to learn from. https://github.com/antlr/grammars-v4/tree/master/sql They mostly mechanically translate BNFs to LL(k) with some ALL( Star ). Meaning few take…
comment by specialist · 2022-12-19 · in SQLite internals: How the most-used database works -
FWIW, here's a repo of ANTLR grammars: https://github.com/antlr/grammars-v4 Many of them are incomplete, but it gives a good idea of how the grammar looks for ANTLR. I used the ANTLR grammar for parsing CSS in DiffLens (…
comment by difflens · 2022-06-07 · in I Built a Ruby Parser -
Why use types? Why not introduce built in parsers to provide validations instead? (i.e. https://github.com/antlr/grammars-v4 ) I think hush is going in the wrong direction. The majority of shell automation is associated with running IaC…
comment by hussainbilal · 2022-04-26 · in Hush, a modern shell scripting language -
I believe antlr has grammars for other sql syntaxes (sqlite, tsql, etc): https://github.com/antlr/grammars-v4/tree/master/sql
comment by cm2187 · 2022-04-22 · in Open Source SQL Parsers -
…with the generated parser. You can find sql grammar on GitHub[2] [1] https://www.antlr.org/ [2] https://github.com/antlr/grammars-v4
comment by refneb · 2021-08-19 · in Let's write a compiler, part 5: A code generator -
…popular SQL dialects [2] [1] https://github.com/antlr/antlr4/blob/master/doc/javascript-t... [2] https://github.com/antlr/grammars-v4/tree/master/sql [2]
comment by lf-non · 2020-02-09 · in Ask HN: Is there a good JavaScript SQL parser for the front end? -
…a misapplication of the "Simple made Easy" presentation, I think it hits the nail on the head. [1] https://github.com/antlr/grammars-v4/blob/master/c/C.g4 [2] https://github.com/antlr/grammars-v4/blob/master/clojure/Clo... [3]…
comment by ISO-morphism · 2019-11-11 · in Keep your source code SIMPLE -
…no I mean tool like antlr or javacc which build an in memory syntax tree you can query or observe. https://github.com/antlr/grammars-v4/blob/72810b7c59bb481750... this is different than querying the document as XML, since an empty node is…
comment by LoSboccacc · 2019-09-09 · in Is there a regular expression to detect a valid regular expression? -
…whitespace and comments, but it could have just as easily captured them and parsed them further. https://github.com/antlr/grammars-v4/blob/master/c/C.g4
comment by jagger27 · 2019-05-02 · in Creating LFortran, an interactive Fortran compiler built on top of LLVM -
…also short, simple and easy. Spec: https://github.com/edn-format/edn/blob/master/README.md Grammar: https://github.com/antlr/grammars-v4/blob/master/clojure/Clo... (EDN is a subset of Clojure). Sorry if this is too fanboy, I just need to…
comment by harlanji · 2018-05-08 · in Publishing JSON-LD for Developers -
…repository of standard parsers or grammars for them all. We are almost there with ANTLR grammars... https://github.com/antlr/grammars-v4
comment by sixdimensional · 2018-03-01 · in Queryparser, an Open Source Tool for Parsing and Analyzing SQL -
…to embed semantics inside an Antlr4 grammar. For example see the Antlr4 EcmaScript grammar sample: https://github.com/antlr/grammars-v4/tree/master/ecmascript which uses embedded code to solve the RegExp vs division operator ambiguity.…
comment by bd82 · 2017-10-17 · in Ohm: Parsing Made Easy -
…classBodyDeclaration -> memberDeclaration -> classDeclaration. (That's using this grammar for java: https://github.com/antlr/grammars-v4/blob/master/java/Java.g... )
comment by westoncb · 2017-04-24 · in Tree Oriented Programming [pdf]