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

bbcode v0.1

Name: Anonymous 2007-09-11 22:38 ID:uR52DJVN

[bbcode]
[title="Hello World"]
[author="Anonymous"]

[main]
  [let="a"]5[/let]
  [while]a>0[do]
  [let="a"]a-1[/let]
  Hello, World!
  [val="a"]
  [/do]
  [/while]
  [call="test"]
[/main]

[test]
hihihi world!
[/test]

[/bbcode]

suggest and improve.

Name: Anonymous 2007-09-13 12:23 ID:2lxbdI5m

I've been working on a BBCode implementation myself.  This is what I have so far (about three hours of work, I'd say):
[foldr]
  [d]asd [_][*]a[/*][*]b[/*][/_]
    [add][_][*]$a[/*][*]$b[/*][/_][/add]
  [/d]
  0
  [_][*]1[/*][*]2[/*][*]3[/*][/_]
[/foldr]
6

I suppose the syntax could need some fixin' ;)  It's all really inconsistent.  foldr and add are primitives (I also have a cudder primitive):
prim_cudder fs ((BBList (_:xs)):_) = BBList xs
prim_add    fs ((BBList ((BBInt a):(BBInt b):_)):_) = BBInt (a + b)
prim_foldr  fs ((BBSymbol fn args body):x:(BBList xs):_) = foldr (\ a b -> (apply fs body (zip args [a, b]))) x xs

fap fap fap

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