On Mon, 20 Jun 2011 13:06:12 -0500 Diego Zamboni <di...@zzamboni.org> wrote: 

DZ> On 6/16/2011 9:59 AM, Ted Zlatanov wrote:
>> The cfengine mode that ships with GNU Emacs (written by Dave Love) works
>> OK, but is not aware of the many new cfengine3 keywords.  Indentation is
>> a bit off, as well, in some sections.
>> 
DZ> Noticing the same, I modified the one that comes with Emacs to add
DZ> some of the new cf3 keywords for sections. It seems to work fine,
DZ> although it still gets the indentation wrong sometimes.

DZ> I'll give Ted's new mode a try, but attached is the one I've been
DZ> using, in case anyone finds it useful.

I did something similar with mine, adding some keywords, but now am
talking to the Emacs guys about an entirely new mode using operator
parsing grammars (I never heard of them before, so it's a learning
experience for me).

OPGs are much faster than traditional LALR and similar parsers, and
don't need to be anchored to the beginning of the text.  They are sort
of context-free grammars, relying instead on operator association and
precedence tables.  So if we get them working, great.  Otherwise I'll
just do the top-down parsing.  Anyhow, that's why it's not done yet.

In that discussion, I put together a cfengine 3 lexer and grammar from
the trunk source, which I hope will get us going faster[1].  I don't see
a BNF grammar for cfengine 3 anywhere, though, and it would be nice to
have one.

On Fri, 17 Jun 2011 10:41:15 +0200 Mikhail Gusarov 
<mikhail.gusa...@cfengine.com> wrote: 

MG> Yes, I definitely will commit a new mode when you make it.

Thank you, Mikhail.

Ted

[1] http://thread.gmane.org/gmane.emacs.devel/140619/focus=140884
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to