From 7faf70e14da28940f7c8beba81e8ed7d25ca61c5 Mon Sep 17 00:00:00 2001 From: Jared Hance Date: Wed, 16 Jul 2014 15:14:12 -0400 Subject: [PATCH 1/2] Some klay changes. --- try/bin/klay.hoon | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/try/bin/klay.hoon b/try/bin/klay.hoon index bb727badd..8b312255e 100644 --- a/try/bin/klay.hoon +++ b/try/bin/klay.hoon @@ -5,9 +5,9 @@ + => + |% - ++ blob $% [%delta p=@ q=blob r=udon] - [%direct p=@ q=* r=umph] - [%indirect p=@ q=* r=udon] + ++ blob $% [%delta q=blob r=udon] + [%direct q=* r=umph] + [%indirect q=* r=udon] == ++ yaki ,[p=(list yaki) q=(map path blob) r=@ t=@ud] :: later t=@da :: @@ -16,11 +16,11 @@ ++ hash-blob |= p=* ^- blob - [%direct (mug p) p %c] + [%direct p %c] ++ hash-yaki |= [p=(list yaki) q=(map path blob) t=@ud] :: later t=@da ^- yaki - [p q (mug [p q]) t] + [p q (mug [(roll (turn p |=(p=yaki r.p)) add) q t]) t] :: later quicksort? ++ grab |= p=blob ?- -.p @@ -265,4 +265,5 @@ ::(zeal n6 n7) ::(zerg n1 n2) ::(mate n2 n3) -[%result ((hard ,@t) (grab (need (~(get by q:(merge n3 n2 8 mate)) ~['test'])))) (merge n2 n3 9 forge)] +:- [%result ((hard ,@t) (grab (need (~(get by q:(merge n3 n2 8 mate)) ~['test'])))) (merge n2 n3 9 forge)] +[%result ((hard ,@t) (grab (need (~(get by q:(merge n3 n2 8 mate)) ~['test'])))) (merge n3 n2 9 forge)] From 5987ff2f8d86a2c0f1c52cfcbe8e10d66b94c6d5 Mon Sep 17 00:00:00 2001 From: johncburnham Date: Wed, 16 Jul 2014 19:46:46 -0700 Subject: [PATCH 2/2] improved xml parser --- arvo/zuse.hoon | 50 ++++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index ddb720c7e..c6a0246fa 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -883,45 +883,47 @@ ++ xmlp :: xml parser |% ++ apex + =+ spa=;~(pose comt whit) %+ knee *manx |. ~+ - %+ sear - |=([a=marx b=marl c=mane] ?.(=(c n.a) ~ (some [a b]))) - %+ ifix [(star whit) (star whit)] - ;~ pose - ;~(plug head (star ;~(pose apex chrd)) tail) + %+ ifix [(star spa) (star spa)] + ;~ pose + %+ sear + |=([a=marx b=marl c=mane] ?.(=(c n.a) ~ (some [a b]))) + ;~(plug head (more (star comt) ;~(pose apex chrd)) tail) empt - == + == :: ++ attr :: attribute %+ knee *mart |. ~+ %- star - ;~ pfix ace + ;~ pfix (plus whit) ;~ plug name ;~ pfix tis ;~ pose - (ifix [doq doq] (star ;~(less pam gal gar doq prn))) - (ifix [soq soq] (star ;~(less pam gal gar soq prn))) + (ifix [doq doq] (star ;~(less doq escp))) + (ifix [soq soq] (star ;~(less soq escp))) == == == == :: - ++ chrd :: chracter data + ++ chrd :: character data %+ knee *manx |. ~+ - %+ cook |=(a=* ((hard mars) :/(a))) - %- plus - ;~ less pam gal gar soq doq - ;~ pose - (cold 62 (jest '>')) - (cold 60 (jest '<')) - (cold 38 (jest '&')) - (cold 39 (jest ''')) - (cold 34 (jest '"')) - prn - == - == + %+ cook |=(a=tape :/(a)) + (plus ;~(less soq doq ;~(pose (just `@`10) escp))) :: + ++ comt %+ ifix [(jest '')] :: comments + (star ;~(less (jest '-->') ;~(pose whit prn))) + :: + ++ escp + ;~ pose + ;~(less gal gar pam prn) + (cold '>' (jest '>')) + (cold '<' (jest '<')) + (cold '&' (jest '&')) + (cold '"' (jest '"')) + (cold '\'' (jest ''')) + == ++ empt :: self-closing tag - %+ cook |=(a=marx `[marx marl mane]`[a ~ n.a]) - (ifix [gal (jest '/>')] ;~(plug name attr)) + (ifix [gal (jest '/>')] ;~(plug ;~(plug name attr) (cold ~ (star whit)))) :: ++ head :: opening tag %+ knee *marx |. ~+