Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


#206 syntax validation / error marking is not greedy enough


With the new epic version 0.3.12 some errors are not
reported anymore in the "problems" view and also not
marked in the "editor" view.

Culprit for these missing errors is a too weak pattern
for parsing the "perl -c" output.

With a test file like this:

use strict;

# no my - reported

# bad syntax error - not reported
if {}

perl -c would give the following output:
Global symbol "$test" requires explicit package name at line 6.
syntax error at line 9, near "if {" had compilation errors.

But in eclipse/epic only the first error is reported.

Looking at the class ParsedErrorLine shows that the

private static final Pattern errorLineNoPattern =
Pattern.compile("^(.*) at (\\S+) line

is used for error report matching. This matches the
first report of the "perl -c" output, but not the
second report.

So the pattern must be changed or a new case must be
added so that the second error report is also
matched/found and reported/marked.


  • Jan Ploski
    Jan Ploski

    Logged In: YES

    Well observed. I committed a partial fix for CVS: changed the regexp to

    private static final Pattern errorLineNoPattern =
    Pattern.compile("^(.*) at (\\S+) line

    It is still not perfect because it discards the ", near "if {"" part of the error
    message. Still better than ignoring the error altogether. Maybe you know if
    there is a specification of the Perl error messages' format anywhere? EPIC's
    current parser was written by trial and error.

  • Logged In: NO

    Hello and thank you for the fast response!

    Regarding the question if there is a specification of the
    error messages of perl:

    I searched a bit, but found nothing really precise.

    Only piece of information I gathered was by grepping through
    the perl source code.

    In file toke.c (lexer for perl) there is a function
    Perl_yyerror that generated messages that resembles error
    messages as I know them.

    But this is mainly guessing as I do not really understand
    what the code is doing.