#281 LIN Description File - Lexer/Folding

open
None
3
2005-12-14
2005-12-13
No

Hi!

I've implemented a new lexer for LIN Description Files
(these are descriptions of LIN-bus systems, the 'little
brother' of the CAN-bus used widely in the automobile
industry).

It's quite simplicistic and more or less copy'n'pasted
from the LexLua.cxx file. It works within the current
stable/download version 1.66 of scintilla. It registers
as "ldf" and the lexer-ID 76.

Attached to this "feature request" you'll find a patch
file against the download version. To apply the patch,
follow the following instructions:

1. Untar/unzip the (original) scintilla166.tgz/.zip file;
2. Enter the newly created "scintilla" subdirectory;
3. Apply the patch with the command line (Unix - on
Windows you should install & use the MSYS or Cygwin
toolsets!):

patch -p1 < /path/to/scintilla166_ldf.diff

...where "/path/to/" must be replaced with the actual
path the diff file resides in.

The same applies for SciTE, just unpack it, go into the
"scite" subdirectory and apply the patch with:

patch -p1 < /path/to/scite166_ldf.diff

Afterwards, the package should be build the usual way.
I only tested the build, not the functionality of Scite
itself. The scintilla control itself works fine for me
via wxScintilla ( http://wxcode.sf.net/ ).

Cheers,
Björn

Discussion

  • Neil Hodgson

    Neil Hodgson - 2005-12-14
    • priority: 5 --> 3
     
  • Neil Hodgson

    Neil Hodgson - 2005-12-14
    • assigned_to: nobody --> nyamatongwe
     
  • Neil Hodgson

    Neil Hodgson - 2005-12-14

    Logged In: YES
    user_id=12579

    I'll have a look at this in a few days after 1.67 is released.

     
  • Neil Hodgson

    Neil Hodgson - 2005-12-20

    Logged In: YES
    user_id=12579

    The diff files do not contain just the changes, instead
    repeating all the text in every file. They wouldn't apply
    correctly for me either. Its better to send the actual
    changed files in a zip archive.

     
  • Björn Schneider

    Corrected DIFF against 'scintilla/' subtree

     
  • Björn Schneider

    Logged In: YES
    user_id=375961

    Sorry,

    I created a corrected DIFF file (attached below). This time
    there are only two files patched, the "Scintilla.iface" and
    the lexer itself ("LexLDF.cxx").

    Go into the "scintilla"-directory and patch with 'patch -p1
    < /path/to/scintilla166_ldf.diff'.

    You have to run both "scintilla/include/HFacer.py" and
    "scintilla/src/LexGen.py" afterwards, so header and
    makefiles get updated with the new lexer.

    The problem with the huge diffs were unix/dos incompatible
    line endings - the scripts generated unix line endings, as
    I'm developing on Linux - whereas the originals had
    dos-endings :P

    cu,
    Björn

     
  • Björn Schneider

    The two changed files 'as-is

     
  • Neil Hodgson

    Neil Hodgson - 2005-12-20

    Logged In: YES
    user_id=12579

    There are some warnings from running all the compilers:

    ..\src\LexLDF.cxx:
    Warning W8004 ..\src\LexLDF.cxx 138: 'currentLine' is
    assigned a value that is never used in function
    ColouriseLDFDoc(unsigned int,int,int,WordList * *,Accessor &)
    Warning W8004 ..\src\LexLDF.cxx 138: 'keywords8' is assigned
    a value that is never used in function
    ColouriseLDFDoc(unsigned int,int,int,WordList * *,Accessor &)
    Warning W8004 ..\src\LexLDF.cxx 138: 'keywords7' is assigned
    a value that is never used in function
    ColouriseLDFDoc(unsigned int,int,int,WordList * *,Accessor &)
    Warning W8004 ..\src\LexLDF.cxx 138: 'keywords6' is assigned
    a value that is never used in function
    ColouriseLDFDoc(unsigned int,int,int,WordList * *,Accessor &)
    Warning W8004 ..\src\LexLDF.cxx 138: 'keywords5' is assigned
    a value that is never used in function
    ColouriseLDFDoc(unsigned int,int,int,WordList * *,Accessor &)
    Warning W8004 ..\src\LexLDF.cxx 138: 'keywords4' is assigned
    a value that is never used in function
    ColouriseLDFDoc(unsigned int,int,int,WordList * *,Accessor &)
    Warning W8004 ..\src\LexLDF.cxx 138: 'keywords3' is assigned
    a value that is never used in function
    ColouriseLDFDoc(unsigned int,int,int,WordList * *,Accessor &)
    Warning W8080 ..\src\LexLDF.cxx 196: 's' is declared but
    never used in function FoldLDFDoc(unsigned
    int,int,int,WordList * *,Accessor &)

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks