#include <parse.hxx>
Collaboration diagram for SmParser:
Public Member Functions | |
SmParser () | |
SmNode * | Parse (const String &rBuffer) |
const String & | GetText () const |
SmConvert | GetConversion () const |
void | SetConversion (SmConvert eConv) |
BOOL | IsImportSymbolNames () const |
void | SetImportSymbolNames (BOOL bVal) |
BOOL | IsExportSymbolNames () const |
void | SetExportSymbolNames (BOOL bVal) |
USHORT | AddError (SmParseError Type, SmNode *pNode) |
const SmErrorDesc * | NextError () |
const SmErrorDesc * | PrevError () |
const SmErrorDesc * | GetError (USHORT i=0xFFFF) |
Protected Member Functions | |
void | NextToken () |
xub_StrLen | GetTokenIndex () const |
void | Insert (const String &rText, USHORT nPos) |
void | Replace (USHORT nPos, USHORT nLen, const String &rText) |
BOOL | TokenInGroup (ULONG nGroup) |
void | Table () |
void | Line () |
void | Expression () |
void | Relation () |
void | Sum () |
void | Product () |
void | SubSup (ULONG nActiveGroup) |
void | OpSubSup () |
void | Power () |
void | Blank () |
void | Term () |
void | Escape () |
void | Operator () |
void | Oper () |
void | UnOper () |
void | Align () |
void | FontAttribut () |
void | Attribut () |
void | Font () |
void | FontSize () |
void | Color () |
void | Brace () |
void | Bracebody (BOOL bIsLeftRight) |
void | Function () |
void | Binom () |
void | Stack () |
void | Matrix () |
void | Special () |
void | GlyphSpecial () |
LanguageType | GetLanguage () const |
void | SetLanguage (LanguageType nNewLang) |
void | Error (SmParseError Error) |
Private Member Functions | |
SmParser (const SmParser &) | |
SmParser & | operator= (const SmParser &) |
Private Attributes | |
String | BufferString |
SmToken | CurToken |
SmNodeStack | NodeStack |
SmErrDescList | ErrDescList |
int | CurError |
LanguageType | nLang |
xub_StrLen | BufferIndex |
xub_StrLen | nTokenIndex |
USHORT | Row |
USHORT | ColOff |
SmConvert | eConversion |
BOOL | bImportSymNames |
BOOL | bExportSymNames |
Definition at line 187 of file parse.hxx.
SmParser::SmParser | ( | const SmParser & | ) | [private] |
SmParser::SmParser | ( | ) |
Definition at line 2395 of file parse.cxx.
References bExportSymNames, bImportSymNames, CONVERT_NONE, eConversion, and nLang.
void SmParser::NextToken | ( | ) | [protected] |
Definition at line 456 of file parse.cxx.
References SmToken::aText, BufferIndex, BufferString, SmToken::cMathChar, ColOff, CurToken, SmToken::eType, GetTokenTableEntry(), IsDigit(), MS_AND, MS_ASSIGN, MS_GE, MS_GG, MS_GT, MS_LBRACE, MS_LBRACKET, MS_LE, MS_LL, MS_LPARENT, MS_LT, MS_MINUS, MS_MINUSPLUS, MS_MULTIPLY, MS_NEQ, MS_OR, MS_PLACE, MS_PLUS, MS_PLUSMINUS, MS_RBRACE, MS_RBRACKET, MS_RPARENT, MS_SLASH, SmToken::nCol, SmToken::nGroup, SmToken::nLevel, SmToken::nRow, nTokenIndex, Row, SM_MOD1, TAND, TASSIGN, TBLANK, TCHARACTER, TDIVIDEBY, TDPOUND, TEND, TESCAPE, TGBLANK, TGE, TGG, TGLBRACES, TGPOWER, TGPRODUCT, TGRBRACES, TGRELATION, TGSUM, TGT, TGUNOPER, TIDENT, TLBRACKET, TLE, TLGROUP, TLL, TLPARENT, TLT, TMINUS, TMINUSPLUS, TMULTIPLY, TNEQ, TNUMBER, TOR, TPLACE, TPLUS, TPLUSMINUS, TPOUND, TRBRACKET, TRGROUP, TRPARENT, TRSUB, TRSUP, TSBLANK, TSPECIAL, and TTEXT.
Referenced by Align(), Attribut(), Binom(), Blank(), Brace(), Bracebody(), Color(), Error(), Escape(), Font(), FontAttribut(), FontSize(), Function(), GlyphSpecial(), Matrix(), Oper(), OpSubSup(), Parse(), Product(), Special(), Stack(), SubSup(), Table(), Term(), and UnOper().
xub_StrLen SmParser::GetTokenIndex | ( | ) | const [inline, protected] |
void SmParser::Insert | ( | const String & | rText, | |
USHORT | nPos | |||
) | [protected] |
void SmParser::Replace | ( | USHORT | nPos, | |
USHORT | nLen, | |||
const String & | rText | |||
) | [protected] |
Definition at line 426 of file parse.cxx.
References BufferIndex, BufferString, and nTokenIndex.
Referenced by Special().
BOOL SmParser::TokenInGroup | ( | ULONG | nGroup | ) | [inline, protected] |
Definition at line 278 of file parse.hxx.
References CurToken, and SmToken::nGroup.
Referenced by Align(), Attribut(), Blank(), Brace(), Bracebody(), Color(), Font(), FontAttribut(), Operator(), OpSubSup(), Product(), Relation(), SubSup(), Sum(), Term(), and UnOper().
void SmParser::Table | ( | ) | [protected] |
Definition at line 1045 of file parse.cxx.
References CurToken, Error(), SmToken::eType, Line(), NextToken(), NodeStack, PE_UNEXPECTED_CHAR, SmStructureNode::SetSubNodes(), TEND, and TNEWLINE.
Referenced by Parse().
void SmParser::Line | ( | ) | [protected] |
Definition at line 1126 of file parse.cxx.
References Align(), CONVERT_40_TO_50, CurToken, SmToken::eType, Expression(), GetConversion(), NodeStack, SmStructureNode::SetSubNodes(), TEND, and TNEWLINE.
Referenced by Table().
void SmParser::Expression | ( | ) | [protected] |
Definition at line 1157 of file parse.cxx.
References CurToken, SmToken::nLevel, NodeStack, Relation(), and SmStructureNode::SetSubNodes().
void SmParser::Relation | ( | ) | [protected] |
Definition at line 1180 of file parse.cxx.
References CurToken, NodeStack, OpSubSup(), SmStructureNode::SetSubNodes(), Sum(), TGRELATION, and TokenInGroup().
Referenced by Expression(), and SubSup().
void SmParser::Sum | ( | ) | [protected] |
Definition at line 1199 of file parse.cxx.
References CurToken, NodeStack, OpSubSup(), Product(), SmStructureNode::SetSubNodes(), TGSUM, and TokenInGroup().
Referenced by Binom(), and Relation().
void SmParser::Product | ( | ) | [protected] |
Definition at line 1218 of file parse.cxx.
References CurToken, SmToken::eType, GlyphSpecial(), NextToken(), NodeStack, OpSubSup(), Power(), SmBinDiagonalNode::SetAscending(), SmStructureNode::SetSubNodes(), TBOPER, TGPRODUCT, TokenInGroup(), TOVER, TOVERBRACE, TUNDERBRACE, TWIDEBACKSLASH, and TWIDESLASH.
Referenced by Sum().
void SmParser::SubSup | ( | ULONG | nActiveGroup | ) | [protected] |
Definition at line 1287 of file parse.cxx.
References CSUB, CSUP, CurToken, Error(), SmToken::eType, LSUB, LSUP, NextToken(), NodeStack, PE_DOUBLE_SUBSUPSCRIPT, Relation(), RSUB, RSUP, SmStructureNode::SetSubNodes(), SmSubSupNode::SetUseLimits(), SUBSUP_NUM_ENTRIES, TCSUB, TCSUP, Term(), TFROM, TGLIMIT, TGPOWER, TLSUB, TLSUP, TokenInGroup(), TRSUB, TRSUP, and TTO.
Referenced by Operator(), OpSubSup(), and Power().
void SmParser::OpSubSup | ( | ) | [protected] |
Definition at line 1355 of file parse.cxx.
References CurToken, NextToken(), NodeStack, SubSup(), TGPOWER, and TokenInGroup().
Referenced by Product(), Relation(), Sum(), and UnOper().
void SmParser::Power | ( | ) | [protected] |
void SmParser::Blank | ( | ) | [protected] |
Definition at line 1376 of file parse.cxx.
References SmBlankNode::Clear(), CurToken, SmToken::eType, SmBlankNode::IncreaseBy(), NextToken(), NodeStack, SM_MOD1, TEND, TGBLANK, TNEWLINE, and TokenInGroup().
Referenced by Term().
void SmParser::Term | ( | ) | [protected] |
Definition at line 1396 of file parse.cxx.
References Align(), Attribut(), Binom(), Blank(), Brace(), CONVERT_40_TO_50, CurToken, Error(), Escape(), SmToken::eType, FNT_NUMBER, FNT_TEXT, FNT_VARIABLE, FontAttribut(), Function(), GetConversion(), SmNode::GetToken(), GetTokenIndex(), Insert(), Matrix(), NextToken(), NodeStack, Operator(), PE_RGROUP_EXPECTED, PE_UNEXPECTED_CHAR, Power(), SmStructureNode::SetSubNodes(), Special(), Stack(), TALEPH, TBACKEPSILON, TBINOM, TBLANK, TCHARACTER, TCIRC, TDLARROW, TDLRARROW, TDOTSAXIS, TDOTSDIAG, TDOTSDOWN, TDOTSLOW, TDOTSUP, TDOTSVERT, TDOWNARROW, TDRARROW, TEMPTYSET, TESCAPE, TEXISTS, TFORALL, TGATTRIBUT, TGFONTATTR, TGFUNCTION, TGLBRACES, TGOPER, TGUNOPER, THBAR, TIDENT, TIM, TINFINITY, TLAMBDABAR, TLEFT, TLEFTARROW, TLGROUP, TLPARENT, TMATRIX, TNABLA, TNUMBER, TokenInGroup(), TPARTIAL, TPLACE, TRE, TRGROUP, TRIGHTARROW, TSBLANK, TSETC, TSETN, TSETQ, TSETR, TSETZ, TSPECIAL, TSTACK, TTEXT, TTOWARD, TUPARROW, TWP, and UnOper().
void SmParser::Escape | ( | ) | [protected] |
Definition at line 1584 of file parse.cxx.
References CurToken, Error(), SmToken::eType, MS_DLINE, MS_LANGLE, MS_LBRACE, MS_LBRACKET, MS_LCEIL, MS_LDBRACKET, MS_LFLOOR, MS_LINE, MS_LPARENT, MS_RANGLE, MS_RBRACE, MS_RBRACKET, MS_RCEIL, MS_RDBRACKET, MS_RFLOOR, MS_RPARENT, NextToken(), NodeStack, PE_UNEXPECTED_TOKEN, TLANGLE, TLBRACE, TLBRACKET, TLCEIL, TLDBRACKET, TLDLINE, TLFLOOR, TLGROUP, TLLINE, TLPARENT, TRANGLE, TRBRACE, TRBRACKET, TRCEIL, TRDBRACKET, TRDLINE, TRFLOOR, TRGROUP, TRLINE, and TRPARENT.
Referenced by Term().
void SmParser::Operator | ( | ) | [protected] |
Definition at line 1621 of file parse.cxx.
References CurToken, SmToken::nGroup, NodeStack, Oper(), Power(), SmStructureNode::SetSubNodes(), SubSup(), TGLIMIT, TGOPER, TGPOWER, and TokenInGroup().
Referenced by Term().
void SmParser::Oper | ( | ) | [protected] |
Definition at line 1642 of file parse.cxx.
References SmToken::aText, CurToken, SmToken::eType, FNT_TEXT, NextToken(), NodeStack, TCOPROD, TIIINT, TIINT, TINT, TLIM, TLIMINF, TLIMSUP, TLINT, TLLINT, TLLLINT, TOPER, TOVERBRACE, TPROD, TSPECIAL, TSUM, and TUNDERBRACE.
Referenced by Operator().
void SmParser::UnOper | ( | ) | [protected] |
Definition at line 1701 of file parse.cxx.
References SmToken::cMathChar, CurToken, Error(), SmToken::eType, GlyphSpecial(), MS_LINE, NextToken(), NodeStack, OpSubSup(), PE_UNOPER_EXPECTED, Power(), SCALE_HEIGHT, SmNode::SetScaleMode(), SmStructureNode::SetSubNodes(), TABS, TFACT, TGUNOPER, TMINUS, TMINUSPLUS, TNEG, TNROOT, TokenInGroup(), TPLUS, TPLUSMINUS, TSQRT, and TUOPER.
Referenced by Term().
void SmParser::Align | ( | ) | [protected] |
Definition at line 1072 of file parse.cxx.
References SmToken::aText, BufferIndex, BufferString, CONVERT_40_TO_50, CurToken, Error(), Expression(), GetConversion(), GetTokenIndex(), Insert(), NextToken(), NodeStack, PE_DOUBLE_ALIGN, SmStructureNode::SetSubNodes(), TGALIGN, TGDISCARDED, and TokenInGroup().
Referenced by Bracebody(), Line(), Matrix(), Stack(), and Term().
void SmParser::FontAttribut | ( | ) | [protected] |
Definition at line 1823 of file parse.cxx.
References Color(), CurToken, SmToken::eType, Font(), FontSize(), NextToken(), NodeStack, TBOLD, TCOLOR, TFONT, TGFONTATTR, TITALIC, TNBOLD, TNITALIC, TokenInGroup(), TPHANTOM, and TSIZE.
Referenced by Term().
void SmParser::Attribut | ( | ) | [protected] |
Definition at line 1787 of file parse.cxx.
References CurToken, SmToken::eType, NextToken(), NodeStack, SCALE_NONE, SCALE_WIDTH, SmNode::SetScaleMode(), SmStructureNode::SetSubNodes(), TGATTRIBUT, TokenInGroup(), TOVERLINE, TOVERSTRIKE, TUNDERLINE, TWIDEHAT, TWIDETILDE, and TWIDEVEC.
Referenced by Term().
void SmParser::Font | ( | ) | [protected] |
Definition at line 1877 of file parse.cxx.
References CurToken, Error(), SmToken::eType, NextToken(), NodeStack, PE_FONT_EXPECTED, TFONT, TGFONT, and TokenInGroup().
Referenced by FontAttribut().
void SmParser::FontSize | ( | ) | [protected] |
Definition at line 1920 of file parse.cxx.
References SmToken::aText, CurToken, Error(), SmToken::eType, FNTSIZ_ABSOLUT, FNTSIZ_DIVIDE, FNTSIZ_MINUS, FNTSIZ_MULTIPLY, FNTSIZ_PLUS, lcl_IsNumber(), NextToken(), NodeStack, PE_SIZE_EXPECTED, SmFontNode::SetSizeParameter(), TDIVIDEBY, TMINUS, TMULTIPLY, TNUMBER, TPLUS, and TSIZE.
Referenced by FontAttribut().
void SmParser::Color | ( | ) | [protected] |
Definition at line 1856 of file parse.cxx.
References CurToken, Error(), SmToken::eType, NextToken(), NodeStack, PE_COLOR_EXPECTED, TCOLOR, TGCOLOR, and TokenInGroup().
Referenced by FontAttribut().
void SmParser::Brace | ( | ) | [protected] |
Definition at line 1989 of file parse.cxx.
References Bracebody(), CurToken, Error(), SmToken::eType, NextToken(), NodeStack, PE_LBRACE_EXPECTED, PE_NONE, PE_PARENT_MISMATCH, PE_RBRACE_EXPECTED, PE_RIGHT_EXPECTED, SCALE_HEIGHT, SCALE_NONE, SmNode::SetScaleMode(), SmStructureNode::SetSubNodes(), TGLBRACES, TGRBRACES, TLANGLE, TLBRACE, TLBRACKET, TLCEIL, TLDBRACKET, TLDLINE, TLEFT, TLFLOOR, TLLINE, TLPARENT, TokenInGroup(), TRANGLE, TRBRACE, TRBRACKET, TRCEIL, TRDBRACKET, TRDLINE, TRFLOOR, TRIGHT, TRLINE, TRPARENT, and TUNKNOWN.
Referenced by Term().
void SmParser::Bracebody | ( | BOOL | bIsLeftRight | ) | [protected] |
Definition at line 2088 of file parse.cxx.
References Align(), CurToken, Error(), SmToken::eType, NextToken(), NodeStack, PE_RBRACE_EXPECTED, PE_RIGHT_EXPECTED, SCALE_HEIGHT, SCALE_NONE, SmNode::SetScaleMode(), SmStructureNode::SetSubNodes(), TEND, TGRBRACES, TMLINE, TokenInGroup(), and TRIGHT.
Referenced by Brace().
void SmParser::Function | ( | ) | [protected] |
Definition at line 2145 of file parse.cxx.
References CurToken, Error(), SmToken::eType, FNT_FUNCTION, NextToken(), NodeStack, PE_FUNC_EXPECTED, TACOS, TACOSH, TACOT, TACOTH, TASIN, TASINH, TATAN, TATANH, TCOS, TCOSH, TCOT, TCOTH, TEXP, TFUNC, TLN, TLOG, TSIN, TSINH, TTAN, and TTANH.
Referenced by Term().
void SmParser::Binom | ( | ) | [protected] |
Definition at line 2182 of file parse.cxx.
References CurToken, NextToken(), NodeStack, SmStructureNode::SetSubNodes(), and Sum().
Referenced by Term().
void SmParser::Stack | ( | ) | [protected] |
Definition at line 2202 of file parse.cxx.
References Align(), CurToken, Error(), SmToken::eType, NextToken(), NodeStack, PE_LGROUP_EXPECTED, PE_RGROUP_EXPECTED, SmStructureNode::SetSubNodes(), TLGROUP, TPOUND, and TRGROUP.
Referenced by Term().
void SmParser::Matrix | ( | ) | [protected] |
Definition at line 2237 of file parse.cxx.
References Align(), CurToken, Error(), SmToken::eType, NextToken(), NodeStack, PE_POUND_EXPECTED, PE_RGROUP_EXPECTED, SmMatrixNode::SetRowCol(), SmStructureNode::SetSubNodes(), TDPOUND, TLGROUP, TPOUND, and TRGROUP.
Referenced by Term().
void SmParser::Special | ( | ) | [protected] |
Definition at line 2298 of file parse.cxx.
References SmToken::aText, CONVERT_50_TO_60, CONVERT_60_TO_50, CONVERT_NONE, CurToken, SmLocalizedSymbolData::Get50NamesArray(), SmLocalizedSymbolData::Get60NamesArray(), GetConversion(), SmLocalizedSymbolData::GetExportSymbolName(), GetLanguage(), GetTokenIndex(), SmLocalizedSymbolData::GetUiSymbolName(), IsExportSymbolNames(), IsImportSymbolNames(), NextToken(), NodeStack, Replace(), and SM_MOD1.
Referenced by Term().
void SmParser::GlyphSpecial | ( | ) | [protected] |
LanguageType SmParser::GetLanguage | ( | ) | const [inline, protected] |
void SmParser::SetLanguage | ( | LanguageType | nNewLang | ) | [inline, protected] |
void SmParser::Error | ( | SmParseError | Error | ) | [protected] |
Definition at line 2375 of file parse.cxx.
References AddError(), CurToken, NextToken(), NodeStack, and SmStructureNode::SetSubNodes().
Referenced by Align(), Brace(), Bracebody(), Color(), Escape(), Font(), FontSize(), Function(), Matrix(), Stack(), SubSup(), Table(), Term(), and UnOper().
SmNode * SmParser::Parse | ( | const String & | rBuffer | ) |
Definition at line 2403 of file parse.cxx.
References BufferIndex, BufferString, ColOff, CurError, ErrDescList, NextToken(), NodeStack, nTokenIndex, Row, SetLanguage(), and Table().
Referenced by SmXMLExport::_ExportContent(), SmTextNode::CreateTextFromNode(), SmXMLImport::endDocument(), and SmDocShell::Parse().
const String& SmParser::GetText | ( | ) | const [inline] |
Definition at line 260 of file parse.hxx.
References BufferString.
Referenced by SmXMLExport::_ExportContent(), and SmXMLImport::endDocument().
SmConvert SmParser::GetConversion | ( | ) | const [inline] |
void SmParser::SetConversion | ( | SmConvert | eConv | ) | [inline] |
BOOL SmParser::IsImportSymbolNames | ( | ) | const [inline] |
Definition at line 265 of file parse.hxx.
References bImportSymNames.
Referenced by SmXMLImport::endDocument(), and Special().
void SmParser::SetImportSymbolNames | ( | BOOL | bVal | ) | [inline] |
Definition at line 266 of file parse.hxx.
References bImportSymNames.
Referenced by SmXMLImport::endDocument().
BOOL SmParser::IsExportSymbolNames | ( | ) | const [inline] |
Definition at line 267 of file parse.hxx.
References bExportSymNames.
Referenced by SmXMLExport::_ExportContent(), and Special().
void SmParser::SetExportSymbolNames | ( | BOOL | bVal | ) | [inline] |
Definition at line 268 of file parse.hxx.
References bExportSymNames.
Referenced by SmXMLExport::_ExportContent().
USHORT SmParser::AddError | ( | SmParseError | Type, | |
SmNode * | pNode | |||
) |
Definition at line 2428 of file parse.cxx.
References ErrDescList, PE_BINOPER_EXPECTED, PE_COLOR_EXPECTED, PE_FUNC_EXPECTED, PE_IDENTIFIER_EXPECTED, PE_LBRACE_EXPECTED, PE_LGROUP_EXPECTED, PE_POUND_EXPECTED, PE_RBRACE_EXPECTED, PE_RGROUP_EXPECTED, PE_RIGHT_EXPECTED, PE_SYMBOL_EXPECTED, PE_UNEXPECTED_CHAR, PE_UNOPER_EXPECTED, SmErrorDesc::pNode, SmErrorDesc::Text, and SmErrorDesc::Type.
Referenced by Error().
const SmErrorDesc * SmParser::NextError | ( | ) |
Definition at line 2464 of file parse.cxx.
References CurError, and ErrDescList.
Referenced by SmViewShell::NextError().
const SmErrorDesc * SmParser::PrevError | ( | ) |
Definition at line 2477 of file parse.cxx.
References CurError, and ErrDescList.
Referenced by SmViewShell::PrevError().
const SmErrorDesc * SmParser::GetError | ( | USHORT | i = 0xFFFF |
) |
String SmParser::BufferString [private] |
SmToken SmParser::CurToken [private] |
Definition at line 190 of file parse.hxx.
Referenced by Align(), Attribut(), Binom(), Blank(), Brace(), Bracebody(), Color(), Error(), Escape(), Expression(), Font(), FontAttribut(), FontSize(), Function(), GlyphSpecial(), Line(), Matrix(), NextToken(), Oper(), Operator(), OpSubSup(), Product(), Relation(), Special(), Stack(), SubSup(), Sum(), Table(), Term(), TokenInGroup(), and UnOper().
SmNodeStack SmParser::NodeStack [private] |
Definition at line 191 of file parse.hxx.
Referenced by Align(), Attribut(), Binom(), Blank(), Brace(), Bracebody(), Color(), Error(), Escape(), Expression(), Font(), FontAttribut(), FontSize(), Function(), GlyphSpecial(), Line(), Matrix(), Oper(), Operator(), OpSubSup(), Parse(), Product(), Relation(), Special(), Stack(), SubSup(), Sum(), Table(), Term(), and UnOper().
SmErrDescList SmParser::ErrDescList [private] |
Definition at line 192 of file parse.hxx.
Referenced by AddError(), GetError(), NextError(), Parse(), and PrevError().
int SmParser::CurError [private] |
Definition at line 193 of file parse.hxx.
Referenced by GetError(), NextError(), Parse(), and PrevError().
LanguageType SmParser::nLang [private] |
Definition at line 194 of file parse.hxx.
Referenced by GetLanguage(), SetLanguage(), and SmParser().
xub_StrLen SmParser::BufferIndex [private] |
xub_StrLen SmParser::nTokenIndex [private] |
Definition at line 195 of file parse.hxx.
Referenced by GetTokenIndex(), Insert(), NextToken(), Parse(), and Replace().
USHORT SmParser::Row [private] |
USHORT SmParser::ColOff [private] |
SmConvert SmParser::eConversion [private] |
Definition at line 199 of file parse.hxx.
Referenced by GetConversion(), SetConversion(), and SmParser().
BOOL SmParser::bImportSymNames [private] |
Definition at line 200 of file parse.hxx.
Referenced by IsImportSymbolNames(), SetImportSymbolNames(), and SmParser().
BOOL SmParser::bExportSymNames [private] |
Definition at line 200 of file parse.hxx.
Referenced by IsExportSymbolNames(), SetExportSymbolNames(), and SmParser().