Re: [code] [scintillua] More lexer improvements from the vis editor community

From: Marc André Tanner <mat.att.brain-dump.org>
Date: Wed, 22 Feb 2017 08:51:06 +0100

On Fri, Feb 03, 2017 at 10:00:15AM -0500, Mitchell wrote:
> Hi Marc,
>
> On Thu, 2 Feb 2017, Marc André Tanner wrote:
>
> >Hi,
> >
> >Below you find references to lexer improvements contributed to my vis
> >editor:
> >
> >* spin.lua a new lexer for *.spin files by David B. Lamkins.
> >
> >* rc.lua a new lexer for shell scripts for the Plan 9 shell rc(1)
> > by Michael Forney.
> >
> >* sml.lua a new lexer for Standard ML (*.sml, *.fun, *.sig files)
> > by Murray Calavera.
> >
> >* scheme.lua was updated to reference the defined `func` tokens in
> > the lexer's `_rules` table.
> >
> >* ansi_c.lua has been updated to C11 by S. Gilles, Christian Hesse
> > and myself. Furthermore some numerical types and errno(3) constants
> > as specified by POSIX were added.
> >
> >These can all be found in the ./lua/lexers directory of the vis repository:
> >
> >https://github.com/martanne/vis/tree/master/lua/lexers
> >
> >If you decide to merge these modifications, it would be nice to avoid
> >unnecessary white space changes to make downstream merging easier.
>
> Thank you. I will look into this when I have the chance.

I noticed you started the lexer refactorings without first integrating
the C and Scheme lexer changes, do you still plan to look at them or
have you concluded that they are unsuitable for inclusion?

Regarding the C lexer it would be nice if it could treat:

 - #if 0 ... #endif as a comment, this might become a bit ugly due
   to the nested nature

 - filenames following #include directives as strings

I'm busy with other stuff for now, so haven't yet looked into these.

In the meantime a bugfix for nested variables in the bash lexer was
contributed:

 https://github.com/martanne/vis/commit/21727ae3dce8ccea2e342d3b62b5fa67b1b5a936

I noticed that you removed some lexers. Any particular reason for that?
Did they have specific problems I should be aware of? I know that at
least one of my users cares about APL, so I will most likely add that
back in my repo.

Also is there a place where I can read upon the motivation / goals of
the refactoring? I'm not sure I agree with some of the changes (e.g.
word_match taking a string rather than a table?). But then you have
much more experience in Lua, I'm sure there is a good reason for it.

Thanks for all your work!

Marc

-- 
 Marc André Tanner >< http://www.brain-dump.org/ >< GPG key: 10C93617
-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 22 Feb 2017 - 02:51:06 EST

This archive was generated by hypermail 2.2.0 : Wed 22 Feb 2017 - 06:43:48 EST