Related articles |
---|
Look for a LALR grammar for visual basic tsupplisson@suresnes.marben.fr (Thierry Supplisson) (1997-08-16) |
Re: Look for a LALR grammar for visual basic thetick@scruz.net (Scott Stanchfield) (1997-08-19) |
Re: Look for a LALR grammar for visual basic genew@vip.net (1997-08-20) |
Re: Look for a LALR grammar for visual basic jrr@atml.co.uk (1997-08-24) |
Re: Look for a LALR grammar for visual basic thetick@magelang.com (Scott Stanchfield) (1997-09-07) |
Re: Look for a LALR grammar for visual basic genew@vip.net (1997-09-12) |
From: | jrr@atml.co.uk (John Rickard) |
Newsgroups: | comp.compilers |
Date: | 24 Aug 1997 14:54:05 -0400 |
Organization: | ATM Ltd |
References: | 97-08-050 97-08-052 97-08-065 |
Keywords: | parse |
Gene Wirchenko (genew@vip.net) wrote:
: Consider the equivalent in C:
: if (x==1)
: {
: exit(EXIT_SUCCESS);
: target: }
:
: You could say that there is a null statement before the } and
: that may be so. (I'm not up on the Standard sufficiently to be sure.)
No, this isn't standard C. (It's an extension allowed by gcc, if you
don't use the -ansi -pedantic flags.) You need an explicit null
statement (";"):
if (x==1)
{
exit(EXIT_SUCCESS);
target: ; }
--
John Rickard
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.