1# Antlr 2 3 4With the [version 4.9.3](#version) 5```cmd 6antlr4 ^ 7 -o D:\dokuwiki\lib\plugins\combo\ComboStrap\PageSqlParser ^ 8 -package ComboStrap\PageSqlParser ^ 9 -Dlanguage=PHP ^ 10 -lib D:/dokuwiki/lib/plugins/combo/grammar ^ 11 D:/dokuwiki/lib/plugins/combo/grammar\PageSql.g4 12``` 13 14 15Don't for now as the idea plugin is not compatible. In the generator configuration in Idea: 16 * Output directory: `D:\dokuwiki\lib\plugins\combo\` 17 * Package: `ComboStrap\PageSqlParser` 18 * Language: `PHP` 19 * Lib (not yet used): `D:\dokuwiki\lib\plugins\combo\grammar` 20 21See the [documentation](https://datacadamia.com/antlr/idea#test_antlr_rule) 22 23 24## Version 25 26 27For php7, you should install: 28 * Runtime 0.5.1 29 * Runtime 0.6 as a bad ATN 30 * Above 0.6 antlr requires php8 - The antlr version can be seen in `Antlr\Antlr4\Runtime\RuntimeMetadata`. It's `4.9.3` 31```bash 32composer require antlr/antlr4-php-runtime:0.5.1 33``` 34 * We can't manually use the antlr idea plugin (too old: 1.17 (ANTLR 4.9.2) (File > Settings > Install Manually) 35https://plugins.jetbrains.com/plugin/7358-antlr-v4/versions 36 * [Download the version 4.9.3](https://github.com/antlr/website-antlr4/blob/gh-pages/download/antlr-4.9.3-complete.jar) 37 * And run it at the command line 38 39## How to use in IntelliJ 40 41Select the `pageSql` rule, right and select `Test Rule Page Sql` 42