eZPublishCommunityProject  2012.12
eZ\Publish\Core\Persistence\Legacy\Content\Search\TransformationProcessor\DefinitionBased\Parser Class Reference

Parser for transformation specifications. More...

Public Member Functions

 __construct ($installDir)
 Construct. More...
 
 parse ($file)
 Parse the specified transformation file into an AST. More...
 
 parseString ($string)
 Parse the given string into an AST. More...
 

Protected Member Functions

 filterValues (array $data)
 Filter out numeric array keys. More...
 
 tokenize ($string)
 Tokenize transformation input file. More...
 

Protected Attributes

 $installDir
 
 $tokenSpecifications = null
 

Detailed Description

Parser for transformation specifications.

The transformation specifications look like:

CF = CF... : Map from one char to one or more chars (map) CF - CF = CF... : Map range of chars to one or more chars (replace) CF - CF +- xx : Transpose several chars by value xx (transpose) CF - CF % yy +- xx : Transpose several chars by value xx, yy denotes skip value yy equal to 1 is the same as 'transpose' (transpose-modulo) TI[,TI...] :

CF = Character Format TI = Transform Identifier

Character formats: U+xxxx : Unicode value in hexadecimal xx: Ascii value in hexadecimal remove : Remove character from result, can only be used in destination keep : Keep character as it is, can only be used in destination "xxxx" : Multiple characters as a string, can only be used in destination, \ means \ and " means "

Constructor & Destructor Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Search\TransformationProcessor\DefinitionBased\Parser::__construct (   $installDir)

Construct.

Parameters
string$installDirBase dir for rule loading
Returns
void

Member Function Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Search\TransformationProcessor\DefinitionBased\Parser::filterValues ( array  $data)
protected

Filter out numeric array keys.

Parameters
array$data
Returns
array

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\Search\TransformationProcessor\DefinitionBased\Parser\tokenize().

eZ\Publish\Core\Persistence\Legacy\Content\Search\TransformationProcessor\DefinitionBased\Parser::parse (   $file)

Parse the specified transformation file into an AST.

Parameters
string$file
Returns
array
eZ\Publish\Core\Persistence\Legacy\Content\Search\TransformationProcessor\DefinitionBased\Parser::parseString (   $string)

Parse the given string into an AST.

Parameters
string$string
Returns
array

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\Search\TransformationProcessor\DefinitionBased\Parser\parse().

eZ\Publish\Core\Persistence\Legacy\Content\Search\TransformationProcessor\DefinitionBased\Parser::tokenize (   $string)
protected

Tokenize transformation input file.

Returns an array of tokens

Parameters
string$string
Returns
array

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\Search\TransformationProcessor\DefinitionBased\Parser\parseString().

Member Data Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Search\TransformationProcessor\DefinitionBased\Parser::$installDir
protected
eZ\Publish\Core\Persistence\Legacy\Content\Search\TransformationProcessor\DefinitionBased\Parser::$tokenSpecifications = null
protected

The documentation for this class was generated from the following file: