Menu

#4 Parsing Error from gnugettext unit

v1.0_(example)
closed-invalid
nobody
Parser (5)
5
2005-01-19
2004-12-30
TridenT
No

Hi,

i tried to parse a project with gnugettext unit inside.
I have a parsing error message. here is the etract of the
source code :

------------- CODE_START -------------------
{$ifndef DELPHI5OROLDER}
function TGnuGettextInstance.dngettext(const
szDomain: string; singular,
plural: ansistring; Number: Integer): widestring;
begin
Result:=dngettext (szDomain, ansi2wide(singular),
ansi2wide(plural), Number);
end;
{$endif}
------------- CODE_END -------------------

So, I haven't found any options to say that
this 'DELPHI5OROLDER' is undefined. I'm surprise, since it
works with other parsers.

Find attached the error screenshot (gnugettext.png)
Hope it will help you.

TridenT

Discussion

  • G. Veith

    G. Veith - 2005-01-04
    • status: open --> pending
     
  • G. Veith

    G. Veith - 2005-01-04

    Logged In: YES
    user_id=1075015

    DELPHI5OROLDER is defined at the beginning of the file
    depending on the Delphi-Version you are using, or in this
    case, depending on the version of Delphi you set DelphiDoc
    to "emulate". If you want to undefine it, i.e. let it not be
    defined, set it to Delphi 6+ (on the first tab, either
    directly in the RadioGroup "Delphi Version" or use the
    button "Compiler Options").

    But the error you see happens on another account. The
    forward-declaration of the method is declared with
    "Number:longint", but the actual implementation is declared
    with "Number: Integer" and these two types needn't necessary
    to be the same one. So DelphiDoc is complaining about not
    finding a forward-declaration with the exact same
    parameters. You'll have either to parse it with the version
    of Delphi 5 or edit one of the types to match the other one.
    A total of four "Integer"s have to be changed to "LongInt"s.
    This one is the real error.

    Btw., also DelphiDoc isn't .NET-compliant (I don't really
    know, what changes on behalf of the Delphi language), so if
    you got a version of gnugettext.pas where in the uses-clause
    "System.Globalization" is used, you will get an error at the
    separating dot "." (and I think, the file may be wrong there
    anyway, original Delphi 5 (and 6?) should also generate an
    error message there).

     
  • G. Veith

    G. Veith - 2005-01-19
    • status: pending --> closed
     
  • G. Veith

    G. Veith - 2005-01-19
    • status: closed --> closed-invalid
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.