Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: cpp/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, CPP.ecore
, 2005/08/05
Integer
, String
, Boolean
, CDerived
, CStructured
, CBehavorialFeature
, CFunction
, CStructureContents
, CField
, CDerivableType
, VisibilityKind
, CPPReference
, CPPExtern
, CPPConst
, CPPTemplate
, CPPClass
, CPPGeneralization
, CPPOperation
, CPPOperator
, CPPMember
), 0 root (—), 8 top (Integer
, CDerived
, CStructured
, CBehavorialFeature
, CStructureContents
, CField
, CDerivableType
, CPPMember
), 0 bottom (—).[isVsrArg]
, [vk_public]
, [vk_private]
, [vk_protected]
, [linkage]
, [classes]
, [isAbstract]
, [isVolatile]
2, [visibility]
5, [templates]
, [generalizations]
, [isVirtual]
2, [supertype]
, [isStatic]
2, [isExtern]
, [isInline]
2, [isPure]
, [isCtor]
, [isDtor]
, [throws]
, [isRegister]
.Integer ::= integer
String ::= string
Boolean ::= "true" "false"
CDerived ::= CPPReference
CDerived ::= CPPExtern
CDerived ::= CPPConst
CDerived ::= CPPTemplate
CDerived ::= CPPReference CPPExtern CPPConst CPPTemplate
CStructured ::= CPPClass
CBehavorialFeature ::= CFunction
CFunction ::= CPPOperation
CFunction ::= [isVsrArg]::Boolean
CStructureContents ::= CPPOperator
CStructureContents ::= CPPOperation
CField ::= ε
CDerivableType ::= ε
VisibilityKind ::= [vk_public]::ε [vk_private]::ε [vk_protected]::ε
CPPReference ::= ε
CPPExtern ::= [linkage]::String
CPPConst ::= ε
CPPTemplate ::=
[classes]::CPPClass
CPPClass ::= [isAbstract]::Boolean [isVolatile]::Boolean [visibility]::VisibilityKind [templates]::CPPTemplate[generalizations]::CPPGeneralization
CPPGeneralization ::= [visibility]::VisibilityKind [isVirtual]::Boolean [supertype]::CPPClass
CPPOperation ::=
[isStatic]::Boolean [isExtern]::Boolean [isInline]::Boolean [isVirtual]::Boolean [isPure]::Boolean [visibility]::VisibilityKind [isCtor]::Boolean [isDtor]::Boolean [throws]::CPPClass
CPPOperator ::= [isInline]::Boolean [visibility]::VisibilityKind
CPPMember ::= [isStatic]::Boolean [isVolatile]::Boolean [isRegister]::Boolean [visibility]::VisibilityKind