This repository contains a collection of practical examples demonstrating the capabilities of the Intuitive DSL engine for Java.
Intuitive DSL allows you to easily parse, validate, and bind custom natural-language or enterprise commands directly to your Java objects.
Main Engine Repository: Intuitive DSL
- JDK 17 or higher
- Maven 3.6+
This project is structured as a Maven aggregator containing 5 autonomous, progressive modules. It is recommended to explore them in the following order:
- 01-quickstart: The absolute basics. Learn how to map a simple string command to a Java class using @DslCommand and @Bind.
- 02-quoted-values-and-tokenization: Understand the engine's lexer. Learn how to handle spaces, punctuation, and SQL-style single quotes.
- 03-bindings: Discover the power of the TypeConverter and the after attribute to automatically convert types (UUIDs, Enums), resolve structural flags, and disambiguate parameters.
- 04-macros: Learn how to use dynamic placeholders (${macro_name}) to inject runtime vocabularies and external registries into your grammar.
- 05-enterprise-command-grammar: The culmination of all features. A complex, real-world database provisioning grammar combining alternatives, optional blocks, macros, and flags.
You can build the entire aggregator from the root directory:
mvn clean install
To run a specific example, navigate to its directory and use the Maven exec plugin. For example:
cd 01-quickstart
mvn exec:java -Dexec.mainClass="ch.dbalabs.intuitivedsl.examples.quickstart.QuickstartApp"
(Each module contains its own local README.md with the exact execution command).
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.