View Feed
group-icon
Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12762 Members
Join this group to post and comment.
sahana
sahana • Mar 2, 2008

help for writing compliers

hi.i need to write yacc and lex programs.so do i have to necessarily load unix?i came across some thing called cygwin.so is it helpful?all i need is to write yacc and lex programs not specific about any os and i dont know how to boot unix all by my self.please help wanted urgently.
friendster7
friendster7 • Mar 2, 2008
hey i found a some information do check out..is is a software
Parser Generator is a YACC and Lex programming tool for Windows. As well as including a Graphical User Interface, the software also includes two versions of YACC and Lex, called AYACC and ALex. Parser Generator is able to generate C, C++ and Java parsers and lexical analysers. This includes both Unicode and Multibyte Character Set (MBCS) variants. In your applications you can create multiple, thread safe, instances of these parsers and lexical analysers. Direct support is provided with Parser Generator for Visual C++ and Borland C++ and C++Builder.
friendster7
friendster7 • Mar 2, 2008
here is the link for download..hope it helps

note:-source net
Parser Generator - Reviews and free Parser Generator downloads at Download.com
friendster7
friendster7 • Mar 2, 2008
if u do find it difficult the best way is to install linux.it is same as how u install windows xp.do partion ur hard disk and install the linux os in that partion..

and u can execute the programs their..

hope it helps
sahana
sahana • Mar 4, 2008
Thanks a ton friendster7 and pradeep.😀
Kaustubh Katdare
Kaustubh Katdare • Mar 4, 2008
[off topic]
Pradeep, I know you're a Linux Guru. How about starting development activity on CE forums? Possible or its just too big for us (at this point). ?
friendster7
friendster7 • Mar 4, 2008
sahana
Thanks a ton friendster7 and pradeep.😀
ur welcome sahana..hope i get help here too..
pradeep_agrawal
pradeep_agrawal • Mar 4, 2008
sahana
Thanks a ton friendster7 and pradeep.😀
Welcome Sahana.


The_Big_K
Pradeep, I know you're a Linux Guru. How about starting development activity on CE forums? Possible or its just too big for us (at this point). ?
Thanks for your appreciation Big K, but the word 'Guru' will be too big for me. I am also beginner in Linux and i am sure many people here will be knowing more then me. Cheers to all CE's

But i am always ready for any such knowledge sharing activities.

-Pradeep
sahana
sahana • Mar 6, 2008
hi.i dont think i understood this software ie parser generator too good.do i have to store the TC and this parser generator software in same folder?

i have to write a source program and have to identify the tokens of my c input file.say my lex program is
%{
%}
%%
"girl1" !"girl2" {printf("noun");}
%%
void main()
{FILE *fp1;
fp1=fopen("in.c","read");
yyin=fp1;
yylex();
}
and my c program is
in.c

girl1 sings girl2 dances

so my i first compile my lex program.then will the tokens be generated automatically?incase of unix,lex tool ie lex prgname.l is used right.what do i do in this case?
pradeep_agrawal
pradeep_agrawal • Mar 7, 2008
sahana
do i have to store the TC and this parser generator software in same folder?
No, you don't need to keep the TC and lex tool in the same folder.

Basically, while writing lex programs, you specify tokens and the action to be performed when that token is found.

When you compile your lex program (like the one given above), it will generate a .c file that contain c code for the specified task.

Now, you have to take that c file and need to compile with TC or any other compiler (i will suggest gcc) and you gets the executable which when executed performs the task.

-Pradeep
sahana
sahana • Mar 16, 2008
i do get a c file,my c file is not getting compiled by TC.should i go necessarily for gcc,that means i have to install linux?i hope borland c++ compiler is same as turboc. coz i guess this parser generator software is compatible with borland c++
sahana
should i go necessarily for gcc
I would always recommend to use gcc over TC.

sahana
that means i have to install linux?
No need to install Linux, use cygwin available at Cygwin Information and Installation or use GCW (gcc for windows) available at SourceForge.net: gcw. Gcc for Windows

-Pradeep

Share this content on your social channels -