![]() |
|
#1
|
|||
|
|||
Need help in writing a parser programHi,
I want to write a parser program which will take commands typed by users and will parse it against a parse tree and if command is syntactically correct,will return a a pointer to a function which will functionally execute the command. I can write a functions to collect the commands and break them separately and store them in an array.I need help in developing a parser function which will parse the command for syntax against a structure conatining the valid command syntax or something similar to that and should return a pointer to a function which will execute the command.The function pointer can also be a part of the parse tree structure. A typical command would be like "add user" or "add group" the parse structure would look something like one below. CPP / C++ / C Code:
so parser function will return function_pointer. So the question is how to write a function that returns the pointer to another function and how to use this pointer to call another function? Any help will be appriciated. Thanks, |
|||
Recent GIDBlog
Not selected for officer school by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need help with a C program (Long) | McFury | C Programming Language | 3 | 29-Apr-2004 20:06 |
| Modify a C program | ayoub | C Programming Language | 3 | 15-Mar-2004 11:34 |
| Please Help, problems writing newbie c program | soulfly | C Programming Language | 14 | 04-Mar-2004 15:16 |
| Please Help, problems writing c program REVISED | soulfly | C Programming Language | 6 | 03-Mar-2004 13:57 |
| Please Help, problems writing newbie C program ReREVISED | soulfly | C Programming Language | 0 | 02-Mar-2004 22:01 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The