xxxxxxxxxx
/+dub.sdl:
dependency "pegged" version="~>0.4.4"
+/
import std.meta, std.traits, std.stdio;
import pegged.grammar;
mixin(grammar(`
TestGrammar:
Module <- Aggregate (:Spacing Aggregate)* :eoi
Aggregate < "aggregate" TypeSpecifier "end"
TypeSpecifier < "ubyte" / "ushort" / "uint" / "ulong"
`));
void main()
{
auto source = "aggregate ubyte1 end";
auto parseTree = TestGrammar(source);
writeln(parseTree);
}