SNAP Library 2.2, Developer Reference  2014-03-11 19:15:55
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TLxSymStr Class Reference

#include <lx.h>

Collaboration diagram for TLxSymStr:

List of all members.

Static Public Member Functions

static TStr GetSymStr (const TLxSym &Sym)
static TLxSym GetSSym (const TStr &Str)
static bool IsSep (const TLxSym &PrevSym, const TLxSym &Sym)

Static Public Attributes

static const TStr UndefStr = "<undefined>"
static const TStr LnStr = "<line>"
static const TStr TabStr = "<tab>"
static const TStr BoolStr
static const TStr IntStr = "<integer>"
static const TStr FltStr = "<float>"
static const TStr StrStr = "<string>"
static const TStr IdStrStr = "<id-string>"
static const TStr QStrStr = "<q-string>"
static const TStr PeriodStr = "."
static const TStr DPeriodStr = ".."
static const TStr CommaStr = ","
static const TStr ColonStr = ":"
static const TStr DColonStr = "::"
static const TStr SemicolonStr = ";"
static const TStr PlusStr = "+"
static const TStr MinusStr = "-"
static const TStr AsteriskStr = "*"
static const TStr SlashStr = "/"
static const TStr PercentStr = "%"
static const TStr ExclamationStr = "!"
static const TStr VBarStr = "|"
static const TStr AmpersandStr = "&"
static const TStr QuestionStr = "?"
static const TStr HashStr = "#"
static const TStr EqStr = "="
static const TStr NEqStr = "<>"
static const TStr LssStr = "<"
static const TStr GtrStr = ">"
static const TStr LEqStr = "<="
static const TStr GEqStr = ">="
static const TStr LParenStr = "("
static const TStr RParenStr = ")"
static const TStr LBracketStr = "["
static const TStr RBracketStr = "]"
static const TStr LBraceStr = "{"
static const TStr RBraceStr = "}"
static const TStr EolnStr = "<end-of-line>"
static const TStr EofStr = "<end-of-file>"

Detailed Description

Definition at line 56 of file lx.h.


Member Function Documentation

TLxSym TLxSymStr::GetSSym ( const TStr Str) [static]

Definition at line 186 of file lx.cpp.

References THash< TKey, TDat, THashFunc >::AddDat(), AmpersandStr, AsteriskStr, ColonStr, CommaStr, DColonStr, DPeriodStr, EqStr, ExclamationStr, GEqStr, THash< TKey, TDat, THashFunc >::GetKeyId(), GtrStr, HashStr, LBraceStr, LBracketStr, THash< TKey, TDat, THashFunc >::Len(), LEqStr, LParenStr, LssStr, MinusStr, NEqStr, PercentStr, PeriodStr, PlusStr, QuestionStr, RBraceStr, RBracketStr, RParenStr, SemicolonStr, SlashStr, syAmpersand, syAsterisk, syColon, syComma, syDColon, syDPeriod, syEq, syExclamation, syGEq, syGtr, syHash, syLBrace, syLBracket, syLEq, syLParen, syLss, syMinus, syNEq, syPercent, syPeriod, syPlus, syQuestion, syRBrace, syRBracket, syRParen, sySemicolon, sySlash, syUndef, syVBar, and VBarStr.

Referenced by THtmlDoc::GetLxSym().

                                        {
  static TStrIntH StrToLxSymH(100);
  if (StrToLxSymH.Len()==0){
    StrToLxSymH.AddDat(PeriodStr, syPeriod);
    StrToLxSymH.AddDat(DPeriodStr, syDPeriod);
    StrToLxSymH.AddDat(CommaStr, syComma);
    StrToLxSymH.AddDat(ColonStr, syColon);
    StrToLxSymH.AddDat(DColonStr, syDColon);
    StrToLxSymH.AddDat(SemicolonStr, sySemicolon);
    StrToLxSymH.AddDat(PlusStr, syPlus);
    StrToLxSymH.AddDat(MinusStr, syMinus);
    StrToLxSymH.AddDat(AsteriskStr, syAsterisk);
    StrToLxSymH.AddDat(SlashStr, sySlash);
    StrToLxSymH.AddDat(PercentStr, syPercent);
    StrToLxSymH.AddDat(ExclamationStr, syExclamation);
    StrToLxSymH.AddDat(VBarStr, syVBar);
    StrToLxSymH.AddDat(AmpersandStr, syAmpersand);
    StrToLxSymH.AddDat(QuestionStr, syQuestion);
    StrToLxSymH.AddDat(HashStr, syHash);
    StrToLxSymH.AddDat(EqStr, syEq);
    StrToLxSymH.AddDat(NEqStr, syNEq);
    StrToLxSymH.AddDat(LssStr, syLss);
    StrToLxSymH.AddDat(GtrStr, syGtr);
    StrToLxSymH.AddDat(LEqStr, syLEq);
    StrToLxSymH.AddDat(GEqStr, syGEq);
    StrToLxSymH.AddDat(LParenStr, syLParen);
    StrToLxSymH.AddDat(RParenStr, syRParen);
    StrToLxSymH.AddDat(LBracketStr, syLBracket);
    StrToLxSymH.AddDat(RBracketStr, syRBracket);
    StrToLxSymH.AddDat(LBraceStr, syLBrace);
    StrToLxSymH.AddDat(RBraceStr, syRBrace);
  }
  int KeyId=StrToLxSymH.GetKeyId(Str);
  if (KeyId==-1){
    return syUndef;
  } else {
    return TLxSym(int(StrToLxSymH[KeyId]));
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

TStr TLxSymStr::GetSymStr ( const TLxSym Sym) [static]

Definition at line 142 of file lx.cpp.

References AmpersandStr, AsteriskStr, ColonStr, CommaStr, DColonStr, DPeriodStr, EofStr, EolnStr, EqStr, ExclamationStr, Fail, FltStr, GEqStr, GtrStr, HashStr, IdStrStr, IntStr, LBraceStr, LBracketStr, LEqStr, LnStr, LParenStr, LssStr, MinusStr, NEqStr, PercentStr, PeriodStr, PlusStr, QStrStr, QuestionStr, RBraceStr, RBracketStr, RParenStr, SemicolonStr, SlashStr, StrStr, syAmpersand, syAsterisk, syColon, syComma, syDColon, syDPeriod, syEof, syEoln, syEq, syExclamation, syFlt, syGEq, syGtr, syHash, syIdStr, syInt, syLBrace, syLBracket, syLEq, syLn, syLParen, syLss, syMinus, syNEq, syPercent, syPeriod, syPlus, syQStr, syQuestion, syRBrace, syRBracket, syRParen, sySemicolon, sySlash, syStr, syTab, syUndef, syVBar, TabStr, UndefStr, and VBarStr.

Referenced by TExp::GetExpOpStr(), and TOLx::PutSym().

                                          {
  switch (Sym){
    case syUndef: return UndefStr;
    case syLn: return LnStr;
    case syTab: return TabStr;
    case syInt: return IntStr;
    case syFlt: return FltStr;
    case syStr: return StrStr;
    case syIdStr: return IdStrStr;
    case syQStr: return QStrStr;
    case syPeriod: return PeriodStr;
    case syDPeriod: return DPeriodStr;
    case syComma: return CommaStr;
    case syColon: return ColonStr;
    case syDColon: return DColonStr;
    case sySemicolon: return SemicolonStr;
    case syPlus: return PlusStr;
    case syMinus: return MinusStr;
    case syAsterisk: return AsteriskStr;
    case sySlash: return SlashStr;
    case syPercent: return PercentStr;
    case syExclamation: return ExclamationStr;
    case syVBar: return VBarStr;
    case syAmpersand: return AmpersandStr;
    case syQuestion: return QuestionStr;
    case syHash: return HashStr;
    case syEq: return EqStr;
    case syNEq: return NEqStr;
    case syLss: return LssStr;
    case syGtr: return GtrStr;
    case syLEq: return LEqStr;
    case syGEq: return GEqStr;
    case syLParen: return LParenStr;
    case syRParen: return RParenStr;
    case syLBracket: return LBracketStr;
    case syRBracket: return RBracketStr;
    case syLBrace: return LBraceStr;
    case syRBrace: return RBraceStr;
    case syEoln: return EolnStr;
    case syEof: return EofStr;
    default: Fail; return TStr();
  }
}

Here is the caller graph for this function:

bool TLxSymStr::IsSep ( const TLxSym PrevSym,
const TLxSym Sym 
) [static]

Definition at line 226 of file lx.cpp.

References TFSet::In(), syColon, syComma, syDColon, syEof, syEoln, syEq, syExclamation, syLBrace, syLBracket, syLParen, syPeriod, syQuestion, syRBrace, syRBracket, syRParen, sySemicolon, and syUndef.

Referenced by TOLx::PutSep().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

const TStr TLxSymStr::AmpersandStr = "&" [static]

Definition at line 80 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::AsteriskStr = "*" [static]

Definition at line 75 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::BoolStr [static]

Definition at line 61 of file lx.h.

const TStr TLxSymStr::ColonStr = ":" [static]

Definition at line 70 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::CommaStr = "," [static]

Definition at line 69 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::DColonStr = "::" [static]

Definition at line 71 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::DPeriodStr = ".." [static]

Definition at line 68 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::EofStr = "<end-of-file>" [static]

Definition at line 96 of file lx.h.

Referenced by GetSymStr().

const TStr TLxSymStr::EolnStr = "<end-of-line>" [static]

Definition at line 95 of file lx.h.

Referenced by GetSymStr().

const TStr TLxSymStr::EqStr = "=" [static]

Definition at line 83 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::ExclamationStr = "!" [static]

Definition at line 78 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::FltStr = "<float>" [static]

Definition at line 63 of file lx.h.

Referenced by GetSymStr().

const TStr TLxSymStr::GEqStr = ">=" [static]

Definition at line 88 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::GtrStr = ">" [static]

Definition at line 86 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::HashStr = "#" [static]

Definition at line 82 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::IdStrStr = "<id-string>" [static]

Definition at line 65 of file lx.h.

Referenced by GetSymStr().

const TStr TLxSymStr::IntStr = "<integer>" [static]

Definition at line 62 of file lx.h.

Referenced by GetSymStr().

const TStr TLxSymStr::LBraceStr = "{" [static]

Definition at line 93 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::LBracketStr = "[" [static]

Definition at line 91 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::LEqStr = "<=" [static]

Definition at line 87 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::LnStr = "<line>" [static]

Definition at line 59 of file lx.h.

Referenced by GetSymStr().

const TStr TLxSymStr::LParenStr = "(" [static]

Definition at line 89 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::LssStr = "<" [static]

Definition at line 85 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::MinusStr = "-" [static]

Definition at line 74 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::NEqStr = "<>" [static]

Definition at line 84 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::PercentStr = "%" [static]

Definition at line 77 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::PeriodStr = "." [static]

Definition at line 67 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::PlusStr = "+" [static]

Definition at line 73 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::QStrStr = "<q-string>" [static]

Definition at line 66 of file lx.h.

Referenced by GetSymStr().

const TStr TLxSymStr::QuestionStr = "?" [static]

Definition at line 81 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::RBraceStr = "}" [static]

Definition at line 94 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::RBracketStr = "]" [static]

Definition at line 92 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::RParenStr = ")" [static]

Definition at line 90 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::SemicolonStr = ";" [static]

Definition at line 72 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::SlashStr = "/" [static]

Definition at line 76 of file lx.h.

Referenced by GetSSym(), and GetSymStr().

const TStr TLxSymStr::StrStr = "<string>" [static]

Definition at line 64 of file lx.h.

Referenced by GetSymStr().

const TStr TLxSymStr::TabStr = "<tab>" [static]

Definition at line 60 of file lx.h.

Referenced by GetSymStr().

const TStr TLxSymStr::UndefStr = "<undefined>" [static]

Definition at line 58 of file lx.h.

Referenced by GetSymStr().

const TStr TLxSymStr::VBarStr = "|" [static]

Definition at line 79 of file lx.h.

Referenced by GetSSym(), and GetSymStr().


The documentation for this class was generated from the following files: