LibreOffice Module basic (master) 1
|
#include <parser.hxx>
Public Member Functions | |
SbiParser (StarBASIC *, SbModule *) | |
~SbiParser () | |
bool | Parse () |
void | SetCodeCompleting (bool b) |
bool | IsCodeCompleting () const |
SbiExprNode * | GetWithVar () |
SbiSymDef * | CheckRTLForSym (const OUString &rSym, SbxDataType eType) |
void | AddConstants () |
bool | HasGlobalCode () |
bool | TestToken (SbiToken) |
bool | TestSymbol () |
bool | TestComma () |
void | TestEoln () |
void | Symbol (const KeywordSymbolInfo *pKeywordSymbolInfo) |
void | ErrorStmnt () |
void | BadBlock () |
void | NoIf () |
void | Assign () |
void | Attribute () |
void | Call () |
void | Close () |
void | Declare () |
void | DefXXX () |
void | Dim () |
void | ReDim () |
void | Erase () |
void | Exit () |
void | For () |
void | Goto () |
void | If () |
void | Implements () |
void | Input () |
void | Line () |
void | LineInput () |
void | LSet () |
void | Name () |
void | On () |
void | OnGoto () |
void | Open () |
void | Option () |
void | Print () |
void | SubFunc () |
void | Resume () |
void | Return () |
void | RSet () |
void | DoLoop () |
void | Select () |
void | Set () |
void | Static () |
void | Stop () |
void | Type () |
void | Enum () |
void | While () |
void | With () |
void | Write () |
Public Member Functions inherited from SbiTokenizer | |
SbiTokenizer (const OUString &, StarBASIC *=nullptr) | |
bool | IsEof () const |
bool | IsEos () const |
void | Push (SbiToken) |
const OUString & | Symbol (SbiToken) |
SbiToken | Peek () |
SbiToken | Next () |
bool | MayBeLabel (bool=false) |
void | Error (ErrCode c) |
void | Error (ErrCode, SbiToken) |
void | Error (ErrCode, const OUString &) |
Public Member Functions inherited from SbiScanner | |
SbiScanner (OUString, StarBASIC *=nullptr) | |
void | EnableErrors () |
bool | IsHash () const |
bool | IsCompatible () const |
void | SetCompatible (bool b) |
bool | IsVBASupportOn () const |
bool | WhiteSpace () const |
sal_Int32 | GetErrors () const |
sal_Int32 | GetLine () const |
sal_Int32 | GetCol1 () const |
void | SetCol1 (sal_Int32 n) |
StarBASIC * | GetBasic () |
void | SaveLine () |
void | RestoreLine () |
void | LockColumn () |
void | UnlockColumn () |
bool | DoesColonFollow () |
bool | NextSym () |
const OUString & | GetSym () const |
SbxDataType | GetType () const |
double | GetDbl () const |
Public Attributes | |
SbxArrayRef | rTypeArray |
SbxArrayRef | rEnumArray |
SbiStringPool | aGblStrings |
SbiStringPool | aLclStrings |
SbiSymPool | aGlobals |
SbiSymPool | aPublics |
SbiSymPool | aRtlSyms |
SbiCodeGen | aGen |
SbiSymPool * | pPool |
short | nBase |
bool | bExplicit |
bool | bClassModule |
std::vector< OUString > | aIfaceVector |
std::vector< OUString > | aRequiredTypes |
SbxDataType | eDefTypes [N_DEF_TYPES] |
Private Member Functions | |
SbiSymDef * | VarDecl (SbiExprListPtr *, bool, bool) |
SbiProcDef * | ProcDecl (bool bDecl) |
void | DefStatic (bool bPrivate) |
void | DefProc (bool bStatic, bool bPrivate) |
void | DefVar (SbiOpcode eOp, bool bStatic) |
void | TypeDecl (SbiSymDef &, bool bAsNewAlreadyParsed=false) |
void | OpenBlock (SbiToken, SbiExprNode *=nullptr) |
void | CloseBlock () |
bool | Channel (bool bAlways=false) |
void | StmntBlock (SbiToken) |
void | DefType () |
void | DefEnum (bool bPrivate) |
void | DefDeclare (bool bPrivate) |
void | EnableCompatibility () |
Static Private Member Functions | |
static bool | IsUnoInterface (const OUString &sTypeName) |
Private Attributes | |
SbiParseStack * | pStack |
SbiProcDef * | pProc |
SbiExprNode * | pWithVar |
SbiToken | eEndTok |
sal_uInt32 | nGblChain |
bool | bGblDefs |
bool | bNewGblDefs |
bool | bSingleLineIf |
bool | bCodeCompleting |
Friends | |
class | SbiExpression |
Additional Inherited Members | |
Static Public Member Functions inherited from SbiTokenizer | |
static bool | IsEoln (SbiToken t) |
static bool | IsKwd (SbiToken t) |
static bool | IsExtra (SbiToken t) |
static OUString | GetKeywordCase (std::u16string_view sKeyword) |
Protected Member Functions inherited from SbiScanner | |
void | GenError (ErrCode) |
Protected Attributes inherited from SbiTokenizer | |
SbiToken | eCurTok |
SbiToken | ePush |
sal_uInt16 | nPLine |
sal_uInt16 | nPCol1 |
sal_uInt16 | nPCol2 |
bool | bEof |
bool | bEos |
bool | bAs |
bool | bErrorIsSymbol |
Protected Attributes inherited from SbiScanner | |
OUString | aSym |
OUString | aError |
SbxDataType | eScanType |
double | nVal |
sal_Int32 | nSavedCol1 |
sal_Int32 | nCol |
sal_Int32 | nErrors |
sal_Int32 | nColLock |
sal_Int32 | nBufPos |
sal_Int32 | nLine |
sal_Int32 | nCol1 |
sal_Int32 | nCol2 |
bool | bSymbol |
bool | bNumber |
bool | bSpaces |
bool | bAbort |
bool | bHash |
bool | bError |
bool | bCompatible |
bool | bVBASupportOn |
bool | bPrevLineExtentsComment |
bool | bClosingUnderscore |
bool | bLineEndsWithWhitespace |
bool | bInStatement |
Definition at line 31 of file parser.hxx.
Definition at line 118 of file parser.cxx.
References aGen, aGlobals, aPublics, aRtlSyms, bClassModule, SbiScanner::bVBASupportOn, eDefTypes, EnableCompatibility(), SbiCodeGen::Gen(), SbModule::GetModuleType(), SbModule::IsVBASupport(), JUMP_, nGblChain, pPool, rEnumArray, rTypeArray, SbxVARIANT, and SbiSymPool::SetParent().
SbiParser::~SbiParser | ( | ) |
Definition at line 154 of file parser.cxx.
void SbiParser::AddConstants | ( | ) |
Definition at line 850 of file parser.cxx.
References addNumericConst(), addStringConst(), aPublics, and u.
Referenced by EnableCompatibility().
void SbiParser::Assign | ( | ) |
Definition at line 562 of file parser.cxx.
References aGen, EQ, ERRCODE_BASIC_DUPLICATE_DEF, SbiTokenizer::Error(), SbiExpression::Gen(), SbiCodeGen::Gen(), SbiSymDef::GetConstDef(), SbiSymDef::GetLen(), SbiSymDef::GetName(), SbiExpression::GetRealVar(), PAD_, PUT_, SbLVALUE, and TestToken().
void SbiParser::Attribute | ( | ) |
Definition at line 1160 of file dim.cxx.
References DOT, SbiTokenizer::eCurTok, EQ, ERRCODE_BASIC_SYNTAX, SbiTokenizer::Error(), and SbiTokenizer::Next().
void SbiParser::BadBlock | ( | ) |
Definition at line 292 of file loops.cxx.
References eEndTok, ERRCODE_BASIC_BAD_BLOCK, and SbiTokenizer::Error().
void SbiParser::Call | ( | ) |
Definition at line 1184 of file dim.cxx.
References aGen, FORCE_CALL, SbiExpression::Gen(), SbiCodeGen::Gen(), GET_, and SbSYMBOL.
|
private |
Definition at line 27 of file io.cxx.
References aGen, CHANNEL_, COMMA, ERRCODE_BASIC_EXPECTED, SbiTokenizer::Error(), SbiExpression::Gen(), SbiCodeGen::Gen(), SbiScanner::IsHash(), SbiTokenizer::Next(), SbiTokenizer::Peek(), and SEMICOLON.
Referenced by Input(), LineInput(), Print(), and Write().
SbiSymDef * SbiParser::CheckRTLForSym | ( | const OUString & | rSym, |
SbxDataType | eType | ||
) |
Definition at line 157 of file parser.cxx.
References SbiSymPool::AddProc(), SbiSymPool::AddSym(), aRtlSyms, DontCare, eType, SbxObject::Find(), SbiScanner::GetBasic(), StarBASIC::GetRtl(), SbxVariable::GetType(), SbiSymDef::SetType(), and SbiProcDef::SetType().
Referenced by DefVar(), and SbiExpression::Term().
void SbiParser::Close | ( | ) |
Definition at line 288 of file io.cxx.
References aGen, CHANNEL_, CLOSE_, COMMA, SbiTokenizer::eCurTok, SbiExpression::Gen(), SbiCodeGen::Gen(), SbiTokenizer::IsEoln(), SbiTokenizer::Next(), SbiTokenizer::Peek(), and SEMICOLON.
|
private |
Definition at line 211 of file parser.cxx.
References aGen, SbiCodeGen::BackChain(), SbiCodeGen::DecForLevel(), FOR, p, pStack, and pWithVar.
void SbiParser::Declare | ( | ) |
Definition at line 1038 of file dim.cxx.
References DefDeclare().
|
private |
Definition at line 1043 of file dim.cxx.
References SbiStringPool::Add(), SbiSymPool::Add(), aGblStrings, aGen, aPublics, ARGC_, ARGTYP_, ARGV_, bNewGblDefs, CALL_, CALLC_, SbiSymDef::Define(), SbiTokenizer::eCurTok, ERRCODE_BASIC_BAD_DECLARATION, ERRCODE_BASIC_EXPECTED, ERRCODE_BASIC_UNEXPECTED, SbiTokenizer::Error(), eType, SbiSymPool::Find(), FUNCTION, SbiCodeGen::Gen(), SbiSymPool::Get(), SbiProcDef::GetAlias(), SbiSymDef::GetId(), SbiProcDef::GetLib(), SbiSymDef::GetName(), SbiProcDef::GetParams(), SbiSymDef::GetProcDef(), SbiSymPool::GetSize(), SbiSymDef::GetType(), i, SbiSymDef::IsByVal(), SbiProcDef::IsCdecl(), JUMP_, LEAVE_, LIB, LIB_, SbiProcDef::Match(), SbiTokenizer::Next(), nGblChain, nId, SbiScanner::nLine, p, PARAM_, ProcDecl(), PTRSAFE, PUT_, SbiSymDef::SetByVal(), SbiProcDef::SetLine1(), SbiProcDef::SetLine2(), SbiProcDef::SetPublic(), SbiCodeGen::Statement(), and SUB.
|
private |
Definition at line 721 of file dim.cxx.
References SbiStringPool::Add(), SbiSymPool::Add(), aGblStrings, aGen, aGlobals, SbiScanner::aSym, SbiCodeGen::BackChain(), bGblDefs, bNewGblDefs, Const, SbxArray::Count(), DontCare, ENDENUM, EOLN, EQ, ERRCODE_BASIC_SYNTAX, ERRCODE_BASIC_VAR_DEFINED, SbiTokenizer::Error(), SbiSymPool::Find(), SbiExpression::Gen(), SbiCodeGen::Gen(), SbiSymDef::GetConstDef(), SbiSymDef::GetId(), SbiSymDef::GetName(), SbiCodeGen::GetParser(), SbxObject::GetProperties(), SbiConstExpression::GetString(), SbiConstExpression::GetType(), SbiSymDef::GetType(), SbiConstExpression::GetValue(), GLOBAL_, SbxArray::Insert(), SbiTokenizer::IsEof(), SbiExpression::IsValid(), SbiTokenizer::Next(), nGblChain, NUMBER_, Object, SbiTokenizer::Peek(), pPool, Private, PUTC_, SbxValue::PutLong(), REM, SbxObject::Remove(), rEnumArray, SbxBase::ResetFlag(), SbxLONG, SbxSTRING, SbiConstDef::Set(), SbxBase::SetFlag(), TestSymbol(), VarDecl(), and Write.
|
private |
Definition at line 1200 of file dim.cxx.
References SbiSymPool::Add(), aGen, aPublics, SbiScanner::bVBASupportOn, SbiSymPool::CheckRefs(), CloseBlock(), SbiSymDef::Define(), SbiTokenizer::eCurTok, ENDFUNC, ENDPROPERTY, ENDSUB, ERRCODE_BASIC_BAD_DECLARATION, ERRCODE_BASIC_EXPECTED, ERRCODE_BASIC_NOT_IMPLEMENTED, ERRCODE_BASIC_PROC_DEFINED, SbiTokenizer::Error(), SbiSymPool::Find(), SbiCodeGen::Gen(), GET, Get, SbiSymDef::GetId(), SbiProcDef::GetLabels(), SbiProcDef::GetLocals(), SbiSymDef::GetName(), SbiProcDef::GetParams(), SbiSymDef::GetProcDef(), SbiProcDef::getPropertyMode(), SbiProcDef::IsUsedForProcDecl(), LEAVE_, LET, Let, SbiProcDef::Match(), SbiTokenizer::Next(), SbiScanner::nLine, NONE, OpenBlock(), pPool, pProc, ProcDecl(), PROPERTY, SET, Set, SbiProcDef::SetLine1(), SbiProcDef::SetLine2(), SbiSymPool::SetParent(), SbiSymPool::SetProcId(), SbiProcDef::setPropertyMode(), SbiProcDef::SetPublic(), SbiSymDef::SetStatic(), StmntBlock(), and SUB.
Referenced by DefStatic(), DefVar(), and SubFunc().
|
private |
Definition at line 1315 of file dim.cxx.
References aGen, aPublics, bNewGblDefs, DefProc(), DefVar(), ERRCODE_BASIC_NOT_IN_SUBR, SbiTokenizer::Error(), FUNCTION, SbiCodeGen::Gen(), JUMP_, SbiTokenizer::Next(), nGblChain, p, SbiTokenizer::Peek(), pPool, pProc, PROPERTY, STATIC_, and SUB.
|
private |
Definition at line 603 of file dim.cxx.
References SbxDimArray::AddDim(), aGblStrings, SbiScanner::aSym, SbiScanner::bCompatible, cloneTypeObjectImpl(), SbxArray::Count(), DontCare, ENDTYPE, EOLN, ERRCODE_BASIC_INTERNAL_ERROR, ERRCODE_BASIC_VAR_DEFINED, SbiTokenizer::Error(), StarBASIC::FatalError(), SbxArray::Find(), SbiStringPool::Find(), Fixed, tools::SvRef< typename T >::get(), SbxBase::GetFlags(), SbiExprNode::GetNumber(), SbxObject::GetProperties(), i, SbxArray::Insert(), SbiTokenizer::IsEof(), nBase, SbiTokenizer::Next(), Object, SbiTokenizer::Peek(), SbxValue::PutObject(), REM, SbxObject::Remove(), SbxBase::ResetFlag(), rTypeArray, SbxOBJECT, SbxBase::SetFlags(), SbxDimArray::setHasFixedSize(), TestSymbol(), SbxDimArray::unoAddDim(), and VarDecl().
|
private |
Definition at line 202 of file dim.cxx.
References SbiSymPool::Add(), aGblStrings, aGen, aGlobals, SbiCodeGen::BackChain(), SbiScanner::bCompatible, bGblDefs, bNewGblDefs, SbiScanner::bVBASupportOn, CheckRTLForSym(), CONST_, CREATE_, DCREATE_, DCREATE_REDIMP_, DECLARE, DefDeclare(), DefEnum(), DefProc(), DefStatic(), DefType(), DIM_, SbiTokenizer::eCurTok, SbiScanner::EnableErrors(), ENUM, EQ, ERASE_, ERASE_CLEAR_, ERRCODE_BASIC_NOT_IN_SUBR, ERRCODE_BASIC_SYNTAX, ERRCODE_BASIC_UNDEF_TYPE, ERRCODE_BASIC_UNEXPECTED, ERRCODE_BASIC_VAR_DEFINED, SbiTokenizer::Error(), SbiSymPool::Find(), SbiStringPool::Find(), FIND_, FUNCTION, SbiExpression::Gen(), SbiCodeGen::Gen(), SbiScanner::GetBasic(), SbiSymDef::GetConstDef(), SbiSymDef::GetFixedStringLength(), SbiSymDef::GetId(), SbiSymDef::GetName(), SbiSymDef::GetScope(), SbiConstExpression::GetString(), SbiConstExpression::GetType(), SbiSymDef::GetType(), SbiSymDef::GetTypeId(), SbiConstExpression::GetValue(), GLOBAL, GLOBAL_, GLOBAL_P_, SbiSymDef::IsDefinedAs(), CodeCompleteOptions::IsExtendedTypeDeclaration(), SbiSymDef::IsNew(), SbiSymDef::IsStatic(), IsUnoInterface(), SbiExpression::IsValid(), SbiSymDef::IsWithEvents(), JUMP_, JUMPT_, LOCAL_, SbiTokenizer::Next(), nGblChain, Object, SbiTokenizer::Peek(), pPool, pProc, PRESERVE, PRIVATE, PROPERTY, PUBLIC, PUBLIC_, PUBLIC_P_, PUTC_, REDIM_, REDIMP_, REDIMP_ERASE_, rTypeArray, SbGLOBAL, SbLOCAL, SbPARAM, SbPUBLIC, SBX_FIXED_LEN_STRING_FLAG, SBX_TYPE_DIM_AS_NEW_FLAG, SBX_TYPE_VAR_TO_DIM_FLAG, SBX_TYPE_WITH_EVENTS_FLAG, SbxOBJECT, SbxSTRING, SbxVARIANT, SbiConstDef::Set(), SET_, SbiSymDef::SetDims(), SbiSymDef::SetGlobal(), SHARED, SbiCodeGen::Statement(), STATIC, STATIC_, SUB, TCREATE_, TestComma(), TestToken(), TYPE, VarDecl(), and VBASET_.
Referenced by DefStatic(), Dim(), and ReDim().
void SbiParser::DefXXX | ( | ) |
Definition at line 672 of file parser.cxx.
References SbiScanner::aSym, SbiScanner::bAbort, DEFINT, SbiTokenizer::eCurTok, eDefTypes, ERRCODE_BASIC_SYMBOL_EXPECTED, ERRCODE_BASIC_SYNTAX, SbiTokenizer::Error(), MINUS, SbiTokenizer::Next(), SbiTokenizer::Peek(), SbxINTEGER, SYMBOL, t, and TestComma().
void SbiParser::Dim | ( | ) |
Definition at line 197 of file dim.cxx.
References SbiScanner::bVBASupportOn, DefVar(), DIM_, SbiSymDef::IsStatic(), and pProc.
void SbiParser::DoLoop | ( | ) |
Definition at line 154 of file loops.cxx.
References aGen, SbiCodeGen::BackChain(), CloseBlock(), DO, EOLN, ERRCODE_BASIC_EXPECTED, SbiTokenizer::Error(), SbiExpression::Gen(), SbiCodeGen::Gen(), SbiCodeGen::GetPC(), SbiTokenizer::IsEoln(), JUMP_, JUMPF_, JUMPT_, LOOP, SbiTokenizer::Next(), OpenBlock(), REM, StmntBlock(), TestEoln(), UNTIL, and WHILE.
|
private |
Definition at line 754 of file parser.cxx.
References AddConstants(), and SbiScanner::bCompatible.
Referenced by Option(), and SbiParser().
void SbiParser::Erase | ( | ) |
Definition at line 585 of file dim.cxx.
References aGen, SbiScanner::bAbort, ERASE_, SbiExpression::Gen(), SbiCodeGen::Gen(), SbLVALUE, and TestComma().
void SbiParser::ErrorStmnt | ( | ) |
Definition at line 891 of file parser.cxx.
References aGen, ERROR_, SbiExpression::Gen(), and SbiCodeGen::Gen().
void SbiParser::Exit | ( | ) |
Definition at line 230 of file parser.cxx.
References aGen, SbiParseStack::eExitTok, ERRCODE_BASIC_BAD_EXIT, ERRCODE_BASIC_EXPECTED, SbiTokenizer::Error(), SbiCodeGen::Gen(), GET, JUMP_, LET, SbiTokenizer::Next(), p, PROPERTY, and pStack.
void SbiParser::For | ( | ) |
Definition at line 207 of file loops.cxx.
References aGen, SbiCodeGen::BackChain(), CloseBlock(), EACH, EQ, ERRCODE_BASIC_EXPECTED, SbiTokenizer::Error(), FOR, SbiExpression::Gen(), SbiCodeGen::Gen(), SbiSymDef::GetName(), SbiCodeGen::GetPC(), SbiExpression::GetRealVar(), IN_, INITFOR_, INITFOREACH_, JUMP_, NEXT, SbiTokenizer::Next(), NEXT_, OpenBlock(), SbiTokenizer::Peek(), SbOPERAND, SbxINTEGER, STEP, StmntBlock(), SYMBOL, TestEoln(), TESTFOR_, TestToken(), and TO.
SbiExprNode * SbiParser::GetWithVar | ( | ) |
Definition at line 472 of file parser.cxx.
References p, pStack, and pWithVar.
Referenced by SbiExpression::Term().
void SbiParser::Goto | ( | ) |
Definition at line 334 of file loops.cxx.
References aGen, SbiScanner::aSym, SbiTokenizer::eCurTok, ERRCODE_BASIC_LABEL_EXPECTED, SbiTokenizer::Error(), SbiCodeGen::Gen(), SbiProcDef::GetLabels(), GOSUB_, GOTO, JUMP_, SbiTokenizer::MayBeLabel(), SbiTokenizer::Next(), pProc, and SbiSymPool::Reference().
bool SbiParser::HasGlobalCode | ( | ) |
Definition at line 185 of file parser.cxx.
References aGen, SbiCodeGen::BackChain(), bGblDefs, SbiCodeGen::Gen(), LEAVE_, and nGblChain.
Referenced by SbiCodeGen::Save().
void SbiParser::If | ( | ) |
Definition at line 28 of file loops.cxx.
References aGen, SbiScanner::bAbort, SbiCodeGen::BackChain(), bSingleLineIf, SbiTokenizer::eCurTok, ELSE, ELSEIF, ENDIF, EOLN, ERRCODE_BASIC_BAD_BLOCK, ERRCODE_BASIC_PROG_TOO_LARGE, SbiTokenizer::Error(), SbiExpression::Gen(), SbiCodeGen::Gen(), IF, SbiTokenizer::IsEof(), SbiTokenizer::IsEoln(), JMP_TABLE_SIZE, JUMP_, JUMPF_, SbiScanner::nCol1, SbiScanner::nCol2, SbiTokenizer::Next(), NIL, SbiScanner::nLine, SbiTokenizer::nPCol1, SbiTokenizer::nPCol2, SbiTokenizer::nPLine, Parse(), SbiTokenizer::Peek(), SbiTokenizer::Push(), REM, SbiCodeGen::Statement(), StmntBlock(), TestToken(), and THEN.
void SbiParser::Implements | ( | ) |
Definition at line 713 of file parser.cxx.
References aIfaceVector, SbiScanner::aSym, bClassModule, DOT, SbiTokenizer::eCurTok, ERRCODE_BASIC_SYMBOL_EXPECTED, ERRCODE_BASIC_UNEXPECTED, SbiTokenizer::Error(), IMPLEMENTS, SbiTokenizer::IsKwd(), SbiTokenizer::Next(), SbiTokenizer::Peek(), and SYMBOL.
void SbiParser::Input | ( | ) |
Definition at line 146 of file io.cxx.
References aGen, SbiScanner::bAbort, CHAN0_, Channel(), COMMA, ERRCODE_BASIC_VAR_EXPECTED, SbiTokenizer::Error(), SbiCodeGen::Gen(), INPUT_, SbiTokenizer::Next(), SbiTokenizer::Peek(), RESTART_, SbiExpression, and SbOPERAND.
|
inline |
Definition at line 82 of file parser.hxx.
References bCodeCompleting.
Referenced by SbiCodeGen::Gen(), SbiCodeGen::GenStmnt(), SbiCodeGen::Save(), and SbiCodeGen::Statement().
|
staticprivate |
Definition at line 1349 of file dim.cxx.
References Exception, and comphelper::getProcessComponentContext().
Referenced by DefVar().
void SbiParser::Line | ( | ) |
Definition at line 107 of file io.cxx.
References aGen, SbiScanner::GetType(), INPUT, LineInput(), KeywordSymbolInfo::m_aKeywordSymbol, KeywordSymbolInfo::m_eSbxDataType, SbiTokenizer::Next(), SbiTokenizer::Peek(), SbiCodeGen::Statement(), and Symbol().
void SbiParser::LineInput | ( | ) |
Definition at line 130 of file io.cxx.
References aGen, CHAN0_, Channel(), ERRCODE_BASIC_CONVERSION, ERRCODE_BASIC_VAR_EXPECTED, SbiTokenizer::Error(), SbiCodeGen::Gen(), LINPUT_, SbOPERAND, SbxSTRING, and SbxVARIANT.
Referenced by Line().
void SbiParser::LSet | ( | ) |
Definition at line 633 of file parser.cxx.
References aGen, EQ, ERRCODE_BASIC_DUPLICATE_DEF, ERRCODE_BASIC_INVALID_OBJECT, SbiTokenizer::Error(), SbiExpression::Gen(), SbiCodeGen::Gen(), SbiSymDef::GetConstDef(), SbiSymDef::GetName(), SbiExpression::GetRealVar(), SbiExpression::GetType(), LSET_, SbLVALUE, SbxSTRING, and TestToken().
void SbiParser::Name | ( | ) |
Definition at line 264 of file io.cxx.
References aGen, AS, EQ, SbiExpression::Gen(), SbiCodeGen::Gen(), SbiScanner::GetType(), KeywordSymbolInfo::m_aKeywordSymbol, KeywordSymbolInfo::m_eSbxDataType, SbiTokenizer::Peek(), RENAME_, SbiCodeGen::Statement(), Symbol(), and TestToken().
void SbiParser::NoIf | ( | ) |
Definition at line 145 of file loops.cxx.
References ENDIF, ERRCODE_BASIC_NO_IF, SbiTokenizer::Error(), and StmntBlock().
void SbiParser::On | ( | ) |
Definition at line 471 of file loops.cxx.
References aGen, SbiScanner::aSym, SbiTokenizer::eCurTok, ERRCODE_BASIC_EXPECTED, ERRCODE_BASIC_LABEL_EXPECTED, ERRHDL_, SbiTokenizer::Error(), ERROR_, SbiCodeGen::Gen(), SbiProcDef::GetLabels(), GOTO, LOCAL, SbiTokenizer::MayBeLabel(), MINUS, NEXT, SbiTokenizer::Next(), NOERROR_, NUMBER, SbiScanner::nVal, OnGoto(), SbiTokenizer::Peek(), pProc, SbiSymPool::Reference(), RESUME, STDERROR_, SbiTokenizer::Symbol(), and TestToken().
void SbiParser::OnGoto | ( | ) |
Definition at line 302 of file loops.cxx.
References aGen, SbiScanner::aSym, SbiScanner::bAbort, ERRCODE_BASIC_EXPECTED, ERRCODE_BASIC_LABEL_EXPECTED, SbiTokenizer::Error(), SbiExpression::Gen(), SbiCodeGen::Gen(), SbiProcDef::GetLabels(), GOSUB, GOTO, JUMP_, SbiTokenizer::MayBeLabel(), SbiTokenizer::Next(), ONJUMP_, SbiCodeGen::Patch(), pProc, SbiSymPool::Reference(), and TestComma().
Referenced by On().
void SbiParser::Open | ( | ) |
Definition at line 170 of file io.cxx.
References ACCESS, aGen, Append, APPEND, AS, SbiScanner::aSym, Binary, BINARY, SbiScanner::bInStatement, EQ, ERRCODE_BASIC_SYNTAX, SbiTokenizer::Error(), FOR, SbiExpression::Gen(), SbiCodeGen::Gen(), Input, INPUT, LOCK, SbiTokenizer::Next(), NONE, OPEN_, Output, OUTPUT, SbiTokenizer::Peek(), Random, RANDOM, READ, SbiExpression, SbxINTEGER, SHARED, SYMBOL, TestToken(), and WRITE.
|
private |
void SbiParser::Option | ( | ) |
Definition at line 763 of file parser.cxx.
References aGen, BASE, BASIC_EXPLICIT, bClassModule, bExplicit, BINARY, SbiScanner::bVBASupportOn, CLASSMODULE, COMPARE, COMPATIBLE, SbiTokenizer::eCurTok, EnableCompatibility(), equalsIgnoreAsciiCase(), ERRCODE_BASIC_BAD_OPTION, ERRCODE_BASIC_EXPECTED, SbiTokenizer::Error(), SbiCodeGen::GetModule(), SbiScanner::GetSym(), SbModule::IsVBASupport(), nBase, SbiTokenizer::Next(), NUMBER, SbiScanner::nVal, PRIVATE, SbModule::SetModuleType(), SbModule::SetVBASupport(), SYMBOL, SbiTokenizer::Symbol(), and VBASUPPORT.
bool SbiParser::Parse | ( | ) |
Definition at line 322 of file parser.cxx.
References aGen, SbiScanner::aSym, SbiScanner::bAbort, SbiTokenizer::bErrorIsSymbol, bNewGblDefs, bSingleLineIf, SbiScanner::bVBASupportOn, SbiSymPool::Define(), DOT, SbiTokenizer::eCurTok, eEndTok, ELSE, SbiScanner::EnableErrors(), ENDFUNC, ENDPROPERTY, ENDSUB, SbiTokenizer::ePush, ERRCODE_BASIC_EXPECTED, ERRCODE_BASIC_NOT_IN_MAIN, ERRCODE_BASIC_NOT_IN_SUBR, ERRCODE_BASIC_UNEXPECTED, SbiTokenizer::Error(), ERROR_, FUNCTION, SbiCodeGen::Gen(), SbxBase::GetError(), SbiProcDef::GetLabels(), SbiTokenizer::IsEof(), SbiTokenizer::IsEoln(), SbiTokenizer::IsEos(), SbiScanner::IsVBASupportOn(), JUMP_, SbiTokenizer::MayBeLabel(), SbiTokenizer::Next(), nGblChain, NIL, p, SbiTokenizer::Peek(), pProc, PROPERTY, SbiTokenizer::Push(), REM, SbxBase::ResetError(), SbiCodeGen::Statement(), STATIC, StmntTable, SUB, Symbol(), SYMBOL, and tokens.
Referenced by If(), Select(), and StmntBlock().
void SbiParser::Print | ( | ) |
Definition at line 48 of file io.cxx.
References aGen, SbiScanner::bAbort, BPRINT_, CHAN0_, Channel(), COMMA, SbiTokenizer::eCurTok, SbiCodeGen::Gen(), SbiTokenizer::IsEoln(), SbiTokenizer::Next(), SbiTokenizer::Peek(), PRCHAR_, PRINTF_, and SEMICOLON.
|
private |
Definition at line 849 of file dim.cxx.
References SbiStringPool::Add(), SbiSymPool::Add(), aGblStrings, ALIAS, aName, SbiScanner::aSym, SbiScanner::bCompatible, BYREF, BYVAL, CDECL_, COMMA, SbiTokenizer::eCurTok, EQ, ERRCODE_BASIC_BAD_DECLARATION, ERRCODE_BASIC_EXPECTED, ERRCODE_BASIC_SYNTAX, ERRCODE_BASIC_UNEXPECTED, ERRCODE_BASIC_VAR_DEFINED, SbiTokenizer::Error(), SbiScanner::eScanType, eType, SbiSymPool::Find(), FIXSTRING, FUNCTION, GET, SbiProcDef::GetAlias(), SbiProcDef::GetLib(), SbiSymDef::GetName(), SbiProcDef::GetParams(), SbiSymDef::GetType(), SbiProcDef::IsCdecl(), LET, LIB, LPAREN, SbiTokenizer::Next(), OPTIONAL_, PARAMARRAY, SbiTokenizer::Peek(), RPAREN, SbxEMPTY, SbxSTRING, SbxVARIANT, SET, SbiSymDef::SetByVal(), SbiProcDef::SetCdecl(), SbiSymDef::SetDefaultId(), SbiSymDef::SetOptional(), SbiSymDef::SetParamArray(), SbiProcDef::SetType(), TestSymbol(), TypeDecl(), and VarDecl().
Referenced by DefDeclare(), and DefProc().
void SbiParser::ReDim | ( | ) |
Definition at line 578 of file dim.cxx.
References SbiScanner::bVBASupportOn, DefVar(), SbiSymDef::IsStatic(), pProc, and REDIM_.
void SbiParser::Resume | ( | ) |
Definition at line 537 of file loops.cxx.
References aGen, SbiScanner::aSym, EOLN, EOS, ERRCODE_BASIC_LABEL_EXPECTED, SbiTokenizer::Error(), SbiCodeGen::Gen(), SbiProcDef::GetLabels(), SbiTokenizer::MayBeLabel(), NEXT, SbiTokenizer::Next(), NUMBER, SbiScanner::nVal, pProc, SbiSymPool::Reference(), RESUME_, and SYMBOL.
void SbiParser::Return | ( | ) |
Definition at line 348 of file loops.cxx.
References aGen, SbiScanner::aSym, SbiCodeGen::Gen(), SbiProcDef::GetLabels(), SbiTokenizer::MayBeLabel(), SbiTokenizer::Next(), pProc, SbiSymPool::Reference(), and RETURN_.
void SbiParser::RSet | ( | ) |
Definition at line 653 of file parser.cxx.
References aGen, EQ, ERRCODE_BASIC_DUPLICATE_DEF, ERRCODE_BASIC_INVALID_OBJECT, SbiTokenizer::Error(), SbiExpression::Gen(), SbiCodeGen::Gen(), SbiSymDef::GetConstDef(), SbiSymDef::GetName(), SbiExpression::GetRealVar(), SbiExpression::GetType(), RSET_, SbLVALUE, SbxSTRING, and TestToken().
void SbiParser::Select | ( | ) |
Definition at line 361 of file loops.cxx.
References aGen, SbiScanner::bAbort, SbiCodeGen::BackChain(), CASE, CASE_, CASEIS_, CASETO_, COMMA, ELSE, ENDCASE_, ENDSELECT, EQ, ERRCODE_BASIC_EXPECTED, ERRCODE_BASIC_SYNTAX, SbiTokenizer::Error(), GE, SbiExpression::Gen(), SbiCodeGen::Gen(), IS, SbiTokenizer::IsEoln(), JUMP_, SbiTokenizer::Next(), NIL, Parse(), SbiTokenizer::Peek(), SbxEQ, SbiCodeGen::Statement(), TestEoln(), TestToken(), and TO.
void SbiParser::Set | ( | ) |
Definition at line 583 of file parser.cxx.
References aGen, SbiScanner::bVBASupportOn, CREATE_, EQ, ERRCODE_BASIC_DUPLICATE_DEF, ERRCODE_BASIC_INVALID_OBJECT, SbiTokenizer::Error(), eType, SbiExpression::Gen(), SbiCodeGen::Gen(), SbiSymDef::GetConstDef(), SbiSymDef::GetId(), SbiSymDef::GetName(), SbiExpression::GetRealVar(), SbiExpression::GetType(), SbiSymDef::GetTypeId(), NEW, SbiTokenizer::Next(), SbiTokenizer::Peek(), SbLVALUE, SbxEMPTY, SbxOBJECT, SbxVARIANT, SET_, SETCLASS_, TestToken(), TypeDecl(), VBASET_, and VBASETCLASS_.
void SbiParser::SetCodeCompleting | ( | bool | b | ) |
Definition at line 316 of file parser.cxx.
References bCodeCompleting.
void SbiParser::Static | ( | ) |
Definition at line 1310 of file dim.cxx.
References DefStatic().
|
private |
Definition at line 303 of file parser.cxx.
References SbiScanner::bAbort, eEndTok, ERRCODE_BASIC_BAD_BLOCK, SbiTokenizer::Error(), SbiTokenizer::IsEof(), and Parse().
Referenced by DefProc(), DoLoop(), For(), If(), NoIf(), While(), and With().
void SbiParser::Stop | ( | ) |
Definition at line 705 of file parser.cxx.
References aGen, SbiCodeGen::Gen(), SbiTokenizer::Peek(), and STOP_.
void SbiParser::Symbol | ( | const KeywordSymbolInfo * | pKeywordSymbolInfo | ) |
Definition at line 491 of file parser.cxx.
References SbiExprList::addExpression(), aGen, SbiScanner::bVBASupportOn, eMode, EQ, ERRCODE_BASIC_DUPLICATE_DEF, ERRCODE_BASIC_EXPECTED, ERRCODE_BASIC_LVALUE_EXPECTED, SbiTokenizer::Error(), EXPRMODE_STANDALONE, EXPRMODE_STANDARD, FORCE_CALL, SbiExpression::Gen(), SbiCodeGen::Gen(), GET_, SbiSymDef::GetConstDef(), SbiExpression::GetExprNode(), SbiSymDef::GetName(), SbiExprNode::GetNodeType(), SbiExprNode::GetParameters(), SbiExpression::GetRealVar(), SbiSymDef::GetScope(), SbiExprList::GetSize(), SbiSymDef::GetType(), SbiSymDef::GetTypeId(), SbiExpression::IsBracket(), SbiExpression::IsLvalue(), SbiTokenizer::Peek(), PREVENT_CALL, PUT_, SbRTL, SbSYMBOL, SbxLONG, SbxOBJECT, SbxVARVAL, SET_, SETCLASS_, and TestToken().
bool SbiParser::TestComma | ( | ) |
Definition at line 275 of file parser.cxx.
References COMMA, ERRCODE_BASIC_EXPECTED, SbiTokenizer::Error(), SbiTokenizer::IsEoln(), SbiTokenizer::Next(), and SbiTokenizer::Peek().
void SbiParser::TestEoln | ( | ) |
Definition at line 293 of file parser.cxx.
References EOLN, ERRCODE_BASIC_EXPECTED, SbiTokenizer::Error(), SbiTokenizer::IsEoln(), and SbiTokenizer::Next().
bool SbiParser::TestSymbol | ( | ) |
Definition at line 249 of file parser.cxx.
References SbiTokenizer::eCurTok, ERRCODE_BASIC_SYMBOL_EXPECTED, SbiTokenizer::Error(), SbiTokenizer::Next(), SbiTokenizer::Peek(), and SYMBOL.
Referenced by DefEnum(), DefType(), ProcDecl(), and VarDecl().
bool SbiParser::TestToken | ( | SbiToken | t | ) |
Definition at line 261 of file parser.cxx.
References ERRCODE_BASIC_EXPECTED, SbiTokenizer::Error(), SbiTokenizer::Next(), SbiTokenizer::Peek(), and t.
Referenced by Assign(), DefVar(), For(), If(), LSet(), Name(), On(), Open(), RSet(), Select(), Set(), Symbol(), and SbiExpression::Unary().
|
private |
Definition at line 79 of file dim.cxx.
References SbiStringPool::Add(), aGblStrings, ANY, aRequiredTypes, AS, SbiScanner::aSym, SbiScanner::bVBASupportOn, DOT, ERRCODE_BASIC_OUT_OF_RANGE, ERRCODE_BASIC_SYNTAX, ERRCODE_BASIC_UNEXPECTED, ERRCODE_BASIC_VAR_DEFINED, SbiTokenizer::Error(), ERROR_, SbiScanner::eScanType, eType, FIXSTRING, SbiSymDef::GetLen(), SbiSymDef::GetName(), SbiConstExpression::GetShortValue(), SbiSymDef::GetType(), VBAConstantHelper::instance(), SbiTokenizer::IsKwd(), SbiSymDef::IsNew(), SbiScanner::IsVBASupportOn(), MUL, NEW, SbiTokenizer::Next(), Object, SbiTokenizer::Peek(), pProc, rEnumArray, SbxBYTE, SbxINTEGER, SbxLONG, SbxOBJECT, SbxSTRING, SbxVARIANT, SbiSymDef::SetDefinedAs(), SbiSymDef::SetFixedStringLength(), SbiSymDef::SetLen(), SbiSymDef::SetNew(), SbiSymDef::SetType(), SbiSymDef::SetTypeId(), SYMBOL, TBOOLEAN, TBYTE, TCURRENCY, TDATE, TDOUBLE, TINTEGER, TLONG, TOBJECT, TSINGLE, TSTRING, and TVARIANT.
Referenced by ProcDecl(), Set(), SbiExpression::Unary(), and VarDecl().
|
private |
Definition at line 41 of file dim.cxx.
References SbiScanner::aSym, ERRCODE_BASIC_EXPECTED, SbiTokenizer::Error(), SbiScanner::eScanType, LPAREN, SbiTokenizer::Next(), SbiExprList::ParseDimList(), SbiTokenizer::Peek(), SbiSymDef::SetStatic(), SbiSymDef::SetType(), SbiSymDef::SetWithBrackets(), SbiSymDef::SetWithEvents(), t, TestSymbol(), TypeDecl(), and WITHEVENTS.
Referenced by DefEnum(), DefType(), DefVar(), and ProcDecl().
void SbiParser::While | ( | ) |
Definition at line 194 of file loops.cxx.
References aGen, SbiCodeGen::BackChain(), SbiExpression::Gen(), SbiCodeGen::Gen(), SbiCodeGen::GetPC(), JUMP_, JUMPF_, StmntBlock(), and WEND.
void SbiParser::With | ( | ) |
Definition at line 268 of file loops.cxx.
References CloseBlock(), ENDWITH, ERRCODE_BASIC_NEEDS_OBJECT, SbiTokenizer::Error(), SbiExpression::GetExprNode(), SbiExprNode::GetRealNode(), SbiSymDef::GetType(), SbiExprNode::GetVar(), NIL, OpenBlock(), SbOPERAND, SbxEMPTY, SbxOBJECT, SbxVARIANT, SbiExprNode::SetType(), SbiSymDef::SetType(), and StmntBlock().
void SbiParser::Write | ( | ) |
Definition at line 79 of file io.cxx.
References aGen, SbiScanner::bAbort, BWRITE_, CHAN0_, Channel(), COMMA, SbiCodeGen::Gen(), SbiTokenizer::IsEoln(), SbiTokenizer::Next(), SbiTokenizer::Peek(), and PRCHAR_.
|
friend |
Definition at line 33 of file parser.hxx.
SbiStringPool SbiParser::aGblStrings |
Definition at line 63 of file parser.hxx.
Referenced by SbiSymPool::Add(), DefDeclare(), DefEnum(), DefType(), DefVar(), SbiExprList::Gen(), SbiExprNode::Gen(), SbiSymDef::GetPool(), ProcDecl(), SbiCodeGen::Save(), SbiProcDef::SbiProcDef(), and TypeDecl().
SbiCodeGen SbiParser::aGen |
Definition at line 68 of file parser.hxx.
Referenced by Assign(), Call(), Channel(), Close(), CloseBlock(), DefDeclare(), DefEnum(), SbiSymDef::Define(), DefProc(), DefStatic(), DefVar(), DoLoop(), Erase(), ErrorStmnt(), Exit(), For(), SbiExpression::Gen(), Goto(), HasGlobalCode(), If(), Input(), Line(), LineInput(), LSet(), Name(), On(), OnGoto(), Open(), OpenBlock(), Option(), Parse(), Print(), SbiSymDef::Reference(), SbiSymPool::Reference(), Resume(), Return(), RSet(), SbiParser(), Select(), Set(), Stop(), Symbol(), SbiExpression::Term(), While(), and Write().
SbiSymPool SbiParser::aGlobals |
Definition at line 65 of file parser.hxx.
Referenced by DefEnum(), DefVar(), and SbiParser().
std::vector<OUString> SbiParser::aIfaceVector |
Definition at line 73 of file parser.hxx.
Referenced by Implements(), and SbiCodeGen::Save().
SbiStringPool SbiParser::aLclStrings |
Definition at line 64 of file parser.hxx.
SbiSymPool SbiParser::aPublics |
Definition at line 66 of file parser.hxx.
Referenced by AddConstants(), AddSym(), DefDeclare(), DefProc(), DefStatic(), SbiCodeGen::Save(), SbiParser(), and SbiProcDef::SbiProcDef().
std::vector<OUString> SbiParser::aRequiredTypes |
Definition at line 74 of file parser.hxx.
Referenced by SbiCodeGen::Save(), and TypeDecl().
SbiSymPool SbiParser::aRtlSyms |
Definition at line 67 of file parser.hxx.
Referenced by CheckRTLForSym(), and SbiParser().
bool SbiParser::bClassModule |
Definition at line 72 of file parser.hxx.
Referenced by SbiExprNode::Gen(), Implements(), Option(), and SbiParser().
|
private |
Definition at line 43 of file parser.hxx.
Referenced by IsCodeCompleting(), and SetCodeCompleting().
bool SbiParser::bExplicit |
Definition at line 71 of file parser.hxx.
Referenced by Option(), and SbiCodeGen::Save().
|
private |
Definition at line 40 of file parser.hxx.
Referenced by DefEnum(), DefVar(), and HasGlobalCode().
|
private |
Definition at line 41 of file parser.hxx.
Referenced by DefDeclare(), DefEnum(), DefStatic(), DefVar(), and Parse().
|
private |
Definition at line 42 of file parser.hxx.
SbxDataType SbiParser::eDefTypes[N_DEF_TYPES] |
Definition at line 76 of file parser.hxx.
Referenced by DefXXX(), SbiParser(), and SbiSymDef::SetType().
|
private |
Definition at line 38 of file parser.hxx.
Referenced by BadBlock(), Parse(), and StmntBlock().
short SbiParser::nBase |
Definition at line 70 of file parser.hxx.
Referenced by DefType(), SbiExpression::Gen(), Option(), and SbiCodeGen::Save().
|
private |
Definition at line 39 of file parser.hxx.
Referenced by DefDeclare(), DefEnum(), DefStatic(), DefVar(), HasGlobalCode(), Parse(), and SbiParser().
SbiSymPool* SbiParser::pPool |
Definition at line 69 of file parser.hxx.
Referenced by DefEnum(), DefProc(), DefStatic(), DefVar(), SbiParser(), and SbiExpression::Term().
|
private |
Definition at line 36 of file parser.hxx.
Referenced by DefProc(), DefStatic(), DefVar(), Dim(), Goto(), On(), OnGoto(), Parse(), ReDim(), Resume(), Return(), SbiExpression::Term(), and TypeDecl().
|
private |
Definition at line 35 of file parser.hxx.
Referenced by CloseBlock(), Exit(), GetWithVar(), and OpenBlock().
|
private |
Definition at line 37 of file parser.hxx.
Referenced by CloseBlock(), GetWithVar(), and OpenBlock().
SbxArrayRef SbiParser::rEnumArray |
Definition at line 62 of file parser.hxx.
Referenced by DefEnum(), SbiCodeGen::Save(), SbiParser(), and TypeDecl().
SbxArrayRef SbiParser::rTypeArray |
Definition at line 61 of file parser.hxx.
Referenced by DefType(), DefVar(), SbiCodeGen::Save(), and SbiParser().