Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lutin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
verimag
synchrone
lutin
Commits
82689f8e
Commit
82689f8e
authored
Nov 30, 2017
by
erwan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Bytes instead of String so that it works with ocaml 4.06.0
parent
ce64ac1a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
19 additions
and
76 deletions
+19
-76
_oasis
_oasis
+2
-2
_tags
_tags
+3
-1
examples/lutin/crazy-rabbit/Makefile
examples/lutin/crazy-rabbit/Makefile
+1
-1
examples/lutin/ocaml/Makefile
examples/lutin/ocaml/Makefile
+2
-2
ltop/src/myGenlex.ml
ltop/src/myGenlex.ml
+7
-5
lutin/src/lutExe.ml
lutin/src/lutExe.ml
+1
-1
lutin/src/util.ml
lutin/src/util.ml
+1
-62
lutin/src/version.ml
lutin/src/version.ml
+2
-2
No files found.
_oasis
View file @
82689f8e
OASISFormat: 0.4
Name: Lutin
Version: 2.2
8
Version: 2.2
9
Authors: Erwan Jahier
Maintainers: erwan.jahier@imag.fr
License: PROP
...
...
@@ -32,7 +32,7 @@ Library lutin
XMETADescription: Provides an API to call Lutin from ocaml (and rdbg)
Path: lutin/src
Modules: LutinRun
BuildDepends: camlp4,lutin-utils,ezdl,gbddml,polka,camlidl
BuildDepends: camlp4,lutin-utils,ezdl,gbddml,polka,camlidl
,lutils
Install:true
CompiledObject: native
XMETAEnable: true
...
...
_tags
View file @
82689f8e
# OASIS_START
# DO NOT EDIT (digest:
8f15becd0ae55cf03260d080626a66b2
)
# DO NOT EDIT (digest:
913199b6a516197e43dd95dd089af5f0
)
# Ignore VCS directories, you can use the same kind of rule outside
# OASIS_START/STOP if you want to exclude directories that contains
# useless stuff for the build process
...
...
@@ -70,6 +70,7 @@ true: annot, bin_annot
# Library lutin
"lutin/src/lutin.cmxs": use_lutin
"lutin/src/lutin.cmxa": oasis_library_lutin_dlllib
<lutin/src/*.ml{,i,y}>: package(lutils)
# Executable lurettetop_exe
<ltop/src/*.ml{,i,y}>: oasis_executable_lurettetop_exe_ccopt
"ltop/src/lurettetop.native": oasis_executable_lurettetop_exe_cclib
...
...
@@ -80,6 +81,7 @@ true: annot, bin_annot
"ltop/src/lurettetop.native": package(dynlink)
"ltop/src/lurettetop.native": package(gmp)
"ltop/src/lurettetop.native": package(lustre-v6)
"ltop/src/lurettetop.native": package(lutils)
"ltop/src/lurettetop.native": package(num)
"ltop/src/lurettetop.native": package(str)
"ltop/src/lurettetop.native": package(unix)
...
...
examples/lutin/crazy-rabbit/Makefile
View file @
82689f8e
...
...
@@ -29,7 +29,7 @@ test.rif:$(EXPDIR) rabbit.cmxs
rm
-f
test.rif0 .lurette_rc
$(LURETTETOP)
-go
--output
test.rif0
\
-
rp
"sut:ocaml:rabbit.cmxs:"
\
-
rp
'env:lutin:rabbit.lut:-main:rabbit:-seed:34:-L:libm.so:-loc'
&&
\
-
rp
'env:lutin:rabbit.lut:-main:rabbit:-seed:34:-L:libm.so
.6
:-loc'
&&
\
grep
-v
"lurette chronogram"
test.rif0 |
\
grep
-v
"lurette Version"
|
\
grep
-v
"#seed"
|
\
...
...
examples/lutin/ocaml/Makefile
View file @
82689f8e
...
...
@@ -13,9 +13,9 @@ ifeq ($(HOSTTYPE),mac)
endif
# XXX pack all those modules into one
CMXA_LIB
=
unix.cmxa nums.cmxa str.cmxa
\
CMXA_LIB
=
dynlink.cmxa
unix.cmxa nums.cmxa str.cmxa
\
ezdl.cmxa
gbddml.cmxa
polka.cmxa
\
rdbg-plugin.cmxa
lutils
.cmxa
lutin-utils.cmxa
lutin.cmxa
lutils.cmxa
rdbg-plugin
.cmxa
lutin-utils.cmxa
lutin.cmxa
CLIB
=
`
ocamlfind query
-r
rdbg-plugin
-i-format
`
\
`ocamlfind
query
-r
lutin
-i-format`
\
...
...
ltop/src/myGenlex.ml
View file @
82689f8e
...
...
@@ -40,16 +40,18 @@ let bufpos = ref 0
let
reset_buffer
()
=
buffer
:=
initial_buffer
;
bufpos
:=
0
let
store
c
=
if
!
bufpos
>=
String
.
length
!
buffer
then
if
!
bufpos
>=
Bytes
.
length
!
buffer
then
begin
let
newbuffer
=
String
.
create
(
2
*
!
bufpos
)
in
String
.
blit
!
buffer
0
newbuffer
0
!
bufpos
;
buffer
:=
newbuffer
let
newbuffer
=
Bytes
.
create
(
2
*
!
bufpos
)
in
Bytes
.
blit
!
buffer
0
newbuffer
0
!
bufpos
;
buffer
:=
newbuffer
end
;
String
.
set
!
buffer
!
bufpos
c
;
Bytes
.
set
!
buffer
!
bufpos
c
;
incr
bufpos
let
get_string
()
=
let
s
=
String
.
sub
!
buffer
0
!
bufpos
in
buffer
:=
initial_buffer
;
s
let
s
=
Bytes
.
sub
!
buffer
0
!
bufpos
in
buffer
:=
initial_buffer
;
Bytes
.
to_string
s
(* The lexer *)
...
...
lutin/src/lutExe.ml
View file @
82689f8e
...
...
@@ -532,7 +532,7 @@ let rec (to_src_info: CoIdent.src_stack -> Event.src_info_atom) =
|
(
lxm
,_,
Some
ve
)
::
tl
->
let
line_b
,
line_e
,
col_b
,
col_e
,
char_b
,
char_e
=
cstr_src_info_of_val_exp
ve
in
let
file
=
lxm
.
Lexeme
.
file
in
let
filecontent
=
Util
.
readfile
file
in
let
filecontent
=
Mypervasives
.
readfile
file
in
{
Event
.
str
=
(
try
String
.
sub
filecontent
char_b
(
char_e
-
char_b
+
1
)
...
...
lutin/src/util.ml
View file @
82689f8e
...
...
@@ -141,74 +141,13 @@ let _ = assert (power_2 0 = 1)
let
_
=
assert
(
power_2
1
=
2
)
let
_
=
assert
(
power_2
29
=
int_of_float
(
2
.
**
29
.
))
(*************************************************************************)
(**
[readfile file] outputs a string containing the whole content of [file].
*)
let
(
readfile_hide
:
string
->
string
)
=
fun
file
->
try
let
rec
(
readfile_ic
:
in_channel
->
string
)
=
fun
ic
->
let
ic_l
=
in_channel_length
ic
in
let
str_buf
=
String
.
make
ic_l
'
'
in
let
_
=
really_input
ic
str_buf
0
ic_l
in
str_buf
in
let
ic
=
(
open_in
file
)
in
let
str
=
readfile_ic
ic
in
close_in
ic
;
str
with
e
->
print_string
((
Printexc
.
to_string
e
)
^
": "
);
output_string
stdout
(
"Error when reading "
^
file
^
".
\n
"
);
flush
stdout
;
raise
Not_found
(* A variant by Maxence Guesdon from the Share lib *)
let
(
readfile
:
string
->
string
)
=
fun
name
->
let
chanin
=
open_in_bin
name
in
let
len
=
1024
in
let
s
=
String
.
create
len
in
let
buf
=
Buffer
.
create
len
in
let
rec
iter
()
=
try
let
n
=
input
chanin
s
0
len
in
if
n
=
0
then
()
else
(
Buffer
.
add_substring
buf
s
0
n
;
iter
()
)
with
End_of_file
->
()
in
let
str
=
iter
()
;
close_in
chanin
;
Buffer
.
contents
buf
in
str
let
(
readfile_rm_crtl_m
:
string
->
string
)
=
fun
file
->
let
remove_control_m
str
=
Str
.
global_replace
(
Str
.
regexp
"
\013
"
)
""
str
in
remove_control_m
(
readfile
file
)
remove_control_m
(
Mypervasives
.
readfile
file
)
(*************************************************************************)
...
...
lutin/src/version.ml
View file @
82689f8e
let
str
=
"2.2
8
"
let
sha
=
"
dbb5c44
"
let
str
=
"2.2
9
"
let
sha
=
"
ce64ac1
"
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