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
libcaml-grew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
grew
libcaml-grew
Commits
b4be27ed
Commit
b4be27ed
authored
Aug 08, 2018
by
Bruno Guillaume
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix messages
parent
c4f645a3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
39 deletions
+3
-39
src/grew_command.ml
src/grew_command.ml
+1
-1
src/grew_fs.ml
src/grew_fs.ml
+1
-35
src/grew_rule.mli
src/grew_rule.mli
+1
-3
No files found.
src/grew_command.ml
View file @
b4be27ed
...
...
@@ -270,7 +270,7 @@ module Command = struct
end
else
begin
check_node_id_msg
loc
(
"Unbound identifier
%s (neither a node nor a lexicon)
"
)
node_id_or_lex
kni
;
check_node_id_msg
loc
(
"Unbound identifier
(neither a node nor a lexicon):
"
)
node_id_or_lex
kni
;
Domain
.
check_feature_name
~
loc
?
domain
feature_name_or_lex_field
;
Feat
(
cn_of_node_id
node_id_or_lex
,
feature_name_or_lex_field
)
end
...
...
src/grew_fs.ml
View file @
b4be27ed
...
...
@@ -512,45 +512,11 @@ module P_fs = struct
let
new_acc
=
(
lex_name
,
new_lexicon
)
::
(
List
.
remove_assoc
lex_name
acc
)
in
loop
new_acc
(
t_pat
,
t
)
with
|
Not_found
->
failwith
"TODO<123>"
|
Not_found
->
Error
.
bug
"[P_fs.match_] Cannot find lexicon. lex_name=
\"
%s
\"
"
lex_name
end
|
(
_
::
p_tail
,
_
::
g_tail
)
->
loop
acc
(
p_tail
,
g_tail
)
in
loop
lexicons
(
p_fs_wo_pos
,
g_fs
)
(* ------------------------------------------------------------------------------ *)
(*
| ((_, {P_feature.cst=cst; P_feature.in_param=in_param})::t_pat, (_, atom)::t) ->
(* check for the constraint part and fail if needed *)
let () = match cst with
| P_feature.Absent -> raise Fail
| P_feature.Equal fv when not (List_.sort_mem atom fv) -> raise Fail
| P_feature.Different fv when List_.sort_mem atom fv -> raise Fail
| P_feature.Else (fv1,_,_) when fv1 <> atom -> raise Fail
| _ -> () in
(* if constraint part don't fail, look for lexical parameters *)
match (acc, in_param) with
| (_,[]) -> loop acc (t_pat,t)
| (None,_) -> Log.bug "[P_fs.match_] Parametrized constraint in a non-parametrized rule"; exit 2
| (Some param, [index]) ->
(match Lex_par.select index (string_of_value atom) param with
| None -> raise Fail
| Some new_param -> loop (Some new_param) (t_pat,t)
)
| _ -> Error.bug "[P_fs.match_] several different parameters contraints for the same feature is not implemented" in
loop param (p_fs_wo_pos,g_fs)
*)
(* ------------------------------------------------------------------------------ *)
exception
Fail_unif
let
unif
fs1
fs2
=
let
rec
loop
=
function
...
...
src/grew_rule.mli
View file @
b4be27ed
...
...
@@ -122,12 +122,10 @@ module Rule : sig
val
apply
:
?
domain
:
Domain
.
t
->
t
->
Instance
.
t
->
Instance_set
.
t
val
det_apply
:
?
domain
:
Domain
.
t
->
t
->
Instance
.
t
->
Instance
.
t
option
val
wrd_apply
:
?
domain
:
Domain
.
t
->
t
->
(
G_graph
.
t
*
Libgrew_types
.
big_step
option
)
->
(
G_graph
.
t
*
Libgrew_types
.
big_step
)
option
val
onf_apply
:
?
domain
:
Domain
.
t
->
t
->
G_graph
.
t
->
G_graph
.
t
option
val
gwh_apply
:
?
domain
:
Domain
.
t
->
t
->
Graph_with_history
.
t
->
Graph_with_history_set
.
t
...
...
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