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

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

LexicalAnalyzerクラスでBasicSourceクラスを使用しないようにした。

File size: 2.7 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 &currentClass, const char *inheritNames, int nowLine );
49 static bool Implements( CClass &currentClass, const char *interfaceNames, int nowLine );
50 static void LookaheadClass( const char *className, Classes &classes );
51 static bool LoopRefCheck( const CClass &objClass );
52 static void CollectClasses( const char *source, Classes &classes );
53
54 // グローバルプロシージャを収集する
55 static UserProc* ParseUserProc( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, char *buffer,int nowLine,bool isVirtual,CClass *pobj_c, bool isStatic, char *interfaceName = NULL );
56 static void CollectProcedures( const char *source, UserProcs &userProcs, DllProcs &dllProcs );
57
58 // デリゲートを収集する
59 static void CollectDelegates( const char *source, Delegates &delegates );
60 static std::string GenerateDelegatesSourceCode( const Delegates &delegates );
61 static void RefleshDelegatesParameterAndReturnType( Delegates &delegates );
62};
63
64
65}}
Note: See TracBrowser for help on using the repository browser.