I'm writing a plugin for a statically typed programming language. The language parser is implemented in java. I read on
that "IDEA currently does not provide a ready way to reuse existing language grammars (for example, from ANTLR) for creating custom language parsers. The parsers need to be coded manually, as a recursive descent implementation." I hope I'm misreading that, because I'd really like to reuse the existing recursive descent parser. I'm considering writing an adapter between PsiBuilder and the internal interface used for a tokenizer/lexer in the parser, so that the PsiBuilder's input is consumed properly, and then doing the parse into the languages standard AST objects, then transforming them to IntelliJ-based AST nodes.
Is this a crazy approach? I really don't want to maintain two versions of the parser for this language.