Article View: comp.std.c
Article #2113Summary: FILE *yyin=stdin; not ANSI-C??
From: Emmerik P.J.L. van
Date: Sat, 10 Oct 1992 21:59
Date: Sat, 10 Oct 1992 21:59
25 lines
1529 bytes
1529 bytes
In my original posting i wrote:
>The following looks to me perfectly legal ANSI-C code.
># include <stdio.h>
>FILE *yyin = {stdin}, *yyout = {stdout};
You netters, thanks for all the comment i got, here's a summary:
I got some comment on the braces, but they make no difference and are
not illegal (mind you, i have not checked, but a variable is an aray of
length 1?).
An other point is that the standard does not require stdin, stdout and
stderr to be constants.
In fact someone from Silicon Graphics told me they are not in the cc
version i am using.
Therefor the solution should be to use:
FILE *yyin;
yyin = stdin;
However, there is on problem. I dit not think the initialization
construct up mayself, but it was generated by LEX/YACC a long time ago.
Maybe i should try what the current version of LEX/YACC generates and
regenerate from the original LEX/YACC code.
--
Pieter van Emmerik | Phone: +31-74-464231
HDS info management | FAX: +31-74-464110
P.O.box 23 | E-mail: emmerik@utwente.nl
7550 AA Hengelo, The Netherlands | hp4nl!utrcu1!emmerik
Technical Details
Message-ID:
<1992Oct10.215902.29138@utwente.nl>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!utrcu1!emmerikShow Full Headers
Complete Article Headers
Newsgroups: comp.std.c Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!utrcu1!emmerik From: emmerik@utrcu1.civ.utwente.nl (Emmerik P.J.L. van) Subject: Summary: FILE *yyin=stdin; not ANSI-C?? Message-ID: <1992Oct10.215902.29138@utwente.nl> Sender: emmerik@utwente.nl (Emmerik P.J.L. van) Organization: University of Twente Date: Sat, 10 Oct 1992 21:59:02 GMT Lines: 25