NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Go language support

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
Peter Nabbefeld
Posted via mailing list.





PostPosted: Wed Mar 15, 2017 1:02 pm    Post subject: Go language support Reply with quote

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
Back to top
Andreas Stefik
Posted via mailing list.





PostPosted: Thu Mar 16, 2017 4:23 am    Post subject: Go language support Reply with quote

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/):


https://bitbucket.org/stefika/quorum-language/src/c7fa44890fd357ce7f90aed5d5cd2f9c56540702/IDE/Sodbeans/Quorum/src/org/quorum/?at=master



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 <address-removed ([email]address-removed[/email])> wrote:
Quote:
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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo