Commits on Apr 9, 2012
  1. Fixes recursion bug in disambiguate_in().

    The basic strategy of disambiguate_in() is to strip the trailing *.in
    extension from the filepath, and then to disambiguate the file as if it
    originally had that name. Thus, given file "", disambiguate_in()
    will disambiguate "foo".
    disambiguate_in() achieves this while re-using the exact same file on
    disk. This is possible because a SourceFile struct has both a `filepath`
    (the name we use for disambiguation purposes) and the `diskpath` (the
    actual name on disk).
    So disambiguate_in() instantiates a new SourceFile with a stripped
    filepath, yet the same diskpath and same file contents.
    The bug is that the code did this incorrectly: when assigning the
    diskpath of the new SourceFile, it would mistakenly assign it the
    previous SourceFile's *filepath* instead of the previous SourceFile's
    If disambiguate_in() runs just once (when the file has just a single
    *.in extension, the usual case), this mistake does not matter because
    the filepath and diskpath are the same.
    But if disambiguate_in() recurses on itself (when the file has multiple
    * extensions), then during the second pass the filepath and
    diskpath will not be equal -- they will differ by one missing *.in
    extension. Thus the diskpath of the new SourceFile will refer to a
    (probably) non-existent file.
    The bug is hard to explain but was simple to correct.
    In addition to correcting the diskpath assignment, I've fixed a memory
    leak: it was possible to allocate a new SourceFile, and then immediately
    return NULL, which fails to free the SourceFile. I've moved the
    allocation *after* the NULL return check to avoid this.
    robinluckey committed Apr 9, 2012
Commits on Mar 8, 2012
Commits on Mar 6, 2012
  1. Merge pull request #11 from dcsobral/forth

    Initial support for Forth
    robinluckey committed Mar 6, 2012
  2. Merge pull request #9 from haraldkl/master

    Fixing Bug in Fortran disambiguation
    robinluckey committed Mar 6, 2012
Commits on Feb 23, 2012
  1. Initial support for Forth

    This is based on the Scala parser, which is actually quite
    incorrect -- assumes existence of single-quote strings (which
    will cause problem on any file with symbols), doesn't know
    multiline strings, doesn't handle nested comments: all of which
    made it a pretty good starting point for Forth.
    Parsing Forth is impossible, but this will recognize comments,
    strings and blank lines on most projects. Tested against FreeBSD
    dcsobral committed Feb 23, 2012
Commits on Feb 13, 2012
  1. Merge pull request #10 from blackducksw/OTWO-1300

    OTWO-1300 Improves *.pl disambiguation to ignore smileys :-)
    amujumdar committed Feb 13, 2012
Commits on Feb 8, 2012
  1. OTWO-1300 Improves *.pl disambiguation to ignore smileys :-)

    Smiley faces in Perl strings and comments look similar to Prolog
    rule syntax. This patch makes two improvements:
     - Better detection of perl shebangs (#!%PERL% now recognized)
     - A prolog ':-' token must be followed by a space or a newline
    robinluckey committed Feb 8, 2012
Commits on Jan 3, 2012
  1. Changed the logic to disambiguate free and fixed formatted Fortran

    Test the assumption of a fixed format code and indicate free
    format, as soon as any line breaks this assumption.
    (It is easier to check for fixed form constraints)
    Rules for fixed format are taken from the standard, see p. 47.
    haraldkl committed Jan 3, 2012
Commits on Jan 2, 2012
Commits on Dec 31, 2011
  1. Return free format in the Fortran disambiguation,

    if the code is definetly not fixed.
    haraldkl committed Dec 31, 2011
Commits on Dec 22, 2011
Commits on Dec 21, 2011
Commits on Dec 16, 2011
  1. Adds additional comment styles for MS-DOS batch files

    In addition to 'REM', we now accept '@REM' and '::'.
    Note that test/expected_dir/bat1.bat should be tab-delimited (not
    space-delimited), so this patch also corrects that.
    robinluckey committed Dec 16, 2011
Commits on Dec 15, 2011
  1. Fixes crash in disambiguate_r() when source file is empty

    Thanks to ehsan for discovering this bug.
    robinluckey committed Dec 15, 2011
  2. Merge pull request #6 from cmarcelo/qml

    Add support for Qt's QML language
    robinluckey committed Dec 15, 2011
  3. Merge pull request #5 from koraktor/ruby

    Added more filenames and extensions for Ruby
    robinluckey committed Dec 15, 2011
  4. Merge pull request #4 from koraktor/mustache

    Treat Mustache templates as HTML
    robinluckey committed Dec 15, 2011
Commits on Oct 22, 2011
  1. Add support for Qt's QML language

    Reusing the JS parser, since QML is 'almost' JavaScript. The
    approximation is good enough for the line counting purposes.
    cmarcelo committed Oct 22, 2011
Commits on Aug 29, 2011
Commits on Aug 11, 2011
  1. Treat Mustache templates as HTML

    Mustache introduces only a small amount of additional syntax, so treating
    its templates as pure HTML shouldn't hurt.
    koraktor committed Aug 11, 2011
Commits on Aug 9, 2011
  1. Merge branch 'ecere'

    robinluckey committed Aug 9, 2011
  2. Completes eC parser

     - Adds parse_ec() to the list of parsers
     - Adds a test to ensure that line counter works
    robinluckey committed Aug 9, 2011
Commits on Aug 8, 2011