This class can parse a configuration written in WAL format, by reading the content from a file or from a std::istream, containing a list of objects to be created and their wiring. Then it can populate a Catalog
with that objects. The syntax of the wal file should be similar to:
# this is a comment
@load "plugin"; # load the dynamic library named "plugin.so" or "plugin.dll"
a = new A8; # create a new object of class A8
a1 = new A8(); # idem
b = new B8( att_int=10); # create an object of class B8 assigning an attribute
c1 = new C8(att_ui=10);
c2 = new C8(att_ui=10);
d = new Foo::D8(att_string="mystring",att_int=34);
e = new E8( att1=5, att2=3.14 );
f = new F8(att1=3.14,att2=false);
g = new G8(att1=false,att2=true);
h = new H8(att1=1.0, att2=-2.0);
l = new L8(att1=-100, att2="foo bar");
m = new M8(att1=-2000000000, att2='a');
n = new N8(att1='b',att2=200);
o_double = new O8<double>;
o_int = new O8<int>;
p = new P5;
q = new Q5;
c1.x=a; # link "x" collaborator of the object "c1" to the part "a"
c2.x=b;
d.container=a;
d.container=b;
The syntax in Backus-Naur form is the following:
<start> ::= <list> <done>
<list> ::= <statement> ";" <list> | <empty>
<statement> ::= <loadexpr> | <assignexpr>
<loadexpr> ::= "@load" <value>
<assignexpr> ::= <id> "=" "create" <id> <optparamlist> | <id> <depexpr>
<optparamlist> ::= <empty> | "(" <attrlist> ")"
<attrlist> ::= <empty> | <attrassign> <moreattrassign>
<attrassign> ::= <id> "=" <value>
<moreattrassign> ::= <empty> | attrsep <attrassign>
<depexpr> ::= "." <id> "=" <id>