Parsing the statements is not the problem. Problem is to track them down from statements() and keeping track also about the line number where statement exists, unless you use lot's of ram by using huge arrays.
Yes, I agree and understand.
"If a compound statement has 3 statements in it, which one caused the error ?"
Ram usage, (IMHO), should not be your major concern. Today, ram is cheap.
Whether 3 or 4 statements are formed on a single line, or, if they take 3 or 4 separate lines is of no consequence.
It still takes the same amount of ram to store the statements.
Quote
Mystiks idea is neat, i have tested it, it works but im wondering way to make it with less ram usage.
During parsing, each statement has to be tokenized and stored in an array, linked list or structure of some type.
If one element (integer) refers to which statement number and one element (integer) refers to what line number, that's all you need.
Not a huge waste of ram.
Quote
Aye, i agree. However i cant decide how the rest of the world thinks so i ratherly allow multiple statements per line.
I'm affraid you will never be able to please the rest of the world.
That's why there are so many different programming languages, let alone dialects.
Even languages developed at major universities have failed because they couldn't attract an audience.
It seems that unless a language has the word "Visual" in front of it, it doesn't get a lot of respect from serious programmers or institutions.
If you don't believe me, just Google: "programming jobs".



