Browsable C♯ subset Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: csharp/subset/bruneliere/extracted
Source used for this grammar: Hugo Brunelière, C# 1.0, a simplified metamodel corresponding to a small subset of the language, CSharp.ecore, 2005/08/08

Summary

Syntax

Member ::=
	TypedAttribute
Member ::=
	MethodBase
Member ::=
	Type
Member ::=
	[name]::String [owner]::Type
TypedAttribute ::=
	Field
TypedAttribute ::=
	Property
TypedAttribute ::=
	[type]::Type
Field ::=
	[type]::Type
Property ::=
	[isReadable]::Boolean [isWritable]::Boolean
MethodBase ::=
	Constructor
MethodBase ::=
	Method
MethodBase ::=
	[visibility]::String [isAbstract]::Boolean [isFinal]::Boolean [isStatic]::Boolean [parameters]::Parameter+
Constructor ::=
	[visibility]::String [isAbstract]::Boolean [isFinal]::Boolean [isStatic]::Boolean [parameters]::Parameter+
Method ::=
	[returnType]::Type
Type ::=
	[qualifiedName]::String [isAbstract]::Boolean [visibility]::String [isSealed]::Boolean [nameSpace]::String [members]::Member+ [t_container]::Assembly [super]::Type
Parameter ::=
	[isIn]::Boolean [isOut]::Boolean [name]::Boolean [position]::Integer [method]::MethodBase [type]::Type
Assembly ::=
	[name]::String [content]::Type+
Integer ::=
	integer
String ::=
	string
Boolean ::=
	"true"
	"false"

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