= AsciidoctorJ Conversion Process Overview

Before starting to write your first extension, some basic understanding of how Asciidoctor treats the document is helpful.
As any language processing tool, the process can be roughly split into three steps:

. Parsing: the raw sources content is read and analyzed to generate the internal representation, the AST (_abstract syntax tree_).
. Processing: the AST is processed. For example to detect possible errors, add automatically generated content (toc), etc.
. Output generation: once the final AST is set, it's again processed to generate the desired output.
For example, a sub-section of the AST representing a title with a paragraph will be converted into its correspondent HTML or PDF output.

NOTE: Some liberty is taken to make the process easier to understand.
In reality, Asciidoctor has implementation details that divert from the 3 steps above.

The different extension types are called in different steps of the conversion process in the following order:

. IncludeProcessors are called in an arbitrary and changeable order during processing and are called whenever an `include::` is found.
. Preprocessors are called just before parsing.
. BlockMacroProcessors are called during processing in the order that they appear in the document.
. BlockProcessors are called during processing in the order that they appear in the document.
. Treeprocessors are called right before processing.
. InlineMacroProcessors are called during processing in the order that they appear in the document.
. Postprocessors are called before output generation.
. DocinfoProcessors are called in an arbitrary and changeable order during processing.

= AsciidoctorJ Conversion Process Overview

Before starting to write your first extension, some basic understanding of how Asciidoctor treats the document is helpful.
As any language processing tool, the process can be roughly split into three steps:

. Parsing: the raw sources content is read and analyzed to generate the internal representation, the AST (_abstract syntax tree_).
. Processing: the AST is processed. For example to detect possible errors, add automatically generated content (toc), etc.
. Output generation: once the final AST is set, it's again processed to generate the desired output.
For example, a sub-section of the AST representing a title with a paragraph will be converted into its correspondent HTML or PDF output.

NOTE: Some liberty is taken to make the process easier to understand.
In reality, Asciidoctor has implementation details that divert from the 3 steps above.

The different extension types are called in different steps of the conversion process in the following order:

. IncludeProcessors are called in an arbitrary and changeable order during processing and are called whenever an `include::` is found.
. Preprocessors are called just before parsing.
. BlockMacroProcessors and BlockProcessors are called during processing in the order that they appear in the document.
. Treeprocessors are called right before processing.
. InlineMacroProcessors are called during processing in the order that they appear in the document.
. Postprocessors are called before output generation.
. DocinfoProcessors are called in an arbitrary and changeable order during processing.

Clarify that BlockMacro- and BlockProcessors are called in the same stage
Clarify that BlockMacro- and BlockProcessors are called in the same stage
