-
Notifications
You must be signed in to change notification settings - Fork 3
/
linnApiDoc.ebnf
40 lines (35 loc) · 1.23 KB
/
linnApiDoc.ebnf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* ==========================================================================
* LINN: QUICK API DOCUMENTATION
*
* Copyright (c) 2015 by Thomas Trojer <[email protected]>
* ==========================================================================
* - read as EBNF (? .. optional, + .. 1 or more, | ... logical or, ...)
* - quoted strings represent method names on "Linn" objects
* - the API is still expanding, but this doc will stay in-sync
*/
/* --------------------------------------------------------------------------
* L-System definitions
* ------------------------------------------------------------------------ */
Linn ::= "withName"?
"withAuthor"?
ProductionRule+
"build"
ProductionRule ::= "withRule"
"andWeight"?
"andProduction"
Production
"done"
Production ::= "F" | "f" | "rewrite" | "branch" Production+ "done"
/* --------------------------------------------------------------------------
* L-System definition execution
* ------------------------------------------------------------------------ */
Executor ::= "useLinn"
"onStateChange"?
"withAxiom"
Production
"executeOnce"?
"executeAtMost"?
"executePartial"?
"reset"?
"getProductionResult"?
"getIterationCount"?