[Solved] Syntax check should be configurable

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
IceSoft
Addict
Addict
Posts: 1690
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

[Solved] Syntax check should be configurable

Post 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
Last edited by IceSoft on Fri Feb 08, 2013 8:54 pm, edited 1 time in total.
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Syntax check should be configurable

Post by Fred »

Are you serious ?
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: Syntax check should be configurable

Post 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!
Last edited by Danilo on Fri Feb 08, 2013 11:53 am, edited 1 time in total.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Syntax check should be configurable

Post by Fred »

:lol:
User avatar
IceSoft
Addict
Addict
Posts: 1690
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: Syntax check should be configurable

Post 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. 
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Little John
Addict
Addict
Posts: 4779
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Syntax check should be configurable

Post 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.
User avatar
IceSoft
Addict
Addict
Posts: 1690
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: Syntax check should be configurable

Post 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.
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Post Reply