Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression. Learn more →
Grammars-v4 Alternatives
Similar projects and alternatives to grammars-v4
-
ANTLR
ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
-
Presto
The official home of the Presto distributed SQL query engine for big data
-
InfluxDB
Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
-
go-mysql-server
A MySQL-compatible relational database with a storage agnostic query engine. Implemented in pure Go.
-
-
-
-
-
SonarLint
Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
-
murex
Bash-like shell and scripting environment with advanced features designed for safety and productivity (eg smarter DevOps tooling)
-
oil
Oil is a new Unix shell. It's our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!
-
-
-
prql
PRQL is a modern language for transforming data — a simple, powerful, pipelined SQL replacement
-
-
-
Lila
♞ lichess.org: the forever free, adless and open source chess server ♞ [Moved to: https://github.com/lichess-org/lila] (by ornicar)
-
-
JavaParser
Java 1-15 Parser and Abstract Syntax Tree for Java, including preview features to Java 13
-
-
PythonNet
Python for .NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) and provides a powerful application scripting tool for .NET developers.
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
grammars-v4 reviews and mentions
- lang.g4: ANTLR4 Grammar for different programming languages
-
SQLite Internals: How the Most Used Database Works
> ...than it would be to learn the exact syntax and quirks and possibly bugs of someone else's implementation...
Yup. Also, having deep knowledge of the language is required.
SQLite's grammar is neat. Creating a compatible parser would make a fun project. Here's a pretty good example: https://github.com/bkiers/sqlite-parser (Actual ANTLR 4 grammar: https://github.com/bkiers/sqlite-parser/blob/master/src/main... )
Postgres, which tries to be compliant with the latest standards, however...
SQL-2016 is a beast. Not to mention all the dialects.
I'm updating my personal (soon to be FOSS) grammar from ANTLR 3 LL(k) to ANTLR 4 ALL().
I've long had a working knowledge of SQL-92, with some SQL-1999 (eg common table expressions).
But the new structures and extensions 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(). Meaning few take advantage of left-recursion. https://github.com/antlr/antlr4/blob/master/doc/left-recursi...
Honestly, I struggled to understand these grammars. Plus, not being conversant with the SQL-2016 was a huge impediment. Just finding a succinct corbis of test cases was a huge hurdle for me.
Fortunately, the H2 Database project is a great resource. https://github.com/h2database/h2database/tree/master/h2/src/...
Now for the exciting conclusion...
My ANTLR grammar which passes all of H2's tests looks nothing like any of the official or product specific BNFs.
Further, I found discrepancy between the product specific BNFs and their implementations.
So a lot of trial & error is required for a "real world" parser. Which would explain why the professional SQL parsing tools charge money.
I still think creating a parser for SQLite is a great project.
-
.NET-compatible scripting languages for users to write their own scripts to query/manipulate objects/properties in the app
You can find C# grammar files already defined online: https://github.com/antlr/grammars-v4/tree/master/csharp
- I Built a Ruby Parser
-
Creating custom formatter for Java
Initially, I was thinking about learning ANT and using it, but I see that they provided grammars for: java8 and java9 https://github.com/antlr/grammars-v4/tree/master/java
-
Guide: Hush Shell-Scripting Language
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.
-
Open Source SQL Parsers
I believe antlr has grammars for other sql syntaxes (sqlite, tsql, etc): https://github.com/antlr/grammars-v4/tree/master/sql
-
Removing ambiguity in grammar
Additionally, I presume that this is a subset of C? If not, C cannot really be expressed as an LL(1) grammar. LL(k) is possible, and here is an example in ANTLR - https://github.com/antlr/grammars-v4/blob/master/c/C.g4. In fact, this syntax is close enough to BNF that you could probably read it to understand how to tweak to your usecase (again, assuming a subset of C).
-
what would you use to write a parser in 2021?
Oh come on. Just on github alone, there's over 200 ANTLR4 grammars available many for well known languages created before ANTLR was even invented --- how exactly are those languages constrained?
-
A note from our sponsor - InfluxDB
www.influxdata.com | 26 Mar 2023
Stats
antlr/grammars-v4 is an open source project licensed under MIT License which is an OSI approved license.