(define-grammar sexp
(sexp (or (#\( (* sexp) #\))
(#\( (* sexp) #\. sexp #\)) atom))
(atom (or symbol string number vector)))
Because fancy syntaxes are obsolete.
Name:
Anonymous2011-05-09 13:23
The main() should be like ThisIsWhereTheProgramStarts() so ein can sell it to the enterprise crew. And after that just something like Perl.
Name:
Anonymous2011-05-09 17:55
I was thinking about making a language like this once.
It would be like LISP but instead of using () all the time (which is hard to read), you would use ({[({[]})]}) and keep repeating that. So every time you nest them, you would go to the next type of parens:
(defun fibonacci {N}
{if [or (zerop N) (= N 1)]
1
[let
({F1 [fibonacci (- N 1)]}
{F2 [fibonacci (- N 2)]})
(+ F1 F2)]})