AsciiDoc grammar for tree-sitter
Warning
The grammar is not yet complete and the names of the rules or the structure of the tree nodes may change.
Note
Until the first version of the AsciiDoc Language Specification is ratified, AsciiDoc is defined by the Asciidoctor implementation. There is no other official definition of the language.
Source: AsciiDoc Language Documentation - About this documentation
Not everything in the checklists is relevant to grammar.
(document
(document_header
(document_title)
(document_authors)
(document_revision)
(document_attribute))
...
(document_body
...))
- Lines
- Empty lines
- Extended lines with
\
on the end - Paragraphs
- Blocks with title, attributes, anchor, title
- Text and inline elements
-
Document Title
(document_title)
-
Author Information
- Authors Line
(document_authors)
-
Revision Information
(document_revision)
-
Document Attributes
-
Comments
-
Document Attributes
(document_attribute (attribute_name) (attribute_value))
-
Element Attributes
- Line
(element_attributes (_attribute_list (_attribute_unparsed ...)))
-
Sections
(section)
-
Parts
(part)
-
Paragraphs
(paragraph)
-
Breaks
-
Thematic Breaks
(break)
-
Page Breaks
(page_break)
-
-
Text Formatting and Punctuation
- ...
-
Lists
- Unordered Lists
- Ordered Lists
- Checklists
-
Description Lists
- Horizontal Description List
- Question and Answer Lists
- Description Lists With Marker
-
Links
-
Cross References
-
Footnotes
-
Images
-
Audio and Video
-
Icons
-
Keyboard Macro
-
Button and Menu UI Macros
-
Admonitions
-
Sidebars
(sidebar_block)
(sidebar_block (element_attributes) (open_block/paragraph))
-
Example Blocks
(example_block)
(example_block (element_attributes) (open_block/paragraph))
-
Blockquotes
-
Verses
-
Verbatim and Source Blocks
-
Source Code Blocks
-
Listing Blocks
(listing_block)
(listing_block (element_attributes) (open_block/paragraph))
-
Literal Blocks
(literal_block)
(literal_block (element_attributes) (open_block/paragraph))
-
-
Tables
-
Equations and Formulas (STEM)
-
Open Blocks
(open_block)
-
Collapsible Blocks
-
Comments
-
Comment Line
(comment (comment_line))
-
Comment Block
(comment (comment_block))
-
Comment Open Block Style
(comment (element_attributes) (open_block))
-
Comment Paragraph Style
(comment (element_attributes) (paragraph))
-
-
Includes
-
Conditionals
-
Passthroughs
(pass_block)
(pass_block (element_attributes) (paragraph))