Closed alamhubb closed 9 months ago
There might still be some but it's not trivial to locate them in OSS plugins. In IntelliJ IDEA, Java plugin still uses manually written parser.
There might still be some but it's not trivial to locate them in OSS plugins. In IntelliJ IDEA, Java plugin still uses manually written parser.
Thanks, but I didn’t find the Java plugin repository in github that you mentioned. Could you please paste its github address or other url link? I searched for java in the idea and only found these, but not the java plugin.
See java/java-psi-impl/src/com/intellij/lang/java/parser/
See
java/java-psi-impl/src/com/intellij/lang/java/parser/
very thanks
As you can see Grammar-Kit parsers mostly look like ordinary, recursive-descend, hand-written parsers.
Differences:
GeneratedParserUtilBase
.Two more: https://github.com/JetBrains/intellij-community/tree/idea/233.13135.103/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/parsing/PropertiesParser.java (very simple) https://github.com/JetBrains/intellij-community/blob/idea/233.13135.103/RegExpSupport/src/org/intellij/lang/regexp/RegExpParser.java (more complex)
Two more: https://github.com/JetBrains/intellij-community/tree/idea/233.13135.103/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/parsing/PropertiesParser.java (very simple) https://github.com/JetBrains/intellij-community/blob/idea/233.13135.103/RegExpSupport/src/org/intellij/lang/regexp/RegExpParser.java (more complex)
thanks very much,I will study hard
How to write parser manually without using grammar-kit? Are there any relevant examples?
https://plugins.jetbrains.com/docs/intellij/implementing-parser-and-psi.html#parser-implementation