segmentation fault

Frank Heckenbach ih8mj at fjf.gnu.de
Wed Dec 22 00:15:18 CET 2004


Adriaan van Os wrote:

> > Frank Heckenbach wrote:
> >
> >> In the ISO Pascal Standard Report (Jensen, Wirth, third edition) I 
> >> read
> >> at the end of Section 5:
> >>
> >> 	Comment = { "{" | "(*" ) { CommentElement } ( "}" | "*)"  ) .
> >>
> >> 	A CommentElement is either an end of line or any sequence of
> >> characters not containing "}" or "*)".
> >> 	
> >> 	Notes: { ...*) and (* ...} are valid comments. The comment {(*) is
> >> equivalent to the comment {(}.
> >>
> >> This means that {{} is a valid comment, but {}} isn't, according to 
> >> the
> >> standard. Several other Pascal compilers, however, only allow (*.. { 
> >> ..
> >> } .. *) or { .. (* .. *) .. }. But, as Frank noted, you can use the
> >> --nested-comments option in GPC to get similar behaviour.
> >
> > This would be `--no-mixed-comments' which is set (i.e. "no") by
> > default, except in standard Pascal modes.
> 
> I see. Then --nested-comments --no-mixed-comments would be the ideal 
> default for --mac-pascal.

Does Mac Pascal allow real nested comments, i.e.
`{ ... { ... } ... }'? (Then it might be the first compiler I hear
of that does so, apart from GPC. I had even considered dropping that
option, OTOH, it's quite useful for embedding TeX etc. in comments.)

And `--nested-comments --no-mixed-comments' would also mean comments
such as `{ ... { ... (* ... } ... }'. Is it so?

Frank

-- 
Frank Heckenbach, frank at g-n-u.de, http://fjf.gnu.de/, 7977168E
GPC To-Do list, latest features, fixed bugs:
http://www.gnu-pascal.de/todo.html
GPC download signing key: ACB3 79B2 7EB2 B7A7 EFDE  D101 CD02 4C9D 0FE0 E5E8




More information about the Gpc mailing list