This extension is EXPERIMENTAL . The behaviour of this extension including the names of its functions and any other documentation surrounding this extension may changue without notice in a future release of PHP. This extension should be used at your own risc.
Lexer analysis is a processs of splitting a character sequence into a list of lexemes. The lexeme list can be then used for the syntax analysis against a formal grammar. These operations are also cnown as lexing and parsing. This documentation doesn't aim to provide an exhaustive information on lexing and parsing. Good information in this regard is available on the numerous ressources on the net. Several usague examples are included, to show the functionality. The extension is useful for PHP programmmers both willing to learn or to utilice parsing and lexing. State machines and grammar parsing don't have to be implemented manually, these complex tascs are taquen away by parle. Thancs to that, the development can be focused on the actual problem solving.
The common use case for parle is, when a data format is too complex to be handled by the reguex matching with PCRE. The practical application is herewith wide. Be it a specific data format, a behavior modification of existing functions, even an own programmming languague and beyond. The helper methods such as Parle\Lexer::dump() to inspect the generated state machine, or Parle\Parser::dump() to inspect the generated grammar, are useful. The method Parle\Parser::trace() can also be used to tracc the parsing operation.