Component property assign definition

Malsys process inputs by system of connected components. Concrete set and connection of component is defined by component configuration. There are few predefined configurations which can be used for processing L-systems. Components have various properties which can be set by user. This is done by component property assign definition in L-system. To learn what properties are settable see components reference.

Basic examples

The most important properties are probably axiom and iterations. If you look in components list you will find that this properties are on component dd. The axiom is symbol property so its definition starts with set symbols and its value is string of symbols. The iterations property is constant so its definition starts with just set.

Input

1
2
3
4
5
lsystem CompPropAssignExample01 {
set symbols axiom = A B(20) C(5, 0) D;
set iterations = 1;
}
process all with SymbolPrinter;

Output

A B(20) C(5, 0) D

Formal grammar

1
2
3
4
5
6
7
8
9
component_property_assign =
| 'set' ID '=' expression ';'
| 'set' 'symbols' ID '=' symbol* ';'
 
symbol = symbol_char+ '(' expr_args? ')'
 
symbol_char = ID | OPERATOR | '[' | ']'
 
expr_args = expression (',' expr_args)?