module.exports = function grammar(){
copyright: Copyright (c) 2023 Lowell D. Thomas, all rights reserved
license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)
Generated by apg-js, Version 4.2.1 apg-js
module.exports = function grammar(){
SUMMARY
rules = 95
udts = 0
opcodes = 372
--- ABNF original opcodes
ALT = 43
CAT = 48
REP = 34
RNM = 149
TLS = 2
TBS = 61
TRG = 35
--- SABNF superset opcodes
UDT = 0
AND = 0
NOT = 0
BKA = 0
BKN = 0
BKR = 0
ABG = 0
AEN = 0
characters = [9 - 126]
/* OBJECT IDENTIFIER (for internal parser use) */
this.grammarObject = 'grammarObject';
/* RULES */
this.rules = [];
this.rules[0] = {name: 'File', lower: 'file', index: 0, isBkr: false};
this.rules[1] = {name: 'BlankLine', lower: 'blankline', index: 1, isBkr: false};
this.rules[2] = {name: 'Rule', lower: 'rule', index: 2, isBkr: false};
this.rules[3] = {name: 'RuleLookup', lower: 'rulelookup', index: 3, isBkr: false};
this.rules[4] = {name: 'RuleNameTest', lower: 'rulenametest', index: 4, isBkr: false};
this.rules[5] = {name: 'RuleName', lower: 'rulename', index: 5, isBkr: false};
this.rules[6] = {name: 'RuleNameError', lower: 'rulenameerror', index: 6, isBkr: false};
this.rules[7] = {name: 'DefinedAsTest', lower: 'definedastest', index: 7, isBkr: false};
this.rules[8] = {name: 'DefinedAsError', lower: 'definedaserror', index: 8, isBkr: false};
this.rules[9] = {name: 'DefinedAs', lower: 'definedas', index: 9, isBkr: false};
this.rules[10] = {name: 'Defined', lower: 'defined', index: 10, isBkr: false};
this.rules[11] = {name: 'IncAlt', lower: 'incalt', index: 11, isBkr: false};
this.rules[12] = {name: 'RuleError', lower: 'ruleerror', index: 12, isBkr: false};
this.rules[13] = {name: 'LineEndError', lower: 'lineenderror', index: 13, isBkr: false};
this.rules[14] = {name: 'Alternation', lower: 'alternation', index: 14, isBkr: false};
this.rules[15] = {name: 'Concatenation', lower: 'concatenation', index: 15, isBkr: false};
this.rules[16] = {name: 'Repetition', lower: 'repetition', index: 16, isBkr: false};
this.rules[17] = {name: 'Modifier', lower: 'modifier', index: 17, isBkr: false};
this.rules[18] = {name: 'Predicate', lower: 'predicate', index: 18, isBkr: false};
this.rules[19] = {name: 'BasicElement', lower: 'basicelement', index: 19, isBkr: false};
this.rules[20] = {name: 'BasicElementErr', lower: 'basicelementerr', index: 20, isBkr: false};
this.rules[21] = {name: 'Group', lower: 'group', index: 21, isBkr: false};
this.rules[22] = {name: 'GroupError', lower: 'grouperror', index: 22, isBkr: false};
this.rules[23] = {name: 'GroupOpen', lower: 'groupopen', index: 23, isBkr: false};
this.rules[24] = {name: 'GroupClose', lower: 'groupclose', index: 24, isBkr: false};
this.rules[25] = {name: 'Option', lower: 'option', index: 25, isBkr: false};
this.rules[26] = {name: 'OptionError', lower: 'optionerror', index: 26, isBkr: false};
this.rules[27] = {name: 'OptionOpen', lower: 'optionopen', index: 27, isBkr: false};
this.rules[28] = {name: 'OptionClose', lower: 'optionclose', index: 28, isBkr: false};
this.rules[29] = {name: 'RnmOp', lower: 'rnmop', index: 29, isBkr: false};
this.rules[30] = {name: 'BkrOp', lower: 'bkrop', index: 30, isBkr: false};
this.rules[31] = {name: 'bkrModifier', lower: 'bkrmodifier', index: 31, isBkr: false};
this.rules[32] = {name: 'cs', lower: 'cs', index: 32, isBkr: false};
this.rules[33] = {name: 'ci', lower: 'ci', index: 33, isBkr: false};
this.rules[34] = {name: 'um', lower: 'um', index: 34, isBkr: false};
this.rules[35] = {name: 'pm', lower: 'pm', index: 35, isBkr: false};
this.rules[36] = {name: 'bkr-name', lower: 'bkr-name', index: 36, isBkr: false};
this.rules[37] = {name: 'rname', lower: 'rname', index: 37, isBkr: false};
this.rules[38] = {name: 'uname', lower: 'uname', index: 38, isBkr: false};
this.rules[39] = {name: 'ename', lower: 'ename', index: 39, isBkr: false};
this.rules[40] = {name: 'UdtOp', lower: 'udtop', index: 40, isBkr: false};
this.rules[41] = {name: 'udt-non-empty', lower: 'udt-non-empty', index: 41, isBkr: false};
this.rules[42] = {name: 'udt-empty', lower: 'udt-empty', index: 42, isBkr: false};
this.rules[43] = {name: 'RepOp', lower: 'repop', index: 43, isBkr: false};
this.rules[44] = {name: 'AltOp', lower: 'altop', index: 44, isBkr: false};
this.rules[45] = {name: 'CatOp', lower: 'catop', index: 45, isBkr: false};
this.rules[46] = {name: 'StarOp', lower: 'starop', index: 46, isBkr: false};
this.rules[47] = {name: 'AndOp', lower: 'andop', index: 47, isBkr: false};
this.rules[48] = {name: 'NotOp', lower: 'notop', index: 48, isBkr: false};
this.rules[49] = {name: 'BkaOp', lower: 'bkaop', index: 49, isBkr: false};
this.rules[50] = {name: 'BknOp', lower: 'bknop', index: 50, isBkr: false};
this.rules[51] = {name: 'AbgOp', lower: 'abgop', index: 51, isBkr: false};
this.rules[52] = {name: 'AenOp', lower: 'aenop', index: 52, isBkr: false};
this.rules[53] = {name: 'TrgOp', lower: 'trgop', index: 53, isBkr: false};
this.rules[54] = {name: 'TbsOp', lower: 'tbsop', index: 54, isBkr: false};
this.rules[55] = {name: 'TlsOp', lower: 'tlsop', index: 55, isBkr: false};
this.rules[56] = {name: 'TlsCase', lower: 'tlscase', index: 56, isBkr: false};
this.rules[57] = {name: 'TlsOpen', lower: 'tlsopen', index: 57, isBkr: false};
this.rules[58] = {name: 'TlsClose', lower: 'tlsclose', index: 58, isBkr: false};
this.rules[59] = {name: 'TlsString', lower: 'tlsstring', index: 59, isBkr: false};
this.rules[60] = {name: 'StringTab', lower: 'stringtab', index: 60, isBkr: false};
this.rules[61] = {name: 'ClsOp', lower: 'clsop', index: 61, isBkr: false};
this.rules[62] = {name: 'ClsOpen', lower: 'clsopen', index: 62, isBkr: false};
this.rules[63] = {name: 'ClsClose', lower: 'clsclose', index: 63, isBkr: false};
this.rules[64] = {name: 'ClsString', lower: 'clsstring', index: 64, isBkr: false};
this.rules[65] = {name: 'ProsVal', lower: 'prosval', index: 65, isBkr: false};
this.rules[66] = {name: 'ProsValOpen', lower: 'prosvalopen', index: 66, isBkr: false};
this.rules[67] = {name: 'ProsValString', lower: 'prosvalstring', index: 67, isBkr: false};
this.rules[68] = {name: 'ProsValClose', lower: 'prosvalclose', index: 68, isBkr: false};
this.rules[69] = {name: 'rep-min', lower: 'rep-min', index: 69, isBkr: false};
this.rules[70] = {name: 'rep-min-max', lower: 'rep-min-max', index: 70, isBkr: false};
this.rules[71] = {name: 'rep-max', lower: 'rep-max', index: 71, isBkr: false};
this.rules[72] = {name: 'rep-num', lower: 'rep-num', index: 72, isBkr: false};
this.rules[73] = {name: 'dString', lower: 'dstring', index: 73, isBkr: false};
this.rules[74] = {name: 'xString', lower: 'xstring', index: 74, isBkr: false};
this.rules[75] = {name: 'bString', lower: 'bstring', index: 75, isBkr: false};
this.rules[76] = {name: 'Dec', lower: 'dec', index: 76, isBkr: false};
this.rules[77] = {name: 'Hex', lower: 'hex', index: 77, isBkr: false};
this.rules[78] = {name: 'Bin', lower: 'bin', index: 78, isBkr: false};
this.rules[79] = {name: 'dmin', lower: 'dmin', index: 79, isBkr: false};
this.rules[80] = {name: 'dmax', lower: 'dmax', index: 80, isBkr: false};
this.rules[81] = {name: 'bmin', lower: 'bmin', index: 81, isBkr: false};
this.rules[82] = {name: 'bmax', lower: 'bmax', index: 82, isBkr: false};
this.rules[83] = {name: 'xmin', lower: 'xmin', index: 83, isBkr: false};
this.rules[84] = {name: 'xmax', lower: 'xmax', index: 84, isBkr: false};
this.rules[85] = {name: 'dnum', lower: 'dnum', index: 85, isBkr: false};
this.rules[86] = {name: 'bnum', lower: 'bnum', index: 86, isBkr: false};
this.rules[87] = {name: 'xnum', lower: 'xnum', index: 87, isBkr: false};
this.rules[88] = {name: 'alphanum', lower: 'alphanum', index: 88, isBkr: false};
this.rules[89] = {name: 'owsp', lower: 'owsp', index: 89, isBkr: false};
this.rules[90] = {name: 'wsp', lower: 'wsp', index: 90, isBkr: false};
this.rules[91] = {name: 'space', lower: 'space', index: 91, isBkr: false};
this.rules[92] = {name: 'comment', lower: 'comment', index: 92, isBkr: false};
this.rules[93] = {name: 'LineEnd', lower: 'lineend', index: 93, isBkr: false};
this.rules[94] = {name: 'LineContinue', lower: 'linecontinue', index: 94, isBkr: false};
/* UDTS */
this.udts = [];
/* OPCODES */
/* File */
this.rules[0].opcodes = [];
this.rules[0].opcodes[0] = {type: 3, min: 0, max: Infinity};// REP
this.rules[0].opcodes[1] = {type: 1, children: [2,3,4]};// ALT
this.rules[0].opcodes[2] = {type: 4, index: 1};// RNM(BlankLine)
this.rules[0].opcodes[3] = {type: 4, index: 2};// RNM(Rule)
this.rules[0].opcodes[4] = {type: 4, index: 12};// RNM(RuleError)
/* BlankLine */
this.rules[1].opcodes = [];
this.rules[1].opcodes[0] = {type: 2, children: [1,5,7]};// CAT
this.rules[1].opcodes[1] = {type: 3, min: 0, max: Infinity};// REP
this.rules[1].opcodes[2] = {type: 1, children: [3,4]};// ALT
this.rules[1].opcodes[3] = {type: 6, string: [32]};// TBS
this.rules[1].opcodes[4] = {type: 6, string: [9]};// TBS
this.rules[1].opcodes[5] = {type: 3, min: 0, max: 1};// REP
this.rules[1].opcodes[6] = {type: 4, index: 92};// RNM(comment)
this.rules[1].opcodes[7] = {type: 4, index: 93};// RNM(LineEnd)
/* 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: 89};// 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: 89};// RNM(owsp)
this.rules[2].opcodes[7] = {type: 4, index: 93};// 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: 93};// RNM(LineEnd)
/* 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: 89};// RNM(owsp)
this.rules[3].opcodes[3] = {type: 4, index: 7};// RNM(DefinedAsTest)
/* RuleNameTest */
this.rules[4].opcodes = [];
this.rules[4].opcodes[0] = {type: 1, children: [1,2]};// ALT
this.rules[4].opcodes[1] = {type: 4, index: 5};// RNM(RuleName)
this.rules[4].opcodes[2] = {type: 4, index: 6};// RNM(RuleNameError)
/* RuleName */
this.rules[5].opcodes = [];
this.rules[5].opcodes[0] = {type: 4, index: 88};// RNM(alphanum)
/* RuleNameError */
this.rules[6].opcodes = [];
this.rules[6].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP
this.rules[6].opcodes[1] = {type: 1, children: [2,3]};// ALT
this.rules[6].opcodes[2] = {type: 5, min: 33, max: 60};// TRG
this.rules[6].opcodes[3] = {type: 5, min: 62, max: 126};// TRG
/* DefinedAsTest */
this.rules[7].opcodes = [];
this.rules[7].opcodes[0] = {type: 1, children: [1,2]};// ALT
this.rules[7].opcodes[1] = {type: 4, index: 9};// RNM(DefinedAs)
this.rules[7].opcodes[2] = {type: 4, index: 8};// RNM(DefinedAsError)
/* DefinedAsError */
this.rules[8].opcodes = [];
this.rules[8].opcodes[0] = {type: 3, min: 1, max: 2};// REP
this.rules[8].opcodes[1] = {type: 5, min: 33, max: 126};// TRG
/* DefinedAs */
this.rules[9].opcodes = [];
this.rules[9].opcodes[0] = {type: 1, children: [1,2]};// ALT
this.rules[9].opcodes[1] = {type: 4, index: 11};// RNM(IncAlt)
this.rules[9].opcodes[2] = {type: 4, index: 10};// RNM(Defined)
/* Defined */
this.rules[10].opcodes = [];
this.rules[10].opcodes[0] = {type: 6, string: [61]};// TBS
/* IncAlt */
this.rules[11].opcodes = [];
this.rules[11].opcodes[0] = {type: 6, string: [61,47]};// TBS
/* RuleError */
this.rules[12].opcodes = [];
this.rules[12].opcodes[0] = {type: 2, children: [1,6]};// CAT
this.rules[12].opcodes[1] = {type: 3, min: 1, max: Infinity};// REP
this.rules[12].opcodes[2] = {type: 1, children: [3,4,5]};// ALT
this.rules[12].opcodes[3] = {type: 5, min: 32, max: 126};// TRG
this.rules[12].opcodes[4] = {type: 6, string: [9]};// TBS
this.rules[12].opcodes[5] = {type: 4, index: 94};// RNM(LineContinue)
this.rules[12].opcodes[6] = {type: 4, index: 93};// RNM(LineEnd)
/* LineEndError */
this.rules[13].opcodes = [];
this.rules[13].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP
this.rules[13].opcodes[1] = {type: 1, children: [2,3,4]};// ALT
this.rules[13].opcodes[2] = {type: 5, min: 32, max: 126};// TRG
this.rules[13].opcodes[3] = {type: 6, string: [9]};// TBS
this.rules[13].opcodes[4] = {type: 4, index: 94};// RNM(LineContinue)
/* Alternation */
this.rules[14].opcodes = [];
this.rules[14].opcodes[0] = {type: 2, children: [1,2]};// CAT
this.rules[14].opcodes[1] = {type: 4, index: 15};// RNM(Concatenation)
this.rules[14].opcodes[2] = {type: 3, min: 0, max: Infinity};// REP
this.rules[14].opcodes[3] = {type: 2, children: [4,5,6]};// CAT
this.rules[14].opcodes[4] = {type: 4, index: 89};// RNM(owsp)
this.rules[14].opcodes[5] = {type: 4, index: 44};// RNM(AltOp)
this.rules[14].opcodes[6] = {type: 4, index: 15};// RNM(Concatenation)
/* Concatenation */
this.rules[15].opcodes = [];
this.rules[15].opcodes[0] = {type: 2, children: [1,2]};// CAT
this.rules[15].opcodes[1] = {type: 4, index: 16};// RNM(Repetition)
this.rules[15].opcodes[2] = {type: 3, min: 0, max: Infinity};// REP
this.rules[15].opcodes[3] = {type: 2, children: [4,5]};// CAT
this.rules[15].opcodes[4] = {type: 4, index: 45};// RNM(CatOp)
this.rules[15].opcodes[5] = {type: 4, index: 16};// RNM(Repetition)
/* Repetition */
this.rules[16].opcodes = [];
this.rules[16].opcodes[0] = {type: 2, children: [1,3]};// CAT
this.rules[16].opcodes[1] = {type: 3, min: 0, max: 1};// REP
this.rules[16].opcodes[2] = {type: 4, index: 17};// RNM(Modifier)
this.rules[16].opcodes[3] = {type: 1, children: [4,5,6,7]};// ALT
this.rules[16].opcodes[4] = {type: 4, index: 21};// RNM(Group)
this.rules[16].opcodes[5] = {type: 4, index: 25};// RNM(Option)
this.rules[16].opcodes[6] = {type: 4, index: 19};// RNM(BasicElement)
this.rules[16].opcodes[7] = {type: 4, index: 20};// RNM(BasicElementErr)
/* Modifier */
this.rules[17].opcodes = [];
this.rules[17].opcodes[0] = {type: 1, children: [1,5]};// ALT
this.rules[17].opcodes[1] = {type: 2, children: [2,3]};// CAT
this.rules[17].opcodes[2] = {type: 4, index: 18};// RNM(Predicate)
this.rules[17].opcodes[3] = {type: 3, min: 0, max: 1};// REP
this.rules[17].opcodes[4] = {type: 4, index: 43};// RNM(RepOp)
this.rules[17].opcodes[5] = {type: 4, index: 43};// RNM(RepOp)
/* Predicate */
this.rules[18].opcodes = [];
this.rules[18].opcodes[0] = {type: 1, children: [1,2,3,4]};// ALT
this.rules[18].opcodes[1] = {type: 4, index: 49};// RNM(BkaOp)
this.rules[18].opcodes[2] = {type: 4, index: 50};// RNM(BknOp)
this.rules[18].opcodes[3] = {type: 4, index: 47};// RNM(AndOp)
this.rules[18].opcodes[4] = {type: 4, index: 48};// RNM(NotOp)
/* BasicElement */
this.rules[19].opcodes = [];
this.rules[19].opcodes[0] = {type: 1, children: [1,2,3,4,5,6,7,8,9,10]};// ALT
this.rules[19].opcodes[1] = {type: 4, index: 40};// RNM(UdtOp)
this.rules[19].opcodes[2] = {type: 4, index: 29};// RNM(RnmOp)
this.rules[19].opcodes[3] = {type: 4, index: 53};// RNM(TrgOp)
this.rules[19].opcodes[4] = {type: 4, index: 54};// RNM(TbsOp)
this.rules[19].opcodes[5] = {type: 4, index: 55};// RNM(TlsOp)
this.rules[19].opcodes[6] = {type: 4, index: 61};// RNM(ClsOp)
this.rules[19].opcodes[7] = {type: 4, index: 30};// RNM(BkrOp)
this.rules[19].opcodes[8] = {type: 4, index: 51};// RNM(AbgOp)
this.rules[19].opcodes[9] = {type: 4, index: 52};// RNM(AenOp)
this.rules[19].opcodes[10] = {type: 4, index: 65};// RNM(ProsVal)
/* BasicElementErr */
this.rules[20].opcodes = [];
this.rules[20].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP
this.rules[20].opcodes[1] = {type: 1, children: [2,3,4,5]};// ALT
this.rules[20].opcodes[2] = {type: 5, min: 33, max: 40};// TRG
this.rules[20].opcodes[3] = {type: 5, min: 42, max: 46};// TRG
this.rules[20].opcodes[4] = {type: 5, min: 48, max: 92};// TRG
this.rules[20].opcodes[5] = {type: 5, min: 94, max: 126};// TRG
/* Group */
this.rules[21].opcodes = [];
this.rules[21].opcodes[0] = {type: 2, children: [1,2,3]};// CAT
this.rules[21].opcodes[1] = {type: 4, index: 23};// RNM(GroupOpen)
this.rules[21].opcodes[2] = {type: 4, index: 14};// RNM(Alternation)
this.rules[21].opcodes[3] = {type: 1, children: [4,5]};// ALT
this.rules[21].opcodes[4] = {type: 4, index: 24};// RNM(GroupClose)
this.rules[21].opcodes[5] = {type: 4, index: 22};// RNM(GroupError)
/* GroupError */
this.rules[22].opcodes = [];
this.rules[22].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP
this.rules[22].opcodes[1] = {type: 1, children: [2,3,4,5]};// ALT
this.rules[22].opcodes[2] = {type: 5, min: 33, max: 40};// TRG
this.rules[22].opcodes[3] = {type: 5, min: 42, max: 46};// TRG
this.rules[22].opcodes[4] = {type: 5, min: 48, max: 92};// TRG
this.rules[22].opcodes[5] = {type: 5, min: 94, max: 126};// TRG
/* GroupOpen */
this.rules[23].opcodes = [];
this.rules[23].opcodes[0] = {type: 2, children: [1,2]};// CAT
this.rules[23].opcodes[1] = {type: 6, string: [40]};// TBS
this.rules[23].opcodes[2] = {type: 4, index: 89};// RNM(owsp)
/* GroupClose */
this.rules[24].opcodes = [];
this.rules[24].opcodes[0] = {type: 2, children: [1,2]};// CAT
this.rules[24].opcodes[1] = {type: 4, index: 89};// RNM(owsp)
this.rules[24].opcodes[2] = {type: 6, string: [41]};// TBS
/* Option */
this.rules[25].opcodes = [];
this.rules[25].opcodes[0] = {type: 2, children: [1,2,3]};// CAT
this.rules[25].opcodes[1] = {type: 4, index: 27};// RNM(OptionOpen)
this.rules[25].opcodes[2] = {type: 4, index: 14};// RNM(Alternation)
this.rules[25].opcodes[3] = {type: 1, children: [4,5]};// ALT
this.rules[25].opcodes[4] = {type: 4, index: 28};// RNM(OptionClose)
this.rules[25].opcodes[5] = {type: 4, index: 26};// RNM(OptionError)
/* OptionError */
this.rules[26].opcodes = [];
this.rules[26].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP
this.rules[26].opcodes[1] = {type: 1, children: [2,3,4,5]};// ALT
this.rules[26].opcodes[2] = {type: 5, min: 33, max: 40};// TRG
this.rules[26].opcodes[3] = {type: 5, min: 42, max: 46};// TRG
this.rules[26].opcodes[4] = {type: 5, min: 48, max: 92};// TRG
this.rules[26].opcodes[5] = {type: 5, min: 94, max: 126};// TRG
/* OptionOpen */
this.rules[27].opcodes = [];
this.rules[27].opcodes[0] = {type: 2, children: [1,2]};// CAT
this.rules[27].opcodes[1] = {type: 6, string: [91]};// TBS
this.rules[27].opcodes[2] = {type: 4, index: 89};// RNM(owsp)
/* OptionClose */
this.rules[28].opcodes = [];
this.rules[28].opcodes[0] = {type: 2, children: [1,2]};// CAT
this.rules[28].opcodes[1] = {type: 4, index: 89};// RNM(owsp)
this.rules[28].opcodes[2] = {type: 6, string: [93]};// TBS
/* RnmOp */
this.rules[29].opcodes = [];
this.rules[29].opcodes[0] = {type: 4, index: 88};// RNM(alphanum)
/* BkrOp */
this.rules[30].opcodes = [];
this.rules[30].opcodes[0] = {type: 2, children: [1,2,4]};// CAT
this.rules[30].opcodes[1] = {type: 6, string: [92]};// TBS
this.rules[30].opcodes[2] = {type: 3, min: 0, max: 1};// REP
this.rules[30].opcodes[3] = {type: 4, index: 31};// RNM(bkrModifier)
this.rules[30].opcodes[4] = {type: 4, index: 36};// RNM(bkr-name)
/* bkrModifier */
this.rules[31].opcodes = [];
this.rules[31].opcodes[0] = {type: 1, children: [1,7,13,19]};// ALT
this.rules[31].opcodes[1] = {type: 2, children: [2,3]};// CAT
this.rules[31].opcodes[2] = {type: 4, index: 32};// RNM(cs)
this.rules[31].opcodes[3] = {type: 3, min: 0, max: 1};// REP
this.rules[31].opcodes[4] = {type: 1, children: [5,6]};// ALT
this.rules[31].opcodes[5] = {type: 4, index: 34};// RNM(um)
this.rules[31].opcodes[6] = {type: 4, index: 35};// RNM(pm)
this.rules[31].opcodes[7] = {type: 2, children: [8,9]};// CAT
this.rules[31].opcodes[8] = {type: 4, index: 33};// RNM(ci)
this.rules[31].opcodes[9] = {type: 3, min: 0, max: 1};// REP
this.rules[31].opcodes[10] = {type: 1, children: [11,12]};// ALT
this.rules[31].opcodes[11] = {type: 4, index: 34};// RNM(um)
this.rules[31].opcodes[12] = {type: 4, index: 35};// RNM(pm)
this.rules[31].opcodes[13] = {type: 2, children: [14,15]};// CAT
this.rules[31].opcodes[14] = {type: 4, index: 34};// RNM(um)
this.rules[31].opcodes[15] = {type: 3, min: 0, max: 1};// REP
this.rules[31].opcodes[16] = {type: 1, children: [17,18]};// ALT
this.rules[31].opcodes[17] = {type: 4, index: 32};// RNM(cs)
this.rules[31].opcodes[18] = {type: 4, index: 33};// RNM(ci)
this.rules[31].opcodes[19] = {type: 2, children: [20,21]};// CAT
this.rules[31].opcodes[20] = {type: 4, index: 35};// RNM(pm)
this.rules[31].opcodes[21] = {type: 3, min: 0, max: 1};// REP
this.rules[31].opcodes[22] = {type: 1, children: [23,24]};// ALT
this.rules[31].opcodes[23] = {type: 4, index: 32};// RNM(cs)
this.rules[31].opcodes[24] = {type: 4, index: 33};// RNM(ci)
/* cs */
this.rules[32].opcodes = [];
this.rules[32].opcodes[0] = {type: 6, string: [37,115]};// TBS
/* ci */
this.rules[33].opcodes = [];
this.rules[33].opcodes[0] = {type: 6, string: [37,105]};// TBS
/* um */
this.rules[34].opcodes = [];
this.rules[34].opcodes[0] = {type: 6, string: [37,117]};// TBS
/* pm */
this.rules[35].opcodes = [];
this.rules[35].opcodes[0] = {type: 6, string: [37,112]};// TBS
/* bkr-name */
this.rules[36].opcodes = [];
this.rules[36].opcodes[0] = {type: 1, children: [1,2,3]};// ALT
this.rules[36].opcodes[1] = {type: 4, index: 38};// RNM(uname)
this.rules[36].opcodes[2] = {type: 4, index: 39};// RNM(ename)
this.rules[36].opcodes[3] = {type: 4, index: 37};// RNM(rname)
/* rname */
this.rules[37].opcodes = [];
this.rules[37].opcodes[0] = {type: 4, index: 88};// RNM(alphanum)
/* uname */
this.rules[38].opcodes = [];
this.rules[38].opcodes[0] = {type: 2, children: [1,2]};// CAT
this.rules[38].opcodes[1] = {type: 6, string: [117,95]};// TBS
this.rules[38].opcodes[2] = {type: 4, index: 88};// RNM(alphanum)
/* ename */
this.rules[39].opcodes = [];
this.rules[39].opcodes[0] = {type: 2, children: [1,2]};// CAT
this.rules[39].opcodes[1] = {type: 6, string: [101,95]};// TBS
this.rules[39].opcodes[2] = {type: 4, index: 88};// RNM(alphanum)
/* UdtOp */
this.rules[40].opcodes = [];
this.rules[40].opcodes[0] = {type: 1, children: [1,2]};// ALT
this.rules[40].opcodes[1] = {type: 4, index: 42};// RNM(udt-empty)
this.rules[40].opcodes[2] = {type: 4, index: 41};// RNM(udt-non-empty)
/* udt-non-empty */
this.rules[41].opcodes = [];
this.rules[41].opcodes[0] = {type: 2, children: [1,2]};// CAT
this.rules[41].opcodes[1] = {type: 6, string: [117,95]};// TBS
this.rules[41].opcodes[2] = {type: 4, index: 88};// RNM(alphanum)
/* udt-empty */
this.rules[42].opcodes = [];
this.rules[42].opcodes[0] = {type: 2, children: [1,2]};// CAT
this.rules[42].opcodes[1] = {type: 6, string: [101,95]};// TBS
this.rules[42].opcodes[2] = {type: 4, index: 88};// RNM(alphanum)
/* RepOp */
this.rules[43].opcodes = [];
this.rules[43].opcodes[0] = {type: 1, children: [1,5,8,11,12]};// ALT
this.rules[43].opcodes[1] = {type: 2, children: [2,3,4]};// CAT
this.rules[43].opcodes[2] = {type: 4, index: 69};// RNM(rep-min)
this.rules[43].opcodes[3] = {type: 4, index: 46};// RNM(StarOp)
this.rules[43].opcodes[4] = {type: 4, index: 71};// RNM(rep-max)
this.rules[43].opcodes[5] = {type: 2, children: [6,7]};// CAT
this.rules[43].opcodes[6] = {type: 4, index: 69};// RNM(rep-min)
this.rules[43].opcodes[7] = {type: 4, index: 46};// RNM(StarOp)
this.rules[43].opcodes[8] = {type: 2, children: [9,10]};// CAT
this.rules[43].opcodes[9] = {type: 4, index: 46};// RNM(StarOp)
this.rules[43].opcodes[10] = {type: 4, index: 71};// RNM(rep-max)
this.rules[43].opcodes[11] = {type: 4, index: 46};// RNM(StarOp)
this.rules[43].opcodes[12] = {type: 4, index: 70};// RNM(rep-min-max)
/* AltOp */
this.rules[44].opcodes = [];
this.rules[44].opcodes[0] = {type: 2, children: [1,2]};// CAT
this.rules[44].opcodes[1] = {type: 6, string: [47]};// TBS
this.rules[44].opcodes[2] = {type: 4, index: 89};// RNM(owsp)
/* CatOp */
this.rules[45].opcodes = [];
this.rules[45].opcodes[0] = {type: 4, index: 90};// RNM(wsp)
/* StarOp */
this.rules[46].opcodes = [];
this.rules[46].opcodes[0] = {type: 6, string: [42]};// TBS
/* AndOp */
this.rules[47].opcodes = [];
this.rules[47].opcodes[0] = {type: 6, string: [38]};// TBS
/* NotOp */
this.rules[48].opcodes = [];
this.rules[48].opcodes[0] = {type: 6, string: [33]};// TBS
/* BkaOp */
this.rules[49].opcodes = [];
this.rules[49].opcodes[0] = {type: 6, string: [38,38]};// TBS
/* BknOp */
this.rules[50].opcodes = [];
this.rules[50].opcodes[0] = {type: 6, string: [33,33]};// TBS
/* AbgOp */
this.rules[51].opcodes = [];
this.rules[51].opcodes[0] = {type: 6, string: [37,94]};// TBS
/* AenOp */
this.rules[52].opcodes = [];
this.rules[52].opcodes[0] = {type: 6, string: [37,36]};// TBS
/* TrgOp */
this.rules[53].opcodes = [];
this.rules[53].opcodes[0] = {type: 2, children: [1,2]};// CAT
this.rules[53].opcodes[1] = {type: 6, string: [37]};// TBS
this.rules[53].opcodes[2] = {type: 1, children: [3,8,13]};// ALT
this.rules[53].opcodes[3] = {type: 2, children: [4,5,6,7]};// CAT
this.rules[53].opcodes[4] = {type: 4, index: 76};// RNM(Dec)
this.rules[53].opcodes[5] = {type: 4, index: 79};// RNM(dmin)
this.rules[53].opcodes[6] = {type: 6, string: [45]};// TBS
this.rules[53].opcodes[7] = {type: 4, index: 80};// RNM(dmax)
this.rules[53].opcodes[8] = {type: 2, children: [9,10,11,12]};// CAT
this.rules[53].opcodes[9] = {type: 4, index: 77};// RNM(Hex)
this.rules[53].opcodes[10] = {type: 4, index: 83};// RNM(xmin)
this.rules[53].opcodes[11] = {type: 6, string: [45]};// TBS
this.rules[53].opcodes[12] = {type: 4, index: 84};// RNM(xmax)
this.rules[53].opcodes[13] = {type: 2, children: [14,15,16,17]};// CAT
this.rules[53].opcodes[14] = {type: 4, index: 78};// RNM(Bin)
this.rules[53].opcodes[15] = {type: 4, index: 81};// RNM(bmin)
this.rules[53].opcodes[16] = {type: 6, string: [45]};// TBS
this.rules[53].opcodes[17] = {type: 4, index: 82};// RNM(bmax)
/* TbsOp */
this.rules[54].opcodes = [];
this.rules[54].opcodes[0] = {type: 2, children: [1,2]};// CAT
this.rules[54].opcodes[1] = {type: 6, string: [37]};// TBS
this.rules[54].opcodes[2] = {type: 1, children: [3,10,17]};// ALT
this.rules[54].opcodes[3] = {type: 2, children: [4,5,6]};// CAT
this.rules[54].opcodes[4] = {type: 4, index: 76};// RNM(Dec)
this.rules[54].opcodes[5] = {type: 4, index: 73};// RNM(dString)
this.rules[54].opcodes[6] = {type: 3, min: 0, max: Infinity};// REP
this.rules[54].opcodes[7] = {type: 2, children: [8,9]};// CAT
this.rules[54].opcodes[8] = {type: 6, string: [46]};// TBS
this.rules[54].opcodes[9] = {type: 4, index: 73};// RNM(dString)
this.rules[54].opcodes[10] = {type: 2, children: [11,12,13]};// CAT
this.rules[54].opcodes[11] = {type: 4, index: 77};// RNM(Hex)
this.rules[54].opcodes[12] = {type: 4, index: 74};// RNM(xString)
this.rules[54].opcodes[13] = {type: 3, min: 0, max: Infinity};// REP
this.rules[54].opcodes[14] = {type: 2, children: [15,16]};// CAT
this.rules[54].opcodes[15] = {type: 6, string: [46]};// TBS
this.rules[54].opcodes[16] = {type: 4, index: 74};// RNM(xString)
this.rules[54].opcodes[17] = {type: 2, children: [18,19,20]};// CAT
this.rules[54].opcodes[18] = {type: 4, index: 78};// RNM(Bin)
this.rules[54].opcodes[19] = {type: 4, index: 75};// RNM(bString)
this.rules[54].opcodes[20] = {type: 3, min: 0, max: Infinity};// REP
this.rules[54].opcodes[21] = {type: 2, children: [22,23]};// CAT
this.rules[54].opcodes[22] = {type: 6, string: [46]};// TBS
this.rules[54].opcodes[23] = {type: 4, index: 75};// RNM(bString)
/* TlsOp */
this.rules[55].opcodes = [];
this.rules[55].opcodes[0] = {type: 2, children: [1,2,3,4]};// CAT
this.rules[55].opcodes[1] = {type: 4, index: 56};// RNM(TlsCase)
this.rules[55].opcodes[2] = {type: 4, index: 57};// RNM(TlsOpen)
this.rules[55].opcodes[3] = {type: 4, index: 59};// RNM(TlsString)
this.rules[55].opcodes[4] = {type: 4, index: 58};// RNM(TlsClose)
/* TlsCase */
this.rules[56].opcodes = [];
this.rules[56].opcodes[0] = {type: 3, min: 0, max: 1};// REP
this.rules[56].opcodes[1] = {type: 1, children: [2,3]};// ALT
this.rules[56].opcodes[2] = {type: 7, string: [37,105]};// TLS
this.rules[56].opcodes[3] = {type: 7, string: [37,115]};// TLS
/* TlsOpen */
this.rules[57].opcodes = [];
this.rules[57].opcodes[0] = {type: 6, string: [34]};// TBS
/* TlsClose */
this.rules[58].opcodes = [];
this.rules[58].opcodes[0] = {type: 6, string: [34]};// TBS
/* TlsString */
this.rules[59].opcodes = [];
this.rules[59].opcodes[0] = {type: 3, min: 0, max: Infinity};// REP
this.rules[59].opcodes[1] = {type: 1, children: [2,3,4]};// ALT
this.rules[59].opcodes[2] = {type: 5, min: 32, max: 33};// TRG
this.rules[59].opcodes[3] = {type: 5, min: 35, max: 126};// TRG
this.rules[59].opcodes[4] = {type: 4, index: 60};// RNM(StringTab)
/* StringTab */
this.rules[60].opcodes = [];
this.rules[60].opcodes[0] = {type: 6, string: [9]};// TBS
/* ClsOp */
this.rules[61].opcodes = [];
this.rules[61].opcodes[0] = {type: 2, children: [1,2,3]};// CAT
this.rules[61].opcodes[1] = {type: 4, index: 62};// RNM(ClsOpen)
this.rules[61].opcodes[2] = {type: 4, index: 64};// RNM(ClsString)
this.rules[61].opcodes[3] = {type: 4, index: 63};// RNM(ClsClose)
/* ClsOpen */
this.rules[62].opcodes = [];
this.rules[62].opcodes[0] = {type: 6, string: [39]};// TBS
/* ClsClose */
this.rules[63].opcodes = [];
this.rules[63].opcodes[0] = {type: 6, string: [39]};// TBS
/* ClsString */
this.rules[64].opcodes = [];
this.rules[64].opcodes[0] = {type: 3, min: 0, max: Infinity};// REP
this.rules[64].opcodes[1] = {type: 1, children: [2,3,4]};// ALT
this.rules[64].opcodes[2] = {type: 5, min: 32, max: 38};// TRG
this.rules[64].opcodes[3] = {type: 5, min: 40, max: 126};// TRG
this.rules[64].opcodes[4] = {type: 4, index: 60};// RNM(StringTab)
/* ProsVal */
this.rules[65].opcodes = [];
this.rules[65].opcodes[0] = {type: 2, children: [1,2,3]};// CAT
this.rules[65].opcodes[1] = {type: 4, index: 66};// RNM(ProsValOpen)
this.rules[65].opcodes[2] = {type: 4, index: 67};// RNM(ProsValString)
this.rules[65].opcodes[3] = {type: 4, index: 68};// RNM(ProsValClose)
/* ProsValOpen */
this.rules[66].opcodes = [];
this.rules[66].opcodes[0] = {type: 6, string: [60]};// TBS
/* ProsValString */
this.rules[67].opcodes = [];
this.rules[67].opcodes[0] = {type: 3, min: 0, max: Infinity};// REP
this.rules[67].opcodes[1] = {type: 1, children: [2,3,4]};// ALT
this.rules[67].opcodes[2] = {type: 5, min: 32, max: 61};// TRG
this.rules[67].opcodes[3] = {type: 5, min: 63, max: 126};// TRG
this.rules[67].opcodes[4] = {type: 4, index: 60};// RNM(StringTab)
/* ProsValClose */
this.rules[68].opcodes = [];
this.rules[68].opcodes[0] = {type: 6, string: [62]};// TBS
/* rep-min */
this.rules[69].opcodes = [];
this.rules[69].opcodes[0] = {type: 4, index: 72};// RNM(rep-num)
/* rep-min-max */
this.rules[70].opcodes = [];
this.rules[70].opcodes[0] = {type: 4, index: 72};// RNM(rep-num)
/* rep-max */
this.rules[71].opcodes = [];
this.rules[71].opcodes[0] = {type: 4, index: 72};// RNM(rep-num)
/* rep-num */
this.rules[72].opcodes = [];
this.rules[72].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP
this.rules[72].opcodes[1] = {type: 5, min: 48, max: 57};// TRG
/* dString */
this.rules[73].opcodes = [];
this.rules[73].opcodes[0] = {type: 4, index: 85};// RNM(dnum)
/* xString */
this.rules[74].opcodes = [];
this.rules[74].opcodes[0] = {type: 4, index: 87};// RNM(xnum)
/* bString */
this.rules[75].opcodes = [];
this.rules[75].opcodes[0] = {type: 4, index: 86};// RNM(bnum)
/* Dec */
this.rules[76].opcodes = [];
this.rules[76].opcodes[0] = {type: 1, children: [1,2]};// ALT
this.rules[76].opcodes[1] = {type: 6, string: [68]};// TBS
this.rules[76].opcodes[2] = {type: 6, string: [100]};// TBS
/* Hex */
this.rules[77].opcodes = [];
this.rules[77].opcodes[0] = {type: 1, children: [1,2]};// ALT
this.rules[77].opcodes[1] = {type: 6, string: [88]};// TBS
this.rules[77].opcodes[2] = {type: 6, string: [120]};// TBS
/* Bin */
this.rules[78].opcodes = [];
this.rules[78].opcodes[0] = {type: 1, children: [1,2]};// ALT
this.rules[78].opcodes[1] = {type: 6, string: [66]};// TBS
this.rules[78].opcodes[2] = {type: 6, string: [98]};// TBS
/* dmin */
this.rules[79].opcodes = [];
this.rules[79].opcodes[0] = {type: 4, index: 85};// RNM(dnum)
/* dmax */
this.rules[80].opcodes = [];
this.rules[80].opcodes[0] = {type: 4, index: 85};// RNM(dnum)
/* bmin */
this.rules[81].opcodes = [];
this.rules[81].opcodes[0] = {type: 4, index: 86};// RNM(bnum)
/* bmax */
this.rules[82].opcodes = [];
this.rules[82].opcodes[0] = {type: 4, index: 86};// RNM(bnum)
/* xmin */
this.rules[83].opcodes = [];
this.rules[83].opcodes[0] = {type: 4, index: 87};// RNM(xnum)
/* xmax */
this.rules[84].opcodes = [];
this.rules[84].opcodes[0] = {type: 4, index: 87};// RNM(xnum)
/* dnum */
this.rules[85].opcodes = [];
this.rules[85].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP
this.rules[85].opcodes[1] = {type: 5, min: 48, max: 57};// TRG
/* bnum */
this.rules[86].opcodes = [];
this.rules[86].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP
this.rules[86].opcodes[1] = {type: 5, min: 48, max: 49};// TRG
/* xnum */
this.rules[87].opcodes = [];
this.rules[87].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP
this.rules[87].opcodes[1] = {type: 1, children: [2,3,4]};// ALT
this.rules[87].opcodes[2] = {type: 5, min: 48, max: 57};// TRG
this.rules[87].opcodes[3] = {type: 5, min: 65, max: 70};// TRG
this.rules[87].opcodes[4] = {type: 5, min: 97, max: 102};// TRG
/* alphanum */
this.rules[88].opcodes = [];
this.rules[88].opcodes[0] = {type: 2, children: [1,4]};// CAT
this.rules[88].opcodes[1] = {type: 1, children: [2,3]};// ALT
this.rules[88].opcodes[2] = {type: 5, min: 97, max: 122};// TRG
this.rules[88].opcodes[3] = {type: 5, min: 65, max: 90};// TRG
this.rules[88].opcodes[4] = {type: 3, min: 0, max: Infinity};// REP
this.rules[88].opcodes[5] = {type: 1, children: [6,7,8,9]};// ALT
this.rules[88].opcodes[6] = {type: 5, min: 97, max: 122};// TRG
this.rules[88].opcodes[7] = {type: 5, min: 65, max: 90};// TRG
this.rules[88].opcodes[8] = {type: 5, min: 48, max: 57};// TRG
this.rules[88].opcodes[9] = {type: 6, string: [45]};// TBS
/* owsp */
this.rules[89].opcodes = [];
this.rules[89].opcodes[0] = {type: 3, min: 0, max: Infinity};// REP
this.rules[89].opcodes[1] = {type: 4, index: 91};// RNM(space)
/* wsp */
this.rules[90].opcodes = [];
this.rules[90].opcodes[0] = {type: 3, min: 1, max: Infinity};// REP
this.rules[90].opcodes[1] = {type: 4, index: 91};// RNM(space)
/* space */
this.rules[91].opcodes = [];
this.rules[91].opcodes[0] = {type: 1, children: [1,2,3,4]};// ALT
this.rules[91].opcodes[1] = {type: 6, string: [32]};// TBS
this.rules[91].opcodes[2] = {type: 6, string: [9]};// TBS
this.rules[91].opcodes[3] = {type: 4, index: 92};// RNM(comment)
this.rules[91].opcodes[4] = {type: 4, index: 94};// RNM(LineContinue)
/* comment */
this.rules[92].opcodes = [];
this.rules[92].opcodes[0] = {type: 2, children: [1,2]};// CAT
this.rules[92].opcodes[1] = {type: 6, string: [59]};// TBS
this.rules[92].opcodes[2] = {type: 3, min: 0, max: Infinity};// REP
this.rules[92].opcodes[3] = {type: 1, children: [4,5]};// ALT
this.rules[92].opcodes[4] = {type: 5, min: 32, max: 126};// TRG
this.rules[92].opcodes[5] = {type: 6, string: [9]};// TBS
/* LineEnd */
this.rules[93].opcodes = [];
this.rules[93].opcodes[0] = {type: 1, children: [1,2,3]};// ALT
this.rules[93].opcodes[1] = {type: 6, string: [13,10]};// TBS
this.rules[93].opcodes[2] = {type: 6, string: [10]};// TBS
this.rules[93].opcodes[3] = {type: 6, string: [13]};// TBS
/* LineContinue */
this.rules[94].opcodes = [];
this.rules[94].opcodes[0] = {type: 2, children: [1,5]};// CAT
this.rules[94].opcodes[1] = {type: 1, children: [2,3,4]};// ALT
this.rules[94].opcodes[2] = {type: 6, string: [13,10]};// TBS
this.rules[94].opcodes[3] = {type: 6, string: [10]};// TBS
this.rules[94].opcodes[4] = {type: 6, string: [13]};// TBS
this.rules[94].opcodes[5] = {type: 1, children: [6,7]};// ALT
this.rules[94].opcodes[6] = {type: 6, string: [32]};// TBS
this.rules[94].opcodes[7] = {type: 6, string: [9]};// TBS
The toString()
function will display the original grammar file(s) that produced these opcodes.
this.toString = function toString(){
let str = "";
str += ";\n";
str += "; ABNF for JavaScript APG 2.0 SABNF\n";
str += "; RFC 5234 with some restrictions and additions.\n";
str += "; Updated 11/24/2015 for RFC 7405 case-sensitive literal string notation\n";
str += "; - accepts %s\"string\" as a case-sensitive string\n";
str += "; - accepts %i\"string\" as a case-insensitive string\n";
str += "; - accepts \"string\" as a case-insensitive string\n";
str += ";\n";
str += "; Some restrictions:\n";
str += "; 1. Rules must begin at first character of each line.\n";
str += "; Indentations on first rule and rules thereafter are not allowed.\n";
str += "; 2. Relaxed line endings. CRLF, LF or CR are accepted as valid line ending.\n";
str += "; 3. Prose values, i.e. <prose value>, are accepted as valid grammar syntax.\n";
str += "; However, a working parser cannot be generated from them.\n";
str += ";\n";
str += "; Super set (SABNF) additions:\n";
str += "; 1. Look-ahead (syntactic predicate) operators are accepted as element prefixes.\n";
str += "; & is the positive look-ahead operator, succeeds and backtracks if the look-ahead phrase is found\n";
str += "; ! is the negative look-ahead operator, succeeds and backtracks if the look-ahead phrase is NOT found\n";
str += "; e.g. &%d13 or &rule or !(A / B)\n";
str += "; 2. User-Defined Terminals (UDT) of the form, u_name and e_name are accepted.\n";
str += "; 'name' is alpha followed by alpha/num/hyphen just like a rule name.\n";
str += "; u_name may be used as an element but no rule definition is given.\n";
str += "; e.g. rule = A / u_myUdt\n";
str += "; A = \"a\"\n";
str += "; would be a valid grammar.\n";
str += "; 3. Case-sensitive, single-quoted strings are accepted.\n";
str += "; e.g. 'abc' would be equivalent to %d97.98.99\n";
str += "; (kept for backward compatibility, but superseded by %s\"abc\") \n";
str += "; New 12/26/2015\n";
str += "; 4. Look-behind operators are accepted as element prefixes.\n";
str += "; && is the positive look-behind operator, succeeds and backtracks if the look-behind phrase is found\n";
str += "; !! is the negative look-behind operator, succeeds and backtracks if the look-behind phrase is NOT found\n";
str += "; e.g. &&%d13 or &&rule or !!(A / B)\n";
str += "; 5. Back reference operators, i.e. \\rulename, are accepted.\n";
str += "; A back reference operator acts like a TLS or TBS terminal except that the phrase it attempts\n";
str += "; to match is a phrase previously matched by the rule 'rulename'.\n";
str += "; There are two modes of previous phrase matching - the parent-frame mode and the universal mode.\n";
str += "; In universal mode, \\rulename matches the last match to 'rulename' regardless of where it was found.\n";
str += "; In parent-frame mode, \\rulename matches only the last match found on the parent's frame or parse tree level.\n";
str += "; Back reference modifiers can be used to specify case and mode.\n";
str += "; \\A defaults to case-insensitive and universal mode, e.g. \\A === \\%i%uA\n";
str += "; Modifiers %i and %s determine case-insensitive and case-sensitive mode, respectively.\n";
str += "; Modifiers %u and %p determine universal mode and parent frame mode, respectively.\n";
str += "; Case and mode modifiers can appear in any order, e.g. \\%s%pA === \\%p%sA. \n";
str += "; 7. String begin anchor, ABG(%^) matches the beginning of the input string location.\n";
str += "; Returns EMPTY or NOMATCH. Never consumes any characters.\n";
str += "; 8. String end anchor, AEN(%$) matches the end of the input string location.\n";
str += "; Returns EMPTY or NOMATCH. Never consumes any characters.\n";
str += ";\n";
str += "File = *(BlankLine / Rule / RuleError)\n";
str += "BlankLine = *(%d32/%d9) [comment] LineEnd\n";
str += "Rule = RuleLookup owsp Alternation ((owsp LineEnd)\n";
str += " / (LineEndError LineEnd))\n";
str += "RuleLookup = RuleNameTest owsp DefinedAsTest\n";
str += "RuleNameTest = RuleName/RuleNameError\n";
str += "RuleName = alphanum\n";
str += "RuleNameError = 1*(%d33-60/%d62-126)\n";
str += "DefinedAsTest = DefinedAs / DefinedAsError\n";
str += "DefinedAsError = 1*2%d33-126\n";
str += "DefinedAs = IncAlt / Defined\n";
str += "Defined = %d61\n";
str += "IncAlt = %d61.47\n";
str += "RuleError = 1*(%d32-126 / %d9 / LineContinue) LineEnd\n";
str += "LineEndError = 1*(%d32-126 / %d9 / LineContinue)\n";
str += "Alternation = Concatenation *(owsp AltOp Concatenation)\n";
str += "Concatenation = Repetition *(CatOp Repetition)\n";
str += "Repetition = [Modifier] (Group / Option / BasicElement / BasicElementErr)\n";
str += "Modifier = (Predicate [RepOp])\n";
str += " / RepOp\n";
str += "Predicate = BkaOp\n";
str += " / BknOp\n";
str += " / AndOp\n";
str += " / NotOp\n";
str += "BasicElement = UdtOp\n";
str += " / RnmOp\n";
str += " / TrgOp\n";
str += " / TbsOp\n";
str += " / TlsOp\n";
str += " / ClsOp\n";
str += " / BkrOp\n";
str += " / AbgOp\n";
str += " / AenOp\n";
str += " / ProsVal\n";
str += "BasicElementErr = 1*(%d33-40/%d42-46/%d48-92/%d94-126)\n";
str += "Group = GroupOpen Alternation (GroupClose / GroupError)\n";
str += "GroupError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr\n";
str += "GroupOpen = %d40 owsp\n";
str += "GroupClose = owsp %d41\n";
str += "Option = OptionOpen Alternation (OptionClose / OptionError)\n";
str += "OptionError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr\n";
str += "OptionOpen = %d91 owsp\n";
str += "OptionClose = owsp %d93\n";
str += "RnmOp = alphanum\n";
str += "BkrOp = %d92 [bkrModifier] bkr-name\n";
str += "bkrModifier = (cs [um / pm]) / (ci [um / pm]) / (um [cs /ci]) / (pm [cs / ci])\n";
str += "cs = '%s'\n";
str += "ci = '%i'\n";
str += "um = '%u'\n";
str += "pm = '%p'\n";
str += "bkr-name = uname / ename / rname\n";
str += "rname = alphanum\n";
str += "uname = %d117.95 alphanum\n";
str += "ename = %d101.95 alphanum\n";
str += "UdtOp = udt-empty\n";
str += " / udt-non-empty\n";
str += "udt-non-empty = %d117.95 alphanum\n";
str += "udt-empty = %d101.95 alphanum\n";
str += "RepOp = (rep-min StarOp rep-max)\n";
str += " / (rep-min StarOp)\n";
str += " / (StarOp rep-max)\n";
str += " / StarOp\n";
str += " / rep-min-max\n";
str += "AltOp = %d47 owsp\n";
str += "CatOp = wsp\n";
str += "StarOp = %d42\n";
str += "AndOp = %d38\n";
str += "NotOp = %d33\n";
str += "BkaOp = %d38.38\n";
str += "BknOp = %d33.33\n";
str += "AbgOp = %d37.94\n";
str += "AenOp = %d37.36\n";
str += "TrgOp = %d37 ((Dec dmin %d45 dmax) / (Hex xmin %d45 xmax) / (Bin bmin %d45 bmax))\n";
str += "TbsOp = %d37 ((Dec dString *(%d46 dString)) / (Hex xString *(%d46 xString)) / (Bin bString *(%d46 bString)))\n";
str += "TlsOp = TlsCase TlsOpen TlsString TlsClose\n";
str += "TlsCase = [\"%i\" / \"%s\"]\n";
str += "TlsOpen = %d34\n";
str += "TlsClose = %d34\n";
str += "TlsString = *(%d32-33/%d35-126/StringTab)\n";
str += "StringTab = %d9\n";
str += "ClsOp = ClsOpen ClsString ClsClose\n";
str += "ClsOpen = %d39\n";
str += "ClsClose = %d39\n";
str += "ClsString = *(%d32-38/%d40-126/StringTab)\n";
str += "ProsVal = ProsValOpen ProsValString ProsValClose\n";
str += "ProsValOpen = %d60\n";
str += "ProsValString = *(%d32-61/%d63-126/StringTab)\n";
str += "ProsValClose = %d62\n";
str += "rep-min = rep-num\n";
str += "rep-min-max = rep-num\n";
str += "rep-max = rep-num\n";
str += "rep-num = 1*(%d48-57)\n";
str += "dString = dnum\n";
str += "xString = xnum\n";
str += "bString = bnum\n";
str += "Dec = (%d68/%d100)\n";
str += "Hex = (%d88/%d120)\n";
str += "Bin = (%d66/%d98)\n";
str += "dmin = dnum\n";
str += "dmax = dnum\n";
str += "bmin = bnum\n";
str += "bmax = bnum\n";
str += "xmin = xnum\n";
str += "xmax = xnum\n";
str += "dnum = 1*(%d48-57)\n";
str += "bnum = 1*%d48-49\n";
str += "xnum = 1*(%d48-57 / %d65-70 / %d97-102)\n";
str += ";\n";
str += "; Basics\n";
str += "alphanum = (%d97-122/%d65-90) *(%d97-122/%d65-90/%d48-57/%d45)\n";
str += "owsp = *space\n";
str += "wsp = 1*space\n";
str += "space = %d32\n";
str += " / %d9\n";
str += " / comment\n";
str += " / LineContinue\n";
str += "comment = %d59 *(%d32-126 / %d9)\n";
str += "LineEnd = %d13.10\n";
str += " / %d10\n";
str += " / %d13\n";
str += "LineContinue = (%d13.10 / %d10 / %d13) (%d32 / %d9)\n";
return str;
}
}