Comparing version 2.0.1 to 2.0.2
{ | ||
"name": "apg", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "An ABNF Parser Generator - generates recursive-descent parsers from grammars written in a superset of Augmented Backus-Naur Form (ABNF)", | ||
@@ -5,0 +5,0 @@ "main": "./src/apg.js", |
@@ -11,3 +11,3 @@ ##JavaScript APG | ||
<li>Creating a local version of the parser generator as well as the parsing library (version 1.0 was library only).</li> | ||
<li>Developing it in the node.js framework.</li> | ||
<li>Developing it in the <a = href="https://nodejs.org/en/">node.js</a> framework.</li> | ||
</ol> | ||
@@ -18,7 +18,10 @@ | ||
<ul> | ||
<li>generates language parsers and translators from a superset of the Augmented Backus-Naur Form (ABNF <a href="https://tools.ietf.org/html/rfc5234">RFC5234</a>) grammar syntax</li> | ||
<li>accepts valid ABNF grammars</li> | ||
<li>use of callback functions keeps the parser's action code separate from the grammar</li> | ||
<li>generates language parsers and translators from a superset of the Augmented Backus-Naur Form | ||
(ABNF) grammar syntax (<a href="https://tools.ietf.org/html/rfc5234">RFC 5234</a>)</li> | ||
<li>accepts valid ABNF grammars, including <a href="https://tools.ietf.org/html/rfc7405">RFC 7405</a> case-sensitive and -insensitive | ||
literal strings of the form <code>%s"abc" & %i"abc"</code> | ||
</li> | ||
<li>accepts <code>AND</code> & <code>NOT</code> syntactic predicate operators for conditional parsing based on specified, look-ahead phrases</li> | ||
<li>accepts User-Defined Terminals (UDTs) which provide user-written, non-Context-Free phrase recognition operators</li> | ||
<li>use of callback functions keeps the parser's action code separate from the grammar</li> | ||
<li>user-written callback functions provide complete monitoring and flow control of the parser</li> | ||
@@ -31,8 +34,7 @@ <li>optional generation of an Abstract Syntax Tree (AST)</li> | ||
<li>extensive attribute generation for an overview of the grammar's characteristics</li> | ||
<li>runs as a node.js, desktop cli function</li> | ||
<li>runs as a <a = href="https://nodejs.org/en/">node.js</a>, desktop cli function</li> | ||
</ul> | ||
**Installation:** | ||
*Requires node.js and npm* | ||
**Installation:** | ||
*Requires node.js and npm.* | ||
``` | ||
@@ -53,3 +55,4 @@ git clone https://github.com/ldthomas/apg-js2.git apg | ||
Note: If there is a name conflict (for example, Automated Password Generator) there are a couple of options for | ||
Note: If there is a name conflict on your system | ||
(for example, Automated Password Generator) there are a couple of options for | ||
resolving the conflict. | ||
@@ -64,3 +67,3 @@ <ol> | ||
apg is meant to be installed globally and used as a command line application. | ||
APG is meant to be installed globally and used as a command line application. | ||
However, if you want a local copy you can use it as follows. | ||
@@ -76,7 +79,2 @@ ``` | ||
To generate a local copy of the documentation:<br> | ||
`npm install -g docco` (if not already installed)<br> | ||
`./docco-gen`<br> | ||
Click on `./docs/index.html` to get started. | ||
**Examples:** | ||
@@ -83,0 +81,0 @@ See <a href="https://github.com/ldthomas/apg-js2-examples">apg-js2-examples</a> for examples of running JavaScript APG 2.0 and the parsers it generates. |
@@ -0,21 +1,24 @@ | ||
// Generated by JavaScript APG, Version 2.0 [`apg-js2`](https://github.com/ldthomas/apg-js2) | ||
module.exports = function(){ | ||
"use strict"; | ||
//``` | ||
// SUMMARY | ||
// rules = 78 | ||
// rules = 79 | ||
// udts = 0 | ||
// opcodes = 307 | ||
// ALT = 35 | ||
// opcodes = 312 | ||
// ALT = 36 | ||
// CAT = 40 | ||
// RNM = 120 | ||
// RNM = 121 | ||
// UDT = 0 | ||
// REP = 27 | ||
// REP = 28 | ||
// AND = 0 | ||
// NOT = 0 | ||
// TLS = 0 | ||
// TLS = 2 | ||
// TBS = 50 | ||
// TRG = 35 | ||
// characters = [9 - 126] | ||
//``` | ||
// CALLBACK LIST PROTOTYPE (true, false or function reference) | ||
/* CALLBACK LIST PROTOTYPE (true, false or function reference) */ | ||
this.callbacks = []; | ||
@@ -87,2 +90,3 @@ this.callbacks['alphanum'] = false; | ||
this.callbacks['tbsop'] = false; | ||
this.callbacks['tlscase'] = false; | ||
this.callbacks['tlsclose'] = false; | ||
@@ -102,6 +106,6 @@ this.callbacks['tlsop'] = false; | ||
// OBJECT IDENTIFIER (for internal parser use) | ||
/* OBJECT IDENTIFIER (for internal parser use) */ | ||
this.grammarObject = 'grammarObject'; | ||
// RULES | ||
/* RULES */ | ||
this.rules = []; | ||
@@ -148,46 +152,47 @@ this.rules[0] = {name: 'File', lower: 'file', index: 0}; | ||
this.rules[39] = {name: 'TlsOp', lower: 'tlsop', index: 39}; | ||
this.rules[40] = {name: 'TlsOpen', lower: 'tlsopen', index: 40}; | ||
this.rules[41] = {name: 'TlsClose', lower: 'tlsclose', index: 41}; | ||
this.rules[42] = {name: 'TlsString', lower: 'tlsstring', index: 42}; | ||
this.rules[43] = {name: 'StringTab', lower: 'stringtab', index: 43}; | ||
this.rules[44] = {name: 'ClsOp', lower: 'clsop', index: 44}; | ||
this.rules[45] = {name: 'ClsOpen', lower: 'clsopen', index: 45}; | ||
this.rules[46] = {name: 'ClsClose', lower: 'clsclose', index: 46}; | ||
this.rules[47] = {name: 'ClsString', lower: 'clsstring', index: 47}; | ||
this.rules[48] = {name: 'ProsVal', lower: 'prosval', index: 48}; | ||
this.rules[49] = {name: 'ProsValOpen', lower: 'prosvalopen', index: 49}; | ||
this.rules[50] = {name: 'ProsValString', lower: 'prosvalstring', index: 50}; | ||
this.rules[51] = {name: 'ProsValClose', lower: 'prosvalclose', index: 51}; | ||
this.rules[52] = {name: 'rep-min', lower: 'rep-min', index: 52}; | ||
this.rules[53] = {name: 'rep-min-max', lower: 'rep-min-max', index: 53}; | ||
this.rules[54] = {name: 'rep-max', lower: 'rep-max', index: 54}; | ||
this.rules[55] = {name: 'rep-num', lower: 'rep-num', index: 55}; | ||
this.rules[56] = {name: 'dString', lower: 'dstring', index: 56}; | ||
this.rules[57] = {name: 'xString', lower: 'xstring', index: 57}; | ||
this.rules[58] = {name: 'bString', lower: 'bstring', index: 58}; | ||
this.rules[59] = {name: 'Dec', lower: 'dec', index: 59}; | ||
this.rules[60] = {name: 'Hex', lower: 'hex', index: 60}; | ||
this.rules[61] = {name: 'Bin', lower: 'bin', index: 61}; | ||
this.rules[62] = {name: 'dmin', lower: 'dmin', index: 62}; | ||
this.rules[63] = {name: 'dmax', lower: 'dmax', index: 63}; | ||
this.rules[64] = {name: 'bmin', lower: 'bmin', index: 64}; | ||
this.rules[65] = {name: 'bmax', lower: 'bmax', index: 65}; | ||
this.rules[66] = {name: 'xmin', lower: 'xmin', index: 66}; | ||
this.rules[67] = {name: 'xmax', lower: 'xmax', index: 67}; | ||
this.rules[68] = {name: 'dnum', lower: 'dnum', index: 68}; | ||
this.rules[69] = {name: 'bnum', lower: 'bnum', index: 69}; | ||
this.rules[70] = {name: 'xnum', lower: 'xnum', index: 70}; | ||
this.rules[71] = {name: 'alphanum', lower: 'alphanum', index: 71}; | ||
this.rules[72] = {name: 'owsp', lower: 'owsp', index: 72}; | ||
this.rules[73] = {name: 'wsp', lower: 'wsp', index: 73}; | ||
this.rules[74] = {name: 'space', lower: 'space', index: 74}; | ||
this.rules[75] = {name: 'comment', lower: 'comment', index: 75}; | ||
this.rules[76] = {name: 'LineEnd', lower: 'lineend', index: 76}; | ||
this.rules[77] = {name: 'LineContinue', lower: 'linecontinue', index: 77}; | ||
this.rules[40] = {name: 'TlsCase', lower: 'tlscase', index: 40}; | ||
this.rules[41] = {name: 'TlsOpen', lower: 'tlsopen', index: 41}; | ||
this.rules[42] = {name: 'TlsClose', lower: 'tlsclose', index: 42}; | ||
this.rules[43] = {name: 'TlsString', lower: 'tlsstring', index: 43}; | ||
this.rules[44] = {name: 'StringTab', lower: 'stringtab', index: 44}; | ||
this.rules[45] = {name: 'ClsOp', lower: 'clsop', index: 45}; | ||
this.rules[46] = {name: 'ClsOpen', lower: 'clsopen', index: 46}; | ||
this.rules[47] = {name: 'ClsClose', lower: 'clsclose', index: 47}; | ||
this.rules[48] = {name: 'ClsString', lower: 'clsstring', index: 48}; | ||
this.rules[49] = {name: 'ProsVal', lower: 'prosval', index: 49}; | ||
this.rules[50] = {name: 'ProsValOpen', lower: 'prosvalopen', index: 50}; | ||
this.rules[51] = {name: 'ProsValString', lower: 'prosvalstring', index: 51}; | ||
this.rules[52] = {name: 'ProsValClose', lower: 'prosvalclose', index: 52}; | ||
this.rules[53] = {name: 'rep-min', lower: 'rep-min', index: 53}; | ||
this.rules[54] = {name: 'rep-min-max', lower: 'rep-min-max', index: 54}; | ||
this.rules[55] = {name: 'rep-max', lower: 'rep-max', index: 55}; | ||
this.rules[56] = {name: 'rep-num', lower: 'rep-num', index: 56}; | ||
this.rules[57] = {name: 'dString', lower: 'dstring', index: 57}; | ||
this.rules[58] = {name: 'xString', lower: 'xstring', index: 58}; | ||
this.rules[59] = {name: 'bString', lower: 'bstring', index: 59}; | ||
this.rules[60] = {name: 'Dec', lower: 'dec', index: 60}; | ||
this.rules[61] = {name: 'Hex', lower: 'hex', index: 61}; | ||
this.rules[62] = {name: 'Bin', lower: 'bin', index: 62}; | ||
this.rules[63] = {name: 'dmin', lower: 'dmin', index: 63}; | ||
this.rules[64] = {name: 'dmax', lower: 'dmax', index: 64}; | ||
this.rules[65] = {name: 'bmin', lower: 'bmin', index: 65}; | ||
this.rules[66] = {name: 'bmax', lower: 'bmax', index: 66}; | ||
this.rules[67] = {name: 'xmin', lower: 'xmin', index: 67}; | ||
this.rules[68] = {name: 'xmax', lower: 'xmax', index: 68}; | ||
this.rules[69] = {name: 'dnum', lower: 'dnum', index: 69}; | ||
this.rules[70] = {name: 'bnum', lower: 'bnum', index: 70}; | ||
this.rules[71] = {name: 'xnum', lower: 'xnum', index: 71}; | ||
this.rules[72] = {name: 'alphanum', lower: 'alphanum', index: 72}; | ||
this.rules[73] = {name: 'owsp', lower: 'owsp', index: 73}; | ||
this.rules[74] = {name: 'wsp', lower: 'wsp', index: 74}; | ||
this.rules[75] = {name: 'space', lower: 'space', index: 75}; | ||
this.rules[76] = {name: 'comment', lower: 'comment', index: 76}; | ||
this.rules[77] = {name: 'LineEnd', lower: 'lineend', index: 77}; | ||
this.rules[78] = {name: 'LineContinue', lower: 'linecontinue', index: 78}; | ||
// UDTS | ||
/* UDTS */ | ||
this.udts = []; | ||
// OPCODES | ||
// File | ||
/* OPCODES */ | ||
/* File */ | ||
this.rules[0].opcodes = []; | ||
@@ -200,3 +205,3 @@ this.rules[0].opcodes[0] = {type: 3, min: 0, max: Infinity};// REP | ||
// BlankLine | ||
/* BlankLine */ | ||
this.rules[1].opcodes = []; | ||
@@ -209,27 +214,27 @@ this.rules[1].opcodes[0] = {type: 2, children: [1,5,7]};// CAT | ||
this.rules[1].opcodes[5] = {type: 3, min: 0, max: 1};// REP | ||
this.rules[1].opcodes[6] = {type: 4, index: 75};// RNM(comment) | ||
this.rules[1].opcodes[7] = {type: 4, index: 76};// RNM(LineEnd) | ||
this.rules[1].opcodes[6] = {type: 4, index: 76};// RNM(comment) | ||
this.rules[1].opcodes[7] = {type: 4, index: 77};// RNM(LineEnd) | ||
// Rule | ||
/* Rule */ | ||
this.rules[2].opcodes = []; | ||
this.rules[2].opcodes[0] = {type: 2, children: [1,2,3,4]};// CAT | ||
this.rules[2].opcodes[1] = {type: 4, index: 3};// RNM(RuleLookup) | ||
this.rules[2].opcodes[2] = {type: 4, index: 72};// RNM(owsp) | ||
this.rules[2].opcodes[2] = {type: 4, index: 73};// RNM(owsp) | ||
this.rules[2].opcodes[3] = {type: 4, index: 14};// RNM(Alternation) | ||
this.rules[2].opcodes[4] = {type: 1, children: [5,8]};// ALT | ||
this.rules[2].opcodes[5] = {type: 2, children: [6,7]};// CAT | ||
this.rules[2].opcodes[6] = {type: 4, index: 72};// RNM(owsp) | ||
this.rules[2].opcodes[7] = {type: 4, index: 76};// RNM(LineEnd) | ||
this.rules[2].opcodes[6] = {type: 4, index: 73};// RNM(owsp) | ||
this.rules[2].opcodes[7] = {type: 4, index: 77};// RNM(LineEnd) | ||
this.rules[2].opcodes[8] = {type: 2, children: [9,10]};// CAT | ||
this.rules[2].opcodes[9] = {type: 4, index: 13};// RNM(LineEndError) | ||
this.rules[2].opcodes[10] = {type: 4, index: 76};// RNM(LineEnd) | ||
this.rules[2].opcodes[10] = {type: 4, index: 77};// RNM(LineEnd) | ||
// RuleLookup | ||
/* RuleLookup */ | ||
this.rules[3].opcodes = []; | ||
this.rules[3].opcodes[0] = {type: 2, children: [1,2,3]};// CAT | ||
this.rules[3].opcodes[1] = {type: 4, index: 4};// RNM(RuleNameTest) | ||
this.rules[3].opcodes[2] = {type: 4, index: 72};// RNM(owsp) | ||
this.rules[3].opcodes[2] = {type: 4, index: 73};// RNM(owsp) | ||
this.rules[3].opcodes[3] = {type: 4, index: 7};// RNM(DefinedAsTest) | ||
// RuleNameTest | ||
/* RuleNameTest */ | ||
this.rules[4].opcodes = []; | ||
@@ -240,7 +245,7 @@ this.rules[4].opcodes[0] = {type: 1, children: [1,2]};// ALT | ||
// RuleName | ||
/* RuleName */ | ||
this.rules[5].opcodes = []; | ||
this.rules[5].opcodes[0] = {type: 4, index: 71};// RNM(alphanum) | ||
this.rules[5].opcodes[0] = {type: 4, index: 72};// RNM(alphanum) | ||
// RuleNameError | ||
/* RuleNameError */ | ||
this.rules[6].opcodes = []; | ||
@@ -252,3 +257,3 @@ this.rules[6].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP | ||
// DefinedAsTest | ||
/* DefinedAsTest */ | ||
this.rules[7].opcodes = []; | ||
@@ -259,3 +264,3 @@ this.rules[7].opcodes[0] = {type: 1, children: [1,2]};// ALT | ||
// DefinedAsError | ||
/* DefinedAsError */ | ||
this.rules[8].opcodes = []; | ||
@@ -265,3 +270,3 @@ this.rules[8].opcodes[0] = {type: 3, min: 1, max: 2};// REP | ||
// DefinedAs | ||
/* DefinedAs */ | ||
this.rules[9].opcodes = []; | ||
@@ -272,11 +277,11 @@ this.rules[9].opcodes[0] = {type: 1, children: [1,2]};// ALT | ||
// Defined | ||
/* Defined */ | ||
this.rules[10].opcodes = []; | ||
this.rules[10].opcodes[0] = {type: 10, string: [61]};// TBS | ||
// IncAlt | ||
/* IncAlt */ | ||
this.rules[11].opcodes = []; | ||
this.rules[11].opcodes[0] = {type: 10, string: [61,47]};// TBS | ||
// RuleError | ||
/* RuleError */ | ||
this.rules[12].opcodes = []; | ||
@@ -288,6 +293,6 @@ this.rules[12].opcodes[0] = {type: 2, children: [1,6]};// CAT | ||
this.rules[12].opcodes[4] = {type: 10, string: [9]};// TBS | ||
this.rules[12].opcodes[5] = {type: 4, index: 77};// RNM(LineContinue) | ||
this.rules[12].opcodes[6] = {type: 4, index: 76};// RNM(LineEnd) | ||
this.rules[12].opcodes[5] = {type: 4, index: 78};// RNM(LineContinue) | ||
this.rules[12].opcodes[6] = {type: 4, index: 77};// RNM(LineEnd) | ||
// LineEndError | ||
/* LineEndError */ | ||
this.rules[13].opcodes = []; | ||
@@ -298,5 +303,5 @@ this.rules[13].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP | ||
this.rules[13].opcodes[3] = {type: 10, string: [9]};// TBS | ||
this.rules[13].opcodes[4] = {type: 4, index: 77};// RNM(LineContinue) | ||
this.rules[13].opcodes[4] = {type: 4, index: 78};// RNM(LineContinue) | ||
// Alternation | ||
/* Alternation */ | ||
this.rules[14].opcodes = []; | ||
@@ -307,7 +312,7 @@ this.rules[14].opcodes[0] = {type: 2, children: [1,2]};// CAT | ||
this.rules[14].opcodes[3] = {type: 2, children: [4,5,6]};// CAT | ||
this.rules[14].opcodes[4] = {type: 4, index: 72};// RNM(owsp) | ||
this.rules[14].opcodes[4] = {type: 4, index: 73};// RNM(owsp) | ||
this.rules[14].opcodes[5] = {type: 4, index: 32};// RNM(AltOp) | ||
this.rules[14].opcodes[6] = {type: 4, index: 15};// RNM(Concatenation) | ||
// Concatenation | ||
/* Concatenation */ | ||
this.rules[15].opcodes = []; | ||
@@ -321,3 +326,3 @@ this.rules[15].opcodes[0] = {type: 2, children: [1,2]};// CAT | ||
// Repetition | ||
/* Repetition */ | ||
this.rules[16].opcodes = []; | ||
@@ -336,3 +341,3 @@ this.rules[16].opcodes[0] = {type: 2, children: [1,6]};// CAT | ||
// BasicElement | ||
/* BasicElement */ | ||
this.rules[17].opcodes = []; | ||
@@ -345,6 +350,6 @@ this.rules[17].opcodes[0] = {type: 1, children: [1,2,3,4,5,6,7]};// ALT | ||
this.rules[17].opcodes[5] = {type: 4, index: 39};// RNM(TlsOp) | ||
this.rules[17].opcodes[6] = {type: 4, index: 44};// RNM(ClsOp) | ||
this.rules[17].opcodes[7] = {type: 4, index: 48};// RNM(ProsVal) | ||
this.rules[17].opcodes[6] = {type: 4, index: 45};// RNM(ClsOp) | ||
this.rules[17].opcodes[7] = {type: 4, index: 49};// RNM(ProsVal) | ||
// BasicElementError | ||
/* BasicElementError */ | ||
this.rules[18].opcodes = []; | ||
@@ -358,3 +363,3 @@ this.rules[18].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP | ||
// Group | ||
/* Group */ | ||
this.rules[19].opcodes = []; | ||
@@ -368,3 +373,3 @@ this.rules[19].opcodes[0] = {type: 2, children: [1,2,3]};// CAT | ||
// GroupError | ||
/* GroupError */ | ||
this.rules[20].opcodes = []; | ||
@@ -378,15 +383,15 @@ this.rules[20].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP | ||
// GroupOpen | ||
/* GroupOpen */ | ||
this.rules[21].opcodes = []; | ||
this.rules[21].opcodes[0] = {type: 2, children: [1,2]};// CAT | ||
this.rules[21].opcodes[1] = {type: 10, string: [40]};// TBS | ||
this.rules[21].opcodes[2] = {type: 4, index: 72};// RNM(owsp) | ||
this.rules[21].opcodes[2] = {type: 4, index: 73};// RNM(owsp) | ||
// GroupClose | ||
/* GroupClose */ | ||
this.rules[22].opcodes = []; | ||
this.rules[22].opcodes[0] = {type: 2, children: [1,2]};// CAT | ||
this.rules[22].opcodes[1] = {type: 4, index: 72};// RNM(owsp) | ||
this.rules[22].opcodes[1] = {type: 4, index: 73};// RNM(owsp) | ||
this.rules[22].opcodes[2] = {type: 10, string: [41]};// TBS | ||
// Option | ||
/* Option */ | ||
this.rules[23].opcodes = []; | ||
@@ -400,3 +405,3 @@ this.rules[23].opcodes[0] = {type: 2, children: [1,2,3]};// CAT | ||
// OptionError | ||
/* OptionError */ | ||
this.rules[24].opcodes = []; | ||
@@ -410,19 +415,19 @@ this.rules[24].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP | ||
// OptionOpen | ||
/* OptionOpen */ | ||
this.rules[25].opcodes = []; | ||
this.rules[25].opcodes[0] = {type: 2, children: [1,2]};// CAT | ||
this.rules[25].opcodes[1] = {type: 10, string: [91]};// TBS | ||
this.rules[25].opcodes[2] = {type: 4, index: 72};// RNM(owsp) | ||
this.rules[25].opcodes[2] = {type: 4, index: 73};// RNM(owsp) | ||
// OptionClose | ||
/* OptionClose */ | ||
this.rules[26].opcodes = []; | ||
this.rules[26].opcodes[0] = {type: 2, children: [1,2]};// CAT | ||
this.rules[26].opcodes[1] = {type: 4, index: 72};// RNM(owsp) | ||
this.rules[26].opcodes[1] = {type: 4, index: 73};// RNM(owsp) | ||
this.rules[26].opcodes[2] = {type: 10, string: [93]};// TBS | ||
// RnmOp | ||
/* RnmOp */ | ||
this.rules[27].opcodes = []; | ||
this.rules[27].opcodes[0] = {type: 4, index: 71};// RNM(alphanum) | ||
this.rules[27].opcodes[0] = {type: 4, index: 72};// RNM(alphanum) | ||
// UdtOp | ||
/* UdtOp */ | ||
this.rules[28].opcodes = []; | ||
@@ -433,53 +438,53 @@ this.rules[28].opcodes[0] = {type: 1, children: [1,2]};// ALT | ||
// udt-non-empty | ||
/* udt-non-empty */ | ||
this.rules[29].opcodes = []; | ||
this.rules[29].opcodes[0] = {type: 2, children: [1,2]};// CAT | ||
this.rules[29].opcodes[1] = {type: 10, string: [117,95]};// TBS | ||
this.rules[29].opcodes[2] = {type: 4, index: 71};// RNM(alphanum) | ||
this.rules[29].opcodes[2] = {type: 4, index: 72};// RNM(alphanum) | ||
// udt-empty | ||
/* udt-empty */ | ||
this.rules[30].opcodes = []; | ||
this.rules[30].opcodes[0] = {type: 2, children: [1,2]};// CAT | ||
this.rules[30].opcodes[1] = {type: 10, string: [101,95]};// TBS | ||
this.rules[30].opcodes[2] = {type: 4, index: 71};// RNM(alphanum) | ||
this.rules[30].opcodes[2] = {type: 4, index: 72};// RNM(alphanum) | ||
// RepOp | ||
/* RepOp */ | ||
this.rules[31].opcodes = []; | ||
this.rules[31].opcodes[0] = {type: 1, children: [1,5,8,11,12]};// ALT | ||
this.rules[31].opcodes[1] = {type: 2, children: [2,3,4]};// CAT | ||
this.rules[31].opcodes[2] = {type: 4, index: 52};// RNM(rep-min) | ||
this.rules[31].opcodes[2] = {type: 4, index: 53};// RNM(rep-min) | ||
this.rules[31].opcodes[3] = {type: 4, index: 34};// RNM(StarOp) | ||
this.rules[31].opcodes[4] = {type: 4, index: 54};// RNM(rep-max) | ||
this.rules[31].opcodes[4] = {type: 4, index: 55};// RNM(rep-max) | ||
this.rules[31].opcodes[5] = {type: 2, children: [6,7]};// CAT | ||
this.rules[31].opcodes[6] = {type: 4, index: 52};// RNM(rep-min) | ||
this.rules[31].opcodes[6] = {type: 4, index: 53};// RNM(rep-min) | ||
this.rules[31].opcodes[7] = {type: 4, index: 34};// RNM(StarOp) | ||
this.rules[31].opcodes[8] = {type: 2, children: [9,10]};// CAT | ||
this.rules[31].opcodes[9] = {type: 4, index: 34};// RNM(StarOp) | ||
this.rules[31].opcodes[10] = {type: 4, index: 54};// RNM(rep-max) | ||
this.rules[31].opcodes[10] = {type: 4, index: 55};// RNM(rep-max) | ||
this.rules[31].opcodes[11] = {type: 4, index: 34};// RNM(StarOp) | ||
this.rules[31].opcodes[12] = {type: 4, index: 53};// RNM(rep-min-max) | ||
this.rules[31].opcodes[12] = {type: 4, index: 54};// RNM(rep-min-max) | ||
// AltOp | ||
/* AltOp */ | ||
this.rules[32].opcodes = []; | ||
this.rules[32].opcodes[0] = {type: 2, children: [1,2]};// CAT | ||
this.rules[32].opcodes[1] = {type: 10, string: [47]};// TBS | ||
this.rules[32].opcodes[2] = {type: 4, index: 72};// RNM(owsp) | ||
this.rules[32].opcodes[2] = {type: 4, index: 73};// RNM(owsp) | ||
// CatOp | ||
/* CatOp */ | ||
this.rules[33].opcodes = []; | ||
this.rules[33].opcodes[0] = {type: 4, index: 73};// RNM(wsp) | ||
this.rules[33].opcodes[0] = {type: 4, index: 74};// RNM(wsp) | ||
// StarOp | ||
/* StarOp */ | ||
this.rules[34].opcodes = []; | ||
this.rules[34].opcodes[0] = {type: 10, string: [42]};// TBS | ||
// AndOp | ||
/* AndOp */ | ||
this.rules[35].opcodes = []; | ||
this.rules[35].opcodes[0] = {type: 10, string: [38]};// TBS | ||
// NotOp | ||
/* NotOp */ | ||
this.rules[36].opcodes = []; | ||
this.rules[36].opcodes[0] = {type: 10, string: [33]};// TBS | ||
// TrgOp | ||
/* TrgOp */ | ||
this.rules[37].opcodes = []; | ||
@@ -490,18 +495,18 @@ this.rules[37].opcodes[0] = {type: 2, children: [1,2]};// CAT | ||
this.rules[37].opcodes[3] = {type: 2, children: [4,5,6,7]};// CAT | ||
this.rules[37].opcodes[4] = {type: 4, index: 59};// RNM(Dec) | ||
this.rules[37].opcodes[5] = {type: 4, index: 62};// RNM(dmin) | ||
this.rules[37].opcodes[4] = {type: 4, index: 60};// RNM(Dec) | ||
this.rules[37].opcodes[5] = {type: 4, index: 63};// RNM(dmin) | ||
this.rules[37].opcodes[6] = {type: 10, string: [45]};// TBS | ||
this.rules[37].opcodes[7] = {type: 4, index: 63};// RNM(dmax) | ||
this.rules[37].opcodes[7] = {type: 4, index: 64};// RNM(dmax) | ||
this.rules[37].opcodes[8] = {type: 2, children: [9,10,11,12]};// CAT | ||
this.rules[37].opcodes[9] = {type: 4, index: 60};// RNM(Hex) | ||
this.rules[37].opcodes[10] = {type: 4, index: 66};// RNM(xmin) | ||
this.rules[37].opcodes[9] = {type: 4, index: 61};// RNM(Hex) | ||
this.rules[37].opcodes[10] = {type: 4, index: 67};// RNM(xmin) | ||
this.rules[37].opcodes[11] = {type: 10, string: [45]};// TBS | ||
this.rules[37].opcodes[12] = {type: 4, index: 67};// RNM(xmax) | ||
this.rules[37].opcodes[12] = {type: 4, index: 68};// RNM(xmax) | ||
this.rules[37].opcodes[13] = {type: 2, children: [14,15,16,17]};// CAT | ||
this.rules[37].opcodes[14] = {type: 4, index: 61};// RNM(Bin) | ||
this.rules[37].opcodes[15] = {type: 4, index: 64};// RNM(bmin) | ||
this.rules[37].opcodes[14] = {type: 4, index: 62};// RNM(Bin) | ||
this.rules[37].opcodes[15] = {type: 4, index: 65};// RNM(bmin) | ||
this.rules[37].opcodes[16] = {type: 10, string: [45]};// TBS | ||
this.rules[37].opcodes[17] = {type: 4, index: 65};// RNM(bmax) | ||
this.rules[37].opcodes[17] = {type: 4, index: 66};// RNM(bmax) | ||
// TbsOp | ||
/* TbsOp */ | ||
this.rules[38].opcodes = []; | ||
@@ -512,244 +517,253 @@ this.rules[38].opcodes[0] = {type: 2, children: [1,2]};// CAT | ||
this.rules[38].opcodes[3] = {type: 2, children: [4,5,6]};// CAT | ||
this.rules[38].opcodes[4] = {type: 4, index: 59};// RNM(Dec) | ||
this.rules[38].opcodes[5] = {type: 4, index: 56};// RNM(dString) | ||
this.rules[38].opcodes[4] = {type: 4, index: 60};// RNM(Dec) | ||
this.rules[38].opcodes[5] = {type: 4, index: 57};// RNM(dString) | ||
this.rules[38].opcodes[6] = {type: 3, min: 0, max: Infinity};// REP | ||
this.rules[38].opcodes[7] = {type: 2, children: [8,9]};// CAT | ||
this.rules[38].opcodes[8] = {type: 10, string: [46]};// TBS | ||
this.rules[38].opcodes[9] = {type: 4, index: 56};// RNM(dString) | ||
this.rules[38].opcodes[9] = {type: 4, index: 57};// RNM(dString) | ||
this.rules[38].opcodes[10] = {type: 2, children: [11,12,13]};// CAT | ||
this.rules[38].opcodes[11] = {type: 4, index: 60};// RNM(Hex) | ||
this.rules[38].opcodes[12] = {type: 4, index: 57};// RNM(xString) | ||
this.rules[38].opcodes[11] = {type: 4, index: 61};// RNM(Hex) | ||
this.rules[38].opcodes[12] = {type: 4, index: 58};// RNM(xString) | ||
this.rules[38].opcodes[13] = {type: 3, min: 0, max: Infinity};// REP | ||
this.rules[38].opcodes[14] = {type: 2, children: [15,16]};// CAT | ||
this.rules[38].opcodes[15] = {type: 10, string: [46]};// TBS | ||
this.rules[38].opcodes[16] = {type: 4, index: 57};// RNM(xString) | ||
this.rules[38].opcodes[16] = {type: 4, index: 58};// RNM(xString) | ||
this.rules[38].opcodes[17] = {type: 2, children: [18,19,20]};// CAT | ||
this.rules[38].opcodes[18] = {type: 4, index: 61};// RNM(Bin) | ||
this.rules[38].opcodes[19] = {type: 4, index: 58};// RNM(bString) | ||
this.rules[38].opcodes[18] = {type: 4, index: 62};// RNM(Bin) | ||
this.rules[38].opcodes[19] = {type: 4, index: 59};// RNM(bString) | ||
this.rules[38].opcodes[20] = {type: 3, min: 0, max: Infinity};// REP | ||
this.rules[38].opcodes[21] = {type: 2, children: [22,23]};// CAT | ||
this.rules[38].opcodes[22] = {type: 10, string: [46]};// TBS | ||
this.rules[38].opcodes[23] = {type: 4, index: 58};// RNM(bString) | ||
this.rules[38].opcodes[23] = {type: 4, index: 59};// RNM(bString) | ||
// TlsOp | ||
/* TlsOp */ | ||
this.rules[39].opcodes = []; | ||
this.rules[39].opcodes[0] = {type: 2, children: [1,2,3]};// CAT | ||
this.rules[39].opcodes[1] = {type: 4, index: 40};// RNM(TlsOpen) | ||
this.rules[39].opcodes[2] = {type: 4, index: 42};// RNM(TlsString) | ||
this.rules[39].opcodes[3] = {type: 4, index: 41};// RNM(TlsClose) | ||
this.rules[39].opcodes[0] = {type: 2, children: [1,2,3,4]};// CAT | ||
this.rules[39].opcodes[1] = {type: 4, index: 40};// RNM(TlsCase) | ||
this.rules[39].opcodes[2] = {type: 4, index: 41};// RNM(TlsOpen) | ||
this.rules[39].opcodes[3] = {type: 4, index: 43};// RNM(TlsString) | ||
this.rules[39].opcodes[4] = {type: 4, index: 42};// RNM(TlsClose) | ||
// TlsOpen | ||
/* TlsCase */ | ||
this.rules[40].opcodes = []; | ||
this.rules[40].opcodes[0] = {type: 10, string: [34]};// TBS | ||
this.rules[40].opcodes[0] = {type: 3, min: 0, max: 1};// REP | ||
this.rules[40].opcodes[1] = {type: 1, children: [2,3]};// ALT | ||
this.rules[40].opcodes[2] = {type: 9, string: [37,105]};// TLS | ||
this.rules[40].opcodes[3] = {type: 9, string: [37,115]};// TLS | ||
// TlsClose | ||
/* TlsOpen */ | ||
this.rules[41].opcodes = []; | ||
this.rules[41].opcodes[0] = {type: 10, string: [34]};// TBS | ||
// TlsString | ||
/* TlsClose */ | ||
this.rules[42].opcodes = []; | ||
this.rules[42].opcodes[0] = {type: 3, min: 0, max: Infinity};// REP | ||
this.rules[42].opcodes[1] = {type: 1, children: [2,3,4]};// ALT | ||
this.rules[42].opcodes[2] = {type: 8, min: 32, max: 33};// TRG | ||
this.rules[42].opcodes[3] = {type: 8, min: 35, max: 126};// TRG | ||
this.rules[42].opcodes[4] = {type: 4, index: 43};// RNM(StringTab) | ||
this.rules[42].opcodes[0] = {type: 10, string: [34]};// TBS | ||
// StringTab | ||
/* TlsString */ | ||
this.rules[43].opcodes = []; | ||
this.rules[43].opcodes[0] = {type: 10, string: [9]};// TBS | ||
this.rules[43].opcodes[0] = {type: 3, min: 0, max: Infinity};// REP | ||
this.rules[43].opcodes[1] = {type: 1, children: [2,3,4]};// ALT | ||
this.rules[43].opcodes[2] = {type: 8, min: 32, max: 33};// TRG | ||
this.rules[43].opcodes[3] = {type: 8, min: 35, max: 126};// TRG | ||
this.rules[43].opcodes[4] = {type: 4, index: 44};// RNM(StringTab) | ||
// ClsOp | ||
/* StringTab */ | ||
this.rules[44].opcodes = []; | ||
this.rules[44].opcodes[0] = {type: 2, children: [1,2,3]};// CAT | ||
this.rules[44].opcodes[1] = {type: 4, index: 45};// RNM(ClsOpen) | ||
this.rules[44].opcodes[2] = {type: 4, index: 47};// RNM(ClsString) | ||
this.rules[44].opcodes[3] = {type: 4, index: 46};// RNM(ClsClose) | ||
this.rules[44].opcodes[0] = {type: 10, string: [9]};// TBS | ||
// ClsOpen | ||
/* ClsOp */ | ||
this.rules[45].opcodes = []; | ||
this.rules[45].opcodes[0] = {type: 10, string: [39]};// TBS | ||
this.rules[45].opcodes[0] = {type: 2, children: [1,2,3]};// CAT | ||
this.rules[45].opcodes[1] = {type: 4, index: 46};// RNM(ClsOpen) | ||
this.rules[45].opcodes[2] = {type: 4, index: 48};// RNM(ClsString) | ||
this.rules[45].opcodes[3] = {type: 4, index: 47};// RNM(ClsClose) | ||
// ClsClose | ||
/* ClsOpen */ | ||
this.rules[46].opcodes = []; | ||
this.rules[46].opcodes[0] = {type: 10, string: [39]};// TBS | ||
// ClsString | ||
/* ClsClose */ | ||
this.rules[47].opcodes = []; | ||
this.rules[47].opcodes[0] = {type: 3, min: 0, max: Infinity};// REP | ||
this.rules[47].opcodes[1] = {type: 1, children: [2,3,4]};// ALT | ||
this.rules[47].opcodes[2] = {type: 8, min: 32, max: 38};// TRG | ||
this.rules[47].opcodes[3] = {type: 8, min: 40, max: 126};// TRG | ||
this.rules[47].opcodes[4] = {type: 4, index: 43};// RNM(StringTab) | ||
this.rules[47].opcodes[0] = {type: 10, string: [39]};// TBS | ||
// ProsVal | ||
/* ClsString */ | ||
this.rules[48].opcodes = []; | ||
this.rules[48].opcodes[0] = {type: 2, children: [1,2,3]};// CAT | ||
this.rules[48].opcodes[1] = {type: 4, index: 49};// RNM(ProsValOpen) | ||
this.rules[48].opcodes[2] = {type: 4, index: 50};// RNM(ProsValString) | ||
this.rules[48].opcodes[3] = {type: 4, index: 51};// RNM(ProsValClose) | ||
this.rules[48].opcodes[0] = {type: 3, min: 0, max: Infinity};// REP | ||
this.rules[48].opcodes[1] = {type: 1, children: [2,3,4]};// ALT | ||
this.rules[48].opcodes[2] = {type: 8, min: 32, max: 38};// TRG | ||
this.rules[48].opcodes[3] = {type: 8, min: 40, max: 126};// TRG | ||
this.rules[48].opcodes[4] = {type: 4, index: 44};// RNM(StringTab) | ||
// ProsValOpen | ||
/* ProsVal */ | ||
this.rules[49].opcodes = []; | ||
this.rules[49].opcodes[0] = {type: 10, string: [60]};// TBS | ||
this.rules[49].opcodes[0] = {type: 2, children: [1,2,3]};// CAT | ||
this.rules[49].opcodes[1] = {type: 4, index: 50};// RNM(ProsValOpen) | ||
this.rules[49].opcodes[2] = {type: 4, index: 51};// RNM(ProsValString) | ||
this.rules[49].opcodes[3] = {type: 4, index: 52};// RNM(ProsValClose) | ||
// ProsValString | ||
/* ProsValOpen */ | ||
this.rules[50].opcodes = []; | ||
this.rules[50].opcodes[0] = {type: 3, min: 0, max: Infinity};// REP | ||
this.rules[50].opcodes[1] = {type: 1, children: [2,3,4]};// ALT | ||
this.rules[50].opcodes[2] = {type: 8, min: 32, max: 61};// TRG | ||
this.rules[50].opcodes[3] = {type: 8, min: 63, max: 126};// TRG | ||
this.rules[50].opcodes[4] = {type: 4, index: 43};// RNM(StringTab) | ||
this.rules[50].opcodes[0] = {type: 10, string: [60]};// TBS | ||
// ProsValClose | ||
/* ProsValString */ | ||
this.rules[51].opcodes = []; | ||
this.rules[51].opcodes[0] = {type: 10, string: [62]};// TBS | ||
this.rules[51].opcodes[0] = {type: 3, min: 0, max: Infinity};// REP | ||
this.rules[51].opcodes[1] = {type: 1, children: [2,3,4]};// ALT | ||
this.rules[51].opcodes[2] = {type: 8, min: 32, max: 61};// TRG | ||
this.rules[51].opcodes[3] = {type: 8, min: 63, max: 126};// TRG | ||
this.rules[51].opcodes[4] = {type: 4, index: 44};// RNM(StringTab) | ||
// rep-min | ||
/* ProsValClose */ | ||
this.rules[52].opcodes = []; | ||
this.rules[52].opcodes[0] = {type: 4, index: 55};// RNM(rep-num) | ||
this.rules[52].opcodes[0] = {type: 10, string: [62]};// TBS | ||
// rep-min-max | ||
/* rep-min */ | ||
this.rules[53].opcodes = []; | ||
this.rules[53].opcodes[0] = {type: 4, index: 55};// RNM(rep-num) | ||
this.rules[53].opcodes[0] = {type: 4, index: 56};// RNM(rep-num) | ||
// rep-max | ||
/* rep-min-max */ | ||
this.rules[54].opcodes = []; | ||
this.rules[54].opcodes[0] = {type: 4, index: 55};// RNM(rep-num) | ||
this.rules[54].opcodes[0] = {type: 4, index: 56};// RNM(rep-num) | ||
// rep-num | ||
/* rep-max */ | ||
this.rules[55].opcodes = []; | ||
this.rules[55].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP | ||
this.rules[55].opcodes[1] = {type: 8, min: 48, max: 57};// TRG | ||
this.rules[55].opcodes[0] = {type: 4, index: 56};// RNM(rep-num) | ||
// dString | ||
/* rep-num */ | ||
this.rules[56].opcodes = []; | ||
this.rules[56].opcodes[0] = {type: 4, index: 68};// RNM(dnum) | ||
this.rules[56].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP | ||
this.rules[56].opcodes[1] = {type: 8, min: 48, max: 57};// TRG | ||
// xString | ||
/* dString */ | ||
this.rules[57].opcodes = []; | ||
this.rules[57].opcodes[0] = {type: 4, index: 70};// RNM(xnum) | ||
this.rules[57].opcodes[0] = {type: 4, index: 69};// RNM(dnum) | ||
// bString | ||
/* xString */ | ||
this.rules[58].opcodes = []; | ||
this.rules[58].opcodes[0] = {type: 4, index: 69};// RNM(bnum) | ||
this.rules[58].opcodes[0] = {type: 4, index: 71};// RNM(xnum) | ||
// Dec | ||
/* bString */ | ||
this.rules[59].opcodes = []; | ||
this.rules[59].opcodes[0] = {type: 1, children: [1,2]};// ALT | ||
this.rules[59].opcodes[1] = {type: 10, string: [68]};// TBS | ||
this.rules[59].opcodes[2] = {type: 10, string: [100]};// TBS | ||
this.rules[59].opcodes[0] = {type: 4, index: 70};// RNM(bnum) | ||
// Hex | ||
/* Dec */ | ||
this.rules[60].opcodes = []; | ||
this.rules[60].opcodes[0] = {type: 1, children: [1,2]};// ALT | ||
this.rules[60].opcodes[1] = {type: 10, string: [88]};// TBS | ||
this.rules[60].opcodes[2] = {type: 10, string: [120]};// TBS | ||
this.rules[60].opcodes[1] = {type: 10, string: [68]};// TBS | ||
this.rules[60].opcodes[2] = {type: 10, string: [100]};// TBS | ||
// Bin | ||
/* Hex */ | ||
this.rules[61].opcodes = []; | ||
this.rules[61].opcodes[0] = {type: 1, children: [1,2]};// ALT | ||
this.rules[61].opcodes[1] = {type: 10, string: [66]};// TBS | ||
this.rules[61].opcodes[2] = {type: 10, string: [98]};// TBS | ||
this.rules[61].opcodes[1] = {type: 10, string: [88]};// TBS | ||
this.rules[61].opcodes[2] = {type: 10, string: [120]};// TBS | ||
// dmin | ||
/* Bin */ | ||
this.rules[62].opcodes = []; | ||
this.rules[62].opcodes[0] = {type: 4, index: 68};// RNM(dnum) | ||
this.rules[62].opcodes[0] = {type: 1, children: [1,2]};// ALT | ||
this.rules[62].opcodes[1] = {type: 10, string: [66]};// TBS | ||
this.rules[62].opcodes[2] = {type: 10, string: [98]};// TBS | ||
// dmax | ||
/* dmin */ | ||
this.rules[63].opcodes = []; | ||
this.rules[63].opcodes[0] = {type: 4, index: 68};// RNM(dnum) | ||
this.rules[63].opcodes[0] = {type: 4, index: 69};// RNM(dnum) | ||
// bmin | ||
/* dmax */ | ||
this.rules[64].opcodes = []; | ||
this.rules[64].opcodes[0] = {type: 4, index: 69};// RNM(bnum) | ||
this.rules[64].opcodes[0] = {type: 4, index: 69};// RNM(dnum) | ||
// bmax | ||
/* bmin */ | ||
this.rules[65].opcodes = []; | ||
this.rules[65].opcodes[0] = {type: 4, index: 69};// RNM(bnum) | ||
this.rules[65].opcodes[0] = {type: 4, index: 70};// RNM(bnum) | ||
// xmin | ||
/* bmax */ | ||
this.rules[66].opcodes = []; | ||
this.rules[66].opcodes[0] = {type: 4, index: 70};// RNM(xnum) | ||
this.rules[66].opcodes[0] = {type: 4, index: 70};// RNM(bnum) | ||
// xmax | ||
/* xmin */ | ||
this.rules[67].opcodes = []; | ||
this.rules[67].opcodes[0] = {type: 4, index: 70};// RNM(xnum) | ||
this.rules[67].opcodes[0] = {type: 4, index: 71};// RNM(xnum) | ||
// dnum | ||
/* xmax */ | ||
this.rules[68].opcodes = []; | ||
this.rules[68].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP | ||
this.rules[68].opcodes[1] = {type: 8, min: 48, max: 57};// TRG | ||
this.rules[68].opcodes[0] = {type: 4, index: 71};// RNM(xnum) | ||
// bnum | ||
/* dnum */ | ||
this.rules[69].opcodes = []; | ||
this.rules[69].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP | ||
this.rules[69].opcodes[1] = {type: 8, min: 48, max: 49};// TRG | ||
this.rules[69].opcodes[1] = {type: 8, min: 48, max: 57};// TRG | ||
// xnum | ||
/* bnum */ | ||
this.rules[70].opcodes = []; | ||
this.rules[70].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP | ||
this.rules[70].opcodes[1] = {type: 1, children: [2,3,4]};// ALT | ||
this.rules[70].opcodes[2] = {type: 8, min: 48, max: 57};// TRG | ||
this.rules[70].opcodes[3] = {type: 8, min: 65, max: 70};// TRG | ||
this.rules[70].opcodes[4] = {type: 8, min: 97, max: 102};// TRG | ||
this.rules[70].opcodes[1] = {type: 8, min: 48, max: 49};// TRG | ||
// alphanum | ||
/* xnum */ | ||
this.rules[71].opcodes = []; | ||
this.rules[71].opcodes[0] = {type: 2, children: [1,4]};// CAT | ||
this.rules[71].opcodes[1] = {type: 1, children: [2,3]};// ALT | ||
this.rules[71].opcodes[2] = {type: 8, min: 97, max: 122};// TRG | ||
this.rules[71].opcodes[3] = {type: 8, min: 65, max: 90};// TRG | ||
this.rules[71].opcodes[4] = {type: 3, min: 0, max: Infinity};// REP | ||
this.rules[71].opcodes[5] = {type: 1, children: [6,7,8,9]};// ALT | ||
this.rules[71].opcodes[6] = {type: 8, min: 97, max: 122};// TRG | ||
this.rules[71].opcodes[7] = {type: 8, min: 65, max: 90};// TRG | ||
this.rules[71].opcodes[8] = {type: 8, min: 48, max: 57};// TRG | ||
this.rules[71].opcodes[9] = {type: 10, string: [45]};// TBS | ||
this.rules[71].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP | ||
this.rules[71].opcodes[1] = {type: 1, children: [2,3,4]};// ALT | ||
this.rules[71].opcodes[2] = {type: 8, min: 48, max: 57};// TRG | ||
this.rules[71].opcodes[3] = {type: 8, min: 65, max: 70};// TRG | ||
this.rules[71].opcodes[4] = {type: 8, min: 97, max: 102};// TRG | ||
// owsp | ||
/* alphanum */ | ||
this.rules[72].opcodes = []; | ||
this.rules[72].opcodes[0] = {type: 3, min: 0, max: Infinity};// REP | ||
this.rules[72].opcodes[1] = {type: 4, index: 74};// RNM(space) | ||
this.rules[72].opcodes[0] = {type: 2, children: [1,4]};// CAT | ||
this.rules[72].opcodes[1] = {type: 1, children: [2,3]};// ALT | ||
this.rules[72].opcodes[2] = {type: 8, min: 97, max: 122};// TRG | ||
this.rules[72].opcodes[3] = {type: 8, min: 65, max: 90};// TRG | ||
this.rules[72].opcodes[4] = {type: 3, min: 0, max: Infinity};// REP | ||
this.rules[72].opcodes[5] = {type: 1, children: [6,7,8,9]};// ALT | ||
this.rules[72].opcodes[6] = {type: 8, min: 97, max: 122};// TRG | ||
this.rules[72].opcodes[7] = {type: 8, min: 65, max: 90};// TRG | ||
this.rules[72].opcodes[8] = {type: 8, min: 48, max: 57};// TRG | ||
this.rules[72].opcodes[9] = {type: 10, string: [45]};// TBS | ||
// wsp | ||
/* owsp */ | ||
this.rules[73].opcodes = []; | ||
this.rules[73].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP | ||
this.rules[73].opcodes[1] = {type: 4, index: 74};// RNM(space) | ||
this.rules[73].opcodes[0] = {type: 3, min: 0, max: Infinity};// REP | ||
this.rules[73].opcodes[1] = {type: 4, index: 75};// RNM(space) | ||
// space | ||
/* wsp */ | ||
this.rules[74].opcodes = []; | ||
this.rules[74].opcodes[0] = {type: 1, children: [1,2,3,4]};// ALT | ||
this.rules[74].opcodes[1] = {type: 10, string: [32]};// TBS | ||
this.rules[74].opcodes[2] = {type: 10, string: [9]};// TBS | ||
this.rules[74].opcodes[3] = {type: 4, index: 75};// RNM(comment) | ||
this.rules[74].opcodes[4] = {type: 4, index: 77};// RNM(LineContinue) | ||
this.rules[74].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP | ||
this.rules[74].opcodes[1] = {type: 4, index: 75};// RNM(space) | ||
// comment | ||
/* space */ | ||
this.rules[75].opcodes = []; | ||
this.rules[75].opcodes[0] = {type: 2, children: [1,2]};// CAT | ||
this.rules[75].opcodes[1] = {type: 10, string: [59]};// TBS | ||
this.rules[75].opcodes[2] = {type: 3, min: 0, max: Infinity};// REP | ||
this.rules[75].opcodes[3] = {type: 1, children: [4,5]};// ALT | ||
this.rules[75].opcodes[4] = {type: 8, min: 32, max: 126};// TRG | ||
this.rules[75].opcodes[5] = {type: 10, string: [9]};// TBS | ||
this.rules[75].opcodes[0] = {type: 1, children: [1,2,3,4]};// ALT | ||
this.rules[75].opcodes[1] = {type: 10, string: [32]};// TBS | ||
this.rules[75].opcodes[2] = {type: 10, string: [9]};// TBS | ||
this.rules[75].opcodes[3] = {type: 4, index: 76};// RNM(comment) | ||
this.rules[75].opcodes[4] = {type: 4, index: 78};// RNM(LineContinue) | ||
// LineEnd | ||
/* comment */ | ||
this.rules[76].opcodes = []; | ||
this.rules[76].opcodes[0] = {type: 1, children: [1,2,3]};// ALT | ||
this.rules[76].opcodes[1] = {type: 10, string: [13,10]};// TBS | ||
this.rules[76].opcodes[2] = {type: 10, string: [10]};// TBS | ||
this.rules[76].opcodes[3] = {type: 10, string: [13]};// TBS | ||
this.rules[76].opcodes[0] = {type: 2, children: [1,2]};// CAT | ||
this.rules[76].opcodes[1] = {type: 10, string: [59]};// TBS | ||
this.rules[76].opcodes[2] = {type: 3, min: 0, max: Infinity};// REP | ||
this.rules[76].opcodes[3] = {type: 1, children: [4,5]};// ALT | ||
this.rules[76].opcodes[4] = {type: 8, min: 32, max: 126};// TRG | ||
this.rules[76].opcodes[5] = {type: 10, string: [9]};// TBS | ||
// LineContinue | ||
/* LineEnd */ | ||
this.rules[77].opcodes = []; | ||
this.rules[77].opcodes[0] = {type: 2, children: [1,5]};// CAT | ||
this.rules[77].opcodes[1] = {type: 1, children: [2,3,4]};// ALT | ||
this.rules[77].opcodes[2] = {type: 10, string: [13,10]};// TBS | ||
this.rules[77].opcodes[3] = {type: 10, string: [10]};// TBS | ||
this.rules[77].opcodes[4] = {type: 10, string: [13]};// TBS | ||
this.rules[77].opcodes[5] = {type: 1, children: [6,7]};// ALT | ||
this.rules[77].opcodes[6] = {type: 10, string: [32]};// TBS | ||
this.rules[77].opcodes[7] = {type: 10, string: [9]};// TBS | ||
this.rules[77].opcodes[0] = {type: 1, children: [1,2,3]};// ALT | ||
this.rules[77].opcodes[1] = {type: 10, string: [13,10]};// TBS | ||
this.rules[77].opcodes[2] = {type: 10, string: [10]};// TBS | ||
this.rules[77].opcodes[3] = {type: 10, string: [13]};// TBS | ||
/* LineContinue */ | ||
this.rules[78].opcodes = []; | ||
this.rules[78].opcodes[0] = {type: 2, children: [1,5]};// CAT | ||
this.rules[78].opcodes[1] = {type: 1, children: [2,3,4]};// ALT | ||
this.rules[78].opcodes[2] = {type: 10, string: [13,10]};// TBS | ||
this.rules[78].opcodes[3] = {type: 10, string: [10]};// TBS | ||
this.rules[78].opcodes[4] = {type: 10, string: [13]};// TBS | ||
this.rules[78].opcodes[5] = {type: 1, children: [6,7]};// ALT | ||
this.rules[78].opcodes[6] = {type: 10, string: [32]};// TBS | ||
this.rules[78].opcodes[7] = {type: 10, string: [9]};// TBS | ||
} | ||
//``` | ||
// INPUT GRAMMAR FILE(s) | ||
@@ -761,2 +775,6 @@ // | ||
// ; RFC 5234 with some restrictions and additions. | ||
// ; Updated 11/24/2014 for RFC 7405 case-sensitive literal string notation | ||
// ; - accepts %s"string" as a case-sensitive string | ||
// ; - accepts %i"string" as a case-insensitive string | ||
// ; - accepts "string" as a case-insensitive string | ||
// ; | ||
@@ -831,3 +849,4 @@ // ; 1. Rules must begin at first character of each line. | ||
// TbsOp = %d37 ((Dec dString *(%d46 dString)) / (Hex xString *(%d46 xString)) / (Bin bString *(%d46 bString))) | ||
// TlsOp = TlsOpen TlsString TlsClose | ||
// TlsOp = TlsCase TlsOpen TlsString TlsClose | ||
// TlsCase = ["%i" / "%s"] | ||
// TlsOpen = %d34 | ||
@@ -874,1 +893,2 @@ // TlsClose = %d34 | ||
// LineContinue = (%d13.10 / %d10 / %d13) (%d32 / %d9) | ||
//``` |
@@ -110,47 +110,2 @@ // This module has all of the semantic callback functions for the [ABNF for SABNF parser](./abnf-for-sabnf-parser.html). | ||
} | ||
/* | ||
* Opcode prototypes. | ||
*/ | ||
var opAlt = { | ||
type : id.ALT, | ||
children : [] | ||
} | ||
var opCat = { | ||
type : id.CAT, | ||
children : [] | ||
} | ||
var opRep = { | ||
type : id.REP, | ||
min : 0, | ||
max : 0 | ||
} | ||
var opRnm = { | ||
type : id.RNM, | ||
index : 0 | ||
} | ||
var opUdt = { | ||
type : id.UDT, | ||
empty : false, | ||
index : 0 | ||
} | ||
var opAnd = { | ||
type : id.AND | ||
} | ||
var opNot = { | ||
type : id.NOT | ||
} | ||
var opTls = { | ||
type : id.TLS, | ||
string : [] | ||
} | ||
var opTbs = { | ||
type : id.TBS, | ||
string : [] | ||
} | ||
var opTrg = { | ||
type : id.TRG, | ||
min : 0, | ||
max : 0 | ||
} | ||
// The AST callback functions. | ||
@@ -504,13 +459,39 @@ function semFile(state, chars, phraseIndex, phraseCount, data) { | ||
if (state == id.SEM_PRE) { | ||
data.tlscase = true; /* default to case insensitive */ | ||
} else if (state == id.SEM_POST) { | ||
var str = chars.slice(phraseIndex + 1, phraseIndex + phraseCount - 1); | ||
for (var i = 0; i < str.length; i += 1) { | ||
if (str[i] >= 65 && str[i] <= 90) { | ||
str[i] += 32; | ||
} | ||
return ret; | ||
} | ||
function semTlsCase(state, chars, phraseIndex, phraseCount, data) { | ||
var ret = id.SEM_OK; | ||
if (state == id.SEM_PRE) { | ||
} else if (state == id.SEM_POST) { | ||
if(phraseCount > 0 && (chars[phraseIndex + 1] === 83 || chars[phraseIndex + 1] === 115)){ | ||
data.tlscase = false; /* set to case sensitive */ | ||
} | ||
} | ||
return ret; | ||
} | ||
function semTlsString(state, chars, phraseIndex, phraseCount, data) { | ||
var ret = id.SEM_OK; | ||
if (state == id.SEM_PRE) { | ||
} else if (state == id.SEM_POST) { | ||
if(data.tlscase){ | ||
var str = chars.slice(phraseIndex, phraseIndex + phraseCount); | ||
for (var i = 0; i < str.length; i += 1) { | ||
if (str[i] >= 65 && str[i] <= 90) { | ||
str[i] += 32; | ||
} | ||
} | ||
data.opcodes.push({ | ||
type : id.TLS, | ||
string : str, | ||
}); | ||
}else{ | ||
data.opcodes.push({ | ||
type : id.TBS, | ||
string : chars.slice(phraseIndex, | ||
(phraseIndex + phraseCount)) | ||
}); | ||
} | ||
data.opcodes.push({ | ||
type : id.TLS, | ||
string : str, | ||
}); | ||
} | ||
@@ -671,2 +652,4 @@ return ret; | ||
this.callbacks['tbsop'] = semTbsOp; | ||
this.callbacks['tlscase'] = semTlsCase; | ||
this.callbacks['tlsstring'] = semTlsString; | ||
this.callbacks['tlsop'] = semTlsOp; | ||
@@ -673,0 +656,0 @@ this.callbacks['trgop'] = semTrgOp; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
279687
7190
93