Phiki comes with a set of built-in grammars for popular programming languages, but you can also create and use your own custom grammars. This is particularly useful if you’re working with a language that isn’t supported out of the box.Documentation Index
Fetch the complete documentation index at: https://phiki.dev/llms.txt
Use this file to discover all available pages before exploring further.
Local files
If your grammar is stored in a local JSON file, you can load it by passing the slug of the grammar and file path to thegrammar() method.
Runtime grammars
You can also define grammars at runtime by providing a grammar definition as an associative array to theGrammar::parse() method.
Usage
To use your custom grammar, simply pass the slug you defined when registering the grammar instead of aPhiki\Grammar\Grammar enum value.
Aliasing
If you wish to register custom aliases for a grammar that has already been registered, you can do so by calling thePhiki::alias() method.
my-php as an alias for the built-in PHP grammar.