Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wp-file-.../lib/codemirr.../mode/asn.1
File: asn.1.js
// CodeMirror, copyright (c) by Marijn Haverbeke and others
[0] Fix | Delete
// Distributed under an MIT license: http://codemirror.net/LICENSE
[1] Fix | Delete
[2] Fix | Delete
(function(mod) {
[3] Fix | Delete
if (typeof exports == "object" && typeof module == "object") // CommonJS
[4] Fix | Delete
mod(require("../../lib/codemirror"));
[5] Fix | Delete
else if (typeof define == "function" && define.amd) // AMD
[6] Fix | Delete
define(["../../lib/codemirror"], mod);
[7] Fix | Delete
else // Plain browser env
[8] Fix | Delete
mod(CodeMirror);
[9] Fix | Delete
})(function(CodeMirror) {
[10] Fix | Delete
"use strict";
[11] Fix | Delete
[12] Fix | Delete
CodeMirror.defineMode("asn.1", function(config, parserConfig) {
[13] Fix | Delete
var indentUnit = config.indentUnit,
[14] Fix | Delete
keywords = parserConfig.keywords || {},
[15] Fix | Delete
cmipVerbs = parserConfig.cmipVerbs || {},
[16] Fix | Delete
compareTypes = parserConfig.compareTypes || {},
[17] Fix | Delete
status = parserConfig.status || {},
[18] Fix | Delete
tags = parserConfig.tags || {},
[19] Fix | Delete
storage = parserConfig.storage || {},
[20] Fix | Delete
modifier = parserConfig.modifier || {},
[21] Fix | Delete
accessTypes = parserConfig.accessTypes|| {},
[22] Fix | Delete
multiLineStrings = parserConfig.multiLineStrings,
[23] Fix | Delete
indentStatements = parserConfig.indentStatements !== false;
[24] Fix | Delete
var isOperatorChar = /[\|\^]/;
[25] Fix | Delete
var curPunc;
[26] Fix | Delete
[27] Fix | Delete
function tokenBase(stream, state) {
[28] Fix | Delete
var ch = stream.next();
[29] Fix | Delete
if (ch == '"' || ch == "'") {
[30] Fix | Delete
state.tokenize = tokenString(ch);
[31] Fix | Delete
return state.tokenize(stream, state);
[32] Fix | Delete
}
[33] Fix | Delete
if (/[\[\]\(\){}:=,;]/.test(ch)) {
[34] Fix | Delete
curPunc = ch;
[35] Fix | Delete
return "punctuation";
[36] Fix | Delete
}
[37] Fix | Delete
if (ch == "-"){
[38] Fix | Delete
if (stream.eat("-")) {
[39] Fix | Delete
stream.skipToEnd();
[40] Fix | Delete
return "comment";
[41] Fix | Delete
}
[42] Fix | Delete
}
[43] Fix | Delete
if (/\d/.test(ch)) {
[44] Fix | Delete
stream.eatWhile(/[\w\.]/);
[45] Fix | Delete
return "number";
[46] Fix | Delete
}
[47] Fix | Delete
if (isOperatorChar.test(ch)) {
[48] Fix | Delete
stream.eatWhile(isOperatorChar);
[49] Fix | Delete
return "operator";
[50] Fix | Delete
}
[51] Fix | Delete
[52] Fix | Delete
stream.eatWhile(/[\w\-]/);
[53] Fix | Delete
var cur = stream.current();
[54] Fix | Delete
if (keywords.propertyIsEnumerable(cur)) return "keyword";
[55] Fix | Delete
if (cmipVerbs.propertyIsEnumerable(cur)) return "variable cmipVerbs";
[56] Fix | Delete
if (compareTypes.propertyIsEnumerable(cur)) return "atom compareTypes";
[57] Fix | Delete
if (status.propertyIsEnumerable(cur)) return "comment status";
[58] Fix | Delete
if (tags.propertyIsEnumerable(cur)) return "variable-3 tags";
[59] Fix | Delete
if (storage.propertyIsEnumerable(cur)) return "builtin storage";
[60] Fix | Delete
if (modifier.propertyIsEnumerable(cur)) return "string-2 modifier";
[61] Fix | Delete
if (accessTypes.propertyIsEnumerable(cur)) return "atom accessTypes";
[62] Fix | Delete
[63] Fix | Delete
return "variable";
[64] Fix | Delete
}
[65] Fix | Delete
[66] Fix | Delete
function tokenString(quote) {
[67] Fix | Delete
return function(stream, state) {
[68] Fix | Delete
var escaped = false, next, end = false;
[69] Fix | Delete
while ((next = stream.next()) != null) {
[70] Fix | Delete
if (next == quote && !escaped){
[71] Fix | Delete
var afterNext = stream.peek();
[72] Fix | Delete
//look if the character if the quote is like the B in '10100010'B
[73] Fix | Delete
if (afterNext){
[74] Fix | Delete
afterNext = afterNext.toLowerCase();
[75] Fix | Delete
if(afterNext == "b" || afterNext == "h" || afterNext == "o")
[76] Fix | Delete
stream.next();
[77] Fix | Delete
}
[78] Fix | Delete
end = true; break;
[79] Fix | Delete
}
[80] Fix | Delete
escaped = !escaped && next == "\\";
[81] Fix | Delete
}
[82] Fix | Delete
if (end || !(escaped || multiLineStrings))
[83] Fix | Delete
state.tokenize = null;
[84] Fix | Delete
return "string";
[85] Fix | Delete
};
[86] Fix | Delete
}
[87] Fix | Delete
[88] Fix | Delete
function Context(indented, column, type, align, prev) {
[89] Fix | Delete
this.indented = indented;
[90] Fix | Delete
this.column = column;
[91] Fix | Delete
this.type = type;
[92] Fix | Delete
this.align = align;
[93] Fix | Delete
this.prev = prev;
[94] Fix | Delete
}
[95] Fix | Delete
function pushContext(state, col, type) {
[96] Fix | Delete
var indent = state.indented;
[97] Fix | Delete
if (state.context && state.context.type == "statement")
[98] Fix | Delete
indent = state.context.indented;
[99] Fix | Delete
return state.context = new Context(indent, col, type, null, state.context);
[100] Fix | Delete
}
[101] Fix | Delete
function popContext(state) {
[102] Fix | Delete
var t = state.context.type;
[103] Fix | Delete
if (t == ")" || t == "]" || t == "}")
[104] Fix | Delete
state.indented = state.context.indented;
[105] Fix | Delete
return state.context = state.context.prev;
[106] Fix | Delete
}
[107] Fix | Delete
[108] Fix | Delete
//Interface
[109] Fix | Delete
return {
[110] Fix | Delete
startState: function(basecolumn) {
[111] Fix | Delete
return {
[112] Fix | Delete
tokenize: null,
[113] Fix | Delete
context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
[114] Fix | Delete
indented: 0,
[115] Fix | Delete
startOfLine: true
[116] Fix | Delete
};
[117] Fix | Delete
},
[118] Fix | Delete
[119] Fix | Delete
token: function(stream, state) {
[120] Fix | Delete
var ctx = state.context;
[121] Fix | Delete
if (stream.sol()) {
[122] Fix | Delete
if (ctx.align == null) ctx.align = false;
[123] Fix | Delete
state.indented = stream.indentation();
[124] Fix | Delete
state.startOfLine = true;
[125] Fix | Delete
}
[126] Fix | Delete
if (stream.eatSpace()) return null;
[127] Fix | Delete
curPunc = null;
[128] Fix | Delete
var style = (state.tokenize || tokenBase)(stream, state);
[129] Fix | Delete
if (style == "comment") return style;
[130] Fix | Delete
if (ctx.align == null) ctx.align = true;
[131] Fix | Delete
[132] Fix | Delete
if ((curPunc == ";" || curPunc == ":" || curPunc == ",")
[133] Fix | Delete
&& ctx.type == "statement"){
[134] Fix | Delete
popContext(state);
[135] Fix | Delete
}
[136] Fix | Delete
else if (curPunc == "{") pushContext(state, stream.column(), "}");
[137] Fix | Delete
else if (curPunc == "[") pushContext(state, stream.column(), "]");
[138] Fix | Delete
else if (curPunc == "(") pushContext(state, stream.column(), ")");
[139] Fix | Delete
else if (curPunc == "}") {
[140] Fix | Delete
while (ctx.type == "statement") ctx = popContext(state);
[141] Fix | Delete
if (ctx.type == "}") ctx = popContext(state);
[142] Fix | Delete
while (ctx.type == "statement") ctx = popContext(state);
[143] Fix | Delete
}
[144] Fix | Delete
else if (curPunc == ctx.type) popContext(state);
[145] Fix | Delete
else if (indentStatements && (((ctx.type == "}" || ctx.type == "top")
[146] Fix | Delete
&& curPunc != ';') || (ctx.type == "statement"
[147] Fix | Delete
&& curPunc == "newstatement")))
[148] Fix | Delete
pushContext(state, stream.column(), "statement");
[149] Fix | Delete
[150] Fix | Delete
state.startOfLine = false;
[151] Fix | Delete
return style;
[152] Fix | Delete
},
[153] Fix | Delete
[154] Fix | Delete
electricChars: "{}",
[155] Fix | Delete
lineComment: "--",
[156] Fix | Delete
fold: "brace"
[157] Fix | Delete
};
[158] Fix | Delete
});
[159] Fix | Delete
[160] Fix | Delete
function words(str) {
[161] Fix | Delete
var obj = {}, words = str.split(" ");
[162] Fix | Delete
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
[163] Fix | Delete
return obj;
[164] Fix | Delete
}
[165] Fix | Delete
[166] Fix | Delete
CodeMirror.defineMIME("text/x-ttcn-asn", {
[167] Fix | Delete
name: "asn.1",
[168] Fix | Delete
keywords: words("DEFINITIONS OBJECTS IF DERIVED INFORMATION ACTION" +
[169] Fix | Delete
" REPLY ANY NAMED CHARACTERIZED BEHAVIOUR REGISTERED" +
[170] Fix | Delete
" WITH AS IDENTIFIED CONSTRAINED BY PRESENT BEGIN" +
[171] Fix | Delete
" IMPORTS FROM UNITS SYNTAX MIN-ACCESS MAX-ACCESS" +
[172] Fix | Delete
" MINACCESS MAXACCESS REVISION STATUS DESCRIPTION" +
[173] Fix | Delete
" SEQUENCE SET COMPONENTS OF CHOICE DistinguishedName" +
[174] Fix | Delete
" ENUMERATED SIZE MODULE END INDEX AUGMENTS EXTENSIBILITY" +
[175] Fix | Delete
" IMPLIED EXPORTS"),
[176] Fix | Delete
cmipVerbs: words("ACTIONS ADD GET NOTIFICATIONS REPLACE REMOVE"),
[177] Fix | Delete
compareTypes: words("OPTIONAL DEFAULT MANAGED MODULE-TYPE MODULE_IDENTITY" +
[178] Fix | Delete
" MODULE-COMPLIANCE OBJECT-TYPE OBJECT-IDENTITY" +
[179] Fix | Delete
" OBJECT-COMPLIANCE MODE CONFIRMED CONDITIONAL" +
[180] Fix | Delete
" SUBORDINATE SUPERIOR CLASS TRUE FALSE NULL" +
[181] Fix | Delete
" TEXTUAL-CONVENTION"),
[182] Fix | Delete
status: words("current deprecated mandatory obsolete"),
[183] Fix | Delete
tags: words("APPLICATION AUTOMATIC EXPLICIT IMPLICIT PRIVATE TAGS" +
[184] Fix | Delete
" UNIVERSAL"),
[185] Fix | Delete
storage: words("BOOLEAN INTEGER OBJECT IDENTIFIER BIT OCTET STRING" +
[186] Fix | Delete
" UTCTime InterfaceIndex IANAifType CMIP-Attribute" +
[187] Fix | Delete
" REAL PACKAGE PACKAGES IpAddress PhysAddress" +
[188] Fix | Delete
" NetworkAddress BITS BMPString TimeStamp TimeTicks" +
[189] Fix | Delete
" TruthValue RowStatus DisplayString GeneralString" +
[190] Fix | Delete
" GraphicString IA5String NumericString" +
[191] Fix | Delete
" PrintableString SnmpAdminAtring TeletexString" +
[192] Fix | Delete
" UTF8String VideotexString VisibleString StringStore" +
[193] Fix | Delete
" ISO646String T61String UniversalString Unsigned32" +
[194] Fix | Delete
" Integer32 Gauge Gauge32 Counter Counter32 Counter64"),
[195] Fix | Delete
modifier: words("ATTRIBUTE ATTRIBUTES MANDATORY-GROUP MANDATORY-GROUPS" +
[196] Fix | Delete
" GROUP GROUPS ELEMENTS EQUALITY ORDERING SUBSTRINGS" +
[197] Fix | Delete
" DEFINED"),
[198] Fix | Delete
accessTypes: words("not-accessible accessible-for-notify read-only" +
[199] Fix | Delete
" read-create read-write"),
[200] Fix | Delete
multiLineStrings: true
[201] Fix | Delete
});
[202] Fix | Delete
});
[203] Fix | Delete
[204] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function