Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Vincent Snijders
Graeme Geldenhuys schreef: On 29 April 2010 21:57, Vincent Snijders wrote: I don't see the issue, it gets a bit more complicated, but not impossible. I am just bad in ascii graphics, but I can imagine how it looks like. I'm sure Michael will welcome your patch, and I'll be eager to see it to

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
On 29 April 2010 21:57, Vincent Snijders wrote: > > I don't see the issue, it gets a bit more complicated, but not impossible. I > am just bad in ascii graphics, but I can imagine how it looks like. I'm sure Michael will welcome your patch, and I'll be eager to see it too. ;-) -- Regards,

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Vincent Snijders
Graeme Geldenhuys schreef: On 29 April 2010 17:23, Marco van de Voort wrote: Its got nothing to do with the latex package. Trying to describe the inconsistent syntax of Hint Directives in a syntax diagram (like used in the FPC Language Reference doc) just seems impossible. From what I can conclu

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
On 29 April 2010 17:23, Marco van de Voort wrote: > > If you think there is a problem in the latex package, feel free to > fix/enhance it. Its got nothing to do with the latex package. Trying to describe the inconsistent syntax of Hint Directives in a syntax diagram (like used in the FPC Language

"strict", another oddity ? [Re: [fpc-pascal] deprecated syntax is inconsistent.]

2010-04-29 Thread Martin
While I am not particularly leaning to either side on the "deprecated" discussion, I found another "oddity" due to the single lookahead scenario "strict" is allowed as identifier. the following does compile var strict: Integer; BUT, because now e can have "strict private"; the following does

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > > And get better quality errormessages in return. Way more important IMHO. > > And we just ignore the docs that can't describe the syntax? :-) If you think there is a problem in the latex package, feel free to fix/enhance it. __

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
Marco van de Voort het geskryf: > > And get better quality errormessages in return. Way more important IMHO. And we just ignore the docs that can't describe the syntax? :-) Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpg

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Matt Emson
Graeme Geldenhuys wrote: On 29 April 2010 14:51, Florian Klaempfl wrote: Having a bigger lookahead makes a lot more things far more complex epecially in combination with include files, macros, generics. Why? You only apply the extra lookaheads where needed (code that could be ambiguo

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > > Language: that parsing is possible using a single lookahead token. > > (it makes for faster parsing) > > And because of that age old statement, we now have to live with > inconsistent syntax. And get better quality errormessages in return. Way

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Flávio Etrusco
On Thu, Apr 29, 2010 at 6:44 AM, Michael Van Canneyt wrote: > On Thu, 29 Apr 2010, Graeme Geldenhuys wrote: >> Jonas Maebe het geskryf: (...) > > Jonas tried to explain that this is not possible. > > Consider the following - what  you propose - statements: > > Var >  A : Integer; >  deprecated : B

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Aleksa Todorovic
During my experiments with FPC, I had to to exactly that - support two lookahead symbols - to implement (in)famous semicolon before 'else'. One of problems I had was combination of macros and include files with two lookahead symbols - I "fixed" it in a dirty way, but I'm not completely sure that so

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Florian Klaempfl
Graeme Geldenhuys schrieb: > On 29 April 2010 14:51, Florian Klaempfl wrote: >> Having a bigger lookahead makes a lot more things far more complex >> epecially in combination with include files, macros, generics. > > Why? Because you've always to take care of the possible extra lookahead. The

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
On 29 April 2010 14:48, Michael Van Canneyt wrote: > > As far as I remember, this was one of the key strengths of the Pascal > Language: that parsing is possible using a single lookahead token. > (it makes for faster parsing) And because of that age old statement, we now have to live with inconsi

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
On 29 April 2010 14:51, Florian Klaempfl wrote: > > Having a bigger lookahead makes a lot more things far more complex > epecially in combination with include files, macros, generics. Why? You only apply the extra lookaheads where needed (code that could be ambiguous). All other parts of the cod

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Florian Klaempfl
Michael Van Canneyt schrieb: > > > On Thu, 29 Apr 2010, Graeme Geldenhuys wrote: > >> On 29 April 2010 12:39, Jonas Maebe wrote: >>> >>> The compiler uses only a single lookahead token, while disambiguating >>> your >>> example would require two. >> >> I did look at the links you posted and sti

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Michael Van Canneyt
On Thu, 29 Apr 2010, Graeme Geldenhuys wrote: On 29 April 2010 12:39, Jonas Maebe wrote: The compiler uses only a single lookahead token, while disambiguating your example would require two. I did look at the links you posted and still couldn't see the problem. The paragraph above gives t

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
On 29 April 2010 12:39, Jonas Maebe wrote: > > The compiler uses only a single lookahead token, while disambiguating your > example would require two. I did look at the links you posted and still couldn't see the problem. The paragraph above gives the key information - the FPC parses only uses a

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Marco van de Voort
In our previous episode, ik said: > > The compiler uses only a single lookahead token, while disambiguating your > > example would require two. > > > > I probably missing something here but how does the compiler knows about > override, cdecl etc... directives in one pass ? A procedure declaratio

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread ik
On Thu, Apr 29, 2010 at 13:39, Jonas Maebe wrote: > > On 29 Apr 2010, at 12:00, Graeme Geldenhuys wrote: > > Michael Van Canneyt het geskryf: >> >>> Consider the following - what you propose - statements: >>> >>> >>> Var >>> A : Integer; >>> deprecated : Boolean; >>> >>> The compiler cannot de

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Jonas Maebe
On 29 Apr 2010, at 12:00, Graeme Geldenhuys wrote: Michael Van Canneyt het geskryf: Consider the following - what you propose - statements: Var A : Integer; deprecated : Boolean; The compiler cannot decide whether the 'deprecated' is a modifier or the Yes it can, because in your exa

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
Michael Van Canneyt het geskryf: > > Jonas tried to explain that this is not possible. Yes, but it is still very easy to detect the difference... I'll use your example: > Consider the following - what you propose - statements: > > Var >A : Integer; >deprecated : Boolean; > > The comp

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Michael Van Canneyt
On Thu, 29 Apr 2010, Graeme Geldenhuys wrote: Jonas Maebe het geskryf: Conversely, adding it before the semicolon in case of procedure/ function declarations would be inconsistent with how other modifiers have always been used there. I don't have problems with it's usage in procedures, fun

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
Jonas Maebe het geskryf: > > Conversely, adding it before the semicolon in case of procedure/ > function declarations would be inconsistent with how other modifiers > have always been used there. I don't have problems with it's usage in procedures, functions or methods. The modifier appearing

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > > As always, because Delphi does. See the recently submitted fcl-passrc > > bugreports for more examples. > > Shouldn't that inconsistent syntax be limited to the Delphi compiler mode > only? Like many other things are. IMHO no. _

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Jonas Maebe
On 29 Apr 2010, at 10:52, Graeme Geldenhuys wrote: Marco van de Voort het geskryf: In our previous episode, Graeme Geldenhuys said: Why is the usage of 'deprecated' inconsistent, depending where you use it. As always, because Delphi does. See the recently submitted fcl-passrc bugreports fo

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
Marco van de Voort het geskryf: > In our previous episode, Graeme Geldenhuys said: >> Why is the usage of 'deprecated' inconsistent, depending where you use it. > > As always, because Delphi does. See the recently submitted fcl-passrc > bugreports for more examples. Shouldn't that inconsistent s

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > > Why is the usage of 'deprecated' inconsistent, depending where you use it. As always, because Delphi does. See the recently submitted fcl-passrc bugreports for more examples. ___ fpc-pascal maillist

[fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
Hi, Why is the usage of 'deprecated' inconsistent, depending where you use it. I'm using the ObjFPC compiler mode. TRGBTriple = record Red: word; Green: word; Blue: word; Alpha: word; end deprecated;// <<- Note: no semi-colon after 'end'. vs TRGBTriple = record