VirtualBox

source: vbox/trunk/src/VBox/VMM/testcase/tstAsmStructsAsm-lst.sed@ 1526

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
8s/ *[0-9]* //
9/^ *$/d
10s/ *$//g
11s/^ *//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
21b error
22
23
24#
25# Struct start / end.
26#
27:struct
28s/:$//
29h
30s/^/global /
31s/$/ ; struct/
32b end
33
34
35#
36# Struct member
37# Note: the 't' command doesn't seem to be working right with 's'.
38#
39:member
40s/[0-9a-fA-Z]* *//
41s/<gap> *//
42/^\.[a-zA-Z0-9_.]*[:]* .*$/!t error
43s/\(\.[a-zA-Z0-9_]*\)[:]* .*$/\1 /
44G
45s/^\([^ ]*\) \(.*\)$/global \2\1 ; member/
46s/\n//m
47
48b end
49
50:error
51s/^/\nSed script logic error!\nBuffer: /
52s/$/\nHold: /
53G
54q 1
55b end
56
57
58:end
59
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette