Class: Pubid::Iso::Parser

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

Constant Summary collapse

DASH_CHARS =
["-", "", ""].freeze
TYPED_STAGES =

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

Pubid::Iso::Scheme.typed_stages
.map(&:abbr).flatten.sort_by(&:length).reverse
TYPED_STAGES_SUPPLEMENTS =
Pubid::Iso::Scheme.supplement_typed_stages
.map(&:abbr).flatten.sort_by(&:length).reverse
ORGANIZATIONS =
%w[
  ISO IEC IEEE CIW SAE CIE ASME ASTM OECD ISO HL7 CEI UNDP
].freeze
EDITION_STRINGS =
%w[Edition Ed. ED Ed].freeze
DIRECTIVES_TYPED_STAGES =
Identifiers::Directives::TYPED_STAGES.map(&:abbr).flatten.sort_by(&:length).reverse
DIRECTIVES_SUPPLEMENTS_TYPED_STAGES =
Identifiers::DirectivesSupplement::TYPED_STAGES.map(&:abbr).flatten.sort_by(&:length).reverse

Method Summary

Methods included from Parser::CommonParseMethods

#array_to_str

Methods included from Parser::CommonParseRules

included