Class: Pubid::Ecma::Parser

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

Overview

Parslet grammar for ECMA identifiers.

Four printed forms (see HANDOFFS/ecma.md):

ECMA-411          standard
ECMA-418-1        standard with part
ECMA TR/101       technical report
ECMA MEM/1970     memento

Each branch captures its number under a distinct key so the builder can pick the identifier class without a separate type token. Numbers are kept as strings to preserve any leading zeros.

Class Method Summary collapse

Class Method Details

.parse(input) ⇒ Object



36
37
38
# File 'lib/pubid/ecma/parser.rb', line 36

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