Operating System - HP-UX
1828482 Members
2642 Online
109978 Solutions
New Discussion

lex and yacc C parser rules and parser examples

 
Deepak_5
Advisor

lex and yacc C parser rules and parser examples

Hi,

Does anyone know about lex and yacc C parser rules and parser examples, Is there a website, where I can download them and use.

I need to parse some c files and do analysis(functions arguments/Macros/return value, etc).
Please let me if anyone is aware of this.

Thanks and Regards
Deepak

1 REPLY 1
A. Clay Stephenson
Acclaimed Contributor

Re: lex and yacc C parser rules and parser examples

Hi:

The best thing to do is download the source for gcc from
http://hpux.cs.utah.edu/hppd/hpux/Gnu/gcc-2.95.2/

You will find the yacc and lex for the c compiler itself there. I also suggest that you get a copy the the O'Reilly Book 'Lex and Yacc'; it is quite good.

Clay
If it ain't broke, I can fix that.