Browsable XBGF Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: transform/xbgf/xsd/extracted
Source used for this grammar: Vadim Zaytsev, Software Language Processing Suite, XBGF, language::XBGF, 2009–2012 [Explore]

Summary

Syntax

sequence ::=
	(transformation | atomic)*
transformation ::=
	folding-unfolding-transformation
	refactoring-transformation
	increasing-transformation
	decreasing-transformation
	concrete-revising-transformation
	abstract-revising-transformation
	decorative-transformation
	rename
	reroot
	strip
	dump
	bypass
folding-unfolding-transformation ::=
	unfold
	fold
	inline
	extract
	abridge
	detour
	unchain
	chain
unfold ::=
	[nonterminal]::nonterminal [in]::scope?
nonterminal ::=
	string
scope ::=
	[label]::label
	[nonterminal]::nonterminal
label ::=
	string
fold ::=
	[nonterminal]::nonterminal [in]::scope?
inline ::=
	nonterminal
extract ::=
	production [in]::scope?
production ::=
	[label]::label? [nonterminal]::nonterminal expression
expression ::=
	[epsilon]::ε
	[empty]::ε
	[value]::value
	[any]::ε
	[terminal]::terminal
	[nonterminal]::nonterminal
	[selectable]::([selector]::selector expression)
	[marked]::expression
	[sequence]::expression+
	[choice]::expression+
	[allof]::expression+
	[not]::expression
	[optional]::expression
	[plus]::expression
	[star]::expression
	[seplistplus]::(expression expression)
	[sepliststar]::(expression expression)
value ::=
	[int]::ε
	[string]::ε
terminal ::=
	string
selector ::=
	string
abridge ::=
	production
detour ::=
	production
unchain ::=
	production
chain ::=
	production
refactoring-transformation ::=
	massage
	distribute
	factor
	deyaccify
	yaccify
	eliminate
	introduce
	import
	vertical
	horizontal
	equate
	rassoc
	lassoc
	iterate
	splitT
massage ::=
	expression expression [in]::scope?
distribute ::=
	scope
factor ::=
	expression expression [in]::scope?
deyaccify ::=
	[nonterminal]::nonterminal
yaccify ::=
	production+
eliminate ::=
	[nonterminal]::nonterminal
introduce ::=
	production+
import ::=
	production+
vertical ::=
	scope
horizontal ::=
	[nonterminal]::nonterminal
equate ::=
	[align]::nonterminal [with]::nonterminal
rassoc ::=
	production
lassoc ::=
	production
iterate ::=
	production
splitT ::=
	[terminal]::terminal [into]::[terminal]::terminal+ [in]::scope?
increasing-transformation ::=
	add
	appear
	widen
	upgrade
	unite
add ::=
	[vertical]::production
	[horizontal]::production
appear ::=
	production
widen ::=
	expression expression [in]::scope?
upgrade ::=
	production production
unite ::=
	[add]::nonterminal [to]::nonterminal
decreasing-transformation ::=
	remove
	disappear
	narrow
	downgrade
	split
remove ::=
	[vertical]::production
	[horizontal]::production
disappear ::=
	production
narrow ::=
	expression expression [in]::scope?
downgrade ::=
	production production
split ::=
	[nonterminal]::nonterminal production+ scope*
concrete-revising-transformation ::=
	abstractize
	concretize
	permute
abstractize ::=
	production
concretize ::=
	production
permute ::=
	production
abstract-revising-transformation ::=
	define
	undefine
	redefine
	inject
	project
	replace
define ::=
	production+ [tag]::string
undefine ::=
	[nonterminal]::nonterminal+ [tag]::string
redefine ::=
	production+ [tag]::string
inject ::=
	production [tag]::string
project ::=
	production [tag]::string
replace ::=
	expression expression [in]::scope? [tag]::string
decorative-transformation ::=
	designate
	unlabel
	deanonymize
	anonymize
designate ::=
	production
unlabel ::=
	[label]::label
deanonymize ::=
	production
anonymize ::=
	production
rename ::=
	[label]::([from]::label [to]::label)
	[nonterminal]::([from]::nonterminal [to]::nonterminal)
	[selector]::([in]::label? [from]::selector [to]::selector)
	[terminal]::([from]::terminal [to]::terminal)
reroot ::=
	[root]::nonterminal*
strip ::=
	[label]::label
	[allLabels]::ε
	[selector]::selector
	[allSelectors]::ε
	[terminal]::terminal
	[allTerminals]::ε
dump ::=
	ε
bypass ::=
	ε
atomic ::=
	transformation+

GrammarLabMaintained by Dr. Vadim Zaytsev a.k.a. @grammarware. Last updated in September 2015. []