--- a/progs/fun_tokens.scala Sun Oct 13 00:53:20 2019 +0100
+++ b/progs/fun_tokens.scala Mon Oct 14 00:02:24 2019 +0100
@@ -249,8 +249,11 @@
}
-def tokenise(s: String) : List[Token] =
- lexing_simp(FUN_REGS, s).collect(token)
+def tokenise(s: String) : List[Token] = {
+ val tks = lexing_simp(FUN_REGS, s).collect(token)
+ if (tks.length != 0) tks
+ else { println (s"Tokenise Error") ; sys.exit(-1) }
+}
def serialise[T](fname: String, data: T) = {
import scala.util.Using
@@ -267,4 +270,4 @@
}
-}
\ No newline at end of file
+}