Commits

Sébastien Ferré committed fad4ee0

Avoiding some ambiguities with auxiliary verbs (using is-starring instead of is-starring)

Comments (0)

Files changed (1)

   [ vp = parse_bool bool1 parse_vp_aux -> vp ]
 and parse_vp_aux = dcg
     [ _ = does; f1 = parse_aux_not; _ = ws; vp = parse_vp_atom -> f1 vp
-    | _ = be; f1 = parse_aux_not; _ = ws; vp = parse_vp_be -> f1 vp
-    | _ = have; f1 = parse_aux_not; _ = ws; vp = parse_vp_have -> f1 vp
+    | _ = be; f1 = parse_aux_not_opt; _ = ws; vp = parse_vp_be -> f1 vp
+    | _ = have; f1 = parse_aux_not_opt; _ = ws; vp = parse_vp_have -> f1 vp
     | vp = parse_vp_atom -> vp ]
+and parse_aux_not_opt = dcg
+    [ f1 = parse_aux_not -> f1
+    |  -> bool1#id ]
 and parse_aux_not = dcg
     [ "n't" -> bool1#not_
-    | _ = ws; _ = kwd "not" -> bool1#not_
-    |  -> bool1#id ]
+    | _ = ws; _ = kwd "not" -> bool1#not_ ]
 and parse_vp_atom = dcg
     [ _ = share; _ = ws; vp = parse_vp_share -> vp
     | p1 = parse_p1; cp = parse_cp -> (fun x -> cp (p1 x))
 (*    | _, d = parse_ap -> d *)
 (*    | np = parse_np_void -> (fun x -> np (fun y -> exists y (unify x))) *)
     | np = parse_np -> (fun x -> np (fun y -> unify x y))
-    | rel = parse_rel -> rel
-    | p2 = parse_p2; _ = ws; op = parse_op -> (fun x -> op (fun y -> p2 x y)) ]
+    | rel = parse_rel -> rel ]
+(*    | p2 = parse_p2; _ = ws; op = parse_op -> (fun x -> op (fun y -> p2 x y)) ] *) (* ambiguous *)
 (*
 	( op = parse_p2' -> (fun x -> op (fun y -> p2 y x))
         | _ = ws; op = parse_op -> (fun x -> op (fun y -> p2 x y)) )]
         (fun x1 -> det y (p2 x1) (fun y -> np (fun x2 -> p2 x2 y)))
     | _ = kwd "with"; _ = ws; np = parse_np; _ = ws; det = parse_det; _ = ws; y, p2 = parse_ng2 ->
 	(fun x1 -> np (fun x2 -> det y (p2 x1) (fun y -> p2 x2 y))) ]
+(* TODO: add (diff x1 x2) INTO np *)
 (*
 and parse_ap = dcg
     [ ap = parse_ap_atom -> ap ]
     [ _ = relate; t = new_var -> rel (Uri pseudo_p2_relates) t
     | op = parse_pred2 -> pred2 op
     | op = parse_func1 -> func1 op
+    | _ = be; "-"; uri = parse_uri; t = new_var -> rel (Uri uri) t
     | pre = parse_p2_prefix; uri = parse_uri; _ = parse_p2_flexion; t = new_var -> rel (Uri (pre uri)) t
     | uri = parse_uri; _ = parse_p2_flexion; suf = parse_p2_suffix_opt; t = new_var -> rel (Uri (suf uri)) t ]
 and parse_p2_flexion = dcg