SNAP Library 2.1, User Reference
2013-09-25 10:47:25
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <lx.h>
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>" |
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.
{ static TFSet SepPrevSymSet=TFSet()| syUndef|syColon|syDColon|syEq| syLParen|syRParen|syLBracket|syRBracket|syLBrace|syRBrace| syEoln|syEof; static TFSet SepSymSet=TFSet()| syPeriod|syComma|syColon|syDColon|sySemicolon| syEq| syExclamation|syQuestion| syLParen|syRParen|syLBracket|syRBracket|syLBrace|syRBrace| syEoln|syEof; return !SepPrevSymSet.In(PrevSym) && !SepSymSet.In(Sym); }
const TStr TLxSymStr::AmpersandStr = "&" [static] |
const TStr TLxSymStr::AsteriskStr = "*" [static] |
const TStr TLxSymStr::BoolStr [static] |
const TStr TLxSymStr::ColonStr = ":" [static] |
const TStr TLxSymStr::CommaStr = "," [static] |
const TStr TLxSymStr::DColonStr = "::" [static] |
const TStr TLxSymStr::DPeriodStr = ".." [static] |
const TStr TLxSymStr::EofStr = "<end-of-file>" [static] |
const TStr TLxSymStr::EolnStr = "<end-of-line>" [static] |
const TStr TLxSymStr::EqStr = "=" [static] |
const TStr TLxSymStr::ExclamationStr = "!" [static] |
const TStr TLxSymStr::FltStr = "<float>" [static] |
const TStr TLxSymStr::GEqStr = ">=" [static] |
const TStr TLxSymStr::GtrStr = ">" [static] |
const TStr TLxSymStr::HashStr = "#" [static] |
const TStr TLxSymStr::IdStrStr = "<id-string>" [static] |
const TStr TLxSymStr::IntStr = "<integer>" [static] |
const TStr TLxSymStr::LBraceStr = "{" [static] |
const TStr TLxSymStr::LBracketStr = "[" [static] |
const TStr TLxSymStr::LEqStr = "<=" [static] |
const TStr TLxSymStr::LnStr = "<line>" [static] |
const TStr TLxSymStr::LParenStr = "(" [static] |
const TStr TLxSymStr::LssStr = "<" [static] |
const TStr TLxSymStr::MinusStr = "-" [static] |
const TStr TLxSymStr::NEqStr = "<>" [static] |
const TStr TLxSymStr::PercentStr = "%" [static] |
const TStr TLxSymStr::PeriodStr = "." [static] |
const TStr TLxSymStr::PlusStr = "+" [static] |
const TStr TLxSymStr::QStrStr = "<q-string>" [static] |
const TStr TLxSymStr::QuestionStr = "?" [static] |
const TStr TLxSymStr::RBraceStr = "}" [static] |
const TStr TLxSymStr::RBracketStr = "]" [static] |
const TStr TLxSymStr::RParenStr = ")" [static] |
const TStr TLxSymStr::SemicolonStr = ";" [static] |
const TStr TLxSymStr::SlashStr = "/" [static] |
const TStr TLxSymStr::StrStr = "<string>" [static] |
const TStr TLxSymStr::TabStr = "<tab>" [static] |
const TStr TLxSymStr::UndefStr = "<undefined>" [static] |
const TStr TLxSymStr::VBarStr = "|" [static] |