2009/4/3 Erick Tryzelaar <idade...@users.sourceforge.net>

>
> I've started updating dypgen to the latest released version,
>

I have looked quickly at flx_parse.dyp:

The constructor Keep_grammar has no argument anymore,
you must replace :
    Keep_grammar true
with just
    Keep_grammar

The constructor Priority_data doesn't exist anymore.
It is replaced with Relation. Adding new priorities is much
simpler, you don't have to use insert_priority, you just use
the priority in a new rule or in a relation (with the string
of its name).

In the following code:

let priority_data =
        fold_left (fun pd prios ->
          let pd,plist = fold_left (fun (pd,plist) pri ->
            let pd,pr = insert_priority pd pri in
            pd,(pr::plist)
          ) (pd,[]) prios
          in
          match plist with
          | []
          | [_] -> pd
          | _ ->  add_list_relations pd (rev plist)
        ) dyp.priority_data prios
      in

      let add_rules =
 List.map (extend_grammar dyp priority_data) rules in
      let local_data =
 { m with loaded_dssls = to_install @ m.loaded_dssls } in
      (0,sr,Snull),[Add_rules add_rules; Local_data local_data;
Priority_data priority_data]

You can remove entirely the block:
    let priority_data = ... in
And just replace:
    Priority_data priority_data
with:
    Relation prios
------------------------------------------------------------------------------
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to