LibreOffice Module basic (master) 1
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
SbiScanner Class Reference

#include <scanner.hxx>

Inheritance diagram for SbiScanner:
[legend]
Collaboration diagram for SbiScanner:
[legend]

Public Member Functions

 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)
 
StarBASICGetBasic ()
 
void SaveLine ()
 
void RestoreLine ()
 
void LockColumn ()
 
void UnlockColumn ()
 
bool DoesColonFollow ()
 
bool NextSym ()
 
const OUString & GetSym () const
 
SbxDataType GetType () const
 
double GetDbl () const
 

Protected Member Functions

void GenError (ErrCode)
 

Protected Attributes

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
 

Private Member Functions

void scanAlphanumeric ()
 
void scanGoto ()
 
bool readLine ()
 

Private Attributes

OUString aBuf
 
OUString aLine
 
OUString aSaveLine
 
sal_Int32 nLineIdx
 
sal_Int32 nSaveLineIdx
 
StarBASICpBasic
 

Detailed Description

Definition at line 32 of file scanner.hxx.

Constructor & Destructor Documentation

◆ SbiScanner()

SbiScanner::SbiScanner ( OUString  _aBuf,
StarBASIC p = nullptr 
)

Definition at line 33 of file scanner.cxx.

References aBuf, and p.

Member Function Documentation

◆ DoesColonFollow()

bool SbiScanner::DoesColonFollow ( )

Definition at line 110 of file scanner.cxx.

References aLine, nCol, and nLineIdx.

Referenced by SbiTokenizer::MayBeLabel().

◆ EnableErrors()

void SbiScanner::EnableErrors ( )
inline

Definition at line 73 of file scanner.hxx.

References bError.

Referenced by SbiParser::DefVar(), and SbiParser::Parse().

◆ GenError()

void SbiScanner::GenError ( ErrCode  code)
protected

◆ GetBasic()

StarBASIC * SbiScanner::GetBasic ( )
inline

Definition at line 83 of file scanner.hxx.

References pBasic.

Referenced by SbiParser::CheckRTLForSym(), and SbiParser::DefVar().

◆ GetCol1()

sal_Int32 SbiScanner::GetCol1 ( ) const
inline

Definition at line 81 of file scanner.hxx.

References nCol1.

Referenced by SbiCodeGen::Statement().

◆ GetDbl()

double SbiScanner::GetDbl ( ) const
inline

Definition at line 93 of file scanner.hxx.

References nVal.

Referenced by SbiExpression::Operand(), and SbModule::SetSource32().

◆ GetErrors()

sal_Int32 SbiScanner::GetErrors ( ) const
inline

Definition at line 79 of file scanner.hxx.

References nErrors.

◆ GetLine()

sal_Int32 SbiScanner::GetLine ( ) const
inline

Definition at line 80 of file scanner.hxx.

References nLine.

Referenced by SbModule::SetSource32(), and SbiCodeGen::Statement().

◆ GetSym()

const OUString & SbiScanner::GetSym ( ) const
inline

◆ GetType()

SbxDataType SbiScanner::GetType ( ) const
inline

◆ IsCompatible()

bool SbiScanner::IsCompatible ( ) const
inline

Definition at line 75 of file scanner.hxx.

References bCompatible.

Referenced by SbiExpression::Gen(), and SbiExpression::Term().

◆ IsHash()

bool SbiScanner::IsHash ( ) const
inline

Definition at line 74 of file scanner.hxx.

References bHash.

Referenced by SbiParser::Channel().

◆ IsVBASupportOn()

bool SbiScanner::IsVBASupportOn ( ) const
inline

◆ LockColumn()

void SbiScanner::LockColumn ( )

Definition at line 63 of file scanner.cxx.

References nCol1, nColLock, and nSavedCol1.

Referenced by SbiExpression::Term().

◆ NextSym()

bool SbiScanner::NextSym ( )

◆ readLine()

bool SbiScanner::readLine ( )
private

Definition at line 176 of file scanner.cxx.

References aBuf, aLine, bLineEndsWithWhitespace, BasicCharClass::isWhitespace(), n, nBufPos, nCol, nCol1, nCol2, nColLock, nLine, and nLineIdx.

Referenced by NextSym().

◆ RestoreLine()

void SbiScanner::RestoreLine ( )
inline

Definition at line 85 of file scanner.hxx.

References aLine, aSaveLine, nLineIdx, and nSaveLineIdx.

Referenced by SbiTokenizer::Next().

◆ SaveLine()

void SbiScanner::SaveLine ( )
inline

Definition at line 84 of file scanner.hxx.

References aLine, aSaveLine, nLineIdx, and nSaveLineIdx.

Referenced by SbiTokenizer::Next().

◆ scanAlphanumeric()

void SbiScanner::scanAlphanumeric ( )
private

Definition at line 147 of file scanner.cxx.

References aLine, aSym, bCompatible, BasicCharClass::isAlphaNumeric(), n, nCol, and nLineIdx.

Referenced by NextSym().

◆ scanGoto()

void SbiScanner::scanGoto ( )
private

Definition at line 158 of file scanner.cxx.

References aLine, aSym, o3tl::equalsIgnoreAsciiCase(), BasicCharClass::isWhitespace(), n, nCol, nLineIdx, and u.

Referenced by NextSym().

◆ SetCol1()

void SbiScanner::SetCol1 ( sal_Int32  n)
inline

Definition at line 82 of file scanner.hxx.

References n, and nCol1.

Referenced by SbiProcDef::Match().

◆ SetCompatible()

void SbiScanner::SetCompatible ( bool  b)
inline

Definition at line 76 of file scanner.hxx.

References bCompatible.

Referenced by SbModule::SetSource32().

◆ UnlockColumn()

void SbiScanner::UnlockColumn ( )

Definition at line 69 of file scanner.cxx.

References nColLock.

Referenced by SbiExpression::Term().

◆ WhiteSpace()

bool SbiScanner::WhiteSpace ( ) const
inline

Definition at line 78 of file scanner.hxx.

References bSpaces.

Referenced by SbiExpression::ObjTerm(), and SbiExpression::Term().

Member Data Documentation

◆ aBuf

OUString SbiScanner::aBuf
private

Definition at line 34 of file scanner.hxx.

Referenced by readLine().

◆ aError

OUString SbiScanner::aError
protected

Definition at line 46 of file scanner.hxx.

Referenced by SbiTokenizer::Error(), GenError(), and NextSym().

◆ aLine

OUString SbiScanner::aLine
private

◆ aSaveLine

OUString SbiScanner::aSaveLine
private

Definition at line 36 of file scanner.hxx.

Referenced by RestoreLine(), and SaveLine().

◆ aSym

OUString SbiScanner::aSym
protected

◆ bAbort

bool SbiScanner::bAbort
protected

◆ bClosingUnderscore

bool SbiScanner::bClosingUnderscore
protected

Definition at line 65 of file scanner.hxx.

Referenced by NextSym().

◆ bCompatible

bool SbiScanner::bCompatible
protected

◆ bError

bool SbiScanner::bError
protected

Definition at line 61 of file scanner.hxx.

Referenced by EnableErrors(), and GenError().

◆ bHash

bool SbiScanner::bHash
protected

Definition at line 60 of file scanner.hxx.

Referenced by IsHash(), and NextSym().

◆ bInStatement

bool SbiScanner::bInStatement
protected

Definition at line 68 of file scanner.hxx.

Referenced by SbiTokenizer::Next(), and SbiParser::Open().

◆ bLineEndsWithWhitespace

bool SbiScanner::bLineEndsWithWhitespace
protected

Definition at line 66 of file scanner.hxx.

Referenced by NextSym(), and readLine().

◆ bNumber

bool SbiScanner::bNumber
protected

Definition at line 57 of file scanner.hxx.

Referenced by SbiTokenizer::Next(), and NextSym().

◆ bPrevLineExtentsComment

bool SbiScanner::bPrevLineExtentsComment
protected

Definition at line 64 of file scanner.hxx.

Referenced by NextSym().

◆ bSpaces

bool SbiScanner::bSpaces
protected

Definition at line 58 of file scanner.hxx.

Referenced by NextSym(), and WhiteSpace().

◆ bSymbol

bool SbiScanner::bSymbol
protected

Definition at line 56 of file scanner.hxx.

Referenced by SbiTokenizer::Next(), and NextSym().

◆ bVBASupportOn

bool SbiScanner::bVBASupportOn
protected

◆ eScanType

SbxDataType SbiScanner::eScanType
protected

◆ nBufPos

sal_Int32 SbiScanner::nBufPos
protected

Definition at line 53 of file scanner.hxx.

Referenced by readLine().

◆ nCol

sal_Int32 SbiScanner::nCol
protected

◆ nCol1

sal_Int32 SbiScanner::nCol1
protected

◆ nCol2

sal_Int32 SbiScanner::nCol2
protected

◆ nColLock

sal_Int32 SbiScanner::nColLock
protected

Definition at line 52 of file scanner.hxx.

Referenced by GenError(), LockColumn(), NextSym(), readLine(), and UnlockColumn().

◆ nErrors

sal_Int32 SbiScanner::nErrors
protected

Definition at line 51 of file scanner.hxx.

Referenced by GenError(), and GetErrors().

◆ nLine

sal_Int32 SbiScanner::nLine
protected

◆ nLineIdx

sal_Int32 SbiScanner::nLineIdx
private

◆ nSavedCol1

sal_Int32 SbiScanner::nSavedCol1
protected

Definition at line 49 of file scanner.hxx.

Referenced by GenError(), and LockColumn().

◆ nSaveLineIdx

sal_Int32 SbiScanner::nSaveLineIdx
private

Definition at line 38 of file scanner.hxx.

Referenced by RestoreLine(), and SaveLine().

◆ nVal

double SbiScanner::nVal
protected

◆ pBasic

StarBASIC* SbiScanner::pBasic
private

Definition at line 39 of file scanner.hxx.

Referenced by GenError(), and GetBasic().


The documentation for this class was generated from the following files: