Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: doc/wiki/mediawiki/ebnf/extracted
Source used for this grammar: MediaWiki, Markup spec/EBNF, Revision 335623, 5 July 2010 [Page]
digit
, URL
, ASCII_letter
, URL_char
, text
, full_pagename
, namespace
, pagename
, start_link
, end_link
, internal_link
, external_link
, redirect
, header_link
, ISBN_link
, header_end
, header6
, header5
, header4
, header3
, header2
, header1
, comment
, Commentary
, horizontal_rule
, bold_italic_text
, bold_text
, italic_text
, code_line
, nowiki
, unordered_list
, continue_unordered_list
, ordered_list
, continue_ordered_list
, definition_list
, continue_definition_list
, user_signature
, user_signature_with_date
, current_date
, include
, template
, tplarg
, part
, title
, name
, value
, balanced_text
, place_TOC
, force_TOC
, disable_TOC
, disable_section_edit
, table_start
, table_end
, table_header
, table_header_cell
, table_cell
, table_row
, table_body
, table
, Unicode_char
), 0 root (—), 27 top (external_link
, redirect
, header_link
, ISBN_link
, header6
, header5
, header4
, header3
, header2
, header1
, comment
, Commentary
, horizontal_rule
, bold_italic_text
, bold_text
, italic_text
, code_line
, nowiki
, user_signature
, user_signature_with_date
, current_date
, place_TOC
, force_TOC
, disable_TOC
, disable_section_edit
, table_header
, table
), 13 bottom (whitespace
26, WhiteSpace
, line_break
7, label
, label_extension
2, whitespace_Label
, style
5, Style
, tablecell
, Text
3, linebreak
18, text_without_consecutive_equal_braces
2, endLink
).digit ::= "1" "2" "3" "4" "5" "6" "7" "8" "9" "0"
URL ::= ASCII_letter"://" URL_char
ASCII_letter ::= "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z" "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z"
URL_char ::= ASCII_letter digit "-" "_" "." "~" "!" "*" "'" "(" ")" ";" ":" "@" "&" "=" "+" "$" "," "/" "?" "%" "#" "[" "]"
text ::=
Unicode_char
full_pagename ::= ":"":" pagenamenamespace
namespace ::=
Unicode_char Unicode_char
pagename ::=
Unicode_char Unicode_char
start_link ::=
"[["
end_link ::=
"]]"
internal_link ::= start_link full_pagename "|" label end_link label_extension
external_link ::=
URL
start_link URL whitespace_Label
endLink label_extensionredirect ::=
"#REDIRECT" internal_link
header_link ::= "/*" text "*/"
ISBN_link ::= digit "-"" " digit digit digit "-"" " digit digit digit digit digit "-"" " digit"X""x"
header_end ::=
whitespace
line_breakheader6 ::= line_break "======" whitespace text whitespace "======" header_end
header5 ::= line_break "=====" whitespace text whitespace "=====" header_end
header4 ::= line_break "====" whitespace text whitespace "====" header_end
header3 ::= line_break "===" whitespace text whitespace "===" header_end
header2 ::= line_break "==" whitespace text whitespace "==" header_end
header1 ::= line_break "=" whitespace text whitespace "=" header_end
comment ::= "<!--" Text "-->"
Commentary ::= "<comment" Text ">" Text "</comment>"
horizontal_rule ::= "----" "-"
bold_italic_text ::= "'''''" text "'''''"
bold_text ::= "'''" text "'''"
italic_text ::= "''" text "''"
code_line ::=
linebreak " " text
nowiki ::= "<nowiki>" text "</nowiki>"
unordered_list ::=
"*" text
continue_unordered_list ::= ":""*""#" linebreak unordered_listunordered_list continue_unordered_list
ordered_list ::=
"#" text
continue_ordered_list ::= ":""*""#" linebreak ordered_listordered_list continue_ordered_list
definition_list ::= text":" text
continue_definition_list ::= ":""*""#" linebreak definition_listdefinition_list continue_definition_list
user_signature ::=
"~~~"
user_signature_with_date ::=
"~~~~"
current_date ::=
"~~~~~"
include ::= template tplarg
template ::= "{{" title "|" part "}}"
tplarg ::= "{{{" title "|" part "}}}"
part ::= "=" valuename
title ::= balanced_text
name ::= balanced_text
value ::= balanced_text
balanced_text ::= text_without_consecutive_equal_bracesinclude text_without_consecutive_equal_braces
place_TOC ::= "__TOC__" whitespace linebreakwhitespace linebreak
force_TOC ::= "__FORCETOC__" whitespace linebreakwhitespace linebreak
disable_TOC ::= "__NOTOC__" whitespace linebreakwhitespace linebreak
disable_section_edit ::= "__NOEDITSECTION__" whitespace linebreakwhitespace linebreak
table_start ::= "{|" style whitespace linebreak
table_end ::=
"|}"
table_header ::=
"|+" text linebreak
table_header_cell ::= linebreak "!" style whitespace text tablecell "!!""||" style whitespace text
table_cell ::= linebreak "|" style whitespace text table_cell "||" Style WhiteSpace text
table_row ::= linebreak "|-" "-" style whitespace linebreak
table_body ::=table_header_cell table_cell table_row table_header_cell table_cell
table ::=
table_start table_row
table_body table_endUnicode_char ::= α