public final static int TokenNameprint = 1036;
public final static int TokenNameunset = 1037;
public final static int TokenNameexit = 1038;
- public final static int TokenNamedie = 1039;
+// public final static int TokenNamedie = 1039;
// public final static int TokenNameand = 1040;
// public final static int TokenNameor = 1041;
// public final static int TokenNamexor = 1042;
*******************************************************************************/
package net.sourceforge.phpdt.internal.compiler;
-import net.sourceforge.phpdt.core.compiler.CharOperation;
import net.sourceforge.phpdt.core.compiler.IProblem;
import net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit;
import net.sourceforge.phpdt.internal.compiler.parser.UnitParser;
import net.sourceforge.phpdt.internal.compiler.problem.ProblemReporter;
import net.sourceforge.phpeclipse.internal.compiler.ast.CompilationUnitDeclaration;
-import org.eclipse.core.runtime.CoreException;
-
/*
* A document element parser extracts structural information
scanner.resetTo(0, regionSource.length);
scanner.setSource(regionSource);
parse();
- } catch (CoreException e) {
- e.printStackTrace();
} catch (AbortCompilation ex) {
}
}
// | T_FINAL T_CLASS
if (token == TokenNameclass) {
getNextToken();
- } else if (token == TokenNamefinal) {
+ } else if (token == TokenNameabstract) {
checkAndSetModifiers(AccAbstract);
getNextToken();
if (token != TokenNameclass) {
throwSyntaxError("Keyword 'class' expected after keyword 'final'.");
}
getNextToken();
+ } else {
+ throwSyntaxError("Keyword 'class' 'final' or 'abstract' expected");
}
}
private void interface_extends_list() {
}
case 'd' : //define declare default do die
+ // TODO delete define ==> no keyword !
switch (length) {
case 2 :
if ((data[++index] == 'o'))
return TokenNamedo;
else
return TokenNameIdentifier;
- case 3 :
- if ((data[++index] == 'i') && (data[++index] == 'e'))
- return TokenNamedie;
- else
- return TokenNameIdentifier;
case 6 :
if ((data[++index] == 'e')
&& (data[++index] == 'f')
return "Identifier(" + new String(getCurrentTokenSource()) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
case TokenNameVariable :
return "Variable(" + new String(getCurrentTokenSource()) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ case TokenNameabstract :
+ return "abstract"; //$NON-NLS-1$
+ case TokenNamearray :
+ return "array"; //$NON-NLS-1$
case TokenNameas :
return "as"; //$NON-NLS-1$
case TokenNamebreak :
return "extends"; //$NON-NLS-1$
case TokenNamefalse :
return "false"; //$NON-NLS-1$
+ case TokenNamefinal :
+ return "final"; //$NON-NLS-1$
case TokenNamefor :
return "for"; //$NON-NLS-1$
case TokenNameforeach :
return "global"; //$NON-NLS-1$
case TokenNameif :
return "if"; //$NON-NLS-1$
+ case TokenNameimplements :
+ return "implements"; //$NON-NLS-1$
case TokenNameinclude :
return "include"; //$NON-NLS-1$
case TokenNameinclude_once :
return "include_once"; //$NON-NLS-1$
+ case TokenNameinterface :
+ return "interface"; //$NON-NLS-1$
case TokenNamelist :
return "list"; //$NON-NLS-1$
case TokenNamenew :
return "null"; //$NON-NLS-1$
case TokenNameprint :
return "print"; //$NON-NLS-1$
+ case TokenNameprivate :
+ return "private"; //$NON-NLS-1$
+ case TokenNameprotected :
+ return "protected"; //$NON-NLS-1$
+ case TokenNamepublic :
+ return "public"; //$NON-NLS-1$
case TokenNamerequire :
return "require"; //$NON-NLS-1$
case TokenNamerequire_once :
return "switch"; //$NON-NLS-1$
case TokenNametrue :
return "true"; //$NON-NLS-1$
+ case TokenNameunset :
+ return "unset"; //$NON-NLS-1$
case TokenNamevar :
return "var"; //$NON-NLS-1$
case TokenNamewhile :
import net.sourceforge.phpdt.internal.compiler.problem.AbortCompilation;
import net.sourceforge.phpdt.internal.compiler.problem.ProblemReporter;
import net.sourceforge.phpdt.internal.compiler.util.Util;
-import net.sourceforge.phpdt.internal.core.BasicCompilationUnit;
import net.sourceforge.phpeclipse.internal.compiler.ast.CompilationUnitDeclaration;
import net.sourceforge.phpeclipse.internal.compiler.ast.ConstructorDeclaration;
import net.sourceforge.phpeclipse.internal.compiler.ast.FieldDeclaration;
// storeProblemsFor(((BasicCompilationUnit)sourceUnit).getResource(), compilationResult.getAllProblems());
// }
// // jsurfer end
- } catch (CoreException e) {
- e.printStackTrace();
+
} finally {
unit = compilationUnit;
compilationUnit = null; // reset parser
parse();
} catch (AbortCompilation ex) {
lastAct = ERROR_ACTION;
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+
} finally {
nestedMethod[nestedType]--;
}
parse();
} catch (AbortCompilation ex) {
lastAct = ERROR_ACTION;
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
} finally {
nestedMethod[nestedType]--;
}
parse();
} catch (AbortCompilation ex) {
lastAct = ERROR_ACTION;
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
} finally {
nestedMethod[nestedType]--;
}
parse();
} catch (AbortCompilation ex) {
lastAct = ERROR_ACTION;
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
} finally {
nestedMethod[nestedType]--;
}
compilationUnit = new CompilationUnitDeclaration(problemReporter, compilationResult, scanner.source.length);
/* run automaton */
parse();
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
} catch (SyntaxError syntaxError) {
//
} finally {
<phpsyntax function="deg2rad"></phpsyntax>
<phpsyntax function="delete_iovec"></phpsyntax>
<phpsyntax function="dgettext"></phpsyntax>
+ <phpsyntax function="die"></phpsyntax>
<phpsyntax function="dir" usage="class dir(string directory)">
Directory class with properties, handle and class and methods read, rewind and close.
</phpsyntax>
<phpsyntax keyword="break" tokenval="1012"></phpsyntax>
<phpsyntax keyword="continue" tokenval="1013"></phpsyntax>
<phpsyntax keyword="return" tokenval="1014"></phpsyntax>
- <phpsyntax keyword="define" tokenval="1015"></phpsyntax>
+
<phpsyntax keyword="include" tokenval="1016"></phpsyntax>
<phpsyntax keyword="include_once" tokenval="1017"></phpsyntax>
<phpsyntax keyword="require" tokenval="1018"></phpsyntax>
<phpsyntax keyword="print" tokenval="1036"></phpsyntax>
<phpsyntax keyword="unset" tokenval="1037"></phpsyntax>
<phpsyntax keyword="exit" tokenval="1038"></phpsyntax>
- <phpsyntax keyword="die" tokenval="1039"></phpsyntax>
+
<phpsyntax keyword="and" tokenval="1040"></phpsyntax>
<phpsyntax keyword="or" tokenval="1041"></phpsyntax>
<phpsyntax keyword="xor" tokenval="1042"></phpsyntax>
<phpsyntax keyword="null" tokenval="1044"></phpsyntax>
<phpsyntax keyword="false" tokenval="1045"></phpsyntax>
<phpsyntax keyword="true" tokenval="1046"></phpsyntax>
+
+ <phpsyntax keyword="abstract" tokenval="1050"></phpsyntax>
+ <phpsyntax keyword="catch" tokenval="1051"></phpsyntax>
+ <phpsyntax keyword="finally" tokenval="1052"></phpsyntax>
+ <phpsyntax keyword="try" tokenval="1053"></phpsyntax>
+ <phpsyntax keyword="private" tokenval="1054"></phpsyntax>
+ <phpsyntax keyword="protected" tokenval="1055"></phpsyntax>
+ <phpsyntax keyword="public" tokenval="1056"></phpsyntax>
+ <phpsyntax keyword="interface" tokenval="1057"></phpsyntax>
+ <phpsyntax keyword="implements" tokenval="1058"></phpsyntax>
+ <phpsyntax keyword="instanceof" tokenval="1059"></phpsyntax>
+ <phpsyntax keyword="super" tokenval="1060"></phpsyntax>
+ <phpsyntax keyword="throw" tokenval="1061"></phpsyntax>
+
+ <phpsyntax keyword="const" tokenval="1063"></phpsyntax>
+ <phpsyntax keyword="declare" tokenval="1064"></phpsyntax>
+ <phpsyntax keyword="enddeclare" tokenval="1065"></phpsyntax>
+ <phpsyntax keyword="eval" tokenval="1065"></phpsyntax>
+ <phpsyntax keyword="use" tokenval="1066"></phpsyntax>
+ <phpsyntax keyword="isset" tokenval="1066"></phpsyntax>
+ <phpsyntax keyword="final" tokenval="1067"></phpsyntax>
=========================================================
*Below this are the various PHP-specific variable types *
=========================================================