orangeduck / BuildYourOwnLisp

Learn C and build your own programming language in under 1000 lines of code!
http://www.buildyourownlisp.com/
Other
2.93k stars 396 forks source link

Lisp syntax without ( ) at start and end #82

Closed 235689 closed 9 years ago

235689 commented 9 years ago

Hi,

I am reading your book and maybe this is a noob question, but I would like to create a language syntax that doesn't require () at the start and the end. Example:

Actual syntax (def {s} = 3)

Syntax that I want def {s} = 3

The same with order in math operations:

Actual syntax (+ 4 5)

Syntax that I want (3 + 5)

orangeduck commented 9 years ago

Hey,

If you follow and understand the chapters of the book on languages, parsing, and syntax you should be able to create a language with whatever syntax you like - although I wont guide you through the process of creating any specific syntax other than the one in the book. Also it is probably a good idea to follow through the whole book first and then go back and make the syntax changes you want after.

Thanks,

Dan