Skip to content
Snippets Groups Projects
Verified Commit 54de1853 authored by Sarah White's avatar Sarah White
Browse files

add lexicon page with block terminology

parent 048b1f3f
No related branches found
No related tags found
No related merge requests found
= Lexicon
_This section is non-normative._
[[asg]]abstract semantic graph (ASG):: The Abstract Semantic Graph (ASG) is a tree structure made up of <<node,nodes>> that model the parsed semantic elements, select non-elements of an AsciiDoc document.
The ASG also include source mapping information for these nodes (i.e., where the nodes were found in the source document).
The primary purpose of the ASG is to validate that an implementation is compliant with the AsciiDoc language specification.
[[attribute]]attribute:: An attribute is a key-value pair that adds, removes, or controls a feature on an <<element>> or document.
An attribute that is available to a document as a whole is called a document attribute and is typically configured using an attribute entry.
An attribute that applies to a block or inline element is configured using an <<attrlist>> and is usually described to according to its form, key, or value properties:
* form: named, <<posattr,positional>>
* key name: reserved, shorthand, user-defined
* value type: boolean, <<content-attribute,content>>, reserved, user-defined
[[attrlist]]attrlist:: An attrlist is the source text between the opening `[` and closing `]` characters of a <<boxed-attrlist>>.
The attrlist source text may be empty or contain one or more <<posattr,positional>> or named attributes.
In some cases, the first positional attribute can encode select attributes (e.g., id, style, roles) in shorthand form.
For some inline forms, the designated area for an attrlist is used to hold inline content, either in place of the attrlist or following it.
That inline content is not parsed as part of the attrlist.
The attrlist is parsed into a map of attributes that are associated with the node for a block or inline element.
The source text an attrlist can contain, and how the attrlist is interpreted, is dependent on the grammar rules of the element on which it is defined.
[[basic-block]]basic block content model; basic block:: A block that belongs to the basic block content can only contain <<uninterpreted-text>>, <<inline-element,inline elements>> and inline preprocessor directives.
Such blocks may be referred to informally as basic blocks.
A basic block is represented by a terminal block node in the ASG.
block:: See <<block-element,block element>>.
[[block-attribute-line]]block attribute line:: A block attribute line is a <<boxed-attrlist>> entered directly above a block, block title, or another block attribute line.
//A block attribute line must start at the first position on a new line.
//No other elements may be entered on the same line as the block attribute line once it is closed by the closing `]` character.
[[block-element]]block element; block:: A block is an <<element>> that is stacked vertically by line relative to surrounding block elements in the source text.
A block can have two or three features in the source text: an enclosure, content, and metadata.
Each block has a <<name>> that identifies the block's primary function.
The name is either derived from the block's `style` attribute or inferred by the block's <<structural-form>>.
The structural form of a block identifies the block's <<content-model>> which dictates what content the block can contain and how that content is processed.
In addition to a name, some blocks can also have a <<variant>>.
[[block-metadata]]block metadata:: Block metadata is a superset of properties of a <<block-element,block>>.
Block metadata is optional and may include a block title line or zero or more <<block-attribute-line,block attribute lines>> stacked linewise directly on top of the block content or opening delimiter line.
[[boxed-attrlist]]boxed attribute list:: A boxed attrlist begins with an opening `[` character and ends with a closing `]` character.
It may be empty or contain an <<attrlist>>.
The position of a boxed attrlist is dictated by the element on which it is defined, though it always precedes the element in document order.
[[compound-block]]compound block content model; compound block:: A block that belongs to the compound block content model can only directly contain other <<block-element,blocks>>.
Such blocks may be referred to informally as compound blocks.
A compound block is represented by a parent block node in the ASG.
[[content-attribute]]content attribute:: Certain block and inline attributes may be designated as content attributes.
A content attribute can contain <<markup,markup>> in its value that will be interpreted if the value is enclosed in a pair of single quotes.
This value is then converted into an array of inlines and promoted to the element's node.
[[content-model]]content model:: A content model defines the permitted content an <<element>> can contain, if any, and the common rules to which the block subscribes.
Except in a few specific cases, such as a discrete heading, a parser identifies the content model of an element using its <<structural-form>>.
[[element]]element:: An element is an identifiable, addressable, and composable chunk of source text in a document.
Each element has a <<structural-form>> and <<content-model>> and, when parsed, is represented by a <<node>> in the ASG.
There are two types of elements: <<block-element,block elements>> and <<inline-element,inline elements>>.
[[form]]form:: Form is a property of an <<element>> represented in the ASG.
Form maps to the <<structural-form>> of an element.
//general inline content?
[[general-text]]general text:: General text, such as the contents of a paragraph, may contain <<markup,markup>> that is interpreted.
When general text is interpreted, it produces a collection of <<inline-element,inline elements>>.
If no grammar rules can be matched in a run of general text, that text is treated as <<uninterpreted-text>>.
[[inline-element]]inline element:: An inline element is an inline node with properties.
Inline elements consist of <<span,marked text (span)>>, inline macros, and inline shorthands.
Some inline elements may contain nested inline elements.
marked text:: See <<span>>.
[[markup]]marks; markup:: Marks, also called markup, are additional characters added to the source text either to add semantics or to specify formatting; these characters are processor hints.
[[name]]name:: Name is a property on an <<element>> represented in the ASG.
Name identifies an element's primary function.
If a name isn't specified in the source text of the element, it's inferred by the <<structural-form>> of the element.
[[node]]node:: A node represents a parsed segment of the document in the <<asg,ASG tree structure>>.
There are five node types: block parent, block terminal, inline parent, inline terminal, and inline literal/string.
The block parent and block terminal types map to <<block-element,block elements>>; the inline parent and inline terminal types map to <<inline-element,inline elements>>.
The inline literal/string type maps to <<uninterpreted-text>>.
Every node has a <<name>>.
A node may also have a <<variant>> and a <<form>>.
// An attribute entry may be a non-element block terminal
[[posattr]]positional attribute; posattr:: A positional attribute, also referred to as a posattr, is an <<attribute>> that may be configured on a block or inline element.
The name of the attribute is implied by the location its value is entered in an <<attrlist>> using a 1-based index.
//The first positional attribute in an attrlist may contain attribute shorthands if it adheres to the syntax requirements of that element.
[[source-text]]source text:: The text that makes up the AsciiDoc document.
Akin to the source code of the AsciiDoc language.
[[span]]span:: A span in an <<inline-element>> that is produced by a run of source text enclosed by a pair of semantic marks.
The marks used determine the <<structural-form>>, <<name>> and <<variant>> (e.g., strong, emphasis) of the span.
A span can support a preceding <<boxed-attrlist>>; only the shorthand forms of the `id` and `role` attributes are recognized.
In the grammar, we may refer to this as marked text; in the node model, it's a span.
A span is delimited content in the inline model.
[[structural-form]]structural form:: A structural form describes how an element is expressed in the source text.
A structural form is recognized by a parser based on the grammar rule that it matches.
The structural form informs the parser about what content model it should apply to the source text that comprised the block or inline element.
[[uninterpreted-text]]uninterpreted text:: Uninterpreted text is character data for which all inline grammar rules fail to match.
Thus, uninterpreted text is effectively all the text between inline elements at any level of nesting.
[[variant]]variant:: Variant is a property of an <<element>> represented in the ASG.
The variant identifies the specialization of an element.
Not all elements have variants.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment