Syntax hightlighting : not-defined operator

  • Cédric Bertolini

    Hello all,

    I'm running EPIC 0.5.46. Whenever I use the not-defined operator added in perl 5.10 (which is //), the syntax hightighter used by the editor parses it as bad regexp pattern and comments out all my code after the operator. That's a pretty bad behavior, to the point that I have to refrain from using this operator.

    Test case : everything after "//" is parsed as comment.

    $a = $b // "fubar";

    What is the parser used by EPIC? Is there a way to solve this problem?

    Thanks for your time.

  • Jan Ploski

    Jan Ploski - 2011-03-04

    The parser used by EPIC is a custom one based on ANTLR.

    I noticed that your test case doesn't cause a syntax highlighting problem in the current 'testing' (0.6.x) version, so the easiest solution might be to simply upgrade EPIC.

  • Cédric Bertolini

    It looks like EPIC is using ANTLR 2.7.5. Last stable version is 2.7.7, released in 2006. So I guess I'm stuck here, unless I patch the source code of ANTLR2 myself - very unlikely. It looks like perl support for ANTLR3 is very poor. Is there a plan to upgrade to this newer version?

  • Cédric Bertolini

    Oh thanks, I replied before I saw your answer. I'll try this.

  • Cédric Bertolini

    Thanks, it worked like a charm!


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