[Ometa] XML parser
Alexandros Marinos
al3xgr at gmail.com
Sat Aug 14 08:25:46 PDT 2010
Hi Rudiger & Marcus,
@Rudiger: Nice little editor you've made. The JSON output is also quite
cool. What worries me is that last line in your email. You see, I need to
integrate the parser with an ongoing project. Is there any specific license
that goes with the code?
@Marcus: Cheers. I assume the parser goes under Fun's MIT license? Also,
I'll be looking into declarative UIs soon and I like the ideas in Fun. Quite
intriguing.
cheers,
Alexandros
On Fri, Aug 13, 2010 at 11:53 PM, Marcus Westin <narcvs at gmail.com> wrote:
> Here's an implementation of XML parsing in ometa I was using a while back
> for Fun:
>
>
> http://github.com/marcuswestin/fun/blob/7bf60d3133274b02287b956ac6030351b=
c00e729/parsers/xml.ometa
>
>
> On Fri, Aug 13, 2010 at 5:19 PM, R=FCdiger Plantiko <
> ruediger.plantiko at astrotexte.ch> wrote:
>
>> Hi Alexandros,
>>
>> > URI/XML/HTTP thought I'd ask if anyone is aware of OMeta parser efforts
>> in these areas,
>>
>> I also found an XML parser an interesting object for learning OMeta. See
>> my work in progress under
>>
>> http://ruediger-plantiko.net/ometa
>>
>> Enter a string to be parsed in the left text field below the grammar, and
>> hit "Interpretieren (ctrl+2)". You will get a kind of boolean reply -
>> either you get the error message "match failed" in the message line on t=
op
>> of the grammar. Or you will get the reply "[Object object]" and no error=
-
>> this is the case that the string matched the given rule. The result obje=
ct
>> is a structured JSon object that could be processed further. (If you want
>> to see it live, you can inspect it in the debugger by placing a breakpoi=
nt
>> on line 98 in myOmeta.js).
>>
>> For example, the string
>>
>> <?xml version=3D"1.0"?>
>> <a b=3D"c"><d>e</d>f<g h=3D"i"/></a>
>>
>> would be parsed with the rule "document" to a JSon object of the form
>>
>> { name:"a",
>> atts:{b:"c",_length:1},
>> content:[
>> { name:"d",
>> atts:{_length:0},
>> content:["e"]
>> },
>> "f",
>> { name:"g",
>> atts:{h:"i",_length:1},
>> content:[]
>> }
>> }
>>
>> I think you get the idea... :-)
>>
>> And please don't sell it in the web, it's still work in progress :-)
>>
>> Kind regards,
>> R=FCdiger
>>
>>
>>
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~
>> Dr. R=FCdiger Plantiko
>> Bachwiesenstrasse 28
>> CH-8405 Winterthur-Seen
>>
>> http://ruediger-plantiko.net
>>
>>
>>
>>
>>
>> _______________________________________________
>> OMeta mailing list
>> OMeta at vpri.org
>> http://vpri.org/mailman/listinfo/ometa
>>
>
>
>
> --
> My code http://github.com/marcuswestin
> My latest http://twitter.com/marcuswestin
>
> _______________________________________________
> OMeta mailing list
> OMeta at vpri.org
> http://vpri.org/mailman/listinfo/ometa
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://vpri.org/pipermail/ometa/attachments/20100814/79d99dd1/attachme=
nt.htm
More information about the OMeta
mailing list