コンパイラ Edit

構文解析 Edit

Module Edit

  0
  1
Module:
    ModuleDecl ModuleDef
    ModuleDecl ExternalModuleDecls ModuleDef

ModuleDecl Edit

  0
  1
  2
  3
ModuleDecl:
    "module" ModulePath ";"
 
ModulePath:
    Identfier "." IdentifierPath

IdentifierPath Edit

  0
  1
IdentifierPath:
    IdentifierPath "." Identifier
    Identifier

SymbolPath , SymbolName Edit

  0
  1
  2
  3
SymbolPath:
    IdentifierPath
 
SymbolName:
    Identifier

ExternalModuleDecls Edit

  0
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
ExternalModuleDecls:
    ExternalModuleDecl
    ExternalModuleDecl ExternalModuleDecls
 
ExternalModuleDecl:
    ImportExternalModule
    UsingExternalModule
 
ImportExternalModule:
    "import" ModulePath ";"
 
UsingExternalModule
    "using" ModulePath ";"

ModuleDef Edit

  0
  1
  2
  3
  4
  5
  6
  7
  8
  9
ModuleDef:
    AliasDef
    ClassDef
    EnumDef
    InterfaceDef
    PodDef
    StructDef
    TypedefDef
    UtilityDef
 
# ただしModuleNameと同じ必要がある

AliasDef Edit

  0
  1
  2
AliasDef:
    'alias' SymbolPath SymbolName
 
# ここのSymbolPathはstaticなシンボルに限定

ClassDef Edit

EnumDef Edit

  0
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
EnumDef:
    'enum' EnumAssignValueDef ';'
    'enum' EnumNoAssignValueDef ';'
    'enum' '{' EnumValueDefs '}' ';'
 
EnumValueDef:
    EnumAssignValueDef
    EnumNoAssignValueDef
 
EnumAssignValueDef:
    SymbolName '=' Expression
 
EnumNoAssignValueDef:
    SymbolName
 
EnumValueDefs:
    EnumValueDef
    EnumValueDef ','
    EnumValueDef ',' EnumValueDefs

InterfaceDef Edit

PodDef Edit

StructDef Edit

TypedefDef Edit

  0
  1
  2
TypedefDef:
    'typedef' SymbolPath SymbolName
 
# ここのSymbolPathはstaticなシンボルに限定

UtilityDef Edit


    ホーム 一覧 検索 最終更新 バックアップ リンク元   ヘルプ   最終更新のRSS