|
@@ -433,14 +433,25 @@
|
|
|
<li><a href="#code-to-read-or-write-a-yaml-sketcher-file">Code to read or write a yaml sketcher file</a></li>
|
|
<li><a href="#code-to-read-or-write-a-yaml-sketcher-file">Code to read or write a yaml sketcher file</a></li>
|
|
|
</ul>
|
|
</ul>
|
|
|
<h2 id="yaml-sketcher-file-grammar">YAML sketcher file grammar</h2>
|
|
<h2 id="yaml-sketcher-file-grammar">YAML sketcher file grammar</h2>
|
|
|
-<p>This is the wireframe grammar:</p>
|
|
|
|
|
-<ul>
|
|
|
|
|
-<li>starts with S</li>
|
|
|
|
|
-<li>each time you see two "embedded" rectangles, this is the text to write</li>
|
|
|
|
|
-<li>follow the arrows and iterate as needed</li>
|
|
|
|
|
-<li>end with E</li>
|
|
|
|
|
-</ul>
|
|
|
|
|
-<p><img alt="Yaml Sketcher Definition" src="../reference/yamlpysketchergrammar.svg" /></p>
|
|
|
|
|
|
|
+<p>Sketcher file EBNF Grammar is</p>
|
|
|
|
|
+<pre><code class="EBNF">Sketch::= Sketch_Name Parts
|
|
|
|
|
+Sketch_Name::= "-" " " "name: " Identifier Comment? "\n"
|
|
|
|
|
+Parts::= "-" " " "parts:\n" Comment? Part+
|
|
|
|
|
+Part::= Part_Name Shapes
|
|
|
|
|
+Part_Name::= INDENT "-" " " "name: " Identifier Comment? "\n" DEDENT
|
|
|
|
|
+Shapes::= INDENT " " " " "shapes:\n" Comment? Shape+ DEDENT
|
|
|
|
|
+Shape::= Simple | DoAction | SketchObject
|
|
|
|
|
+Simple::= INDENT Identifier ":" PyRightHandExpression Comment? "\n" DEDENT
|
|
|
|
|
+DoAction::= INDENT Identifier ":" Comment? "\n" Action DEDENT
|
|
|
|
|
+Action::= INDENT "action:" PyExpression Comment? "\n" DEDENT
|
|
|
|
|
+Identifier::= [A-Za-z][_A-Za-z0-9]+
|
|
|
|
|
+Comment::= "#" STRING
|
|
|
|
|
+</code></pre>
|
|
|
|
|
+
|
|
|
|
|
+<p>Here is the railroad grammar diagram:</p>
|
|
|
|
|
+<p><a href="/resources/yamlpysketchergrammar.xhtml" target="_blank">Yaml Sketcher Definition</a>
|
|
|
|
|
+<iframe src="/resources/yamlpysketchergrammar.xhtml" style="border:none;height:50vh;width:100vw;"></p>
|
|
|
|
|
+<p><small><a href="https://bottlecaps.de/rr/ui"target="_blank">[Built thanks]</a></small></p>
|
|
|
<h2 id="libraries-pysketcher-object-creation-styles-transform">Libraries, Pysketcher Object creation, Styles, Transform</h2>
|
|
<h2 id="libraries-pysketcher-object-creation-styles-transform">Libraries, Pysketcher Object creation, Styles, Transform</h2>
|
|
|
<h3 id="libraries">Libraries</h3>
|
|
<h3 id="libraries">Libraries</h3>
|
|
|
<p>The libraries token defined in the grammar is</p>
|
|
<p>The libraries token defined in the grammar is</p>
|