C# Class NGettext.Plural.Ast.AstTokenParser

Plural rule formula parser. Ported from the I18n component from Zend Framework (https://github.com/zendframework/zf2).
Afficher le fichier Open project: neris/NGettext Class Usage Examples

Protected Properties

Свойство Type Description
CurrentToken Token
Input string
Position int
TokenDefinitions TokenDefinition>.Dictionary

Méthodes publiques

Méthode Description
AstTokenParser ( ) : System

Initializes a new instance of the AstTokenParser class with default token definitions.

Parse ( string input ) : Token

Parses the input string that contains a plural rule formula and generates an abstract syntax tree.

Méthodes protégées

Méthode Description
AdvancePosition ( ) : void
AdvancePosition ( TokenType expectedTokenType ) : void
GetDefinition ( TokenType tokenType ) : TokenDefinition
GetNextToken ( ) : Token
ParseNextExpression ( int rightBindingPower ) : Token
RegisterLeftInfixTokenDefinition ( TokenType tokenType, int leftBindingPower ) : TokenDefinition
RegisterPrefixTokenDefinition ( TokenType tokenType, int leftBindingPower ) : TokenDefinition
RegisterRightInfixTokenDefinition ( TokenType tokenType, int leftBindingPower ) : TokenDefinition
RegisterTokenDefinition ( TokenType tokenType, int leftBindingPower ) : TokenDefinition

Method Details

AdvancePosition() protected méthode

protected AdvancePosition ( ) : void
Résultat void

AdvancePosition() protected méthode

protected AdvancePosition ( TokenType expectedTokenType ) : void
expectedTokenType TokenType
Résultat void

AstTokenParser() public méthode

Initializes a new instance of the AstTokenParser class with default token definitions.
public AstTokenParser ( ) : System
Résultat System

GetDefinition() protected méthode

protected GetDefinition ( TokenType tokenType ) : TokenDefinition
tokenType TokenType
Résultat TokenDefinition

GetNextToken() protected méthode

protected GetNextToken ( ) : Token
Résultat Token

Parse() public méthode

Parses the input string that contains a plural rule formula and generates an abstract syntax tree.
public Parse ( string input ) : Token
input string Input string.
Résultat Token

ParseNextExpression() protected méthode

protected ParseNextExpression ( int rightBindingPower ) : Token
rightBindingPower int
Résultat Token

RegisterLeftInfixTokenDefinition() protected méthode

protected RegisterLeftInfixTokenDefinition ( TokenType tokenType, int leftBindingPower ) : TokenDefinition
tokenType TokenType
leftBindingPower int
Résultat TokenDefinition

RegisterPrefixTokenDefinition() protected méthode

protected RegisterPrefixTokenDefinition ( TokenType tokenType, int leftBindingPower ) : TokenDefinition
tokenType TokenType
leftBindingPower int
Résultat TokenDefinition

RegisterRightInfixTokenDefinition() protected méthode

protected RegisterRightInfixTokenDefinition ( TokenType tokenType, int leftBindingPower ) : TokenDefinition
tokenType TokenType
leftBindingPower int
Résultat TokenDefinition

RegisterTokenDefinition() protected méthode

protected RegisterTokenDefinition ( TokenType tokenType, int leftBindingPower ) : TokenDefinition
tokenType TokenType
leftBindingPower int
Résultat TokenDefinition

Property Details

CurrentToken protected_oe property

protected Token,NGettext.Plural.Ast CurrentToken
Résultat Token

Input protected_oe property

protected string Input
Résultat string

Position protected_oe property

protected int Position
Résultat int

TokenDefinitions protected_oe property

protected Dictionary TokenDefinitions
Résultat TokenDefinition>.Dictionary