diff --git a/src/adql/parser/Token.java b/src/adql/parser/Token.java index 4aa29136418f9a56274e07318b8ce1860e9aabca..261c569086bfaaf963feae8d6079ac51200c3354 100644 --- a/src/adql/parser/Token.java +++ b/src/adql/parser/Token.java @@ -1,5 +1,14 @@ /* Generated By:JavaCC: Do not edit this line. Token.java Version 6.0 */ -/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ +/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true + * + * Modified by Grégory Mantelet (CDS), on March 2017 + * Modification: addition of position (line and column) in the original text. + * /!\ DO NOT RE-GENERATE THIS FILE /!\ + * In case of re-generation, replace it by + * Token.java.backup (but maybe after a diff + * in case of significant modifications have been done + * by a new version of JavaCC). + */ package adql.parser; /** diff --git a/src/adql/parser/Token.java.backup b/src/adql/parser/Token.java.backup index 4aa29136418f9a56274e07318b8ce1860e9aabca..261c569086bfaaf963feae8d6079ac51200c3354 100644 --- a/src/adql/parser/Token.java.backup +++ b/src/adql/parser/Token.java.backup @@ -1,5 +1,14 @@ /* Generated By:JavaCC: Do not edit this line. Token.java Version 6.0 */ -/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ +/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true + * + * Modified by Grégory Mantelet (CDS), on March 2017 + * Modification: addition of position (line and column) in the original text. + * /!\ DO NOT RE-GENERATE THIS FILE /!\ + * In case of re-generation, replace it by + * Token.java.backup (but maybe after a diff + * in case of significant modifications have been done + * by a new version of JavaCC). + */ package adql.parser; /** diff --git a/src/adql/parser/TokenMgrError.java b/src/adql/parser/TokenMgrError.java index 10af73d9a9a7ad0fbeacafbdd664ed307e41635e..60cb4686111c3b65f4ad36640e338d94949d231e 100644 --- a/src/adql/parser/TokenMgrError.java +++ b/src/adql/parser/TokenMgrError.java @@ -1,5 +1,14 @@ /* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 6.0 */ -/* JavaCCOptions: */ +/* JavaCCOptions: + * + * Modified by Grégory Mantelet (CDS), on April 2017 + * Modification: addition of position (line and column) in the original text. + * /!\ DO NOT RE-GENERATE THIS FILE /!\ + * In case of re-generation, replace it by + * TokenMgrError.java.backup (but maybe after a diff + * in case of significant modifications have been done + * by a new version of JavaCC). + */ package adql.parser; /** Token Manager Error. */ @@ -42,6 +51,12 @@ public class TokenMgrError extends Error { */ int errorCode; + /** Indicates the line at which the error occurs. */ + int errorLine = -1; + + /** Indicates the column at which the error occurs. */ + int errorColumn = -1; + /** * Replaces unprintable characters by their escaped (or unicode escaped) * equivalents in the given string @@ -120,6 +135,24 @@ public class TokenMgrError extends Error { return super.getMessage(); } + /** + * Gets the line at which this error occurs. + * + * @return Error line or <code>-1</code> if unknown. + */ + public final int getErrorLine(){ + return errorLine; + } + + /** + * Gets the column at which this error occurs. + * + * @return Error column or <code>-1</code> if unknown. + */ + public final int getErrorColumn(){ + return errorColumn; + } + /* * Constructors of various flavors follow. */ @@ -136,6 +169,8 @@ public class TokenMgrError extends Error { /** Full Constructor. */ public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason){ this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); + this.errorLine = errorLine; + this.errorColumn = errorColumn; } } /* JavaCC - OriginalChecksum=f63fc7c10226c13ff5a304e2fb1ae182 (do not edit this line) */ diff --git a/src/adql/parser/TokenMgrError.java.backup b/src/adql/parser/TokenMgrError.java.backup index 10af73d9a9a7ad0fbeacafbdd664ed307e41635e..60cb4686111c3b65f4ad36640e338d94949d231e 100644 --- a/src/adql/parser/TokenMgrError.java.backup +++ b/src/adql/parser/TokenMgrError.java.backup @@ -1,5 +1,14 @@ /* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 6.0 */ -/* JavaCCOptions: */ +/* JavaCCOptions: + * + * Modified by Grégory Mantelet (CDS), on April 2017 + * Modification: addition of position (line and column) in the original text. + * /!\ DO NOT RE-GENERATE THIS FILE /!\ + * In case of re-generation, replace it by + * TokenMgrError.java.backup (but maybe after a diff + * in case of significant modifications have been done + * by a new version of JavaCC). + */ package adql.parser; /** Token Manager Error. */ @@ -42,6 +51,12 @@ public class TokenMgrError extends Error { */ int errorCode; + /** Indicates the line at which the error occurs. */ + int errorLine = -1; + + /** Indicates the column at which the error occurs. */ + int errorColumn = -1; + /** * Replaces unprintable characters by their escaped (or unicode escaped) * equivalents in the given string @@ -120,6 +135,24 @@ public class TokenMgrError extends Error { return super.getMessage(); } + /** + * Gets the line at which this error occurs. + * + * @return Error line or <code>-1</code> if unknown. + */ + public final int getErrorLine(){ + return errorLine; + } + + /** + * Gets the column at which this error occurs. + * + * @return Error column or <code>-1</code> if unknown. + */ + public final int getErrorColumn(){ + return errorColumn; + } + /* * Constructors of various flavors follow. */ @@ -136,6 +169,8 @@ public class TokenMgrError extends Error { /** Full Constructor. */ public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason){ this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); + this.errorLine = errorLine; + this.errorColumn = errorColumn; } } /* JavaCC - OriginalChecksum=f63fc7c10226c13ff5a304e2fb1ae182 (do not edit this line) */