* コンパイラ [#v1fe9ca7] #contents ** 構文解析 [#i768a415] *** Module [#d1a523ab] #code(){{ Module: ModuleDecl ModuleDef ModuleDecl ExternalModuleDecls ModuleDef }} *** ModuleDecl [#h6fba8af] #code(){{ ModuleDecl: "module" ModulePath ";" ModulePath: Identfier "." IdentPath }} *** IdentPath [#zab198e6] #code(){{ IdentPath: IdentPath "." Identifier Identifier }} *** SymbolPath , SymbolName [#m54e7ad6] #code(){{ SymbolPath: IdentPath SymbolName: Identifier }} *** ExternalModuleDecls [#e5ccc04b] #code(){{ ExternalModuleDecls: ExternalModuleDecl ExternalModuleDecl ExternalModuleDecls ExternalModuleDecl: ImportExternalModule UsingExternalModule ImportExternalModule: "import" ModulePath ";" UsingExternalModule "using" ModulePath ";" }} *** ModuleDef [#q4dc5062] #code(){{ ModuleDef: StaticTypeDef # ただしModuleNameと同じ必要がある }} *** StaticTypeDef [#j9bf2054] #code(){{ StaticTypeDef: ClassDef EnumDef InterfaceDef PodDef StructDef TypedefDef UtilityDef }} *** StaticSymbolDef [#w39fde88] #code(){{ StaticSymbolDef: StaticTypeDef AliasDef }} *** AliasDef [#z7b00eda] #code(){{ AliasDef: 'alias' SymbolPath SymbolName 'alias' IdentPath Identifier ';' # ここのSymbolPathはstaticなシンボルに限定 # ここのIdentPathはStaticSymbolDefなモノに限定 }} *** ClassDef [#t170843a] *** EnumDef [#r04ce36d] #code(){{ EnumDef: 'enum' EnumAssignValueDef ';' 'enum' EnumNoAssignValueDef ';' 'enum' '{' EnumValueDefs '}' ';' EnumValueDef: EnumAssignValueDef EnumNoAssignValueDef EnumAssignValueDef: SymbolName '=' Expression EnumNoAssignValueDef: SymbolName EnumValueDefs: EnumValueDef EnumValueDef ',' EnumValueDef ',' EnumValueDefs }} *** InterfaceDef [#wad4dcaa] *** PodDef [#m1ee19a3] *** StructDef [#lc663ce6] *** TypedefDef [#heaaae91] #code(){{ TypedefDef: 'typedef' IdentPath Identifier ';' # ここのIdentPathはStaticTypeDefなものに限定 }} *** UtilityDef [#w9a2653c] |