Update of /cvsroot/q-lang/faust2pd/faust2pd
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23096/faust2pd
Modified Files:
faustxml.q
Log Message:
Fix incompatibility with XML generated by latest (cvs) Faust version.
Index: faustxml.q
===================================================================
RCS file: /cvsroot/q-lang/faust2pd/faust2pd/faustxml.q,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** faustxml.q 7 Oct 2007 20:15:44 -0000 1.1.1.1
--- faustxml.q 9 Jun 2008 09:46:17 -0000 1.2
***************
*** 104,107 ****
--- 104,113 ----
= throw "invalid XML data" otherwise;
+ private str_val S;
+
+ str_val S:String
+ = S where 'S:String = valq S;
+ = S otherwise;
+
private parse_prop S, parse_control X, parse_group CD X;
***************
*** 123,128 ****
= "";
parse_prop S:String
! = S where 'S:String = valq S;
! = S otherwise;
parse_prop _ = "" otherwise;
--- 129,133 ----
= "";
parse_prop S:String
! = str_val S;
parse_prop _ = "" otherwise;
***************
*** 133,137 ****
where ATTRS = dict ATTRS, PARAMS = dict $ map param PARAMS,
TYPE:String = ATTRS!"type", ID:Int = val $ ATTRS!"id",
! LABEL:String = val $ PARAMS!"label";
parse_control _ = throw "invalid XML data" otherwise;
--- 138,142 ----
where ATTRS = dict ATTRS, PARAMS = dict $ map param PARAMS,
TYPE:String = ATTRS!"type", ID:Int = val $ ATTRS!"id",
! LABEL:String = str_val $ PARAMS!"label";
parse_control _ = throw "invalid XML data" otherwise;
***************
*** 165,168 ****
[node (element "label" _ _) [node (text LABEL:String) _]|PARAMS]
= C where C:Control = (val $ "faustxml::"++ TYPE)
! (val LABEL,map (parse_group CD) PARAMS);
make_group _ _ _ = throw "invalid XML data" otherwise;
--- 170,173 ----
[node (element "label" _ _) [node (text LABEL:String) _]|PARAMS]
= C where C:Control = (val $ "faustxml::"++ TYPE)
! (str_val LABEL,map (parse_group CD) PARAMS);
make_group _ _ _ = throw "invalid XML data" otherwise;
|