This task tracks ongoing work to port the tokenizer component of Parsoid to PHP. The general plan is:
- Fork PEG.js, rebranding as WikiPEG (complete).
- Implement rule parameters in WikiPEG, in order to simplify the grammar and improve performance (implementation complete, but should have more testing).
- Add a PHP generator backend to WikiPEG
- Port the action code embedded within the Parsoid grammar from JS to PHP.
- Port functions called by the action code to PHP. Only a mock implementation is needed for this subproject.
- Analyse performance of the PHP code and do any necessary optimisation work.