Skip to content

Instantly share code, notes, and snippets.

@neher
Created December 12, 2014 18:39
Show Gist options
  • Save neher/f5e86fe8d213f214166a to your computer and use it in GitHub Desktop.
Save neher/f5e86fe8d213f214166a to your computer and use it in GitHub Desktop.
Asciidoc bnf
{
parserClass="vietj.intellij.asciidoc.AsciiDocParser"
extends="com.intellij.extapi.psi.ASTWrapperPsiElement"
psiClassPrefix="AsciiDoc"
psiImplClassSuffix="Impl"
psiPackage="vietj.intellij.asciidoc.psi"
psiImplPackage="vietj.intellij.asciidoc.psi.impl"
elementTypeHolderClass="vietj.intellij.asciidoc.psi.AsciiDocTypes"
elementTypeClass="vietj.intellij.asciidoc.psi.AsciiDocElementType"
tokenTypeClass="vietj.intellij.asciidoc.psi.AsciiDocTokenType"
}
Document ::= (Header? Preamble? Section*)
Header ::= (Title (AuthorInfo RevisionInfo?)?)
AuthorInfo ::= (FirstName (MiddleName? LastName)? EmailAddress?)
RevisionInfo ::= (RevisionNumber? RevisionDate RevisionRemark?)
Preamble ::= (SectionBody)
Section ::= (Title SectionBody? (Section)*)
SectionBody ::= ((BlockTitle? Block)|BlockMacro)+
Block ::= (Paragraph|DelimitedBlock|List|Table)
List ::= (BulletedList|NumberedList|LabeledList|CalloutList)
BulletedList ::= (ListItem)+
NumberedList ::= (ListItem)+
CalloutList ::= (ListItem)+
LabeledList ::= (ListEntry)+
ListEntry ::= (ListLabel ListItem)
ListLabel ::= (ListTerm+)
ListItem ::= (ItemText (List|ListParagraph|ListContinuation)*)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment