(brainstorm) munge(syntax_files, ASTs) => possibilities.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

(brainstorm) munge(syntax_files, ASTs) => possibilities.

Hugh Sasse
Two ideas just bumped together, and I wondered if they are
worth following up by those who are familiar with them.

People have projects for Ruby that take ruby syntax and produce
abstract syntax trees.  These allow flexible manipulation of the
code.  In particular, swapping bits around should be easier, and I
think this is what IDEs do.

I wanted to port the FIXME and NOTE highlighting from the Ruby
syntax file to the MySQL one, but foound that the references occur
in too many places for me to do so with any confidence at all.

So, my question is: Is it sensible to consider doing this sort of
manipulation with ASTs?  Is it worth floating (a fleshed out?)
version of the idea on vim-dev or elsewhere?  I'm thinking it might
make it easier for the vim-file maintainers to re-use code from
other files if the semantics can be encapsulated as well as the
syntax, but I don't actually know where to start with this.

        Hugh

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: (brainstorm) munge(syntax_files, ASTs) => possibilities.

Nikolai Weibull-5
Hugh Sasse wrote:

> So, my question is: Is it sensible to consider doing this sort of
> manipulation with ASTs?  Is it worth floating (a fleshed out?) version
> of the idea on vim-dev or elsewhere?  I'm thinking it might make it
> easier for the vim-file maintainers to re-use code from other files if
> the semantics can be encapsulated as well as the syntax, but I don't
> actually know where to start with this.

Hm, perhaps I never sent that mail to vim-dev, but I was certainly
thinking of the same thing.  Todo, String, Number, and Comment are often
similar between many syntaxes.  I can’t remember the exact reason I
opted not to send anything about it, but I think there was a good
reason.
       
        nikolai

--
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel