Antlr Editor Support - plugin detail

Support for editing Antlr grammar (.g) files.

NetBeans Plugin - Antlr Editor Support
Plugin owner: nnnnnk
Website: http://kenai.com/projects/nbantlr
Added: 2008-11-24
License: GPL 2 & CDDL
Category: Programming Languages
Downloaded: 5,920 times
Rating:
 4.35, by 7 users

Plugin Log Show log

Versions available

Download plugin   Download size: 0.02 MB   Last Update: 2011-08-30

This plugin is also available on the NetBeans Plugin Portal Update Center. Use 'Tools > Plugins' action from the NetBeans IDE main menu for convenient installation of this plugin


What's new in this version

For 0.2.8:
Compatible with NetBeans 7.0.

For 0.2.7:
Compatible with NetBeans 6.9.

For 0.2.6:
Fixed issues in rewrite rules.

For 0.2.5:
Compatible with NetBeans 6.7.
Unfortunately It's NOT compatible with NetBeans 6.1.
Last NetBeans 6.1 compatible version is 0.2.4. It could be found in Antlr Support Project Downloads on Kenai.com.

For 0.2.4:
Added support for lexer/parser grammar, import constructions.

For 0.2.3:
Removed wrong dependency for 6.1 compatibility.

For 0.2.2:
Nice cursor for hyperlink :)

For 0.2.1:
Added exception construction support.

For 0.2:
Code completion,
Hyperlink,
Mark Occurrences,
Navigator for tokens,
Improved accuracy.

Verifications for NetBeans versions

7.0 verification PASSED See verification details


Introduction

Support for editing Antlr grammar (.g) files:
Coloring,
Code folding,
Code completion,
Hyperlink,
Mark Occurrences,
Navigator.

[ You have to be logged in to be able to comment. ]

User Comments

  

Fail to edit matlab grammar

I installed the plugin along with NB7.1rc2 and tried to open matlab.g from http://www.mit.edu/~wingated/code/mparser_0.1.tar.gz [1] but it fails with the following exception:

SEVERE [global]
java.lang.IllegalArgumentException: org.netbeans.modules.languages.lexer.STokenId@449208d5 does not belong to language text/x-antlr, LH: org.netbeans.modules.languages.lexer.SLanguageHierarchy@1333918494
at org.netbeans.api.lexer.Language.checkMemberId(Language.java:536)
at org.netbeans.api.lexer.Language.nonPrimaryTokenCategories(Language.java:370)
at org.netbeans.modules.editor.lib2.highlighting.SyntaxHighlighting$FCSInfo.findAttrs(SyntaxHighlighting.java:663)
at org.netbeans.modules.editor.lib2.highlighting.SyntaxHighlighting$TSInfo.findAttrs(SyntaxHighlighting.java:752)

So I cannot edit the file into NetBeans.

Regards
Eric.

[1] see http://www.antlr.org/pipermail/antlr-interest/2011-September/042551.html message.
Posted by zeled on Jan 03, 2012
  

Re: picat po russki

I guess local admins don't like this.
You could send me email: nnnnnk@gmail.com
Posted by nnnnnk on Sep 23, 2011
  

picat po russki

Ecli mogno budu picat po russki?
Posted by misha_shar on Sep 23, 2011
  

Re: PlugIn create a programming language.

Hello misha_shar,

I'm sorry, but I don't understand what are you trying to do.
Could you provide a link to example you are talking about?

Regards,
Nikolay.
Posted by nnnnnk on Sep 22, 2011
  

PlugIn create a programming language.

PlugIn create a programming language.
NetBeans 7.0.1
ANTLR 3.4
Created a project modules NetBeans -> Modules
Created a file type
Plug in ANTRL.jar
Clean and Build Project.
The construction took place without error, but the modules and Lexer Pareser
have not been established.
I did everything by example. It says that these modules
should be created automatically.
Why are they not?
Posted by misha_shar on Sep 22, 2011
  

Source

Hi, how can I get the source of this plugin? The hg repository in kenai is too old. Thanks.
Posted by lazyboy on Sep 15, 2011
  

NB 7.0.1

It doesn't work in NB 7.0.1 ;-) Can you make update of dependencies? :-) Thx
Posted by obrejla on Aug 11, 2011
  

Re: works great! & Heterogenous tree construction grammar

Thank you very much :)
I'll try to fix the issue.
Posted by nnnnnk on Aug 03, 2009
  

Heterogenous tree construction grammar

In the following grammar, the LABEL[params] is not supported.

option
: id '=' optionValue
-> ^(I_OPTION I_OPTION_KEY[$id.tree] I_OPTION_VALUE[$optionValue.tree])
;
Posted by scai on Jul 31, 2009
  

works great!

Thank you for making the plugin! It works great.
Posted by scai on Jul 31, 2009
  

works great!

Thank you for making the plugin! It works great.
Posted by scai on Jul 31, 2009
  

Re[2]: StringTemplate support

Hello Jim!
I've fixed issues in rewrite rules.
It seems than now everything is ok.
Regards,
Nick.
Posted by nnnnnk on Jun 15, 2009
  

Re: StringTemplate support

I'll try to fix it :)
Posted by nnnnnk on Jun 13, 2009
  

Re: Really excellent integration

Hello Jim!
Thank you!
I'll try Maven and write small article on wiki.netbeans.org about it.
Regard, Nick.
Posted by nnnnnk on Jun 13, 2009
  

StringTemplate support

I just realized that the plugin does not support string template rewrite syntax. I wonder if you can add this?

->and(lhs={$lhs.st}, rhs={$rhs.st}, ssLabel={localSymbols.addLabel()})
Posted by jimidle on Jun 12, 2009
  

Really excellent integration

Nick,

I just updated to 0.2.4 on NB 6.5 and all the things I had hoped would get done have got done. This is a really good piece of work and I recommend it. I notified the ANTLR group about this one.

Jim Idle
ANTLR Team

PS: To those struggling with ANTLR integration in their project, if you switch to Maven, you will find that it will all just work automatically for you. Obviously whoever wrote the ANTLR Maven plugin was a genius, and handsome... and modest. www.antlr.org/antlr3-maven-plugin
Posted by jimidle on Jun 12, 2009
  

Really excellent integration

Nick,

I just updated to 0.2.4 on NB 6.5 and all the things I had hoped would get done have got done. This is a really good piece of work and I recommend it. I notified the ANTLR group about this one.

Jim Idle
ANTLR Team
Posted by jimidle on Jun 12, 2009
  

Re: using with NB6.1 and maven

Thank you!
I've updated plugin and I hope now everything is ok with exceptions :)
Regards, Nick.
Posted by nnnnnk on Feb 12, 2009
  

using with NB6.1 and maven

Many thanks - I really appreciate this plugin. I was thinking to try writing one myself soon but I'm very pleased that I don't have to now :-)

I have been using it with NB6.1 and it is working very well. I have found that it cuts down the number of mistakes in my grammar files very substantially. Working with the syntax colouring is also just nicer. The only prob I've found so far is that it doesn't seem to handle an optional catch[] after a rule (?)

Re: integration - I'm using maven with the org.antlr.antl3-maven-plugin.

Thanks again, Michael
Posted by mbedward on Feb 11, 2009
  

Re: Further integration?

Thank you :)
I'm working on the plugin, but I'm not sure that there will be special project type for ANTLR in the nearest future.
In NetBeans we use the same kind of hack now :) and I'm going to write a small article how to do it.
There are a lot of new features in version 0.2, and also if you have ideas for enchantments, please tell me.
Regards, Nick.
Posted by nnnnnk on Jan 19, 2009
  

Further integration?

Syntax coloring is great. I have struggled with how to work with the generated source in Netbeans however. In order to use the antlr task I had to hack the running of it into my build.xml -pre-compile step. This generated .java files which Netbeans then thought were new files instead of temporaries. How do you work with antlr in Netbeans?
Posted by rms7326 on Jan 16, 2009
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