summaryrefslogtreecommitdiff
path: root/basic/source/comp
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/comp')
-rw-r--r--basic/source/comp/buffer.cxx26
-rw-r--r--basic/source/comp/codegen.cxx41
-rw-r--r--basic/source/comp/dim.cxx172
-rw-r--r--basic/source/comp/exprgen.cxx32
-rw-r--r--basic/source/comp/exprnode.cxx50
-rw-r--r--basic/source/comp/exprtree.cxx14
-rw-r--r--basic/source/comp/io.cxx2
-rw-r--r--basic/source/comp/loops.cxx2
-rw-r--r--basic/source/comp/parser.cxx17
-rwxr-xr-xbasic/source/comp/sbcomp.cxx6
-rw-r--r--basic/source/comp/scanner.cxx3
-rw-r--r--basic/source/comp/symtbl.cxx2
-rw-r--r--basic/source/comp/token.cxx3
13 files changed, 221 insertions, 149 deletions
diff --git a/basic/source/comp/buffer.cxx b/basic/source/comp/buffer.cxx
index 322d57a32c..cd3d4e277d 100644
--- a/basic/source/comp/buffer.cxx
+++ b/basic/source/comp/buffer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,9 +35,9 @@
const static UINT32 UP_LIMIT=0xFFFFFF00L;
-// Der SbiBuffer wird in Inkrements von mindestens 16 Bytes erweitert.
-// Dies ist notwendig, da viele Klassen von einer Pufferlaenge
-// von x*16 Bytes ausgehen.
+// The SbiBuffer will be expanded in increments of at least 16 Bytes.
+// This is necessary, because many classes emanate from a buffer length
+// of x*16 Bytes.
SbiBuffer::SbiBuffer( SbiParser* p, short n )
{
@@ -55,8 +56,8 @@ SbiBuffer::~SbiBuffer()
delete[] pBuf;
}
-// Rausreichen des Puffers
-// Dies fuehrt zur Loeschung des Puffers!
+// Reach out the buffer
+// This lead to the deletion of the buffer!
char* SbiBuffer::GetBuffer()
{
@@ -66,8 +67,8 @@ char* SbiBuffer::GetBuffer()
return p;
}
-// Test, ob der Puffer n Bytes aufnehmen kann.
-// Im Zweifelsfall wird er vergroessert
+// Test, if the buffer can contain n Bytes.
+// In case of doubt it will be enlarged
BOOL SbiBuffer::Check( USHORT n )
{
@@ -100,7 +101,7 @@ BOOL SbiBuffer::Check( USHORT n )
return TRUE;
}
-// Angleich des Puffers auf die uebergebene Byte-Grenze
+// Conditioning of the buffer onto the passed Byte limit
void SbiBuffer::Align( INT32 n )
{
@@ -119,7 +120,7 @@ void SbiBuffer::Align( INT32 n )
}
}
-// Patch einer Location
+// Patch of a Location
void SbiBuffer::Patch( UINT32 off, UINT32 val )
{
@@ -135,9 +136,9 @@ void SbiBuffer::Patch( UINT32 off, UINT32 val )
}
}
-// Forward References auf Labels und Prozeduren
-// bauen eine Kette auf. Der Anfang der Kette ist beim uebergebenen
-// Parameter, das Ende der Kette ist 0.
+// Forward References upon label und procedures
+// establish a linkage. The beginning of the linkage is at the passed parameter,
+// the end of the linkage is 0.
void SbiBuffer::Chain( UINT32 off )
{
@@ -248,3 +249,4 @@ BOOL SbiBuffer::Add( const void* p, USHORT len )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx
index 256dcf92e0..c8e961af1e 100644
--- a/basic/source/comp/codegen.cxx
+++ b/basic/source/comp/codegen.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,7 +35,7 @@
#include <limits>
#include <com/sun/star/script/ModuleType.hpp>
-// nInc ist die Inkrementgroesse der Puffer
+// nInc is the increment size of the buffers
SbiCodeGen::SbiCodeGen( SbModule& r, SbiParser* p, short nInc )
: rMod( r ), aCode( p, nInc )
@@ -51,7 +52,7 @@ UINT32 SbiCodeGen::GetPC()
return aCode.GetSize();
}
-// Statement merken
+// memorize the statement
void SbiCodeGen::Statement()
{
@@ -60,12 +61,12 @@ void SbiCodeGen::Statement()
nLine = pParser->GetLine();
nCol = pParser->GetCol1();
- // #29955 Information der for-Schleifen-Ebene
- // in oberen Byte der Spalte speichern
+ // #29955 Store the information of the for-loop-layer
+ // in the uppper Byte of the column
nCol = (nCol & 0xff) + 0x100 * nForLevel;
}
-// Anfang eines Statements markieren
+// Mark the beginning of a statement
void SbiCodeGen::GenStmnt()
{
@@ -76,8 +77,8 @@ void SbiCodeGen::GenStmnt()
}
}
-// Die Gen-Routinen returnen den Offset des 1. Operanden,
-// damit Jumps dort ihr Backchain versenken koennen
+// The Gen-Routines return the offset of the 1. operand,
+// so that jumps can sink their backchain there.
UINT32 SbiCodeGen::Gen( SbiOpcode eOpcode )
{
@@ -117,15 +118,15 @@ UINT32 SbiCodeGen::Gen( SbiOpcode eOpcode, UINT32 nOpnd1, UINT32 nOpnd2 )
return n;
}
-// Abspeichern des erzeugten Images im Modul
+// Storing of the created image in the module
void SbiCodeGen::Save()
{
SbiImage* p = new SbiImage;
rMod.StartDefinitions();
- // OPTION BASE-Wert:
+ // OPTION BASE-Value:
p->nDimBase = pParser->nBase;
- // OPTION EXPLICIT-Flag uebernehmen
+ // OPTION take over the EXPLICIT-Flag
if( pParser->bExplicit )
p->SetFlag( SBIMG_EXPLICIT );
@@ -244,6 +245,8 @@ void SbiCodeGen::Save()
if( nPass == 1 )
aPropName = aPropName.Copy( aIfaceName.Len() + 1 );
SbProcedureProperty* pProcedureProperty = NULL;
+ OSL_TRACE("*** getProcedureProperty for thing %s",
+ rtl::OUStringToOString( aPropName,RTL_TEXTENCODING_UTF8 ).getStr() );
pProcedureProperty = rMod.GetProcedureProperty( aPropName, ePropType );
}
if( nPass == 1 )
@@ -266,22 +269,22 @@ void SbiCodeGen::Save()
pMeth->nStart = pProc->GetAddr();
pMeth->nLine1 = pProc->GetLine1();
pMeth->nLine2 = pProc->GetLine2();
- // Die Parameter:
+ // The parameter:
SbxInfo* pInfo = pMeth->GetInfo();
String aHelpFile, aComment;
ULONG nHelpId = 0;
if( pInfo )
{
- // Die Zusatzdaten retten
+ // Rescue the additional data
aHelpFile = pInfo->GetHelpFile();
aComment = pInfo->GetComment();
nHelpId = pInfo->GetHelpId();
}
- // Und die Parameterliste neu aufbauen
+ // And reestablish the parameter list
pInfo = new SbxInfo( aHelpFile, nHelpId );
pInfo->SetComment( aComment );
SbiSymPool* pPool = &pProc->GetParams();
- // Das erste Element ist immer der Funktionswert!
+ // The first element is always the value of the function!
for( USHORT i = 1; i < pPool->GetSize(); i++ )
{
SbiSymDef* pPar = pPool->Get( i );
@@ -290,7 +293,7 @@ void SbiCodeGen::Save()
t = (SbxDataType) ( t | SbxBYREF );
if( pPar->GetDims() )
t = (SbxDataType) ( t | SbxARRAY );
- // #33677 Optional-Info durchreichen
+ // #33677 hand-over an Optional-Info
USHORT nFlags = SBX_READ;
if( pPar->IsOptional() )
nFlags |= SBX_OPTIONAL;
@@ -315,10 +318,10 @@ void SbiCodeGen::Save()
} // for( iPass...
}
}
- // Der Code
+ // The code
p->AddCode( aCode.GetBuffer(), aCode.GetSize() );
- // Der globale StringPool. 0 ist nicht belegt.
+ // The global StringPool. 0 is not occupied.
SbiStringPool* pPool = &pParser->aGblStrings;
USHORT nSize = pPool->GetSize();
p->MakeStrings( nSize );
@@ -326,7 +329,7 @@ void SbiCodeGen::Save()
for( i = 1; i <= nSize; i++ )
p->AddString( pPool->Find( i ) );
- // Typen einfuegen
+ // Insert types
USHORT nCount = pParser->rTypeArray->Count();
for (i = 0; i < nCount; i++)
p->AddType((SbxObject *)pParser->rTypeArray->Get(i));
@@ -537,3 +540,5 @@ PCodeBuffConvertor<T,S>::convert()
template class PCodeBuffConvertor< UINT16, UINT32 >;
template class PCodeBuffConvertor< UINT32, UINT16 >;
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx
index 61cf215949..e591fece78 100644
--- a/basic/source/comp/dim.cxx
+++ b/basic/source/comp/dim.cxx
@@ -29,6 +29,8 @@
#include "precompiled_basic.hxx"
#include <basic/sbx.hxx>
#include "sbcomp.hxx"
+#include "sbunoobj.hxx"
+
SbxObject* cloneTypeObjectImpl( const SbxObject& rTypeObj );
@@ -49,7 +51,7 @@ SbiSymDef* SbiParser::VarDecl( SbiDimList** ppDim, BOOL bStatic, BOOL bConst )
SbxDataType t = eScanType;
SbiSymDef* pDef = bConst ? new SbiConstDef( aSym ) : new SbiSymDef( aSym );
SbiDimList* pDim = NULL;
- // Klammern?
+ // Brackets?
if( Peek() == LPAREN )
pDim = new SbiDimList( this );
pDef->SetType( t );
@@ -69,15 +71,15 @@ SbiSymDef* SbiParser::VarDecl( SbiDimList** ppDim, BOOL bStatic, BOOL bConst )
return pDef;
}
-// Aufloesen einer AS-Typdeklaration
-// Der Datentyp wird in die uebergebene Variable eingetragen
+// Resolving of a AS-Type-Declaration
+// The data type were inserted into the handed over variable
void SbiParser::TypeDecl( SbiSymDef& rDef, BOOL bAsNewAlreadyParsed )
{
SbxDataType eType = rDef.GetType();
- short nSize = 0;
if( bAsNewAlreadyParsed || Peek() == AS )
{
+ short nSize = 0;
if( !bAsNewAlreadyParsed )
Next();
rDef.SetDefinedAs();
@@ -124,14 +126,14 @@ void SbiParser::TypeDecl( SbiSymDef& rDef, BOOL bAsNewAlreadyParsed )
}
}
break;
- case SYMBOL: // kann nur ein TYPE oder eine Objektklasse sein!
+ case SYMBOL: // can only be a TYPE or a object class!
if( eScanType != SbxVARIANT )
Error( SbERR_SYNTAX );
else
{
String aCompleteName = aSym;
- // #52709 DIM AS NEW fuer Uno mit voll-qualifizierten Namen
+ // #52709 DIM AS NEW for Uno with full-qualified name
if( Peek() == DOT )
{
String aDotStr( '.' );
@@ -153,13 +155,13 @@ void SbiParser::TypeDecl( SbiSymDef& rDef, BOOL bAsNewAlreadyParsed )
}
}
}
- else if( rEnumArray->Find( aCompleteName, SbxCLASS_OBJECT ) )
+ else if( rEnumArray->Find( aCompleteName, SbxCLASS_OBJECT ) || ( IsVBASupportOn() && VBAConstantHelper::instance().isVBAConstantType( aCompleteName ) ) )
{
eType = SbxLONG;
break;
}
- // In den String-Pool uebernehmen
+ // Take over in the String pool
rDef.SetTypeId( aGblStrings.Add( aCompleteName ) );
if( rDef.IsNew() && pProc == NULL )
@@ -175,7 +177,7 @@ void SbiParser::TypeDecl( SbiSymDef& rDef, BOOL bAsNewAlreadyParsed )
Error( SbERR_UNEXPECTED, eTok );
Next();
}
- // Die Variable koennte mit Suffix deklariert sein
+ // The variable could have been declared with a suffix
if( rDef.GetType() != SbxVARIANT )
{
if( rDef.GetType() != eType )
@@ -188,7 +190,7 @@ void SbiParser::TypeDecl( SbiSymDef& rDef, BOOL bAsNewAlreadyParsed )
}
}
-// Hier werden Variable, Arrays und Strukturen definiert.
+// Here variables, arrays and structures were definied.
// DIM/PRIVATE/PUBLIC/GLOBAL
void SbiParser::Dim()
@@ -206,15 +208,15 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
Error( SbERR_NOT_IN_SUBR, eCurTok );
if( eCurTok == PUBLIC || eCurTok == GLOBAL )
{
- bSwitchPool = TRUE; // im richtigen Moment auf globalen Pool schalten
+ bSwitchPool = TRUE; // at the right moment switch to the global pool
if( eCurTok == GLOBAL )
bPersistantGlobal = TRUE;
}
- // behavior in VBA is that a module scope variable's lifetime is
+ // behavior in VBA is that a module scope variable's lifetime is
// tied to the document. e.g. a module scope variable is global
- if( GetBasic()->IsDocBasic() && bVBASupportOn && !pProc )
+ if( GetBasic()->IsDocBasic() && bVBASupportOn && !pProc )
bPersistantGlobal = TRUE;
- // PRIVATE ist Synonym fuer DIM
+ // PRIVATE is a synonymous for DIM
// _CONST_?
BOOL bConst = FALSE;
if( eCurTok == _CONST_ )
@@ -236,7 +238,7 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
}
else if( eCurTok == SUB || eCurTok == FUNCTION || eCurTok == PROPERTY )
{
- // End global chain if necessary (not done in
+ // End global chain if necessary (not done in
// SbiParser::Parse() under these conditions
if( bNewGblDefs && nGblChain == 0 )
{
@@ -272,13 +274,13 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
#define tmpSHARED
#undef SHARED
#endif
- // SHARED wird ignoriert
+ // SHARED were ignored
if( Peek() == SHARED ) Next();
#ifdef tmpSHARED
#define SHARED
#undef tmpSHARED
#endif
- // PRESERVE nur bei REDIM
+ // PRESERVE only at REDIM
if( Peek() == PRESERVE )
{
Next();
@@ -290,23 +292,23 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
SbiSymDef* pDef;
SbiDimList* pDim;
- // AB 9.7.97, #40689, Statics -> Modul-Initialisierung, in Sub ueberspringen
+ // From 1997-07-09, #40689, Statics -> Modul-Initialising, skip in Sub
UINT32 nEndOfStaticLbl = 0;
if( !bVBASupportOn && bStatic )
{
nEndOfStaticLbl = aGen.Gen( _JUMP, 0 );
- aGen.Statement(); // bei static hier nachholen
+ aGen.Statement(); // catch up on static here
}
BOOL bDefined = FALSE;
while( ( pDef = VarDecl( &pDim, bStatic, bConst ) ) != NULL )
{
EnableErrors();
- // Variable suchen:
+ // search variable:
if( bSwitchPool )
pPool = &aGlobals;
SbiSymDef* pOld = pPool->Find( pDef->GetName() );
- // AB 31.3.1996, #25651#, auch in Runtime-Library suchen
+ // From 1996-03-31, #25651#, search also in the Runtime-Library
BOOL bRtlSym = FALSE;
if( !pOld )
{
@@ -322,10 +324,10 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
if( pOld )
{
bDefined = TRUE;
- // Bei RTL-Symbol immer Fehler
+ // always an error at a RTL-S
if( !bRtlSym && (eOp == _REDIM || eOp == _REDIMP) )
{
- // Bei REDIM die Attribute vergleichen
+ // compare the attributes at a REDIM
SbxDataType eDefType;
bool bError_ = false;
if( pOld->IsStatic() )
@@ -347,19 +349,19 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
else
pPool->Add( pDef );
- // #36374: Variable vor Unterscheidung IsNew() anlegen
- // Sonst Error bei Dim Identifier As New Type und option explicit
+ // #36374: Create the variable in front of the distinction IsNew()
+ // Otherwise error at Dim Identifier As New Type and option explicit
if( !bDefined && !(eOp == _REDIM || eOp == _REDIMP)
&& ( !bConst || pDef->GetScope() == SbGLOBAL ) )
{
- // Variable oder globale Konstante deklarieren
+ // Declare variable or global constant
SbiOpcode eOp2;
switch ( pDef->GetScope() )
{
- case SbGLOBAL: eOp2 = bPersistantGlobal ? _GLOBAL_P : _GLOBAL;
+ case SbGLOBAL: eOp2 = bPersistantGlobal ? _GLOBAL_P : _GLOBAL;
goto global;
case SbPUBLIC: eOp2 = bPersistantGlobal ? _PUBLIC_P : _PUBLIC;
- // AB 9.7.97, #40689, kein eigener Opcode mehr
+ // From 1997-07-09, #40689, no own Opcode anymore
if( bVBASupportOn && bStatic )
{
eOp2 = _STATIC;
@@ -385,8 +387,8 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
aGen.Gen( eOp2, pDef->GetId(), nOpnd2 );
}
- // Initialisierung fuer selbstdefinierte Datentypen
- // und per NEW angelegte Variable
+ // Initialising for self-defined daty types
+ // and per NEW created variable
if( pDef->GetType() == SbxOBJECT
&& pDef->GetTypeId() )
{
@@ -429,14 +431,17 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
aExpr.Gen();
SbiOpcode eOp_ = pDef->IsNew() ? _CREATE : _TCREATE;
aGen.Gen( eOp_, pDef->GetId(), pDef->GetTypeId() );
- aGen.Gen( _SET );
+ if ( bVBASupportOn )
+ aGen.Gen( _VBASET );
+ else
+ aGen.Gen( _SET );
}
}
else
{
if( bConst )
{
- // Konstanten-Definition
+ // Definition of the constants
if( pDim )
{
Error( SbERR_SYNTAX );
@@ -444,13 +449,13 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
}
SbiExpression aVar( this, *pDef );
if( !TestToken( EQ ) )
- goto MyBreak; // AB 24.6.1996 (s.u.)
+ goto MyBreak; // From 1996-06-24 (see below)
SbiConstExpression aExpr( this );
if( !bDefined && aExpr.IsValid() )
{
if( pDef->GetScope() == SbGLOBAL )
{
- // Nur Code fuer globale Konstante erzeugen!
+ // Create code only for the global constant!
aVar.Gen();
aExpr.Gen();
aGen.Gen( _PUTC );
@@ -464,8 +469,8 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
}
else if( pDim )
{
- // Die Variable dimensionieren
- // Bei REDIM die Var vorher loeschen
+ // Dimension the variable
+ // Delete the var at REDIM beforehand
if( eOp == _REDIM )
{
SbiExpression aExpr( this, *pDef, NULL );
@@ -495,14 +500,14 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
}
}
if( !TestComma() )
- goto MyBreak; // AB 24.6.1996 (s.u.)
-
- // #27963# AB, 24.6.1996
- // Einfuehrung bSwitchPool (s.o.): pPool darf beim VarDecl-Aufruf
- // noch nicht auf &aGlobals gesetzt sein.
- // Ansonsten soll das Verhalten aber absolut identisch bleiben,
- // d.h. pPool muss immer am Schleifen-Ende zurueckgesetzt werden.
- // auch bei break
+ goto MyBreak; // From 1996-06-24 (see below)
+
+ // #27963# From 1996-06-24
+ // Implementation of bSwitchPool (see above): pPool must not be set to &aGlobals
+ // at the VarDecl-Call.
+ // Apart from that the behavior should be absolutely identical,
+ // i.e., pPool had to be reset always at the end of the loop.
+ // also at a break
pPool = pOldPool;
continue; // MyBreak überspingen
MyBreak:
@@ -510,21 +515,21 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
break;
}
- // AB 9.7.97, #40689, Sprung ueber Statics-Deklaration abschliessen
+ // From 1997-07-09, #40689, finalize the jump over statics declarations
if( !bVBASupportOn && bStatic )
{
- // globalen Chain pflegen
+ // maintain the global chain
nGblChain = aGen.Gen( _JUMP, 0 );
bGblDefs = bNewGblDefs = TRUE;
- // fuer Sub Sprung auf Ende der statics eintragen
+ // Register for Sub a jump to the end of statics
aGen.BackChain( nEndOfStaticLbl );
}
//pPool = pOldPool;
}
-// Hier werden Arrays redimensioniert.
+// Here were Arrays redimensioned.
void SbiParser::ReDim()
{
@@ -544,7 +549,7 @@ void SbiParser::Erase()
}
}
-// Deklaration eines Datentyps
+// Declaration of a data type
void SbiParser::Type()
{
@@ -556,7 +561,7 @@ void SbiParser::DefType( BOOL bPrivate )
// TODO: Use bPrivate
(void)bPrivate;
- // Neues Token lesen, es muss ein Symbol sein
+ // Read the new Token lesen. It had to be a symbol
if (!TestSymbol())
return;
@@ -592,7 +597,7 @@ void SbiParser::DefType( BOOL bPrivate )
pDim = NULL;
pElem = VarDecl(&pDim,FALSE,FALSE);
if( !pElem )
- bDone = TRUE; // Error occured
+ bDone = TRUE; // Error occurred
}
if( pElem )
{
@@ -678,7 +683,7 @@ void SbiParser::Enum()
void SbiParser::DefEnum( BOOL bPrivate )
{
- // Neues Token lesen, es muss ein Symbol sein
+ // Read a the new Token. It had to be a symbol
if (!TestSymbol())
return;
@@ -724,14 +729,14 @@ void SbiParser::DefEnum( BOOL bPrivate )
pElem = VarDecl( &pDim, FALSE, TRUE );
if( !pElem )
{
- bDone = TRUE; // Error occured
+ bDone = TRUE; // Error occurred
break;
}
else if( pDim )
{
delete pDim;
Error( SbERR_SYNTAX );
- bDone = TRUE; // Error occured
+ bDone = TRUE; // Error occurred
break;
}
@@ -761,7 +766,7 @@ void SbiParser::DefEnum( BOOL bPrivate )
if( pOld )
{
Error( SbERR_VAR_DEFINED, pElem->GetName() );
- bDone = TRUE; // Error occured
+ bDone = TRUE; // Error occurred
break;
}
@@ -769,7 +774,7 @@ void SbiParser::DefEnum( BOOL bPrivate )
if( !bPrivate )
{
- SbiOpcode eOp = _GLOBAL;
+ SbiOpcode eOp = _GLOBAL;
aGen.BackChain( nGblChain );
nGblChain = 0;
bGblDefs = bNewGblDefs = TRUE;
@@ -805,8 +810,8 @@ void SbiParser::DefEnum( BOOL bPrivate )
}
-// Prozedur-Deklaration
-// das erste Token ist bereits eingelesen (SUB/FUNCTION)
+// Procedure-Declaration
+// the first Token is already read in (SUB/FUNCTION)
// xxx Name [LIB "name"[ALIAS "name"]][(Parameter)][AS TYPE]
SbiProcDef* SbiParser::ProcDecl( BOOL bDecl )
@@ -840,7 +845,7 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl )
}
if( !bDecl )
{
- // CDECL, LIB und ALIAS sind unzulaessig
+ // CDECL, LIB and ALIAS are invalid
if( pDef->GetLib().Len() )
Error( SbERR_UNEXPECTED, LIB );
if( pDef->GetAlias().Len() )
@@ -853,7 +858,7 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl )
}
else if( !pDef->GetLib().Len() )
{
- // ALIAS und CDECL nur zusammen mit LIB
+ // ALIAS and CDECL only together with LIB
if( pDef->GetAlias().Len() )
Error( SbERR_UNEXPECTED, ALIAS );
if( pDef->IsCdecl() )
@@ -861,7 +866,7 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl )
pDef->SetCdecl( FALSE );
pDef->GetAlias().Erase();
}
- // Klammern?
+ // Brackets?
if( Peek() == LPAREN )
{
Next();
@@ -959,14 +964,14 @@ void SbiParser::DefDeclare( BOOL bPrivate )
{
if( !pDef->GetLib().Len() )
Error( SbERR_EXPECTED, LIB );
- // gibts den schon?
+ // Is it already there?
SbiSymDef* pOld = aPublics.Find( pDef->GetName() );
if( pOld )
{
SbiProcDef* p = pOld->GetProcDef();
if( !p )
{
- // Als Variable deklariert
+ // Declared as a variable
Error( SbERR_BAD_DECLARATION, pDef->GetName() );
delete pDef;
pDef = NULL;
@@ -1046,11 +1051,27 @@ void SbiParser::DefDeclare( BOOL bPrivate )
}
}
-// Aufruf einer SUB oder FUNCTION
+void SbiParser::Attribute()
+{
+ // TODO: Need to implement the method as an attributed object.
+ while( Next() != EQ )
+ {
+ if( Next() != DOT)
+ break;
+ }
+
+ if( eCurTok != EQ )
+ Error( SbERR_SYNTAX );
+ else
+ SbiExpression aValue( this );
+
+ // Don't generate any code - just discard it.
+}
+
+// Call of a SUB or a FUNCTION
void SbiParser::Call()
{
- String aName( aSym );
SbiExpression aVar( this, SbSYMBOL );
aVar.Gen( FORCE_CALL );
aGen.Gen( _GET );
@@ -1063,7 +1084,7 @@ void SbiParser::SubFunc()
DefProc( FALSE, FALSE );
}
-// Einlesen einer Prozedur
+// Read in of a procedure
BOOL runsInSetup( void );
@@ -1092,7 +1113,7 @@ void SbiParser::DefProc( BOOL bStatic, BOOL bPrivate )
return;
pDef->setPropertyMode( ePropertyMode );
- // Ist die Proc bereits deklariert?
+ // Is the Proc already declared?
SbiSymDef* pOld = aPublics.Find( pDef->GetName() );
if( pOld )
{
@@ -1101,7 +1122,7 @@ void SbiParser::DefProc( BOOL bStatic, BOOL bPrivate )
pProc = pOld->GetProcDef();
if( !pProc )
{
- // Als Variable deklariert
+ // Declared as a variable
Error( SbERR_BAD_DECLARATION, pDef->GetName() );
delete pDef;
pProc = NULL;
@@ -1134,8 +1155,8 @@ void SbiParser::DefProc( BOOL bStatic, BOOL bPrivate )
return;
pProc->SetPublic( !bPrivate );
- // Nun setzen wir die Suchhierarchie fuer Symbole sowie die aktuelle
- // Prozedur.
+ // Now we set the search hierarchy for symbols as well as the
+ // current procedure.
aPublics.SetProcId( pProc->GetId() );
pProc->GetParams().SetParent( &aPublics );
if( bStatic )
@@ -1149,7 +1170,7 @@ void SbiParser::DefProc( BOOL bStatic, BOOL bPrivate )
{
pProc->SetStatic( FALSE );
}
- // Normalfall: Lokale Variable->Parameter->Globale Variable
+ // Normal case: Local variable->parameter->global variable
pProc->GetLocals().SetParent( &pProc->GetParams() );
pPool = &pProc->GetLocals();
@@ -1161,7 +1182,7 @@ void SbiParser::DefProc( BOOL bStatic, BOOL bPrivate )
pProc->SetLine2( l2 );
pPool = &aPublics;
aPublics.SetProcId( 0 );
- // Offene Labels?
+ // Open labels?
pProc->GetLabels().CheckRefs();
CloseBlock();
aGen.Gen( _LEAVE );
@@ -1182,7 +1203,7 @@ void SbiParser::DefStatic( BOOL bPrivate )
case SUB:
case FUNCTION:
case PROPERTY:
- // End global chain if necessary (not done in
+ // End global chain if necessary (not done in
// SbiParser::Parse() under these conditions
if( bNewGblDefs && nGblChain == 0 )
{
@@ -1195,8 +1216,8 @@ void SbiParser::DefStatic( BOOL bPrivate )
default: {
if( !pProc )
Error( SbERR_NOT_IN_SUBR );
- // Pool umsetzen, damit STATIC-Deklarationen im globalen
- // Pool landen
+ // Reset the Pool, so that STATIC-Declarations go into the
+ // global Pool
SbiSymPool* p = pPool; pPool = &aPublics;
DefVar( _STATIC, TRUE );
pPool = p;
@@ -1204,3 +1225,4 @@ void SbiParser::DefStatic( BOOL bPrivate )
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/comp/exprgen.cxx b/basic/source/comp/exprgen.cxx
index ea2dd286da..e38a072808 100644
--- a/basic/source/comp/exprgen.cxx
+++ b/basic/source/comp/exprgen.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,7 @@
#include "sbcomp.hxx"
#include "expr.hxx"
-// Umsetztabelle fuer Token-Operatoren und Opcodes
+// Transform table for token operators and opcodes
typedef struct {
SbiToken eTok; // Token
@@ -64,7 +65,7 @@ static OpTable aOpTable [] = {
{ IS, _IS },
{ NIL, _NOP }};
-// Ausgabe eines Elements
+// Output of an element
void SbiExprNode::Gen( RecursiveMode eRecMode )
{
if( IsConstant() )
@@ -108,10 +109,10 @@ void SbiExprNode::Gen( RecursiveMode eRecMode )
eOp = aVar.pDef->IsGlobal() ? _FIND_G : _FIND;
}
}
- // AB: 17.12.1995, Spezialbehandlung fuer WITH
+ // From 1995-12-17, special treatment for WITH
else if( (pWithParent_ = GetWithParent()) != NULL )
{
- eOp = _ELEM; // .-Ausdruck in WITH
+ eOp = _ELEM; // .-Term in in WITH
}
else
{
@@ -162,7 +163,7 @@ void SbiExprNode::Gen( RecursiveMode eRecMode )
}
}
-// Ausgabe eines Operanden-Elements
+// Output of an operand element
void SbiExprNode::GenElement( SbiOpcode eOp )
{
@@ -171,11 +172,11 @@ void SbiExprNode::GenElement( SbiOpcode eOp )
pGen->GetParser()->Error( SbERR_INTERNAL_ERROR, "Opcode" );
#endif
SbiSymDef* pDef = aVar.pDef;
- // Das ID ist entweder die Position oder das String-ID
- // Falls das Bit 0x8000 gesetzt ist, hat die Variable
- // eine Parameterliste.
+ // The ID is either the position or the String-ID
+ // If the bit Bit 0x8000 is set, the variable have
+ // a parameter list.
USHORT nId = ( eOp == _PARAM ) ? pDef->GetPos() : pDef->GetId();
- // Parameterliste aufbauen
+ // Build a parameter list
if( aVar.pPar && aVar.pPar->GetSize() )
{
nId |= 0x8000;
@@ -197,9 +198,9 @@ void SbiExprNode::GenElement( SbiOpcode eOp )
}
}
-// Erzeugen einer Argv-Tabelle
-// Das erste Element bleibt immer frei fuer Returnwerte etc.
-// Siehe auch SbiProcDef::SbiProcDef() in symtbl.cxx
+// Create an Argv-Table
+// The first element remain available for return value etc.
+// See as well SbiProcDef::SbiProcDef() in symtbl.cxx
void SbiExprList::Gen()
{
@@ -222,7 +223,7 @@ void SbiExprList::Gen()
// AB 10.1.96: Typanpassung bei named -> passenden Parameter suchen
if( pProc )
{
- // Vorerst: Error ausloesen
+ // For the present: trigger an error
pParser->Error( SbERR_NO_NAMED_ARGS );
// Spaeter, wenn Named Args bei DECLARE moeglich
@@ -253,8 +254,8 @@ void SbiExprList::Gen()
void SbiExpression::Gen( RecursiveMode eRecMode )
{
- // AB: 17.12.1995, Spezialbehandlung fuer WITH
- // Wenn pExpr == .-Ausdruck in With, zunaechst Gen fuer Basis-Objekt
+ // From 1995-12-17, special treatment for WITH
+ // If pExpr == .-term in With, approximately Gen for Basis-Object
pExpr->Gen( eRecMode );
if( bByVal )
pParser->aGen.Gen( _BYVAL );
@@ -268,3 +269,4 @@ void SbiExpression::Gen( RecursiveMode eRecMode )
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx
index bf891bc5a2..01e7b74eb7 100644
--- a/basic/source/comp/exprnode.cxx
+++ b/basic/source/comp/exprnode.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,7 +52,7 @@ SbiExprNode::SbiExprNode( SbiParser* p, SbiExprNode* l, SbiToken t, SbiExprNode*
pRight = r;
eTok = t;
nVal = 0;
- eType = SbxVARIANT; // Nodes sind immer Variant
+ eType = SbxVARIANT; // Nodes are always Variant
eNodeType = SbxNODE;
bComposite= TRUE;
}
@@ -85,7 +86,7 @@ SbiExprNode::SbiExprNode( SbiParser* p, const SbiSymDef& r, SbxDataType t, SbiEx
aVar.pvMorePar = NULL;
aVar.pNext= NULL;
- // Funktionsergebnisse sind nie starr
+ // Results of functions are at no time fixed
bComposite= BOOL( aVar.pDef->GetProcDef() != NULL );
}
@@ -110,7 +111,12 @@ SbiExprNode::SbiExprNode( SbiParser* p, USHORT nId )
nTypeStrId = nId;
}
-// AB: 17.12.95, Hilfsfunktion fuer Ctor fuer einheitliche Initialisierung
+ eType = SbxOBJECT;
+ eNodeType = SbxNEW;
+ nTypeStrId = nId;
+}
+
+// From 1995-12-17, auxiliary function for Ctor for the uniform initialisation
void SbiExprNode::BaseInit( SbiParser* p )
{
pGen = &p->aGen;
@@ -158,7 +164,7 @@ SbiSymDef* SbiExprNode::GetRealVar()
return NULL;
}
-// AB: 18.12.95
+// From 1995-12-18
SbiExprNode* SbiExprNode::GetRealNode()
{
if( eNodeType == SbxVARVAL )
@@ -172,7 +178,7 @@ SbiExprNode* SbiExprNode::GetRealNode()
return NULL;
}
-// Diese Methode setzt den Typ um, falls er in den Integer-Bereich hineinpasst
+// This method transform the type, if it fits into the Integer range
BOOL SbiExprNode::IsIntConst()
{
@@ -212,7 +218,7 @@ BOOL SbiExprNode::IsLvalue()
return IsVariable();
}
-// Ermitteln der Tiefe eines Baumes
+// Identify of the depth of a tree
short SbiExprNode::GetDepth()
{
@@ -226,11 +232,11 @@ short SbiExprNode::GetDepth()
}
-// Abgleich eines Baumes:
+// Adjustment of a tree:
// 1. Constant Folding
-// 2. Typabgleich
-// 3. Umwandlung der Operanden in Strings
-// 4. Hochziehen der Composite- und Error-Bits
+// 2. Type-Adjustment
+// 3. Conversion of the operans into Strings
+// 4. Lifting of the composite- and error-bits
void SbiExprNode::Optimize()
{
@@ -238,7 +244,7 @@ void SbiExprNode::Optimize()
CollectBits();
}
-// Hochziehen der Composite- und Fehlerbits
+// Lifting of the composite- and error-bits
void SbiExprNode::CollectBits()
{
@@ -256,8 +262,8 @@ void SbiExprNode::CollectBits()
}
}
-// Kann ein Zweig umgeformt werden, wird TRUE zurueckgeliefert. In diesem
-// Fall ist das Ergebnis im linken Zweig.
+// If a twig can be converted, True will be returned. In this case
+// the result is in the left twig.
void SbiExprNode::FoldConstants()
{
@@ -272,10 +278,10 @@ void SbiExprNode::FoldConstants()
{
CollectBits();
if( eTok == CAT )
- // CAT verbindet auch zwei Zahlen miteinander!
+ // CAT affiliate also two numbers!
eType = SbxSTRING;
if( pLeft->eType == SbxSTRING )
- // Kein Type Mismatch!
+ // No Type Mismatch!
eType = SbxSTRING;
if( eType == SbxSTRING )
{
@@ -287,7 +293,7 @@ void SbiExprNode::FoldConstants()
if( eTok == PLUS || eTok == CAT )
{
eTok = CAT;
- // Verkettung:
+ // Linking:
aStrVal = rl;
aStrVal += rr;
eType = SbxSTRING;
@@ -333,7 +339,7 @@ void SbiExprNode::FoldConstants()
if( ( eTok >= AND && eTok <= IMP )
|| eTok == IDIV || eTok == MOD )
{
- // Integer-Operationen
+ // Integer operations
BOOL err = FALSE;
if( nl > SbxMAXLNG ) err = TRUE, nl = SbxMAXLNG;
else
@@ -427,12 +433,11 @@ void SbiExprNode::FoldConstants()
if( !::rtl::math::isFinite( nVal ) )
pGen->GetParser()->Error( SbERR_MATH_OVERFLOW );
- // Den Datentyp wiederherstellen, um Rundungsfehler
- // zu killen
+ // Recover the data type to kill rounding error
if( bCheckType && bBothInt
&& nVal >= SbxMINLNG && nVal <= SbxMAXLNG )
{
- // NK-Stellen weg
+ // Decimal place away
long n = (long) nVal;
nVal = n;
eType = ( n >= SbxMININT && n <= SbxMAXINT )
@@ -454,7 +459,7 @@ void SbiExprNode::FoldConstants()
case NEG:
nVal = -nVal; break;
case NOT: {
- // Integer-Operation!
+ // Integer operation!
BOOL err = FALSE;
if( nVal > SbxMAXLNG ) err = TRUE, nVal = SbxMAXLNG;
else
@@ -472,7 +477,7 @@ void SbiExprNode::FoldConstants()
}
if( eNodeType == SbxNUMVAL )
{
- // Evtl auf INTEGER falten (wg. besserem Opcode)?
+ // Potentially convolve in INTEGER (because of better opcode)?
if( eType == SbxSINGLE || eType == SbxDOUBLE )
{
double x;
@@ -486,3 +491,4 @@ void SbiExprNode::FoldConstants()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx
index ec86ae075f..9b45590a60 100644
--- a/basic/source/comp/exprtree.cxx
+++ b/basic/source/comp/exprtree.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -127,7 +128,7 @@ static BOOL DoParametersFollow( SbiParser* p, SbiExprType eCurExpr, SbiToken eTo
if ( tokens.Peek() == ASSIGN )
return TRUE;
}
- return FALSE;
+ return FALSE;
}
// Definition eines neuen Symbols
@@ -373,8 +374,12 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo )
// Typ SbxOBJECT sein
if( pDef->GetType() != SbxOBJECT && pDef->GetType() != SbxVARIANT )
{
- pParser->Error( SbERR_BAD_DECLARATION, aSym );
- bError = TRUE;
+ // defer error until runtime if in vba mode
+ if ( !pParser->IsVBASupportOn() )
+ {
+ pParser->Error( SbERR_BAD_DECLARATION, aSym );
+ bError = TRUE;
+ }
}
if( !bError )
pNd->aVar.pNext = ObjTerm( *pDef );
@@ -763,7 +768,7 @@ SbiExprNode* SbiExpression::Like()
pNd = new SbiExprNode( pParser, pNd, eTok, Comp() ), nCount++;
}
// Mehrere Operatoren hintereinander gehen nicht
- if( nCount > 1 )
+ if( nCount > 1 && !pParser->IsVBASupportOn() )
{
pParser->Error( SbERR_SYNTAX );
bError = TRUE;
@@ -1161,3 +1166,4 @@ SbiDimList::SbiDimList( SbiParser* p ) : SbiExprList( p )
else pParser->Next();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/comp/io.cxx b/basic/source/comp/io.cxx
index c7ed83c677..3c750dac00 100644
--- a/basic/source/comp/io.cxx
+++ b/basic/source/comp/io.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -356,3 +357,4 @@ void SbiParser::Close()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/comp/loops.cxx b/basic/source/comp/loops.cxx
index 20480ec45c..10284fb580 100644
--- a/basic/source/comp/loops.cxx
+++ b/basic/source/comp/loops.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -556,3 +557,4 @@ void SbiParser::Resume()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx
index 83e7bbd604..1e8e7b2cee 100644
--- a/basic/source/comp/parser.cxx
+++ b/basic/source/comp/parser.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,6 +50,7 @@ struct SbiStatement {
#define N FALSE
static SbiStatement StmntTable [] = {
+{ ATTRIBUTE, &SbiParser::Attribute, Y, Y, }, // ATTRIBUTE
{ CALL, &SbiParser::Call, N, Y, }, // CALL
{ CLOSE, &SbiParser::Close, N, Y, }, // CLOSE
{ _CONST_, &SbiParser::Dim, Y, Y, }, // CONST
@@ -387,6 +389,18 @@ BOOL SbiParser::Parse()
Next(); return TRUE;
}
+ // In vba it's possible to do Error.foobar ( even if it results in
+ // a runtime error
+ if ( eCurTok == _ERROR_ && IsVBASupportOn() ) // we probably need to define a subset of keywords where this madness applies e.g. if ( IsVBASupportOn() && SymbolCanBeRedined( eCurTok ) )
+ {
+ SbiTokenizer tokens( *(SbiTokenizer*)this );
+ tokens.Next();
+ if ( tokens.Peek() == DOT )
+ {
+ eCurTok = SYMBOL;
+ ePush = eCurTok;
+ }
+ }
// Kommt ein Symbol, ist es entweder eine Variable( LET )
// oder eine SUB-Prozedur( CALL ohne Klammern )
// DOT fuer Zuweisungen im WITH-Block: .A=5
@@ -795,7 +809,7 @@ void SbiParser::Option()
bClassModule = TRUE;
aGen.GetModule().SetModuleType( com::sun::star::script::ModuleType::CLASS );
break;
- case VBASUPPORT:
+ case VBASUPPORT: // Option VBASupport used to override the module mode ( in fact this must reset the mode
if( Next() == NUMBER )
{
if ( nVal == 1 || nVal == 0 )
@@ -861,3 +875,4 @@ void SbiParser::ErrorStmnt()
aGen.Gen( _ERROR );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx
index 512fc6f694..5f8d90e920 100755
--- a/basic/source/comp/sbcomp.cxx
+++ b/basic/source/comp/sbcomp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -582,7 +583,7 @@ void dbg_SaveDisassembly( SbModule* pModule )
if( xSMgr.is() )
{
Reference< XSimpleFileAccess3 > xSFI = Reference< XSimpleFileAccess3 >( xSMgr->createInstance
- ( OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), UNO_QUERY );
+ ( OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )) ), UNO_QUERY );
if( xSFI.is() )
{
String aFile( RTL_CONSTASCII_USTRINGPARAM("file:///d:/zBasic.Asm/Asm_") );
@@ -599,7 +600,7 @@ void dbg_SaveDisassembly( SbModule* pModule )
if( xSFI->exists( aFile ) )
xSFI->kill( aFile );
xOut = xSFI->openFileWrite( aFile );
- Reference< XInterface > x = xSMgr->createInstance( OUString::createFromAscii( "com.sun.star.io.TextOutputStream" ) );
+ Reference< XInterface > x = xSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TextOutputStream" )) );
Reference< XActiveDataSource > xADS( x, UNO_QUERY );
xADS->setOutputStream( xOut );
xTextOut = Reference< XTextOutputStream >( x, UNO_QUERY );
@@ -694,3 +695,4 @@ void StarBASIC::Highlight( const String& rSrc, SbTextPortions& rList )
aTok.Hilite( rList );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index a6a389026c..bebdf82d61 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -604,3 +605,5 @@ bool LetterTable::isLetterUnicode( sal_Unicode c )
bool bRet = pCharClass->isLetter( aStr, 0 );
return bRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx
index 7f6db9cd38..62e70d6f5a 100644
--- a/basic/source/comp/symtbl.cxx
+++ b/basic/source/comp/symtbl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -535,3 +536,4 @@ SbiConstDef* SbiConstDef::GetConstDef()
return this;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx
index 00690796a7..b0bb367210 100644
--- a/basic/source/comp/token.cxx
+++ b/basic/source/comp/token.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,6 +59,7 @@ static TokenTable aTokTable_Basic [] = { // Token-Tabelle:
{ ANY, "Any" },
{ APPEND, "Append" },
{ AS, "As" },
+ { ATTRIBUTE,"Attribute" },
{ BASE, "Base" },
{ BINARY, "Binary" },
{ TBOOLEAN, "Boolean" },
@@ -712,3 +714,4 @@ void SbiTokenizer::Hilite( SbTextPortions& rList )
bUsedForHilite = FALSE;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */