[ phpeclipse-Bugs-1589521 ] 3 character function names invalid?

"SourceForge.net" <[email protected]> Sat, 31 Mar 2007 19:20:07 -0700
Newsgroups gmane.comp.ide.eclipse.phpeclipse.devel
Message-ID <[email protected]>
Bugs item #1589521, was opened at 2006-11-02 13:29
Message generated for change (Comment added) made by sf-robot
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=484801&aid=1589521&group_id=57621

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Resolution: Accepted
Priority: 9
Private: No
Submitted By: Lester Caine (lsces)
Assigned to: Axel C. Kramer (axelcl)
Summary: 3 character function names invalid?

Initial Comment:
function tra( $pString ) is flagged with a 
Parser Error "Function name expected after keyword
function."
If I add an extra character to tra ( _tra or tran )
then the error message goess away, but I see nothing
wrong with tra and did not have this problem in earlier
builds of phpeclipse.

Where do I go to fix this problem?

----------------------------------------------------------------------

>Comment By: SourceForge Robot (sf-robot)
Date: 2007-03-31 19:20

Message:
Logged In: YES 
user_id=1312539
Originator: NO

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

----------------------------------------------------------------------

Comment By: Axel C. Kramer (axelcl)
Date: 2007-03-17 06:55

Message:
Logged In: YES 
user_id=1143825
Originator: NO

I added the changes to CVS

----------------------------------------------------------------------

Comment By: Lester Caine (lsces)
Date: 2007-03-06 22:56

Message:
Logged In: YES 
user_id=175009
Originator: YES

Thanks for that toshihiro
Can someone uncomment lines 3687 and 3688 before the next build goes out
please.

----------------------------------------------------------------------

Comment By: Toshihiro (toshihiro)
Date: 2007-03-05 23:39

Message:
Logged In: YES 
user_id=1527096
Originator: NO

Bug consists in
net.sourceforge.phpdt.internal.compiler.parser
Scanner.java

http://phpeclipse.cvs.sourceforge.net/phpeclipse/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Scanner.java?revision=1.60&view=markup

 ...
 3174   public int scanIdentifierOrKeyword(boolean isVariable)
 ...
 3677       case 't':
 3678           // try true throw
 3679           switch (length) {
 3680           case 3:
 3681               if ((data[++index] == 'r') && (data[++index] == 'y'))
 3682                   return TokenNametry;
 3683               // case 4 :
 3684               // if ((data[++index] == 'r') && (data[++index] ==
'u')
 3685               // && (data[++index] == 'e'))
 3686               // return TokenNametrue;
 3687               // else
 3688               // return TokenNameIdentifier;
 3689           case 5:
 3690               if ((data[++index] == 'h') && (data[++index] == 'r')
 3691                       && (data[++index] == 'o') && (data[++index] ==
'w'))
 3692                   return TokenNamethrow;
 3693           }
 3694           return TokenNameIdentifier;
 ...

Function name "trX"(X is any character except 'y') dive into "case 5"
clause. It causes an exception, and returns invalid token.
"break" is necessary.
Not only "case 't'", maybe.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=484801&aid=1589521&group_id=57621

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV