Last change
on this file since 1526 was 1526, checked in by vboxsync, 18 years ago |
Make the asm struc testcase work with yasm 0.6.
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Id
|
File size:
731 bytes
|
Line | |
---|
1 | #
|
---|
2 | # Strip stuff lines and spaces we don't care about.
|
---|
3 | #
|
---|
4 | / %line /d
|
---|
5 | /\[section /d
|
---|
6 | /\[absolute /d
|
---|
7 | / times /d
|
---|
8 | s/ *[0-9]* //
|
---|
9 | /^ *$/d
|
---|
10 | s/ *$//g
|
---|
11 | s/^ *//g
|
---|
12 | /^\.text$/d
|
---|
13 | /^\.data$/d
|
---|
14 | /^\.bss$/d
|
---|
15 |
|
---|
16 | #
|
---|
17 | # Figure which type of line this is and process it accordingly.
|
---|
18 | #
|
---|
19 | /^[A-Za-z][A-Za-z0-9_]*:/b struct
|
---|
20 | /<gap>/b member
|
---|
21 | b error
|
---|
22 |
|
---|
23 |
|
---|
24 | #
|
---|
25 | # Struct start / end.
|
---|
26 | #
|
---|
27 | :struct
|
---|
28 | s/:$//
|
---|
29 | h
|
---|
30 | s/^/global /
|
---|
31 | s/$/ ; struct/
|
---|
32 | b end
|
---|
33 |
|
---|
34 |
|
---|
35 | #
|
---|
36 | # Struct member
|
---|
37 | # Note: the 't' command doesn't seem to be working right with 's'.
|
---|
38 | #
|
---|
39 | :member
|
---|
40 | s/[0-9a-fA-Z]* *//
|
---|
41 | s/<gap> *//
|
---|
42 | /^\.[a-zA-Z0-9_.]*[:]* .*$/!t error
|
---|
43 | s/\(\.[a-zA-Z0-9_]*\)[:]* .*$/\1 /
|
---|
44 | G
|
---|
45 | s/^\([^ ]*\) \(.*\)$/global \2\1 ; member/
|
---|
46 | s/\n//m
|
---|
47 |
|
---|
48 | b end
|
---|
49 |
|
---|
50 | :error
|
---|
51 | s/^/\nSed script logic error!\nBuffer: /
|
---|
52 | s/$/\nHold: /
|
---|
53 | G
|
---|
54 | q 1
|
---|
55 | b end
|
---|
56 |
|
---|
57 |
|
---|
58 | :end
|
---|
59 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.