On Sat, Dec 13, 2008 at 7:22 PM, Chris Double <[email protected]> wrote:
> On Sun, Dec 14, 2008 at 2:09 PM, Slava Pestov <[email protected]> wrote:
>> In fact C: does not begin a form, it just reads the next two tokens,
>> so it should not affect indent.
>
> I wonder if there's a way to embed this information in Factor itself.
> Maybe as word properties? Then any editor can query factor for the
> information. And users can change the indentation to suit their tastes
> by changing Factor and have the editor pick it up.

Yes, that would be cool. Lately I've been thinking about moving away
from turing-complete parsing words and towards a more declarative
model for extensible syntax. Basically, we have three types of parsing
words these days:

- Literal syntax
- Defining words
- Stuff like ENBF: ... ;EBNF which reads a multiline string and hands
it off to some quotation

I think all three can be handled with something a bit more
declarative. So an editor could recognize that the text between EBNF:
... ;EBNF is custom syntax to be left alone, and that H{ should be
indented like [ and {, etc.

Slava

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to