Lisaac syntax mode

Started by jeremy_c, July 30, 2009, 02:37:58 AM

Previous topic - Next topic

jeremy_c

Lisaac is (http://isaacproject.u-strasbg.fr/li.html)

concept:  
 small prototype-based programming language  
 
 The ideas in Lisaac are mostly inspired by Smalltalk (all values are objects), Self (prototype-based)
 and Eiffel (design by contract)  

platforms:
 all platforms (host/target specific for GCC)  

features:
 pure object language  
 very fast (like C code)  
 dynamic and multiple inheritance  
 dynamic definition slot  
 static typing (invariant)  
 genericity type  
 auto-cast type system  
 programming by contract  
 interrupt manager  
 include C code facilities  

Attached is a syntax highlighting specification for Lisaac.

alex

Thanks a lot Jeremy.

Would also add the file to library with link to forum and documentation about Lisaac itself.

Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

jeremy_c

In this mode, I have:

     <Style id="script" name="C" include="cpp:normal" bold="0" italic="0" underline="0" clr="#66666600" bkclr="Embedded Language 2 Back" overview="1">
        <Containers>
          <Close id="cpp:normal"/>
          <Close id="cpp:comment"/>
        </Containers>
        <Blocks>
          <Block open="`" close="`" />
        </Blocks>
      </Style>

This is very handy as Lisaac can embed C code right into it. However, the problem is this:

Section Header

  + name := BENCH;
 
  - copyright := "(c) 2009 by Jeremy Cowgar";
 
  - comment := "Benchmarks any console program";
 
  - external := `#include <time.h>`;

Section Inherit

  - parent:OBJECT := OBJECT;

Section Public

  - bench b:{} :REAL_32 <-
  ( + ts:REAL_32;
   
    ts := `clock()`:REAL_32;
    b.value;
    ((`clock()`:REAL_32 - ts) / `CLOCKS_PER_SEC`:REAL_32)
  );


The highlighting is messed up as it seems to hilght from the first ` to the ` in clock() ignoring the ` at the end of the - external line.

Any thoughts?

alex

Hi Jeremy,

just add one more allowed close container for embedded C:
        <Containers>
          <Close id="cpp:normal"/>
          <Close id="cpp:comment"/>
          <Close id="cpp:preprocessor"/>
        </Containers>


Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

jeremy_c

Great, that did the trick.