glossary.gmi (2611B)
1 # Glossary 2 3 There are quite a few terms with specific meanings when talking about stred and subexes. This document is a reference to describe each term to help you get to grips with the tutorial/manual/source code. 4 5 ### Array 6 A data structure consisting of an ordered list of values. 7 8 ### Atom 9 An atom is the simplest component of data in stred. It is one of: null, a boolean, a number, a string terminal, a string rune or a terminal. 10 11 ### Command 12 A single instruction telling stred what to do. stred is run with an ordered list of commands that for each token in the input, it will go through the commands and run them in order. 13 14 ### Key 15 The string part of a map item. Keys in the input file are not treated as tokens. 16 17 ### Map 18 A data structure consisting of an ordered list of pairs, each with a key and a value. Keys can be repeated. 19 20 ### Number 21 A 64-bit float. 22 23 ### Path 24 An ordered list of integers and strings that represents the route taken from the root node to a value or token. 25 26 ### Path register 27 Every time a token is read from the input, this register is set to the path of the token translated into atoms. 28 29 ### Register 30 A location that can store an ordered list of atoms. stred has 5 registers: path, token, X, Y and Z 31 32 ### Root 33 The value that is at the outermost level of the input data. Every other value is nested somewhere inside the root. 34 35 ### Scalar 36 A simple value. It is one of: null, a boolean, a number or a string. Scalars are somewhere between atoms and values. 37 38 ### String 39 A scalar containing an ordered list of unicode codepoints. When split into atoms, it is made of a string terminal, followed by a string rune for each unicode codepoint, followed by another string terminal. 40 41 ### String Rune 42 An atom representing a single unicode codepoint. 43 44 ### String Terminal 45 An atom representing either the start or the end of a string. 46 47 ### Subex 48 Short for substitute expression. A subex will be given a list of atoms as input, and depending on the contents of the subex, will either accept the input and produce a new list of atoms as output, or will just reject the input. 49 50 ### Terminal 51 An atom marking either the beginning or the end of either a map or an array. 52 53 ### Token 54 A single part of the input tree. It is either a scalar or a terminal. The input tree is processed one token at a time. 55 56 ### Token register 57 Every time a token is read from the input, this register is set to that token translated into atoms. 58 59 ### Value 60 A tree value. It is one of: null, a boolean, a number, a string, an array or a map. 61 62 ### X, Y and Z registers 63 General purpose registers that have no specific purpose.