Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

TML: One step closer to S-expression markup

Name: Anonymous 2013-01-04 22:40

https://github.com/judnich/TupleMarkup#readme

What does /anus/ think? Personally, I don't like the |, but some people may think it makes the language more human readable.

Isn't the parser a bit too long? How long is an actual S-expression parser in C?

Found it after clicking /r/programming accidentally in a comment section of some gay website I don't want to share.

Name: Anonymous 2013-01-04 22:57

It's not hard to convert S-exps to HTML.

https://dis.4chan.org/read/prog/1348433870/

>>4
My solution is to treat symbols as tag and attribute names, and strings as text nodes and attribute values.

(tag-name attr1-name "attr1 value" attr2-name "attr2 value" "text node 1" "text node 2" (tag2-name ...))

An element is either a list or string (text node). If the element is a list, it must start with a symbol (the tag name). If the next element is a symbol, it's an attribute, and must be followed by a string, its value. If the next element is not a symbol, then it's a nested element.

I haven't found any limitations to this approach, other than all attributes must have values.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List