in reply to Re^2: question about unlink and highlighting
in thread question about unlink and highlighting

It isn't exactly parsing perl :) besides Scintilla (among others) handles this just fine :)
  • Comment on Re^3: question about unlink and highlighting

Replies are listed 'Best First'.
Re^4: question about unlink and highlighting
by ericp (Initiate) on Sep 15, 2008 at 22:42 UTC
    Komodo uses Scintilla, but unfortunately our Perl colouriser and Scintilla's forked many years ago, each passing different tests, but neither passing all of them. We focused on getting constructs like here-documents working correctly, for example, and punted on a few constructs, like formats and the glob operator. Now that you bring it up, I'll reopen the bug -- our lexer now does enough syntactic analysis to know whether a '<' is the start of an operator ("<", "<=", or "<=>"), or a file handle read. And filehandle read's are allowed in the same places as fileglob expressions.

    The problem is, this is happening in an editor, not while parsing a final file. Much of the time, contents in an editor buffer do not form a valid program. And also, the same text is reanalyzed over and over, so we try to minimize the amount of lookahead. But what the hey -- the bug's reopened.

    It's been years, and I know that Kein-Hong Man has completely rewritten the lexer, so it might be worth retrying it.

    There's already a bug: http://bugs.activestate.com/show_bug.cgi?id=19095, marked "resolved:postponed". At the time (Jan 2002) we followed the suggested 1 practice of recommending glob over the <> operator, and this is the first we've heard of anyone trying to use it in Komodo since then.

    1 Of course this was four years before Damian's PBP was published (page 167 - "Use glob, not <>"). Maybe I picked it up from a Perl blog at the time. We've always tried to stay ahead of the times.