You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Peter Cheung <mc...@hotmail.com> on 2019/10/01 16:02:06 UTC

Re: Can anyone give me a help about developing antlr formatter

I finally found an example https://github.com/iconmaster5326/SourceNetbeansPlugin/blob/cb739ae7d1017e4db88fe2e517bf3e8d816ca4e3/src/com/iconmaster/srcplugin/editor/SourceReformatFactory.java


Thanks
From Peter
________________________________
From: Peter Cheung <mc...@hotmail.com>
Sent: Tuesday, September 24, 2019 8:07 PM
To: dev@netbeans.apache.org <de...@netbeans.apache.org>
Subject: Re: Can anyone give me a help about developing antlr formatter

Thank you Tim
________________________________
From: Tim Boudreau <ni...@gmail.com>
Sent: Monday, September 23, 2019 9:05 PM
To: dev@netbeans.apache.org <de...@netbeans.apache.org>
Subject: Re: Can anyone give me a help about developing antlr formatter

The work in progress is on the "mavenize" branch here -
https://github.com/timboudreau/ANTLR4-Plugins-for-NetBeans - It is 44
modules (comprising generic support for generating most of a plugin for any
Antlr grammar from annotations, and then in antlr-editing-plugins, a suite
of modules for Antlr itself) :-)

There *was* an Antlr formatter, but this project started with working on an
exiting Antlr plugin I forked, evolved into generic Antlr support, and I'm
now in the process of reassembling the original Antlr-editing-only module
to eat my own dogfood, as a set of modules with all the features of the
original, plus lots more (like live-syntax highlighting of files in the
language of the grammar you're editing, which get updated when you edit the
grammar, visual syntax trees and more - one of the biggest PITA's of Antlr
development is writing a rule that overrides another rule and not knowing
it until long after you broke it and then trying to figure out *what* broke
it, so instant feedback as you edit a grammar is a necessity).

I haven't add formatting back in yet, though.  But I'll keep you posted.

-Tim

On Fri, Sep 20, 2019 at 1:17 AM Peter Cheung <mc...@hotmail.com> wrote:

> Dear Tim
>    Yes, i want to format antlr lang.
> Thanks
> From Peter
> ________________________________
> From: Tim Boudreau <ni...@gmail.com>
> Sent: Monday, September 16, 2019 7:48 AM
> To: dev@netbeans.apache.org <de...@netbeans.apache.org>
> Subject: Re: Can anyone give me a help about developing antlr formatter
>
> I have some stuff under development that might be useful for that. You want
> to format a language that has an Antlr grammar, right?
>
> -Tim
>
> On Sun, Sep 15, 2019 at 11:43 AM Peter Cheung <mc...@hotmail.com>
> wrote:
>
> > Hi All
> >      Can anyone give me a help about developing antlr formatter? Where i
> > can get an example to develop a custom formatter?
> > Thanks
> > From Peter
> >
> M
> --
> http://timboudreau.com
>


--
http://timboudreau.com

Re: Can anyone give me a help about developing antlr formatter

Posted by Mario Schroeder <ma...@gmail.com>.
No, I am going on vacation. Hiking the MacLehose trail.

Peter Cheung <mc...@hotmail.com> schrieb am Do., 10. Okt. 2019, 19:50:

> Hey Mario
>    Yes, i am from Hong Kong. Why come here? Business trip?
> Thanks
> From Peter
> ________________________________
> From: Mario Schroeder <ma...@gmail.com>
> Sent: Thursday, October 10, 2019 3:48 PM
> To: dev@netbeans.apache.org <de...@netbeans.apache.org>
> Subject: Re: Can anyone give me a help about developing antlr formatter
>
> Peter, you are from Hong Kong?! What a coincidence that I will be there
> within a week. Despite all the issues, I'm looking forward.
> Sorry for the off topic.
>
> Am Do., 10. Okt. 2019 um 08:35 Uhr schrieb Peter Cheung <
> mcheung63@hotmail.com>:
>
> > Dear Tim
> >     You are a great people and full of passion. In my home town (Hong
> > Kong), people just "use" open source, not contributing it.
> > Thanks
> > From Peter
> > ________________________________
> > From: Tim Boudreau <ni...@gmail.com>
> > Sent: Wednesday, October 9, 2019 1:42 PM
> > To: dev@netbeans.apache.org <de...@netbeans.apache.org>
> > Subject: Re: Can anyone give me a help about developing antlr formatter
> >
> > Okay.  If you'd like to try some stuff, I could hook you up with some
> > modules.  Antlr support - syntax highlighting, navigator panels, syntax
> > tree views, has been working for a while;  formatting is pretty solid
> now.
> > I've spent the last week stabilizing the "live preview" functionality,
> > which actually generates NetBeans language support with syntax
> highlighting
> > for *the grammar you are currently editing* - so you can have a syntax
> > highlighted preview, and associate a file extension with that grammar and
> > open those files and interact with them with full IDE support that is
> > updated whenever you edit the grammar.
> >
> > Basically the PITA with developing Antlr grammars is when you break some
> > rule that worked, change a whole bunch of other stuff before you know you
> > broke it, and then have to figure out which thing you did caused the
> > problem.  So being able to visually, and instantly, see if something is
> > broken seems like a basic thing that's needed to make grammar development
> > much less painful.
> >
> > Here's a screen shot:
> > https://timboudreau.com/files/screen/10-09-2019_01-39-44.png
> >
> > All that gets a bit complex:
> >
> >  - User edits the grammar file
> >  - Listener on the grammar file notices and tells highlighters of
> documents
> > in the language of that grammar to request a reparse
> >  - They ask for a new parse from a parser which
> >     - Is actually going to run code in an isolated classloader that loads
> > from an in-memory filesystem where the grammar and generated analyzer
> code
> > was compiled
> >     - Notices that the grammar file - whose document is mapped into that
> > in-memory filesystem - has changed
> >     - Initiates a new run of Antlr generating parser and lexer
> >     - Compiles them into that memory filesystem
> >     - Generates the source for a thing that will call that parser with
> > document contents, and retrieve the tokens, parse tree, etc. copied into
> > proxy objects so the classloader does not leak types
> >     - Creates a new isolated classloader over the class output for all
> that
> >     - Replaces that classloader in the proxy parser
> >     - Passes the document text into that parser, extracts the proxied
> parse
> > tree and wraps that in a NetBeans Parser.Result
> >
> > The good news is all that can happen in < 100ms.  It works, but I've been
> > chasing bugs in the choreography of that process to ensure the new parse
> > runs against the right version of the grammar - each layer of that will
> use
> > the previous result if nothing has changed but the input text, and it
> works
> > out to being a big chain of lists of weakly referenced susbscribers to
> > things that subscribe to other things (i.e. the parser subscribes to
> > replacement of the classloader environment; the highlighters subscribe to
> > changes on the parser).
> >
> > It requires a few hacks that will probably get turned into patches -
> > there's no way via API to get the cache for Source objects for the
> > in-language document to invalidate its cached parser results because
> *some
> > other document* changed, so that has to be done via reflection;  and
> > similarly, there is no direct way to force a Language instance to be
> > discarded by its LanguageHierarchy, but if you don't, it will keep a
> cache
> > of token ids that will be completely wrong (particularly if the grammar
> is
> > unparseable and you get a lexer with a dummy set of token ids with one
> > token, flip back to a valid language, and back again, which is the normal
> > state of life in an IDE).
> >
> > But for basic doing-stuff-with-Antlr it's in decent shape, and it's all
> > factored into many separate modules, so perhaps I could get some out
> there.
> >
> > -Tim
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Wed, Oct 2, 2019 at 2:08 AM Peter Cheung <mc...@hotmail.com>
> wrote:
> >
> > > Dear Tim
> > >    Sorry i am doing my own antlr plugin
> > > https://gitlab.com/mcheung63/netbeans-antlr to support my compiler
> > > development which using antlr. If you plugin can well format antlr,
> then
> > i
> > > can focus my compiler rather than antlr in netbeans.
> > > thanks
> > > Peter
> > >
> > >
> >
> > --
> > http://timboudreau.com
> >
>

Re: Can anyone give me a help about developing antlr formatter

Posted by Peter Cheung <mc...@hotmail.com>.
Hey Mario
   Yes, i am from Hong Kong. Why come here? Business trip?
Thanks
From Peter
________________________________
From: Mario Schroeder <ma...@gmail.com>
Sent: Thursday, October 10, 2019 3:48 PM
To: dev@netbeans.apache.org <de...@netbeans.apache.org>
Subject: Re: Can anyone give me a help about developing antlr formatter

Peter, you are from Hong Kong?! What a coincidence that I will be there
within a week. Despite all the issues, I'm looking forward.
Sorry for the off topic.

Am Do., 10. Okt. 2019 um 08:35 Uhr schrieb Peter Cheung <
mcheung63@hotmail.com>:

> Dear Tim
>     You are a great people and full of passion. In my home town (Hong
> Kong), people just "use" open source, not contributing it.
> Thanks
> From Peter
> ________________________________
> From: Tim Boudreau <ni...@gmail.com>
> Sent: Wednesday, October 9, 2019 1:42 PM
> To: dev@netbeans.apache.org <de...@netbeans.apache.org>
> Subject: Re: Can anyone give me a help about developing antlr formatter
>
> Okay.  If you'd like to try some stuff, I could hook you up with some
> modules.  Antlr support - syntax highlighting, navigator panels, syntax
> tree views, has been working for a while;  formatting is pretty solid now.
> I've spent the last week stabilizing the "live preview" functionality,
> which actually generates NetBeans language support with syntax highlighting
> for *the grammar you are currently editing* - so you can have a syntax
> highlighted preview, and associate a file extension with that grammar and
> open those files and interact with them with full IDE support that is
> updated whenever you edit the grammar.
>
> Basically the PITA with developing Antlr grammars is when you break some
> rule that worked, change a whole bunch of other stuff before you know you
> broke it, and then have to figure out which thing you did caused the
> problem.  So being able to visually, and instantly, see if something is
> broken seems like a basic thing that's needed to make grammar development
> much less painful.
>
> Here's a screen shot:
> https://timboudreau.com/files/screen/10-09-2019_01-39-44.png
>
> All that gets a bit complex:
>
>  - User edits the grammar file
>  - Listener on the grammar file notices and tells highlighters of documents
> in the language of that grammar to request a reparse
>  - They ask for a new parse from a parser which
>     - Is actually going to run code in an isolated classloader that loads
> from an in-memory filesystem where the grammar and generated analyzer code
> was compiled
>     - Notices that the grammar file - whose document is mapped into that
> in-memory filesystem - has changed
>     - Initiates a new run of Antlr generating parser and lexer
>     - Compiles them into that memory filesystem
>     - Generates the source for a thing that will call that parser with
> document contents, and retrieve the tokens, parse tree, etc. copied into
> proxy objects so the classloader does not leak types
>     - Creates a new isolated classloader over the class output for all that
>     - Replaces that classloader in the proxy parser
>     - Passes the document text into that parser, extracts the proxied parse
> tree and wraps that in a NetBeans Parser.Result
>
> The good news is all that can happen in < 100ms.  It works, but I've been
> chasing bugs in the choreography of that process to ensure the new parse
> runs against the right version of the grammar - each layer of that will use
> the previous result if nothing has changed but the input text, and it works
> out to being a big chain of lists of weakly referenced susbscribers to
> things that subscribe to other things (i.e. the parser subscribes to
> replacement of the classloader environment; the highlighters subscribe to
> changes on the parser).
>
> It requires a few hacks that will probably get turned into patches -
> there's no way via API to get the cache for Source objects for the
> in-language document to invalidate its cached parser results because *some
> other document* changed, so that has to be done via reflection;  and
> similarly, there is no direct way to force a Language instance to be
> discarded by its LanguageHierarchy, but if you don't, it will keep a cache
> of token ids that will be completely wrong (particularly if the grammar is
> unparseable and you get a lexer with a dummy set of token ids with one
> token, flip back to a valid language, and back again, which is the normal
> state of life in an IDE).
>
> But for basic doing-stuff-with-Antlr it's in decent shape, and it's all
> factored into many separate modules, so perhaps I could get some out there.
>
> -Tim
>
>
>
>
>
>
>
>
>
>
>
>
> On Wed, Oct 2, 2019 at 2:08 AM Peter Cheung <mc...@hotmail.com> wrote:
>
> > Dear Tim
> >    Sorry i am doing my own antlr plugin
> > https://gitlab.com/mcheung63/netbeans-antlr to support my compiler
> > development which using antlr. If you plugin can well format antlr, then
> i
> > can focus my compiler rather than antlr in netbeans.
> > thanks
> > Peter
> >
> >
>
> --
> http://timboudreau.com
>

Re: Can anyone give me a help about developing antlr formatter

Posted by Mario Schroeder <ma...@gmail.com>.
Peter, you are from Hong Kong?! What a coincidence that I will be there
within a week. Despite all the issues, I'm looking forward.
Sorry for the off topic.

Am Do., 10. Okt. 2019 um 08:35 Uhr schrieb Peter Cheung <
mcheung63@hotmail.com>:

> Dear Tim
>     You are a great people and full of passion. In my home town (Hong
> Kong), people just "use" open source, not contributing it.
> Thanks
> From Peter
> ________________________________
> From: Tim Boudreau <ni...@gmail.com>
> Sent: Wednesday, October 9, 2019 1:42 PM
> To: dev@netbeans.apache.org <de...@netbeans.apache.org>
> Subject: Re: Can anyone give me a help about developing antlr formatter
>
> Okay.  If you'd like to try some stuff, I could hook you up with some
> modules.  Antlr support - syntax highlighting, navigator panels, syntax
> tree views, has been working for a while;  formatting is pretty solid now.
> I've spent the last week stabilizing the "live preview" functionality,
> which actually generates NetBeans language support with syntax highlighting
> for *the grammar you are currently editing* - so you can have a syntax
> highlighted preview, and associate a file extension with that grammar and
> open those files and interact with them with full IDE support that is
> updated whenever you edit the grammar.
>
> Basically the PITA with developing Antlr grammars is when you break some
> rule that worked, change a whole bunch of other stuff before you know you
> broke it, and then have to figure out which thing you did caused the
> problem.  So being able to visually, and instantly, see if something is
> broken seems like a basic thing that's needed to make grammar development
> much less painful.
>
> Here's a screen shot:
> https://timboudreau.com/files/screen/10-09-2019_01-39-44.png
>
> All that gets a bit complex:
>
>  - User edits the grammar file
>  - Listener on the grammar file notices and tells highlighters of documents
> in the language of that grammar to request a reparse
>  - They ask for a new parse from a parser which
>     - Is actually going to run code in an isolated classloader that loads
> from an in-memory filesystem where the grammar and generated analyzer code
> was compiled
>     - Notices that the grammar file - whose document is mapped into that
> in-memory filesystem - has changed
>     - Initiates a new run of Antlr generating parser and lexer
>     - Compiles them into that memory filesystem
>     - Generates the source for a thing that will call that parser with
> document contents, and retrieve the tokens, parse tree, etc. copied into
> proxy objects so the classloader does not leak types
>     - Creates a new isolated classloader over the class output for all that
>     - Replaces that classloader in the proxy parser
>     - Passes the document text into that parser, extracts the proxied parse
> tree and wraps that in a NetBeans Parser.Result
>
> The good news is all that can happen in < 100ms.  It works, but I've been
> chasing bugs in the choreography of that process to ensure the new parse
> runs against the right version of the grammar - each layer of that will use
> the previous result if nothing has changed but the input text, and it works
> out to being a big chain of lists of weakly referenced susbscribers to
> things that subscribe to other things (i.e. the parser subscribes to
> replacement of the classloader environment; the highlighters subscribe to
> changes on the parser).
>
> It requires a few hacks that will probably get turned into patches -
> there's no way via API to get the cache for Source objects for the
> in-language document to invalidate its cached parser results because *some
> other document* changed, so that has to be done via reflection;  and
> similarly, there is no direct way to force a Language instance to be
> discarded by its LanguageHierarchy, but if you don't, it will keep a cache
> of token ids that will be completely wrong (particularly if the grammar is
> unparseable and you get a lexer with a dummy set of token ids with one
> token, flip back to a valid language, and back again, which is the normal
> state of life in an IDE).
>
> But for basic doing-stuff-with-Antlr it's in decent shape, and it's all
> factored into many separate modules, so perhaps I could get some out there.
>
> -Tim
>
>
>
>
>
>
>
>
>
>
>
>
> On Wed, Oct 2, 2019 at 2:08 AM Peter Cheung <mc...@hotmail.com> wrote:
>
> > Dear Tim
> >    Sorry i am doing my own antlr plugin
> > https://gitlab.com/mcheung63/netbeans-antlr to support my compiler
> > development which using antlr. If you plugin can well format antlr, then
> i
> > can focus my compiler rather than antlr in netbeans.
> > thanks
> > Peter
> >
> >
>
> --
> http://timboudreau.com
>

Re: Can anyone give me a help about developing antlr formatter

Posted by Peter Cheung <mc...@hotmail.com>.
Dear Tim
    You are a great people and full of passion. In my home town (Hong Kong), people just "use" open source, not contributing it.
Thanks
From Peter
________________________________
From: Tim Boudreau <ni...@gmail.com>
Sent: Wednesday, October 9, 2019 1:42 PM
To: dev@netbeans.apache.org <de...@netbeans.apache.org>
Subject: Re: Can anyone give me a help about developing antlr formatter

Okay.  If you'd like to try some stuff, I could hook you up with some
modules.  Antlr support - syntax highlighting, navigator panels, syntax
tree views, has been working for a while;  formatting is pretty solid now.
I've spent the last week stabilizing the "live preview" functionality,
which actually generates NetBeans language support with syntax highlighting
for *the grammar you are currently editing* - so you can have a syntax
highlighted preview, and associate a file extension with that grammar and
open those files and interact with them with full IDE support that is
updated whenever you edit the grammar.

Basically the PITA with developing Antlr grammars is when you break some
rule that worked, change a whole bunch of other stuff before you know you
broke it, and then have to figure out which thing you did caused the
problem.  So being able to visually, and instantly, see if something is
broken seems like a basic thing that's needed to make grammar development
much less painful.

Here's a screen shot:
https://timboudreau.com/files/screen/10-09-2019_01-39-44.png

All that gets a bit complex:

 - User edits the grammar file
 - Listener on the grammar file notices and tells highlighters of documents
in the language of that grammar to request a reparse
 - They ask for a new parse from a parser which
    - Is actually going to run code in an isolated classloader that loads
from an in-memory filesystem where the grammar and generated analyzer code
was compiled
    - Notices that the grammar file - whose document is mapped into that
in-memory filesystem - has changed
    - Initiates a new run of Antlr generating parser and lexer
    - Compiles them into that memory filesystem
    - Generates the source for a thing that will call that parser with
document contents, and retrieve the tokens, parse tree, etc. copied into
proxy objects so the classloader does not leak types
    - Creates a new isolated classloader over the class output for all that
    - Replaces that classloader in the proxy parser
    - Passes the document text into that parser, extracts the proxied parse
tree and wraps that in a NetBeans Parser.Result

The good news is all that can happen in < 100ms.  It works, but I've been
chasing bugs in the choreography of that process to ensure the new parse
runs against the right version of the grammar - each layer of that will use
the previous result if nothing has changed but the input text, and it works
out to being a big chain of lists of weakly referenced susbscribers to
things that subscribe to other things (i.e. the parser subscribes to
replacement of the classloader environment; the highlighters subscribe to
changes on the parser).

It requires a few hacks that will probably get turned into patches -
there's no way via API to get the cache for Source objects for the
in-language document to invalidate its cached parser results because *some
other document* changed, so that has to be done via reflection;  and
similarly, there is no direct way to force a Language instance to be
discarded by its LanguageHierarchy, but if you don't, it will keep a cache
of token ids that will be completely wrong (particularly if the grammar is
unparseable and you get a lexer with a dummy set of token ids with one
token, flip back to a valid language, and back again, which is the normal
state of life in an IDE).

But for basic doing-stuff-with-Antlr it's in decent shape, and it's all
factored into many separate modules, so perhaps I could get some out there.

-Tim












On Wed, Oct 2, 2019 at 2:08 AM Peter Cheung <mc...@hotmail.com> wrote:

> Dear Tim
>    Sorry i am doing my own antlr plugin
> https://gitlab.com/mcheung63/netbeans-antlr to support my compiler
> development which using antlr. If you plugin can well format antlr, then i
> can focus my compiler rather than antlr in netbeans.
> thanks
> Peter
>
>

--
http://timboudreau.com

Re: Can anyone give me a help about developing antlr formatter

Posted by Tim Boudreau <ni...@gmail.com>.
Okay.  If you'd like to try some stuff, I could hook you up with some
modules.  Antlr support - syntax highlighting, navigator panels, syntax
tree views, has been working for a while;  formatting is pretty solid now.
I've spent the last week stabilizing the "live preview" functionality,
which actually generates NetBeans language support with syntax highlighting
for *the grammar you are currently editing* - so you can have a syntax
highlighted preview, and associate a file extension with that grammar and
open those files and interact with them with full IDE support that is
updated whenever you edit the grammar.

Basically the PITA with developing Antlr grammars is when you break some
rule that worked, change a whole bunch of other stuff before you know you
broke it, and then have to figure out which thing you did caused the
problem.  So being able to visually, and instantly, see if something is
broken seems like a basic thing that's needed to make grammar development
much less painful.

Here's a screen shot:
https://timboudreau.com/files/screen/10-09-2019_01-39-44.png

All that gets a bit complex:

 - User edits the grammar file
 - Listener on the grammar file notices and tells highlighters of documents
in the language of that grammar to request a reparse
 - They ask for a new parse from a parser which
    - Is actually going to run code in an isolated classloader that loads
from an in-memory filesystem where the grammar and generated analyzer code
was compiled
    - Notices that the grammar file - whose document is mapped into that
in-memory filesystem - has changed
    - Initiates a new run of Antlr generating parser and lexer
    - Compiles them into that memory filesystem
    - Generates the source for a thing that will call that parser with
document contents, and retrieve the tokens, parse tree, etc. copied into
proxy objects so the classloader does not leak types
    - Creates a new isolated classloader over the class output for all that
    - Replaces that classloader in the proxy parser
    - Passes the document text into that parser, extracts the proxied parse
tree and wraps that in a NetBeans Parser.Result

The good news is all that can happen in < 100ms.  It works, but I've been
chasing bugs in the choreography of that process to ensure the new parse
runs against the right version of the grammar - each layer of that will use
the previous result if nothing has changed but the input text, and it works
out to being a big chain of lists of weakly referenced susbscribers to
things that subscribe to other things (i.e. the parser subscribes to
replacement of the classloader environment; the highlighters subscribe to
changes on the parser).

It requires a few hacks that will probably get turned into patches -
there's no way via API to get the cache for Source objects for the
in-language document to invalidate its cached parser results because *some
other document* changed, so that has to be done via reflection;  and
similarly, there is no direct way to force a Language instance to be
discarded by its LanguageHierarchy, but if you don't, it will keep a cache
of token ids that will be completely wrong (particularly if the grammar is
unparseable and you get a lexer with a dummy set of token ids with one
token, flip back to a valid language, and back again, which is the normal
state of life in an IDE).

But for basic doing-stuff-with-Antlr it's in decent shape, and it's all
factored into many separate modules, so perhaps I could get some out there.

-Tim












On Wed, Oct 2, 2019 at 2:08 AM Peter Cheung <mc...@hotmail.com> wrote:

> Dear Tim
>    Sorry i am doing my own antlr plugin
> https://gitlab.com/mcheung63/netbeans-antlr to support my compiler
> development which using antlr. If you plugin can well format antlr, then i
> can focus my compiler rather than antlr in netbeans.
> thanks
> Peter
>
>

-- 
http://timboudreau.com

Re: Can anyone give me a help about developing antlr formatter

Posted by Peter Cheung <mc...@hotmail.com>.
Dear Tim
   Sorry i am doing my own antlr plugin https://gitlab.com/mcheung63/netbeans-antlr to support my compiler development which using antlr. If you plugin can well format antlr, then i can focus my compiler rather than antlr in netbeans.
thanks
Peter


Re: Can anyone give me a help about developing antlr formatter

Posted by Tim Boudreau <ni...@gmail.com>.
FYI - due to your question, I decided to prioritize Antlr formatting, and
it is working - along with a generic API for writing formatters for any
file format based on Antlr grammars.  I should have something up on my
update center in the next week or two.

-Tim


On Tue, Oct 1, 2019 at 12:02 PM Peter Cheung <mc...@hotmail.com> wrote:

> I finally found an example
> https://github.com/iconmaster5326/SourceNetbeansPlugin/blob/cb739ae7d1017e4db88fe2e517bf3e8d816ca4e3/src/com/iconmaster/srcplugin/editor/SourceReformatFactory.java
>
>
> Thanks
> From Peter
> ________________________________
> From: Peter Cheung <mc...@hotmail.com>
> Sent: Tuesday, September 24, 2019 8:07 PM
> To: dev@netbeans.apache.org <de...@netbeans.apache.org>
> Subject: Re: Can anyone give me a help about developing antlr formatter
>
> Thank you Tim
> ________________________________
> From: Tim Boudreau <ni...@gmail.com>
> Sent: Monday, September 23, 2019 9:05 PM
> To: dev@netbeans.apache.org <de...@netbeans.apache.org>
> Subject: Re: Can anyone give me a help about developing antlr formatter
>
> The work in progress is on the "mavenize" branch here -
> https://github.com/timboudreau/ANTLR4-Plugins-for-NetBeans - It is 44
> modules (comprising generic support for generating most of a plugin for any
> Antlr grammar from annotations, and then in antlr-editing-plugins, a suite
> of modules for Antlr itself) :-)
>
> There *was* an Antlr formatter, but this project started with working on an
> exiting Antlr plugin I forked, evolved into generic Antlr support, and I'm
> now in the process of reassembling the original Antlr-editing-only module
> to eat my own dogfood, as a set of modules with all the features of the
> original, plus lots more (like live-syntax highlighting of files in the
> language of the grammar you're editing, which get updated when you edit the
> grammar, visual syntax trees and more - one of the biggest PITA's of Antlr
> development is writing a rule that overrides another rule and not knowing
> it until long after you broke it and then trying to figure out *what* broke
> it, so instant feedback as you edit a grammar is a necessity).
>
> I haven't add formatting back in yet, though.  But I'll keep you posted.
>
> -Tim
>
> On Fri, Sep 20, 2019 at 1:17 AM Peter Cheung <mc...@hotmail.com>
> wrote:
>
> > Dear Tim
> >    Yes, i want to format antlr lang.
> > Thanks
> > From Peter
> > ________________________________
> > From: Tim Boudreau <ni...@gmail.com>
> > Sent: Monday, September 16, 2019 7:48 AM
> > To: dev@netbeans.apache.org <de...@netbeans.apache.org>
> > Subject: Re: Can anyone give me a help about developing antlr formatter
> >
> > I have some stuff under development that might be useful for that. You
> want
> > to format a language that has an Antlr grammar, right?
> >
> > -Tim
> >
> > On Sun, Sep 15, 2019 at 11:43 AM Peter Cheung <mc...@hotmail.com>
> > wrote:
> >
> > > Hi All
> > >      Can anyone give me a help about developing antlr formatter? Where
> i
> > > can get an example to develop a custom formatter?
> > > Thanks
> > > From Peter
> > >
> > M
> > --
> > http://timboudreau.com
> >
>
>
> --
> http://timboudreau.com
>


-- 
http://timboudreau.com