Follow-up Comment #7, bug #31691 (project guile):

I suspect that this bug is a feature request.

Anyway I coded another solution which sematics is more exact.
The idea is to quote ... and each match will remove one of the quotes around
.... So now this works,

(sxml-match '(a (b (c 1) (c 2 3)) (b (c 4)) (b (c 5)))
 ((a ,x ...) 
    (list (sxml-match x 
               ((b ,y '...) 
                   (list (sxml-match y 
                            ((c ,z ''...) z)) '...))) ...)))

$1 = (((1) (2 3)) ((4)) ((5)))

attached is a git diff of the code.

the bad thing with this code is that it's not possible to output
the '... symbol.

/Stefan

(file #23968)
    _______________________________________________________

Additional Item Attachment:

File name: sxml-match.ss.2.diff           Size:2 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?31691>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


Reply via email to