summaryrefslogtreecommitdiff
path: root/ao-tools/altosui/AltosParse.java
diff options
context:
space:
mode:
Diffstat (limited to 'ao-tools/altosui/AltosParse.java')
-rw-r--r--ao-tools/altosui/AltosParse.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/ao-tools/altosui/AltosParse.java b/ao-tools/altosui/AltosParse.java
index a60dc694..4d82de78 100644
--- a/ao-tools/altosui/AltosParse.java
+++ b/ao-tools/altosui/AltosParse.java
@@ -20,10 +20,16 @@ package altosui;
import java.text.*;
import java.lang.*;
+import altosui.Altos;
+
public class AltosParse {
+ static boolean isdigit(char c) {
+ return '0' <= c && c <= '9';
+ }
+
static int parse_int(String v) throws ParseException {
try {
- return Integer.parseInt(v);
+ return Altos.fromdec(v);
} catch (NumberFormatException e) {
throw new ParseException("error parsing int " + v, 0);
}
@@ -31,7 +37,7 @@ public class AltosParse {
static int parse_hex(String v) throws ParseException {
try {
- return Integer.parseInt(v, 16);
+ return Altos.fromhex(v);
} catch (NumberFormatException e) {
throw new ParseException("error parsing hex " + v, 0);
}