Class Parser

Summary

Fully Qualified Name: Zend\I18n\Translator\Plural\Parser

Description

Plural rule parser.

This plural rule parser is implemented after the article "Top Down Operator Precedence" described in http://javascript.crockford.com/tdop/tdop.html.

Methods

Name Description Defined By
__construct() Create a new plural parser. Parser
advance() Advance the current token and optionally check the old token id. Parser
expression() Parse an expression. Parser
parse() Parse a string. Parser

Method Details

__construct()

Create a new plural parser.

Returns:

advance()

Advance the current token and optionally check the old token id.

Parameter Name Type Description
$id string

Returns: void

expression()

Parse an expression.

Parameter Name Type Description
$rightBindingPower int

Returns: \Symbol

parse()

Parse a string.

Parameter Name Type Description
$string string

Returns: \Symbol

Top