Home Download Buy Blog Forum Support

Is it possible to override built-in lexer?

Is it possible to override built-in lexer?

Postby adrians on Thu Nov 01, 2012 6:46 pm

Hi,

Would it be possible to somehow override/extend the lexical analysis that Sublime Text is doing, with a native library that provides the same API to ST? If so, is there some documentation that could be shared on how to achieve this? The reason I'm asking is that, for more advanced language support, something more than the regular expressions in TextMate's language definitions allow for would be very useful. I'm asking about this in preparation for adding support for the Red (and Red/System) language (http://www.red-lang.org/) as well as for Rebol (http://www.rebol.com/ - recently open sourced.

If this is not doable today, would it be something that could be considered? The Rebol parser is an amazing thing and many ST plugin developers would benefit from using something like it (Red will also include this type of parser), over using simple regular expressions. I'm hoping that if advanced Red/Rebol support can be added by means of allowing for an external lexer, some developers might choose to use these languages over Python since resulting code would typically be more concise and expressive (esp. when dealing with more sophisticated parsing needs).

Cheers,
Adrian
Last edited by adrians on Sun Jan 27, 2013 7:17 am, edited 1 time in total.
adrians
 
Posts: 8
Joined: Thu May 27, 2010 5:25 pm

Re: Is it possible to override built-in lexer?

Postby fergus4 on Thu Jan 03, 2013 4:17 pm

I would love to see this too
fergus4
 
Posts: 1
Joined: Thu Jan 03, 2013 4:16 pm


Return to General Discussion

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 17 guests