Using parboiled for custom language plugin: Combined Lexer/Parser

Hi,

I've started a project for a custom language plugin using parboiled, a PEG parser library. As such, I do not have a separate lexer for my plugin at the moment.
At this point I am trying to add some simple code completion, but apparently IntelliJ expects a working lexer (instead of the current EmptyLexer returned by my parser definition).

I have looked at using the parser directly, or somehow generating a lexer, but have been unsuccesful so far. I would really like to keep grammar code in one place instead of maintaining a lexer separately.

My question:
* Is there a way of building a custom language plugin with a single lexer/parser (e.a. with just a parser) and support code completion?
* Is there maybe some other solution that I am unaware of at the moment?

Sincerely,
Mattijs

1 comment

Please sign in to leave a comment.