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
b2c95e10
Commit
b2c95e10
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2002-11-11 11:18:18 by cvscast] Empty log message
Original author: cvscast Date: 2002-11-11 11:18:18+00:00
parent
8940ec0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
toplevel/toploop.ml
View file @
b2c95e10
open
Printf
open
Parser
open
Parser
type
line_buffer
=
...
...
@@ -38,6 +38,7 @@ let refill_buf buffer len =
!
i
with
|
End_of_file
->
print_newline
()
;
if
!
i
>
0
then
(
got_eof
:=
true
;
!
i
)
else
0
|
Exit
->
!
i
end
...
...
@@ -72,13 +73,17 @@ let loop =
let
input
=
Stream
.
from
(
scan
line_buffer
)
in
Sys
.
catch_break
true
;
while
true
do
first_line
:=
true
;
let
semicolon
=
ref
0
in
while
!
semicolon
<
2
do
let
c
=
Stream
.
next
input
in
if
c
=
'
;
'
then
incr
semicolon
else
semicolon
:=
0
done
try
first_line
:=
true
;
let
semicolon
=
ref
0
in
while
!
semicolon
<
2
do
let
c
=
Stream
.
next
input
in
if
c
=
'
;
'
then
incr
semicolon
else
semicolon
:=
0
done
with
|
End_of_file
->
exit
0
|
Sys
.
Break
->
fprintf
stdout
"Chang d'avis?
\n
"
done
...
...
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