all repos — NoPaste @ 4d5201f1a9fd36bf5ab4e04de97fc70c12081b9a

Resurrected - The PussTheCat.org fork of NoPaste

scripts/CodeMirror/mode/asn.1/index.html (view raw)

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