i have got a major issue with lexical analyser in PHP. am scanning the C++ program using the PHP coding. When i read from the file, i am not able to get the spaces as in....the following is my code
int a, b, c, sum=0;
a ver basic program to scan and display what all stuffs are present in the c++ program. i am supposed to identify the variables, datatypes, keywords etc.
i could identify all except the identifiers i.e the keywords
i thought of scanning each character and when i encounter a space i'll go for chcking what it is. but in PHP i read the file and outputs the c++ code my program is like