source: dev/trunk/ab5.0/abdev/BasicCompiler_Common/include/LexicalAnalyzer.h@ 560

Last change on this file since 560 was 560, checked in by dai_9181, 16 years ago

ImplementsメソッドをLexicalAnalyzerクラスに移動した。

File size: 2.8 KB
Line 
1#pragma once
2
3namespace ActiveBasic{ namespace Compiler{
4
5
6class LexicalAnalyzer
7{
8 class SourceTemplate
9 {
10 std::string source;
11 public:
12 SourceTemplate( const std::string &filePath );
13 ~SourceTemplate()
14 {
15 }
16
17 std::string GetResult( const std::map<std::string,std::string> &values );
18 };
19
20public:
21
22 // 名前空間を収集
23 static bool CollectNamespaces( const char *source, NamespaceScopesCollection &namespaceScopesCollection );
24
25 // フルネーム識別子をシンボルに変換する
26 static Symbol FullNameToSymbol( const char *fullName );
27 static Symbol FullNameToSymbol( const std::string &fullName );
28
29 // 列挙型を収集
30 static void CollectEnumMembers( EnumInfo &enumInfo, const char *buffer, int nowLine );
31 static void CollectEnums( const char *source, EnumInfoCollection &enums );
32 static std::string GenerateEnumsSourceCode( const EnumInfoCollection &enums );
33
34 // クラスの名前情報を収集する
35 static void CollectClassesForNameOnly( const char *source, Classes &classes );
36
37 // TypeDefを収集する
38 static void AddTypeDef( TypeDefCollection &typeDefs, const NamespaceScopes &namespaceScopes, const std::string &expression, int nowLine );
39 static void CollectTypeDefs( const char *source, TypeDefCollection &typeDefs );
40
41 // 定数を収集する
42 static void AddConstEnum( Consts &consts, const NamespaceScopes &namespaceScopes, const char *buffer );
43 static void CollectConsts( const char *source, Consts &consts, ConstMacros &constMacros );
44
45 // クラスを収集する
46 static void AddMethod(CClass *pobj_c, UserProc *pUserProc, Prototype::Accessibility accessibility, BOOL bStatic, bool isConst, bool isAbstract,
47 bool isVirtual, bool isOverride, const char *interfaceName, bool isAutoGeneration, int nowLine);
48 static bool Inherits( CClass &_class, const char *inheritNames, int nowLine );
49 static void Implements( CClass &_class, Interface *pInterface, std::vector<DynamicMethod::OverrideResult> &overrideResults );
50 static bool Implements( CClass &_class, const char *interfaceNames, int nowLine );
51 static void LookaheadClass( const char *className, Classes &classes );
52 static bool LoopRefCheck( const CClass &objClass );
53 static void CollectClasses( const char *source, Classes &classes );
54
55 // グローバルプロシージャを収集する
56 static UserProc* ParseUserProc( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, char *buffer,int nowLine,bool isVirtual,CClass *pobj_c, bool isStatic, char *interfaceName = NULL );
57 static void CollectProcedures( const char *source, UserProcs &userProcs, DllProcs &dllProcs );
58
59 // デリゲートを収集する
60 static void CollectDelegates( const char *source, Delegates &delegates );
61 static std::string GenerateDelegatesSourceCode( const Delegates &delegates );
62 static void RefleshDelegatesParameterAndReturnType( Delegates &delegates );
63};
64
65
66}}
Note: See TracBrowser for help on using the repository browser.