Thomas Lynch wrote on 07/29/2015 11:22 PM:
The most obvious difference between racket's xexpr and yours is the
'@' as the head of the attributes list. Any idea where else I will
see divergences?
You might not be able to implement a tool that works correctly with all
conforming SXML, until
On Thu, Jul 30, 2015 at 11:09 AM, Thomas Lynch <
thomas.ly...@reasoningtechnology.com> wrote:
> Great! thanks Neil!
>
Ah spoke too soon! Those links just point back into this very same thread!
The most obvious difference between racket's xexpr and yours is the '@' as
the head of the attributes
Great! thanks Neil!
On Thu, Jul 30, 2015 at 11:02 AM, Neil Van Dyke
wrote:
> Thomas Lynch wrote on 07/29/2015 10:25 PM:
>
>> Neil can you comment on what other differences I might expect to find?
>>
>
> Are the below 2 messages to the list helpful?
>
> * Historical background on SXML and Racket
Thomas Lynch wrote on 07/29/2015 10:25 PM:
Neil can you comment on what other differences I might expect to find?
Are the below 2 messages to the list helpful?
* Historical background on SXML and Racket xexpr:
https://groups.google.com/d/msg/racket-users/yaOtPkd_qvs/8ruIg-Smr7cJ
* Technical n
Alexander, you will notice I pulled a couple lambdas to the top, and added
a test routine at the bottom take those out ... then the code you sent
isn't shorter. I am also expecting to have to add more code to the
intermediate points. I like seeing those named. I think it is easy to
read. ... Wh
.. the conversion for neil's xexpr .. at this point the two converters can
be abstracted by passing in two lambdas, is-at-list predicate, and
extract-at-list. Neil can you comment on what other differences I might
expect to find?
(define (neil-xexpr->tok-tree an-xexpr)
(define (is-at-list
Would it be easier using match?
(define (xexpr->tok-tree an-xexpr)
(match as-xexpr
['()
'()]
[(not (cons _ _))
(tok-make ...)]
[(list tag)
(list tag)]
[(list-rest tag (? is-at-list at-list) r2)
]
))
On Jul 29, 2015, at 7:56 AM, Thomas Lynch
wrot
I wrote primitive conversion routines to bring the xexpr or Neil's xexpr
into ... oh gosh, my parser token format, which by coincidence is very
close. Just playing with this now .. In my target format token children
are always other tokens. All values given as attributes in value tokens.
I use an
Yes, more or less. In an X-expression, an attribute list is the only element
that's a list made of sublists. A list of embedded X-expressions, OTOH, will
start with a symbol. To look at it another way,
> (cons symbol (list xexpr ...))
really amounts to
> (list symbol xexpr ...)
which is just
9 matches
Mail list logo