Show
Ignore:
Timestamp:
08/28/08 07:42:22 (4 months ago)
Author:
Chuck.Esterbrook
Message:

Code cleanup.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cobra/trunk/Source/Tokenizer.cobra

    r1574 r1605  
    441441                """ 
    442442                tokens = List<of IToken>() 
    443                 start = DateTime.now 
     443#               start = DateTime.now 
    444444                while true 
    445445                        t = .nextToken 
     
    447447                        else, break 
    448448                # determine timings for various Tokenizer lexing changes 
    449                 if false  # CC: can use /# ... #/ in the future 
    450                         duration = DateTime.now.subtract(start) 
    451                         if  tokens.count > 100 and duration > TimeSpan(0) 
    452                                 ticksPerToken = (duration.ticks to int) / tokens.count 
    453                                 ticksPerTokenMS = ticksPerToken / 10_000 
    454                                 fileName = _fileName 
    455                                 if fileName.startsWith('('), fileName = '(None)' 
    456                                 else, fileName = Path.getFileName(fileName) 
    457                                 print '[fileName.padRight(20)]\t[duration]\t[tokens.count]\t' stop 
    458                                 print ' [ticksPerTokenMS:N3] ms/Token av ([ticksPerTokenMS/1000:N3]sec)' 
     449/# 
     450                duration = DateTime.now.subtract(start) 
     451                if  tokens.count > 100 and duration > TimeSpan(0) 
     452                        ticksPerToken = (duration.ticks to int) / tokens.count 
     453                        ticksPerTokenMS = ticksPerToken / 10_000 
     454                        fileName = _fileName 
     455                        if fileName.startsWith('('), fileName = '(None)' 
     456                        else, fileName = Path.getFileName(fileName) 
     457                        print '[fileName.padRight(20)]\t[duration]\t[tokens.count]\t' stop 
     458                        print ' [ticksPerTokenMS:N3] ms/Token av ([ticksPerTokenMS/1000:N3]sec)' 
     459#/ 
    459460                return tokens 
    460461 
     
    940941                return t 
    941942 
    942         # CC: get firstChars from var is override 
    943         get firstChars as List<of char> is override 
    944                 return _firstChars 
    945  
    946         # CC: get length from var is override 
    947         get length as int is override 
    948                 return _length 
     943        get firstChars from var is override 
     944 
     945        get length from var is override 
    949946         
    950947        get regExSource from var