SNAP Library, Developer Reference
2012-10-15 15:06:59
SNAP, a general purpose network analysis and graph mining library
|
Go to the source code of this file.
enum TILxOpt |
enum TLxChDefTy |
enum TLxChTy |
enum TLxSym |
Definition at line 42 of file lx.h.
{ syUndef, syLn, syTab, syBool, syInt, syFlt, syStr, syIdStr, syQStr, syPeriod, syDPeriod, syComma, syColon, syDColon, sySemicolon, syPlus, syMinus, syAsterisk, sySlash, syPercent, syExclamation, syVBar, syAmpersand, syQuestion, syHash, syEq, syNEq, syLss, syGtr, syLEq, syGEq, syLParen, syRParen, syLBracket, syRBracket, syLBrace, syRBrace, syEoln, syEof, syMnRw, syRw1, syRw2, syRw3, syRw4, syRw5, syRw6, syRw7, syRw8, syRw9, syRw10, syRw11, syRw12, syRw13, syRw14, syRw15, syRw16, syRw17, syMxRw } TLxSym;
enum TOLxOpt |
static PLxChDef GetChDef | ( | const TLxChDefTy & | ChDefTy = lcdtUsAscii | ) | [static] |
int GetChTy | ( | const char & | Ch | ) | const |
char GetUc | ( | const char & | Ch | ) | const |
Definition at line 56 of file html.h.
References GetUcChA().
bool IsAlNum | ( | const char & | Ch | ) | const |
bool IsAlpha | ( | const char & | Ch | ) | const |
bool TLxChDef::IsNmStr | ( | const TStr & | Str | ) | const |
Definition at line 63 of file lx.cpp.
References TStr::GetCh(), IsAlNum(), IsAlpha(), and TStr::Len().
{ if (Str.Len()==0){return false;} if (!IsAlpha(Str.GetCh(0))){return false;} for (int ChN=1; ChN<Str.Len(); ChN++){ if (!IsAlNum(Str.GetCh(ChN))){return false;}} return true; }
bool IsNum | ( | const char & | Ch | ) | const |
bool IsSpace | ( | const char & | Ch | ) | const |
bool IsTerm | ( | const char & | Ch | ) | const |
Definition at line 17 of file lx.h.
References TLxChDef().
{return new TLxChDef(SIn);}
static PLxChDef New | ( | const TLxChDefTy & | ChDefTy = lcdtUsAscii | ) | [static] |
Definition at line 14 of file lx.h.
References TLxChDef().
{ return PLxChDef(new TLxChDef(ChDefTy));}
TLxChDef::TLxChDef | ( | const TLxChDefTy & | ChDefTy | ) |
Definition at line 13 of file lx.cpp.
References TCh::CrCh, TCh::EofCh, Fail, lcdtUsAscii, lcdtYuAscii, lctAlpha, lctNum, lctSpace, lctSSym, lctTerm, TCh::LfCh, TCh::Mn, TCh::Mx, TVec< TVal >::PutAll(), SetChTy(), SetUcCh(), and UcChV.
Referenced by Load(), and New().
: ChTyV(TCh::Vals), UcChV(TCh::Vals){ if (ChDefTy==lcdtUsAscii){ // Character-Types ChTyV.PutAll(TInt(lctSpace)); SetChTy(lctNum, "0123456789"); SetChTy(lctAlpha, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); SetChTy(lctAlpha, "abcdefghijklmnopqrstuvwxyz"); SetChTy(lctAlpha, "@_"); SetChTy(lctSSym, "\"'.,:;+-*/%!#|&<=>?()[]{}"); SetChTy(lctTerm, TStr(TCh::CrCh)); SetChTy(lctTerm, TStr(TCh::LfCh)); SetChTy(lctTerm, TStr(TCh::EofCh)); // Upper-Case for (int Ch=TCh::Mn; Ch<=TCh::Mx; Ch++){UcChV[Ch-TCh::Mn]=TCh(char(Ch));} SetUcCh("Aa"); SetUcCh("Bb"); SetUcCh("Cc"); SetUcCh("Dd"); SetUcCh("Ee"); SetUcCh("Ff"); SetUcCh("Gg"); SetUcCh("Hh"); SetUcCh("Ii"); SetUcCh("Jj"); SetUcCh("Kk"); SetUcCh("Ll"); SetUcCh("Mm"); SetUcCh("Nn"); SetUcCh("Oo"); SetUcCh("Pp"); SetUcCh("Qq"); SetUcCh("Rr"); SetUcCh("Ss"); SetUcCh("Tt"); SetUcCh("Uu"); SetUcCh("Vv"); SetUcCh("Ww"); SetUcCh("Xx"); SetUcCh("Yy"); SetUcCh("Zz"); } else if (ChDefTy==lcdtYuAscii){ // Character-Types ChTyV.PutAll(TInt(lctSpace)); SetChTy(lctNum, "0123456789"); SetChTy(lctAlpha, "ABC^]D\\EFGHIJKLMNOPQRS[TUVWXYZ@"); SetChTy(lctAlpha, "abc~}d|efghijklmnopqrs{tuvwxyz`"); SetChTy(lctAlpha, "_"); SetChTy(lctSSym, "\".,:;+-*/%!#&<=>?()"); SetChTy(lctTerm, TStr(TCh::CrCh)); SetChTy(lctTerm, TStr(TCh::LfCh)); SetChTy(lctTerm, TStr(TCh::EofCh)); // Upper-Case for (int Ch=TCh::Mn; Ch<=TCh::Mx; Ch++){UcChV[Ch-TCh::Mn]=TCh(char(Ch));} SetUcCh("Aa"); SetUcCh("Bb"); SetUcCh("Cc"); SetUcCh("^~"); SetUcCh("]}"); SetUcCh("Dd"); SetUcCh("\\|"); SetUcCh("Ee"); SetUcCh("Ff"); SetUcCh("Gg"); SetUcCh("Hh"); SetUcCh("Ii"); SetUcCh("Jj"); SetUcCh("Kk"); SetUcCh("Ll"); SetUcCh("Mm"); SetUcCh("Nn"); SetUcCh("Oo"); SetUcCh("Pp"); SetUcCh("Qq"); SetUcCh("Rr"); SetUcCh("Ss"); SetUcCh("[{"); SetUcCh("Tt"); SetUcCh("Uu"); SetUcCh("Vv"); SetUcCh("Ww"); SetUcCh("Xx"); SetUcCh("Yy"); SetUcCh("Zz"); SetUcCh("@`"); } else { Fail; } }