What does HackerNews think of grammars-v4?

Grammars written for ANTLR v4; expectation that the grammars are free of actions.

Language: ANTLR

#125 in Hacktoberfest
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 like freedesktop shortcuts, llvm ir or verilog.

> Which brings me to the other approach: steering the LLM's output __as it is generating tokens__

A relevant PR:

https://github.com/ggerganov/llama.cpp/pull/1773

The plan is to support arbitrary grammar files to constrain token generation, similar to the grammar files here:

https://github.com/antlr/grammars-v4

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 (https://github.com/marketplace/difflens). DiffLens uses the typescript compiler itself to parse TS and JS.

I've also used Roslyn to parse C# (and F#). I wonder if the ruby compiler itself exposes a 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 and container images / orchestration tools.

Shell scripts don't need to follow functional programming or OOP. They need to be container-oriented / VM-oriented / image-oriented with a conformation to YAML notation as this is already the adopted norm for containers and IaC.

I’ve been playing with ANTLR[1] and pretty happy with the generated parser. You can find sql grammar on GitHub[2]

[1] https://www.antlr.org/

[2] https://github.com/antlr/grammars-v4

I agree, I wish every vendor would publish an official open source parser for their SQL dialects, or that the community would create a repository of standard parsers or grammars for them all.

We are almost there with ANTLR grammars... https://github.com/antlr/grammars-v4