Re: [code] Fixes to Prolog and Logtalk lexers in 10.6

From: Mitchell <>
Date: Fri, 20 Sep 2019 18:11:20 -0400 (EDT)

Hi Michael,

On Fri, 20 Sep 2019, Michael Richter wrote:

> And I've got something that works. I'm not sure WHY the change I made
> works (which is a bit troubling and I'll be figuring it out later) but it
> does.
> There is now a far more advanced version of Prolog and Logtalk support. It
> features:
> - proper handling of directives, arity-0 predicates, arity-1+
> predicates, variables, BIFs, and operators (including the textual ones)
> - division of all the above categories by Prolog dialect,with ISO, GNU
> Prolog, and SWI-Prolog support supplied out of the box, additional dialects
> being trivial to include at need (dialect covers the back-end Prolog used
> by Logtalk)
> - the ability to select dialect in init.lua via the 'prolog.dialect'
> property in the buffer
> There is one bug in the implementation whose solution is far too convoluted
> to bother solving: in Prolog float/1 can be a predicate that tests if a
> value is a floating point value, or a BIF that converts a value into a
> floating point value. Predicates override BIFs in this definition so even
> in is/2 clauses float/1 will show up as a predicate. The solution for this
> involves far too much fragile magic, so it will not be solved at least by
> this programmer.
> These lexer files are for Textadept 10+ and have been tested only on
> Textadept 10.6.

Great. I've committed them with minor formatting changes[1].



You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Fri 20 Sep 2019 - 18:11:20 EDT

This archive was generated by hypermail 2.2.0 : Sat 21 Sep 2019 - 06:49:32 EDT