Annotation of parser3/src/main/pa_symbols.C, revision 1.1
1.1 ! moko 1: /** @file
! 2: Parser: static symbols cache implementation.
! 3: Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com)
! 4: */
! 5:
! 6: volatile const char * IDENT_PA_SYMBOLS_C="$Id: pa_string.C,v 1.253 2015/10/26 01:21:59 moko Exp $" IDENT_PA_SYMBOLS_H;
! 7:
! 8: #include "pa_symbols.h"
! 9:
! 10: const String *Symbols::result=Symbols::instance().add("result");
! 11: const String *Symbols::caller=Symbols::instance().add("caller");
! 12: const String *Symbols::self=Symbols::instance().add("self");
! 13:
! 14: void Symbols::add(const String &astring){
! 15: put_dont_replace(astring,new VString(astring));
! 16: }
! 17:
! 18: const String *Symbols::add(const char *astring){
! 19: const String *result=new String(astring);
! 20: put(*result,new VString(*result));
! 21: return result;
! 22: }
! 23:
! 24: Symbols &Symbols::instance(){
! 25: static Symbols singleton;
! 26: return singleton;
! 27: }
E-mail: