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
4080a54a
Commit
4080a54a
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2004-07-12 19:11:58 by afrisch] Pb to print unterminated string errors
Original author: afrisch Date: 2004-07-12 19:11:59+00:00
parent
bdd87cfc
Changes
2
Hide whitespace changes
Inline
Side-by-side
parser/location.ml
View file @
4080a54a
...
...
@@ -95,9 +95,12 @@ let print_loc ppf ((src,i,j),w) =
let
extr
s
i
j
=
try
Netencoding
.
Html
.
encode_from_latin1
(
String
.
sub
s
i
(
j
-
i
))
with
e
->
failwith
"Location.extr"
let
n
=
min
(
String
.
length
s
)
j
-
i
in
if
n
<=
0
then
""
else
Netencoding
.
Html
.
encode_from_latin1
(
String
.
sub
s
i
n
)
with
e
->
failwith
(
Printf
.
sprintf
"Location.extr len=%i i=%i j=%i"
(
String
.
length
s
)
i
j
)
let
dump_loc
ppf
((
src
,
i
,
j
)
,
w
)
=
match
(
src
,
!
viewport
)
with
...
...
@@ -119,7 +122,6 @@ let rec end_of_line s i =
let
html_hilight
ppf
((
src
,
i
,
j
)
,
w
)
=
match
(
src
,
!
viewport
)
with
|
`String
s
,
`Html
->
(
try
if
(
i
<
0
)
then
Format
.
fprintf
ppf
"<b>GHOST LOCATION</b>@
\n
"
else
...
...
@@ -130,7 +132,6 @@ let html_hilight ppf ((src,i,j),w) =
(
extr
s
i0
i
)
(
extr
s
i
j
)
(
extr
s
j
j0
)
with
e
->
failwith
"html_hilight"
)
|
_
->
()
...
...
tests/ocaml/Makefile
View file @
4080a54a
# Do "make install_cdml" before running this test
STATIC
=
CAML
=
ocaml
c
CAML
=
ocaml
opt
CDUCE
=
../../cduce
CDO2ML
=
../../cdo2ml
...
...
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