I am having trouble finding a lexicon which provides terminology for the explicit patterns that are employed when parsing syntax. I am trying to write about the niggling differences between the 10+ different markdown parsing rules as they apply to nesting and how different markdown syntaxes which appear to have similar symbology have completely different parsing rules.
What I am trying accomplish is to completely disambiguate the meanings and/or terminology of some of ubiquitous parsing rules of syntax patterns that we probably don't even think about wondering what the name is. I came to realize that I don't have any idea what these patterns are called or if they even have explicit terminology. I was hoping that I could find a lexicon somewhere that might help me but I couldn't find anything that was both unambiguous or not specific to a particular language. In other words, I was looking for something "universally explicit".
Below are some examples of well-known patterns that I am trying to find clear terminology that explicitly describes those parsing patterns and/or the operators that invoke parsing rules. I did my best to give them "made up" names which I hope will convey their meaning but where I don't know the "proper" terminology.
I realize this might seem like a pedantic exercise, but I am hoping there is someone out there who not sees why this is important but also knows the answers!
- Grouping Operators - I believe there are only two different types these: those that have explicit symbols that denote the start and end of the group (i.e.: parentheses in arithmetic expressions) and those that use the same symbols (i.e.: single or double quotations marks in string interpolation)
- Is there a term that distinguishes between these two types of grouping operators?
- Other than "grouping", is there a term that explicitly means that symbol's syntactical scope is explicitly defined to be whatever is contained within those operators?
- Line-Scoped Operators - These are one or more symbols that appear at the beginning of a line which imply that their scope is the entire line, that is, everything up to whatever the EOL symbol is. (i.e.:
-which indicates a bullet or
#which indicates a level 1 heading in CommonMark.)
- Is there a term to describe this implied behavior where the symbol(s) must be anchored ad the beginning of the line and the scope is the entire line?
- Adjacent Operator - The operator symbol applies to an arbitrary scope that follows it, such as a "word", or specifically up to the next bare whitespace. To me this is the hardest pattern to describe since the rules for what is explicitly "adjacent" can use any number of delimiters, have a different means of escaping the delimiter symbol, and so on. A good example of this is boundary or inline operators in regex.
- What term best describes this pattern of operator where the scoping ends with some arbitrary symbol?
- Also, is there a term that describes the scope of these operators? This is tricky as different syntaxes have specific terms, such as how a delimited data file would call these "fields", but I have no idea what one calls the scope of a particular class of regex operator
- Block Operators - Same as Grouping Operators but they ignore the EOL symbol. (i.e.:
```for code fences in GFM)
- I think "block syntax" probably explicitly enough, except that it does differentiate the beginning and end like HTML tags to.
- Entity - A symbolic word which is translated to a specific unicode character, such as how
©is rendered as ©
- I use the term "Entity" as it applies in markdown, specifically GFM, but outside of GFM "Entity" is about as generic a term can get so hopefully there is an term that explicitly means this kind of pattern universally.
I realize that this question may be more about lexical semantics than software engineering, but since being explicit in programming (or at least fully understanding what constitutes "explicit" in a given context) is how a programmer avoids total chaos and dismal, fiery failure, I figured that this would be the place where I might actually find a lexical ninja erudite enough to actually know what some of these patterns are actually named.