GNU Pascal Homepage - gpc - gpc-announce - gpc-de - gpc-doc
This page in English

Mail #4013

Zurück zur Archiv-Hauptseite

Vorige Mail   Nächste Mail   Unformatiert/Volle Header
Übersicht  10 Tage   Betreff   Datum   Thread   Autor  

Von: Frank Heckenbach
Betreff: nestbug: bugs in gpcc with the use of --nested-comments
Datum: 12.7.2000, 03:22:04

Tom Schneider wrote:

>    This code demonstrates a bug in gpc:
> 
> GNU Pascal version 20000707, based on gcc-2.95.2 19991024 (release).
> 
>    which when called on this program as:
> 
> gpc --standard-pascal --nested-comments --transparent-file-names $nestbug.p -o $nestbug
> 
>    will object as follows:
> 
> nestbug.p:54: parse error before `Documentation'
> 
>    because, although the --nested-comments is on, it still can't handle
>    this unbalanced right curlie bracket: }

What was called `--nested-comments' in previous GPC versions, is now
called (more precisely, IMHO) `--no-mixed-comments'. The option
`--nested-comments' now means really nested comments like `{ { } }'.

BTW, this *is* described prominently in the NEWS file or the News
chapter in the GPC manual.

>    2. ADDITIONAL BUG:  Note also that GPC capitalizes the word
>    "Documentation", which is confusing and it should not do.  Someone doing a
>    case sensitive search would not find the problem!

That's why a case-sensitive search through Pascal code is a bad
idea, I guess...

>    This occurs in other
>    places in the code.  GPC should NEVER change cases!!!!  (Oh, I see.  In
>    German one capitalizes nouns.  Perhaps this is why you thought to do it.
>    The rest of the world does not and it will cause confusion and trouble.
>    How about creating a --German command line option? :-)

It's not about German at all, as you should've noted from the
following facts:

- The original GPC was created in Finland.

- GPC also capitalizes verbs, adverbs, perpositions, non-words, etc.

Seriously, I think we've discussed this matter before, in connection
with `--transparent-file-names'. It's about avoiding conflicts with
(e.g.) libc identifiers. When GPC supports some other form of name
mangling, we can get away with this capitalization. If you like to
offer your help, be welcome, otherwise this will be done according
to our time schedules...

> {
>    I infer that when comments are parsed gpc does not remember the kind of
>    starting comment.

It does with `--no-mixed-comments'.

>    4. If the curlies around the above paragraph are deleted, the message is:
> 
> nestbug.p:92: unterminated string or character constant
> nestbug.p:83: possible real start of unterminated constant
> 
>    The program is sensitive to single quote marks!

Of course. Since the comment was closed (though unintentionally, see
above), GPC expects Pascal code, and a single quote in Pascal code
is quite significant.

>    The whole comment skipping code needs a careful overhaul!

Quite the opposite: It's just had a careful overhaul which implied a
redefinition of one option. Please change your command-line
accordingly.

>    The program does a successful goto to the end of the code from
>    the halt routine, so that bug is FIXED.  :-) :-)  Thank you!

Fine. (But you are aware that a Halt routine which does exactly this
is already built in?)

Frank

Vorige Mail   Nächste Mail   Unformatiert/Volle Header
Übersicht  10 Tage   Betreff   Datum   Thread   Autor  


Zurück zur Archiv-Hauptseite


Hinweis: Diese Seite enthält Informationen, die nicht vom Betreiber dieser Website, sondern von den Autoren der archivierten Mails stammen. Der Betreiber dieser Website ist nicht für den Inhalt dieser Informationen verantwortlich. Die weitere Verwendung dieser Informationen bedarf des Einverständnisses des jeweiligen Autors.

Sofern WWW-Adressen (URLs) in den archivierten Mails als Hyperlinks hervorgehoben werden, so geschieht dies ausschließlich zur Annehmlichkeit für den Leser. Der Inhalt der auf diese Weise angelinkten Webseiten spiegelt nicht notwendigerweise die Meinung des Betreibers dieser Webseite oder der Autoren der archivierten Mails wider. Der Betreiber dieser Webseite ist nicht für den Inhalt solcher Webseiten verantwortlich. Diese Seiten sind ausdrücklich nicht als Teil des Inhalts dieser Seite zu betrachten, sondern lediglich als Referenzen.


Diese Seite wurde erzeugt von Crystal 0.999 (Linux 2.4.27/i686).