Browsable PNML Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: automata/petri/pnml/standard/terms/extracted
Source used for this grammar: Lom Hillah, RELAX NG implementation of High-level Petri Nets Terms grammar, terms.rng, July 2008 [Download]

Summary

Syntax

Declarations ::=
	[declarations]::Declaration*
Declaration.content ::=
	[id]::string [name]::string
Declaration ::=
	SortDeclaration
	VariableDeclaration
	OperatorDeclaration
VariableDeclaration ::=
	[variabledecl]::(Declaration.content Sort)
SortDeclaration.content ::=
	Declaration.content
SortDeclaration ::=
	NamedSort
OperatorDeclaration.content ::=
	Declaration.content
OperatorDeclaration ::=
	NamedOperator
Variable ::=
	[variable]::[refvariable]::string
NamedSort ::=
	[namedsort]::(SortDeclaration.content Sort)
NamedOperator ::=
	[namedoperator]::(OperatorDeclaration.content [parameter]::VariableDeclaration* [def]::Term)
Term.content ::=
	ε
Term ::=
	Variable
	Operator
Sort.content ::=
	ε
Sort ::=
	BuiltInSort
	MultisetSort
	ProductSort
	UserSort
BuiltInSort ::=
	ε
MultisetSort ::=
	[multisetsort]::Sort
ProductSort ::=
	[productsort]::Sort*
UserSort ::=
	[usersort]::[declaration]::string
Operator.content ::=
	[subterm]::Term*
Operator ::=
	BuiltInOperator
	BuiltInConstant
	MultisetOperator
	Tuple
	UserOperator
BuiltInOperator.content ::=
	Operator.content
BuiltInOperator ::=
	ε
BuiltInConstant.content ::=
	Operator.content
BuiltInConstant ::=
	ε
MultisetOperator.content ::=
	Operator.content
MultisetOperator ::=
	ε
Tuple ::=
	[tuple]::Operator.content
UserOperator ::=
	[useroperator]::([declaration]::string Operator.content)

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