Skip to content
GitLab
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
0afab732
Commit
0afab732
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2002-11-09 18:52:43 by cvscast] Empty log message
Original author: cvscast Date: 2002-11-09 18:53:51+00:00
parent
8f409a1f
Changes
4
Hide whitespace changes
Inline
Side-by-side
driver/cduce.ml
View file @
0afab732
...
...
@@ -161,7 +161,7 @@ let run ppf input =
|
Ast
.
EvalStatement
e
->
let
(
fv
,
e
)
=
Typer
.
expr
e
in
let
t
=
Typer
.
type_check
!
typing_env
e
Types
.
any
true
in
Location
.
dump_loc
(
Location
.
output
()
)
e
.
Typed
.
exp_loc
;
Location
.
dump_loc
ppf
e
.
Typed
.
exp_loc
;
Format
.
fprintf
ppf
"|- %a@
\n
@."
print_norm
t
;
let
v
=
Eval
.
eval
!
eval_env
e
in
Format
.
fprintf
ppf
"=> @[%a@]@
\n
@."
print_value
v
...
...
driver/webiface.ml
View file @
0afab732
...
...
@@ -10,7 +10,6 @@ let main (cgi : Netcgi.std_activation) =
and
input
=
Stream
.
of_string
src
in
Location
.
set_source
(
`String
src
);
Location
.
set_viewport
`Html
;
Location
.
set_output
ppf
;
Load_xml
.
set_auth
false
;
Cduce
.
run
ppf
input
;
...
...
@@ -25,7 +24,7 @@ let main (cgi : Netcgi.std_activation) =
<h1>CDuce online prototype</h1>
<pre>"
^
res
^
"</pre>
<form method=
ge
t>
<form method=
pos
t>
<textarea name=prog cols=80 rows=25></textarea>
<input type=submit>
</form>
...
...
parser/location.ml
View file @
0afab732
...
...
@@ -90,10 +90,5 @@ let protect ppf f =
Format
.
pp_print_flush
ppf'
()
;
let
s
=
Buffer
.
contents
b
in
let
s
=
Netencoding
.
Html
.
encode_from_latin1
s
in
Format
.
pp_
print
_string
ppf
s
Format
.
f
print
f
ppf
"@[%s@]"
s
|
_
->
f
ppf
let
outputr
=
ref
Format
.
std_formatter
let
output
()
=
!
outputr
let
set_output
f
=
outputr
:=
f
parser/location.mli
View file @
0afab732
...
...
@@ -12,9 +12,6 @@ val set_source: source -> unit
type
viewport
=
[
`Html
|
`Text
]
val
set_viewport
:
viewport
->
unit
val
set_output
:
Format
.
formatter
->
unit
val
output
:
unit
->
Format
.
formatter
val
protect
:
Format
.
formatter
->
(
Format
.
formatter
->
unit
)
->
unit
val
print_loc
:
Format
.
formatter
->
loc
->
unit
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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