|
LibreOffice Module basic (master) 1
|
#include <scanner.hxx>
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) |
| StarBASIC * | GetBasic () |
| 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 |
| StarBASIC * | pBasic |
Definition at line 32 of file scanner.hxx.
| SbiScanner::SbiScanner | ( | OUString | _aBuf, |
| StarBASIC * | p = nullptr |
||
| ) |
Definition at line 33 of file scanner.cxx.
| bool SbiScanner::DoesColonFollow | ( | ) |
Definition at line 110 of file scanner.cxx.
References aLine, nCol, and nLineIdx.
Referenced by SbiTokenizer::MayBeLabel().
|
inline |
Definition at line 73 of file scanner.hxx.
References bError.
Referenced by SbiParser::DefVar(), and SbiParser::Parse().
|
protected |
Definition at line 75 of file scanner.cxx.
References aError, bAbort, bError, StarBASIC::CError(), code, ERRCODE_BASIC_EXPECTED, ERRCODE_BASIC_LABEL_EXPECTED, ERRCODE_BASIC_NO_MEMORY, ERRCODE_BASIC_PROG_TOO_LARGE, ERRCODE_BASIC_SYMBOL_EXPECTED, ERRCODE_BASIC_UNEXPECTED, GetSbData(), nCol1, nCol2, nColLock, nErrors, nLine, nSavedCol1, and pBasic.
Referenced by SbiTokenizer::Error(), and NextSym().
|
inline |
Definition at line 83 of file scanner.hxx.
References pBasic.
Referenced by SbiParser::CheckRTLForSym(), and SbiParser::DefVar().
|
inline |
|
inline |
Definition at line 93 of file scanner.hxx.
References nVal.
Referenced by SbiExpression::Operand(), and SbModule::SetSource32().
|
inline |
Definition at line 79 of file scanner.hxx.
References nErrors.
|
inline |
Definition at line 80 of file scanner.hxx.
References nLine.
Referenced by SbModule::SetSource32(), and SbiCodeGen::Statement().
|
inline |
Definition at line 91 of file scanner.hxx.
References aSym.
Referenced by SbiExpression::ObjTerm(), SbiExpression::Operand(), SbiParser::Option(), SbModule::SetSource32(), and SbiExpression::Term().
|
inline |
Definition at line 92 of file scanner.hxx.
References eScanType.
Referenced by SbiParser::Line(), SbiParser::Name(), SbiExpression::ObjTerm(), SbiExpression::Operand(), SbModule::SetSource32(), and SbiExpression::Term().
|
inline |
Definition at line 75 of file scanner.hxx.
References bCompatible.
Referenced by SbiExpression::Gen(), and SbiExpression::Term().
|
inline |
|
inline |
Definition at line 77 of file scanner.hxx.
References bVBASupportOn.
Referenced by SbiExpression::Like(), SbiExpression::Operand(), SbiParser::Parse(), SbiExpression::Term(), SbiParser::TypeDecl(), and SbiExpression::Unary().
| void SbiScanner::LockColumn | ( | ) |
Definition at line 63 of file scanner.cxx.
References nCol1, nColLock, and nSavedCol1.
Referenced by SbiExpression::Term().
| bool SbiScanner::NextSym | ( | ) |
Definition at line 212 of file scanner.cxx.
References aError, aLine, aSym, base, bClosingUnderscore, bCompatible, bHash, bLineEndsWithWhitespace, bNumber, bPrevLineExtentsComment, bSpaces, bSymbol, BUF_SIZE, bVBASupportOn, ch, ERRCODE_BASIC_BAD_CHAR_IN_NUMBER, ERRCODE_BASIC_CONVERSION, ERRCODE_BASIC_EXPECTED, ERRCODE_BASIC_MATH_OVERFLOW, ERRCODE_BASIC_SYMBOL_EXPECTED, ERRCODE_BASIC_SYNTAX, ERRCODE_NONE, eScanType, GenError(), SbiInstance::GetNumberFormatter(), GetSbData(), GetSuffixType(), i, BasicCharClass::isAlpha(), BasicCharClass::isAlphaNumeric(), BasicCharClass::isWhitespace(), LANGUAGE_ENGLISH_US, n, nCol, nCol1, nCol2, nColLock, NextSym(), nIndex, nLine, nLineIdx, nVal, p, SbiGlobals::pInst, SbiInstance::PrepareNumberFormatter(), readLine(), SAL_MAX_UINT32, SbxDOUBLE, SbxINTEGER, SbxLONG, SbxMAXINT, SbxMAXLNG, SbxMAXUINT, SbxMININT, SbxMINLNG, SbxSTRING, SbxVARIANT, scanAlphanumeric(), scanGoto(), and t.
Referenced by SbiTokenizer::Next(), and NextSym().
|
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().
|
inline |
Definition at line 85 of file scanner.hxx.
References aLine, aSaveLine, nLineIdx, and nSaveLineIdx.
Referenced by SbiTokenizer::Next().
|
inline |
Definition at line 84 of file scanner.hxx.
References aLine, aSaveLine, nLineIdx, and nSaveLineIdx.
Referenced by SbiTokenizer::Next().
|
private |
Definition at line 147 of file scanner.cxx.
References aLine, aSym, bCompatible, BasicCharClass::isAlphaNumeric(), n, nCol, and nLineIdx.
Referenced by NextSym().
|
private |
Definition at line 158 of file scanner.cxx.
References aLine, aSym, o3tl::equalsIgnoreAsciiCase(), BasicCharClass::isWhitespace(), n, nCol, nLineIdx, and u.
Referenced by NextSym().
|
inline |
Definition at line 82 of file scanner.hxx.
Referenced by SbiProcDef::Match().
|
inline |
Definition at line 76 of file scanner.hxx.
References bCompatible.
Referenced by SbModule::SetSource32().
| void SbiScanner::UnlockColumn | ( | ) |
Definition at line 69 of file scanner.cxx.
References nColLock.
Referenced by SbiExpression::Term().
|
inline |
Definition at line 78 of file scanner.hxx.
References bSpaces.
Referenced by SbiExpression::ObjTerm(), and SbiExpression::Term().
|
private |
Definition at line 34 of file scanner.hxx.
Referenced by readLine().
|
protected |
Definition at line 46 of file scanner.hxx.
Referenced by SbiTokenizer::Error(), GenError(), and NextSym().
|
private |
Definition at line 35 of file scanner.hxx.
Referenced by DoesColonFollow(), NextSym(), readLine(), RestoreLine(), SaveLine(), scanAlphanumeric(), and scanGoto().
|
private |
Definition at line 36 of file scanner.hxx.
Referenced by RestoreLine(), and SaveLine().
|
protected |
Definition at line 45 of file scanner.hxx.
Referenced by SbiParser::DefEnum(), SbiParser::DefType(), SbiParser::DefXXX(), GetSym(), SbiParser::Goto(), SbiParser::Implements(), SbiTokenizer::Next(), NextSym(), SbiParser::On(), SbiParser::OnGoto(), SbiParser::Open(), SbiParser::Parse(), SbiParser::ProcDecl(), SbiParser::Resume(), SbiParser::Return(), scanAlphanumeric(), scanGoto(), SbiTokenizer::Symbol(), SbiParser::TypeDecl(), and SbiParser::VarDecl().
|
protected |
Definition at line 59 of file scanner.hxx.
Referenced by SbiParser::DefXXX(), SbiParser::Erase(), GenError(), SbiParser::If(), SbiParser::Input(), SbiParser::OnGoto(), SbiParser::Parse(), SbiParser::Print(), SbiParser::Select(), SbiParser::StmntBlock(), and SbiParser::Write().
|
protected |
Definition at line 65 of file scanner.hxx.
Referenced by NextSym().
|
protected |
Definition at line 62 of file scanner.hxx.
Referenced by SbiParser::DefType(), SbiParser::DefVar(), SbiParser::EnableCompatibility(), IsCompatible(), SbiTokenizer::Next(), NextSym(), SbiParser::ProcDecl(), scanAlphanumeric(), and SetCompatible().
|
protected |
Definition at line 61 of file scanner.hxx.
Referenced by EnableErrors(), and GenError().
|
protected |
Definition at line 60 of file scanner.hxx.
|
protected |
Definition at line 68 of file scanner.hxx.
Referenced by SbiTokenizer::Next(), and SbiParser::Open().
|
protected |
Definition at line 66 of file scanner.hxx.
Referenced by NextSym(), and readLine().
|
protected |
Definition at line 57 of file scanner.hxx.
Referenced by SbiTokenizer::Next(), and NextSym().
|
protected |
Definition at line 64 of file scanner.hxx.
Referenced by NextSym().
|
protected |
Definition at line 58 of file scanner.hxx.
Referenced by NextSym(), and WhiteSpace().
|
protected |
Definition at line 56 of file scanner.hxx.
Referenced by SbiTokenizer::Next(), and NextSym().
|
protected |
Definition at line 63 of file scanner.hxx.
Referenced by SbiParser::DefProc(), SbiParser::DefVar(), SbiParser::Dim(), IsVBASupportOn(), NextSym(), SbiParser::Option(), SbiParser::Parse(), SbiParser::ReDim(), SbiParser::SbiParser(), SbiParser::Set(), SbiParser::Symbol(), and SbiParser::TypeDecl().
|
protected |
Definition at line 47 of file scanner.hxx.
Referenced by GetType(), SbiTokenizer::MayBeLabel(), SbiTokenizer::Next(), NextSym(), SbiParser::ProcDecl(), SbiParser::TypeDecl(), and SbiParser::VarDecl().
|
protected |
Definition at line 53 of file scanner.hxx.
Referenced by readLine().
|
protected |
Definition at line 50 of file scanner.hxx.
Referenced by DoesColonFollow(), SbiTokenizer::Next(), NextSym(), readLine(), scanAlphanumeric(), and scanGoto().
|
protected |
Definition at line 55 of file scanner.hxx.
Referenced by GenError(), GetCol1(), SbiParser::If(), LockColumn(), SbiTokenizer::Next(), NextSym(), SbiTokenizer::Peek(), readLine(), and SetCol1().
|
protected |
Definition at line 55 of file scanner.hxx.
Referenced by GenError(), SbiParser::If(), SbiTokenizer::Next(), NextSym(), SbiTokenizer::Peek(), and readLine().
|
protected |
Definition at line 52 of file scanner.hxx.
Referenced by GenError(), LockColumn(), NextSym(), readLine(), and UnlockColumn().
|
protected |
Definition at line 51 of file scanner.hxx.
Referenced by GenError(), and GetErrors().
|
protected |
Definition at line 54 of file scanner.hxx.
Referenced by SbiParser::DefDeclare(), SbiParser::DefProc(), GenError(), GetLine(), SbiParser::If(), SbiTokenizer::Next(), NextSym(), SbiTokenizer::Peek(), and readLine().
|
private |
Definition at line 37 of file scanner.hxx.
Referenced by DoesColonFollow(), NextSym(), readLine(), RestoreLine(), SaveLine(), scanAlphanumeric(), and scanGoto().
|
protected |
Definition at line 49 of file scanner.hxx.
Referenced by GenError(), and LockColumn().
|
private |
Definition at line 38 of file scanner.hxx.
Referenced by RestoreLine(), and SaveLine().
|
protected |
Definition at line 48 of file scanner.hxx.
Referenced by GetDbl(), SbiTokenizer::MayBeLabel(), NextSym(), SbiParser::On(), SbiParser::Option(), and SbiParser::Resume().
|
private |
Definition at line 39 of file scanner.hxx.
Referenced by GenError(), and GetBasic().