Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
161 lines (160 sloc) 4.39 KB
<?xml version="1.0" encoding="UTF-8"?>
<xbgf:sequence xmlns:xbgf="http://planet-sl.org/xbgf" xmlns:bgf="http://planet-sl.org/bgf">
<!-- the next is actually no defining special symbols, but dealing with them somehow anyway -->
<!-- special block special symbols -->
<xbgf:vertical>
<nonterminal>TableCellParameter</nonterminal>
</xbgf:vertical>
<xbgf:remove>
<vertical>
<bgf:production>
<nonterminal>TableCellParameter</nonterminal>
<bgf:expression>
<sequence>
<bgf:expression>
<nonterminal>?</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>HTML</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>cell</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>attributes</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>?</nonterminal>
</bgf:expression>
</sequence>
</bgf:expression>
</bgf:production>
</vertical>
</xbgf:remove>
<xbgf:add>
<vertical>
<bgf:production>
<nonterminal>TableCellParameter</nonterminal>
<bgf:expression>
<nonterminal>html-cell-attributes</nonterminal>
</bgf:expression>
</bgf:production>
</vertical>
</xbgf:add>
<xbgf:horizontal>
<nonterminal>TableCellParameter</nonterminal>
</xbgf:horizontal>
<!-- special block special symbols -->
<xbgf:vertical>
<nonterminal>TableParameters</nonterminal>
</xbgf:vertical>
<xbgf:remove>
<vertical>
<bgf:production>
<nonterminal>TableParameters</nonterminal>
<bgf:expression>
<sequence>
<bgf:expression>
<nonterminal>?</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>HTML</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>table</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>attributes</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>?</nonterminal>
</bgf:expression>
</sequence>
</bgf:expression>
</bgf:production>
</vertical>
</xbgf:remove>
<xbgf:add>
<vertical>
<bgf:production>
<nonterminal>TableParameters</nonterminal>
<bgf:expression>
<nonterminal>html-table-attributes</nonterminal>
</bgf:expression>
</bgf:production>
</vertical>
</xbgf:add>
<xbgf:horizontal>
<nonterminal>TableParameters</nonterminal>
</xbgf:horizontal>
<!-- defining some unresolved nonterminals from configuration; valid only for default configuration of MediaWiki for Wikipedia (which is great for a baseline grammar) -->
<xbgf:define>
<bgf:production>
<nonterminal>FROM_LANGUAGE_FILE</nonterminal>
<bgf:expression>
<terminal>#redirect</terminal>
</bgf:expression>
</bgf:production>
</xbgf:define>
<xbgf:inline>FROM_LANGUAGE_FILE</xbgf:inline>
<xbgf:define>
<bgf:production>
<nonterminal>STRING_FROM_DB</nonterminal>
<bgf:expression>
<terminal>Wikipedia</terminal>
</bgf:expression>
</bgf:production>
</xbgf:define>
<xbgf:inline>STRING_FROM_DB</xbgf:inline>
<!-- [_0-9A-Za-z\x80-\xff] -->
<xbgf:define>
<bgf:production>
<nonterminal>STRING_FROM_CONFIG</nonterminal>
<bgf:expression>
<value>string</value>
</bgf:expression>
</bgf:production>
</xbgf:define>
<xbgf:inline>STRING_FROM_CONFIG</xbgf:inline>
<!-- by default, "Category" -->
<xbgf:define>
<bgf:production>
<nonterminal>NS_CATEGORY</nonterminal>
<bgf:expression>
<terminal>Category</terminal>
</bgf:expression>
</bgf:production>
</xbgf:define>
<xbgf:inline>NS_CATEGORY</xbgf:inline>
<!-- <protocol> ::= ALLOWED_PROTOCOL_FROM_CONFIG (e.g. "http://", "mailto:") -->
<xbgf:define>
<bgf:production>
<nonterminal>ALLOWED_PROTOCOL_FROM_CONFIG</nonterminal>
<bgf:expression>
<choice>
<bgf:expression>
<terminal>http://</terminal>
</bgf:expression>
<bgf:expression>
<terminal>https://</terminal>
</bgf:expression>
<bgf:expression>
<terminal>ftp://</terminal>
</bgf:expression>
<bgf:expression>
<terminal>ftps://</terminal>
</bgf:expression>
<bgf:expression>
<terminal>mailto:</terminal>
</bgf:expression>
</choice>
</bgf:expression>
</bgf:production>
</xbgf:define>
<xbgf:inline>ALLOWED_PROTOCOL_FROM_CONFIG</xbgf:inline>
<!-- seems this way, need to validate -->
<xbgf:unite>
<add>LEGAL_ARTICLE_ENTITY</add>
<to>article-title</to>
</xbgf:unite>
</xbgf:sequence>