X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/test/PHPParser.jj b/net.sourceforge.phpeclipse/src/test/PHPParser.jj index 306f21d..9bf7ec4 100644 --- a/net.sourceforge.phpeclipse/src/test/PHPParser.jj +++ b/net.sourceforge.phpeclipse/src/test/PHPParser.jj @@ -605,7 +605,7 @@ void Variable(): VariableName() } -void VariableName(): +String VariableName(): {} { Expression() @@ -701,20 +701,7 @@ void Type() : } -/* - * Expression syntax follows. - */ - void Expression() : -/* - * This expansion has been written this way instead of: - * Assignment() | ConditionalExpression() - * for performance reasons. - * However, it is a weakening of the grammar for it allows the LHS of - * assignments to be any conditional expression whereas it can only be - * a primary expression. Consider adding a semantic predicate to work - * around this. - */ {} { PrintExpression() @@ -872,7 +859,7 @@ void PrimaryPrefix() : { | - ClassIdentifier() + [] ClassIdentifier() | VariableDeclaratorId() } @@ -908,7 +895,13 @@ void Literal() : | | - + try { + + } catch (TokenMgrError e) { + errorMessage = "unterminated string"; + errorLevel = ERROR; + throw generateParseException(); + } | BooleanLiteral() | @@ -1131,7 +1124,7 @@ void IfStatement() : */ {} { - Condition("if") Statement() [ LOOKAHEAD(1) ElseIfStatement() ] [ LOOKAHEAD(1) Statement() ] + Condition("if") Statement() ( LOOKAHEAD(1) ElseIfStatement() )* [ LOOKAHEAD(1) Statement() ] } void Condition(String keyword) :