index.html 2.2 KB

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