Class: Pubid::Gb::Parser
- Inherits:
-
Parslet::Parser
- Object
- Parslet::Parser
- Pubid::Gb::Parser
- Defined in:
- lib/pubid/gb/parser.rb
Overview
Parslet grammar for Chinese Standard identifiers.
Accepts the canonical printed form
{PUBLISHER}[/{TYPE}] {NUMBER}[.{PART}][-|—{YEAR}] [(all parts)]
PUBLISHER is one of the leading tokens from PREFIXES (GB, GB/T, JB, T/GZAEPI, ...). TYPE is T (recommended), Z (guideline), or omitted. YEAR is 4 digits, separated by either ASCII dash or em-dash (Chinese typography uses the em-dash form).
Class Method Summary collapse
Class Method Details
.parse(input) ⇒ Object
58 59 60 |
# File 'lib/pubid/gb/parser.rb', line 58 def self.parse(input) new.parse(input) end |