grammars-v4 README

The project's README from github.com/antlr/grammars-v4. As one markdown file: README.md.

Last PR merge build: CI Weekly .jar build: Weekly JAR Weekly dev build: Weekly Dev

Grammars-v4

This repository is a collection of formal grammars written for ANTLR v4.

The root directory name is the all-lowercase name of the language or file format parsed by the grammar. For example, java, cpp, csharp, c, etc.

Performance

Grammar performance table (sortable by column header).

FAQ

Please refer to the grammars-v4 Wiki

Code of Conduct

Please refer to House Rules

grammars-v4 (antlr/grammars-v4)

Searching Database…

What is this?It is a large collection of formal grammars written for ANTLR v4, covering programming languages and file formats like Java, C++, C#, JSON and many others.
Is this a parser library or a collection of grammar files?It is a collection of grammar definition files (.g4), one directory per language or format, meant to be fed into the ANTLR v4 tool to generate parsers in your target language.
How do I use a grammar from this repo?Pick the directory for your language (e.g. java, cpp, csharp), then run the ANTLR v4 tool against its .g4 file to generate a lexer/parser in your target language.
Do I need the ANTLR v4 tool itself to use these grammars?Yes, these are raw grammar sources meant to be processed with the ANTLR v4 generator, which isn't included in this repo.
Do these grammars include embedded code actions for my target language?No, the project explicitly expects grammars to be free of actions, keeping them target-language agnostic rather than tied to a specific runtime.
How is performance tracked across grammars?The repo maintains a sortable grammar performance table comparing parsing speed/metrics across the included grammars.
Are there automated builds for these grammars?Yes, there are CI workflows for a main build, a weekly dev build, and a weekly jar build.
Creator
antlr
Size
70.8 MB
Stars
11.1K
Updated
CommitOct 09
Age
14y
Commits · 90 Days