Menu

#106 support for e langauge

v1.63
accepted
None
1
2015-03-27
2015-03-19
Anonymous
No

Please can you add support for the e language
(http://standards.ieee.org/findstds/standard/1647-2011.html)

The comments are the same as C/C++. I think the one below should do the trick

Thanks,
-hannes
(hannes@cadence.com)

e
filter remove_matches ^\s//
filter remove_inline //.
$
filter call_regexp_common C
extension e
3rd_gen_scale 1.51
end_of_line_continuation \$

Discussion

  • Anonymous

    Anonymous - 2015-03-19

    Sorry, I missed one thing, which is that the code starts after "<'" and ends with "'>",
    so something like this:
    // comment
    nothing (also comment)
    <' // start of code to follow
    struct foo {
    };
    '>
    more comments
    <'
    // more code here
    struct jojo {
    };
    '>

     
  • Al Danial

    Al Danial - 2015-03-20

    So what you're saying is that in addition to // within code sections,
    it is actually '> and <' which start and end comments--with the exception that the file doesn't begin with '> or end with '<.

    Not pretty, but do-able.

     
  • Al Danial

    Al Danial - 2015-03-20
    • status: open --> accepted
     
  • Anonymous

    Anonymous - 2015-03-23

    yes, the file can start with a comment, and then have code like this:
    ========================file===================================
    info about my code

    <'
    // now we are in a comment in the code section
    struct foo {
    };
    '>
    this is not code ...
    =======================EOF=====================================

     
  • Al Danial

    Al Danial - 2015-03-27

    I didn't state my point clearly, sorry. cloc is built around start-of-comment markers and end-of-comment markers. It has no knowledge of start-of-code and end-of-code markers. Therefore, to support e, I will have to add '> characters to the beginning of the file, and append <' to the end of the file, then set e up so that '> and <' are start-of-comment and end-of-comment markers, respectively.

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.