Browsable PNML Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: automata/petri/pnml/standard/highlevel/net/extracted
Source used for this grammar: Lom Hillah, Petri Net Type Definition for High-level Petri Nets Graphs (HLPNGs), highlevelnet.pntd, July 2008 [Download]

Summary

Syntax

nettype.uri ::=
	[type]::"http://www.pnml.org/version-2009/grammar/highlevelnet"
BuiltInSort ::=
	List
BuiltInOperator ::=
	ListOperator
List ::=
	[list]::Sort
BuiltInConstant ::=
	EmptyList
ListOperator.content ::=
	BuiltInOperator.content
ListOperator ::=
	ListAppend
	ListConcatenation
	MakeList
	ListLength
	MemberAtIndex
	Sublist
EmptyList ::=
	[emptylist]::(Sort BuiltInConstant.content)
ListLength ::=
	[listlength]::ListOperator.content
MakeList ::=
	[makelist]::(Sort ListOperator.content)
ListConcatenation ::=
	[listconcatenation]::ListOperator.content
ListAppend ::=
	[listappend]::ListOperator.content
MemberAtIndex ::=
	[memberatindex]::([index]::integer ListOperator.content)
Sublist ::=
	[sublist]::([start]::integer [length]::integer ListOperator.content)
BuiltInSort ::=
	String
BuiltInOperator ::=
	StringOperator
BuiltInConstant ::=
	StringConstant
String ::=
	[string]::ε
StringConstant.content ::=
	[value]::string
StringConstant ::=
	[stringconstant]::(StringConstant.content BuiltInConstant.content)
StringOperator.content ::=
	BuiltInOperator.content
StringOperator ::=
	StringLessThan
	StringLessThanOrEqual
	StringGreaterThan
	StringGreaterThanOrEqual
	StringConcatenation
	StringAppend
	StringLength
	Substring
StringLessThan ::=
	[lts]::StringOperator.content
StringLessThanOrEqual ::=
	[leqs]::StringOperator.content
StringGreaterThan ::=
	[gts]::StringOperator.content
StringGreaterThanOrEqual ::=
	[geqs]::StringOperator.content
StringConcatenation ::=
	[stringconcatenation]::StringOperator.content
StringLength ::=
	[stringlength]::StringOperator.content
StringAppend ::=
	[stringappend]::StringOperator.content
Substring ::=
	[substring]::([start]::integer [length]::integer StringOperator.content)
Declaration ::=
	Unparsed
SortDeclaration ::=
	ArbitrarySort
OperatorDeclaration ::=
	ArbitraryOperator
ArbitrarySort ::=
	[arbitrarysort]::SortDeclaration.content
ArbitraryOperator ::=
	[arbitraryoperator]::(OperatorDeclaration.content [input]::Sort* [output]::Sort)
Unparsed ::=
	[unparsed]::(Declaration.content anyElement*)
nettype.uri ::=
	[type]::"http://www.pnml.org/version-2009/grammar/symmetricnet"
SortDeclaration ::=
	Partition
OperatorDeclaration ::=
	PartitionElement
BuiltInOperator ::=
	PartitionOperator
Partition ::=
	[partition]::(SortDeclaration.content Sort PartitionElement+)
PartitionElement ::=
	[partitionelement]::(OperatorDeclaration.content Term+)
PartitionOperator.content ::=
	BuiltInOperator.content
PartitionOperator ::=
	PartitionLessThan
	PartitionGreaterThan
	PartitionElementOf
PartitionLessThan ::=
	[ltp]::PartitionOperator.content
PartitionGreaterThan ::=
	[gtp]::PartitionOperator.content
PartitionElementOf ::=
	[partitionelementof]::([refpartition]::string PartitionOperator.content)
BuiltInSort ::=
	CyclicEnumeration
BuiltInOperator ::=
	CyclicEnumOperator
CyclicEnumeration ::=
	[cyclicenumeration]::FiniteEnumeration.content
CyclicEnumOperator.content ::=
	BuiltInOperator.content
CyclicEnumOperator ::=
	Successor
	Predecessor
Successor ::=
	[successor]::CyclicEnumOperator.content
Predecessor ::=
	[predecessor]::CyclicEnumOperator.content
OperatorDeclaration ::=
	FEConstant
BuiltInSort ::=
	FiniteEnumeration
FiniteEnumeration.content ::=
	FEConstant*
FiniteEnumeration ::=
	[finiteenumeration]::FiniteEnumeration.content
FEConstant ::=
	[feconstant]::OperatorDeclaration.content
BuiltInSort ::=
	FiniteIntRange
BuiltInOperator ::=
	FiniteIntRangeOperator
BuiltInConstant ::=
	FiniteIntRangeConstant
FiniteIntRange ::=
	[finiteintrange]::([start]::integer [end]::integer)
FiniteIntRangeOperator.content ::=
	BuiltInOperator.content
FiniteIntRangeOperator ::=
	FIRLessThan
	FIRLessThanOrEqual
	FIRGreaterThan
	FIRGreaterThanOrEqual
FIRLessThan ::=
	[lessthan]::FiniteIntRangeOperator.content
FIRLessThanOrEqual ::=
	[lessthanorequal]::FiniteIntRangeOperator.content
FIRGreaterThan ::=
	[greaterthan]::FiniteIntRangeOperator.content
FIRGreaterThanOrEqual ::=
	[greaterthanorequal]::FiniteIntRangeOperator.content
FiniteIntRangeConstant ::=
	[finiteintrangeconstant]::([value]::integer FiniteIntRange BuiltInConstant.content)
Operator ::=
	Equality
	Inequality
BuiltInSort ::=
	Bool
BuiltInOperator ::=
	BooleanOperator
BuiltInConstant ::=
	BooleanConstant
Bool ::=
	[bool]::ε
BooleanOperator.content ::=
	BuiltInOperator.content
BooleanOperator ::=
	And
	Or
	Imply
	Not
And ::=
	[and]::BooleanOperator.content
Or ::=
	[or]::BooleanOperator.content
Not ::=
	[not]::BooleanOperator.content
Imply ::=
	[imply]::BooleanOperator.content
Equality ::=
	[equality]::Operator.content
Inequality ::=
	[inequality]::Operator.content
BooleanConstant ::=
	[booleanconstant]::([value]::("true" | "false") BuiltInConstant.content)
BuiltInOperator ::=
	Cardinality
	CardinalityOf
	Contains
MultisetOperator ::=
	Add
	All
	NumberOf
	Subtract
	ScalarProduct
	Empty
Add ::=
	[add]::MultisetOperator.content
Subtract ::=
	[subtract]::MultisetOperator.content
All ::=
	[all]::(MultisetOperator.content Sort)
Empty ::=
	[empty]::(MultisetOperator.content Sort)
ScalarProduct ::=
	[scalarproduct]::MultisetOperator.content
NumberOf ::=
	[numberof]::MultisetOperator.content
Cardinality ::=
	[cardinality]::BuiltInOperator.content
CardinalityOf ::=
	[cardinalityof]::BuiltInOperator.content
Contains ::=
	[contains]::BuiltInOperator.content
BuiltInSort ::=
	Dot
BuiltInConstant ::=
	DotConstant
Dot ::=
	[dot]::ε
DotConstant ::=
	[dotconstant]::ε
BuiltInSort ::=
	Number
BuiltInOperator ::=
	IntegerOperator
BuiltInConstant ::=
	NumberConstant
Number ::=
	Natural
	Positive
	Integer
Integer ::=
	[integer]::ε
Natural ::=
	[natural]::ε
Positive ::=
	[positive]::ε
IntegerOperator.content ::=
	BuiltInOperator.content
IntegerOperator ::=
	Addition
	Subtraction
	Multiplication
	Division
	Modulo
	GreaterThan
	GreaterThanOrEqual
	LessThan
	LessThanOrEqual
NumberConstant ::=
	[numberconstant]::([value]::integer (BuiltInConstant.content Number))
LessThan ::=
	[lt]::IntegerOperator
LessThanOrEqual ::=
	[leq]::IntegerOperator
GreaterThan ::=
	[gt]::IntegerOperator
GreaterThanOrEqual ::=
	[geq]::IntegerOperator
Addition ::=
	[addition]::IntegerOperator
Subtraction ::=
	[subtraction]::IntegerOperator
Multiplication ::=
	[mult]::IntegerOperator
Division ::=
	[div]::IntegerOperator
Modulo ::=
	[mod]::IntegerOperator
net.labels ::=
	HLDeclaration*
page.labels ::=
	HLDeclaration*
place.labels ::=
	Type? HLMarking?
transition.labels ::=
	Condition?
arc.labels ::=
	HLAnnotation?
HLDeclaration ::=
	[declaration]::(simpletextlabel.content [structure]::Declarations?)
Type ::=
	[type]::(simpletextlabel.content [structure]::Sort?)
HLMarking ::=
	[hlinitialMarking]::(simpletextlabel.content [structure]::Term?)
Condition ::=
	[condition]::(simpletextlabel.content [structure]::Term?)
HLAnnotation ::=
	[hlinscription]::(simpletextlabel.content [structure]::Term?)
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)
pnml.element ::=
	[pnml]::pnml.content+
pnml.content ::=
	net.element
net.element ::=
	[net]::(identifier.content nettype.uri (Name? net.labels page.content+ toolspecific.element*))
identifier.content ::=
	[id]::string
nettype.uri ::=
	[type]::"http://www.pnml.org/version-2009/grammar/pnmlcoremodel"
net.labels ::=
	ε
basicobject.content ::=
	Name? toolspecific.element*
page.content ::=
	[page]::(identifier.content (basicobject.content page.labels netobject.content* [graphics]::pagegraphics.content?))
netobject.content ::=
	page.content
	place.content
	transition.content
	refplace.content
	reftrans.content
	arc.content
page.labels ::=
	ε
place.content ::=
	[place]::(identifier.content (basicobject.content place.labels node.content))
place.labels ::=
	ε
transition.content ::=
	[transition]::(identifier.content (basicobject.content transition.labels node.content))
transition.labels ::=
	ε
node.content ::=
	[graphics]::nodegraphics.content?
reference ::=
	[ref]::string
refplace.content ::=
	[referencePlace]::refnode.content
reftrans.content ::=
	[referenceTransition]::refnode.content
refnode.content ::=
	identifier.content reference basicobject.content node.content
arc.content ::=
	[arc]::(identifier.content [source]::string [target]::string (Name? arc.labels [graphics]::edgegraphics.content? toolspecific.element*))
arc.labels ::=
	ε
pagegraphics.content ::=
	nodegraphics.content
nodegraphics.content ::=
	position.element dimension.element? fill.element? line.element?
edgegraphics.content ::=
	position.element* line.element?
simpletext.content ::=
	[text]::string?
annotationstandard.content ::=
	[graphics]::annotationgraphics.content? toolspecific.element*
simpletextlabel.content ::=
	simpletext.content annotationstandard.content
Name ::=
	[name]::simpletextlabel.content
annotationgraphics.content ::=
	offset.element (fill.element? line.element? font.element?)
position.element ::=
	[position]::coordinate.attributes
offset.element ::=
	[offset]::coordinate.attributes
coordinate.attributes ::=
	[x]::integer [y]::integer
dimension.element ::=
	[dimension]::([x]::positiveDecimal.content [y]::positiveDecimal.content)
positiveDecimal.content ::=
	integer
fill.element ::=
	[fill]::([color]::color.type? [gradient-color]::color.type? [gradient-rotation]::("vertical" | "horizontal" | "diagonal")? [image]::string?)
line.element ::=
	[line]::([shape]::("line" | "curve")? [color]::color.type? [width]::positiveDecimal.content? [style]::("solid" | "dash" | "dot")?)
color.type ::=
	string
font.element ::=
	[font]::([family]::string? [style]::string? [weight]::string? [size]::string? [decoration]::("underline" | "overline" | "line-through")? [align]::("left" | "center" | "right")? [rotation]::integer?)
toolspecific.element ::=
	[toolspecific]::([tool]::string [version]::string anyElement*)
anyElement ::=
	(α | string | anyElement)*

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