Class

eZ\Publish\Core\Persistence\TransformationProcessor\DefinitionBased\Parser

class Parser

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 "

Methods

__construct()

Construct.

array parse(string $file)

Parse the specified transformation file into an AST.

array parseString(string $string)

Parse the given string into an AST.

Details

at line 51
public __construct()

Construct.

at line 82
public array parse(string $file)

Parse the specified transformation file into an AST.

Parameters

string $file

Return Value

array

at line 96
public array parseString(string $string)

Parse the given string into an AST.

Parameters

string $string

Return Value

array