coregrammars 0.1.2
Grammars containing core language features, for creating DSLs and embedded languages
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
coregrammars
A collection of basic grammars in D / pegged compiled as modules.
Tu use
import coregrammars.gen.json;
enum input = `
{
"Number": 42,
"Decimal": 123.456,
"String": "abc",
"NullString": "",
"Escape": "\uAAAA\n\\Hello",
"Array" : [0,1,2],
"Array2": [0, [0,1,2], "abc"],
"Obj" : { "Member":0, "Member":[0,1,2] },
"True" : true,
"False" : false,
"Null" : null,
"Empty" : {}
}`;
enum nodes = JSONGrammar(input);
And so on for the other grammars.
Here is the list of grammars:
- Expressions: basic expressions such as strings, numbers and arithmetic
- INI
- JSON
- Markdown
To regenerate the modules, run dub run -c modgen
.
- Registered by Mark Fisher
- 0.1.2 released 5 months ago
- logicfish/coregrammars
- Apache License 2.0
- Copyright © 2022, Mark Fisher
- Authors:
- Dependencies:
- pegged
- Versions:
-
0.1.3 2022-Mar-19 0.1.2 2022-Mar-18 0.1.1 2022-Mar-18 0.1.0 2022-Mar-18 ~main 2022-Mar-19 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
3 downloads total
-
- Score:
- 0.3
- Short URL:
- coregrammars.dub.pm