Commits

Sébastien Ferré committed 22d0464

[syntax] inlining parse_ap into parse_vp_be.

  • Participants
  • Parent commits f2fccd1

Comments (0)

Files changed (1)

     method is_kwd coord s =
       let s = if sentence_start = coord then String.uncapitalize s else s in
       List.mem s
-	[ "a"; "all"; "an"; "and"; "are"; "as"; "at";
+	[ "a"; "all"; "an"; "and"; "are"; "as"; "at"; "average";
 	  "be"; "belong"; "belongs"; "between"; "by";
+	  "concat"; "count";
 	  "decreasing"; "defined"; "describe"; "different"; "do"; "does";
 	  "else"; "equal"; "earlier"; "earliest"; "every"; "exactly"; "exist"; "exists";
 	  "first"; "for"; "from";
 	  "has"; "have"; "higher"; "highest"; "how";
 	  "if"; "in"; "increasing"; "is";
 	  "last"; "later"; "latest"; "least"; "less"; "lesser"; "list"; "lower"; "lowest";
-	  "many"; "maybe"; "me"; "more"; "most";
-	  "nil"; "no"; "not";
+	  "many"; "max"; "maximum"; "maybe"; "me"; "min"; "minimum"; "more"; "most";
+	  "nil"; "no"; "not"; "number";
 	  "of"; "or"; "other";
 	  "per";
 	  "relate"; "relates"; "return";
-	  "share"; "shares"; "some"; "such";
-	  "than"; "that"; "the"; "then"; "there"; "thing"; "things"; "to";
+	  "sample"; "share"; "shares"; "some"; "such"; "sum";
+	  "than"; "that"; "the"; "then"; "there"; "thing"; "things"; "to"; "total";
 	  "what"; "where"; "whether"; "which"; "with"; "who"; "whom"; "whose";
 	]
   end
 and parse_vp_be = dcg
     [ _ = kwd "there" -> bool1#true_
     | patt = parse_pattern -> patt
-    | _, d = parse_ap -> d
+    | _ = a_an; _ = ws; m1 = parse_modif_opt; p1 = parse_p1; rel_opt = parse_rel_opt -> rel_opt (Some (bool1#and_ [m1; p1]))
+    | _ = a_the; _ = ws; m1 = parse_modif_opt; p2 = parse_p2; np = parse_p2' -> (fun y -> np (fun x -> bool0#and_ [m1 y; p2 x y]))
+(*    | _, 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; 
+    | p2 = parse_p2; _ = ws; op = parse_op -> (fun x -> op (fun y -> p2 x y)) ]
+(*
 	( op = parse_p2' -> (fun x -> op (fun y -> p2 y x))
         | _ = ws; op = parse_op -> (fun x -> op (fun y -> p2 x y)) )]
+*)
 and parse_vp_have = dcg
     [ _ = kwd "which"; _ = ws; y, p2 = parse_ng2; rel_opt = parse_rel_opt; _ = add_select y (rel_opt None) ->
 	(fun x -> p2 x y)
 and parse_pseudo_prep = dcg
     [ _ = kwd "to" -> arg pseudo_prep_to ]
 and parse_p2' = dcg
-    [ _ = ws; _ = of_by; _ = ws; op = parse_op -> op ]
+    [ _ = ws; _ = kwd "of"; _ = ws; np = parse_np -> np ]
 and parse_g' = dcg
+(*
+    [ _ = ws; y, p2 = parse_ng2; _ = ws; _ = kwd "of"; _ = ws; x, d = parse_ap; lap2 = parse_per ->
+      (y, (fun y -> exists x (fun x -> bool0#and_ [p2 x y; d x]))), lap2
+*)
     [ _ = ws; _ = kwd "of"; _ = ws; ap = parse_ap; lap2 = parse_per -> ap, lap2
     | lap2 = parse_per; _ = ws; _ = kwd "of"; _ = ws; ap = parse_ap -> ap, lap2 ]
 and parse_per = dcg