Hacker GitHub

← All repos

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

Mentions per year 23 mentions · busiest year 2022 (4)
20082026
  1. ▲ 2
    Grammars Written for Antlr v4
    story by peter_d_sherman · 2025-11-11 · 0 comments
  2. …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...
  3. 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…
  4. …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
  5. 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
  6. …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
  7. …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
  8. 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…
  9. 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
  10. …support arbitrary grammar files to constrain token generation, similar to the grammar files here: https://github.com/antlr/grammars-v4
  11. …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…
  12. 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
  13. 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
  14. 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
  15. …with the generated parser. You can find sql grammar on GitHub[2] [1] https://www.antlr.org/ [2] https://github.com/antlr/grammars-v4
  16. …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]
  17. …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
  18. …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…
  19. …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
  20. …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
  21. …repository of standard parsers or grammars for them all. We are almost there with ANTLR grammars... https://github.com/antlr/grammars-v4
  22. …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
  23. …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]