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.
Replies
-
friendster7hey 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. -
friendster7here is the link for download..hope it helps
note:-source net
#-Link-Snipped-#
-
friendster7if 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 -
pradeep_agrawalFor more details on Lex and YACC, refer forum thread
#-Link-Snipped-#
Also, look at the link Free Compiler Construction Tools: Lexer and Parser Generators(thefreecountry.com)
-Pradeep -
sahanaThanks a ton friendster7 and pradeep.๐
-
Kaustubh Katdare[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
ur welcome sahana..hope i get help here too..sahanaThanks a ton friendster7 and pradeep.๐ -
pradeep_agrawal
Welcome Sahana.sahanaThanks a ton friendster7 and pradeep.๐
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'sThe_Big_KPradeep, 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). ?
But i am always ready for any such knowledge sharing activities.
-Pradeep -
sahanahi.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
No, you don't need to keep the TC and lex tool in the same folder.sahanado i have to store the TC and this parser generator software in 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 -
sahanai 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++
-
pradeep_agrawal
I would always recommend to use gcc over TC.sahanashould i go necessarily for gcc
No need to install Linux, use cygwin available at Cygwin or use GCW (gcc for windows) available at gcw. Gcc for Windows download | SourceForge.netsahanathat means i have to install linux?
-Pradeep
You are reading an archived discussion.
Related Posts
i want a unique topic for paper presentation and my areas of interest are basically the new gadgets...
what does this statement mean??
void strcpy(char *buffer, char const *string)
Can anyone guide me on why the DC load-line for a class A transformer coupled power amplifier is verticle?[I am aware that vcc=vce but still unsure why.]Thanks for helping!
I wish we were bigger and had our own teams working on this! Have you guys heard about the Google Lunar X Prize?
๐
About the prize:
The Google Lunar...
guys i think their is no interaction at all here..can their be any suggestion's to make some interaction in this forum...
their may be lot of members registering but they...