vc++, graphics related problem..please !!!

  • Thread starter Mahesh Kumar. R
  • Start date
M

Mahesh Kumar. R

hello everybody, i'm new to this group and also new bie to vc++. i
want to develop a parser like program which can able to identify the
predefined wordings -> windows control events(vc++).
example :
if the user write like this in text file(config.file).,
/* user defined file */

@DRAW MYLINE LOC
@LOAD BITMAPP SOURCE ...
@DISPLAY TEXT LOC STRING

/*....................*/


my parser program able to read a line at a time from a file and call
the appropriate VC++ graphics routines such as
line(x,x,x,x),loadbitmap(x,x,x,x)etc..the parameters for this routines
are supplied during runtime.

please give me ur suggestion and way to approach in a algorithm
atleast.becoz this is my univ project.


Expecting from u'll script gurus,
Mahesh (b'lore)
 
M

Martijn Lievaart

hello everybody, i'm new to this group and also new bie to vc++. i
want to develop a parser like program which can able to identify the
predefined wordings -> windows control events(vc++).
example :
if the user write like this in text file(config.file).,
/* user defined file */

@DRAW MYLINE LOC
@LOAD BITMAPP SOURCE ...
@DISPLAY TEXT LOC STRING

/*....................*/


my parser program able to read a line at a time from a file and call
the appropriate VC++ graphics routines such as
line(x,x,x,x),loadbitmap(x,x,x,x)etc..the parameters for this routines
are supplied during runtime.

please give me ur suggestion and way to approach in a algorithm
atleast.becoz this is my univ project.

Nice project, but a bit complex for a newbie.

First try to create something that parses the input, even if it does
nothing with it. A recursive descent parser would be adequate, or it might
even be simpler.

Then think how you will store variables if any.

Decide if you execute the script while parsing (execute a line as it's
read) or you parse the whole script first and then execute the stored
version.

Get familiar with the standard containers, you'll use them a lot.

If you have more detailed questions, don't hesitate to ask,
M4
 
M

Mahesh Kumar. R

Martijn Lievaart said:
Nice project, but a bit complex for a newbie.

First try to create something that parses the input, even if it does
nothing with it. A recursive descent parser would be adequate, or it might
even be simpler.

Then think how you will store variables if any.

Decide if you execute the script while parsing (execute a line as it's
read) or you parse the whole script first and then execute the stored
version.

Get familiar with the standard containers, you'll use them a lot.

If you have more detailed questions, don't hesitate to ask,
M4


hello M4, I do know how 2 design a parser which excutes scripts. I
tried yesterday on Streaming etc. but parser is still unctouched.
Please provide me a bit of code about parser with example.
With regards,
Mahesh Kumar.
B'lore
 
M

Martijn Lievaart

hello M4, I do know how 2 design a parser which excutes scripts. I
tried yesterday on Streaming etc. but parser is still unctouched.
Please provide me a bit of code about parser with example.

I don't follow you. You know how to design a parser, so what is the
problem?

This group is about learning the languages C and C++, I get the feeling
you would be better of in a group devoted to parsers or algorihms, but
your problem is not clear so I cannot really tell.

M4
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top