SNAP Library 2.0, User Reference  2013-05-13 16:33:57
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>

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.

                                        {
  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]));
  }
}
TStr TLxSymStr::GetSymStr ( const TLxSym Sym) [static]

Definition at line 142 of file lx.cpp.

                                          {
  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();
  }
}
bool TLxSymStr::IsSep ( const TLxSym PrevSym,
const TLxSym Sym 
) [static]

Definition at line 226 of file lx.cpp.


Member Data Documentation

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

Definition at line 80 of file lx.h.

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

Definition at line 75 of file lx.h.

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.

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

Definition at line 69 of file lx.h.

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

Definition at line 71 of file lx.h.

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

Definition at line 68 of file lx.h.

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

Definition at line 96 of file lx.h.

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

Definition at line 95 of file lx.h.

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

Definition at line 83 of file lx.h.

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

Definition at line 78 of file lx.h.

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

Definition at line 63 of file lx.h.

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

Definition at line 88 of file lx.h.

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

Definition at line 86 of file lx.h.

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

Definition at line 82 of file lx.h.

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

Definition at line 65 of file lx.h.

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

Definition at line 62 of file lx.h.

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

Definition at line 93 of file lx.h.

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

Definition at line 91 of file lx.h.

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

Definition at line 87 of file lx.h.

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

Definition at line 59 of file lx.h.

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

Definition at line 89 of file lx.h.

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

Definition at line 85 of file lx.h.

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

Definition at line 74 of file lx.h.

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

Definition at line 84 of file lx.h.

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

Definition at line 77 of file lx.h.

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

Definition at line 67 of file lx.h.

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

Definition at line 73 of file lx.h.

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

Definition at line 66 of file lx.h.

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

Definition at line 81 of file lx.h.

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

Definition at line 94 of file lx.h.

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

Definition at line 92 of file lx.h.

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

Definition at line 90 of file lx.h.

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

Definition at line 72 of file lx.h.

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

Definition at line 76 of file lx.h.

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

Definition at line 64 of file lx.h.

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

Definition at line 60 of file lx.h.

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

Definition at line 58 of file lx.h.

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

Definition at line 79 of file lx.h.


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