Skip to main content
gamedev.net
🔒 Locked

Metaprogramming techniques

Started by Grizwald 4 replies 400+ views
Original Post
Grizwald
Grizwald
Ok, i just finished writing the productions for expressions and some simple logic/flow control statements in my parser. Now i''m on to the fun stuff - Metaprograms. I want my language to support metaprogramming at the level of a langauge like Lisp. What techniques other than templates and macros are used for metaprogramming?
I love me and you love you.
CoffeeMug
CoffeeMug
That depends entirely on your language. For instance, you can''t use Lisp-style macros effectively unless the source code is presented in abstract syntax trees. If you describe what your language is/will be like, I could probably give you more ideas.
Grizwald
Grizwald
first off, screw you you anonymous bastard. Searching only helps when you know what to look for. I searched for metaprogramming, and got nothing but the boost library and human brain functions. I searched macros, and that is a very broad topic. I also searched for Lisp macros, and some information. I want GENERAL stuff. I know how to use the internet, fuck-head.

and YOU coffee mug I do plan on exposing both the symbol table and the AST.

I love me and you love you.
Grizwald
Grizwald
quote:

Try to make metaprogramming similar to normal programming in your language



i found that oddly inspiring. thank you
I love me and you love you.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.