disable external build or new way to build lexer
I'm working with custom languages and now I upgrade to 13 version, and I see that the option of "use external build" has dissapeared. I need to disable it to make the project and refresh the Lexer or there is another way to make the project and auto-regenerate the Lexer?
I'm inspirated in http://confluence.jetbrains.com/display/IntelliJIDEA/Lexer+and+Parser+Definition
Please sign in to leave a comment.
You can try configuring automatic compilation of the lexer using the File Watchers feature (Settings | File Watchers). Personally, I've never used automatic compilation of lexers; they don't change that often, and when they do, it's not a problem to trigger the compilation by hand.
Please, could you say me wich program and arguments I have to run in the file watcher to generate the java Lexer.
I tried putting the jflex.sh included in binaries of Idea sources /tools/lexer/jflex-1.4/bin/jFlex
but it doesn't allow.
Thanks!
Try Grammar-Kit Plugin. It supports code highlighting in *.flex files and adds context menu action to build lexer. The main thing is that it allows to write parsers easily.
Done with the FileWatcher, but it doesn't works equals than the internal builder. I guess the Grammar-kit doesn't create the lexer.java.
Thanks a lot!
It does. The action is in the context menu of *.flex file. Default shortcut is Ctrl+Shift+G on Windows or Meta+Shift+G on Mac.
This didn't work properly for me until I uninstalled the JFlex plugin. Until I did, a non-working
generate was bound to that key.
Yep, Grammar-Kit and JFlex plugins conflict. Grammar-Kit is preferred.