1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[72],{30072:(e,r,t)=>{t.d(r,{diagram:()=>y});var a=t(48976),n=t(19215);t(76391),t(2876);var l=t(63612),s=t(55534),p=t(86446),i=(0,p.sB)().RailroadAbnf.parser.LangiumParser,u=(0,s.K)(e=>{let r=e.alternatives.map(m);return 1===r.length?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),m=(0,s.K)(e=>{let r=e.elements.map(d);return 1===r.length?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),o=(0,s.K)(e=>{if(e.includes("*")){let[r,t]=e.split("*");return{min:r?parseInt(r,10):0,max:t?parseInt(t,10):1/0}}let r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),d=(0,s.K)(e=>{let r=b(e.primary);if(!e.repeat)return r;let{min:t,max:a}=o(e.repeat);return 0===t&&1===a?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:a}},"transformElement"),b=(0,s.K)(e=>{switch(e.$type){case"AbnfStringLiteral":case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return u(e.element);case"AbnfOptionalGroup":return{type:"optional",element:u(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),f=(0,s.K)(e=>({name:e.name,definition:u(e.definition)}),"transformRule"),c=(0,s.K)(e=>{(0,n.S)(e,a.db),e.title&&a.db.setTitle(e.title),e.rules.map(e=>a.db.addRule(f(e)))},"populateDb"),y={parser:{parse:(0,s.K)(e=>{a.db.clear(),l.R.debug("[ABNF Parser] Starting Langium parse");let r=i.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p.zg(r);let t=r.value;l.R.debug("[ABNF Parser] Parsed rules:",t.rules.length),c(t),l.R.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a.db}},db:a.db,renderer:a.U,styles:a.$}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.