Annotation of parser3/src/include/pa_symbols.h, revision 1.14
1.1 moko 1: /** @file
2: Parser: static symbols cache.
3:
1.13 moko 4: Copyright (c) 2001-2026 Art. Lebedev Studio (https://www.artlebedev.com)
1.10 moko 5: Authors: Konstantin Morshnev <moko@design.ru>, Alexandr Petrosian <paf@design.ru>
1.1 moko 6: */
7:
8: #ifndef PA_SYMBOLS_H
9: #define PA_SYMBOLS_H
10:
1.14 ! moko 11: #define IDENT_PA_SYMBOLS_H "$Id: pa_symbols.h,v 1.13 2026/04/25 13:38:46 moko Exp $"
1.1 moko 12:
13: #include "pa_common.h"
14:
1.2 moko 15: // cache symbols for faster comparation
16: #define SYMBOLS_CACHING
17:
18: #ifdef SYMBOLS_CACHING
1.3 moko 19: #define SYMBOLS_EQ(a,b) (&(a)==&(Symbols::b)) // pointer comparation
1.2 moko 20: #else
1.3 moko 21: #define SYMBOLS_EQ(a,b) ((a)==(Symbols::b)) // string comparation
1.2 moko 22: #endif
23:
1.1 moko 24: class Symbols: public HashStringValue{
25: public:
26:
1.3 moko 27: static const String SELF_SYMBOL;
28: static const String CALLER_SYMBOL;
29: static const String RESULT_SYMBOL;
30:
1.4 moko 31: static const String CLASS_SYMBOL;
32: static const String CLASS_NAME_SYMBOL;
33:
1.6 moko 34: static const String METHOD_SYMBOL;
1.7 moko 35: static const String NAME_SYMBOL;
1.6 moko 36:
1.3 moko 37: static const String STATIC_SYMBOL;
38: static const String DYNAMIC_SYMBOL;
39:
40: static const String LOCALS_SYMBOL;
41: static const String PARTIAL_SYMBOL;
42:
43: static const String REM_SYMBOL;
1.2 moko 44:
1.5 moko 45: static const String FIELDS_SYMBOL;
46: static const String _DEFAULT_SYMBOL;
47:
1.12 moko 48: static const String TABLES_SYMBOL;
49: static const String FILES_SYMBOL;
50: static const String IMAP_SYMBOL;
51: static const String ELEMENTS_SYMBOL;
52:
1.14 ! moko 53: static const String TYPE_SYMBOL;
! 54: static const String SOURCE_SYMBOL;
! 55: static const String COMMENT_SYMBOL;
! 56: static const String FILE_SYMBOL;
! 57: static const String LINENO_SYMBOL;
! 58: static const String COLNO_SYMBOL;
! 59: static const String HANDLED_SYMBOL;
! 60:
1.2 moko 61: #ifdef SYMBOLS_CACHING
1.1 moko 62: void add(const String &astring);
1.2 moko 63: void set(const String &astring);
1.1 moko 64:
65: static Symbols &instance();
1.2 moko 66: static void init();
67: #endif
1.1 moko 68:
69: };
70:
1.2 moko 71: #ifdef SYMBOLS_CACHING
72: extern Symbols *symbols;
73: #endif
74:
1.1 moko 75: #endif
E-mail: