Question

I am using netbeans and am using a language which is new and not supported by netbeans. Its actually a DSL. I want to build a syntax highlighter as well as an want to indent the code wherever possible. The language's name is Visage and there is no netbeans support till now. I want tutorials as well as examples to get this built pretty fast. I have 4 days to go to get this thing done. Please let me know the relevant tutorials so as to get this thing done.

Was it helpful?

Solution

To support a new language for NetBeans 7.1+, you'll need to write a JavaCC grammar that will be used to generate a lexer1 and a parser2 and integrate them in NetBeans.

  1. http://platform.netbeans.org/tutorials/nbm-javacc-lexer.html
  2. http://platform.netbeans.org/tutorials/nbm-javacc-parser.html

There's also ANTLR support instead of JavaCC: http://wiki.netbeans.org/Netbeans_Rcp_Antlr_Integration_Index

But if NetBeans plugin development and/or parser generators like ANTLR or JavaCC are new to you, 4 days isn't even going to be enough to get familiar with these tools, let alone have a working plugin.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top