Browsable XASM Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: automata/xasm/extracted
Source used for this grammar: Davide Di Ruscio, ASM.ecore, 2006/05/1

Summary

Syntax

String ::=
	string
Integer ::=
	integer
Boolean ::=
	"true"
	"false"
LocatedElement ::=
	XAsmFile
LocatedElement ::=
	Asm
LocatedElement ::=
	Signature
LocatedElement ::=
	MetaInformation
LocatedElement ::=
	AccessUpdateFunction
LocatedElement ::=
	Declaration
LocatedElement ::=
	Parameter
LocatedElement ::=
	Initialization
LocatedElement ::=
	Term
LocatedElement ::=
	Rule
LocatedElement ::=
	ElseIf
LocatedElement ::=
	ElementDecl
LocatedElement ::=
	Extension
XAsmFile ::=
	XAsmSpec
XAsmFile ::=
	Body
XAsmSpec ::=
	[Asm]::Asm+
Asm ::=
	[signature]::Signature [returnType]::String [metaInformation]::MetaInformation [body]::Body
Signature ::=
	[isMain]::Boolean [name]::String [arguments]::Argument+
Argument ::=
	[type]::String
Body ::=
	[declarations]::Declaration+ [initialization]::Initialization [rules]::Rule+
MetaInformation ::=
	[usedAsIn]::Signature+ [usedAs]::AsmType [accessUpdateFunctions]::AccessUpdateFunction+
AccessUpdateFunction ::=
	[type]::AccessUpdateType [functions]::Function+
Declaration ::=
	Universe
Declaration ::=
	Function
Function ::=
	[parameters]::Parameter+ [returnType]::String [initTerm]::Term [isExternal]::Boolean
Parameter ::=
	[name]::String [type]::String
Universe ::=
	[name]::String [contents]::String+ [superUniverses]::Universe+
Initialization ::=
	[rules]::Rule+
Term ::=
	Constant
Term ::=
	FunctionOrVariableTerm
Term ::=
	OperatorTerm
Constant ::=
	BooleanConstant
Constant ::=
	IntegerConstant
Constant ::=
	StringConstant
Constant ::=
	UndefConstant
FunctionOrVariableTerm ::=
	[declaration]::ElementDecl [terms]::Term+
OperatorTerm ::=
	[opName]::String [leftExp]::Term [rightExp]::Term
BooleanConstant ::=
	[value]::Boolean
IntegerConstant ::=
	[value]::Integer
StringConstant ::=
	[value]::String
UndefConstant ::=
	ε
Rule ::=
	SkipRule
Rule ::=
	AsmInvocation
Rule ::=
	UpdateRule
Rule ::=
	ChooseRule
Rule ::=
	DoForallRule
Rule ::=
	ConditionalRule
Rule ::=
	ExtendRule
Rule ::=
	ReturnRule
SkipRule ::=
	[inSequence]::Boolean
AsmInvocation ::=
	[asmName]::String [arguments]::Term+
UpdateRule ::=
	[function]::FunctionOrVariableTerm [updateTerm]::Term
ChooseRule ::=
	[chooseId]::VariableDecl [inSet]::Universe [guard]::Term [ifChoosenRules]::Rule+ [ifNotChoosenRule]::Rule
DoForallRule ::=
	[id]::VariableDecl [inSet]::Universe [condition]::Term [doRule]::Rule+
ConditionalRule ::=
	[condition]::Term [thenRule]::Rule+ [elseRule]::Rule [elseIfRule]::ElseIf
ElseIf ::=
	[condition]::Term [thenRule]::Rule+ [elseRule]::Rule [elseIfRule]::ElseIf
ExtendRule ::=
	[extensions]::Extension+ [rules]::Rule+
ElementDecl ::=
	VariableDecl
ElementDecl ::=
	Function
VariableDecl ::=
	Argument
Extension ::=
	[elements]::VariableDecl+ [universe]::Universe
ReturnRule ::=
	[term]::Term
AccessUpdateType ::=
	[access]::ε
	[update]::ε
AsmType ::=
	[function]::ε
	[subasm]::ε

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