Ignore:
Timestamp:
2008-08-17T16:04:25+02:00 (6 years ago)
Author:
moo
Message:

add id/name in comment to make it more readable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mkopcode_spec.awk

    r522 r564  
    1010/OPDEF/ { 
    1111    if (started) { 
    12         sub(/".*"/, "") 
    1312        if (!match($0, /EXT_([^ |]+).*OP[1S]_([^ |]+).*OP2_([^ |]+).*RES_([^ |)]+).*/, array)) { 
    1413            print "error" $0 
    1514            exit 
    1615        } 
    17         comment = ""; 
    18         if (match($0, /\/\* (\d+) \*\//, comments)) { 
    19             comment = comments[1]; 
     16        id = ""; 
     17        if (match($0, /\/\* *([0-9]+) *\*\//, m)) { 
     18            id = m[1]; 
    2019        } 
    21         printf "\tOPSPEC(%10s, %10s, %10s, %10s)%s\n", array[1], array[2], array[3], array[4], comment; 
     20        name = ""; 
     21        if (match($0, /"([^"]+)"/, m)) { 
     22            name = m[1]; 
     23        } 
     24        printf "\tOPSPEC(%10s, %10s, %10s, %10s) /* %s %s */\n", array[1], array[2], array[3], array[4], id, name; 
    2225        next 
    2326    } 
Note: See TracChangeset for help on using the changeset viewer.