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

bλcode

Name: Anonymous 2009-06-18 12:50

D:\Projects\HaskellBBS>ghci BBCode
GHCi, version 6.10.2: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
[1 of 5] Compiling BBCode.Common    ( BBCode\Common.hs, interpreted )
[2 of 5] Compiling BBCode.Parser    ( BBCode\Parser.hs, interpreted )
[3 of 5] Compiling BBCode.Tokenizer ( BBCode\Tokenizer.hs, interpreted )
[4 of 5] Compiling BBCode.Evaluator ( BBCode\Evaluator.hs, interpreted )
[5 of 5] Compiling BBCode           ( BBCode.hs, interpreted )
Ok, modules loaded: BBCode, BBCode.Evaluator, BBCode.Common, BBCode.Parser, BBCode.Tokenizer.
*BBCode> interpret "[define=p][p/][/define][p/]"
Loading package mtl-1.1.0.2 ... linking ... done.
Loading package xhtml-3000.2.0.1 ... linking ... done.
*** Exception: stack overflow
*BBCode> ^Z
Leaving GHCi.

D:\Projects\HaskellBBS>


Looks like I need to implement more security and error handling before I integrate the bλcode interpreter into a BBS.
Anyone has any suggestions for solving the halting problem?

I also wanted to brag a bit

Name: Anonymous 2009-06-18 13:19

>>4
But well, calling functions inside funtions is necessary if I want to enable something like
[define=expert][b][i][o][u]$_[/u][/o][/i][/b][/define]
Since all looping would have to be done through recursion, I'll probably just disallow calling functions which weren't declared beforehand, so that both [define=p][p/][/define] and [define=a][b/][/define][define=b][a/][/define] will fail.

Can you guys think of any scenarios where recursion/looping would be necessary?

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