[ phpeclipse-Bugs-1523506 ] Parser error for one-liner end* control structure
"SourceForge.net" <[email protected]> Thu, 10 May 2007 19:20:04 -0700
| Newsgroups | gmane.comp.ide.eclipse.phpeclipse.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1523506, was opened at 2006-07-16 13:02 Message generated for change (Comment added) made by sf-robot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=484801&aid=1523506&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: PHP Parser Group: None >Status: Closed Resolution: None Priority: 5 Private: No Submitted By: rodrigo moraes (rodrigomoraes) Assigned to: Nobody/Anonymous (nobody) Summary: Parser error for one-liner end* control structure Initial Comment: This problem occurs in version 1.1.8 when you use endif, endwhile, endfor, or endforeach in an one-line PHP block without adding a semi-colon in the end. Basically, to describe with an example, this correctly doesn't generate an error: <?php echo 'one-line block' ?> While this will wrongly result in: Parser error "';' expected after if-statement." <?php endif ?> This bug is described in details here, and a possible solution is provided: http://phpeclipse.de/tiki-view_forum_thread.php?comments_parentId=2977&topics_threshold=0&topics_offset=0&topics_sort_mode=lastPost_desc&topics_find=&forumId=3 thanks. rodrigo moraes / brazil ---------------------------------------------------------------------- >Comment By: SourceForge Robot (sf-robot) Date: 2007-05-10 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: Toshihiro (toshihiro) Date: 2007-04-26 16:45 Message: Logged In: YES user_id=1527096 Originator: NO Fixed in CVS. ---------------------------------------------------------------------- Comment By: rodrigo moraes (rodrigomoraes) Date: 2006-07-29 03:53 Message: Logged In: YES user_id=860265 Well, short constructions are approved by users of template engines like Savant or frameworks like Solar. When PHPEclipse points a syntax error which *is not* a PHP syntax error (and this is allowed by the language for short constructions), I think it has bug, yes. Another example: Zend Framework ommits ?> from the end of *all* files and instead relies on EOF. Is this "approved" or allowed by the language? ---------------------------------------------------------------------- Comment By: Luis Bernardo (lmpmbernardo) Date: 2006-07-28 21:28 Message: Logged In: YES user_id=137011 adding the semi-colon at the end seems to be the "approved" syntax. I don't think this is a bug. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=484801&aid=1523506&group_id=57621 ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/