Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | glen herrmannsfeldt <gah@ugcs.caltech.edu> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: More physical source files |
| Date | 2015-07-01 18:36 +0000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <mn1bui$go9$1@speranza.aioe.org> (permalink) |
| References | (4 earlier) <bad1394d-623e-4ef3-8936-876af70857bb@googlegroups.com> <lnbnfw3kum.fsf@kst-u.example.com> <56d054c6-5316-46eb-b7b4-686bd405149d@googlegroups.com> <mn15ao$v6o$1@speranza.aioe.org> <lnioa320yd.fsf@kst-u.example.com> |
Keith Thompson <kst-u@mib.org> wrote: > glen herrmannsfeldt <gah@ugcs.caltech.edu> writes: (snip) >> Error correcting compilers used to be much better. I remember PL/I (F) >> with messages like: "MISSING SEMICOLON, ONE INSERTED." (snip) >> Such seems to be a lost art in compiler technology. > Compilers commonly attempt to correct syntax errors to improve > diagnostics for later errors. A naive compiler might print an error > message and abort if it sees an identifier where it expects a semicolon; > a smarter compiler might internally insert a semicolon and continue > parsing. Some I know will continue parsing, but ignore the statements in between. A missing semicolon would remove those two statements from the parse tree, resulting in unneeded error messages later. > The Ada compiler I worked on did this. You could feed it a chunk of > English text and it would insert, delete, and/or replace tokens until it > was syntactically valid Ada (often the result would be empty). But it > did this *only* for the purpose of reporting errors; a single syntax > error would set an internal flag that would prevent it from generating > any code. There were stories about how well PL/C did this, but even PL/I (F) wasn't all that bad. > If you have a very fast compile-and-edit cycle, this kind of thing isn't > as important; you can compile, fix the first error reported, and compile > again. My first years of programming were often on a one day cycle. Lots of incentive to get it right the first time. (snip) >>> The error I had in maind is using "a.b" instead of "a->b" when a is a >>> pointer to a struct/union. Easy to detect and correct. The error IMO >>> makes for a prettier source code. (snip, I wrote) >> Are there any ambiguous cases between . and ->? > No. The prefix of `.` must be a struct or union; the prefix of `->` > must be a pointer to a struct or union. There's no overlap. That is what I thought, but just in case I missed some case. (snip) >> As long as you only allow things which are otherwise not defined >> by the standard, all is fine. You can't change the meaning of >> things that the standard allows. The colon idea could do that. > But diagnostics are still required. The tradition of IBM compilers was to return a code, similar to the exit code of many systems now. 0 for no problems, 4 for warnings, 8 for errors, and 12 for severe error. There is then a JCL option to indicate that the following steps should, or should not, execute based on that code. Usual would be to not execute for 8 or more, but it is up to the user. I might have a few times increased it. Compilers usually still try to generate an object program at 8, sometimes not at 12. (12 might be failing to open important data sets.) -- glen
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar
More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-06-27 11:19 -0700
Re: More physical source files Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-06-27 11:54 -0700
Re: More physical source files Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-27 21:20 +0100
Re: More physical source files Bartc <bc@freeuk.com> - 2015-06-27 20:24 +0100
Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-06-29 07:14 -0700
Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-06-29 08:16 -0700
Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-06-30 08:24 -0700
Re: More physical source files Robert Wessel <robertwessel2@yahoo.com> - 2015-06-30 12:15 -0500
Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-06-30 15:14 -0700
Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-01 08:38 -0700
Re: More physical source files glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-07-01 16:43 +0000
Re: More physical source files Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-07-01 18:52 +0100
Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-01 11:21 -0700
Re: More physical source files glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-07-01 18:36 +0000
Re: More physical source files Richard Damon <Richard@Damon-Family.org> - 2015-07-01 22:33 -0400
Re: More physical source files glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-07-02 19:11 +0000
Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-01 11:08 -0700
Re: More physical source files Richard Damon <Richard@Damon-Family.org> - 2015-07-01 22:30 -0400
Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-02 08:29 -0700
Re: More physical source files Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-07-02 17:56 +0100
Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-02 13:21 -0400
Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-03 08:54 -0700
Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-04 12:23 -0400
Re: More physical source files Martin Shobe <martin.shobe@yahoo.com> - 2015-07-04 11:36 -0500
Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-02 16:42 -0700
Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-03 08:54 -0700
Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-03 10:05 -0700
Re: More physical source files glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-07-03 21:57 +0000
Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-04 00:30 -0400
Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-04 08:08 -0700
Re: More physical source files Richard Damon <Richard@Damon-Family.org> - 2015-07-04 12:21 -0400
Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-05 09:22 -0700
Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-05 09:49 -0700
Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-05 18:16 -0700
Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-06 08:37 -0700
Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-06 12:56 -0400
Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-06 11:59 -0700
Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-06 15:45 -0400
Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-06 13:14 -0700
Re: More physical source files Philip Lantz <prl@canterey.us> - 2015-07-07 01:10 -0700
Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-07 08:00 -0700
Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-07 07:55 -0700
Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-07 13:13 -0400
Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-08 08:35 -0700
Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-08 12:31 -0400
Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-09 08:50 -0700
Re: More physical source files Richard Heathfield <rjh@cpax.org.uk> - 2015-07-09 16:56 +0100
Re: More physical source files Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-07-09 13:31 -0700
Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-09 15:03 -0700
Re: More physical source files Ian Collins <ian-news@hotmail.com> - 2015-07-10 10:54 +1200
Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-09 14:32 -0400
Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-05 13:41 -0400
Re: More physical source files Richard Damon <Richard@Damon-Family.org> - 2015-07-05 14:17 -0400
Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-04 12:36 -0700
Re: More physical source files Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-07-04 15:19 -0700
Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-04 15:42 -0700
Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-04 19:04 -0400
Re: More physical source files Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-07-05 03:25 -0700
Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-05 09:18 -0700
Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-05 14:11 -0400
Re: More physical source files Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-07-05 13:41 -0700
Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-04 12:50 -0400
Re: More physical source files Bartc <bc@freeuk.com> - 2015-06-29 17:20 +0100
Re: More physical source files Rosario19 <Ros@invalid.invalid> - 2015-06-28 11:57 +0200
csiph-web