Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
8940ec0f
Commit
8940ec0f
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2002-11-11 00:40:54 by cvscast] Empty log message
Original author: cvscast Date: 2002-11-11 00:40:54+00:00
parent
5b00c5a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
8940ec0f
# Source directories
DIRS
=
misc parser typing types runtime driver
DIRS
=
misc parser typing types runtime driver
toplevel
CLEAN_DIRS
=
$(DIRS)
tools tests
# Objects to build
...
...
@@ -142,3 +142,17 @@ build_web:
rsh cedre
". .env; cd IMPLEM/CDUCE; make webiface"
install_web
:
ssh cduce@iris
"cp ~frisch/IMPLEM/CDUCE/webiface cgi-bin/cduce2; chmod +s cgi-bin/cduce2"
toplevel/toploop.ml
View file @
8940ec0f
open
Printf
open
Parser
open
Parser
type
line_buffer
=
{
mutable
buffer
:
string
;
...
...
@@ -49,9 +50,7 @@ let refill_buf buffer len =
let
rec
scan
line_buf
count
=
let
element
=
count
-
(
line_buf
.
abs_pos
)
in
(*test: print_int count;print_char ':'; print_int line_buf.abs_pos;
print_char ':'; print_int element; print_char ' '; *)
if
element
<
line_buf
.
length
then
(* send to stream the character *)
if
element
<
line_buf
.
length
then
(* send to stream the character *)
Some
line_buf
.
buffer
.
[
element
]
else
(
(* read another line*)
line_buf
.
abs_pos
<-
(
line_buf
.
abs_pos
)
+
line_buf
.
length
;
...
...
@@ -91,9 +90,11 @@ let loop =
(* JUST FOR TESTING 2
let loop =
(* JUST FOR TESTING 2
let loop
x
=
fprintf stdout " CDuce version 0.2a1\n\n";
let line_buffer =
{ buffer = " ";
...
...
@@ -105,11 +106,11 @@ let loop =
Sys.catch_break true;
while true do
first_line := true;
try
Parser.prog input
; () with _ -> ()
Parser.prog input
done
*)
*)
(* THE REAL LOOP
let loop ppf =
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment