diff options
-rw-r--r-- | eclipse-phpeclipse-php53.patch | 92 | ||||
-rw-r--r-- | eclipse-phpeclipse.spec | 7 |
2 files changed, 99 insertions, 0 deletions
diff --git a/eclipse-phpeclipse-php53.patch b/eclipse-phpeclipse-php53.patch new file mode 100644 index 0000000..415c127 --- /dev/null +++ b/eclipse-phpeclipse-php53.patch @@ -0,0 +1,92 @@ +diff -up plugins/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java.old plugins/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java +--- plugins/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java.old 2012-01-23 17:11:21.572233318 +0100 ++++ plugins/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java 2012-01-23 17:18:00.837251237 +0100 +@@ -3040,7 +3040,7 @@ public class Parser implements ITerminal + System.out.println("TRACE: dynamic_class_name_reference()"); + } + base_variable(true); +- if (token == TokenNameMINUS_GREATER) { ++ if (token == TokenNameMINUS_GREATER || token == TokenNamePAAMAYIM_NEKUDOTAYIM) { + getNextToken(); + object_property(); + dynamic_class_name_variable_properties(); +@@ -3056,7 +3056,7 @@ public class Parser implements ITerminal + System.out + .println("TRACE: dynamic_class_name_variable_properties()"); + } +- while (token == TokenNameMINUS_GREATER) { ++ while (token == TokenNameMINUS_GREATER || token == TokenNamePAAMAYIM_NEKUDOTAYIM) { + dynamic_class_name_variable_property(); + } + } +@@ -3067,7 +3067,7 @@ public class Parser implements ITerminal + if (Scanner.TRACE) { + System.out.println("TRACE: dynamic_class_name_variable_property()"); + } +- if (token == TokenNameMINUS_GREATER) { ++ if (token == TokenNameMINUS_GREATER || token == TokenNamePAAMAYIM_NEKUDOTAYIM) { + getNextToken(); + object_property(); + } +@@ -3584,7 +3584,7 @@ public class Parser implements ITerminal + // | base_variable_with_function_calls + Expression ref = base_variable_with_function_calls(lefthandside, + ignoreVar); +- if (token == TokenNameMINUS_GREATER) { ++ if (token == TokenNameMINUS_GREATER || token == TokenNamePAAMAYIM_NEKUDOTAYIM) { + ref = null; + getNextToken(); + object_property(); +@@ -3598,7 +3598,7 @@ public class Parser implements ITerminal + // variable_properties: + // variable_properties variable_property + // | /* empty */ +- while (token == TokenNameMINUS_GREATER) { ++ while (token == TokenNameMINUS_GREATER || token == TokenNamePAAMAYIM_NEKUDOTAYIM) { + variable_property(); + } + } +@@ -3609,7 +3609,7 @@ public class Parser implements ITerminal + if (Scanner.TRACE) { + System.out.println("TRACE: variable_property()"); + } +- if (token == TokenNameMINUS_GREATER) { ++ if (token == TokenNameMINUS_GREATER || token == TokenNamePAAMAYIM_NEKUDOTAYIM) { + getNextToken(); + object_property(); + method_or_not(); +@@ -3740,7 +3740,7 @@ public class Parser implements ITerminal + getNextToken(); + } + } +- if (token == TokenNameMINUS_GREATER) { ++ if (token == TokenNameMINUS_GREATER || token == TokenNamePAAMAYIM_NEKUDOTAYIM) { + ref = null; + getNextToken(); + object_property(); +@@ -5124,4 +5124,4 @@ public class Parser implements ITerminal + } + return true; + } +-} +\ Pas de fin de ligne à la fin du fichier ++} +diff -up plugins/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Scanner.java.old plugins/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Scanner.java +--- plugins/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Scanner.java.old 2012-01-23 17:08:34.779225813 +0100 ++++ plugins/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Scanner.java 2012-01-23 17:09:19.811227854 +0100 +@@ -4266,6 +4266,8 @@ public class Scanner implements IScanner + return "( object )"; //$NON-NLS-1$ + case TokenNamestringCAST: + return "( string )"; //$NON-NLS-1$ ++ case TokenNamePAAMAYIM_NEKUDOTAYIM: ++ return "::"; + default: + return "not-a-token(" + (new Integer(act)) + ") " + new String(getCurrentTokenSource()); //$NON-NLS-1$ + } +@@ -4697,4 +4699,4 @@ public class Scanner implements IScanner + // this.foundTaskMessages[i] = message; + // } + // } +-} +\ Pas de fin de ligne à la fin du fichier ++} diff --git a/eclipse-phpeclipse.spec b/eclipse-phpeclipse.spec index c50015d..0048998 100644 --- a/eclipse-phpeclipse.spec +++ b/eclipse-phpeclipse.spec @@ -35,6 +35,9 @@ Patch7: %{name}-fix-phpmanual-view.patch # Remove a reference that was causing a build failure on Eclipse 3.6+ Patch8: %{name}-remove-internal-eclipse-ref.patch +# Try to fix PHP 5.3.0 parser +Patch9: %{name}-php53.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -68,6 +71,7 @@ templates and support for the XDebug and DBG debuggers. %patch6 -p0 -b .orig %patch7 -p0 -b .orig %patch8 -p0 -b .orig +%patch9 -p0 -b .php54 #remove bundled jars find -name '*.class' -exec rm -f '{}' \; @@ -114,6 +118,9 @@ rm -rf %{buildroot} %{eclipse_dropin}/phpeclipse-xdebug %changelog +* Mon Jan 23 2012 Remi Collet <remi@fedoraproject.org> - 1.2.3-3 +- try to patch parser for php >= 5.3 + * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild |