Class: Pubid::Iala::Parser
- Inherits:
-
Parslet::Parser
- Object
- Parslet::Parser
- Pubid::Iala::Parser
- Includes:
- Parser::CommonParseRules
- Defined in:
- lib/pubid/iala/parser.rb
Overview
Parslet grammar for IALA identifiers.
Accepts every shape that appears on the IALA website or cover page:
S1070
S1070 Ed 2.0
IALA S1070 Ed 2.0
S1070 Ed 2.0 (F)
R1016:ed2.0(F)
C0103-1
C0103-1 Ed 3.0
Class Method Summary collapse
-
.parse(string) ⇒ Hash
Parse a string and return the raw parslet tree.
Methods included from Parser::CommonParseRules
Class Method Details
.parse(string) ⇒ Hash
Parse a string and return the raw parslet tree.
92 93 94 95 96 |
# File 'lib/pubid/iala/parser.rb', line 92 def self.parse(string) raise ArgumentError, "IALA identifier string exceeds maximum length" if string.length > ::Pubid::MAX_INPUT_LENGTH new.parse(string.strip) end |