Page 1 of 1

[Solved] Syntax check should be configurable

Posted: Fri Feb 08, 2013 11:10 am
by IceSoft
@Fred,
It will be great if the syntax check is configurable (at least off/on).

Reason:
So each advanced user can add new PureBasic keywords like the "structure pointer syntax" on this thread:
http://www.purebasic.fr/english/viewtop ... =3&t=53354

Re: Syntax check should be configurable

Posted: Fri Feb 08, 2013 11:45 am
by Fred
Are you serious ?

Re: Syntax check should be configurable

Posted: Fri Feb 08, 2013 11:51 am
by Danilo
Fred wrote:Are you serious ?
Disabling syntax check would be useful: We could just write what we want, and the compiler
compiles it to what he wants. ;)
Compilation time would be much faster too, without the syntax checks!

Re: Syntax check should be configurable

Posted: Fri Feb 08, 2013 11:53 am
by Fred
:lol:

Re: Syntax check should be configurable

Posted: Fri Feb 08, 2013 12:40 pm
by IceSoft
Maybe it is more an IDE error as a new feature:

What I mean:
I have written advanced syntax on a PB source (like the pointer structure as return value)
With the command tool settings I try to replace this (of course) unknown syntax for PureBasic before the compiler ist starting.
But I got always an syntax check error (I thought the syntax check is on the 'temp' file (PB_EditorOutput.pb
) which is send to the compiler (not the one which is on the PB IDE)
Checking the temp file too: Nothing is changed on the PB_EditorOutput.pb

Using as decribed on the online help:

Code: Select all

Before Compile/Run 
The tool will be executed right before the compiler is called to compile a source code. Using the %COMPILEFILE token, you can get the code to be compiled and modify it. This makes it possible to write a small pre-processor for the source code. Note that you should enable the "Wait until tool quits" option if you want your modifications to be given to the compiler. 

Re: Syntax check should be configurable

Posted: Fri Feb 08, 2013 4:39 pm
by Little John
IceSoft wrote:What I mean:
I have written advanced syntax on a PB source (like the pointer structure as return value)
With the command tool settings I try to replace this (of course) unknown syntax for PureBasic before the compiler ist starting.
But I got always an syntax check error
Now we are getting to the core of the matter. :-)
In order to see how this can be done, you might want to look at my preprocessor LPP (there you'll find the source code and the appropriate settings for usage as IDE tool). The preprocessor changes your code before it is passed to the compiler, so that the compiler won't raise a syntax error, of course.
(LPP works fine also with the current PB version 5.10 Beta 7 -- tested on Windows XP x86.)

No need for a new feature, and no IDE error.

Re: Syntax check should be configurable

Posted: Fri Feb 08, 2013 8:12 pm
by IceSoft
Thnaks. I will try to configure the tool again.
It seems it is more my mistake. Sorry.

/Edit: At home it works correct. Sorry.