[asterisk-users] AEL2 Syntax Highlighting

Perssy Llamosas pllamosas at telecall.com.pe
Mon Oct 15 11:42:40 CDT 2007


-------- Original Message --------
Subject: Re:[asterisk-users] AEL2 Syntax Highlighting
From: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
To: asterisk-users at lists.digium.com
Date: 13/10/2007 05:24 a.m.
> On Fri, Oct 12, 2007 at 05:24:29PM -0500, Perssy Llamosas wrote:
>   
>> Hi,
>>
>> I am looking for a syntax highlighter for AEL2. Google is not helping, 
>> so I thought you guys could help me.
>>
>> I found this vim syntax highlighter for AEL but it doesn't help if you 
>> want to code in AEL2:
>> http://vim.sourceforge.net/scripts/script.php?script_id=1900
>>     
>
> How is AEL2 syntax different from AEL?
>
> Can you please give examples where the above fails for AEL2? (or for
> AEL, for that matter)
>   
Well, I am trying to improve that script slowly, I admit I knew nothing 
about writing vim highlighting files before so this is a good 
opportunity to learn...

Some examples where the above fails:
//-example: No ";" after brackets.
globals {
}
/* Anything below fails */
context failed1 {
};

//-example: No ";" after brackets.
context failed2 {
    1 => {
       Hangup();
    }
    /* Anything below fails */
    2 => {
       Hangup();
    };
};

//-example: Inline if else while for random
context failed3 {
    1 => {
       if(1) NoOp(This fails);
    };
    2 => {
       if(1) {NoOp(This also fails);}
    };
};

//-example: bug
context failed4 {
    1 => {
       if (1) {
       } else {
       }
       /* Anything below fails */
    };
    2 => {
       NoOp(This fails);
    };
};

//-example: bug
context failed5 {
    1 => {
       switch(1) {
       }
       /* Anything below fails */
    };
    2 => {
       NoOp(This fails);
    };
};

//-example: Hints
context failed6 {
    hint(Sip/1) 2 => {
       NoOp(This fails);
    };
};

//-example: Next line bracket
context failed7
{
    1 => {
       NoOp(This fails);
    };
};

//-example: Switches and eswitches
context failed8 {
    switches {
        IAX2/abox;
    };
    /* Anything below fails */
    1 => {
    };
};



More information about the asterisk-users mailing list