Permalink
Browse files

Move files in lib/

Add lib/std/numeric.ab
  • Loading branch information...
1 parent ed7d267 commit f77cee0421c473aa7d9a0f3debdedc87445ac921 nineties committed Mar 17, 2013
View
0 lib/data/array.ab → lib/std/array.ab
File renamed without changes.
View
0 lib/data/bitable.ab → lib/std/bitable.ab
File renamed without changes.
View
10 lib/printf.ab → lib/std/format.ab
@@ -1,9 +1,9 @@
# Copyright (C) 2010 nineties
#
-# $Id: printf.ab 2013-03-14 20:37:59 nineties $
+# $Id: format.ab 2013-03-17 22:57:44 nineties $
module Std {
- module Printf {
+ module Format {
compile_printf(io, fmt, args):
loop: ([], [], ls)
-> `Block{!Std::reverse(ls)}
@@ -49,8 +49,8 @@ format_string
postfix_expr
::= "printf" "(" format_string ("," expr)* ")"
- { Std::Printf::compile_printf(\stdout, $2, map(x->x[1], $3)) }
+ { Std::Format::compile_printf(\stdout, $2, map(x->x[1], $3)) }
| "printf" "(" expr "," format_string ("," expr)* ")"
- { Std::Printf::compile_printf($2, $4, map(x->x[1], $5)) }
+ { Std::Format::compile_printf($2, $4, map(x->x[1], $5)) }
| "format" "(" format_string ("," expr)* ")"
- { Std::Printf::compile_format($2, map(x->x[1], $3))}
+ { Std::Format::compile_format($2, map(x->x[1], $3))}
View
0 lib/io.ab → lib/std/io/io.ab
File renamed without changes.
View
0 lib/data/list.ab → lib/std/list.ab
File renamed without changes.
View
8 lib/std/numeric.ab
@@ -0,0 +1,8 @@
+# Copyright (C) 2010 nineties
+#
+# $Id: numeric.ab 2013-03-17 22:52:00 nineties $
+
+module Std {
+ max(a, b): if (a >= b) a else b
+ min(a, b): if (a >= b) b else a
+}
View
0 lib/oop.ab → lib/std/oop.ab
File renamed without changes.
View
0 lib/random.ab → lib/std/random.ab
File renamed without changes.
View
0 lib/data/set.ab → lib/std/set.ab
File renamed without changes.
View
0 lib/data/string.ab → lib/std/string.ab
File renamed without changes.
View
0 lib/data/table.ab → lib/std/table.ab
File renamed without changes.
View
17 rowl1/rowl1-interp.rlc
@@ -2,7 +2,7 @@
; rowl - 1st generation
; Copyright (C) 2010 nineties
;
-; $Id: rowl1-interp.rlc 2013-03-16 13:09:26 nineties $
+; $Id: rowl1-interp.rlc 2013-03-17 22:58:07 nineties $
;
(import "rlvm-compile")
@@ -92,13 +92,14 @@
(push_import_dir "/usr/lib/amber/")
(import_file "amber/syntax.ab")
- (import_file "data/string.ab")
- (import_file "io.ab")
- (import_file "printf.ab")
- (import_file "data/list.ab")
- (import_file "data/array.ab")
- (import_file "data/table.ab")
- (import_file "oop.ab")
+ (import_file "std/string.ab")
+ (import_file "std/numeric.ab")
+ (import_file "std/format.ab")
+ (import_file "std/list.ab")
+ (import_file "std/array.ab")
+ (import_file "std/table.ab")
+ (import_file "std/oop.ab")
+ (import_file "std/io/io.ab")
(push_import_dir (get_directory file))
(push_import_dir (get_env "PWD"))

0 comments on commit f77cee0

Please sign in to comment.