LibreOffice Module basic (master) 1
|
#include <expr.hxx>
Public Member Functions | |
SbiExpression (SbiParser *, SbiExprType=SbSTDEXPR, SbiExprMode eMode=EXPRMODE_STANDARD, const KeywordSymbolInfo *pKeywordSymbolInfo=nullptr) | |
SbiExpression (SbiParser *, double, SbxDataType) | |
SbiExpression (SbiParser *, const SbiSymDef &, SbiExprListPtr=nullptr) | |
~SbiExpression () | |
OUString & | GetName () |
void | SetBased () |
bool | IsBased () const |
void | SetByVal () |
bool | IsBracket () const |
bool | IsValid () const |
bool | IsVariable () const |
bool | IsLvalue () const |
void | ConvertToIntConstIfPossible () |
const OUString & | GetString () const |
SbiSymDef * | GetRealVar () |
SbiExprNode * | GetExprNode () |
SbxDataType | GetType () const |
void | Gen (RecursiveMode eRecMode=UNDEFINED) |
Protected Member Functions | |
std::unique_ptr< SbiExprNode > | Term (const KeywordSymbolInfo *pKeywordSymbolInfo=nullptr) |
std::unique_ptr< SbiExprNode > | ObjTerm (SbiSymDef &) |
std::unique_ptr< SbiExprNode > | Operand (bool bUsedForTypeOf=false) |
std::unique_ptr< SbiExprNode > | Unary () |
std::unique_ptr< SbiExprNode > | Exp () |
std::unique_ptr< SbiExprNode > | MulDiv () |
std::unique_ptr< SbiExprNode > | IntDiv () |
std::unique_ptr< SbiExprNode > | Mod () |
std::unique_ptr< SbiExprNode > | AddSub () |
std::unique_ptr< SbiExprNode > | Cat () |
std::unique_ptr< SbiExprNode > | Like () |
std::unique_ptr< SbiExprNode > | VBA_Not () |
std::unique_ptr< SbiExprNode > | Comp () |
std::unique_ptr< SbiExprNode > | Boolean () |
Protected Attributes | |
OUString | aArgName |
SbiParser * | pParser |
std::unique_ptr< SbiExprNode > | pExpr |
SbiExprType | eCurExpr |
SbiExprMode | m_eMode |
bool | bBased = false |
bool | bError = false |
bool | bByVal = false |
bool | bBracket = false |
sal_uInt16 | nParenLevel = 0 |
Friends | |
class | SbiExprList |
SbiExpression::SbiExpression | ( | SbiParser * | p, |
SbiExprType | t = SbSTDEXPR , |
||
SbiExprMode | eMode = EXPRMODE_STANDARD , |
||
const KeywordSymbolInfo * | pKeywordSymbolInfo = nullptr |
||
) |
Definition at line 28 of file exprtree.cxx.
References Boolean(), eMode, ERRCODE_BASIC_LVALUE_EXPECTED, ERRCODE_BASIC_VAR_EXPECTED, IsVariable(), p, pExpr, pParser, SbLVALUE, SbOPERAND, SbSTDEXPR, SbSYMBOL, t, and Term().
SbiExpression::SbiExpression | ( | SbiParser * | p, |
double | n, | ||
SbxDataType | t | ||
) |
SbiExpression::SbiExpression | ( | SbiParser * | p, |
const SbiSymDef & | r, | ||
SbiExprListPtr | pPar = nullptr |
||
) |
Definition at line 58 of file exprtree.cxx.
References p, pExpr, and SbxVARIANT.
SbiExpression::~SbiExpression | ( | ) |
Definition at line 66 of file exprtree.cxx.
|
protected |
Definition at line 679 of file exprtree.cxx.
References EXPRMODE_EMPTY_PAREN, m_eMode, MINUS, Mod(), SbiTokenizer::Next(), SbiTokenizer::Peek(), PLUS, and pParser.
Referenced by Cat().
|
protected |
Definition at line 781 of file exprtree.cxx.
References AND, EQV, EXPRMODE_EMPTY_PAREN, IMP, IS, Like(), m_eMode, SbiTokenizer::Next(), OR, SbiTokenizer::Peek(), pParser, and XOR.
Referenced by Operand(), and SbiExpression().
|
protected |
Definition at line 698 of file exprtree.cxx.
References AddSub(), CAT, EXPRMODE_EMPTY_PAREN, m_eMode, SbiTokenizer::Next(), SbiTokenizer::Peek(), and pParser.
Referenced by Comp().
|
protected |
Definition at line 717 of file exprtree.cxx.
References Cat(), EQ, EXPRMODE_ARRAY_OR_OBJECT, EXPRMODE_EMPTY_PAREN, GE, GT, LE, LT, m_eMode, NE, SbiTokenizer::Next(), SbiTokenizer::Peek(), and pParser.
|
inline |
|
protected |
Definition at line 618 of file exprtree.cxx.
References EXPON, EXPRMODE_EMPTY_PAREN, m_eMode, SbiTokenizer::Next(), SbiTokenizer::Peek(), pParser, and Unary().
Referenced by MulDiv().
void SbiExpression::Gen | ( | RecursiveMode | eRecMode = UNDEFINED | ) |
Definition at line 260 of file exprgen.cxx.
References SbiParser::aGen, ARGV_, BASED_, bBased, bByVal, BYVAL_, SbiCodeGen::Gen(), SbiScanner::IsCompatible(), SbiParser::nBase, pExpr, and pParser.
Referenced by SbiParser::Assign(), SbiParser::Call(), SbiParser::Channel(), SbiParser::Close(), SbiParser::DefEnum(), SbiParser::DefVar(), SbiParser::DoLoop(), SbiParser::Erase(), SbiParser::ErrorStmnt(), SbiParser::For(), SbiParser::If(), SbiParser::LSet(), SbiParser::Name(), SbiParser::OnGoto(), SbiParser::Open(), SbiParser::RSet(), SbiParser::Select(), SbiParser::Set(), SbiParser::Symbol(), and SbiParser::While().
|
inline |
Definition at line 210 of file expr.hxx.
References pExpr.
Referenced by SbiParser::Symbol(), and SbiParser::With().
|
inline |
|
inline |
Definition at line 209 of file expr.hxx.
References pExpr.
Referenced by SbiParser::Assign(), SbiParser::For(), SbiParser::LSet(), SbiParser::RSet(), SbiParser::Set(), and SbiParser::Symbol().
|
inline |
|
inline |
Definition at line 211 of file expr.hxx.
References pExpr.
Referenced by SbiParser::LSet(), SbiParser::RSet(), and SbiParser::Set().
|
protected |
Definition at line 651 of file exprtree.cxx.
References EXPRMODE_EMPTY_PAREN, IDIV, m_eMode, MulDiv(), SbiTokenizer::Next(), SbiTokenizer::Peek(), and pParser.
Referenced by Mod().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 204 of file expr.hxx.
References pExpr.
Referenced by SbiParser::DefEnum(), and SbiParser::DefVar().
|
inline |
|
protected |
Definition at line 759 of file exprtree.cxx.
References bError, Comp(), ERRCODE_BASIC_SYNTAX, SbiTokenizer::Error(), EXPRMODE_EMPTY_PAREN, SbiScanner::IsVBASupportOn(), LIKE, m_eMode, nCount, SbiTokenizer::Next(), SbiTokenizer::Peek(), pParser, and VBA_Not().
|
protected |
Definition at line 665 of file exprtree.cxx.
References EXPRMODE_EMPTY_PAREN, IntDiv(), m_eMode, MOD, SbiTokenizer::Next(), SbiTokenizer::Peek(), and pParser.
Referenced by AddSub().
|
protected |
Definition at line 632 of file exprtree.cxx.
References DIV, Exp(), EXPRMODE_EMPTY_PAREN, m_eMode, MUL, SbiTokenizer::Next(), SbiTokenizer::Peek(), and pParser.
Referenced by IntDiv().
|
protected |
Definition at line 381 of file exprtree.cxx.
References AddSym(), AND, bError, DoParametersFollow(), DOT, eCurExpr, EQV, ERRCODE_BASIC_BAD_DECLARATION, ERRCODE_BASIC_VAR_EXPECTED, SbiTokenizer::Error(), eType, EXCLAM, SbiSymPool::Find(), SbiSymDef::GetPool(), SbiScanner::GetSym(), SbiScanner::GetType(), SbiSymDef::GetType(), IMP, IS, SbiTokenizer::IsExtra(), SbiTokenizer::IsKwd(), LPAREN, MOD, SbiTokenizer::Next(), NOT, ObjTerm(), OR, SbiExprList::ParseParameters(), SbiTokenizer::Peek(), pParser, SbPUBLIC, SbxOBJECT, SbxVARIANT, SbiSymPool::SetScope(), SbiSymDef::SetType(), SYMBOL, SbiScanner::WhiteSpace(), and XOR.
|
protected |
Definition at line 482 of file exprtree.cxx.
References Boolean(), DOT, EQ, ERRCODE_BASIC_BAD_BRACKETS, ERRCODE_BASIC_UNEXPECTED, SbiTokenizer::Error(), EXPRMODE_ARRAY_OR_OBJECT, EXPRMODE_EMPTY_PAREN, EXPRMODE_LPAREN_NOT_NEEDED, EXPRMODE_LPAREN_PENDING, EXPRMODE_STANDARD, FIXSTRING, SbiScanner::GetDbl(), SbiScanner::GetSym(), SbiScanner::GetType(), IS, SbiTokenizer::IsKwd(), SbiScanner::IsVBASupportOn(), Like(), LPAREN, m_eMode, SbiTokenizer::Next(), NOT, nParenLevel, NUMBER, SbiTokenizer::Peek(), pParser, RPAREN, SbxDOUBLE, SYMBOL, Term(), and VBA_Not().
Referenced by Unary().
|
protected |
Definition at line 154 of file exprtree.cxx.
References AddSym(), SbiParser::aGen, ASSIGN, bBracket, bError, SbiParser::CheckRTLForSym(), DontCare, DoParametersFollow(), DOT, eCurExpr, ERRCODE_BASIC_BAD_DECLARATION, ERRCODE_BASIC_SYNTAX, ERRCODE_BASIC_UNEXPECTED, ERRCODE_BASIC_WRONG_DIMS, SbiTokenizer::Error(), eType, EXCLAM, EXPRMODE_STANDALONE, SbiSymPool::Find(), SbModule::FindMethod(), SbiSymDef::GetConstDef(), SbiSymDef::GetDims(), SbiCodeGen::GetModule(), SbiSymDef::GetProcDef(), SbiExprNode::GetRealVar(), SbiConstDef::GetString(), SbiScanner::GetSym(), SbiScanner::GetType(), SbiSymDef::GetType(), SbiConstDef::GetValue(), SbiParser::GetWithVar(), INPUT, SbiScanner::IsCompatible(), SbiSymDef::IsDefinedAs(), SbiTokenizer::IsKwd(), SbiSymDef::IsStatic(), SbiScanner::IsVBASupportOn(), SbiScanner::LockColumn(), LPAREN, KeywordSymbolInfo::m_aKeywordSymbol, m_eMode, KeywordSymbolInfo::m_eSbxDataType, SbiTokenizer::Next(), ObjTerm(), SbiExprList::ParseParameters(), SbiTokenizer::Peek(), pParser, SbiParser::pPool, SbiParser::pProc, SbxDOUBLE, SbxINTEGER, SbxOBJECT, SbxSTRING, SbxVARIANT, SbiSymDef::SetStatic(), SbiSymDef::SetType(), SYMBOL, SbiScanner::UnlockColumn(), and SbiScanner::WhiteSpace().
Referenced by Operand(), and SbiExpression().
|
protected |
Definition at line 568 of file exprtree.cxx.
References SbiSymDef::GetTypeId(), IS, SbiScanner::IsVBASupportOn(), MINUS, NEG, NEW, SbiTokenizer::Next(), NOT, Operand(), SbiTokenizer::Peek(), PLUS, pParser, SbiParser::TestToken(), SbiParser::TypeDecl(), TYPEOF, and Unary().
|
protected |
Definition at line 742 of file exprtree.cxx.
References Comp(), SbiTokenizer::Next(), NOT, SbiTokenizer::Peek(), pParser, and VBA_Not().
|
friend |
|
protected |
|
protected |
Definition at line 174 of file expr.hxx.
Referenced by Gen(), IsBased(), and SetBased().
|
protected |
Definition at line 177 of file expr.hxx.
Referenced by IsBracket(), and Term().
|
protected |
Definition at line 176 of file expr.hxx.
Referenced by Gen(), and SetByVal().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 171 of file expr.hxx.
Referenced by ConvertToIntConstIfPossible(), Gen(), GetExprNode(), GetRealVar(), GetString(), GetType(), IsLvalue(), IsValid(), IsVariable(), SbiConstExpression::SbiConstExpression(), and SbiExpression().
|
protected |