Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: c/subset/bruneliere/extracted
Source used for this grammar: Hugo Brunelière, C 1.0, a simplified metamodel for a subset of the C language, C.ecore
, 2005/08/08
Integer
, String
, Boolean
, CDataType
, CIntegral
, CFloating
, CBitField
, CVoid
, CEnumeration
, CInt
, CChar
, CDouble
, CFloat
, CLongDouble
, CUnsignedInt
, CLong
, CLongLong
, CShort
, CSignedChar
, CUnsignedChar
, CWChar
, UnsignedLong
, UnsignedLongLong
, UnsignedShort
, CClassifier
, Derived
, CStructureContents
, CStructured
, CStruct
, CUnion
, CSourceText
, CTypedElement
, CStructuralFeature
, CField
, CParameter
, BehavioralFeature
, CFunction
), 0 root (—), 2 top (Integer
, CTypedElement
), 0 bottom (—).[sc_container]
, [contains]
3, [source]
2, [fileName]
, [type]
, [behavioralFeature]
, [parameters]
, [isVarArg]
.Integer ::= integer
String ::= string
Boolean ::= "true" "false"
CDataType ::= CIntegral
CDataType ::= CFloating
CDataType ::= CBitField
CDataType ::= CVoid
CDataType ::= CIntegral CFloating CBitField CVoid
CIntegral ::= CEnumeration
CIntegral ::= CInt
CIntegral ::= CChar
CIntegral ::= CEnumeration CInt CChar
CFloating ::= CDouble
CFloating ::= CFloat
CFloating ::= CLongDouble
CFloating ::= CDouble CFloat CLongDouble
CBitField ::= ε
CVoid ::= ε
CEnumeration ::= ε
CInt ::= CUnsignedInt
CInt ::= CLong
CInt ::= CLongLong
CInt ::= CShort
CInt ::= CUnsignedInt CLong CLongLong CShort
CChar ::= CSignedChar
CChar ::= CUnsignedChar
CChar ::= CWChar
CChar ::= CSignedChar CUnsignedChar CWChar
CDouble ::= ε
CFloat ::= ε
CLongDouble ::= ε
CUnsignedInt ::= UnsignedLong
CUnsignedInt ::= UnsignedLongLong
CUnsignedInt ::= UnsignedShort
CUnsignedInt ::= UnsignedLong UnsignedLongLong UnsignedShort
CLong ::= ε
CLongLong ::= ε
CShort ::= ε
CSignedChar ::= ε
CUnsignedChar ::= ε
CWChar ::= ε
UnsignedLong ::= ε
UnsignedLongLong ::= ε
UnsignedShort ::= ε
CClassifier ::= CDataType
CClassifier ::= Derived
CClassifier ::= CStructured
CClassifier ::= CDataType Derived
Derived ::= ε
CStructureContents ::= CStructuralFeature
CStructureContents ::= CStructured
CStructureContents ::= [sc_container]::CStructured
CStructured ::= CStruct
CStructured ::= CUnion
CStructured ::=
[contains]::CStructureContents
CStruct ::=
[contains]::CStructureContents
CUnion ::=
[contains]::CStructureContents
CSourceText ::= [source]::String [fileName]::String
CTypedElement ::= CParameter
CTypedElement ::= CStructuralFeature
CTypedElement ::= [type]::CClassifier [source]::CSourceText
CStructuralFeature ::= CField
CField ::= ε
CParameter ::= [behavioralFeature]::BehavioralFeature
BehavioralFeature ::= CFunction
BehavioralFeature ::=
[parameters]::CParameter
CFunction ::= [isVarArg]::Boolean