[code] Factor lexer for Textadept

From: Michael Richter <ttmrichter.att.gmail.com>
Date: Mon, 1 Apr 2013 22:50:01 +0800

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 (
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". I can't fathom the magic incantations that
would make that happen (because my LPEG-fu is weak). What I've got now
works and isn't *completely* ugly (because the impacted words are
relatively rare in user code) but I'd really like to do it 100% right
instead of 99.44% right.

Any tips?

"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 Mon 01 Apr 2013 - 10:50:01 EDT

This archive was generated by hypermail 2.2.0 : Tue 02 Apr 2013 - 06:30:48 EDT