import java.io.*; import java.util.*; *noparse* //============================================================ // Registry //------------------------------------------------------------ Registry = TypeList EntityList CategoryList . TypeList = List(DefinedType) . EntityList = List(Entity) . CategoryList = List(CodeCategory) . //============================================================ // Types //------------------------------------------------------------ DefinedType : ClassType | NonClassType *common* TypeName
HeaderFile . NonClassType = . ClassType : SimpleClassType | TemplatedClassType . SimpleClassType = . TemplatedClassType = TemplateArgs . TypeName = String . HeaderFile = String . TemplateArgs = String . //============================================================ // Entities //------------------------------------------------------------ AccessKeyList = List(AccessKey) . Entity = EntityName AccessKeyList List(ParentEntity) List(Method) . ParentEntity = Entity . EntityName = String . Method = MethodName [ MethodBodyVersion] boolean boolean boolean AccessKeyList ReturnDecl List(ArgumentDecl) . MethodName = String . MethodBodyVersion = String . AccessKey = String . TypeDecl : ReturnDecl | ArgumentDecl *common* String String boolean // Indicates type denotes a reference // rather than a value // Note: must preceed (See TypeUseFixup.beh) [ TypeUse] // The type itself (absent for intrinsic // types) TypeUseList // Template arguments ConstantList // Symbolic array dimensions . TypeUseList = List(TypeUse) . ConstantList = List(Constant) . ReturnDecl = . ArgumentDecl = ArgumentName [ Constant ] . ArgumentName = String . // 'Constant' represents simple constants occuring in type declarations // Symbolic constants have an associated TypeUse providing access to // the header file for that constant (which is declared as a // NonClassType). Constant : SymbolicConstant | LiteralConstant *common* String . LiteralConstant = . SymbolicConstant = TypeUse . TypeUse = TypeName boolean [ DefinedType] . //============================================================ // Code Categories //------------------------------------------------------------ Template : HeaderTemplate | ImplTemplate | MakeTemplate *common* String . HeaderTemplate = . ImplTemplate = . MakeTemplate = . CodeCategoryType = String
HeaderTemplate ImplTemplate MakeTemplate . CodeCategory : GeneratedCodeCategory | NonGeneratedCodeCategory *common* String String String String . NonGeneratedCodeCategory = . GeneratedCodeCategory = CodeCategoryType AccessKeyList . //============================================================ // Program classes //------------------------------------------------------------ Main = . //============================================================ // Utilities //------------------------------------------------------------ List(E) ~ {E}.