From 42cb5bb23289093561448ca9ed1ca119df032774 Mon Sep 17 00:00:00 2001 From: gmantele <gmantele@ari.uni-heidelberg.de> Date: Thu, 20 Apr 2017 15:25:36 +0200 Subject: [PATCH] [ADQL] Complete the commit on the re-compilation of the parser (005fc6225b35925097ba1df329bd31eabefbe3f1). The position of a TokenMgrError was not there anymore. --- src/adql/parser/Token.java | 11 ++++++- src/adql/parser/Token.java.backup | 11 ++++++- src/adql/parser/TokenMgrError.java | 37 ++++++++++++++++++++++- src/adql/parser/TokenMgrError.java.backup | 37 ++++++++++++++++++++++- 4 files changed, 92 insertions(+), 4 deletions(-) diff --git a/src/adql/parser/Token.java b/src/adql/parser/Token.java index 4aa2913..261c569 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 4aa2913..261c569 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 10af73d..60cb468 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 10af73d..60cb468 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) */ -- GitLab