View Single Post
05-16-2011, 11:12 AM
#1
unikorndesigns is offline unikorndesigns
unikorndesigns's Avatar
Status: Junior Member
Join date: May 2011
Location:
Expertise: Web Designing and Development
Software: Photoshop, Dreamweaver and etc
 
Posts: 41
iTrader: 0 / 0%
 

unikorndesigns is on a distinguished road

  Old  Help with Lexical Analyser

guys,
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

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
void main()
{
int a, b, c, sum=0;
sum=a+b;
cout<<sum;
}

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

#include#include#includecvoidmain(){inta,b,c,sum=0 ;sum=a+b;cout<;}

ANY HELP?? PLEASE thanks in advance

Reply With Quote