From 83e04a4c8e413d9777f4ea8516d607974ed55621 Mon Sep 17 00:00:00 2001 From: kpouer Date: Thu, 22 May 2003 19:09:46 +0000 Subject: [PATCH] *** empty log message *** --- .../phpdt/internal/compiler/ast/ClassAccess.java | 2 +- .../internal/compiler/ast/ClassDeclaration.java | 19 +- .../phpdt/internal/compiler/ast/EchoStatement.java | 2 +- .../internal/compiler/ast/FieldDeclaration.java | 4 +- .../phpdt/internal/compiler/ast/FunctionCall.java | 12 +- .../phpdt/internal/compiler/ast/HTMLCode.java | 2 +- .../internal/compiler/ast/ListExpression.java | 4 +- .../internal/compiler/ast/MethodDeclaration.java | 5 +- .../phpdt/internal/compiler/ast/PHPDocument.java | 12 +- .../phpdt/internal/compiler/ast/StringLiteral.java | 10 +- .../internal/compiler/ast/VariableDeclaration.java | 4 +- net.sourceforge.phpeclipse/src/test/PHPParser.java | 637 +++++++++----------- net.sourceforge.phpeclipse/src/test/PHPParser.jj | 78 +-- 13 files changed, 362 insertions(+), 429 deletions(-) diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassAccess.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassAccess.java index 59b2c23..b46e802 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassAccess.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassAccess.java @@ -36,7 +36,7 @@ public class ClassAccess extends AbstractSuffixExpression { */ public String toStringExpression() { final StringBuffer buff = new StringBuffer(); - buff.append(prefix); + buff.append(prefix.toStringExpression()); buff.append(toStringOperator()); buff.append(suffix.toStringExpression()); return buff.toString(); diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassDeclaration.java index 25fc716..bbc9775 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassDeclaration.java @@ -3,6 +3,7 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.parser.Outlineable; import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren; import net.sourceforge.phpdt.internal.ui.PHPUiImages; +import net.sourceforge.phpeclipse.PHPeclipsePlugin; import org.eclipse.jface.resource.ImageDescriptor; import java.util.ArrayList; @@ -27,7 +28,7 @@ public class ClassDeclaration extends Statement implements OutlineableWithChildr public int bodyStart; public int bodyEnd; /** The methods of the class. */ - private ArrayList methods = new ArrayList(); + private final ArrayList methods = new ArrayList(); /** The constructor of the class. */ public MethodDeclaration constructor; /** The fields of the class. */ @@ -53,7 +54,7 @@ public class ClassDeclaration extends Statement implements OutlineableWithChildr this.superclass = superclass; } - /** + /** * Create a class giving starting and ending offset * @param sourceStart starting offset * @param sourceEnd ending offset @@ -68,7 +69,7 @@ public class ClassDeclaration extends Statement implements OutlineableWithChildr } public void addMethod(MethodDeclaration method) { - method.add(method); + methods.add(method); children.add(method); if (method.name.equals(name)) { constructor = method; @@ -115,12 +116,10 @@ public class ClassDeclaration extends Statement implements OutlineableWithChildr buff.append(";");//$NON-NLS-1$ } } - if (methods != null) { - for (int i = 0; i < methods.size(); i++) { - MethodDeclaration o = (MethodDeclaration) methods.get(i); - buff.append("\n");//$NON-NLS-1$ - buff.append(o.toString(tab + 1)); - } + for (int i = 0; i < methods.size(); i++) { + MethodDeclaration o = (MethodDeclaration) methods.get(i); + buff.append("\n");//$NON-NLS-1$ + buff.append(o.toString(tab + 1)); } buff.append("\n").append(tabString(tab)).append("}"); //$NON-NLS-2$ //$NON-NLS-1$ return buff.toString(); @@ -131,7 +130,7 @@ public class ClassDeclaration extends Statement implements OutlineableWithChildr * @return the header of the class */ public String toStringHeader() { - final StringBuffer buff = new StringBuffer("class").append(name);//$NON-NLS-1$ + final StringBuffer buff = new StringBuffer("class ").append(name);//$NON-NLS-1$ if (superclass != null) { buff.append(" extends "); //$NON-NLS-1$ buff.append(superclass); diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/EchoStatement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/EchoStatement.java index 440556f..11f5ee0 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/EchoStatement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/EchoStatement.java @@ -19,7 +19,7 @@ public class EchoStatement extends Statement { if (i != 0) { buff.append(", "); } - buff.append(expressions[i].toString()); + buff.append(expressions[i].toStringExpression()); } return buff.toString(); } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FieldDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FieldDeclaration.java index 90218e1..c64ba6b 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FieldDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FieldDeclaration.java @@ -31,11 +31,11 @@ public class FieldDeclaration extends Statement { */ public String toString(int tab) { final StringBuffer buff = new StringBuffer(tabString(tab)); - buff.append("var "); + buff.append("var ");//$NON-NLS-1$ for (int i = 0; i < vars.length; i++) { VariableDeclaration var = vars[i]; if (i != 0) { - buff.append(','); + buff.append(',');//$NON-NLS-1$ } buff.append(var.toStringExpression()); } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FunctionCall.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FunctionCall.java index 4e127ca..c91788d 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FunctionCall.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FunctionCall.java @@ -23,12 +23,14 @@ public class FunctionCall extends AbstractSuffixExpression { public String toStringExpression() { final StringBuffer buff = new StringBuffer(prefix.toStringExpression()); buff.append('('); - for (int i = 0; i < args.length; i++) { - Expression arg = args[i]; - if (i != 0) { - buff.append(','); + if (args != null) { + for (int i = 0; i < args.length; i++) { + Expression arg = args[i]; + if (i != 0) { + buff.append(','); + } + buff.append(arg.toStringExpression()); } - buff.append(arg.toStringExpression()); } buff.append(')'); return buff.toString(); diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/HTMLCode.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/HTMLCode.java index e52d981..decd393 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/HTMLCode.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/HTMLCode.java @@ -36,6 +36,6 @@ public class HTMLCode extends AstNode { * @return the text of the block */ public String toString(int tab) { - return new String(htmlCode); + return new String(htmlCode)+" "; } } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ListExpression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ListExpression.java index 9b6ef8f..b176568 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ListExpression.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ListExpression.java @@ -1,6 +1,8 @@ package net.sourceforge.phpdt.internal.compiler.ast; /** + * A list expression. + * it could be list($v1,$v2), list(,$v2) ... * @author Matthieu Casanova */ public class ListExpression extends Expression { @@ -36,7 +38,7 @@ public class ListExpression extends Expression { buff.append(", "); } if (var != null) { - buff.append(vars); + buff.append(var); } } if (expression != null) { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/MethodDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/MethodDeclaration.java index 93097f0..af701a8 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/MethodDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/MethodDeclaration.java @@ -1,7 +1,6 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.ast.Block; -import net.sourceforge.phpdt.internal.compiler.ast.ArgumentDeclaration; import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren; import net.sourceforge.phpdt.internal.compiler.parser.Outlineable; import net.sourceforge.phpdt.internal.ui.PHPUiImages; @@ -63,8 +62,8 @@ public class MethodDeclaration extends Statement implements OutlineableWithChild Enumeration values = arguments.elements(); int i = 0; while (values.hasMoreElements()) { - ArgumentDeclaration o = (ArgumentDeclaration) values.nextElement(); - buff.append(o.toString(0)); + VariableDeclaration o = (VariableDeclaration) values.nextElement(); + buff.append(o.toStringExpression()); if (i != (arguments.size() - 1)) { buff.append(", "); //$NON-NLS-1$ } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/PHPDocument.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/PHPDocument.java index e3bc4c5..41200ae 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/PHPDocument.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/PHPDocument.java @@ -9,6 +9,7 @@ import java.util.ArrayList; /** * It's a php document. + * This class is an outlineable object * It will contains html and php * @author Matthieu Casanova */ @@ -20,7 +21,7 @@ public class PHPDocument implements OutlineableWithChildren { */ public AstNode[] nodes; - /** The parent of the object */ + /** The parent of the object. */ public Object parent; /** The outlineable children (those will be in the node array too. */ @@ -28,6 +29,7 @@ public class PHPDocument implements OutlineableWithChildren { /** * Create the PHPDocument. + * @param parent the parent object (it should be null isn't it ?) */ public PHPDocument(Object parent) { this.parent = parent; @@ -70,8 +72,8 @@ public class PHPDocument implements OutlineableWithChildren { } /** - * The number of outlineable children - * @return + * The number of outlineable children. + * @return the number of children that are outlineable */ public int size() { return children.size(); @@ -85,6 +87,10 @@ public class PHPDocument implements OutlineableWithChildren { return PHPUiImages.DESC_CLASS; } + /** + * Get the parent of the object. + * @return the parent of the object + */ public Object getParent() { return parent; } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/StringLiteral.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/StringLiteral.java index 1dbc794..aced1b6 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/StringLiteral.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/StringLiteral.java @@ -51,7 +51,7 @@ public class StringLiteral extends Literal { * Return the expression as String. * @return the expression */ - public String toStringExpression() { + /* public String toStringExpression() { // handle some special char..... StringBuffer result = new StringBuffer("\""); //$NON-NLS-1$ for (int i = 0; i < source.length; i++) { @@ -86,6 +86,14 @@ public class StringLiteral extends Literal { } result.append("\""); //$NON-NLS-1$ return result.toString(); + } */ + + /** + * Return the expression as String. + * @return the expression + */ + public String toStringExpression() { + return new String(source); } /** diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/VariableDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/VariableDeclaration.java index 46340d1..2839776 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/VariableDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/VariableDeclaration.java @@ -80,9 +80,9 @@ public class VariableDeclaration extends AbstractVariableDeclaration implements public String toStringExpression() { final StringBuffer buff; if (reference) { - buff = new StringBuffer('&'); + buff = new StringBuffer("&$"); //$NON-NLS-1$ } else { - buff = new StringBuffer(); + buff = new StringBuffer('$');//$NON-NLS-1$ } buff.append(name); if (initialization != null) { diff --git a/net.sourceforge.phpeclipse/src/test/PHPParser.java b/net.sourceforge.phpeclipse/src/test/PHPParser.java index 92e8360..1573506 100644 --- a/net.sourceforge.phpeclipse/src/test/PHPParser.java +++ b/net.sourceforge.phpeclipse/src/test/PHPParser.java @@ -101,41 +101,6 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon } } - public static final void phpParserTester(final String strEval) throws CoreException, ParseException { - PHPParserTokenManager.SwitchTo(PHPParserTokenManager.PHPPARSING); - final StringReader stream = new StringReader(strEval); - if (jj_input_stream == null) { - jj_input_stream = new SimpleCharStream(stream, 1, 1); - } - ReInit(new StringReader(strEval)); - init(); - phpTest(); - } - - public static final void htmlParserTester(final File fileName) throws CoreException, ParseException { - try { - final Reader stream = new FileReader(fileName); - if (jj_input_stream == null) { - jj_input_stream = new SimpleCharStream(stream, 1, 1); - } - ReInit(stream); - init(); - phpFile(); - } catch (FileNotFoundException e) { - e.printStackTrace(); //To change body of catch statement use Options | File Templates. - } - } - - public static final void htmlParserTester(final String strEval) throws CoreException, ParseException { - final StringReader stream = new StringReader(strEval); - if (jj_input_stream == null) { - jj_input_stream = new SimpleCharStream(stream, 1, 1); - } - ReInit(stream); - init(); - phpFile(); - } - public final PHPOutlineInfo parseInfo(final Object parent, final String s) { currentSegment = new PHPDocument(parent); outlineInfo = new PHPOutlineInfo(parent); @@ -148,7 +113,8 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon try { parse(); phpDocument = new PHPDocument(null); - phpDocument.nodes = nodes; + phpDocument.nodes = new AstNode[nodes.length]; + System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length); PHPeclipsePlugin.log(1,phpDocument.toString()); } catch (ParseException e) { processParseException(e); @@ -310,7 +276,7 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon if (currentPosition == htmlStart) { return; } - final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition).toCharArray(); + final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition+1).toCharArray(); pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition)); } @@ -318,12 +284,6 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon phpFile(); } - static final public void phpTest() throws ParseException { - Php(); - jj_consume_token(0); - PHPParser.createNewHTMLCode(); - } - static final public void phpFile() throws ParseException { try { label_1: @@ -633,8 +593,8 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image + "', '{' expected"; errorLevel = ERROR; - errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; - errorEnd = jj_input_stream.getPosition() + 1; + errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = SimpleCharStream.getPosition() + 1; {if (true) throw e;} } label_3: @@ -655,8 +615,8 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', 'var', 'function' or '}' expected"; errorLevel = ERROR; - errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; - errorEnd = jj_input_stream.getPosition() + 1; + errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = SimpleCharStream.getPosition() + 1; {if (true) throw e;} } } @@ -717,8 +677,8 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration"; errorLevel = ERROR; - errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; - errorEnd = jj_input_stream.getPosition() + 1; + errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = SimpleCharStream.getPosition() + 1; {if (true) throw e;} } list = new VariableDeclaration[arrayList.size()]; @@ -1049,9 +1009,8 @@ Expression expr,expr2; */ static final public MethodDeclaration MethodDeclaration() throws ParseException { final MethodDeclaration functionDeclaration; - Token functionToken; final Block block; - functionToken = jj_consume_token(FUNCTION); + jj_consume_token(FUNCTION); try { functionDeclaration = MethodDeclarator(); outlineInfo.addVariable(new String(functionDeclaration.name)); @@ -1191,55 +1150,55 @@ Expression expr,expr2; jj_consume_token(STRING); pos = SimpleCharStream.getPosition(); {if (true) return new ConstantIdentifier(Types.STRING, - pos,pos-6);} + pos,pos-6);} break; case BOOL: jj_consume_token(BOOL); pos = SimpleCharStream.getPosition(); {if (true) return new ConstantIdentifier(Types.BOOL, - pos,pos-4);} + pos,pos-4);} break; case BOOLEAN: jj_consume_token(BOOLEAN); pos = SimpleCharStream.getPosition(); {if (true) return new ConstantIdentifier(Types.BOOLEAN, - pos,pos-7);} + pos,pos-7);} break; case REAL: jj_consume_token(REAL); pos = SimpleCharStream.getPosition(); {if (true) return new ConstantIdentifier(Types.REAL, - pos,pos-4);} + pos,pos-4);} break; case DOUBLE: jj_consume_token(DOUBLE); pos = SimpleCharStream.getPosition(); {if (true) return new ConstantIdentifier(Types.DOUBLE, - pos,pos-5);} + pos,pos-5);} break; case FLOAT: jj_consume_token(FLOAT); pos = SimpleCharStream.getPosition(); {if (true) return new ConstantIdentifier(Types.FLOAT, - pos,pos-5);} + pos,pos-5);} break; case INT: jj_consume_token(INT); pos = SimpleCharStream.getPosition(); {if (true) return new ConstantIdentifier(Types.INT, - pos,pos-3);} + pos,pos-3);} break; case INTEGER: jj_consume_token(INTEGER); pos = SimpleCharStream.getPosition(); {if (true) return new ConstantIdentifier(Types.INTEGER, - pos,pos-7);} + pos,pos-7);} break; case OBJECT: jj_consume_token(OBJECT); pos = SimpleCharStream.getPosition(); {if (true) return new ConstantIdentifier(Types.OBJECT, - pos,pos-6);} + pos,pos-6);} break; default: jj_la1[25] = jj_gen; @@ -5053,6 +5012,240 @@ final int startBlock, endBlock; return retval; } + static final private boolean jj_3R_82() { + if (jj_scan_token(INTEGER)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_44() { + if (jj_scan_token(ARRAY)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_184() { + if (jj_scan_token(ARRAY)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_81() { + if (jj_scan_token(INT)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_183() { + if (jj_3R_52()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_80() { + if (jj_scan_token(FLOAT)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_85() { + if (jj_scan_token(LIST)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(LPAREN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_99()) jj_scanpos = xsp; + else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + while (true) { + xsp = jj_scanpos; + if (jj_3R_100()) { jj_scanpos = xsp; break; } + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } + if (jj_scan_token(RPAREN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + xsp = jj_scanpos; + if (jj_3R_101()) jj_scanpos = xsp; + else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_167() { + if (jj_scan_token(LPAREN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_183()) { + jj_scanpos = xsp; + if (jj_3R_184()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(RPAREN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_139()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_79() { + if (jj_scan_token(DOUBLE)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_43() { + if (jj_3R_52()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_78() { + if (jj_scan_token(REAL)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_77() { + if (jj_scan_token(BOOLEAN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_84() { + if (jj_scan_token(PRINT)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_45()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_76() { + if (jj_scan_token(BOOL)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3_4() { + if (jj_scan_token(LPAREN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_43()) { + jj_scanpos = xsp; + if (jj_3R_44()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(RPAREN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_75() { + if (jj_scan_token(STRING)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_52() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_75()) { + jj_scanpos = xsp; + if (jj_3R_76()) { + jj_scanpos = xsp; + if (jj_3R_77()) { + jj_scanpos = xsp; + if (jj_3R_78()) { + jj_scanpos = xsp; + if (jj_3R_79()) { + jj_scanpos = xsp; + if (jj_3R_80()) { + jj_scanpos = xsp; + if (jj_3R_81()) { + jj_scanpos = xsp; + if (jj_3R_82()) { + jj_scanpos = xsp; + if (jj_3R_83()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_165() { + if (jj_scan_token(LPAREN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_45()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(RPAREN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_164() { + if (jj_3R_169()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_163() { + if (jj_3R_168()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_162() { + if (jj_3R_167()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_158() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_161()) { + jj_scanpos = xsp; + if (jj_3R_162()) { + jj_scanpos = xsp; + if (jj_3R_163()) { + jj_scanpos = xsp; + if (jj_3R_164()) { + jj_scanpos = xsp; + if (jj_3R_165()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_161() { + if (jj_scan_token(BANG)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_139()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_160() { + if (jj_scan_token(DECR)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + static final private boolean jj_3R_159() { + if (jj_scan_token(INCR)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + static final private boolean jj_3R_157() { Token xsp; xsp = jj_scanpos; @@ -5278,16 +5471,6 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_57() { - if (jj_3R_50()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_87()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - static final private boolean jj_3R_197() { if (jj_3R_41()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5300,6 +5483,16 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3R_57() { + if (jj_3R_50()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_87()) jj_scanpos = xsp; + else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + static final private boolean jj_3R_138() { if (jj_scan_token(RUNSIGNEDSHIFT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5407,17 +5600,27 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3R_201() { + if (jj_scan_token(ARRAYASSIGN)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_45()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + static final private boolean jj_3R_130() { if (jj_scan_token(LT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3R_201() { - if (jj_scan_token(ARRAYASSIGN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + static final private boolean jj_3R_41() { if (jj_3R_45()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_201()) jj_scanpos = xsp; + else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -5440,16 +5643,6 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_41() { - if (jj_3R_45()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_201()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - static final private boolean jj_3R_119() { if (jj_3R_121()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5558,6 +5751,16 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3R_108() { + if (jj_scan_token(LBRACE)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_45()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(RBRACE)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + static final private boolean jj_3R_199() { if (jj_scan_token(LPAREN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5570,16 +5773,6 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_108() { - if (jj_scan_token(LBRACE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_45()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(RBRACE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - static final private boolean jj_3R_91() { if (jj_scan_token(DOLLAR_ID)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5673,14 +5866,6 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_116() { - if (jj_scan_token(XOR)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_115()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - static final private boolean jj_3R_89() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5691,6 +5876,14 @@ final int startBlock, endBlock; return false; } + static final private boolean jj_3R_116() { + if (jj_scan_token(XOR)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_115()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + static final private boolean jj_3R_113() { if (jj_3R_115()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; @@ -5943,14 +6136,14 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_187() { - if (jj_3R_50()) return true; + static final private boolean jj_3_1() { + if (jj_3R_40()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } - static final private boolean jj_3_1() { - if (jj_3R_40()) return true; + static final private boolean jj_3R_187() { + if (jj_3R_50()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } @@ -6373,240 +6566,6 @@ final int startBlock, endBlock; return false; } - static final private boolean jj_3R_82() { - if (jj_scan_token(INTEGER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_44() { - if (jj_scan_token(ARRAY)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_184() { - if (jj_scan_token(ARRAY)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_81() { - if (jj_scan_token(INT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_183() { - if (jj_3R_52()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_80() { - if (jj_scan_token(FLOAT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_85() { - if (jj_scan_token(LIST)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(LPAREN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_99()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - while (true) { - xsp = jj_scanpos; - if (jj_3R_100()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } - if (jj_scan_token(RPAREN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - xsp = jj_scanpos; - if (jj_3R_101()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_167() { - if (jj_scan_token(LPAREN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_183()) { - jj_scanpos = xsp; - if (jj_3R_184()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(RPAREN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_139()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_79() { - if (jj_scan_token(DOUBLE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_43() { - if (jj_3R_52()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_78() { - if (jj_scan_token(REAL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_77() { - if (jj_scan_token(BOOLEAN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_84() { - if (jj_scan_token(PRINT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_45()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_76() { - if (jj_scan_token(BOOL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3_4() { - if (jj_scan_token(LPAREN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_43()) { - jj_scanpos = xsp; - if (jj_3R_44()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(RPAREN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_75() { - if (jj_scan_token(STRING)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_52() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_75()) { - jj_scanpos = xsp; - if (jj_3R_76()) { - jj_scanpos = xsp; - if (jj_3R_77()) { - jj_scanpos = xsp; - if (jj_3R_78()) { - jj_scanpos = xsp; - if (jj_3R_79()) { - jj_scanpos = xsp; - if (jj_3R_80()) { - jj_scanpos = xsp; - if (jj_3R_81()) { - jj_scanpos = xsp; - if (jj_3R_82()) { - jj_scanpos = xsp; - if (jj_3R_83()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_165() { - if (jj_scan_token(LPAREN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_45()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_scan_token(RPAREN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_164() { - if (jj_3R_169()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_163() { - if (jj_3R_168()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_162() { - if (jj_3R_167()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_158() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_161()) { - jj_scanpos = xsp; - if (jj_3R_162()) { - jj_scanpos = xsp; - if (jj_3R_163()) { - jj_scanpos = xsp; - if (jj_3R_164()) { - jj_scanpos = xsp; - if (jj_3R_165()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_161() { - if (jj_scan_token(BANG)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_139()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_160() { - if (jj_scan_token(DECR)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - static final private boolean jj_3R_159() { - if (jj_scan_token(INCR)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - static private boolean jj_initialized_once = false; static public PHPParserTokenManager token_source; static SimpleCharStream jj_input_stream; diff --git a/net.sourceforge.phpeclipse/src/test/PHPParser.jj b/net.sourceforge.phpeclipse/src/test/PHPParser.jj index 0d76a4c..438fa59 100644 --- a/net.sourceforge.phpeclipse/src/test/PHPParser.jj +++ b/net.sourceforge.phpeclipse/src/test/PHPParser.jj @@ -122,41 +122,6 @@ public final class PHPParser extends PHPParserSuperclass { } } - public static final void phpParserTester(final String strEval) throws CoreException, ParseException { - PHPParserTokenManager.SwitchTo(PHPParserTokenManager.PHPPARSING); - final StringReader stream = new StringReader(strEval); - if (jj_input_stream == null) { - jj_input_stream = new SimpleCharStream(stream, 1, 1); - } - ReInit(new StringReader(strEval)); - init(); - phpTest(); - } - - public static final void htmlParserTester(final File fileName) throws CoreException, ParseException { - try { - final Reader stream = new FileReader(fileName); - if (jj_input_stream == null) { - jj_input_stream = new SimpleCharStream(stream, 1, 1); - } - ReInit(stream); - init(); - phpFile(); - } catch (FileNotFoundException e) { - e.printStackTrace(); //To change body of catch statement use Options | File Templates. - } - } - - public static final void htmlParserTester(final String strEval) throws CoreException, ParseException { - final StringReader stream = new StringReader(strEval); - if (jj_input_stream == null) { - jj_input_stream = new SimpleCharStream(stream, 1, 1); - } - ReInit(stream); - init(); - phpFile(); - } - public final PHPOutlineInfo parseInfo(final Object parent, final String s) { currentSegment = new PHPDocument(parent); outlineInfo = new PHPOutlineInfo(parent); @@ -169,7 +134,8 @@ public final class PHPParser extends PHPParserSuperclass { try { parse(); phpDocument = new PHPDocument(null); - phpDocument.nodes = nodes; + phpDocument.nodes = new AstNode[nodes.length]; + System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length); PHPeclipsePlugin.log(1,phpDocument.toString()); } catch (ParseException e) { processParseException(e); @@ -331,7 +297,7 @@ public final class PHPParser extends PHPParserSuperclass { if (currentPosition == htmlStart) { return; } - final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition).toCharArray(); + final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition+1).toCharArray(); pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition)); } @@ -642,14 +608,6 @@ MORE : < DOLLAR_ID: > } -void phpTest() : -{} -{ - Php() - - {PHPParser.createNewHTMLCode();} -} - void phpFile() : {} { @@ -785,8 +743,8 @@ void ClassBody(ClassDeclaration classDeclaration) : } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image + "', '{' expected"; errorLevel = ERROR; - errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; - errorEnd = jj_input_stream.getPosition() + 1; + errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = SimpleCharStream.getPosition() + 1; throw e; } ( ClassBodyDeclaration(classDeclaration) )* @@ -795,8 +753,8 @@ void ClassBody(ClassDeclaration classDeclaration) : } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', 'var', 'function' or '}' expected"; errorLevel = ERROR; - errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; - errorEnd = jj_input_stream.getPosition() + 1; + errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = SimpleCharStream.getPosition() + 1; throw e; } } @@ -839,8 +797,8 @@ FieldDeclaration FieldDeclaration() : } catch (ParseException e) { errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. A ';' was expected after variable declaration"; errorLevel = ERROR; - errorStart = jj_input_stream.getPosition() - e.currentToken.next.image.length() + 1; - errorEnd = jj_input_stream.getPosition() + 1; + errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1; + errorEnd = SimpleCharStream.getPosition() + 1; throw e; } @@ -1164,31 +1122,31 @@ ConstantIdentifier Type() : { {pos = SimpleCharStream.getPosition(); return new ConstantIdentifier(Types.STRING, - pos,pos-6);} + pos,pos-6);} | {pos = SimpleCharStream.getPosition(); return new ConstantIdentifier(Types.BOOL, - pos,pos-4);} + pos,pos-4);} | {pos = SimpleCharStream.getPosition(); return new ConstantIdentifier(Types.BOOLEAN, - pos,pos-7);} + pos,pos-7);} | {pos = SimpleCharStream.getPosition(); return new ConstantIdentifier(Types.REAL, - pos,pos-4);} + pos,pos-4);} | {pos = SimpleCharStream.getPosition(); return new ConstantIdentifier(Types.DOUBLE, - pos,pos-5);} + pos,pos-5);} | {pos = SimpleCharStream.getPosition(); return new ConstantIdentifier(Types.FLOAT, - pos,pos-5);} + pos,pos-5);} | {pos = SimpleCharStream.getPosition(); return new ConstantIdentifier(Types.INT, - pos,pos-3);} + pos,pos-3);} | {pos = SimpleCharStream.getPosition(); return new ConstantIdentifier(Types.INTEGER, - pos,pos-7);} + pos,pos-7);} | {pos = SimpleCharStream.getPosition(); return new ConstantIdentifier(Types.OBJECT, - pos,pos-6);} + pos,pos-6);} } Expression Expression() : -- 1.7.1