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

clarify terminology

* change "source feature" to "source characteristic"
* clarify that inline parsing only happens on leaf blocks
* give examples for inline elements and preprocessor directives
parent 54de1853
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. ...@@ -8,7 +8,7 @@ The block content models are: basic, verbatim, compound, empty, and raw.
== Basic == 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. Basic block content cannot contain any child block elements.
A basic block is represented as a terminal block node in the ASG tree. A basic block is represented as a terminal block node in the ASG tree.
......
...@@ -8,9 +8,10 @@ A block always starts at the beginning or effective beginning of a whole line an ...@@ -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. 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. 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. An enclosure is a source characteristic of some blocks.
Specifically, a block element consists of two or three source features: an enclosure, content, and metadata. Specifically, a block element consists of two or three source characteristic: an enclosure, content, and metadata.
These three features are described in the following sections. Once parsed, the enclosure does not produce a block which is fundamentally different from a block without an enclosure.
These three characteristic are described in the following sections.
=== Boundaries and enclosures === Boundaries and enclosures
......
...@@ -15,7 +15,7 @@ Once the parser has identified the boundaries of a block, the lines that compris ...@@ -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. 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. 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. 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. 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.
......
...@@ -463,7 +463,7 @@ When set, a boolean attribute typically has an empty value. ...@@ -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 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 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 characteristic: 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?) * 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 ** May also need a "generated" form
* The body of a block may have an enclosure that is formed by delimiter lines. * 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