Go language support

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Go language support

Peter Nabbefeld
Hello,

there had been some Go support for NB 7, which had been incomplete (due
to comments), and I don't have the source code for it.

Now I've started a new implementation from Golang.g4 grammar found in
the antlr4 repositories.

The grammar file is under BSD license, so that should not cause
problems. My only modification has been to remove the "-> skip" directives.

As an implementation guide I basically used
http://wiki.netbeans.org/Netbeans_Rcp_Antlr_Integration_Index, but I had
already to add some LanguageRegistration to get highlighting working.

Currently I'm working on the formatting part. Now I have to use the
parser, and now I'm getting a conflict with the LanguageRegistration, as
CSL ParserResult is expected instead of Parsing API Parser.Result.

Could someone probably help me to fix this? Source code is at
https://github.com/OldGrumble/go-language-support-proto.

Kind regards
Peter
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Go language support

Andreas Stefik
Hey Peter,

Here's a bunch of source on how to do language integration, in this case for the Quorum programming language (https://www.quorumlanguage.com/):


Some of the tutorials nowadays are pretty out of date, so these could help. The source is all BSD, so steal away if you find it helpful. There are Quorum specific hooks in there, but the NetBeans architecture part is pretty modern. It doesn't have "every" feature, but it has a lot.

Stefik




On Wed, Mar 15, 2017 at 6:01 AM, Peter Nabbefeld <[hidden email]> wrote:
Hello,

there had been some Go support for NB 7, which had been incomplete (due to comments), and I don't have the source code for it.

Now I've started a new implementation from Golang.g4 grammar found in the antlr4 repositories.

The grammar file is under BSD license, so that should not cause problems. My only modification has been to remove the "-> skip" directives.

As an implementation guide I basically used http://wiki.netbeans.org/Netbeans_Rcp_Antlr_Integration_Index, but I had already to add some LanguageRegistration to get highlighting working.

Currently I'm working on the formatting part. Now I have to use the parser, and now I'm getting a conflict with the LanguageRegistration, as CSL ParserResult is expected instead of Parsing API Parser.Result.

Could someone probably help me to fix this? Source code is at https://github.com/OldGrumble/go-language-support-proto.

Kind regards
Peter

Loading...