summaryrefslogtreecommitdiff
path: root/test/files/run/lisp.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-01-12 02:49:08 +0000
committerPaul Phillips <paulp@improving.org>2011-01-12 02:49:08 +0000
commit5bada810b4c7eda186aa40b94a78326520b3fa92 (patch)
treeeee2227bf7f53a6b04e9732d887961b403975ab5 /test/files/run/lisp.scala
parent566fefb05abe31e90f765d1fb0a89b264302d9ce (diff)
downloadscala-5bada810b4c7eda186aa40b94a78326520b3fa92.tar.gz
scala-5bada810b4c7eda186aa40b94a78326520b3fa92.tar.bz2
scala-5bada810b4c7eda186aa40b94a78326520b3fa92.zip
Imported sbt.Process into trunk, in the guise o...
Imported sbt.Process into trunk, in the guise of package scala.sys.process. It is largely indistinguishable from the version in sbt, at least from the outside. Also, I renamed package system to sys. I wanted to do that from the beginning and the desire has only grown since then. Sometimes a short identifier is just critical to usability: with a function like error("") called from hundreds of places, the difference between system.error and sys.error is too big. sys.error and sys.exit have good vibes (at least as good as the vibes can be for functions which error and exit.) Note: this is just the first cut. I need to check this in to finish fixing partest. I will be going over it with a comb and writing documentation which will leave you enchanted, as well as removing other bits which are now redundant or inferior. No review.
Diffstat (limited to 'test/files/run/lisp.scala')
-rw-r--r--test/files/run/lisp.scala14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/files/run/lisp.scala b/test/files/run/lisp.scala
index 3436594def..f3687ea1bb 100644
--- a/test/files/run/lisp.scala
+++ b/test/files/run/lisp.scala
@@ -20,7 +20,7 @@ class LispTokenizer(s: String) extends Iterator[String] {
do i = i + 1
while (!isDelimiter(s charAt i))
s.substring(start, i)
- } else system.error("premature end of string")
+ } else sys.error("premature end of string")
}
//############################################################################
@@ -102,7 +102,7 @@ object LispCaseClasses extends Lisp {
var indent: Int = 0
def lispError[a](msg: String): a =
- system.error("error: " + msg + "\n" + curexp);
+ sys.error("error: " + msg + "\n" + curexp);
trait Environment {
def lookup(n: String): Data;
@@ -201,7 +201,7 @@ object LispCaseClasses extends Lisp {
val ps: List[String] = toList(params) map {
case SYM(name) => name
- case _ => system.error("illegal parameter list");
+ case _ => sys.error("illegal parameter list");
}
FUN(args => eval(expr, extendEnv(env, ps, args)))
@@ -237,7 +237,7 @@ object LispCaseClasses extends Lisp {
val it = new LispTokenizer(s);
def parseExpr(token: String): Data = {
if (token == "(") parseList
- else if (token == ")") system.error("unbalanced parentheses")
+ else if (token == ")") sys.error("unbalanced parentheses")
else if ('0' <= token.charAt(0) && token.charAt(0) <= '9')
NUM(token.toInt)
else if (token.charAt(0) == '\"' && token.charAt(token.length()-1)=='\"')
@@ -270,7 +270,7 @@ object LispAny extends Lisp {
var indent: Int = 0;
def lispError[a](msg: String): a =
- system.error("error: " + msg + "\n" + curexp);
+ sys.error("error: " + msg + "\n" + curexp);
trait Environment {
def lookup(n: String): Data;
@@ -392,7 +392,7 @@ object LispAny extends Lisp {
val ps: List[String] = asList(params) map {
case Symbol(name) => name
- case _ => system.error("illegal parameter list");
+ case _ => sys.error("illegal parameter list");
}
Lambda(args => eval(expr, extendEnv(env, ps, args)))
@@ -428,7 +428,7 @@ object LispAny extends Lisp {
val it = new LispTokenizer(s);
def parseExpr(token: String): Data = {
if (token == "(") parseList
- else if (token == ")") system.error("unbalanced parentheses")
+ else if (token == ")") sys.error("unbalanced parentheses")
//else if (Character.isDigit(token.charAt(0)))
else if (token.charAt(0).isDigit)
token.toInt