Class: Pubid::Iana::Parser

Inherits:
Parslet::Parser
  • Object
show all
Defined in:
lib/pubid/iana/parser.rb

Overview

Parslet grammar for IANA registry identifiers.

Accepts the authoritative printed form "IANA [/]" as well as a bare index-key slug (no "IANA " prefix). The optional prefix is consumed and discarded — the renderer always re-emits it.

Slugs use only [a-zA-Z0-9._-] and contain at most one "/", so a plain character-class repeat parses them; there is no ReDoS surface.

Class Method Summary collapse

Class Method Details

.parse(input) ⇒ Object



33
34
35
# File 'lib/pubid/iana/parser.rb', line 33

def self.parse(input)
  new.parse(input)
end