Hi all,
Eric Promislow wrote:
[snip]
Kein-Hong has covered the most troublesome parts, which come down to the
use of barewords and ambiguous operators (qw@/ ? <<@ are the main
culprits).
I've spent some time trying out code snippets on ActiveState perl
5.8.2 to check what is valid and what is not valid. I think it
might be possible to sort out most remaining glitches pretty soon.
Here is my implementation list w.r.t barewords:
(a) PATTERN: '{' tabspace bareword tabspace '}'
IS: part of variable spec
TO: look backwards then forwards at bareword
(b) PATTERN: 'sub' whitespace/comment bareword
IS: subroutine declaration
TO: look backwards at bareword
(c) PATTERN: '&' whitespace/comment bareword
IS: subroutine call
TO: look backwards at bareword
(d) PATTERN: bareword tabspace '=>'
IS: hash literal
TO: look forwards at bareword
Note that for (a),(d), neither comments nor newlines are allowed
in between (at least, according to perl 5.8.2). The checking
happens only when barewords and quote-like delimiters are
ambiguous. If a bareword is unambiguously a bareword, then no
checking is needed. The '->bareword' case already works in the
current LexPerl.
The other stuff in my list are:
(a) Mark invalid octal/binary numbers as errors, slight adjustment
to lexing of hex numbers.
(b) Format blocks (there is one more empty style for it.)
(c) Check for '(' as in:
'<<' bareword '('
so that << is an operator, not a HERE doc.
(d) For pods, nicely style empty lines between verbatim paragraphs.
(e) One final thing I won't attempt for now: stacked HERE docs.
If there is anything missing from the above that needs to be done
for LexPerl, please do post the info to this list.
Thanks,
--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest