Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 27-10-2008, 09:08 PM   #1 (permalink)
java is fun.
 
digitalage's Avatar
 
Join Date: Jul 2008
Location: ONLINE
Posts: 85
Default Compiler design


i was struggling for A program on net that can check the variable declaration in a file for example int, char, etc.

can anyone provide it to me,,,,,
digitalage is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 27-10-2008, 09:33 PM   #2 (permalink)
Back!
 
red_devil's Avatar
 
Join Date: Jun 2007
Location: Bangalore
Posts: 513
Default Re: Compiler design

a. you think this is the right section ?

b. you want the program to find out if the variable is an integer or a char or float ?
red_devil is offline  
Old 27-10-2008, 10:44 PM   #3 (permalink)
java is fun.
 
digitalage's Avatar
 
Join Date: Jul 2008
Location: ONLINE
Posts: 85
Default Re: Compiler design

the program should identify the int, char, float "keywords". i.e. correct syntex in a program.
digitalage is offline  
Old 27-10-2008, 11:59 PM   #4 (permalink)
Legen-wait for it-dary!
 
dheeraj_kumar's Avatar
 
Join Date: Dec 2004
Location: Chennai
Posts: 2,471
Default Re: Compiler design

Whats wrong with the syntax for a declaration statement? Its

datatype varname1 [, varname2, ...] [arrayindex] [= {value1, value2, ...} ]

I might not understand your question correctly. Give an example...
__________________
If the Start Windows Restart when Windows starts check box is checked Windows Restart will start automatically every time Windows is started. - Actual excerpt from a windows program help file
dheeraj_kumar is offline  
Old 28-10-2008, 12:33 AM   #5 (permalink)
Wise Old Owl
 
harryneopotter's Avatar
 
Join Date: Feb 2007
Posts: 1,009
Default Re: Compiler design

he wants to ask for a program that will read a text file and can identify keywords used in it, and verify if they are used correctly.

Hope I am right.
__________________
Wats the Favourite Mathematical Function of DIGIT FORUM ????

Its "A SINE WAVE" constant

Y ??

They Both keep going "UP AND DOWN, UP AND DOWN............" !!!!!!!!
harryneopotter is offline  
Old 28-10-2008, 11:36 AM   #6 (permalink)
Core i7 (nehalem) Owner
 
ashu888ashu888's Avatar
 
Join Date: Jan 2005
Location: Mumbai
Posts: 3,404
Default Re: Compiler design

I think he jus wats to findout how many KEYWORDS are there present in a given file..
or maybe, still check if he has written them correctly or no (spelling)..

Well, if u are into JAVA, u can use Netbeans or JCreator,and it will highlight the keywords in a different color that the rest of the programming code..
---

btw, wrong section..shud be posted in programming section..
__________________
Core i7-920
MSi X58 Pro-E
Corsair 3x1GB
Tagan BZ1100
GTX280 SSC+MSi N580GTX TWIN FROZR II/OC
WD 1TB
22" Samsung 2233SW
APC SUA1500i UPS

Core i7:thinkdigit.com/forum/showthread.php?t=110397
ashu888ashu888 is offline  
Old 28-10-2008, 11:58 AM   #7 (permalink)
Commander in Chief
 
QwertyManiac's Avatar
 
Join Date: Jul 2005
Posts: 6,658
Default Re: Compiler design

You wish to check if the declarations are right? Why, that's easy. What language do you want your program in?

Or maybe (just guessing) you are looking for tools like LEX and YACC? You can find those here: http://dinosaur.compilertools.net/
__________________
Harsh J
www.harshj.com
QwertyManiac is offline  
Old 28-10-2008, 12:12 PM   #8 (permalink)
Wise Old Owl
 
a_k_s_h_a_y's Avatar
 
Join Date: May 2007
Location: bangalore
Posts: 1,923
Default Re: Compiler design

you are trying to create the output of a LEX and YACC. And to that you want to add Syntax corrector algorithm.

Its very tough not a easy job.
Mathematically very challenging.

This is first phase of compiler design, that is lexical analyzer. But not the actual compiler design itself.
__________________
Sony Ericsson Flashing, Modding, Patching, Hacking And More !
http://www.akshayy.com/sonyericsson/
a_k_s_h_a_y is offline  
Old 28-10-2008, 09:17 PM   #9 (permalink)
Back!
 
red_devil's Avatar
 
Join Date: Jun 2007
Location: Bangalore
Posts: 513
Default Re: Compiler design

i'm still not able to understand what he wants to do !!

Do you want to create a program in which at run time you wanna give a file name as input and you want your original program to find out the data types of variables declared in this input file ??
is that what you want ?
red_devil is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
need a c-compiler! direfulsky Chit-Chat 2 30-09-2007 10:52 AM
Help with C compiler.. plsoft Open Source 5 14-04-2006 02:41 PM
C compiler Generic Superhero QnA (read only) 6 12-01-2006 06:22 PM
best c/c++ compiler sonu_mittal1 Programming 2 28-12-2005 11:51 PM
C compiler for XP x64 Netjunkie Software Q&A 1 26-12-2005 12:11 PM

 
Latest Threads
- by gforz
- by Sujeet
- by soumya

Advertisement




All times are GMT +5.5. The time now is 03:19 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2