Changeset 166


Ignore:
Timestamp:
10/14/09 17:09:18 (11 years ago)
Author:
marcus
Message:
  • improved command detection with contain colons
  • list of commands sorted by their's commonness
Location:
SHX/trunk/src/sandbox
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • SHX/trunk/src/sandbox/scanshc.py

    r165 r166  
    3434            line = line.strip(" @").strip().lower() 
    3535 
    36             # skip all comments, commands from variables, concatenated commands, abandoned commands, empty lines 
     36            # skip all comments, commands from variables, concatenated commands, empty lines 
    3737            if line.startswith("!") or \ 
    3838               line.startswith("#") or \ 
     
    4040               line.startswith('"') or \ 
    4141               line.startswith('|') or \ 
    42                ":" in line or \ 
    4342               not line: 
    4443                continue 
     
    4746            cmd = re.split(regex, line)[0] 
    4847 
    49             # skip plain goto targets 
    50             if cmd.endswith(":"): 
     48            # skip goto targets and abandoned commands (they may contain an colon) 
     49            if ":" in cmd: 
    5150                continue 
    5251 
Note: See TracChangeset for help on using the changeset viewer.