commit e4c80b19f5149fb7dba0a9b785e22ff5323b5470 Author: Jeremy Wall <jeremy@marzhillstudios.com> Date: Sun Nov 4 09:54:16 2018 -0600 FEATURE: report better stacktraces for parsing. commit 24b97c1037d6ddbe21f32e172b1c14cd2cfb9910 Author: Jeremy Wall <jeremy@marzhillstudios.com> Date: Wed Oct 17 19:00:29 2018 -0500 FEATURE: Use context for our error reporting. commit c22d397545e7575608e34561a274745b28be8c2c Author: Jeremy Wall <jeremy@marzhillstudios.com> Date: Sun Oct 14 14:18:42 2018 -0500 FIX: Better error reporting. commit 7f47dc3f38bf6a3e8686c1fa3fd50ef97d4bf3af Author: Jeremy Wall <jeremy@marzhillstudios.com> Date: Sat Oct 13 19:42:22 2018 -0500 REFACTOR: Pass our offsets everywhere. commit 91d7ed690bfd9989270ba9fa4f44c70f513d54b9 Author: Jeremy Wall <jeremy@marzhillstudios.com> Date: Sun Sep 23 15:08:45 2018 -0500 REFACTOR: Use abortable_parser.
Universal Configuration Grammar.
This is an experiment in configuration management. The approach is not to create a "parsable" config file format. We have plenty of those. Instead we try to specify a grammar for describing configuration values that can then target various configuration formats to output to.
In theory this could support anything from command line flags to json to yaml or toml or even xml.
The goal is to allow a global shared configuration repository that can be version controlled, enforce some typesafety, and output configuration for any application regardless of that applications preferred format.
The Usual Warnings
This is still very much an experiment and the language and api can be expected to change and mutate. It also probably has bugs and isn't yet the most user friendly language and compiler to use. You have been warned.
Usage
You can get ucg with cargo cargo install ucg
.
Running ucg help will show the following output.
Universal Configuration Grammar compiler.
USAGE:
ucg [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
build Build a specific ucg file.
help Prints this message or the help of the given subcommand(s)
inspect Inspect a specific symbol in a ucg file.
test Check a specific ucg file for errors.
Compiling
Build a list of ucg files.
USAGE:
ucg build [FLAGS] -r [INPUT]...
FLAGS:
-h, --help Prints help information
-r Whether we should recurse in directories or not.
-V, --version Prints version information
ARGS:
<INPUT>... Input ucg files or directories to build. If not provided then build the contents of the current directory.
Testing
CCheck a list of ucg files for errors and run test assertions.
USAGE:
ucg test [FLAGS] -r [INPUT]...
FLAGS:
-h, --help Prints help information
-r Whether we should recurse or not.
-V, --version Prints version information
ARGS:
<INPUT>... Input ucg files or directories to run test assertions for. If not provided it will scan the current directory for files with _test.ucg
## Language Reference
https://docs.rs/ucg/