mirah 0.0.7-java → 0.0.8-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. data/History.txt +181 -0
  2. data/README.txt +6 -10
  3. data/Rakefile +86 -9
  4. data/bin/mirah +2 -0
  5. data/bin/mirahc +2 -0
  6. data/bin/mirahp +2 -0
  7. data/{bin/dubyp → examples/interfaces.mirah} +16 -9
  8. data/examples/macros/square.mirah +12 -0
  9. data/examples/macros/square_int.mirah +12 -0
  10. data/examples/macros/string-each-char.mirah +14 -0
  11. data/examples/maven/README.txt +2 -0
  12. data/examples/maven/pom.xml +23 -0
  13. data/examples/maven/src/main/mirah/hello_mirah.mirah +9 -0
  14. data/examples/rosettacode/100-doors.mirah +44 -0
  15. data/examples/rosettacode/99-bottles-of-beer.mirah +13 -0
  16. data/examples/rosettacode/README.txt +9 -0
  17. data/examples/rosettacode/boolean-values.mirah +29 -0
  18. data/examples/rosettacode/comments.mirah +2 -0
  19. data/examples/rosettacode/copy-a-string.mirah +10 -0
  20. data/examples/rosettacode/count-occurrences-of-a-substring.mirah +40 -0
  21. data/examples/rosettacode/create-a-file.mirah +6 -0
  22. data/examples/rosettacode/empty-string.mirah +9 -0
  23. data/examples/rosettacode/factorial.mirah +10 -0
  24. data/examples/rosettacode/fibonacci.mirah +21 -0
  25. data/examples/rosettacode/file-size.mirah +5 -0
  26. data/examples/rosettacode/fizz-buzz.mirah +21 -0
  27. data/examples/rosettacode/flatten-a-list.mirah +24 -0
  28. data/examples/rosettacode/guess-the-number.mirah +21 -0
  29. data/examples/rosettacode/is-string-numeric.mirah +127 -0
  30. data/examples/rosettacode/palindrome.mirah +14 -0
  31. data/examples/rosettacode/repeat-a-string.mirah +9 -0
  32. data/examples/rosettacode/reverse-a-string.mirah +6 -0
  33. data/examples/rosettacode/rot-13.mirah +20 -0
  34. data/examples/rosettacode/user-input.mirah +4 -0
  35. data/examples/sort_closure.mirah +1 -1
  36. data/javalib/dynalink-0.2.jar +0 -0
  37. data/javalib/mirah-bootstrap.jar +0 -0
  38. data/lib/mirah.rb +7 -16
  39. data/lib/mirah/ast.rb +22 -92
  40. data/lib/mirah/ast/call.rb +41 -9
  41. data/lib/mirah/ast/class.rb +34 -6
  42. data/lib/mirah/ast/flow.rb +17 -5
  43. data/lib/mirah/ast/intrinsics.rb +50 -8
  44. data/lib/mirah/ast/literal.rb +7 -0
  45. data/lib/mirah/ast/local.rb +9 -1
  46. data/lib/mirah/ast/method.rb +21 -8
  47. data/lib/mirah/ast/scope.rb +1 -1
  48. data/lib/mirah/ast/structure.rb +81 -15
  49. data/lib/mirah/ast/type.rb +4 -0
  50. data/{bin/dubyc → lib/mirah/commands.rb} +4 -11
  51. data/lib/mirah/commands/base.rb +54 -0
  52. data/lib/mirah/commands/compile.rb +39 -0
  53. data/{examples/wiki/Rakefile → lib/mirah/commands/parse.rb} +18 -17
  54. data/lib/mirah/commands/run.rb +73 -0
  55. data/lib/mirah/compiler.rb +37 -417
  56. data/lib/mirah/compiler/call.rb +45 -0
  57. data/lib/mirah/compiler/class.rb +81 -0
  58. data/lib/mirah/compiler/flow.rb +109 -0
  59. data/lib/mirah/compiler/literal.rb +130 -0
  60. data/lib/mirah/compiler/local.rb +59 -0
  61. data/lib/mirah/compiler/method.rb +44 -0
  62. data/lib/mirah/compiler/structure.rb +65 -0
  63. data/lib/mirah/compiler/type.rb +27 -0
  64. data/lib/mirah/env.rb +4 -6
  65. data/lib/mirah/generator.rb +61 -0
  66. data/lib/mirah/jvm/compiler.rb +8 -867
  67. data/lib/mirah/jvm/compiler/base.rb +270 -0
  68. data/lib/mirah/jvm/compiler/java_source.rb +779 -0
  69. data/lib/mirah/jvm/compiler/jvm_bytecode.rb +851 -0
  70. data/lib/mirah/jvm/method_lookup.rb +21 -2
  71. data/lib/mirah/jvm/source_generator/builder.rb +10 -13
  72. data/lib/mirah/jvm/source_generator/loops.rb +99 -93
  73. data/lib/mirah/jvm/source_generator/precompile.rb +3 -2
  74. data/lib/mirah/jvm/typer.rb +3 -3
  75. data/lib/mirah/jvm/types.rb +10 -426
  76. data/lib/mirah/jvm/types/array_type.rb +62 -0
  77. data/lib/mirah/jvm/types/basic_types.rb +1 -0
  78. data/lib/mirah/jvm/types/dynamic_type.rb +46 -0
  79. data/lib/mirah/jvm/types/factory.rb +23 -5
  80. data/lib/mirah/jvm/types/interface_definition.rb +20 -0
  81. data/lib/mirah/jvm/types/intrinsics.rb +15 -3
  82. data/lib/mirah/jvm/types/meta_type.rb +45 -0
  83. data/lib/mirah/jvm/types/methods.rb +12 -5
  84. data/lib/mirah/jvm/types/null_type.rb +27 -0
  85. data/lib/mirah/jvm/types/primitive_type.rb +38 -0
  86. data/lib/mirah/jvm/types/source_mirror.rb +266 -0
  87. data/lib/mirah/jvm/types/type.rb +173 -0
  88. data/lib/mirah/jvm/types/type_definition.rb +55 -0
  89. data/lib/mirah/jvm/types/unreachable_type.rb +27 -0
  90. data/lib/mirah/jvm/types/void_type.rb +19 -0
  91. data/lib/mirah/parser.rb +90 -0
  92. data/lib/mirah/plugin/gwt.rb +5 -5
  93. data/lib/mirah/plugin/java.rb +1 -1
  94. data/lib/mirah/transform.rb +4 -321
  95. data/lib/mirah/transform/ast_ext.rb +63 -0
  96. data/lib/mirah/transform/error.rb +13 -0
  97. data/lib/mirah/transform/helper.rb +761 -0
  98. data/lib/mirah/transform/transformer.rb +255 -0
  99. data/lib/mirah/typer.rb +2 -383
  100. data/{bin/duby → lib/mirah/typer/base.rb} +12 -10
  101. data/lib/mirah/typer/simple.rb +377 -0
  102. data/lib/mirah/util/argument_processor.rb +114 -0
  103. data/lib/mirah/util/class_loader.rb +37 -0
  104. data/lib/mirah/util/compilation_state.rb +51 -0
  105. data/lib/mirah/util/process_errors.rb +33 -0
  106. data/lib/mirah/version.rb +1 -1
  107. data/lib/mirah_task.rb +3 -2
  108. data/test/{test_ast.rb → core/test_ast.rb} +6 -0
  109. data/test/{test_compilation.rb → core/test_compilation.rb} +0 -0
  110. data/test/{test_env.rb → core/test_env.rb} +24 -25
  111. data/test/{test_macros.rb → core/test_macros.rb} +2 -4
  112. data/test/{test_typer.rb → core/test_typer.rb} +0 -3
  113. data/test/jvm/bytecode_test_helper.rb +181 -0
  114. data/test/{test_javac_compiler.rb → jvm/javac_test_helper.rb} +38 -22
  115. data/test/jvm/test_enumerable.rb +304 -0
  116. data/test/{test_java_typer.rb → jvm/test_java_typer.rb} +2 -4
  117. data/test/{test_jvm_compiler.rb → jvm/test_jvm_compiler.rb} +146 -443
  118. data/test/jvm/test_macros.rb +147 -0
  119. data/test/jvm/test_main_method.rb +15 -0
  120. data/test/{test_gwt.rb → plugins/test_gwt.rb} +0 -2
  121. metadata +103 -91
  122. data/bin/jrubyp +0 -52
  123. data/examples/wiki/src/org/mirah/wiki/MirahWiki.duby +0 -339
  124. data/examples/wiki/src/org/mirah/wiki/edit.eduby.html +0 -42
  125. data/examples/wiki/src/org/mirah/wiki/error.eduby.html +0 -2
  126. data/examples/wiki/src/org/mirah/wiki/layout.eduby.html +0 -69
  127. data/examples/wiki/src/org/mirah/wiki/parser.eduby.html +0 -7
  128. data/examples/wiki/src/org/mirah/wiki/view.eduby.html +0 -15
  129. data/examples/wiki/war/WEB-INF/classes/test/HeredocContext.class +0 -0
  130. data/examples/wiki/war/WEB-INF/classes/test/MirahParser.class +0 -0
  131. data/examples/wiki/war/WEB-INF/lib/appengine-api.jar +0 -0
  132. data/examples/wiki/war/WEB-INF/lib/dubydatastore.jar +0 -0
  133. data/examples/wiki/war/WEB-INF/lib/jmeta-runtime.jar +0 -0
  134. data/examples/wiki/war/WEB-INF/lib/pegdown-stubs.jar +0 -0
  135. data/examples/wiki/war/WEB-INF/pegdown.jar +0 -0
  136. data/examples/wiki/war/app.yaml +0 -21
  137. data/examples/wiki/war/public/favicon.ico +0 -0
  138. data/examples/wiki/war/public/images/appengine_duby.png +0 -0
  139. data/examples/wiki/war/public/images/back.gif +0 -0
  140. data/examples/wiki/war/public/images/dir.gif +0 -0
  141. data/examples/wiki/war/public/images/file.gif +0 -0
  142. data/examples/wiki/war/public/javascripts/prettify.js +0 -61
  143. data/examples/wiki/war/public/robots.txt +0 -0
  144. data/examples/wiki/war/public/stylesheets/main.css +0 -156
  145. data/examples/wiki/war/public/stylesheets/prettify.css +0 -1
  146. data/examples/wiki/war/public/stylesheets/sh_style.css +0 -66
  147. data/examples/wiki/war/public/stylesheets/source.css +0 -21
  148. data/examples/wiki/war/public/wmd/images/bg-fill.png +0 -0
  149. data/examples/wiki/war/public/wmd/images/bg.png +0 -0
  150. data/examples/wiki/war/public/wmd/images/blockquote.png +0 -0
  151. data/examples/wiki/war/public/wmd/images/bold.png +0 -0
  152. data/examples/wiki/war/public/wmd/images/code.png +0 -0
  153. data/examples/wiki/war/public/wmd/images/h1.png +0 -0
  154. data/examples/wiki/war/public/wmd/images/hr.png +0 -0
  155. data/examples/wiki/war/public/wmd/images/img.png +0 -0
  156. data/examples/wiki/war/public/wmd/images/italic.png +0 -0
  157. data/examples/wiki/war/public/wmd/images/link.png +0 -0
  158. data/examples/wiki/war/public/wmd/images/ol.png +0 -0
  159. data/examples/wiki/war/public/wmd/images/redo.png +0 -0
  160. data/examples/wiki/war/public/wmd/images/separator.png +0 -0
  161. data/examples/wiki/war/public/wmd/images/ul.png +0 -0
  162. data/examples/wiki/war/public/wmd/images/undo.png +0 -0
  163. data/examples/wiki/war/public/wmd/images/wmd-on.png +0 -0
  164. data/examples/wiki/war/public/wmd/images/wmd.png +0 -0
  165. data/examples/wiki/war/public/wmd/showdown.js +0 -421
  166. data/examples/wiki/war/public/wmd/wmd-base.js +0 -1799
  167. data/examples/wiki/war/public/wmd/wmd-plus.js +0 -311
  168. data/examples/wiki/war/public/wmd/wmd.js +0 -73
  169. data/examples/wiki/war/src/org/mirah/wiki/MirahWiki.duby +0 -339
  170. data/examples/wiki/war/src/org/mirah/wiki/edit.eduby.html +0 -42
  171. data/examples/wiki/war/src/org/mirah/wiki/error.eduby.html +0 -2
  172. data/examples/wiki/war/src/org/mirah/wiki/layout.eduby.html +0 -69
  173. data/examples/wiki/war/src/org/mirah/wiki/parser.eduby.html +0 -7
  174. data/examples/wiki/war/src/org/mirah/wiki/view.eduby.html +0 -15
  175. data/javalib/dynalink-0.1.jar +0 -0
  176. data/javalib/jsr292-mock.jar +0 -0
  177. data/lib/mirah/class_loader.rb +0 -35
  178. data/lib/mirah/compilation_state.rb +0 -28
  179. data/lib/mirah/impl.rb +0 -273
  180. data/lib/mirah/jvm/base.rb +0 -267
  181. data/lib/mirah/jvm/source_compiler.rb +0 -760
  182. data/lib/mirah/transform2.rb +0 -752
@@ -1,7 +0,0 @@
1
- <form method=post>
2
- <p><textarea name="code" cols=80 rows=20><%=h @code %></textarea><br>
3
- <input type="submit" value="Parse"/>
4
- </p>
5
- </form>
6
- <h2>Parsed:</h2>
7
- <div><tt><%=h @parsed %></tt></div>
@@ -1,15 +0,0 @@
1
- <script>
2
- function newPage() {
3
- var p=prompt('Page name', '')
4
- if (p) {
5
- document.location = '/edit/' + p
6
- }
7
- }
8
- </script>
9
- <% if @page %>
10
- <%= markdown @page.body %>
11
- <% else %>
12
- <h1><%=h @name%></h1>
13
- <p>That page does not exist. Click <a href="/edit/<%=h @name%>">here</a>
14
- to create it.</p>
15
- <% end%>
@@ -1,21 +0,0 @@
1
- application: mirah-lang
2
- version: 1
3
-
4
- public_root: /public
5
- welcome_files:
6
- - index.jsp
7
-
8
- handlers:
9
- - url: /
10
- filter: org.mirah.wiki.MainFilter
11
- - url: /parser
12
- servlet: org.mirah.wiki.MirahParserPage
13
- - url: /edit/*
14
- login: required
15
- servlet: org.mirah.wiki.EditPage
16
- - url: /wiki/*
17
- servlet: org.mirah.wiki.ViewPage
18
- - url: /a/*
19
- servlet: org.mirah.wiki.FederatedLogin
20
- - url: /_ah/login_required
21
- servlet: org.mirah.wiki.LoginRequired
File without changes
@@ -1,61 +0,0 @@
1
- window.PR_SHOULD_USE_CONTINUATION=true,window.PR_TAB_WIDTH=8,window.PR_normalizedHtml=window.PR=window.prettyPrintOne=window.prettyPrint=void
2
- 0,window._pr_isIE6=function(){var a=navigator&&navigator.userAgent&&navigator.userAgent.match(/\bMSIE ([678])\./);return a=a?+a[1]:false,window._pr_isIE6=function(){return a},a},(function(){var
3
- a=true,b=null,c='break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof ',d=c+'alignof align_union asm axiom bool '+'concept concept_map const_cast constexpr decltype '+'dynamic_cast explicit export friend inline late_check '+'mutable namespace nullptr reinterpret_cast static_assert static_cast '+'template typeid typename using virtual wchar_t where ',e=c+'abstract boolean byte extends final finally implements import '+'instanceof null native package strictfp super synchronized throws '+'transient ',f=e+'as base by checked decimal delegate descending event '+'fixed foreach from group implicit in interface internal into is lock '+'object out override orderby params partial readonly ref sbyte sealed '+'stackalloc string select uint ulong unchecked unsafe ushort var ',g=c+'debugger eval export function get null set undefined var with '+'Infinity NaN ',h='caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ',i='break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ',j='break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ',k='break continue do else for if return while case done elif esac eval fi function in local set then until ',l=d+f+g+h+i+j+k,m=(function(){var
4
- a=['!','!=','!==','#','%','%=','&','&&','&&=','&=','(','*','*=','+=',',','-=','->','/','/=',':','::',';','<','<<','<<=','<=','=','==','===','>','>=','>>','>>=','>>>','>>>=','?','@','[','^','^=','^^','^^=','{','|','|=','||','||=','~','break','case','continue','delete','do','else','finally','instanceof','return','throw','try','typeof'],b='(?:^^|[+-]',c;for(c=0;c<a.length;++c)b+='|'+a[c].replace(/([^=<>:&a-z])/g,'\\$1');return b+=')\\s*',b})(),n=/&/g,o=/</g,p=/>/g,q=/\"/g,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F;function
5
- G(a){return a.replace(n,'&amp;').replace(o,'&lt;').replace(p,'&gt;').replace(q,'&quot;')}function
6
- H(a){return a.replace(n,'&amp;').replace(o,'&lt;').replace(p,'&gt;')}C=/&lt;/g,B=/&gt;/g,w=/&apos;/g,E=/&quot;/g,v=/&amp;/g,D=/&nbsp;/g;function
7
- I(a){var b=a.indexOf('&'),c,d,e,f;if(b<0)return a;for(--b;(b=a.indexOf('&#',b+1))>=0;)d=a.indexOf(';',b),d>=0&&(e=a.substring(b+3,d),f=10,e&&e.charAt(0)==='x'&&(e=e.substring(1),f=16),c=parseInt(e,f),isNaN(c)||(a=a.substring(0,b)+String.fromCharCode(c)+a.substring(d+1)));return a.replace(C,'<').replace(B,'>').replace(w,'\'').replace(E,'\"').replace(D,' ').replace(v,'&')}function
8
- J(a){return'XMP'===a.tagName}u=/[\r\n]/g;function K(c,d){var e;return'PRE'===c.tagName?a:u.test(d)?(e='',c.currentStyle?(e=c.currentStyle.whiteSpace):window.getComputedStyle&&(e=window.getComputedStyle(c,b).whiteSpace),!e||e==='pre'):a}function
9
- L(a,b){var c,d,e,f;switch(a.nodeType){case 1:f=a.tagName.toLowerCase(),b.push('<',f);for(e=0;e<a.attributes.length;++e){c=a.attributes[e];if(!c.specified)continue;b.push(' '),L(c,b)}b.push('>');for(d=a.firstChild;d;d=d.nextSibling)L(d,b);(a.firstChild||!/^(?:br|link|img)$/.test(f))&&b.push('</',f,'>');break;case
10
- 2:b.push(a.name.toLowerCase(),'=\"',G(a.value),'\"');break;case 3:case 4:b.push(H(a.nodeValue))}}function
11
- M(b){var c=0,d=false,e=false,f,g,h,i;for(f=0,g=b.length;f<g;++f){h=b[f];if(h.ignoreCase)e=a;else
12
- if(/[a-z]/i.test(h.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,''))){d=a,e=false;break}}function
13
- j(a){if(a.charAt(0)!=='\\')return a.charCodeAt(0);switch(a.charAt(1)){case'b':return 8;case't':return 9;case'n':return 10;case'v':return 11;case'f':return 12;case'r':return 13;case'u':case'x':return parseInt(a.substring(2),16)||a.charCodeAt(1);case'0':case'1':case'2':case'3':case'4':case'5':case'6':case'7':return parseInt(a.substring(1),8);default:return a.charCodeAt(1)}}function
14
- k(a){var b;return a<32?(a<16?'\\x0':'\\x')+a.toString(16):(b=String.fromCharCode(a),(b==='\\'||b==='-'||b==='['||b===']')&&(b='\\'+b),b)}function
15
- l(a){var b=a.substring(1,a.length-1).match(new RegExp('\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]','g')),c=[],d=[],e=b[0]==='^',f,g,h,i,m,n,o,p,q;for(h=e?1:0,m=b.length;h<m;++h){o=b[h];switch(o){case'\\B':case'\\b':case'\\D':case'\\d':case'\\S':case'\\s':case'\\W':case'\\w':c.push(o);continue}q=j(o),h+2<m&&'-'===b[h+1]?(g=j(b[h+2]),h+=2):(g=q),d.push([q,g]),g<65||q>122||(g<65||q>90||d.push([Math.max(65,q)|32,Math.min(g,90)|32]),g<97||q>122||d.push([Math.max(97,q)&-33,Math.min(g,122)&-33]))}d.sort(function(a,b){return a[0]-b[0]||b[1]-a[1]}),f=[],i=[NaN,NaN];for(h=0;h<d.length;++h)p=d[h],p[0]<=i[1]+1?(i[1]=Math.max(i[1],p[1])):f.push(i=p);n=['['],e&&n.push('^'),n.push.apply(n,c);for(h=0;h<f.length;++h)p=f[h],n.push(k(p[0])),p[1]
16
- >p[0]&&(p[1]+1>p[0]&&n.push('-'),n.push(k(p[1])));return n.push(']'),n.join('')}function
17
- m(a){var b=a.source.match(new RegExp('(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)','g')),e=b.length,f=[],g,h,i,j,k;for(j=0,i=0;j<e;++j)k=b[j],k==='('?++i:'\\'===k.charAt(0)&&(h=+k.substring(1),h&&h<=i&&(f[h]=-1));for(j=1;j<f.length;++j)-1===f[j]&&(f[j]=++c);for(j=0,i=0;j<e;++j)k=b[j],k==='('?(++i,f[i]===void
18
- 0&&(b[j]='(?:')):'\\'===k.charAt(0)&&(h=+k.substring(1),h&&h<=i&&(b[j]='\\'+f[i]));for(j=0,i=0;j<e;++j)'^'===b[j]&&'^'!==b[j+1]&&(b[j]='');if(a.ignoreCase&&d)for(j=0;j<e;++j)k=b[j],g=k.charAt(0),k.length>=2&&g==='['?(b[j]=l(k)):g!=='\\'&&(b[j]=k.replace(/[a-zA-Z]/g,function(a){var
19
- b=a.charCodeAt(0);return'['+String.fromCharCode(b&-33,b|32)+']'}));return b.join('')}i=[];for(f=0,g=b.length;f<g;++f){h=b[f];if(h.global||h.multiline)throw new
20
- Error(''+h);i.push('(?:'+m(h)+')')}return new RegExp(i.join('|'),e?'gi':'g')}r=b;function
21
- N(a){var c,d,e,f;b===r&&(f=document.createElement('PRE'),f.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC \"foo bar\">\n<foo />')),r=!/</.test(f.innerHTML));if(r)return d=a.innerHTML,J(a)?(d=H(d)):K(a,d)||(d=d.replace(/(<br\s*\/?>)[\r\n]+/g,'$1').replace(/(?:[\r\n]+[ \t]*)+/g,' ')),d;e=[];for(c=a.firstChild;c;c=c.nextSibling)L(c,e);return e.join('')}function
22
- O(a){var c=0;return function(d){var e=b,f=0,g,h,i,j;for(h=0,i=d.length;h<i;++h){g=d.charAt(h);switch(g){case' ':e||(e=[]),e.push(d.substring(f,h)),j=a-c%a,c+=j;for(;j>=0;j-=' '.length)e.push(' '.substring(0,j));f=h+1;break;case'\n':c=0;break;default:++c}}return e?(e.push(d.substring(f)),e.join('')):d}}z=new
23
- RegExp('[^<]+|<!--[\\s\\S]*?-->|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>|</?[a-zA-Z](?:[^>\"\']|\'[^\']*\'|\"[^\"]*\")*>|<','g'),A=/^<\!--/,y=/^<!\[CDATA\[/,x=/^<br\b/i,F=/^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/;function
24
- P(a){var b=a.match(z),c=[],d=0,e=[],f,g,h,i,j,k,l,m;if(b)for(g=0,k=b.length;g<k;++g){j=b[g];if(j.length>1&&j.charAt(0)==='<'){if(A.test(j))continue;if(y.test(j))c.push(j.substring(9,j.length-3)),d+=j.length-12;else
25
- if(x.test(j))c.push('\n'),++d;else if(j.indexOf('nocode')>=0&&Q(j)){l=(j.match(F))[2],f=1;for(h=g+1;h<k;++h){m=b[h].match(F);if(m&&m[2]===l)if(m[1]==='/'){if(--f===0)break}else++f}h<k?(e.push(d,b.slice(g,h+1).join('')),g=h):e.push(d,j)}else
26
- e.push(d,j)}else i=I(j),c.push(i),d+=i.length}return{source:c.join(''),tags:e}}function
27
- Q(a){return!!a.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,' $1=\"$2$3$4\"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)}function
28
- R(a,b,c,d){var e;if(!b)return;e={source:b,basePos:a},c(e),d.push.apply(d,e.decorations)}function
29
- S(a,c){var d={},e,f,g,h;return(function(){var e=a.concat(c),f=[],g={},i,j,k,l,m,n,o;for(j=0,l=e.length;j<l;++j){m=e[j],o=m[3];if(o)for(i=o.length;--i>=0;)d[o.charAt(i)]=m;n=m[1],k=''+n,g.hasOwnProperty(k)||(f.push(n),g[k]=b)}f.push(/[\0-\uffff]/),h=M(f)})(),f=c.length,g=/\S/,e=function(a){var
30
- b=a.source,g=a.basePos,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;i=[g,'pln'],s=0,y=b.match(h)||[],u={};for(v=0,q=y.length;v<q;++v){w=y[v],t=u[w],p=void
31
- 0;if(typeof t==='string')n=false;else{r=d[w.charAt(0)];if(r)p=w.match(r[1]),t=r[0];else{for(m=0;m<f;++m){r=c[m],p=w.match(r[1]);if(p){t=r[0];break}}p||(t='pln')}n=t.length>=5&&'lang-'===t.substring(0,5),n&&!(p&&typeof
32
- p[1]==='string')&&(n=false,t='src'),n||(u[w]=t)}x=s,s+=w.length,n?(j=p[1],l=w.indexOf(j),k=l+j.length,p[2]&&(k=w.length-p[2].length,l=k-j.length),o=t.substring(5),R(g+x,w.substring(0,l),e,i),R(g+x+l,j,W(o,j),i),R(g+x+k,w.substring(k),e,i)):i.push(g+x,t)}a.decorations=i},e}function
33
- T(a){var c=[],d=[],e,f;return a.tripleQuotedStrings?c.push(['str',/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,b,'\'\"']):a.multiLineStrings?c.push(['str',/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,b,'\'\"`']):c.push(['str',/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,b,'\"\'']),a.verbatimStrings&&d.push(['str',/^@\"(?:[^\"]|\"\")*(?:\"|$)/,b]),a.hashComments&&(a.cStyleComments?(c.push(['com',/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,b,'#']),d.push(['str',/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,b])):c.push(['com',/^#[^\r\n]*/,b,'#'])),a.cStyleComments&&(d.push(['com',/^\/\/[^\r\n]*/,b]),d.push(['com',/^\/\*[\s\S]*?(?:\*\/|$)/,b])),a.regexLiterals&&(e='/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/',d.push(['lang-regex',new
34
- RegExp('^'+m+'('+e+')')])),f=a.keywords.replace(/^\s+|\s+$/g,''),f.length&&d.push(['kwd',new
35
- RegExp('^(?:'+f.replace(/\s+/g,'|')+')\\b'),b]),c.push(['pln',/^\s+/,b,' \r\n \xa0']),d.push(['lit',/^@[a-z_$][a-z_$@0-9]*/i,b],['typ',/^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/,b],['pln',/^[a-z_$][a-z_$@0-9]*/i,b],['lit',new
36
- RegExp('^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*','i'),b,'0123456789'],['pun',/^.[^\s\w\.$@\'\"\`\/\#]*/,b]),S(c,d)}s=T({keywords:l,hashComments:a,cStyleComments:a,multiLineStrings:a,regexLiterals:a});function
37
- U(c){var d=c.source,e=c.extractedTags,f=c.decorations,g=[],h=0,i=b,j=b,k=0,l=0,m=O(window.PR_TAB_WIDTH),n=/([\r\n ]) /g,o=/(^| ) /gm,p=/\r\n?|\n/g,q=/[ \r\n]$/,r=a,s;function
38
- t(a){var c,e;a>h&&(i&&i!==j&&(g.push('</span>'),i=b),!i&&j&&(i=j,g.push('<span class=\"',i,'\">')),c=H(m(d.substring(h,a))).replace(r?o:n,'$1&nbsp;'),r=q.test(c),e=window._pr_isIE6()?'&nbsp;<br />':'<br />',g.push(c.replace(p,e)),h=a)}while(a){k<e.length?l<f.length?(s=e[k]<=f[l]):(s=a):(s=false);if(s)t(e[k]),i&&(g.push('</span>'),i=b),g.push(e[k+1]),k+=2;else
39
- if(l<f.length)t(f[l]),j=f[l+1],l+=2;else break}t(d.length),i&&g.push('</span>'),c.prettyPrintedHtml=g.join('')}t={};function
40
- V(a,b){var c,d;for(d=b.length;--d>=0;)c=b[d],t.hasOwnProperty(c)?'console'in window&&console.warn('cannot override language handler %s',c):(t[c]=a)}function
41
- W(a,b){return a&&t.hasOwnProperty(a)||(a=/^\s*</.test(b)?'default-markup':'default-code'),t[a]}V(s,['default-code']),V(S([],[['pln',/^[^<?]+/],['dec',/^<!\w[^>]*(?:>|$)/],['com',/^<\!--[\s\S]*?(?:-\->|$)/],['lang-',/^<\?([\s\S]+?)(?:\?>|$)/],['lang-',/^<%([\s\S]+?)(?:%>|$)/],['pun',/^(?:<[%?]|[%?]>)/],['lang-',/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],['lang-js',/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],['lang-css',/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],['lang-in.tag',/^(<\/?[a-z][^<>]*>)/i]]),['default-markup','htm','html','mxml','xhtml','xml','xsl']),V(S([['pln',/^[\s]+/,b,' \r\n'],['atv',/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,b,'\"\'']],[['tag',/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],['atn',/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],['lang-uq.val',/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],['pun',/^[=<>\/]+/],['lang-js',/^on\w+\s*=\s*\"([^\"]+)\"/i],['lang-js',/^on\w+\s*=\s*\'([^\']+)\'/i],['lang-js',/^on\w+\s*=\s*([^\"\'>\s]+)/i],['lang-css',/^style\s*=\s*\"([^\"]+)\"/i],['lang-css',/^style\s*=\s*\'([^\']+)\'/i],['lang-css',/^style\s*=\s*([^\"\'>\s]+)/i]]),['in.tag']),V(S([],[['atv',/^[\s\S]+/]]),['uq.val']),V(T({keywords:d,hashComments:a,cStyleComments:a}),['c','cc','cpp','cxx','cyc','m']),V(T({keywords:'null true false'}),['json']),V(T({keywords:f,hashComments:a,cStyleComments:a,verbatimStrings:a}),['cs']),V(T({keywords:e,cStyleComments:a}),['java']),V(T({keywords:k,hashComments:a,multiLineStrings:a}),['bsh','csh','sh']),V(T({keywords:i,hashComments:a,multiLineStrings:a,tripleQuotedStrings:a}),['cv','py']),V(T({keywords:h,hashComments:a,multiLineStrings:a,regexLiterals:a}),['perl','pl','pm']),V(T({keywords:j,hashComments:a,multiLineStrings:a,regexLiterals:a}),['rb']),V(T({keywords:g,cStyleComments:a,regexLiterals:a}),['js']),V(S([],[['str',/^[\s\S]+/]]),['regex']);function
42
- X(a){var b=a.sourceCodeHtml,c=a.langExtension,d,e;a.prettyPrintedHtml=b;try{e=P(b),d=e.source,a.source=d,a.basePos=0,a.extractedTags=e.tags,W(c,d)(a),U(a)}catch(f){'console'in
43
- window&&(console.log(f),console.trace())}}function Y(a,b){var c={sourceCodeHtml:a,langExtension:b};return X(c),c.prettyPrintedHtml}function
44
- Z(c){var d=window._pr_isIE6(),e=d===6?'\r\n':'\r',f=[document.getElementsByTagName('pre'),document.getElementsByTagName('code'),document.getElementsByTagName('xmp')],g=[],h,i,j,k,l,m;for(i=0;i<f.length;++i)for(j=0,l=f[i].length;j<l;++j)g.push(f[i][j]);f=b,h=Date,h.now||(h={now:function(){return(new
45
- Date).getTime()}}),k=0;function n(){var b=window.PR_SHOULD_USE_CONTINUATION?h.now()+250:Infinity,d,e,f,i,j;for(;k<g.length&&h.now()<b;++k){e=g[k];if(e.className&&e.className.indexOf('prettyprint')>=0){f=e.className.match(/\blang-(\w+)\b/),f&&(f=f[1]),i=false;for(j=e.parentNode;j;j=j.parentNode)if((j.tagName==='pre'||j.tagName==='code'||j.tagName==='xmp')&&j.className&&j.className.indexOf('prettyprint')>=0){i=a;break}i||(d=N(e),d=d.replace(/(?:\r\n?|\n)$/,''),m={sourceCodeHtml:d,langExtension:f,sourceNode:e},X(m),o())}}k<g.length?setTimeout(n,250):c&&c()}function
46
- o(){var a=m.prettyPrintedHtml,b,c,f,g,h,i,j,k;if(!a)return;f=m.sourceNode;if(!J(f))f.innerHTML=a;else{k=document.createElement('PRE');for(g=0;g<f.attributes.length;++g)b=f.attributes[g],b.specified&&(c=b.name.toLowerCase(),c==='class'?(k.className=b.value):k.setAttribute(b.name,b.value));k.innerHTML=a,f.parentNode.replaceChild(k,f),f=k}if(d&&f.tagName==='PRE'){j=f.getElementsByTagName('br');for(h=j.length;--h>=0;)i=j[h],i.parentNode.replaceChild(document.createTextNode(e),i)}}n()}window.PR_normalizedHtml=L,window.prettyPrintOne=Y,window.prettyPrint=Z,window.PR={combinePrefixPatterns:M,createSimpleLexer:S,registerLangHandler:V,sourceDecorator:T,PR_ATTRIB_NAME:'atn',PR_ATTRIB_VALUE:'atv',PR_COMMENT:'com',PR_DECLARATION:'dec',PR_KEYWORD:'kwd',PR_LITERAL:'lit',PR_NOCODE:'nocode',PR_PLAIN:'pln',PR_PUNCTUATION:'pun',PR_SOURCE:'src',PR_STRING:'str',PR_TAG:'tag',PR_TYPE:'typ'};PR.registerLangHandler(
47
- PR.createSimpleLexer(
48
- [
49
- [PR.PR_PUNCTUATION, /^[-:|>?]/, null, '-:|>?'],
50
- [PR.PR_DECLARATION, /^%(YAML|TAG)[^#\r\n]+/, null, '%'],
51
- [PR.PR_TYPE, /^[&]\S+/, null, '&'],
52
- [PR.PR_TYPE, /^!\S*/, null, '!'],
53
- [PR.PR_STRING, /^"([^\\"]|\\.)*"/, null, '"'],
54
- [PR.PR_STRING, /^'([^']|'')*'/, null, "'"],
55
- [PR.PR_COMMENT, /^#[^\r\n]*/, null, '#'],
56
- ],
57
- [
58
- [PR.PR_DECLARATION, /^(---|[.]{3})(?:[\r\n]|$)/],
59
- [PR.PR_KEYWORD, /^\w+:[ \r\n]/],
60
- ]), ['yaml', 'yml']);
61
- })()
File without changes
@@ -1,156 +0,0 @@
1
- body {
2
- margin: 0;
3
- margin-bottom: 25px;
4
- padding: 0;
5
- background-color: #f0f0f0;
6
- font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
7
- font-size: 13px;
8
- color: #333;
9
- }
10
-
11
- h1 {
12
- font-size: 28px;
13
- color: #000;
14
- }
15
-
16
- a {color: #666}
17
- a:hover {
18
- background-color: #ccc;
19
- color: white;
20
- text-decoration: none;
21
- }
22
-
23
-
24
- #page {
25
- background-color: #f0f0f0;
26
- width: 750px;
27
- margin: 0;
28
- margin-left: auto;
29
- margin-right: auto;
30
- }
31
-
32
- #content {
33
- float: left;
34
- background-color: white;
35
- border: 3px solid #aaa;
36
- border-top: none;
37
- padding: 25px;
38
- width: 500px;
39
- }
40
-
41
- #sidebar {
42
- float: right;
43
- width: 175px;
44
- }
45
-
46
- #footer {
47
- clear: both;
48
- }
49
-
50
-
51
- #header, #about {
52
- padding-left: 75px;
53
- padding-right: 30px;
54
- }
55
-
56
- #header {
57
- height: 64px;
58
- }
59
-
60
- #header h1, #header h2 {margin: 0}
61
- #header h2 {
62
- color: #888;
63
- font-weight: normal;
64
- font-size: 16px;
65
- }
66
-
67
- td.mono { font-family: "Andale Mono", "monospace"; }
68
-
69
- #about h3 {
70
- margin: 0;
71
- margin-bottom: 10px;
72
- font-size: 14px;
73
- }
74
-
75
- #about-content {
76
- background-color: #ffd;
77
- border: 1px solid #fc0;
78
- margin-left: -11px;
79
- }
80
- #about-content table {
81
- margin-top: 10px;
82
- margin-bottom: 10px;
83
- font-size: 11px;
84
- border-collapse: collapse;
85
- }
86
- #about-content td {
87
- padding: 10px;
88
- padding-top: 3px;
89
- padding-bottom: 3px;
90
- }
91
- #about-content td.name {color: #555}
92
- #about-content td.value {color: #000}
93
-
94
- #about-content.failure {
95
- background-color: #fcc;
96
- border: 1px solid #f00;
97
- }
98
- #about-content.failure p {
99
- margin: 0;
100
- padding: 10px;
101
- }
102
-
103
- code {
104
- color: Brown;
105
- }
106
-
107
- #search {
108
- margin: 0;
109
- padding-top: 10px;
110
- padding-bottom: 10px;
111
- font-size: 11px;
112
- }
113
- #search input {
114
- font-size: 11px;
115
- margin: 2px;
116
- }
117
- #search-text {width: 170px}
118
-
119
-
120
- #sidebar ul {
121
- margin-left: 0;
122
- padding-left: 0;
123
- }
124
- #sidebar ul h3 {
125
- margin-top: 25px;
126
- font-size: 16px;
127
- padding-bottom: 10px;
128
- border-bottom: 1px solid #ccc;
129
- }
130
- #sidebar li {
131
- list-style-type: none;
132
- }
133
- #sidebar ul.links li {
134
- margin-bottom: 5px;
135
- }
136
- span.comment {
137
- color: blue;
138
- font-weight: plain;
139
- }
140
- pre {
141
- font-size: 12pt;
142
- }
143
- span.appid {
144
- color: green;
145
- }
146
- pre.prettyprint {
147
- border: 1px solid #777;
148
- background: #eee;
149
- padding:1em;
150
- }
151
- #hlinks {
152
- position: absolute;
153
- top: 0;
154
- right: 0;
155
- margin-right:.5em;
156
- }
@@ -1 +0,0 @@
1
- .str,.atv{color:#080}.kwd,.tag{color:#008}.com{color:#800}.typ,.atn,.dec{color:#606}.lit{color:#066}.pun{color:#660}.pln{color:#000}pre.prettyprint{padding:2px;border:1px solid #888}@media print{.str{color:#060}.kwd,.tag{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{font-weight:bold}.lit{color:#044}.pun{color:#440}.atn,.typ{color:#404}.atv{color:#060}}
@@ -1,66 +0,0 @@
1
- pre.sh_sourceCode {
2
- background-color: white;
3
- color: black;
4
- font-style: normal;
5
- font-weight: normal;
6
- }
7
-
8
- pre.sh_sourceCode .sh_keyword { color: blue; font-weight: bold; } /* language keywords */
9
- pre.sh_sourceCode .sh_type { color: darkgreen; } /* basic types */
10
- pre.sh_sourceCode .sh_usertype { color: teal; } /* user defined types */
11
- pre.sh_sourceCode .sh_string { color: red; font-family: monospace; } /* strings and chars */
12
- pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; } /* regular expressions */
13
- pre.sh_sourceCode .sh_specialchar { color: pink; font-family: monospace; } /* e.g., \n, \t, \\ */
14
- pre.sh_sourceCode .sh_comment { color: brown; font-style: italic; } /* comments */
15
- pre.sh_sourceCode .sh_number { color: purple; } /* literal numbers */
16
- pre.sh_sourceCode .sh_preproc { color: darkblue; font-weight: bold; } /* e.g., #include, import */
17
- pre.sh_sourceCode .sh_symbol { color: darkred; } /* e.g., <, >, + */
18
- pre.sh_sourceCode .sh_function { color: black; font-weight: bold; } /* function calls and declarations */
19
- pre.sh_sourceCode .sh_cbracket { color: red; } /* block brackets (e.g., {, }) */
20
- pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: cyan; } /* TODO and FIXME */
21
-
22
- /* Predefined variables and functions (for instance glsl) */
23
- pre.sh_sourceCode .sh_predef_var { color: darkblue; }
24
- pre.sh_sourceCode .sh_predef_func { color: darkblue; font-weight: bold; }
25
-
26
- /* for OOP */
27
- pre.sh_sourceCode .sh_classname { color: teal; }
28
-
29
- /* line numbers (not yet implemented) */
30
- pre.sh_sourceCode .sh_linenum { color: black; font-family: monospace; }
31
-
32
- /* Internet related */
33
- pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
34
-
35
- /* for ChangeLog and Log files */
36
- pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
37
- pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: darkblue; font-weight: bold; }
38
- pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: darkgreen; }
39
-
40
- /* for Prolog, Perl... */
41
- pre.sh_sourceCode .sh_variable { color: darkgreen; }
42
-
43
- /* for LaTeX */
44
- pre.sh_sourceCode .sh_italics { color: darkgreen; font-style: italic; }
45
- pre.sh_sourceCode .sh_bold { color: darkgreen; font-weight: bold; }
46
- pre.sh_sourceCode .sh_underline { color: darkgreen; text-decoration: underline; }
47
- pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
48
- pre.sh_sourceCode .sh_argument { color: darkgreen; }
49
- pre.sh_sourceCode .sh_optionalargument { color: purple; }
50
- pre.sh_sourceCode .sh_math { color: orange; }
51
- pre.sh_sourceCode .sh_bibtex { color: blue; }
52
-
53
- /* for diffs */
54
- pre.sh_sourceCode .sh_oldfile { color: orange; }
55
- pre.sh_sourceCode .sh_newfile { color: darkgreen; }
56
- pre.sh_sourceCode .sh_difflines { color: blue; }
57
-
58
- /* for css */
59
- pre.sh_sourceCode .sh_selector { color: purple; }
60
- pre.sh_sourceCode .sh_property { color: blue; }
61
- pre.sh_sourceCode .sh_value { color: darkgreen; font-style: italic; }
62
-
63
- /* other */
64
- pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
65
- pre.sh_sourceCode .sh_paren { color: red; }
66
- pre.sh_sourceCode .sh_attribute { color: darkgreen; }
@@ -1,21 +0,0 @@
1
- body { background-color: #f0f0f0; }
2
- pre {
3
- font-size:10pt;
4
- background-color: #fff;
5
- border: thin solid Gray;
6
- padding: 1em;
7
- margin: 2em; }
8
- div.main {
9
- font-family: sans-serif;
10
- font-size:10pt;
11
- width: 20em;
12
- background-color: #fff;
13
- border: thin solid Gray;
14
- padding: 1em;
15
- margin: 2em; }
16
- div.head {
17
- font-weight: bold;
18
- font-size: 12pt;
19
- margin-bottom: 9px;
20
- padding-bottom: 3px;
21
- border-bottom: thin solid orange; }
@@ -1,421 +0,0 @@
1
- var Attacklab=Attacklab||{};
2
- Attacklab.showdown=Attacklab.showdown||{};
3
- Attacklab.showdown.converter=function(){
4
- this.obfuscation;
5
- var _1;
6
- var _2;
7
- var _3;
8
- var _4=0;
9
- this.makeHtml=function(_5){
10
- _1=new Array();
11
- _2=new Array();
12
- _3=new Array();
13
- _5=_5.replace(/~/g,"~T");
14
- _5=_5.replace(/\$/g,"~D");
15
- _5=_5.replace(/\r\n/g,"\n");
16
- _5=_5.replace(/\r/g,"\n");
17
- _5="\n\n"+_5+"\n\n";
18
- _5=_6(_5);
19
- _5=_5.replace(/^[ \t]+$/mg,"");
20
- _5=_7(_5);
21
- _5=_8(_5);
22
- _5=_9(_5);
23
- _5=_a(_5);
24
- _5=_5.replace(/~D/g,"$$");
25
- _5=_5.replace(/~T/g,"~");
26
- return _5;
27
- };
28
- var _8=function(_b){
29
- var _b=_b.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|\Z)/gm,function(_c,m1,m2,m3,m4){
30
- m1=m1.toLowerCase();
31
- _1[m1]=_11(m2);
32
- if(m3){
33
- return m3+m4;
34
- }else{
35
- if(m4){
36
- _2[m1]=m4.replace(/"/g,"&quot;");
37
- }
38
- }
39
- return "";
40
- });
41
- return _b;
42
- };
43
- var _7=function(_12){
44
- _12=_12.replace(/\n/g,"\n\n");
45
- var _13="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del";
46
- var _14="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math";
47
- _12=_12.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,_15);
48
- _12=_12.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm,_15);
49
- _12=_12.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,_15);
50
- _12=_12.replace(/(\n\n[ ]{0,3}<!(--[^\r]*?--\s*)+>[ \t]*(?=\n{2,}))/g,_15);
51
- _12=_12.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,_15);
52
- _12=_12.replace(/\n\n/g,"\n");
53
- return _12;
54
- };
55
- var _15=function(_16,m1){
56
- var _18=m1;
57
- _18=_18.replace(/\n\n/g,"\n");
58
- _18=_18.replace(/^\n/,"");
59
- _18=_18.replace(/\n+$/g,"");
60
- _18="\n\n~K"+(_3.push(_18)-1)+"K\n\n";
61
- return _18;
62
- };
63
- var _9=function(_19){
64
- _19=_1a(_19);
65
- var key=_1c("<hr />");
66
- _19=_19.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,key);
67
- _19=_19.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,key);
68
- _19=_19.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm,key);
69
- _19=_1d(_19);
70
- _19=_1e(_19);
71
- _19=_1f(_19);
72
- _19=_7(_19);
73
- _19=_20(_19);
74
- return _19;
75
- };
76
- var _21=function(_22){
77
- _22=_23(_22);
78
- _22=_24(_22);
79
- _22=_25(_22);
80
- _22=_26(_22);
81
- _22=_27(_22);
82
- _22=_28(_22);
83
- _22=_11(_22);
84
- _22=_29(_22);
85
- _22=_22.replace(/ +\n/g," <br />\n");
86
- return _22;
87
- };
88
- var _24=function(_2a){
89
- var _2b=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--.*?--\s*)+>)/gi;
90
- _2a=_2a.replace(_2b,function(_2c){
91
- var tag=_2c.replace(/(.)<\/?code>(?=.)/g,"$1`");
92
- tag=_2e(tag,"\\`*_");
93
- return tag;
94
- });
95
- return _2a;
96
- };
97
- var _27=function(_2f){
98
- _2f=_2f.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,_30);
99
- _2f=_2f.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,_30);
100
- _2f=_2f.replace(/(\[([^\[\]]+)\])()()()()()/g,_30);
101
- return _2f;
102
- };
103
- var _30=function(_31,m1,m2,m3,m4,m5,m6,m7){
104
- if(m7==undefined){
105
- m7="";
106
- }
107
- var _39=m1;
108
- var _3a=m2;
109
- var _3b=m3.toLowerCase();
110
- var url=m4;
111
- var _3d=m7;
112
- if(url==""){
113
- if(_3b==""){
114
- _3b=_3a.toLowerCase().replace(/ ?\n/g," ");
115
- }
116
- url="#"+_3b;
117
- if(_1[_3b]!=undefined){
118
- url=_1[_3b];
119
- if(_2[_3b]!=undefined){
120
- _3d=_2[_3b];
121
- }
122
- }else{
123
- if(_39.search(/\(\s*\)$/m)>-1){
124
- url="";
125
- }else{
126
- return _39;
127
- }
128
- }
129
- }
130
- url=_2e(url,"*_");
131
- var _3e="<a href=\""+url+"\"";
132
- if(_3d!=""){
133
- _3d=_3d.replace(/"/g,"&quot;");
134
- _3d=_2e(_3d,"*_");
135
- _3e+=" title=\""+_3d+"\"";
136
- }
137
- _3e+=">"+_3a+"</a>";
138
- return _3e;
139
- };
140
- var _26=function(_3f){
141
- _3f=_3f.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,_40);
142
- _3f=_3f.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,_40);
143
- return _3f;
144
- };
145
- var _40=function(_41,m1,m2,m3,m4,m5,m6,m7){
146
- var _49=m1;
147
- var _4a=m2;
148
- var _4b=m3.toLowerCase();
149
- var url=m4;
150
- var _4d=m7;
151
- if(!_4d){
152
- _4d="";
153
- }
154
- if(url==""){
155
- if(_4b==""){
156
- _4b=_4a.toLowerCase().replace(/ ?\n/g," ");
157
- }
158
- url="#"+_4b;
159
- if(_1[_4b]!=undefined){
160
- url=_1[_4b];
161
- if(_2[_4b]!=undefined){
162
- _4d=_2[_4b];
163
- }
164
- }else{
165
- return _49;
166
- }
167
- }
168
- _4a=_4a.replace(/"/g,"&quot;");
169
- url=_2e(url,"*_");
170
- var _4e="<img src=\""+url+"\" alt=\""+_4a+"\"";
171
- _4d=_4d.replace(/"/g,"&quot;");
172
- _4d=_2e(_4d,"*_");
173
- _4e+=" title=\""+_4d+"\"";
174
- _4e+=" />";
175
- return _4e;
176
- };
177
- var _1a=function(_4f){
178
- _4f=_4f.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,function(_50,m1){
179
- return _1c("<h1>"+_21(m1)+"</h1>");
180
- });
181
- _4f=_4f.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,function(_52,m1){
182
- return _1c("<h2>"+_21(m1)+"</h2>");
183
- });
184
- _4f=_4f.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,function(_54,m1,m2){
185
- var _57=m1.length;
186
- return _1c("<h"+_57+">"+_21(m2)+"</h"+_57+">");
187
- });
188
- return _4f;
189
- };
190
- var _58;
191
- var _1d=function(_59){
192
- _59+="~0";
193
- var _5a=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;
194
- if(_4){
195
- _59=_59.replace(_5a,function(_5b,m1,m2){
196
- var _5e=m1;
197
- var _5f=(m2.search(/[*+-]/g)>-1)?"ul":"ol";
198
- _5e=_5e.replace(/\n{2,}/g,"\n\n\n");
199
- var _60=_58(_5e);
200
- _60=_60.replace(/\s+$/,"");
201
- _60="<"+_5f+">"+_60+"</"+_5f+">\n";
202
- return _60;
203
- });
204
- }else{
205
- _5a=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g;
206
- _59=_59.replace(_5a,function(_61,m1,m2,m3){
207
- var _65=m1;
208
- var _66=m2;
209
- var _67=(m3.search(/[*+-]/g)>-1)?"ul":"ol";
210
- var _66=_66.replace(/\n{2,}/g,"\n\n\n");
211
- var _68=_58(_66);
212
- _68=_65+"<"+_67+">\n"+_68+"</"+_67+">\n";
213
- return _68;
214
- });
215
- }
216
- _59=_59.replace(/~0/,"");
217
- return _59;
218
- };
219
- _58=function(_69){
220
- _4++;
221
- _69=_69.replace(/\n{2,}$/,"\n");
222
- _69+="~0";
223
- _69=_69.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,function(_6a,m1,m2,m3,m4){
224
- var _6f=m4;
225
- var _70=m1;
226
- var _71=m2;
227
- if(_70||(_6f.search(/\n{2,}/)>-1)){
228
- _6f=_9(_72(_6f));
229
- }else{
230
- _6f=_1d(_72(_6f));
231
- _6f=_6f.replace(/\n$/,"");
232
- _6f=_21(_6f);
233
- }
234
- return "<li>"+_6f+"</li>\n";
235
- });
236
- _69=_69.replace(/~0/g,"");
237
- _4--;
238
- return _69;
239
- };
240
- var _1e=function(_73){
241
- _73+="~0";
242
- _73=_73.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,function(_74,m1,m2){
243
- var _77=m1;
244
- var _78=m2;
245
- _77=_79(_72(_77));
246
- _77=_6(_77);
247
- _77=_77.replace(/^\n+/g,"");
248
- _77=_77.replace(/\n+$/g,"");
249
- _77="<pre><code>"+_77+"\n</code></pre>";
250
- return _1c(_77)+_78;
251
- });
252
- _73=_73.replace(/~0/,"");
253
- return _73;
254
- };
255
- var _1c=function(_7a){
256
- _7a=_7a.replace(/(^\n+|\n+$)/g,"");
257
- return "\n\n~K"+(_3.push(_7a)-1)+"K\n\n";
258
- };
259
- var _23=function(_7b){
260
- _7b=_7b.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(_7c,m1,m2,m3,m4){
261
- var c=m3;
262
- c=c.replace(/^([ \t]*)/g,"");
263
- c=c.replace(/[ \t]*$/g,"");
264
- c=_79(c);
265
- return m1+"<code>"+c+"</code>";
266
- });
267
- return _7b;
268
- };
269
- var _79=function(_82){
270
- _82=_82.replace(/&/g,"&amp;");
271
- _82=_82.replace(/</g,"&lt;");
272
- _82=_82.replace(/>/g,"&gt;");
273
- _82=_2e(_82,"*_{}[]\\",false);
274
- return _82;
275
- };
276
- var _29=function(_83){
277
- _83=_83.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,"<strong>$2</strong>");
278
- _83=_83.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,"<em>$2</em>");
279
- return _83;
280
- };
281
- this.hidetable;
282
- var _1f=function(_84){
283
- _84=_84.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(_85,m1){
284
- var bq=m1;
285
- bq=bq.replace(/^[ \t]*>[ \t]?/gm,"~0");
286
- bq=bq.replace(/~0/g,"");
287
- bq=bq.replace(/^[ \t]+$/gm,"");
288
- bq=_9(bq);
289
- bq=bq.replace(/(^|\n)/g,"$1 ");
290
- bq=bq.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(_88,m1){
291
- var pre=m1;
292
- pre=pre.replace(/^ /mg,"~0");
293
- pre=pre.replace(/~0/g,"");
294
- return pre;
295
- });
296
- return _1c("<blockquote>\n"+bq+"\n</blockquote>");
297
- });
298
- return _84;
299
- };
300
- var _20=function(_8b){
301
- _8b=_8b.replace(/^\n+/g,"");
302
- _8b=_8b.replace(/\n+$/g,"");
303
- var _8c=_8b.split(/\n{2,}/g);
304
- var _8d=new Array();
305
- var end=_8c.length;
306
- for(var i=0;i<end;i++){
307
- var str=_8c[i];
308
- if(str.search(/~K(\d+)K/g)>=0){
309
- _8d.push(str);
310
- }else{
311
- if(str.search(/\S/)>=0){
312
- str=_21(str);
313
- str=str.replace(/^([ \t]*)/g,"<p>");
314
- str+="</p>";
315
- _8d.push(str);
316
- }
317
- }
318
- }
319
- end=_8d.length;
320
- for(var i=0;i<end;i++){
321
- while(_8d[i].search(/~K(\d+)K/)>=0){
322
- var _91=_3[RegExp.$1];
323
- _91=_91.replace(/\$/g,"$$$$");
324
- _8d[i]=_8d[i].replace(/~K\d+K/,_91);
325
- }
326
- }
327
- return _8d.join("\n\n");
328
- };
329
- var _11=function(_92){
330
- _92=_92.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;");
331
- _92=_92.replace(/<(?![a-z\/?\$!])/gi,"&lt;");
332
- return _92;
333
- };
334
- var _25=function(_93){
335
- _93=_93.replace(/\\(\\)/g,_94);
336
- _93=_93.replace(/\\([`*_{}\[\]()>#+-.!])/g,_94);
337
- return _93;
338
- };
339
- var _28=function(_95){
340
- _95=_95.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,"<a href=\"$1\">$1</a>");
341
- _95=_95.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,function(_96,m1){
342
- return _98(_a(m1));
343
- });
344
- return _95;
345
- };
346
- var _98=function(_99){
347
- function char2hex(ch){
348
- var _9b="0123456789ABCDEF";
349
- var dec=ch.charCodeAt(0);
350
- return (_9b.charAt(dec>>4)+_9b.charAt(dec&15));
351
- }
352
- var _9d=[function(ch){
353
- return "&#"+ch.charCodeAt(0)+";";
354
- },function(ch){
355
- return "&#x"+char2hex(ch)+";";
356
- },function(ch){
357
- return ch;
358
- }];
359
- _99="mailto:"+_99;
360
- _99=_99.replace(/./g,function(ch){
361
- if(ch=="@"){
362
- ch=_9d[Math.floor(Math.random()*2)](ch);
363
- }else{
364
- if(ch!=":"){
365
- var r=Math.random();
366
- ch=(r>0.9?_9d[2](ch):r>0.45?_9d[1](ch):_9d[0](ch));
367
- }
368
- }
369
- return ch;
370
- });
371
- _99="<a href=\""+_99+"\">"+_99+"</a>";
372
- _99=_99.replace(/">.+:/g,"\">");
373
- return _99;
374
- };
375
- var _a=function(_a3){
376
- _a3=_a3.replace(/~E(\d+)E/g,function(_a4,m1){
377
- var _a6=parseInt(m1);
378
- return String.fromCharCode(_a6);
379
- });
380
- return _a3;
381
- };
382
- var _72=function(_a7){
383
- _a7=_a7.replace(/^(\t|[ ]{1,4})/gm,"~0");
384
- _a7=_a7.replace(/~0/g,"");
385
- return _a7;
386
- };
387
- var _6=function(_a8){
388
- _a8=_a8.replace(/\t(?=\t)/g," ");
389
- _a8=_a8.replace(/\t/g,"~A~B");
390
- _a8=_a8.replace(/~B(.+?)~A/g,function(_a9,m1,m2){
391
- var _ac=m1;
392
- var _ad=4-_ac.length%4;
393
- for(var i=0;i<_ad;i++){
394
- _ac+=" ";
395
- }
396
- return _ac;
397
- });
398
- _a8=_a8.replace(/~A/g," ");
399
- _a8=_a8.replace(/~B/g,"");
400
- return _a8;
401
- };
402
- var _2e=function(_af,_b0,_b1){
403
- var _b2="(["+_b0.replace(/([\[\]\\])/g,"\\$1")+"])";
404
- if(_b1){
405
- _b2="\\\\"+_b2;
406
- }
407
- var _b3=new RegExp(_b2,"g");
408
- _af=_af.replace(_b3,_94);
409
- return _af;
410
- };
411
- var _94=function(_b4,m1){
412
- var _b6=m1.charCodeAt(0);
413
- return "~E"+_b6+"E";
414
- };
415
- this.obfuscation;
416
- };
417
- var Showdown=Attacklab.showdown;
418
- if(Attacklab.fileLoaded){
419
- Attacklab.fileLoaded("showdown.js");
420
- }
421
-