index.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <!doctype html>
  2. <title>CodeMirror: ASN.1 mode</title>
  3. <meta charset="utf-8"/>
  4. <link rel=stylesheet href="../../doc/docs.css">
  5. <link rel="stylesheet" href="../../lib/codemirror.css">
  6. <script src="../../lib/codemirror.js"></script>
  7. <script src="asn.1.js"></script>
  8. <style type="text/css">
  9. .CodeMirror {
  10. border-top: 1px solid black;
  11. border-bottom: 1px solid black;
  12. }
  13. </style>
  14. <div id=nav>
  15. <a href="http://codemirror.net"><h1>CodeMirror</h1>
  16. <img id=logo src="../../doc/logo.png">
  17. </a>
  18. <ul>
  19. <li><a href="../../index.html">Home</a>
  20. <li><a href="../../doc/manual.html">Manual</a>
  21. <li><a href="https://github.com/codemirror/codemirror">Code</a>
  22. </ul>
  23. <ul>
  24. <li><a href="../index.html">Language modes</a>
  25. <li><a class=active href="http://en.wikipedia.org/wiki/Abstract_Syntax_Notation_One">ASN.1</a>
  26. </ul>
  27. </div>
  28. <article>
  29. <h2>ASN.1 example</h2>
  30. <div>
  31. <textarea id="ttcn-asn-code">
  32. --
  33. -- Sample ASN.1 Code
  34. --
  35. MyModule DEFINITIONS ::=
  36. BEGIN
  37. MyTypes ::= SEQUENCE {
  38. myObjectId OBJECT IDENTIFIER,
  39. mySeqOf SEQUENCE OF MyInt,
  40. myBitString BIT STRING {
  41. muxToken(0),
  42. modemToken(1)
  43. }
  44. }
  45. MyInt ::= INTEGER (0..65535)
  46. END
  47. </textarea>
  48. </div>
  49. <script>
  50. var ttcnEditor = CodeMirror.fromTextArea(document.getElementById("ttcn-asn-code"), {
  51. lineNumbers: true,
  52. matchBrackets: true,
  53. mode: "text/x-ttcn-asn"
  54. });
  55. ttcnEditor.setSize(400, 400);
  56. var mac = CodeMirror.keyMap.default == CodeMirror.keyMap.macDefault;
  57. CodeMirror.keyMap.default[(mac ? "Cmd" : "Ctrl") + "-Space"] = "autocomplete";
  58. </script>
  59. <br/>
  60. <p><strong>Language:</strong> Abstract Syntax Notation One
  61. (<a href="http://www.itu.int/en/ITU-T/asn1/Pages/introduction.aspx">ASN.1</a>)
  62. </p>
  63. <p><strong>MIME types defined:</strong> <code>text/x-ttcn-asn</code></p>
  64. <br/>
  65. <p>The development of this mode has been sponsored by <a href="http://www.ericsson.com/">Ericsson
  66. </a>.</p>
  67. <p>Coded by Asmelash Tsegay Gebretsadkan </p>
  68. </article>