Hi, i have two questions about making a c++ based programming language. the first: is there a c++ function or something that can separate text by commas and parenthesis, so if i wanted to write function foo with argument arg1 and arg2, i would need code to take foo(arg1,arg2) and make them separate strings? second question: how would i write the actual compiler? could i take a simple command line compiler source code and add a (really long) header with all of the new functions, wraps them to c++, and then compiles it?

Recommended Answers

All 3 Replies

google cctype header. Its really useful.

Thanks! ill need a little while to go through that a few times to understand the lex and yacc better :) but i understand the tokenizer, although i took a look at cctype and don't really understand it. and anyway, this was only an idea for a mod for a game called uplink, which you are a hacker. in the game, you have certain programs you can buy and use, but i though i could include my own language to program my own hacking programs in the game.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.