Skip to content
Snippets Groups Projects
Verified Commit 4a2ee8b2 authored by Dan Allen's avatar Dan Allen
Browse files

clarify terminology and fix grammar errors

* change "source feature" to "source characteristic"
* clarify that inline parsing only happens on leaf blocks
* give examples for inline elements and preprocessor directives
parent 865ac9d0
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ The block content models are: basic, verbatim, compound, empty, and raw.
== Basic
A block that belongs to the basic content model can only contain uninterpreted text, inline elements, and inline preprocessor directives.
A block that belongs to the basic content model can only contain uninterpreted text, inline elements (e.g., formatted text, inline macro), and inline preprocessor directives (e.g., attribute reference).
Basic block content cannot contain any child block elements.
A basic block is represented as a terminal block node in the ASG tree.
......@@ -16,7 +16,7 @@ The following block elements belong to the basic content model by default:
* paragraph
* table cell
* principle text of list item
* principal text of list item
Currently, the later two do not support block attributes.
This is expected to change in a future revision of a specification so they behave more like a paragraph.
......
......@@ -8,9 +8,10 @@ A block always starts at the beginning or effective beginning of a whole line an
Block elements are separated from one another by boundaries.
These boundaries are either implicit, such as an empty line, or explicit, such as a delimiter line that is part of an enclosure.
An enclosure is a source feature of some blocks.
Specifically, a block element consists of two or three source features: an enclosure, content, and metadata.
These three features are described in the following sections.
An enclosure is a source characteristic of some blocks.
Specifically, a block element consists of two or three source characteristics: an enclosure, content, and metadata.
Once parsed, the enclosure does not produce a block which is fundamentally different from a block without an enclosure.
These three characteristics are described in the following sections.
=== Boundaries and enclosures
......
......@@ -15,7 +15,7 @@ Once the parser has identified the boundaries of a block, the lines that compris
If and how the lines that comprise a block should be parsed is determined by the block's content model and further refined by the block style or macro name of the block.
The block's content model and its style or macro name instruct the parser whether it should change the block from one type to another, run the inline preprocessor in a certain mode on the lines, and run the inline parser on the lines.
Inline parsing occurs as soon as the end of the block is identified.
Inline parsing occurs as soon as the end of a leaf block is identified (a compound block cannot have inlines).
The inline parsing of a block always happens before the inline parsing of blocks that follow the block in document order.
When the parser completes the parsing of a block it records the name of the block, its variant (if applicable), its structural form, and any block metadata as properties of a block node in the ASG.
......
......@@ -2,8 +2,8 @@
_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).
[[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 and certain non-elements of an AsciiDoc document.
The ASG also tracks 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.
......@@ -21,7 +21,7 @@ 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.
[[basic-block]]basic block content model; basic block:: A block that belongs to the basic block content model 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.
......
......@@ -463,7 +463,7 @@ When set, a boolean attribute typically has an empty value.
* A *block element*, referred to as a *block*, is a discrete, line-wise element in the document structure.
* A block always starts and ends on a whole line (starts at beginning of a line or effective beginning and ends at the end of the same or different line.
* A block may have two to three source features: metadata, a body, and an enclosure.
* A block may have two to three source characteristics: metadata, a body, and an enclosure.
* Block structural forms include: paragraph, indented lines, delimited, macro, heading?, shorthand macro, list?, dlist? (lists and headings might also be referred to as prefixed?)
** May also need a "generated" form
* The body of a block may have an enclosure that is formed by delimiter lines.
......
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