https://wiki.povray.org/content?title=User:Clipka/Syntax&feed=atom&action=historyUser:Clipka/Syntax - Revision history2024-03-29T14:13:58ZRevision history for this page on the wikiMediaWiki 1.35.1https://wiki.povray.org/content?title=User:Clipka/Syntax&diff=9647&oldid=prevClipka at 17:29, 5 October 20182018-10-05T17:29:35Z<p></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 17:29, 5 October 2018</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l36" >Line 36:</td>
<td colspan="2" class="diff-lineno">Line 36:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>;...</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>;...</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></div></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></div></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">For simplicity of writing, we might use style sheets to "italicize" everything but the non-terminals, rather than use markup to explicitly italicize pretty much everything individually.</ins></div></td></tr>
</table>Clipkahttps://wiki.povray.org/content?title=User:Clipka/Syntax&diff=9646&oldid=prevClipka: Created page with "==Random ideas for an overhauled way of representing syntax== This is what we currently have: <pre> ARRAY_DECLARATION: #declare IDENTIFIER = array[ mixed ][ INT ] INT ..."2018-10-05T17:20:59Z<p>Created page with "==Random ideas for an overhauled way of representing syntax== This is what we currently have: <pre> ARRAY_DECLARATION: #declare IDENTIFIER = array[ mixed ][ INT ]<a href="/content?title=INT&action=edit&redlink=1" class="new" title="INT (page does not exist)">INT </a>..."</p>
<p><b>New page</b></p><div>==Random ideas for an overhauled way of representing syntax==<br />
<br />
This is what we currently have:<br />
<br />
<pre><br />
ARRAY_DECLARATION:<br />
#declare IDENTIFIER = array[ mixed ][ INT ][[ INT ]]..[ARRAY_INITIALIZER] |<br />
#local IDENTIFIER = array[ mixed ][ INT ][[ INT ]]..[ARRAY_INITIALIZER]<br />
...<br />
</pre><br />
<br />
If we abandong pre-formatted text, we can use formatting to our advantage. For example, the following uses a definition list in a <code>&lt;div&gt;</code> tag (using "Note" here but we should of course use a dedicated style class, so that we can fine-tune the style), and <code>%&t;code&gt;</code> to mark literal text:<br />
<br />
<div class="Note"><br />
;ARRAY_DECLARATION<br />
:<code>#declare</code> IDENTIFIER <code>= array</code> [ <code>mixed</code> ] <code>[</code> INT <code>]</code> [ <code>[</code> INT <code>]</code> ].. [ ARRAY_INITIALIZER ] |<br />
:<code>#local</code> IDENTIFIER <code>= array</code> [ <code>mixed</code> ] <code>[</code> INT <code>]</code> [ <code>[</code> INT <code>]</code> ].. [ ARRAY_INITIALIZER ]<br />
;...<br />
</div><br />
<br />
Or, to make it easier to write, we could simply use bold to indicate literal text:<br />
<br />
<div class="Note"><br />
;ARRAY_DECLARATION<br />
:'''#declare''' IDENTIFIER '''= array''' [ '''mixed''' ] '''[''' INT ''']''' [ '''[''' INT ''']''' ]... [ ARRAY_INITIALIZER ] |<br />
:'''#local''' IDENTIFIER '''= array''' [ '''mixed''' ] '''[''' INT ''']''' [ '''[''' INT ''']''' ]... [ ARRAY_INITIALIZER ]<br />
;...<br />
</div><br />
<br />
As a final example, here's using bold for literal text, italics for syntax non-terminals, and normal for everything else, while also using subscript "opt" instead of square brackets to indicate optional stuff, and subscript "opt..." to indicate optional stuff that can appear multiple times:<br />
<br />
<div class="Note"><br />
;''ARRAY_DECLARATION''<br />
:'''#declare''' ''IDENTIFIER'' '''= array''' '''mixed'''<sub>opt</sub> '''[''' ''INT'' ''']''' '''[''' ''INT'' ''']'''<sub>opt...</sub> ''ARRAY_INITIALIZER''<sub>opt</sub> |<br />
:'''#local''' ''IDENTIFIER'' '''= array''' '''mixed'''<sub>opt</sub> '''[''' ''INT'' ''']''' '''[''' ''INT'' ''']'''<sub>opt...</sub> ''ARRAY_INITIALIZER''<sub>opt</sub><br />
;...<br />
</div></div>Clipka