Token to node conversions are used for tokens, which do not require any additional checking of the tokens context. This is especially useful, because the wiki tokenizer already implement a lot of this logic.

We cannot express the Wiki syntax as a usual grammar using a BNF. This structure implements a pseudo grammar by assigning a number of callbacks for internal methods implementing reduction rules for a detected syntax element.

We cannot express the Wiki syntax as a usual grammar using a BNF. With the pumping lemma for context free grammars [1] you can easily prove, that the word a^n b c^n d e^n is not a context free grammar, and this is what the title definitions are.

This structure contains an array with callbacks implementing the shift rules for all tokens. There may be multiple rules for one single token.

The callbacks itself create syntax elements and push them to the document stack. After each push the reduction callbacks will be called for the pushed elements.

Parameters

shiftWithTokenConversion

Token to node conversions are used for tokens, which do not require any additional checking of the tokens context. This is especially useful, because the wiki tokenizer already implement a lot of this logic.

The actual conversions are specified in the class property $conversionsArray.