vaib
unread,Jun 19, 2008, 5:28:51 PM6/19/08You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
hi all . i am trying to build a parser in ANSI C . I made a lexical
analyser in the same language a while ago . It was a very simple lexer
that tokenised a simple C source code text file - basically a very
simple lexer . I had made use of hash tables for the data structure .
Now i want to know how to build a parser . I'll let you know what i
know about parser building - i'll need a grammar written in the form
of regular expressions , i would need to implement something called a
parse tree in a data structure of my choice and so on . The problem is
that i know stuff here and there but i haven't got a full picture as
to what approach is to be taken to attack the problem ,i.e, i do not
know the steps involved in the learning curve for parser building .
Can anyone out there kindly layout the steps to be taken in proper
order ? i want to have a working parser in the next 15 days since
thats the amount of time after which my college resumes . I have
compiler construction in my next semester so i want to have atleast
the front-end ready before the course starts . I do not want a very
efficient , high-end or hi-tech parser - just a simple one that
demonstrates the concept decently . Any language whose grammar (in the
form of REs) is available would do , its not that i want to stick with
C alone since i made my lexer for that . It would be very appreciative
if anyone who's made a parser before in C could lend me the source
code for studying purposes . Resorces that would not take much time
are welcome - you see , since i have time constraints i'd like to get
to the coding part as soon as possible (and please tell me where to
get that grammar from too) .
Thanking in anticipation . Vaib .