comparison trunk/src/html_map.d @ 759:9c47f377ca0b

Revised module cmd.Generate. Added class TagMapLoader. Fixed StringExpression.getString() and related code in the Parser. Added options 'xml_map' and 'html_map' to config.d
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Fri, 15 Feb 2008 02:07:53 +0100
parents
children ea9e8b141742
comparison
equal deleted inserted replaced
758:f4b9680c0e16 759:9c47f377ca0b
1 /// A map of document elements and D tokens to format strings.
2 string[string] map = [
3 "DocHead" : `<html>`\n
4 `<head>`\n
5 ` <meta http-equiv="Content-Type" content="text/html; charset=utf-8">`\n
6 ` <link href="html.css" rel="stylesheet" type="text/css">`\n
7 `</head>`\n
8 `<body>`\n,
9 "DocEnd" : "\n</body>"
10 "\n</html>",
11 "SourceBegin" : `<pre class="sourcecode">`,
12 "SourceEnd" : "\n</pre>",
13 "CompBegin" : `<div class="compilerinfo">`\n,
14 "CompEnd" : "</div>\n",
15 "LexerError" : `<p class="error L">{0}({1},{2})L: {3}</p>`\n,
16 "ParserError" : `<p class="error P">{0}({1},{2})P: {3}</p>`\n,
17
18 // Node categories:
19 "Declaration" : "d",
20 "Statement" : "s",
21 "Expression" : "e",
22 "Type" : "t",
23 "Other" : "o",
24
25 // {0} = node category.
26 // {1} = node class name: "Call", "If", "Class" etc.
27 // E.g.: <span class="d Struct">...</d>
28 "NodeBegin" : `<span class="{0} {1}">`,
29 "NodeEnd" : `</span>`,
30
31 "Identifier" : `<span class="i">{0}</span>`,
32 "String" : `<span class="sl">{0}</span>`,
33 "Char" : `<span class="cl">{0}</span>`,
34 "Number" : `<span class="n">{0}</span>`,
35 "Keyword" : `<span class="k">{0}</span>`,
36
37 "LineC" : `<span class="lc">{0}</span>`,
38 "BlockC" : `<span class="bc">{0}</span>`,
39 "NestedC" : `<span class="nc">{0}</span>`,
40
41 "Shebang" : `<span class="shebang">{0}</span>`,
42 "HLine" : `<span class="hl">{0}</span>`, // #line
43 "Filespec" : `<span class="fs">{0}</span>`, // #line N "filespec"
44 "Newline" : "{0}", // \n | \r | \r\n | LS | PS
45 "Illegal" : `<span class="ill">{0}</span>`, // A character not recognized by the lexer.
46
47 "SpecialToken" : `<span class="st">{0}</span>`, // __FILE__, __LINE__ etc.
48
49 "(" : "<br>(</br>",
50 ")" : "<br>)</br>",
51 "[" : "<br>[</br>",
52 "]" : "<br>]</br>",
53 "{" : "<br>{</br>",
54 "}" : "<br>}</br>",
55 "." : ".",
56 ".." : "..",
57 "..." : "...",
58 "!<>=" : "!&lt;&gt;=", // Unordered
59 "!<>" : "!&lt;&gt;", // UorE
60 "!<=" : "!&lt;=", // UorG
61 "!<" : "!&lt;", // UorGorE
62 "!>=" : "!&gt;=", // UorL
63 "!>" : "!&gt;", // UorLorE
64 "<>=" : "&lt;&gt;=", // LorEorG
65 "<>" : "&lt;&gt;", // LorG
66 "=" : "=",
67 "==" : "==",
68 "!" : "!",
69 "!=" : "!=",
70 "<=" : "&lt;=",
71 "<" : "&lt;",
72 ">=" : "&gt;=",
73 ">" : "&gt;",
74 "<<=" : "&lt;&lt;=",
75 "<<" : "&lt;&lt;",
76 ">>=" : "&gt;&gt;=",
77 ">>" : "&gt;&gt;",
78 ">>>=" : "&gt;&gt;&gt;=",
79 ">>>" : "&gt;&gt;&gt;",
80 "|" : "|",
81 "||" : "||",
82 "|=" : "|=",
83 "&" : "&amp;",
84 "&&" : "&amp;&amp;",
85 "&=" : "&amp;=",
86 "+" : "+",
87 "++" : "++",
88 "+=" : "+=",
89 "-" : "-",
90 "--" : "--",
91 "-=" : "-=",
92 "/" : "/",
93 "/=" : "/=",
94 "*" : "*",
95 "*=" : "*=",
96 "%" : "%",
97 "%=" : "%=",
98 "^" : "^",
99 "^=" : "^=",
100 "~" : "~",
101 "~=" : "~=",
102 ":" : ":",
103 ";" : ";",
104 "?" : "?",
105 "," : ",",
106 "$" : "$",
107 "EOF" : ""
108 ];