Sign in Join

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

Mailing lists / fpc-devel / 2012-06

fpc dry run: syntax check mode?

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Gennadiy Poryev

Hello,

In my web project I need to validate input (uploaded) file against Pascal syntax. Since it should be done using server-side scripting with restricted environment and lowered privileges, I’d like fpc to not create any files whatsoever; preferably to not use file write operations at all, relying solely on process exit code. Quick scroll of fpc -h did not reveal any relevant modes. Can (and how) this be done?

// Gennadiy.

Reply by email

Thomas Schatzl
to Gennadiy Poryev

Hi,

Gennadiy Poryev wrote 10 lines
Hello, In my web project I need to validate input (uploaded) file against Pascal syntax. Since it should be done using server-side scripting with restricted environment and lowered privileges, I’d like fpc to not create any files whatsoever; preferably to not use file write operations at all, relying solely on process exit code. Quick scroll of fpc -h did not reveal any relevant modes. Can (and how) this be done?

I am not aware of anything that fits completely, but maybe using fpc -sr -FE<some-temp-dir> helps.

The -sr skips the linking and assembling stage (and even register allocation, for performance), and you can then just delete any output in some-temp-dir.

Thomas

Reply by email