Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2005-06

fpdoc and macros (-Sm)

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Stefan Kisdaroczi

Hi,

I tried fpdoc (fpc 2.0.0,win2000) and it crashes because it seems not to expand macros.

Example unit:

UNIT fpdoctest1;
{$DEFINE HELLO:=//}
HELLO WORLD;
INTERFACE
IMPLEMENTATION
END.

It compiles ok :

fpc -Sm fpdoctest1.pas

Target OS: Win32 for i386
Compiling fpdoctest1.pas
11 Lines compiled, 0.0 sec

fpdoc failes:

fpdoc --package=test --input='-Sm fpdoctest1.pas'

FPDoc - Free Pascal Documentation Tool
(c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther,

fpdoctest1.pas(5,5): Expected "interface" at token "Identifier HELLO" An unhandled exception occurred at $0040E3DC :
EAccessViolation : Access violation
$0040E3DC
$0040E317
$00402417
$004027B6

I need this type of defines, even if it looks strange... It's not a urgent problem, but it would be nice if it works.

Should this work ?
It is known not to work ?
What needs to be done (and where) to make this work ?

Thank you
kisda

Reply by email

Michael Van Canneyt
to Stefan Kisdaroczi
Stefan Kisdaroczi wrote 36 lines
Hi, I tried fpdoc (fpc 2.0.0,win2000) and it crashes because it seems not to expand macros. Example unit: UNIT fpdoctest1; {$DEFINE HELLO:=//} HELLO WORLD; INTERFACE IMPLEMENTATION END. It compiles ok : > fpc -Sm fpdoctest1.pas Target OS: Win32 for i386 Compiling fpdoctest1.pas 11 Lines compiled, 0.0 sec fpdoc failes: > fpdoc --package=test --input='-Sm fpdoctest1.pas' FPDoc - Free Pascal Documentation Tool (c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, fpdoctest1.pas(5,5): Expected "interface" at token "Identifier HELLO" An unhandled exception occurred at $0040E3DC : EAccessViolation : Access violation $0040E3DC $0040E317 $00402417 $004027B6 I need this type of defines, even if it looks strange... It's not a urgent problem, but it would be nice if it works. Should this work ?

One day, yes.

It is known not to work ?

It is known that support for macros is missing...

What needs to be done (and where) to make this work ?

pscanner.pp in fcl/passrc needs to have macro support.

Michael.

Reply by email