Class: Pubid::Idf::Parser

Inherits:
Parslet::Parser
  • Object
show all
Includes:
Parser::CommonParseMethods, Parser::CommonParseRules
Defined in:
lib/pubid/idf/parser.rb

Constant Summary collapse

TYPED_STAGES =

We need to sort by length to match longest first because that’s how Parslet works

Pubid::Idf.all_typed_stages
.map(&:abbr).flatten.sort_by(&:length).reverse
TYPED_STAGES_SUPPLEMENTS =
Pubid::Idf.all_typed_stages
.select { |ts| %w[amd cor].include?(ts.type_code.to_s) }
.map(&:abbr).flatten.sort_by(&:length).reverse

Method Summary

Methods included from Parser::CommonParseMethods

#array_to_str

Methods included from Parser::CommonParseRules

included