Thanks. That's a useful package to know and solves the parsing problem. Now 
I need to syntax transform the xexpr into my target minimal list. Time to 
dig into *Fear of Macros*.

A.

On Saturday, 18 August 2018 12:19:12 UTC+10, Shu-Hung You wrote:
>
> The markdown package by Greg Hendershott provides a parser that create 
> HTML like xexprs from a string. The rest would be easy. 
>
> https://docs.racket-lang.org/markdown/index.html 
>
>
>
> On Fri, Aug 17, 2018 at 8:31 PM, Andrew J <and...@alphajuliet.com 
> <javascript:>> wrote: 
> > Hi. In a little side project, I'm looking for an simple Racket-y way to 
> > transform a bulleted list into a tree structure, maybe like sxml. 
> > 
> > As an example, this... 
> > 
> > - a 
> >   - b c 
> >   - d e f 
> >     - g h 
> > 
> > would get transformed into something like this... 
> > 
> > '(a (b c) (d e f (g h))) 
> > 
> > I can see a few ways to do this, from recursively counting indents, 
> right 
> > through to making a mini DSL (à la Beautiful Racket), but I'm wondering 
> what 
> > a minimal idiomatic solution might look like? 
> > 
> > 
> > A. 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Racket Users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to racket-users...@googlegroups.com <javascript:>. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to