Top > C++ > スクリプト > 言語仕様 > コンパイラ

コンパイラ Edit

構文解析 Edit

Module Edit

  0
  1
Module:
    ModuleDecl ModuleDef
    ModuleDecl ExternalModuleDecls ModuleDef

ModuleDecl Edit

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

IdentPath Edit

  0
  1
IdentPath:
    IdentPath "." Identifier
    Identifier

SymbolPath , SymbolName Edit

  0
  1
  2
  3
SymbolPath:
    IdentPath
 
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
ModuleDef:
    StaticTypeDef
 
# ただしModuleNameと同じ必要がある

StaticTypeDef Edit

  0
  1
  2
  3
  4
  5
  6
StaticTypeDef:
    ClassDef
    EnumDef
    InterfaceDef
    PodDef
    StructDef
    TypedefDef
    UtilityDef

StaticSymbolDef Edit

  0
  1
StaticSymbolDef:
    StaticTypeDef
    AliasDef

AliasDef Edit

  0
  1
  2
AliasDef:
    'alias' IdentPath Identifier ';'
 
# ここのIdentPathはStaticSymbolDefなモノに限定

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' IdentPath Identifier ';'
 
# ここのIdentPathはStaticTypeDefなものに限定

UtilityDef Edit


Reload   New Lower page making Edit Freeze Diff Upload Copy Rename   Front page List of pages Search Recent changes Backup Referer   Help   RSS of recent changes
Last-modified: (4675d)