[code] Extending a lexer

From: Michael Richter <ttmrichter.att.gmail.com>
Date: Sun, 18 Dec 2016 17:45:45 +0800

I'd like to add some Logtalk support to Textadept. For those not in the
know, Logtalk is an OOP toolkit for kit-bashing OOP layers on top of
Prolog. Syntactically it is so close to Prolog that I can just use a
Prolog lexer and get "almost good enough" syntax highlighting.

I'd like to improve this, however.

What I'd like to do is basically build up on the Prolog lexer by adding
"keywords" and library "functions" and such to it rather than copying the
Prolog lexer and tweaking it. Unfortunately the tools for embedding parent
or child lexers are *not* really suitable for this task: there is no clear
"region of Logtalk" vs. "region of Prolog" code. Logtalk is essentially a
syntax-compatible dialect of Prolog.

How would I go about making such a beast if this is possible at all?

-- 
"Perhaps people don't believe this, but throughout all of the discussions
of entering China our focus has really been what's best for the Chinese
people. It's not been about our revenue or profit or whatnot."
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.
-- 
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 Sun 18 Dec 2016 - 04:45:45 EST

This archive was generated by hypermail 2.2.0 : Sun 18 Dec 2016 - 06:35:50 EST