html.py (6657:ef5fae93a3b2) html.py (7007:79413d1ec307)
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 15 unchanged lines hidden (view full) ---

24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28from m5.util.code_formatter import code_formatter
29
30def createSymbol(symbol, title):
31 code = code_formatter()
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 15 unchanged lines hidden (view full) ---

24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28from m5.util.code_formatter import code_formatter
29
30def createSymbol(symbol, title):
31 code = code_formatter()
32 code('''<HTML><BODY><BIG>
33$title:
34${{formatShorthand(symbol.short)}} - ${{symbol.desc}}</BIG></BODY></HTML>''')
32 code('''
33<HTML><BODY><BIG>
34$title: ${{formatShorthand(symbol.short)}} - ${{symbol.desc}}
35</BIG></BODY></HTML>
36''')
35 return code
36
37def formatShorthand(short):
38 munged_shorthand = ""
39 mode_is_normal = True
40
41 # -- Walk over the string, processing superscript directives
42 gen = enumerate(short)

--- 38 unchanged lines hidden ---
37 return code
38
39def formatShorthand(short):
40 munged_shorthand = ""
41 mode_is_normal = True
42
43 # -- Walk over the string, processing superscript directives
44 gen = enumerate(short)

--- 38 unchanged lines hidden ---