Compared files  

Left
C:\SDK\wxWidgets-2.6.2\contrib\src\stc\scintilla\src\LexVB.cxx
Last modified2004-02-18 17:28:56.000 +0100
Size6.8 Kb (234 Lines)
EncodingLatin 1 - ANSI (CP1252) default
Right
C:\SDK\wxWidgets-2.6.3\contrib\src\stc\scintilla\src\LexVB.cxx
Last modified2006-03-16 13:07:08.000 +0100
Size8.3 Kb (271 Lines)
EncodingLatin 1 - ANSI (CP1252) default


   Comparison Statistics  

Detailed Statistics

All Changes
 BlocksLines
Unchanged19214
Inserted835
Deleted00
Ignored00
Changed1042



   Comparison Details  

1 skipped line
2U2U/** @file LexVB.cxx
3U3U ** Lexer for Visual Basic and VBScript.
4U4U **/
5C// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org> 5C// Copyright 1998-2005 by Neil Hodgson <neilh@scintilla.org>
6U6U// The License.txt file describes the conditions under which this software may be distributed.
7U7U 
8U8U#include <stdlib.h>
11 skipped lines
20U20U#include "Scintilla.h"
21U21U#include "SciLexer.h"
22U22U 
  23A// Internal state, highlighted as number
  24A#define SCE_B_FILENUMBER SCE_B_DEFAULT+100
  25A 
  26A 
23U27Ustatic bool IsVBComment(Accessor &styler, int pos, int len) {
24C    return len>0 && styler[pos]=='\''; 28C    return len > 0 && styler[pos] == '\'';
25U29U}
26U30U 
27U31Ustatic inline bool IsTypeCharacter(int ch) {
8 skipped lines
36U40U 
37U41Ustatic inline bool IsAWordStart(int ch) {
38U42U    return ch >= 0x80 ||
39C           (isalnum(ch) || ch == '_'); 43C           (isalpha(ch) || ch == '_');
40U44U}
41U45U 
42Cstatic inline bool IsADateCharacter(const int ch) { 46Cstatic inline bool IsANumberChar(int ch) {
  47C    // Not exactly following number definition (several dots are seen as OK, etc.)
  48C    // but probably enough in most cases.
43U49U    return (ch < 0x80) &&
  50C            (isdigit(ch) || toupper(ch) == 'E' ||
44C        (isalnum(ch) || ch == '|' || ch == '-' || ch == '/|| ch == ':' || ch == ' ' || ch == '\t'); 51C             ch == '.' || ch == '-|| ch == '+');
45U52U}
46U53U 
47U54Ustatic void ColouriseVBDoc(unsigned int startPos, int length, int initStyle,
7 skipped lines
55U62U    styler.StartAt(startPos);
56U63U 
57U64U    int visibleChars = 0;
  65A    int fileNbDigits = 0;
  66A 
  67A    // Do not leak onto next line
  68A    if (initStyle == SCE_B_STRINGEOL || initStyle == SCE_B_COMMENT || initStyle == SCE_B_PREPROCESSOR) {
  69A        initStyle = SCE_B_DEFAULT;
  70A    }
58U71U 
59U72U    StyleContext sc(startPos, length, initStyle, styler);
60U73U 
35 skipped lines
96U109U        }
97U110U        }
98U111U        } else if (sc.state == SCE_B_NUMBER) {
  112C        // We stop the number definition on non-numerical non-dot non-eE non-sign char
  113C        // Also accepts A-F for hex. numbers
99C        if (!IsAWordChar(sc.ch)) { 114C        if (!IsANumberChar(sc.ch) && !(tolower(sc.ch) >= 'a' && tolower(sc.ch) <= 'f')) {
100U115U        sc.SetState(SCE_B_DEFAULT);
101U116U        }
102U117U        } else if (sc.state == SCE_B_STRING) {
10 skipped lines
113U128U        }
114U129U        } else if (sc.state == SCE_B_COMMENT) {
115U130U        if (sc.atLineEnd) {
116C        sc.SetState(SCE_B_DEFAULT); 131C        sc.ForwardSetState(SCE_B_DEFAULT);
117U132U        }
118U133U        } else if (sc.state == SCE_B_PREPROCESSOR) {
119U134U        if (sc.atLineEnd) {
  135A        sc.ForwardSetState(SCE_B_DEFAULT);
  136A        }
  137A        } else if (sc.state == SCE_B_FILENUMBER) {
  138A        if (IsADigit(sc.ch)) {
  139A        fileNbDigits++;
3 skipped lines
  143A        } else if (sc.ch == '\r' || sc.ch == '\n' || sc.ch == ',') {
  144A        // Regular uses: Close #1; Put #1, ...; Get #1, ... etc.
  145A        // Too bad if date is format #27, Oct, 2003# or something like that...
  146A        // Use regular number state
  147A        sc.ChangeState(SCE_B_NUMBER);
120U148U        sc.SetState(SCE_B_DEFAULT);
  149A        } else if (sc.ch == '#') {
  150A        sc.ChangeState(SCE_B_DATE);
  151A        sc.ForwardSetState(SCE_B_DEFAULT);
  152A        } else {
  153A        sc.ChangeState(SCE_B_DATE);
  154A        }
  155A        if (sc.state != SCE_B_FILENUMBER) {
  156A        fileNbDigits = 0;
121U157U        }
122U158U        } else if (sc.state == SCE_B_DATE) {
  159C        if (sc.atLineEnd) {
  160C        sc.ChangeState(SCE_B_STRINGEOL);
  161C        sc.ForwardSetState(SCE_B_DEFAULT);
123C        if (sc.ch == '#' || !IsADateCharacter(sc.chNext)) { 162C        } else if (sc.ch == '#') {
124U163U        sc.ForwardSetState(SCE_B_DEFAULT);
125U164U        }
126U165U        }
7 skipped lines
134U173U        // Preprocessor commands are alone on their line
135U174U        sc.SetState(SCE_B_PREPROCESSOR);
136U175U        } else if (sc.ch == '#') {
137C        int n = 1; 176C        // It can be a date literal, ending with #, or a file number, from 1 to 511
138C        int chSeek = ' '; 177C        // The date literal depends on the locale, so anything can go between #'s.
139C        while ((n < 100) && (chSeek == ' ' || chSeek == '\t')) { 178C        // Can be #January 1, 1993# or #1 Jan 93# or #05/11/2003#, etc.
140C        chSeek = sc.GetRelative(n);  
141C        n++;  
142C        }  
143C        if (IsADigit(chSeek)) {  
144C        sc.SetState(SCE_B_DATE); 179C        // So we set the FILENUMBER state, and switch to DATE if it isn't a file number
145C        } else {  
146C        sc.SetState(SCE_B_OPERATOR); 180C        sc.SetState(SCE_B_FILENUMBER);
147C        }  
148U181U        } else if (sc.ch == '&' && tolower(sc.chNext) == 'h') {
  182A        // Hexadecimal number
149U183U        sc.SetState(SCE_B_NUMBER);
  184A        sc.Forward();
150U185U        } else if (sc.ch == '&' && tolower(sc.chNext) == 'o') {
  186A        // Octal number
151U187U        sc.SetState(SCE_B_NUMBER);
  188A        sc.Forward();
152U189U        } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {
153U190U        sc.SetState(SCE_B_NUMBER);
154U191U        } else if (IsAWordStart(sc.ch) || (sc.ch == '[')) {
155U192U        sc.SetState(SCE_B_IDENTIFIER);
156C        } else if (isoperator(static_cast<char>(sc.ch)) || (sc.ch == '\\')) { 193C        } else if (isoperator(static_cast<char>(sc.ch)) || (sc.ch == '\\')) { // Integer division
157U194U        sc.SetState(SCE_B_OPERATOR);
158U195U        }
159U196U        }
75 skipped lines

   Text comparison Options  

Match character case: yes.
Match line endings: no.
Match spaces

At start of lines: yes,
In middle of lines: yes,
At end of lines: yes.
Blank lines as empty lines: no.
Activate comparison algorithm
At word level: yes,
At character level: no.


   Legend  

UExample of unchanged line
CExample of modified line
AExample of added line
RExample of removed line
IExample of ignored line
Modified text
Added text
Removed text

This report has been generated by Ellié Computing Merge on 2006-09-07 16:23:43.001 +0200.
© 2005-2006 Ellié Computing http://www.elliecomputing.com. All rights reserved.