Changeset 626 in svn for branches/1.3/mkopcode_spec.awk


Ignore:
Timestamp:
2009-07-05T11:15:55+02:00 (6 years ago)
Author:
Xuefer
Message:

merged r562-572 from trunk

Location:
branches/1.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3

  • branches/1.3/mkopcode_spec.awk

    r623 r626  
    1010/OPDEF/ {
    1111    if (started) {
    12         sub(/".*"/, "")
     12        name = "";
     13        if (match($0, /"([^"]+)"/, m)) {
     14            name = m[1];
     15        }
     16        sub(/"[^"]*"/, "");
    1317        if (!match($0, /EXT_([^ |]+).*OP[1S]_([^ |]+).*OP2_([^ |]+).*RES_([^ |)]+).*/, array)) {
    1418            print "error" $0
    1519            exit
    1620        }
    17         comment = "";
    18         if (match($0, /\/\* (\d+) \*\//, comments)) {
    19             comment = comments[1];
     21        id = "";
     22        if (match($0, /\/\* *([0-9]+) *\*\//, comments)) {
     23            id = comments[1];
    2024        }
    21         printf "\tOPSPEC(%10s, %10s, %10s, %10s)%s\n", array[1], array[2], array[3], array[4], comment;
     25        printf "\tOPSPEC(%10s, %10s, %10s, %10s) /* %s %-30s */\n", array[1], array[2], array[3], array[4], id, name;
    2226        next
    2327    }
Note: See TracChangeset for help on using the changeset viewer.