Re: [code] Factor lexer for Textadept

From: Mitchell <m.att.foicica.com>
Date: Tue, 2 Apr 2013 13:19:52 -0400 (Eastern Daylight Time)

Hi Michael,

On Mon, 1 Apr 2013, Michael Richter wrote:

> The Factor language (http://factorcode.org/) as of yesterday supported the
> launching of Textadept from within its REPL (
> https://github.com/slavapestov/factor/pull/833). As of today Textadept
> supports the Factor language syntax (
> https://github.com/slavapestov/factor/pull/835). Well, mostly supports it.
>
> The lexer (
> https://github.com/ttmrichter/factor/blob/master/misc/textadept/lexers/factor.lua)
> works fine (so far) except for one edge case I can't figure out. The
> problem is that I want to treat constructs that look like this…
>
> ( some words here -- some more words here )
>
> …as one "operator" (there's no such thing, really, in Factor) while *anything
> else* like, say, these…
>
> (one_word) (two_separate words)
>
> …are treated as "identifiers".

How can you distinguish between the two? Are there spaces between the
parentheses and a word for the first? The way you have it in your
"stack_declaration" pattern, it matches any set of parentheses as an
"operator" so your "identifer" rule is never hit.

Cheers,
Mitchell

-- 
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 Tue 02 Apr 2013 - 13:19:52 EDT

This archive was generated by hypermail 2.2.0 : Wed 03 Apr 2013 - 06:38:39 EDT