<Comment>/*Basic test file</Comment><br/>
<Comment>Written by Julian Stirling, 2018</Comment><br/>
<Comment>License: MIT*/</Comment><br/>
<Normal Text></Normal Text><br/>
<Comment>// This is a comment</Comment><br/>
<Normal Text>x</Normal Text><Symbol>=</Symbol><Decimal>5</Decimal><Symbol>;</Symbol><br/>
<Normal Text>y</Normal Text><Symbol>=</Symbol><Decimal>6</Decimal><Symbol>;</Symbol><br/>
<Normal Text>z</Normal Text><Symbol>=</Symbol><Decimal>5</Decimal><Symbol>;</Symbol><br/>
<Normal Text>r</Normal Text><Symbol>=</Symbol><Decimal>2</Decimal><Symbol>;</Symbol><br/>
<Keywords>for</Keywords><Normal Text> </Normal Text><Symbol>(</Symbol><Normal Text>n </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Symbol>[-</Symbol><Float>1.5</Float><Symbol>:</Symbol><Decimal>1</Decimal><Symbol>:</Symbol><Float>1.5</Float><Symbol>]){</Symbol><br/>
<Normal Text>    </Normal Text><Transformation>translate</Transformation><Symbol>([</Symbol><Normal Text>n</Normal Text><Symbol>*</Symbol><Normal Text>x</Normal Text><Symbol>,</Symbol><Decimal>0</Decimal><Symbol>,</Symbol><Decimal>0</Decimal><Symbol>]){</Symbol><Normal Text>cubehole</Normal Text><Symbol>([</Symbol><Normal Text>x</Normal Text><Symbol>,</Symbol><Normal Text>y</Normal Text><Symbol>,</Symbol><Normal Text>z</Normal Text><Symbol>],</Symbol><Normal Text>r</Normal Text><Symbol>);}</Symbol><br/>
<Symbol>}</Symbol><br/>
<Normal Text></Normal Text><br/>
<Keywords>module</Keywords><Normal Text> cubehole</Normal Text><Symbol>(</Symbol><Normal Text>size</Normal Text><Symbol>,</Symbol><Normal Text>holerad</Normal Text><Symbol>)</Symbol><br/>
<Symbol>{</Symbol><br/>
<Normal Text>    </Normal Text><SpecialVar>$fn</SpecialVar><Normal Text>=</Normal Text><Decimal>28</Decimal><Symbol>;</Symbol><br/>
<Normal Text>    </Normal Text><Boolean>difference</Boolean><Symbol>()</Symbol><br/>
<Normal Text>    </Normal Text><Symbol>{</Symbol><br/>
<Normal Text>        </Normal Text><Three Dim>cube</Three Dim><Symbol>(</Symbol><Normal Text>size</Normal Text><Symbol>,</Symbol><Normal Text>center</Normal Text><Symbol>=</Symbol><Keywords>true</Keywords><Symbol>);</Symbol><br/>
<Normal Text>        </Normal Text><Three Dim>cylinder</Three Dim><Symbol>(</Symbol><Normal Text>size</Normal Text><Symbol>[</Symbol><Decimal>2</Decimal><Symbol>]+</Symbol><Decimal>1</Decimal><Symbol>,</Symbol><Normal Text>r</Normal Text><Symbol>=</Symbol><Normal Text>holerad</Normal Text><Symbol>,</Symbol><Normal Text>center</Normal Text><Symbol>=</Symbol><Keywords>true</Keywords><Symbol>);</Symbol><br/>
<Normal Text>    </Normal Text><Symbol>}</Symbol><br/>
<Symbol>}</Symbol><br/>
<Normal Text></Normal Text><br/>
<Comment>// some examples adapted from https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/General</Comment><br/>
<Three Dim>cube</Three Dim><Symbol>(</Symbol><Decimal>5</Decimal><Symbol>);</Symbol><br/>
<Normal Text>x </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Decimal>4</Decimal><Normal Text> </Normal Text><Symbol>+</Symbol><Normal Text> y</Normal Text><Symbol>;</Symbol><br/>
<Transformation>rotate</Transformation><Symbol>(</Symbol><Decimal>40</Decimal><Symbol>)</Symbol><Normal Text> </Normal Text><Two Dim>square</Two Dim><Symbol>(</Symbol><Decimal>5</Decimal><Symbol>,</Symbol><Decimal>10</Decimal><Symbol>);</Symbol><br/>
<Transformation>translate</Transformation><Symbol>([</Symbol><Decimal>10</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>5</Decimal><Symbol>])</Symbol><Normal Text> </Normal Text><Symbol>{</Symbol><br/>
<Normal Text>    </Normal Text><Two Dim>circle</Two Dim><Symbol>(</Symbol><Decimal>5</Decimal><Symbol>);</Symbol><br/>
<Normal Text>    </Normal Text><Two Dim>square</Two Dim><Symbol>(</Symbol><Decimal>4</Decimal><Symbol>);</Symbol><br/>
<Symbol>}</Symbol><br/>
<Transformation>rotate</Transformation><Symbol>(</Symbol><Decimal>60</Decimal><Symbol>)</Symbol><Normal Text> </Normal Text><Transformation>color</Transformation><Symbol>(</Symbol><String>"red"</String><Symbol>)</Symbol><Normal Text> </Normal Text><Symbol>{</Symbol><br/>
<Normal Text>    </Normal Text><Two Dim>circle</Two Dim><Symbol>(</Symbol><Decimal>5</Decimal><Symbol>);</Symbol><br/>
<Normal Text>    </Normal Text><Two Dim>square</Two Dim><Symbol>(</Symbol><Decimal>4</Decimal><Symbol>);</Symbol><br/>
<Symbol>}</Symbol><br/>
<Transformation>color</Transformation><Symbol>(</Symbol><String>"blue"</String><Symbol>)</Symbol><Normal Text> </Normal Text><Symbol>{</Symbol><br/>
<Normal Text>    </Normal Text><Transformation>translate</Transformation><Symbol>([</Symbol><Decimal>5</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>3</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>0</Decimal><Symbol>])</Symbol><Normal Text> </Normal Text><Three Dim>sphere</Three Dim><Symbol>(</Symbol><Decimal>5</Decimal><Symbol>);</Symbol><br/>
<Normal Text>    </Normal Text><Transformation>rotate</Transformation><Symbol>([</Symbol><Decimal>45</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>0</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>45</Decimal><Symbol>])</Symbol><Normal Text> </Normal Text><Symbol>{</Symbol><br/>
<Normal Text>        </Normal Text><Three Dim>cylinder</Three Dim><Symbol>(</Symbol><Decimal>10</Decimal><Symbol>);</Symbol><br/>
<Normal Text>        </Normal Text><Three Dim>cube</Three Dim><Symbol>([</Symbol><Decimal>5</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>6</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>7</Decimal><Symbol>]);</Symbol><br/>
<Normal Text>    </Normal Text><Symbol>}</Symbol><br/>
<Symbol>}</Symbol><br/>
<Normal Text></Normal Text><br/>
<Normal Text>aNumber </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Decimal>42</Decimal><Symbol>;</Symbol><br/>
<Normal Text>aBoolean </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Keywords>true</Keywords><Symbol>;</Symbol><br/>
<Normal Text>anotherBoolean </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Keywords>false</Keywords><Symbol>;</Symbol><br/>
<Normal Text>aString </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><String>"foo"</String><Symbol>;</Symbol><br/>
<Normal Text>aRange </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Symbol>[</Symbol><Decimal>0</Decimal><Symbol>:</Symbol><Normal Text> </Normal Text><Decimal>1</Decimal><Symbol>:</Symbol><Normal Text> </Normal Text><Decimal>10</Decimal><Symbol>];</Symbol><br/>
<Normal Text>aVector </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Symbol>[</Symbol><Decimal>1</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>2</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>3</Decimal><Symbol>];</Symbol><br/>
<Normal Text>aUndef </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Keywords>undef</Keywords><Symbol>;</Symbol><br/>
<Normal Text>moreNumbers </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Symbol>[-</Symbol><Decimal>1</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>42</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Float>0.5</Float><Symbol>,</Symbol><Normal Text> </Normal Text><Float>2.99792458e+8</Float><Symbol>,</Symbol><Normal Text> </Normal Text><Float>1.337e3</Float><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>314</Decimal><Normal Text>e</Normal Text><Symbol>-</Symbol><Decimal>2</Decimal><Symbol>];</Symbol><br/>
<Other>echo</Other><Symbol>(</Symbol><Normal Text>moreNumbers</Normal Text><Symbol>)</Symbol><br/>
<Other>echo</Other><Symbol>(</Symbol><String>"The quick brown fox \tjumps \"over\" the lazy dog.\rThe quick brown fox.\nThe \\lazy\\ dog. \x21 \u03a9 \U01F98A \U01f43e"</String><Symbol>);</Symbol><br/>
<Normal Text></Normal Text><br/>
<Normal Text>vector1 </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Symbol>[</Symbol><Decimal>1</Decimal><Symbol>,</Symbol><Decimal>2</Decimal><Symbol>,</Symbol><Decimal>3</Decimal><Symbol>];</Symbol><Normal Text> vector2 </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Symbol>[</Symbol><Decimal>4</Decimal><Symbol>];</Symbol><Normal Text> vector3 </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Symbol>[</Symbol><Decimal>5</Decimal><Symbol>,</Symbol><Decimal>6</Decimal><Symbol>];</Symbol><br/>
<Normal Text>new_vector </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Functions>concat</Functions><Symbol>(</Symbol><Normal Text>vector1</Normal Text><Symbol>,</Symbol><Normal Text> vector2</Normal Text><Symbol>,</Symbol><Normal Text> vector3</Normal Text><Symbol>);</Symbol><Normal Text> </Normal Text><Comment>// [1,2,3,4,5,6]</Comment><br/>
<Normal Text></Normal Text><br/>
<Normal Text>string_vector </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Functions>concat</Functions><Symbol>(</Symbol><String>"abc"</String><Symbol>,</Symbol><String>"def"</String><Symbol>);</Symbol><Normal Text>                 </Normal Text><Comment>// ["abc", "def"]</Comment><br/>
<Normal Text>one_string </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Functions>str</Functions><Symbol>(</Symbol><Normal Text>string_vector</Normal Text><Symbol>[</Symbol><Decimal>0</Decimal><Symbol>],</Symbol><Normal Text>string_vector</Normal Text><Symbol>[</Symbol><Decimal>1</Decimal><Symbol>]);</Symbol><Normal Text> </Normal Text><Comment>// "abcdef"</Comment><br/>
<Normal Text></Normal Text><br/>
<Normal Text>a </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Symbol>[</Symbol><Decimal>1</Decimal><Symbol>,</Symbol><Decimal>2</Decimal><Symbol>,</Symbol><Decimal>3</Decimal><Symbol>];</Symbol><Normal Text> </Normal Text><Other>echo</Other><Symbol>(</Symbol><Mathematical>len</Mathematical><Symbol>(</Symbol><Normal Text>a</Normal Text><Symbol>));</Symbol><Normal Text>   </Normal Text><Comment>//  3</Comment><br/>
<Normal Text></Normal Text><br/>
<Comment>// Example which defines a 2D rotation matrix</Comment><br/>
<Normal Text>mr </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Symbol>[</Symbol><br/>
<Normal Text>    </Normal Text><Symbol>[</Symbol><Mathematical>cos</Mathematical><Symbol>(</Symbol><Normal Text>angle</Normal Text><Symbol>),</Symbol><Normal Text> </Normal Text><Symbol>-</Symbol><Mathematical>sin</Mathematical><Symbol>(</Symbol><Normal Text>angle</Normal Text><Symbol>)],</Symbol><br/>
<Normal Text>    </Normal Text><Symbol>[</Symbol><Mathematical>sin</Mathematical><Symbol>(</Symbol><Normal Text>angle</Normal Text><Symbol>),</Symbol><Normal Text>  </Normal Text><Mathematical>cos</Mathematical><Symbol>(</Symbol><Normal Text>angle</Normal Text><Symbol>)]</Symbol><br/>
<Symbol>];</Symbol><br/>
<Normal Text></Normal Text><br/>
<Comment>// modifiers</Comment><br/>
<Symbol>%</Symbol><Normal Text> </Normal Text><Three Dim>cube</Three Dim><Symbol>([</Symbol><Decimal>10</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>10</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>10</Decimal><Symbol>]);</Symbol><Normal Text>  </Normal Text><Comment>// background</Comment><br/>
<Symbol>#</Symbol><Normal Text> </Normal Text><Three Dim>cube</Three Dim><Symbol>([</Symbol><Decimal>10</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>10</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>10</Decimal><Symbol>]);</Symbol><Normal Text>  </Normal Text><Comment>// debug</Comment><br/>
<Symbol>!</Symbol><Normal Text> </Normal Text><Three Dim>cube</Three Dim><Symbol>([</Symbol><Decimal>10</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>10</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>10</Decimal><Symbol>]);</Symbol><Normal Text>  </Normal Text><Comment>// root</Comment><br/>
<Symbol>*</Symbol><Normal Text> </Normal Text><Three Dim>cube</Three Dim><Symbol>([</Symbol><Decimal>10</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>10</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>10</Decimal><Symbol>]);</Symbol><Normal Text>  </Normal Text><Comment>// disable</Comment><br/>
<Normal Text></Normal Text><br/>
<Comment>// if example taken from https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Other_Language_Features#Rounding_examples</Comment><br/>
<Keywords>if</Keywords><Symbol>(</Symbol><Normal Text>a</Normal Text><Symbol>==</Symbol><Normal Text>b</Normal Text><Symbol>){</Symbol><br/>
<Normal Text>    </Normal Text><Other>echo</Other><Normal Text> </Normal Text><Symbol>(</Symbol><String>"a==b"</String><Symbol>);</Symbol><br/>
<Symbol>}</Symbol><Keywords>else</Keywords><Normal Text> </Normal Text><Keywords>if</Keywords><Symbol>(</Symbol><Normal Text>a</Normal Text><Symbol>></Symbol><Normal Text>b</Normal Text><Symbol>){</Symbol><br/>
<Normal Text>    </Normal Text><Other>echo</Other><Normal Text> </Normal Text><Symbol>(</Symbol><String>"a>b"</String><Symbol>);</Symbol><br/>
<Symbol>}</Symbol><Keywords>else</Keywords><Normal Text> </Normal Text><Keywords>if</Keywords><Symbol>(</Symbol><Normal Text>a</Normal Text><Symbol><</Symbol><Normal Text>b</Normal Text><Symbol>){</Symbol><br/>
<Normal Text>    </Normal Text><Other>echo</Other><Normal Text> </Normal Text><Symbol>(</Symbol><String>"a<b"</String><Symbol>);</Symbol><br/>
<Symbol>}</Symbol><Keywords>else</Keywords><Symbol>{</Symbol><br/>
<Normal Text>    </Normal Text><Other>echo</Other><Normal Text> </Normal Text><Symbol>(</Symbol><String>"???"</String><Symbol>);</Symbol><br/>
<Symbol>}</Symbol><br/>
<Normal Text></Normal Text><br/>
<Comment>// assert example taken from https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Other_Language_Features#assert</Comment><br/>
<Keywords>module</Keywords><Normal Text> row</Normal Text><Symbol>(</Symbol><Normal Text>cnt </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Decimal>3</Decimal><Symbol>){</Symbol><br/>
<Normal Text>    </Normal Text><Comment>// Count has to be a positive integer greater 0</Comment><br/>
<Normal Text>    </Normal Text><Functions>assert</Functions><Symbol>(</Symbol><Normal Text>cnt </Normal Text><Symbol>></Symbol><Normal Text> </Normal Text><Decimal>0</Decimal><Symbol>);</Symbol><br/>
<Normal Text>    </Normal Text><Keywords>for</Keywords><Normal Text> </Normal Text><Symbol>(</Symbol><Normal Text>i </Normal Text><Symbol>=</Symbol><Normal Text> </Normal Text><Symbol>[</Symbol><Decimal>1</Decimal><Normal Text> </Normal Text><Symbol>:</Symbol><Normal Text> cnt</Normal Text><Symbol>])</Symbol><Normal Text> </Normal Text><Symbol>{</Symbol><br/>
<Normal Text>        </Normal Text><Transformation>translate</Transformation><Symbol>([</Symbol><Normal Text>i </Normal Text><Symbol>*</Symbol><Normal Text> </Normal Text><Decimal>2</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>0</Decimal><Symbol>,</Symbol><Normal Text> </Normal Text><Decimal>0</Decimal><Symbol>])</Symbol><Normal Text> </Normal Text><Three Dim>sphere</Three Dim><Symbol>();</Symbol><br/>
<Normal Text>    </Normal Text><Symbol>}</Symbol><br/>
<Symbol>}</Symbol><br/>
<Normal Text>row</Normal Text><Symbol>(</Symbol><Decimal>0</Decimal><Symbol>);</Symbol><br/>
