<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to EEF</title><link>https://sourceforge.net/p/hpg-projects/wiki/EEF/</link><description>Recent changes to EEF</description><atom:link href="https://sourceforge.net/p/hpg-projects/wiki/EEF/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 20 Jan 2023 12:15:16 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/hpg-projects/wiki/EEF/feed" rel="self" type="application/rss+xml"/><item><title>EEF modified by Hugh Greene</title><link>https://sourceforge.net/p/hpg-projects/wiki/EEF/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;ENIGMA's &lt;strong&gt;Extensible Enumeration Format&lt;/strong&gt; (&lt;strong&gt;EEF&lt;/strong&gt;) is a format created&lt;br/&gt;
to allow plain-text storage of a variety of data in a linear fashion,&lt;br/&gt;
without compromising the ability to extend the format later without&lt;br/&gt;
invalidating outdated readers.&lt;/p&gt;
&lt;h2 id="specification"&gt;Specification&lt;/h2&gt;
&lt;h3 id="structure"&gt;Structure&lt;/h3&gt;
&lt;p&gt;The format is based on newlines with&lt;br/&gt;
&lt;a class="" href="#Length-prefixing" title="wikilink"&gt;length-prefixing&lt;/a&gt;. Information stored in&lt;br/&gt;
this format is organized into &lt;a class="" href="#Data_Blocks" title="wikilink"&gt;Data Blocks&lt;/a&gt;,&lt;br/&gt;
which assign definite length patterns.&lt;/p&gt;
&lt;h3 id="comments"&gt;Comments&lt;/h3&gt;
&lt;p&gt;EEF comments are defined to commence with any single consistent&lt;br/&gt;
combination of the following symbols: &lt;strong&gt;&lt;code&gt;# ; % / '&lt;/code&gt;&lt;/strong&gt;, and to be&lt;br/&gt;
terminated by the end of the line. A file defines what comment&lt;br/&gt;
combination it will be using by starting the file with those symbols as&lt;br/&gt;
the very first symbols in the file, or if none are specified, it is&lt;br/&gt;
assumed the file has no comments. The remainder of the file must&lt;br/&gt;
consistently use that comment combination. This is to allow for the&lt;br/&gt;
storage of multi-lingual code-snippets without alienating generic EEF&lt;br/&gt;
readers as a parse option.&lt;/p&gt;
&lt;p&gt;A valid comment symbol combination can be as simple as &lt;code&gt;;&lt;/code&gt; (as in&lt;br/&gt;
Assembly), &lt;code&gt;#&lt;/code&gt; (as in bash) or &lt;code&gt;//&lt;/code&gt; (as in C), or can be as complex as&lt;br/&gt;
&lt;code&gt;/%#%/&lt;/code&gt; (for the express purpose of not conflicting with the&lt;br/&gt;
aforementioned languages), however, remember, in the latter case, the&lt;br/&gt;
comment begins with the full &lt;code&gt;/%#%/&lt;/code&gt; and ends with a newline. Multi-line&lt;br/&gt;
comments are not available - instead, simply precede each comment line&lt;br/&gt;
with the comment sequence.&lt;/p&gt;
&lt;p&gt;As of version one of the EEF specification, only one comment symbol&lt;br/&gt;
pattern can be defined per file. This restriction may be revised later.&lt;/p&gt;
&lt;p&gt;After the first non-comment line in the file, no further lines can be&lt;br/&gt;
left entirely commented unless said lines would be otherwise blank.&lt;br/&gt;
Hence, these lines will be exclusively attribute lines: a comment cannot&lt;br/&gt;
appear as the complete line anywhere that a reader would expect to find&lt;br/&gt;
a Data Block indicator. This is done to promote ease of skipping unknown&lt;br/&gt;
Data Blocks.&lt;/p&gt;
&lt;h3 id="quotes"&gt;Quotes&lt;/h3&gt;
&lt;p&gt;The EEF specification defines quotes for use in &lt;a class="" href="#Small_Attributes" title="wikilink"&gt;Small&lt;br/&gt;
Attribute&lt;/a&gt; listing. The double quote&lt;br/&gt;
symbol (&lt;code&gt;"&lt;/code&gt;) or single quote symbol (&lt;code&gt;'&lt;/code&gt;) may be used except where the&lt;br/&gt;
latter is defined as a &lt;a class="" href="#Comment" title="wikilink"&gt;Comment&lt;/a&gt; pattern. The&lt;br/&gt;
escape sequences &lt;code&gt;\\&lt;/code&gt;, &lt;code&gt;\"&lt;/code&gt; and &lt;code&gt;\'&lt;/code&gt; are defined; all others are to be&lt;br/&gt;
handled application-side.&lt;/p&gt;
&lt;h3 id="indentation"&gt;Indentation&lt;/h3&gt;
&lt;p&gt;Indentation is optional, and should be done as-desired to make the&lt;br/&gt;
format visually pleasing and computationally simple. Generally, where&lt;br/&gt;
unimportant, these indentation characters will be discarded by readers.&lt;br/&gt;
Many indentation characters are supported, including tab ('\t'), space&lt;br/&gt;
(' '), and any combination thereof.&lt;/p&gt;
&lt;h3 id="data-blocks"&gt;Data Blocks&lt;/h3&gt;
&lt;p&gt;Similar to binary data chunks in the PNG specification, EEF Data Blocks&lt;br/&gt;
are multi-line sections of text defined to contain at most one of the&lt;br/&gt;
following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A set of {N} subsequent &lt;a class="" href="#Data_Entries" title="wikilink"&gt;Data Entries&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;A set of [N] &lt;a class="" href="#Line_Attributes" title="wikilink"&gt;Attribute Lines&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id="data-block-indicator"&gt;Data Block Indicator&lt;/h4&gt;
&lt;p&gt;These blocks are set off by a single line which names the Data Type. The&lt;br/&gt;
format for a data block indicator is as follows:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;a class="" href="#Type_Name" title="wikilink"&gt;&lt;code&gt;Type`` ``Name&lt;/code&gt;&lt;/a&gt;&lt;code&gt;&lt;/code&gt;&lt;em&gt;&lt;code&gt;(plural)&lt;/code&gt;&lt;/em&gt;&lt;code&gt;&lt;/code&gt;&lt;strong&gt;&lt;code&gt;{&lt;/code&gt;&lt;/strong&gt;&lt;code&gt;Number of contained&lt;/code&gt;&lt;a class="" href="#Data_Blocks" title="wikilink"&gt;&lt;code&gt;Data``
``Blocks&lt;/code&gt;&lt;/a&gt;&lt;strong&gt;&lt;code&gt;}&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The data block indicator may appear on its own at the &lt;a class="" href="#Root" title="wikilink"&gt;root of the&lt;br/&gt;
file&lt;/a&gt; or after any &lt;a class="" href="#Data_Entry_Indicator" title="wikilink"&gt;Data Entry&lt;br/&gt;
Indicators&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="data-entries"&gt;Data Entries&lt;/h3&gt;
&lt;p&gt;Data entries are typically members of data blocks, but are permitted to&lt;br/&gt;
appear at the &lt;a class="" href="#Root" title="wikilink"&gt;root&lt;/a&gt; of the file if no higher level is&lt;br/&gt;
required. Data entries define an instance of their Data&lt;/p&gt;
&lt;h4 id="data-entry-indicator"&gt;Data Entry Indicator&lt;/h4&gt;
&lt;p&gt;Data entry indicators&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;a class="" href="#Type_Name" title="wikilink"&gt;&lt;code&gt;Type`` ``Name&lt;/code&gt;&lt;/a&gt;&lt;strong&gt;&lt;em&gt;&lt;code&gt;(&lt;/code&gt;&lt;/em&gt;*&lt;a class="" href="#Primary_ID" title="wikilink"&gt;&lt;code&gt;primary``
``id&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt;&lt;code&gt;)&lt;/code&gt;&lt;strong&gt;&lt;em&gt;&lt;code&gt;:&lt;/code&gt;&lt;a class="" href="#Small_Attributes" title="wikilink"&gt;&lt;code&gt;Small``
``Attributes&lt;/code&gt;&lt;/a&gt;&lt;code&gt;&lt;/code&gt;&lt;/em&gt;&lt;code&gt;or&lt;/code&gt;*&lt;code&gt;&lt;/code&gt;&lt;/strong&gt;&lt;code&gt;[&lt;/code&gt;&lt;strong&gt;&lt;code&gt;Number
of additional&lt;/code&gt;&lt;a class="" href="#Line_Attributes" title="wikilink"&gt;&lt;code&gt;Line``
``Attributes&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt;&lt;code&gt;]&lt;/code&gt;**&lt;/p&gt;
&lt;h3 id="attributes"&gt;Attributes&lt;/h3&gt;
&lt;p&gt;EEF specifies two methods of associating attributes with each Data&lt;br/&gt;
Block. Small data is typically stored in &lt;a class="" href="#Small_Attributes" title="wikilink"&gt;Small&lt;br/&gt;
Attributes&lt;/a&gt;, while larger snippets of data&lt;br/&gt;
are better suited to storage in &lt;a class="" href="#Line_Attributes" title="wikilink"&gt;Line&lt;br/&gt;
Attributes&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="small-attributes"&gt;Small Attributes&lt;/h4&gt;
&lt;p&gt;Small Attributes are those which appear after a &lt;a class="" href="#Data_Entry_Indicator" title="wikilink"&gt;Data Entry&lt;br/&gt;
Indicator&lt;/a&gt;; they can be completely&lt;br/&gt;
scalar, or can be given a value using a pair of parentheses. For&lt;br/&gt;
example, take this code:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Examples{1}&lt;/code&gt;&lt;br/&gt;
&lt;code&gt;Example: "yellow" Shape(Round)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Our Example entry is declared with two attributes. The first is the&lt;br/&gt;
valueless attribute "Yellow", which speaks for itself. The second is a&lt;br/&gt;
Shape attribute, which has been set to the value "Round". Quotes may&lt;br/&gt;
appear around any attribute, and are completely optional except where&lt;br/&gt;
otherwise ambiguous (for instance, the attribute "lime green" must be&lt;br/&gt;
quoted even though "yellow" may be left alone). Since attribute values&lt;br/&gt;
are surrounded by parentheses, quotes are generally unnecessary in them.&lt;/p&gt;
&lt;h4 id="line-attributes"&gt;Line Attributes&lt;/h4&gt;
&lt;p&gt;Line Attributes follow any &lt;a class="" href="#Data_Entries" title="wikilink"&gt;Data Entries&lt;/a&gt;&lt;br/&gt;
which define a non-zero count inside a pair of square brackets[]. Line&lt;br/&gt;
Attributes are Attributes which are given an entire line to themselves.&lt;br/&gt;
They may, semantically, instead be a single very large attribute which&lt;br/&gt;
spans multiple lines, but this is up to the application to determine;&lt;br/&gt;
this spec only mandates that the number of lines used is given up front&lt;br/&gt;
for the purposes of skipping or isolating.&lt;/p&gt;
&lt;h3 id="type-name"&gt;Type Name&lt;/h3&gt;
&lt;p&gt;The name of the members of the &lt;a class="" href="#Data_Blocks" title="wikilink"&gt;Data Block&lt;/a&gt;.&lt;br/&gt;
When used in the &lt;a class="" href="#Data_Block_Indicator" title="wikilink"&gt;Data Block&lt;br/&gt;
Indicator&lt;/a&gt;, it should be pluralized.&lt;br/&gt;
When used in a &lt;a class="" href="#Data_Entry_Indicator" title="wikilink"&gt;Data Entry Indicator&lt;/a&gt;,&lt;br/&gt;
it should be singular. The difference between the singular and plural&lt;br/&gt;
form shall be implementation-specific. By convention, the reader must&lt;br/&gt;
warn if the plural string doesn't match the singular string using&lt;br/&gt;
according to some regular expression generated from the singular string.&lt;br/&gt;
This generated regular expression can be anything from&lt;br/&gt;
&lt;code&gt;/&lt;/code&gt;&lt;em&gt;&lt;code&gt;singular&lt;/code&gt;&lt;/em&gt;&lt;code&gt;e?s?/&lt;/code&gt; to &lt;code&gt;/.*/&lt;/code&gt;. Since this requirement is purely&lt;br/&gt;
conventional, no check must actually be made by the implementation for&lt;br/&gt;
the latter expression.&lt;/p&gt;
&lt;p&gt;More advanced plurality checks can be accomplished loosely by starting&lt;br/&gt;
with the expression &lt;code&gt;/&lt;/code&gt;&lt;em&gt;&lt;code&gt;singular&lt;/code&gt;&lt;/em&gt;&lt;code&gt;e?s?/&lt;/code&gt;, and applying any expressions&lt;br/&gt;
in the following table to the &lt;em&gt;singular&lt;/em&gt;&lt;br/&gt;
string:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Find&lt;/th&gt;
&lt;th&gt;Replace with&lt;/th&gt;
&lt;th&gt;To support&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;y&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;[yi]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Property, Entry, Assembly...&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;f&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;[fv]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Leaf, Hoof, Elf, Self, Knife...&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ex&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;(ex\|ic)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Vertex, Index&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ix&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;(ix\|ic)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Matrix, Appendix&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ous&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;(ous\|ic)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Mouse, Louse&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;oo&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;(oo\|ee)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Goose, Tooth, Feet&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;on$&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;(on\|a)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Criterion, Phenomenon&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;um$&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;(um\|a)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Bacterium, Curriculum, Medium, Datum&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;is$&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;(is)?&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Axis, Analysis, Thesis&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;us$&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;(us\|i\|.ra)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Cactus, Fungus, Octopus, Alumnus, Succubus... Genus, Corpus, Viscus&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;an$&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;[ae]n&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Man, Woman&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;(r?en)?&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Children, Oxen&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;x?&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Beau, Bureau, Tableau&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;There only plural not covered by the entirety of the above table is&lt;br/&gt;
"person" -&amp;gt; "people".&lt;/p&gt;
&lt;h3 id="primary-id"&gt;Primary ID&lt;/h3&gt;
&lt;p&gt;Each &lt;a class="" href="#Data_Entry" title="wikilink"&gt;Data Entry&lt;/a&gt; should give itself a name or&lt;br/&gt;
ID, or some primary data affiliated with that particular entry. It does&lt;br/&gt;
not necessarily have to be unique, or even scalar. The primary ID is&lt;br/&gt;
simply a place to put the most important information about the entry.&lt;/p&gt;
&lt;h3 id="root"&gt;Root&lt;/h3&gt;
&lt;p&gt;Any line which lies outside the scope of lines claimed by any of the&lt;br/&gt;
above is considered to be at the &lt;strong&gt;root of the file.&lt;/strong&gt;&lt;/p&gt;
&lt;h3 id="length-prefixing"&gt;Length-prefixing&lt;/h3&gt;
&lt;p&gt;In other extensible formats, such as PNG, length-prefixed chunks and&lt;br/&gt;
chunk-IDs (or similar devices) are used to allow various readers to&lt;br/&gt;
ignore sets of data they are incapable of reading. In EEF, different&lt;br/&gt;
brackets are used to indicate various lengths.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Curly braces {}&lt;/strong&gt; are used to indicate a number of repetitions of&lt;br/&gt;
&lt;a class="" href="#Data_Blocks" title="wikilink"&gt;Data Blocks&lt;/a&gt;. The data that is repeated&lt;br/&gt;
    can be multiple lines, and the number of additional lines can vary.&lt;br/&gt;
    See the next point.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Square brackets []&lt;/strong&gt; are used in &lt;a class="" href="#Data_Entries" title="wikilink"&gt;Data&lt;br/&gt;
    Entries&lt;/a&gt; to indicate that a fixed number&lt;br/&gt;
    of lines follows which describe or belong to the current data block.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="example-file"&gt;Example File&lt;/h2&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;## Sample EEF file&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;Items{3} ## The {} tells us we'll be reading 3 fields of varying size before this block is over.&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="na"&gt;Item("Sword"): "Weapon" Damage(4) "Magic" Text[2] ## Note the use of [] to indicate lines we can skip if we don't know what this is.&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="na"&gt;A magical sword&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="na"&gt;Given to you by an elf or something.&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="na"&gt;Item("Pen"): "Weapon" Damage(.5) Text[2]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="na"&gt;An ordinary pen&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="na"&gt;Just a regular pen. Doesn't do much damage, but it's still mightier than the sword, right?&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="na"&gt;Item("Apple"): "Food" Health(10) Text[2]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="na"&gt;A delicious apple&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="na"&gt;Probably came from a tree, or something. Who knows. Restores 10HP and doesn't afraid of anything.&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;Collectables{1} ## Now that all three Items have been defined, we can end the file or declare new. We'll do the latter.&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="na"&gt;Collectable("Watch fob"): Text[2]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="na"&gt;A beautiful golden watch fob&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="na"&gt;It has absolutely no use.&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hugh Greene</dc:creator><pubDate>Fri, 20 Jan 2023 12:15:16 -0000</pubDate><guid>https://sourceforge.net69ad771f61912e567e594663baac71372ed5814f</guid></item></channel></rss>