🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #42527

Q: layout based parsing

#42527
From: Frans F.J. Faase
Date: Fri, 01 Dec 1995 00:00
25 lines
1629 bytes
It is my feeling that the most commonly made syntax errors
could be resolved correctly if the layout of the program would
have been taken in account. Most compilers throw away the
layout of a program when the source is tokenized, and by
this ignore important information that has been provided
by the programmer.

Could it be possible to improve gcc by including layout
information. Possibly this should be activated by a switch
indicating the style that is being used.
(I think it can be done by some simple bookkeeping, remembering
at which position the last '{' and '(' appeared, and correcting
this with information about the position of the `if', `do', `while'
and `for' keywords. This information can be used to determine what
should be done in case of a syntax error.)

Frans

-- 
Frans J. Faase                     
Information Systems Group                          Tel   : +31-53-4894232
Department of Computer Science                     secr. : +31-53-4893690
University of Twente                               Fax   : +31-53-4892927
PO box 217, 7500 AE Enschede, The Netherlands      Email : faase@cs.utwente.nl
---------------  http://www.cs.utwente.nl/~faase/  ---------------------
Technical Details
Message-ID: <49mj79$8lr@utrhcs.cs.utwente.nl>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,fd99fb045feb74a2,start
X-Google-Attributes: gid11318c,public
From: faase@cs.utwente.nl (Frans F.J. Faase)
Subject: Q: layout based parsing
Date: 1995/12/01
Message-ID: <49mj79$8lr@utrhcs.cs.utwente.nl>
X-Deja-AN: 120615978
distribution: world
organization: University of Twente, Dept. of Computer Science
newsgroups: gnu.gcc.help