SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: tpanar on August 14, 2006, 05:43:02 PM

Title: .lua predefined lexer specification (does one exist)?
Post by: tpanar on August 14, 2006, 05:43:02 PM
I'm starting to look into lua, and would like to keep using SE to edit with (along with all the very flexible color coding). Does anyone have a lexar already defined for lua that they would be willing to share?

Regards,
-Tammie
Title: Re: .lua predefined lexer specification (does one exist)?
Post by: skywise on September 12, 2006, 04:08:32 PM
Seconded!
Title: Re: .lua predefined lexer specification (does one exist)?
Post by: Clark on September 13, 2006, 06:11:45 PM
I think you already know that you can create a lexer yourself for this language.  It's pretty quick to do this because the "new..." button for adding keywords supports multiple space delimited words.  Use "Tools"->"Options"->"File Extension Setup"->"New..." to add a new extension called "lua".  While in the Extension Options dialog, click on the Advanced Tab then click on "Color Coding...".   SlickEdit can support the string and comment styles of LUA.  Too bad the language statements aren't terminated with something like a semicolon.  More advanced features like SmartPaste are very difficult with out it.
Title: Re: .lua predefined lexer specification (does one exist)?
Post by: hutnut on September 14, 2006, 06:06:51 PM
I tried creating (in the process of) a lexer for .lua. I followed the steps outlined in the help as well as Clark's reply. I was mainly concerned with the tagging of functions so I could easily navigate around. The functions are highlighted properly via the 'idparenfunction' in the .vlx file, although, I can't get VSlick to properly find the function. It seemed that the .lua files were not being picked up even though I included the wildcard in the file list to tag. I then modified the .lua extension setup to 'Refer to...' the c extension and then the .java extension. The .lua files were then picked up properly for tagging (as seen from the files that were contained within the tag file). Is this a requirement? Even so, VSlick still couldn't locate the function when highlighted or selecting go to definition. Any help?
Title: Re: .lua predefined lexer specification (does one exist)?
Post by: Clark on September 14, 2006, 07:31:31 PM
Ah, you want some context tagging features. It's declaration syntax is significantly different from other languages.  This is doable but requires a significant amount of work.  The more users that need this, the higher up the queue this will get.
Title: Re: .lua predefined lexer specification (does one exist)?
Post by: bobm on September 20, 2006, 08:56:26 PM
/signed

support for Lua would be great
Title: Re: .lua predefined lexer specification (does one exist)?
Post by: natros on September 20, 2006, 09:44:05 PM
lua support would be great
Title: Re: .lua predefined lexer specification (does one exist)?
Post by: Kodros on September 29, 2006, 09:11:28 PM
/signed
Title: Re: .lua predefined lexer specification (does one exist)?
Post by: samkch on October 17, 2006, 12:35:47 AM
I also hope Slickedit supports Lua language.
Thanks!
Title: Re: .lua predefined lexer specification (does one exist)?
Post by: jchick on February 28, 2007, 01:48:44 PM
I recently sent an email to features@slickedit.com (don't remember if it was this exact address) asking for lua support. I was impressed with the quick response.

In short, I was told that demand for lua support is limited and not a high priority, however it's possible that documentation will improve so that others can add full tagging support for other languages.

I did look into what it what takes to add full lua support and it's not trivial. That said, I would love it if someone had some documentation for the tagging database functions. I've only managed the simplest of tasks by copying existing SE code and modifying it slightly to meet my needs. The SE codebase is huge, its a daunting task trying to figure out everything thats going without some kind of guide.
Title: Re: .lua predefined lexer specification (does one exist)?
Post by: BHayes on March 14, 2007, 05:33:03 PM
Yes!!  Please add tagging support for LUA.  Color coding is nice and all, but tagging would really help.
Title: Re: .lua predefined lexer specification (does one exist)?
Post by: wraith808 on January 07, 2008, 10:28:39 PM
/signed
Title: Re: .lua predefined lexer specification (does one exist)?
Post by: RA on January 08, 2008, 07:27:05 PM
/signed
Title: Re: .lua predefined lexer specification (does one exist)?
Post by: Tyrathect on January 08, 2008, 09:16:37 PM
/signed
Title: Re: .lua predefined lexer specification (does one exist)?
Post by: mdevey on March 04, 2008, 12:09:26 AM
/signed
Title: Re: .lua predefined lexer specification (does one exist)?
Post by: jbhurst on March 05, 2008, 01:53:20 AM
I believe this is in SE 13 (i.e. SE 2008).

John Hurst
Wellington, New Zealand
Title: Re: .lua predefined lexer specification (does one exist)?
Post by: Lee on March 06, 2008, 02:24:44 PM
SlickEdit 2008 will have some Lua support and it is currently available in Beta 2.  Currently, the lexer is available for color coding(1), and there is some limited support available for Context Tagging, including Lua built-in functions and standard libraries.   There currently is no support for syntax expansions, syntax indenting, or SmartPaste, but we are planning on adding more enhancements in the followup point releases.

We'll also look to improve the Context Tagging information in future releases.  The grammar is straightforward enough to parse, but it is difficult and sometimes impossible infer context information with just static analysis(2).  Function signatures are easy enough to match, and scoping is very well defined for this language.  We will look to improve where we can.

Since we'll be planning schedules for point releases very soon, you should probably go ahead and shout out any requests/features/wishes regarding Lua support.  Post them here, I'll read and collect them, then break out the dart board and see which ones make it on the schedule  ;).


(1) - Color coding support does handle level 0 long format (multi-line) comments and strings (--[[ comment ]], [[ string ]]), but does not currently handle multi-level ones (ex. --[=[ comment ]=], [===[string]===]).

(2) - This not just limited to Lua, but providing Context Tagging on any dynamically typed language is a difficult task.