#1026 Add DMAP language

Committed
closed
5
2013-12-12
2013-10-11
No

Please add a new file type lexer (file type extension is .dmap). The new lexer source and description are attached.

1 Attachments

Discussion

  • Neil Hodgson

    Neil Hodgson - 2013-10-11

    I'll look at this after 3.3.6 is released.

     
  • Neil Hodgson

    Neil Hodgson - 2013-10-17

    The Fortran lexer provides both fixed-format and free-format variants. Since DMAP doesn't have a fixed format, all of the code that supports this choice should be removed: isFixFormat should be removed from the function definitions, ColouriseDMAPDocFreeFormat and FoldDMAPDocFreeFormat should be removed, and lmDMAP should refer to ColouriseDMAPDoc and FoldDMAPDoc directly.

    ..\lexers\LexDMAP.cxx(50) : warning C4100: 'isFixFormat' : unreferenced formal parameter
    ..\lexers\LexDMAP.cxx(158) : warning C4100: 'chNextNonBlank' : unreferenced formal parameter
    ..\lexers\LexDMAP.cxx(169) : warning C4100: 'isFixFormat' : unreferenced formal parameter

    scintilla\lexers\LexDMAP.cxx:181: style: The scope of the variable 'chNextNonBlank' can be reduced. Since its not used in classifyFoldPointDMAP chNextNonBlank and the code that sets it can be removed.

    IsALineEnd is unused. IsABlank should be declared static.

    SCE_DMAP_PREPROCESSOR appears unused.

    Its possible but unlikely that DMAP allows old FORTRAN dotted operators like .EQ. and .LT. . Check that you really need SCE_DMAP_OPERATOR2.

     
    • Mark Robinson

      Mark Robinson - 2013-10-17

      Hi Neil,

      You are, of course, right on all counts. My apologies for the faux pas. I would even go further to suggest the function IsABlank should be removed as it is only used by chNextNonBlank, which is not used, and as a consequence neither is j.

      I confirm the defines SCE_DMAP_PREPROCESSOR and SCE_DMAP_OPERATOR2 are not needed either. Please find attached modified source.

       
  • Neil Hodgson

    Neil Hodgson - 2013-10-18

    Committed as [ac1e9d].

    You should check that lines longer than 72 characters behave as you would expect.

     

    Related

    Commit: [ac1e9d]

  • Neil Hodgson

    Neil Hodgson - 2013-10-18
    • labels: DMAP --> DMAP, lexer, scintilla
    • status: open --> accepted
    • Group: Completed --> Committed
     
  • Neil Hodgson

    Neil Hodgson - 2013-12-12
    • status: accepted --> closed
     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks