[asterisk-users] AEL2 Syntax Highlighting

Steve Murphy murf at parsetree.com
Mon Oct 15 12:31:25 CDT 2007


On Mon, 2007-10-15 at 11:42 -0500, Perssy Llamosas wrote:
> -------- 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.

This is true; in the original AEL, a semicolon must follow EVERY
statement, even statement blocks. IN AEL2, the ';' after a statement
block is treated as an empty statement, and is ignored.

I am sure you will bump into other subtle differences... If I were to
try to enumerate them, I'd probably miss something, but I did give a
list of differences in the AEL2 voip-info Wiki... I congratulate you on
taking on this effort, and wish you all the success possible. If you
have any questions, feel free to write/irc/jabber/phone me. I'm
'usually' around.

murf


> 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 => {
>     };
> };
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3239 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20071015/7fe603ba/attachment.bin 


More information about the asterisk-users mailing list