- Timestamp:
- 01/28/14 17:09:30 (11 years ago)
- Location:
- branches/HeuristicLab.Problems.GPDL
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL/3.4/GPDef.atg
r10067 r10412 37 37 ident = letter {letter | digit} . 38 38 39 COMMENTS 40 FROM "/*" TO "*/" NESTED 39 COMMENTS FROM "/*" TO "*/" NESTED 40 COMMENTS FROM "//" TO "\r" 41 41 42 42 IGNORE '\t' + '\r' + '\n' -
branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL/3.4/Scanner.cs
r10067 r10412 300 300 int level = 1, pos0 = pos, line0 = line, col0 = col, charPos0 = charPos; 301 301 NextCh(); 302 if (ch == '/') { 303 NextCh(); 304 for(;;) { 305 if (ch == 13) { 306 level--; 307 if (level == 0) { oldEols = line - line0; NextCh(); return true; } 308 NextCh(); 309 } else if (ch == Buffer.EOF) return false; 310 else NextCh(); 311 } 312 } else { 313 buffer.Pos = pos0; NextCh(); line = line0; col = col0; charPos = charPos0; 314 } 315 return false; 316 } 317 318 bool Comment1() { 319 int level = 1, pos0 = pos, line0 = line, col0 = col, charPos0 = charPos; 320 NextCh(); 302 321 if (ch == '*') { 303 322 NextCh(); … … 350 369 ch >= 9 && ch <= 10 || ch == 13 351 370 ) NextCh(); 352 if (ch == '/' && Comment0() ) return NextToken();371 if (ch == '/' && Comment0() ||ch == '/' && Comment1()) return NextToken(); 353 372 int recKind = noSym; 354 373 int recEnd = pos; -
branches/HeuristicLab.Problems.GPDL/SyntaxAnalyzer/GPDef.atg
r9842 r10412 29 29 ident = letter {letter | digit} . 30 30 31 COMMENTS 32 FROM "/*" TO "*/" NESTED 31 COMMENTS FROM "/*" TO "*/" NESTED 32 COMMENTS FROM "//" TO "\r" 33 33 34 34 IGNORE '\t' + '\r' + '\n' -
branches/HeuristicLab.Problems.GPDL/SyntaxAnalyzer/Scanner.cs
r10067 r10412 306 306 int level = 1, pos0 = pos, line0 = line, col0 = col, charPos0 = charPos; 307 307 NextCh(); 308 if (ch == '/') { 309 NextCh(); 310 for(;;) { 311 if (ch == 13) { 312 level--; 313 if (level == 0) { oldEols = line - line0; NextCh(); return true; } 314 NextCh(); 315 } else if (ch == Buffer.EOF) return false; 316 else NextCh(); 317 } 318 } else { 319 buffer.Pos = pos0; NextCh(); line = line0; col = col0; charPos = charPos0; 320 } 321 return false; 322 } 323 324 bool Comment1() { 325 int level = 1, pos0 = pos, line0 = line, col0 = col, charPos0 = charPos; 326 NextCh(); 308 327 if (ch == '*') { 309 328 NextCh(); … … 357 376 ch >= 9 && ch <= 10 || ch == 13 358 377 ) NextCh(); 359 if (ch == '/' && Comment0() ) return NextToken();378 if (ch == '/' && Comment0() ||ch == '/' && Comment1()) return NextToken(); 360 379 int recKind = noSym; 361 380 int recEnd = pos; -
branches/HeuristicLab.Problems.GPDL/SyntaxAnalyzer/SyntaxAnalyzer.csproj
r10065 r10412 62 62 </PreBuildEvent> 63 63 </PropertyGroup> 64 <PropertyGroup> 65 <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir) 66 set ProjectDir=$(ProjectDir) 67 set SolutionDir=$(SolutionDir) 68 69 call GenerateFromAtg.cmd 70 </PreBuildEvent> 71 </PropertyGroup> 64 72 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 65 73 Other similar extension points exist, see Microsoft.Common.targets.
Note: See TracChangeset
for help on using the changeset viewer.