Compared files  

Left
C:\SDK\wxWidgets-2.6.2\contrib\src\stc\scintilla\src\LexLisp.cxx
Last modified2005-03-21 12:17:54.000 +0100
Size4.7 Kb (183 Lines)
EncodingLatin 1 - ANSI (CP1252) default
Right
C:\SDK\wxWidgets-2.6.3\contrib\src\stc\scintilla\src\LexLisp.cxx
Last modified2006-03-16 13:07:08.000 +0100
Size7.7 Kb (276 Lines)
EncodingLatin 1 - ANSI (CP1252) default


   Comparison Statistics  

Detailed Statistics

All Changes
 BlocksLines
Unchanged16176
Inserted886
Deleted11
Ignored00
Changed620



   Comparison Details  

18 skipped lines
19 19 #include "KeyWords.h"
20 20 #include "Scintilla.h"
21 21 #include "SciLexer.h"
  22 #include "StyleContext.h"
22 23  
  24 #define SCE_LISP_CHARACTER 29
  25 #define SCE_LISP_MACRO 30
  26 #define SCE_LISP_MACRO_DISPATCH 31
23 27  
24 28 static inline bool isLispoperator(char ch) {
25 29     if (isascii(ch) && isalnum(ch))
26 30         return false;
27     if (ch == '\'' || ch == '(' || ch == ')' ) 31     if (ch == '\'' || ch == '`' || ch == '(' || ch == ')' )
28 32         return true;
29 33     return false;
30 34 }
4 skipped lines
35 39 }
36 40  
37 41  
38 static void classifyWordLisp(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { 42 static void classifyWordLisp(unsigned int start, unsigned int end, WordList &keywords, WordList &keywords_kw, Accessor &styler) {
39 43     PLATFORM_ASSERT(end >= start);
40 44     char s[100];
41 45     unsigned int i;
9 skipped lines
51 55     else {
52 56         if (keywords.InList(s)) {
53 57         chAttr = SCE_LISP_KEYWORD;
  58         } else if (keywords_kw.InList(s)) {
  59         chAttr = SCE_LISP_KEYWORD_KW;
  60         } else if ((s[0] == '*' && s[i-1] == '*') ||
  61            (s[0] == '+' && s[i-1] == '+')) {
  62         chAttr = SCE_LISP_SPECIAL;
54 63         }
55 64     }
56 65     styler.ColourTo(end, chAttr);
5 skipped lines
62 71                             Accessor &styler) {
63 72  
64 73     WordList &keywords = *keywordlists[0];
  74     WordList &keywords_kw = *keywordlists[1];
65 75  
66 76     styler.StartAt(startPos);
67 77  
68     int state = initStyle; 78     int state = initStyle, radix = -1;
69 79     char chNext = styler[startPos];
70 80     unsigned int lengthDoc = startPos + length;
71 81     styler.StartSegment(startPos);
10 skipped lines
82 92         }
83 93  
84 94         if (state == SCE_LISP_DEFAULT) {
  95         if (ch == '#') {
  96         styler.ColourTo(i - 1, state);
  97         radix = -1;
  98         state = SCE_LISP_MACRO_DISPATCH;
85         if (isLispwordstart(ch)) { 99         } else if (isLispwordstart(ch)) {
86 100         styler.ColourTo(i - 1, state);
87 101         state = SCE_LISP_IDENTIFIER;
88 102         }
4 skipped lines
93 107         else if (isLispoperator(ch) || ch=='\'') {
94 108         styler.ColourTo(i - 1, state);
95 109         styler.ColourTo(i, SCE_LISP_OPERATOR);
  110         if (ch=='\'' && isLispwordstart(chNext)) {
  111         state = SCE_LISP_SYMBOL;
  112         }
96 113         }
97 114         else if (ch == '\"') {
98 115         styler.ColourTo(i - 1, state);
99 116         state = SCE_LISP_STRING;
100 117         }
101         } else if (state == SCE_LISP_IDENTIFIER) { 118         } else if (state == SCE_LISP_IDENTIFIER || state == SCE_LISP_SYMBOL) {
102 119         if (!isLispwordstart(ch)) {
  120         if (state == SCE_LISP_IDENTIFIER) {
103         classifyWordLisp(styler.GetStartSegment(), i - 1, keywords, styler); 121         classifyWordLisp(styler.GetStartSegment(), i - 1, keywords, keywords_kw, styler);
  122         } else {
  123         styler.ColourTo(i - 1, state);
  124         }
104 125         state = SCE_LISP_DEFAULT;
105 126         } /*else*/
106 127         if (isLispoperator(ch) || ch=='\'') {
107 128         styler.ColourTo(i - 1, state);
108 129         styler.ColourTo(i, SCE_LISP_OPERATOR);
  130         if (ch=='\'' && isLispwordstart(chNext)) {
  131         state = SCE_LISP_SYMBOL;
  132         }
  133         }
  134         } else if (state == SCE_LISP_MACRO_DISPATCH) {
55 skipped lines
  190         styler.ColourTo(i - 1, state);
  191         styler.ColourTo(i, SCE_LISP_OPERATOR);
  192         if (ch=='\'' && isLispwordstart(chNext)) {
  193         state = SCE_LISP_SYMBOL;
  194         }
109 195         }
110    
111 196         } else {
112 197         if (state == SCE_LISP_COMMENT) {
113 198         if (atEOL) {
114 199         styler.ColourTo(i - 1, state);
115 200         state = SCE_LISP_DEFAULT;
116 201         }
  202         } else if (state == SCE_LISP_MULTI_COMMENT) {
  203         if (ch == '|' && chNext == '#') {
  204         i++;
  205         chNext = styler.SafeGetCharAt(i + 1);
  206         styler.ColourTo(i, state);
  207         state = SCE_LISP_DEFAULT;
  208         }
117 209         } else if (state == SCE_LISP_STRING) {
118 210         if (ch == '\\') {
119 211         if (chNext == '\"' || chNext == '\'' || chNext == '\\') {
55 skipped lines
175 267 }
176 268  
177 269 static const char * const lispWordListDesc[] = {
  270     "Functions and special operators",
178 271     "Keywords",
179 272     0
180 273 };
3 skipped lines

   Text comparison Options  

Syntax colouring language used: C / C++
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  

Unchanged lineExample of unchanged line
Modified lineExample of modified line
Added lineExample of added line
Removed lineExample of removed line
Ignored lineExample of ignored line

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