summaryrefslogtreecommitdiff
path: root/dice-lang/src/bjc/dicelang/Tokenizer.java
diff options
context:
space:
mode:
authorbjculkin <bjculkin@mix.wvu.edu>2017-03-17 08:36:10 -0400
committerbjculkin <bjculkin@mix.wvu.edu>2017-03-17 08:36:10 -0400
commit94913a2fccff9e80f84ac477c2020bd7c7b1833a (patch)
treebbb2e484b65d5ad2e9a813eb5d9fcfb05aa35023 /dice-lang/src/bjc/dicelang/Tokenizer.java
parent348e10db258ae0cd0ae61dd99f6359ac4c8c0bd1 (diff)
Adjust code to refactoring in BJC-Utils.
I moved some stuff around in BJC-Utils, so this adjusts for it.
Diffstat (limited to 'dice-lang/src/bjc/dicelang/Tokenizer.java')
-rw-r--r--dice-lang/src/bjc/dicelang/Tokenizer.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/dice-lang/src/bjc/dicelang/Tokenizer.java b/dice-lang/src/bjc/dicelang/Tokenizer.java
index 7292d2c..2208f00 100644
--- a/dice-lang/src/bjc/dicelang/Tokenizer.java
+++ b/dice-lang/src/bjc/dicelang/Tokenizer.java
@@ -4,6 +4,7 @@ import bjc.dicelang.dice.DiceBox;
import bjc.utils.funcdata.FunctionalMap;
import bjc.utils.funcdata.IMap;
import bjc.utils.funcutils.StringUtils;
+import bjc.utils.parserutils.TokenUtils;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -108,7 +109,7 @@ public class Tokenizer {
private Token tokenizeLiteral(String token, IMap<String, String> stringLts) {
Token tk = Token.NIL_TOKEN;
- if(StringUtils.isInt(token)) {
+ if(TokenUtils.isInt(token)) {
tk = new Token(INT_LIT, Long.parseLong(token));
} else if(hexadecimalMatcher.matcher(token).matches()) {
String newToken = token.substring(0, 1) + token.substring(token.indexOf('x'));
@@ -130,7 +131,7 @@ public class Tokenizer {
Errors.inst.printError(EK_TOK_INVFLEX, flexNum, Integer.toString(parseBase));
return Token.NIL_TOKEN;
}
- } else if(StringUtils.isDouble(token)) {
+ } else if(TokenUtils.isDouble(token)) {
tk = new Token(FLOAT_LIT, Double.parseDouble(token));
} else if(DiceBox.isValidExpression(token)) {
tk = new Token(DICE_LIT, DiceBox.parseExpression(token));