Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
grew
grew
Commits
92950ea3
Commit
92950ea3
authored
Dec 15, 2017
by
Bruno Guillaume
Browse files
Fix doc
parent
4b97e9bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/grew_args.ml
View file @
92950ea3
...
...
@@ -82,25 +82,28 @@ module Grew_args = struct
""
;
"This subcommand apply grs to a graph or a corpus."
;
""
;
"
args are optionnal and can be change in the GUI
:"
;
"
Required arguments
:"
;
" -grs <file> The Graph Rewriting System to load"
;
" -i <file> The input data (a graph or a corpus)"
;
" -f <file> The output file"
;
" -strat <name> The stategy used by default"
;
" -o <file> The output file"
;
""
;
"Optionnal arguments:"
;
" -strat <name> The stategy used in transformation (default=
\"
main
\"
)"
;
""
;
"For additional information, see http://grew.loria.fr"
;
"----------------------------------------------------------"
;
]
let
rec
loop
=
function
|
[]
->
()
|
"-grs"
::
file
::
args
->
grs
:=
Some
file
;
loop
args
|
"-i"
::
file
::
args
->
input_data
:=
Some
file
|
"-o"
::
file
::
args
->
output_file
:=
Some
file
|
"-i"
::
file
::
args
->
input_data
:=
Some
file
;
loop
args
|
"-o"
::
file
::
args
->
output_file
:=
Some
file
;
loop
args
|
"-strat"
::
s
::
args
->
strat
:=
s
;
loop
args
|
"-pattern"
::
file
::
args
->
pattern
:=
Some
file
;
loop
args
|
"-node_id"
::
id
::
args
->
node_id
:=
Some
id
;
loop
args
|
"-timeout"
::
f
::
args
->
timeout
:=
Some
(
float_of_string
f
);
Rewrite
.
set_timeout
(
Some
(
float_of_string
f
))
|
"-timeout"
::
f
::
args
->
timeout
:=
Some
(
float_of_string
f
);
Rewrite
.
set_timeout
(
Some
(
float_of_string
f
))
;
loop
args
|
"-max_depth_det"
::
i
::
args
->
Log
.
warning
"max_depth_det not implemented, skip the arg"
;
loop
args
|
"-max_depth_non_det"
::
i
::
args
->
Log
.
warning
"max_depth_non_det not implemented, skip the arg"
;
loop
args
...
...
src/grew_corpus.ml
View file @
92950ea3
...
...
@@ -40,7 +40,7 @@ let transform () =
match
(
!
Grew_args
.
grs
,
!
Grew_args
.
input_data
,
!
Grew_args
.
output_file
)
with
|
(
None
,_,_
)
->
Log
.
message
"No grs filespecified: use -grs option"
;
exit
1
|
(
_
,
None
,_
)
->
Log
.
message
"No input data specified: use -i option"
;
exit
1
|
(
_
,_,
None
)
->
Log
.
message
"No output specified: use -
f
option"
;
exit
1
|
(
_
,_,
None
)
->
Log
.
message
"No output specified: use -
o
option"
;
exit
1
|
(
Some
grs_file
,
Some
input
,
Some
output_file
)
->
let
out_ch
=
open_out
output_file
in
let
grs
=
(
if
!
Grew_args
.
old_grs
then
Grs
.
load_old
grs_file
else
Grs
.
load
grs_file
)
in
...
...
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