Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

interpreter

Status
Not open for further replies.
gets will the the whole line in
scanf has a complicated syntax between the quotes for parsing all sorts of stuff.

If the language you are interpreting has a defined syntax, might be an idea to look at lex and yacc.
 
Google is you friend

lex & yacc gets & scanf - example of usage
The thing is to define you language first. If it has common delimiters, you could use strtok to split up the words but note that this is not thread safe so if you are using it in a multi threaded env, always use it in the same thread.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top