Whats a parser?

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Whats a parser?

Post by {Nathan} »

I know this sounds REALLY stupid, but please, kindly and politly tell me what a parser is. No, i am not a noob. Thanks all.
Image
Stormy

Post by Stormy »

To split an string in parts.....

For example: "MY_Command Parameter1 Parameter2"

to an array:

token$(0) = "MY_Command"
token$(1) = "Parameter1"
token$(2) = "Parameter2"
Anonymous

Post by Anonymous »

That is a specific kind of parser called a "tokenizer".

A parser is just a piece of code which can analyze an inputted string or data and converts it to information comprehendable for your program. ;)
Post Reply