X-Git-Url: http://git.phpeclipse.com
diff --git a/net.sourceforge.phpeclipse/src/test/PHPParser.jj b/net.sourceforge.phpeclipse/src/test/PHPParser.jj
index a28acb9..daf63e2 100644
--- a/net.sourceforge.phpeclipse/src/test/PHPParser.jj
+++ b/net.sourceforge.phpeclipse/src/test/PHPParser.jj
@@ -29,7 +29,6 @@ import org.eclipse.ui.texteditor.MarkerUtilities;
import org.eclipse.jface.preference.IPreferenceStore;
import java.util.Hashtable;
-import java.util.Enumeration;
import java.util.ArrayList;
import java.io.StringReader;
import java.io.*;
@@ -39,6 +38,7 @@ import net.sourceforge.phpeclipse.actions.PHPStartApacheAction;
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
import net.sourceforge.phpdt.internal.compiler.ast.*;
import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
+import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
/**
@@ -50,9 +50,6 @@ import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
*/
public final class PHPParser extends PHPParserSuperclass {
- /** The file that is parsed. */
- private static IFile fileToParse;
-
/** The current segment. */
private static OutlineableWithChildren currentSegment;
@@ -60,8 +57,6 @@ public final class PHPParser extends PHPParserSuperclass {
private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
static PHPOutlineInfo outlineInfo;
- private static boolean assigning;
-
/** The error level of the current ParseException. */
private static int errorLevel = ERROR;
/** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
@@ -70,6 +65,8 @@ public final class PHPParser extends PHPParserSuperclass {
private static int errorStart = -1;
private static int errorEnd = -1;
private static PHPDocument phpDocument;
+
+ private static final char[] SYNTAX_ERROR_CHAR = {'s','y','n','t','a','x',' ','e','r','r','o','r'};
/**
* The point where html starts.
* It will be used by the token manager to create HTMLCode objects
@@ -83,8 +80,10 @@ public final class PHPParser extends PHPParserSuperclass {
/** The cursor in expression stack. */
private static int nodePtr;
+ private static final boolean PARSER_DEBUG = false;
+
public final void setFileToParse(final IFile fileToParse) {
- this.fileToParse = fileToParse;
+ PHPParser.fileToParse = fileToParse;
}
public PHPParser() {
@@ -92,7 +91,7 @@ public final class PHPParser extends PHPParserSuperclass {
public PHPParser(final IFile fileToParse) {
this(new StringReader(""));
- this.fileToParse = fileToParse;
+ PHPParser.fileToParse = fileToParse;
}
/**
@@ -108,12 +107,12 @@ public final class PHPParser extends PHPParserSuperclass {
* Add an php node on the stack.
* @param node the node that will be added to the stack
*/
- private static final void pushOnAstNodes(AstNode node) {
+ private static final void pushOnAstNodes(final AstNode node) {
try {
nodes[++nodePtr] = node;
} catch (IndexOutOfBoundsException e) {
- int oldStackLength = nodes.length;
- AstNode[] oldStack = nodes;
+ final int oldStackLength = nodes.length;
+ final AstNode[] oldStack = nodes;
nodes = new AstNode[oldStackLength + AstStackIncrement];
System.arraycopy(oldStack, 0, nodes, 0, oldStackLength);
nodePtr = oldStackLength;
@@ -135,7 +134,9 @@ public final class PHPParser extends PHPParserSuperclass {
parse();
phpDocument.nodes = new AstNode[nodes.length];
System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
- PHPeclipsePlugin.log(1,phpDocument.toString());
+ if (PHPeclipsePlugin.DEBUG) {
+ PHPeclipsePlugin.log(1,phpDocument.toString());
+ }
} catch (ParseException e) {
processParseException(e);
}
@@ -148,6 +149,10 @@ public final class PHPParser extends PHPParserSuperclass {
* @param e the ParseException
*/
private static void processParseException(final ParseException e) {
+ if (PARSER_DEBUG) {
+ e.printStackTrace();
+ return;
+ }
if (errorMessage == null) {
PHPeclipsePlugin.log(e);
errorMessage = "this exception wasn't handled by the parser please tell us how to reproduce it";
@@ -156,10 +161,11 @@ public final class PHPParser extends PHPParserSuperclass {
}
setMarker(e);
errorMessage = null;
+ // if (PHPeclipsePlugin.DEBUG) PHPeclipsePlugin.log(e);
}
/**
- * Create marker for the parse error
+ * Create marker for the parse error.
* @param e the ParseException
*/
private static void setMarker(final ParseException e) {
@@ -186,42 +192,17 @@ public final class PHPParser extends PHPParserSuperclass {
}
}
- /**
- * Create markers according to the external parser output
- */
- private static void createMarkers(final String output, final IFile file) throws CoreException {
- // delete all markers
- file.deleteMarkers(IMarker.PROBLEM, false, 0);
-
- int indx = 0;
- int brIndx;
- boolean flag = true;
- while ((brIndx = output.indexOf("
", indx)) != -1) {
- // newer php error output (tested with 4.2.3)
- scanLine(output, file, indx, brIndx);
- indx = brIndx + 6;
- flag = false;
- }
- if (flag) {
- while ((brIndx = output.indexOf("
", indx)) != -1) {
- // older php error output (tested with 4.2.3)
- scanLine(output, file, indx, brIndx);
- indx = brIndx + 4;
- }
- }
- }
-
private static void scanLine(final String output,
final IFile file,
final int indx,
final int brIndx) throws CoreException {
String current;
- StringBuffer lineNumberBuffer = new StringBuffer(10);
+ final StringBuffer lineNumberBuffer = new StringBuffer(10);
char ch;
current = output.substring(indx, brIndx);
if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
- int onLine = current.indexOf("on line ");
+ final int onLine = current.indexOf("on line ");
if (onLine != -1) {
lineNumberBuffer.delete(0, lineNumberBuffer.length());
for (int i = onLine; i < current.length(); i++) {
@@ -231,9 +212,9 @@ public final class PHPParser extends PHPParserSuperclass {
}
}
- int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
+ final int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
- Hashtable attributes = new Hashtable();
+ final Hashtable attributes = new Hashtable();
current = current.replaceAll("\n", "");
current = current.replaceAll("", "");
@@ -293,13 +274,31 @@ public final class PHPParser extends PHPParserSuperclass {
*/
public static final void createNewHTMLCode() {
final int currentPosition = SimpleCharStream.getPosition();
- if (currentPosition == htmlStart) {
+ if (currentPosition == htmlStart || currentPosition > SimpleCharStream.currentBuffer.length()) {
return;
}
final char[] chars = SimpleCharStream.currentBuffer.substring(htmlStart,currentPosition+1).toCharArray();
pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
}
+ /** Create a new task. */
+ public static final void createNewTask() {
+ final int currentPosition = SimpleCharStream.getPosition();
+ final String todo = SimpleCharStream.currentBuffer.substring(currentPosition-3,
+ SimpleCharStream.currentBuffer.indexOf("\n",
+ currentPosition)-1);
+ PHPeclipsePlugin.log(1,SimpleCharStream.currentBuffer.toString());
+ try {
+ setMarker(fileToParse,
+ todo,
+ SimpleCharStream.getBeginLine(),
+ TASK,
+ "Line "+SimpleCharStream.getBeginLine());
+ } catch (CoreException e) {
+ PHPeclipsePlugin.log(e);
+ }
+ }
+
private static final void parse() throws ParseException {
phpFile();
}
@@ -340,34 +339,30 @@ PARSER_END(PHPParser)
SPECIAL_TOKEN :
{
"//" : IN_SINGLE_LINE_COMMENT
-|
- "#" : IN_SINGLE_LINE_COMMENT
-|
- <"/**" ~["/"]> { input_stream.backup(1); } : IN_FORMAL_COMMENT
-|
- "/*" : IN_MULTI_LINE_COMMENT
+| "#" : IN_SINGLE_LINE_COMMENT
+| <"/**" ~["/"]> { input_stream.backup(1); } : IN_FORMAL_COMMENT
+| "/*" : IN_MULTI_LINE_COMMENT
}
SPECIAL_TOKEN :
{
: PHPPARSING
+| "?>" : DEFAULT
}
- SPECIAL_TOKEN :
+ SPECIAL_TOKEN :
{
- " > : DEFAULT
+ "todo" {PHPParser.createNewTask();}
}
-
-SPECIAL_TOKEN :
+ SPECIAL_TOKEN :
{
- : PHPPARSING
+ "*/" : PHPPARSING
}
-
-SPECIAL_TOKEN :
+ SPECIAL_TOKEN :
{
- : PHPPARSING
+ "*/" : PHPPARSING
}
@@ -400,6 +395,7 @@ MORE :
|
|
|
+|
|
| ">
|
@@ -465,8 +461,8 @@ MORE :
{
|
-|
-|
+|
+|
|
|
|
@@ -507,39 +503,16 @@ MORE :
<#EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+ >
|
| | )>
-|
-|
-|
+|
+|
+|
}
/* IDENTIFIERS */
TOKEN :
{
- < IDENTIFIER: (|) (||)* >
+ |) (||)* >
|
< #LETTER:
["a"-"z"] | ["A"-"Z"]
@@ -604,7 +577,7 @@ MORE :
TOKEN :
{
- < DOLLAR_ID: >
+ >
}
void phpFile() :
@@ -612,7 +585,7 @@ void phpFile() :
{
try {
(PhpBlock())*
-
+ {PHPParser.createNewHTMLCode();}
} catch (TokenMgrError e) {
PHPeclipsePlugin.log(e);
errorStart = SimpleCharStream.getPosition();
@@ -631,9 +604,11 @@ void phpFile() :
void PhpBlock() :
{
final int start = SimpleCharStream.getPosition();
+ final PHPEchoBlock phpEchoBlock;
}
{
- phpEchoBlock()
+ phpEchoBlock = phpEchoBlock()
+ {pushOnAstNodes(phpEchoBlock);}
|
[
|
@@ -656,7 +631,7 @@ void PhpBlock() :
errorLevel = ERROR;
errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
errorEnd = SimpleCharStream.getPosition() + 1;
- throw e;
+ processParseException(e);
}
}
@@ -664,7 +639,7 @@ PHPEchoBlock phpEchoBlock() :
{
final Expression expr;
final int pos = SimpleCharStream.getPosition();
- PHPEchoBlock echoBlock;
+ final PHPEchoBlock echoBlock;
}
{
expr = Expression() [ ]
@@ -683,44 +658,48 @@ void Php() :
ClassDeclaration ClassDeclaration() :
{
final ClassDeclaration classDeclaration;
- final Token className;
- Token superclassName = null;
+ final Token className,superclassName;
final int pos;
+ char[] classNameImage = SYNTAX_ERROR_CHAR;
+ char[] superclassNameImage = null;
}
{
+ {pos = SimpleCharStream.getPosition();}
try {
- {pos = SimpleCharStream.getPosition();}
className =
+ {classNameImage = className.image.toCharArray();}
} catch (ParseException e) {
errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
errorLevel = ERROR;
errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
errorEnd = SimpleCharStream.getPosition() + 1;
- throw e;
+ processParseException(e);
}
[
try {
superclassName =
+ {superclassNameImage = superclassName.image.toCharArray();}
} catch (ParseException e) {
errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
errorLevel = ERROR;
errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
errorEnd = SimpleCharStream.getPosition() + 1;
- throw e;
+ processParseException(e);
+ superclassNameImage = SYNTAX_ERROR_CHAR;
}
]
{
- if (superclassName == null) {
+ if (superclassNameImage == null) {
classDeclaration = new ClassDeclaration(currentSegment,
- className.image.toCharArray(),
+ classNameImage,
pos,
0);
} else {
classDeclaration = new ClassDeclaration(currentSegment,
- className.image.toCharArray(),
- superclassName.image.toCharArray(),
+ classNameImage,
+ superclassNameImage,
pos,
0);
}
@@ -734,62 +713,63 @@ ClassDeclaration ClassDeclaration() :
return classDeclaration;}
}
-void ClassBody(ClassDeclaration classDeclaration) :
+void ClassBody(final ClassDeclaration classDeclaration) :
{}
{
try {
} catch (ParseException e) {
- errorMessage = "unexpected token : '"+ e.currentToken.next.image + "', '{' expected";
+ errorMessage = "unexpected token : '"+ e.currentToken.next.image + "'. '{' expected";
errorLevel = ERROR;
errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
errorEnd = SimpleCharStream.getPosition() + 1;
- throw e;
+ processParseException(e);
}
( ClassBodyDeclaration(classDeclaration) )*
try {
} catch (ParseException e) {
- errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', 'var', 'function' or '}' expected";
+ errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. 'var', 'function' or '}' expected";
errorLevel = ERROR;
errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
errorEnd = SimpleCharStream.getPosition() + 1;
- throw e;
+ processParseException(e);
}
}
/**
* A class can contain only methods and fields.
*/
-void ClassBodyDeclaration(ClassDeclaration classDeclaration) :
+void ClassBodyDeclaration(final ClassDeclaration classDeclaration) :
{
- MethodDeclaration method;
- FieldDeclaration field;
+ final MethodDeclaration method;
+ final FieldDeclaration field;
}
{
- method = MethodDeclaration() {method.setParent(classDeclaration);}
-| field = FieldDeclaration()
+ method = MethodDeclaration() {method.analyzeCode();
+ classDeclaration.addMethod(method);}
+| field = FieldDeclaration() {classDeclaration.addField(field);}
}
/**
* A class field declaration : it's var VariableDeclarator() (, VariableDeclarator())*;.
+ * it is only used by ClassBodyDeclaration()
*/
FieldDeclaration FieldDeclaration() :
{
VariableDeclaration variableDeclaration;
- VariableDeclaration[] list;
+ final VariableDeclaration[] list;
final ArrayList arrayList = new ArrayList();
final int pos = SimpleCharStream.getPosition();
}
{
- variableDeclaration = VariableDeclarator()
+ variableDeclaration = VariableDeclaratorNoSuffix()
{arrayList.add(variableDeclaration);
- outlineInfo.addVariable(new String(variableDeclaration.name));
- currentSegment.add(variableDeclaration);}
- ( variableDeclaration = VariableDeclarator()
+ outlineInfo.addVariable(new String(variableDeclaration.name));}
+ (
+ variableDeclaration = VariableDeclaratorNoSuffix()
{arrayList.add(variableDeclaration);
- outlineInfo.addVariable(new String(variableDeclaration.name));
- currentSegment.add(variableDeclaration);}
+ outlineInfo.addVariable(new String(variableDeclaration.name));}
)*
try {
@@ -809,6 +789,44 @@ FieldDeclaration FieldDeclaration() :
currentSegment);}
}
+/**
+ * a strict variable declarator : there cannot be a suffix here.
+ */
+VariableDeclaration VariableDeclaratorNoSuffix() :
+{
+ final Token varName;
+ Expression initializer = null;
+ final int pos = SimpleCharStream.getPosition();
+}
+{
+ varName =
+ [
+
+ try {
+ initializer = VariableInitializer()
+ } catch (ParseException e) {
+ errorMessage = "Literal expression expected in variable initializer";
+ errorLevel = ERROR;
+ errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
+ errorEnd = SimpleCharStream.getPosition() + 1;
+ processParseException(e);
+ }
+ ]
+ {
+ if (initializer == null) {
+ return new VariableDeclaration(currentSegment,
+ varName.image.substring(1).toCharArray(),
+ pos,
+ SimpleCharStream.getPosition());
+ }
+ return new VariableDeclaration(currentSegment,
+ varName.image.substring(1).toCharArray(),
+ initializer,
+ VariableDeclaration.EQUAL,
+ pos);
+ }
+}
+
VariableDeclaration VariableDeclarator() :
{
final String varName;
@@ -826,7 +844,7 @@ VariableDeclaration VariableDeclarator() :
errorLevel = ERROR;
errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
errorEnd = SimpleCharStream.getPosition() + 1;
- throw e;
+ processParseException(e);
}
]
{
@@ -839,6 +857,7 @@ VariableDeclaration VariableDeclarator() :
return new VariableDeclaration(currentSegment,
varName.toCharArray(),
initializer,
+ VariableDeclaration.EQUAL,
pos);
}
}
@@ -849,23 +868,27 @@ VariableDeclaration VariableDeclarator() :
*/
String VariableDeclaratorId() :
{
- String expr;
- Expression expression;
- final StringBuffer buff = new StringBuffer();
+ final String var;
+ Expression expression = null;
final int pos = SimpleCharStream.getPosition();
ConstantIdentifier ex;
}
{
try {
- expr = Variable() {buff.append(expr);}
- ( LOOKAHEAD(2)
- {ex = new ConstantIdentifier(expr.toCharArray(),
+ var = Variable()
+ (
+ LOOKAHEAD(2)
+ {ex = new ConstantIdentifier(var.toCharArray(),
pos,
SimpleCharStream.getPosition());}
expression = VariableSuffix(ex)
- {buff.append(expression.toStringExpression());}
)*
- {return buff.toString();}
+ {
+ if (expression == null) {
+ return var;
+ }
+ return expression.toStringExpression();
+ }
} catch (ParseException e) {
errorMessage = "'$' expected for variable identifier";
errorLevel = ERROR;
@@ -875,6 +898,10 @@ String VariableDeclaratorId() :
}
}
+/**
+ * Return a variablename without the $.
+ * @return a variable name
+ */
String Variable():
{
final StringBuffer buff;
@@ -885,7 +912,7 @@ String Variable():
{
token = [ expression = Expression() ]
{
- if (expression == null && !assigning) {
+ if (expression == null) {
return token.image.substring(1);
}
buff = new StringBuffer(token.image);
@@ -896,13 +923,17 @@ String Variable():
}
|
expr = VariableName()
- {return "$" + expr;}
+ {return expr;}
}
+/**
+ * A Variable name (without the $)
+ * @return a variable name String
+ */
String VariableName():
{
final StringBuffer buff;
- String expr = null;
+ final String expr;
Expression expression = null;
final Token token;
}
@@ -968,12 +999,13 @@ Expression VariableInitializer() :
ArrayVariableDeclaration ArrayVariable() :
{
-Expression expr,expr2;
+final Expression expr,expr2;
}
{
expr = Expression()
- [ expr2 = Expression()
- {return new ArrayVariableDeclaration(expr,expr2);}
+ [
+ expr2 = Expression()
+ {return new ArrayVariableDeclaration(expr,expr2);}
]
{return new ArrayVariableDeclaration(expr,SimpleCharStream.getPosition());}
}
@@ -984,16 +1016,20 @@ ArrayVariableDeclaration[] ArrayInitializer() :
final ArrayList list = new ArrayList();
}
{
- [ expr = ArrayVariable()
- {list.add(expr);}
- ( LOOKAHEAD(2) expr = ArrayVariable()
- {list.add(expr);}
- )*
- ]
- [ {list.add(null);}]
+
+ [
+ expr = ArrayVariable()
+ {list.add(expr);}
+ ( LOOKAHEAD(2) expr = ArrayVariable()
+ {list.add(expr);}
+ )*
+ ]
+ [
+ {list.add(null);}
+ ]
{
- ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
+ final ArrayVariableDeclaration[] vars = new ArrayVariableDeclaration[list.size()];
list.toArray(vars);
return vars;}
}
@@ -1006,6 +1042,7 @@ MethodDeclaration MethodDeclaration() :
{
final MethodDeclaration functionDeclaration;
final Block block;
+ final OutlineableWithChildren seg = currentSegment;
}
{
@@ -1020,20 +1057,11 @@ MethodDeclaration MethodDeclaration() :
errorEnd = SimpleCharStream.getPosition() + 1;
throw e;
}
- {
- if (currentSegment != null) {
- currentSegment.add(functionDeclaration);
- currentSegment = functionDeclaration;
- }
- }
+ {currentSegment = functionDeclaration;}
block = Block()
- {
- functionDeclaration.statements = block.statements;
- if (currentSegment != null) {
- currentSegment = (OutlineableWithChildren) currentSegment.getParent();
- }
- return functionDeclaration;
- }
+ {functionDeclaration.statements = block.statements;
+ currentSegment = seg;
+ return functionDeclaration;}
}
/**
@@ -1047,16 +1075,28 @@ MethodDeclaration MethodDeclarator() :
Token reference = null;
final Hashtable formalParameters;
final int pos = SimpleCharStream.getPosition();
+ char[] identifierChar = SYNTAX_ERROR_CHAR;
}
{
- [reference = ] identifier =
+ [reference = ]
+ try {
+ identifier =
+ {identifierChar = identifier.image.toCharArray();}
+ } catch (ParseException e) {
+ errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected";
+ errorLevel = ERROR;
+ errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
+ errorEnd = SimpleCharStream.getPosition() + 1;
+ processParseException(e);
+ }
formalParameters = FormalParameters()
- {return new MethodDeclaration(currentSegment,
- identifier.image.toCharArray(),
- formalParameters,
- reference != null,
- pos,
- SimpleCharStream.getPosition());}
+ {MethodDeclaration method = new MethodDeclaration(currentSegment,
+ identifierChar,
+ formalParameters,
+ reference != null,
+ pos,
+ SimpleCharStream.getPosition());
+ return method;}
}
/**
@@ -1076,15 +1116,16 @@ Hashtable FormalParameters() :
errorLevel = ERROR;
errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
errorEnd = SimpleCharStream.getPosition() + 1;
- throw e;
+ processParseException(e);
}
- [ var = FormalParameter()
- {parameters.put(new String(var.name),var);}
- (
- var = FormalParameter()
- {parameters.put(new String(var.name),var);}
- )*
- ]
+ [
+ var = FormalParameter()
+ {parameters.put(new String(var.name),var);}
+ (
+ var = FormalParameter()
+ {parameters.put(new String(var.name),var);}
+ )*
+ ]
try {
} catch (ParseException e) {
@@ -1092,7 +1133,7 @@ Hashtable FormalParameters() :
errorLevel = ERROR;
errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
errorEnd = SimpleCharStream.getPosition() + 1;
- throw e;
+ processParseException(e);
}
{return parameters;}
}
@@ -1107,7 +1148,7 @@ VariableDeclaration FormalParameter() :
Token token = null;
}
{
- [token = ] variableDeclaration = VariableDeclarator()
+ [token = ] variableDeclaration = VariableDeclaratorNoSuffix()
{
if (token != null) {
variableDeclaration.setReference(true);
@@ -1119,95 +1160,108 @@ ConstantIdentifier Type() :
{final int pos;}
{
{pos = SimpleCharStream.getPosition();
- return new ConstantIdentifier(Types.STRING,
- pos,pos-6);}
+ return new ConstantIdentifier(Types.STRING,pos,pos-6);}
| {pos = SimpleCharStream.getPosition();
- return new ConstantIdentifier(Types.BOOL,
- pos,pos-4);}
+ return new ConstantIdentifier(Types.BOOL,pos,pos-4);}
| {pos = SimpleCharStream.getPosition();
- return new ConstantIdentifier(Types.BOOLEAN,
- pos,pos-7);}
+ return new ConstantIdentifier(Types.BOOLEAN,pos,pos-7);}
| {pos = SimpleCharStream.getPosition();
- return new ConstantIdentifier(Types.REAL,
- pos,pos-4);}
+ return new ConstantIdentifier(Types.REAL,pos,pos-4);}
| {pos = SimpleCharStream.getPosition();
- return new ConstantIdentifier(Types.DOUBLE,
- pos,pos-5);}
+ return new ConstantIdentifier(Types.DOUBLE,pos,pos-5);}
| {pos = SimpleCharStream.getPosition();
- return new ConstantIdentifier(Types.FLOAT,
- pos,pos-5);}
+ return new ConstantIdentifier(Types.FLOAT,pos,pos-5);}
| {pos = SimpleCharStream.getPosition();
- return new ConstantIdentifier(Types.INT,
- pos,pos-3);}
+ return new ConstantIdentifier(Types.INT,pos,pos-3);}
| {pos = SimpleCharStream.getPosition();
- return new ConstantIdentifier(Types.INTEGER,
- pos,pos-7);}
+ return new ConstantIdentifier(Types.INTEGER,pos,pos-7);}
|