Skip to main content

From JavaCC Grammar to NetBeans Code Editor

You can get pretty far without much coding, if you start off with a JavaCC grammar file and want to end up with an editor for your language, as these two new tutorials show:

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

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

These tutorials are based on some notes in the Wiki, created by various NetBeans Platform developers. That document should now be considered obsolete and the above two documents replace them.

More features will be described and the features described so far will be expanded. An ANTLR version of these tutorials is also in the works, though the majority of the above two tutorials, i.e., the parts describing integration with NetBeans editor features, is the same regardless of the parser/lexer generator you choose to use.

Though some parts are a bit basic, a lot of it has never been documented before. If there are parts that you know how to add in the context of the tutorials, please let me know and I will pass the sources on to you so that you can expand on them. Feedback is extremely welcome.