Revision 44098 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.api/src/main/java/org/gvsig/expressionevaluator/spi/AbstractLexicalAnalyzer.java
AbstractLexicalAnalyzer.java | ||
---|---|---|
7 | 7 |
import java.util.Locale; |
8 | 8 |
import java.util.Map; |
9 | 9 |
import java.util.Stack; |
10 |
import org.gvsig.expressionevaluator.ExpressionRuntimeException; |
|
10 | 11 |
import org.gvsig.expressionevaluator.ExpressionSyntaxException; |
12 |
import org.gvsig.expressionevaluator.I18N; |
|
11 | 13 |
import org.gvsig.tools.lang.Cloneable; |
12 | 14 |
|
13 | 15 |
public abstract class AbstractLexicalAnalyzer implements LexicalAnalyzer { |
... | ... | |
223 | 225 |
char ch = getch(); |
224 | 226 |
while (true) { |
225 | 227 |
if (ch == EOF) { |
226 |
throw new ExpressionSyntaxException("Found end of source and expected end of string", this);
|
|
228 |
throw new ExpressionSyntaxException(I18N.End_of_string_was_expected_and_end_of_source_was_found(), this);
|
|
227 | 229 |
} |
228 | 230 |
if (ch == '\'') { |
229 | 231 |
ch = getch(); |
... | ... | |
245 | 247 |
this.nfPos.setIndex(this.position); |
246 | 248 |
Number n = nf.parse(source, this.nfPos); |
247 | 249 |
if (this.nfPos.getIndex() == this.position) { |
248 |
throw new RuntimeException("Expected a number at position " + this.nfPos.getIndex() + ".");
|
|
250 |
throw new ExpressionRuntimeException(I18N.Expected_a_number_at_position_XpositionX(this.nfPos.getIndex()));
|
|
249 | 251 |
} |
250 | 252 |
String literal = source.substring(this.position, this.nfPos.getIndex()); |
251 | 253 |
this.position = this.nfPos.getIndex(); |
Also available in: Unified diff