It's two separate but related things: modules to let you write a plugin for
any language with an antlr grammar with very little code, and then on top
of that, support for editing Antlr grammars.

The modules supporting various language editing features, like code folding
or navigator panels or highlighting are separate so that if you're not
using those features, you don't need to include them.

So, sort of like schliemann or gsf but not monolithic and more flexible and
extensible.

-Tim

On Mon, Oct 21, 2019 at 12:56 PM Peter Cheung <[email protected]> wrote:

> I have read some of your code, your project seems a very large project,
> many modules in there.
>
>
> Thanks
> From Peter
> ________________________________
> From: Peter Cheung <[email protected]>
> Sent: Tuesday, October 22, 2019 12:30 AM
> To: [email protected] <[email protected]>
> Subject: Re: Syntax highlighting question
>
> Dear Tim
>     Thank you for your sincerity. The reason i develop my own antlr plugin
> for netbeans is to support my assembler development.
> https://www.youtube.com/watch?v=rDFkhrHxHMw
>
>     So I believe in my netbeans-antlr project, i have developed some
> useful thing dedicated for assembler development, but not useful for others.
>
>
> Thanks
> From Peter
> ________________________________
> From: Tim Boudreau <[email protected]>
> Sent: Thursday, October 17, 2019 4:06 AM
> To: [email protected] <[email protected]>
> Subject: Re: Syntax highlighting question
>
> Hi, Peter,
>
> I would strongly suggest we collaborate on that here:
> https://github.com/timboudreau/ANTLR4-Plugins-for-NetBeans - since that
> way, not only would it be implementable for Antlr, but for *any* language
> using an Antlr grammar (it is two layers of modules - one for writing
> language modules with most features generated for you from *any *Antlr
> grammar, and then modules for Antlr grammar language built on top of that -
> here are some docs on general-language support -
>
> https://github.com/timboudreau/ANTLR4-Plugins-for-NetBeans/blob/master/api.md
> - and I hope to have a continuous build w/ javadocs up soon).
>
> NetBeans lexer and parser APIs have straightforward support for this - see
> LanguagePath and the method on Parser.Result that takes an integer and
> gives you a Parser.Result for an embedded language.
>
> Done right, supporting an embedded language would be as simple as
>
> @EmbeddedLanguage("text/x-java")
> public static final RegionsKey<Whatever> THE_KEY = ...
>
> (the generic language support API revolves around defining typed keys, and
> then extracting what you're actually going to use from the parse tree as
> character ranges with any data you need tied to those ranges, and then you
> can retrieve the actual results from a parser result when a file is
> parsed).
>
> That's been on my todo list too - the original antlr plugin author had
> included a crude Antlr grammar for Java to do that, which isn't a terribly
> sensible way to do it when you have a really good Java parser available for
> use.
>
> -Tim
>
>
> On Tue, Oct 15, 2019 at 6:16 AM Peter Cheung <[email protected]>
> wrote:
>
> > Dear All
> >    I have developed a module (
> https://gitlab.com/mcheung63/netbeans-antlr)
> > for antlr, it provides antlr grammar syntax highlight, but it is not
> > perfect. I want to enhance it but problem is : antlr supports "embed
> > action", which is in Java, so two languages in same file.
> >
> >    To provide the best syntax highlight, i need to send those embed
> > actions to "java lexer", this point has no problem to me. But Is there
> > anyway merge those tokens (java-lexer) back to the one (antlr-lexer)
> which
> > used by netbeans to provide syntax highlight?
> >
> >     Is there any way to provide syntax highlight but not using lexer? Let
> > say i want to hight the second line from character 2-4 in red. Whatever
> the
> > text is, i just want to highlight those positions, is it possible?
> >
> > Thanks
> > From Peter
> >
> >
> >
>
> --
> http://timboudreau.com
>
-- 
http://timboudreau.com

Reply via email to