Skip to content

Commit 3bcef4c

Browse files
Knut Anders Hatlentrondn
Knut Anders Hatlen
authored andcommitted
Expanded tabs to spaces in *.lex
1 parent cb491d2 commit 3bcef4c

20 files changed

+794
-794
lines changed

src/org/opensolaris/opengrok/analysis/c/CSymbolTokenizer.lex

+17-17
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ return false;
4343

4444
%{
4545
public void reInit(char[] buf, int len) {
46-
yyreset((Reader) null);
47-
zzBuffer = buf;
48-
zzEndRead = len;
49-
zzAtEOF = true;
50-
zzStartRead = 0;
46+
yyreset((Reader) null);
47+
zzBuffer = buf;
48+
zzEndRead = len;
49+
zzAtEOF = true;
50+
zzStartRead = 0;
5151
}
5252

5353
@Override
5454
public void close() throws IOException {
55-
yyclose();
55+
yyclose();
5656
}
5757
%}
5858

@@ -64,34 +64,34 @@ Identifier = [a-zA-Z_] [a-zA-Z0-9_]*
6464

6565
<YYINITIAL> {
6666
{Identifier} {String id = yytext();
67-
if(!Consts.kwd.contains(id)) {
67+
if(!Consts.kwd.contains(id)) {
6868
setAttribs(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead, zzStartRead, zzMarkedPos);
6969
return true; }
7070
}
71-
\" { yybegin(STRING); }
72-
\' { yybegin(QSTRING); }
73-
"/*" { yybegin(COMMENT); }
74-
"//" { yybegin(SCOMMENT); }
71+
\" { yybegin(STRING); }
72+
\' { yybegin(QSTRING); }
73+
"/*" { yybegin(COMMENT); }
74+
"//" { yybegin(SCOMMENT); }
7575
}
7676

7777
<STRING> {
78-
\" { yybegin(YYINITIAL); }
79-
\\\\ | \\\" {}
78+
\" { yybegin(YYINITIAL); }
79+
\\\\ | \\\" {}
8080
}
8181

8282
<QSTRING> {
83-
\' { yybegin(YYINITIAL); }
83+
\' { yybegin(YYINITIAL); }
8484
}
8585

8686
<COMMENT> {
87-
"*/" { yybegin(YYINITIAL);}
87+
"*/" { yybegin(YYINITIAL);}
8888
}
8989

9090
<SCOMMENT> {
91-
\n { yybegin(YYINITIAL);}
91+
\n { yybegin(YYINITIAL);}
9292
}
9393

9494
<YYINITIAL, STRING, COMMENT, SCOMMENT, QSTRING> {
9595
<<EOF>> { return false;}
96-
.|\n {}
96+
.|\n {}
9797
}

src/org/opensolaris/opengrok/analysis/c/CXref.lex

+59-59
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,20 @@ import org.opensolaris.opengrok.web.Util;
4343
%line
4444
%{
4545
public void reInit(char[] buf, int len) {
46-
yyreset((Reader) null);
47-
zzBuffer = buf;
48-
zzEndRead = len;
49-
zzAtEOF = true;
50-
zzStartRead = 0;
51-
annotation = null;
46+
yyreset((Reader) null);
47+
zzBuffer = buf;
48+
zzEndRead = len;
49+
zzAtEOF = true;
50+
zzStartRead = 0;
51+
annotation = null;
5252
}
5353

5454
public void write(Writer out) throws IOException {
55-
this.out = out;
55+
this.out = out;
5656
Util.readableLine(1, out, annotation);
57-
yyline = 2;
58-
while(yylex() != YYEOF) {
59-
}
57+
yyline = 2;
58+
while(yylex() != YYEOF) {
59+
}
6060
}
6161
%}
6262

@@ -82,98 +82,98 @@ Number = ([0-9][0-9]*|[0-9]+.[0-9]+|"0x" [0-9a-fA-F]+ )([udl]+)?
8282
}
8383

8484
"<" {File} ">" {out.write("&lt;");
85-
out.write("<a href=\""+urlPrefix+"path=");
86-
out.write(zzBuffer, zzStartRead+1, zzMarkedPos-zzStartRead-2);
85+
out.write("<a href=\""+urlPrefix+"path=");
86+
out.write(zzBuffer, zzStartRead+1, zzMarkedPos-zzStartRead-2);
8787
appendProject();
8888
out.write("\">");
89-
out.write(zzBuffer, zzStartRead+1, zzMarkedPos-zzStartRead-2);
89+
out.write(zzBuffer, zzStartRead+1, zzMarkedPos-zzStartRead-2);
9090
out.write("</a>");
91-
out.write("&gt;");}
91+
out.write("&gt;");}
9292

9393
"<" {Path} ">" {out.write("&lt;");
94-
out.write("<a href=\""+urlPrefix+"path=");
95-
out.write(zzBuffer, zzStartRead+1, zzMarkedPos-zzStartRead-2);
94+
out.write("<a href=\""+urlPrefix+"path=");
95+
out.write(zzBuffer, zzStartRead+1, zzMarkedPos-zzStartRead-2);
9696
appendProject();
9797
out.write("\">");
98-
out.write(zzBuffer, zzStartRead+1, zzMarkedPos-zzStartRead-2);
98+
out.write(zzBuffer, zzStartRead+1, zzMarkedPos-zzStartRead-2);
9999
out.write("</a>");
100-
out.write("&gt;");}
100+
out.write("&gt;");}
101101

102-
/*{Hier}
103-
{ out.write(Util.breadcrumbPath(urlPrefix+"defs=",yytext(),'.'));}
102+
/*{Hier}
103+
{ out.write(Util.breadcrumbPath(urlPrefix+"defs=",yytext(),'.'));}
104104
*/
105-
{Number} { out.write("<span class=\"n\">"); out.write(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead); out.write("</span>"); }
105+
{Number} { out.write("<span class=\"n\">"); out.write(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead); out.write("</span>"); }
106106

107-
\" { yybegin(STRING);out.write("<span class=\"s\">\"");}
108-
\' { yybegin(QSTRING);out.write("<span class=\"s\">\'");}
109-
"/*" { yybegin(COMMENT);out.write("<span class=\"c\">/*");}
110-
"//" { yybegin(SCOMMENT);out.write("<span class=\"c\">//");}
107+
\" { yybegin(STRING);out.write("<span class=\"s\">\"");}
108+
\' { yybegin(QSTRING);out.write("<span class=\"s\">\'");}
109+
"/*" { yybegin(COMMENT);out.write("<span class=\"c\">/*");}
110+
"//" { yybegin(SCOMMENT);out.write("<span class=\"c\">//");}
111111
}
112112

113113
<STRING> {
114114
\" {WhiteSpace} \" { out.write(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);}
115-
\" { yybegin(YYINITIAL); out.write("\"</span>"); }
116-
\\\\ { out.write("\\\\"); }
117-
\\\" { out.write("\\\""); }
115+
\" { yybegin(YYINITIAL); out.write("\"</span>"); }
116+
\\\\ { out.write("\\\\"); }
117+
\\\" { out.write("\\\""); }
118118
}
119119

120120
<QSTRING> {
121121
"\\\\" { out.write("\\\\"); }
122122
"\\'" { out.write("\\\'"); }
123123
\' {WhiteSpace} \' { out.write(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead); }
124-
\' { yybegin(YYINITIAL); out.write("'</span>"); }
124+
\' { yybegin(YYINITIAL); out.write("'</span>"); }
125125
}
126126

127127
<COMMENT> {
128-
"*/" { yybegin(YYINITIAL); out.write("*/</span>"); }
128+
"*/" { yybegin(YYINITIAL); out.write("*/</span>"); }
129129
}
130130

131131
<SCOMMENT> {
132-
{WhiteSpace}*{EOL} { yybegin(YYINITIAL); out.write("</span>");
132+
{WhiteSpace}*{EOL} { yybegin(YYINITIAL); out.write("</span>");
133133
Util.readableLine(yyline, out, annotation);}
134134
}
135135

136136

137137
<YYINITIAL, STRING, COMMENT, SCOMMENT, QSTRING> {
138-
"&" {out.write( "&amp;");}
139-
"<" {out.write( "&lt;");}
140-
">" {out.write( "&gt;");}
141-
{WhiteSpace}*{EOL} { Util.readableLine(yyline, out, annotation); }
142-
{WhiteSpace} { out.write(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead); }
143-
[!-~] { out.write(yycharat(0)); }
144-
. { writeUnicodeChar(yycharat(0)); }
138+
"&" {out.write( "&amp;");}
139+
"<" {out.write( "&lt;");}
140+
">" {out.write( "&gt;");}
141+
{WhiteSpace}*{EOL} { Util.readableLine(yyline, out, annotation); }
142+
{WhiteSpace} { out.write(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead); }
143+
[!-~] { out.write(yycharat(0)); }
144+
. { writeUnicodeChar(yycharat(0)); }
145145
}
146146

147147
<STRING, COMMENT, SCOMMENT, STRING, QSTRING> {
148148
{Path}
149-
{ out.write(Util.breadcrumbPath(urlPrefix+"path=",yytext(),'/'));}
149+
{ out.write(Util.breadcrumbPath(urlPrefix+"path=",yytext(),'/'));}
150150

151151
{File}
152-
{
153-
out.write("<a href=\""+urlPrefix+"path=");
154-
out.write(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);
152+
{
153+
out.write("<a href=\""+urlPrefix+"path=");
154+
out.write(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);
155155
appendProject();
156156
out.write("\">");
157-
out.write(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);
157+
out.write(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);
158158
out.write("</a>");}
159159

160160
("http" | "https" | "ftp" ) "://" ({FNameChar}|{URIChar})+[a-zA-Z0-9/]
161-
{
162-
out.write("<a href=\"");
163-
out.write(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);out.write("\">");
164-
out.write(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);out.write("</a>");}
161+
{
162+
out.write("<a href=\"");
163+
out.write(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);out.write("\">");
164+
out.write(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);out.write("</a>");}
165165

166166
{FNameChar}+ "@" {FNameChar}+ "." {FNameChar}+
167-
{
168-
for(int mi = zzStartRead; mi < zzMarkedPos; mi++) {
169-
if(zzBuffer[mi] != '@') {
170-
out.write(zzBuffer[mi]);
171-
} else {
172-
out.write(" (at) ");
173-
}
174-
}
175-
//out.write("<a href=\"mailto:");
176-
//out.write(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);out.write("\">");
177-
//out.write(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);out.write("</a>");
178-
}
167+
{
168+
for(int mi = zzStartRead; mi < zzMarkedPos; mi++) {
169+
if(zzBuffer[mi] != '@') {
170+
out.write(zzBuffer[mi]);
171+
} else {
172+
out.write(" (at) ");
173+
}
174+
}
175+
//out.write("<a href=\"mailto:");
176+
//out.write(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);out.write("\">");
177+
//out.write(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);out.write("</a>");
178+
}
179179
}

src/org/opensolaris/opengrok/analysis/c/CxxSymbolTokenizer.lex

+17-17
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ return false;
4040

4141
%{
4242
public void reInit(char[] buf, int len) {
43-
yyreset((Reader) null);
44-
zzBuffer = buf;
45-
zzEndRead = len;
46-
zzAtEOF = true;
47-
zzStartRead = 0;
43+
yyreset((Reader) null);
44+
zzBuffer = buf;
45+
zzEndRead = len;
46+
zzAtEOF = true;
47+
zzStartRead = 0;
4848
}
4949

5050
@Override
5151
public void close() throws IOException {
52-
yyclose();
52+
yyclose();
5353
}
5454
%}
5555

@@ -61,34 +61,34 @@ Identifier = [a-zA-Z_] [a-zA-Z0-9_]*
6161

6262
<YYINITIAL> {
6363
{Identifier} {String id = yytext();
64-
if(!CxxConsts.kwd.contains(id)) {
64+
if(!CxxConsts.kwd.contains(id)) {
6565
setAttribs(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead, zzStartRead, zzMarkedPos);
6666
return true; }
6767
}
68-
\" { yybegin(STRING); }
69-
\' { yybegin(QSTRING); }
70-
"/*" { yybegin(COMMENT); }
71-
"//" { yybegin(SCOMMENT); }
68+
\" { yybegin(STRING); }
69+
\' { yybegin(QSTRING); }
70+
"/*" { yybegin(COMMENT); }
71+
"//" { yybegin(SCOMMENT); }
7272
}
7373

7474
<STRING> {
75-
\" { yybegin(YYINITIAL); }
76-
\\\\ | \\\" {}
75+
\" { yybegin(YYINITIAL); }
76+
\\\\ | \\\" {}
7777
}
7878

7979
<QSTRING> {
80-
\' { yybegin(YYINITIAL); }
80+
\' { yybegin(YYINITIAL); }
8181
}
8282

8383
<COMMENT> {
84-
"*/" { yybegin(YYINITIAL);}
84+
"*/" { yybegin(YYINITIAL);}
8585
}
8686

8787
<SCOMMENT> {
88-
\n { yybegin(YYINITIAL);}
88+
\n { yybegin(YYINITIAL);}
8989
}
9090

9191
<YYINITIAL, STRING, COMMENT, SCOMMENT, QSTRING> {
9292
<<EOF>> { return false;}
93-
.|\n {}
93+
.|\n {}
9494
}

0 commit comments

Comments
 (0)