Article View: comp.std.c
Article #4435Extract Function Names Using lex&yacc
From: Philip Shao WAS
Date: Wed, 06 Dec 1995 19:01
Date: Wed, 06 Dec 1995 19:01
19 lines
1044 bytes
1044 bytes
I am posting the following question to you, compiler experts. Please kindly
give me some advice.
How does C compiler extract function names from a typical C file:
........
........
extern void funca(int a, (char*) b)
{
.....
}
static int funcb(a, b)
int a;
char* b:
{
.....
}
How do lex & yacc extract funca and funcb and assign proper function types?
I have looked at ANSI-C-grammar-l (lex) and ANSI-C-grammar-y (yacc) and I got
lost. Your advice via e-mail or posting is appreciated.
Technical Details
Message-ID:
<4a4pb6$rh4@ipxpress.aws.waii.com>Path:
arc1-ca.pugleaf.net!ipxpress.aws.waii.com!usenetShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!ipxpress.aws.waii.com!usenet From: Philip Shao WAS <pshao> Newsgroups: comp.std.c Subject: Extract Function Names Using lex&yacc Date: 6 Dec 1995 19:01:58 GMT Organization: Western Atlas Loggin Services Message-ID: <4a4pb6$rh4@ipxpress.aws.waii.com> NNTP-Posting-Host: ipxpress.aws.waii.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 1.1N (X11; I; SunOS 4.1.1 sun4c) To: shao@nol.net X-URL: news:comp.std.c