Re: [fpc-pascal] case statement

2023-12-16 Thread Adriaan van Os via fpc-pascal
I find the idea of a "closest containing value" rather weird. For me, programming is strict logic, not finding something "closest". What I wrote here, is nonsense. "Closest containing" is rather a grammatical concept, that I misunderstood. Regards, Adriaan van Os __

Re: [fpc-pascal] case statement

2023-12-16 Thread Adriaan van Os via fpc-pascal
Tony Whyman via fpc-pascal wrote: Prospero Pascal was close to ISO Pascal (although I have lost my original copy of ISO Pascal) and I would guess that the above is copied from ISO Pascal. You can find the ISO-7185 document on the internet, just search for "iso7185.pdf". A less known aspect

Re: [fpc-pascal] case statement

2023-12-16 Thread Tony Whyman via fpc-pascal
On 16/12/2023 19:07, Gerhard Scholz via fpc-pascal wrote: ELSE/OTHERWISE I assume that came historically; the first implementation of a PASCAL compiler I have seen had no else or otherwise in the case startement. Some ater dialects introduced ELSE, other dialect(s) used OTHERWISE, FPC then a

Re: [fpc-pascal] case statement

2023-12-16 Thread Gerhard Scholz via fpc-pascal
statement list = statement { ";" statement } statementlist itself is not explained; I assume "statementlist" to be the same as "statement list" It is included in the definition of the try...except statement. ELSE/OTHERWISE I assume that came historically; the first implementation of a PASC

Re: [fpc-pascal] More syntax questions (part 4)

2023-12-16 Thread Michael Van Canneyt via fpc-pascal
On Sat, 16 Dec 2023, Adriaan van Os via fpc-pascal wrote: More questions about the FreePascal Language Reference (version 3.2.0), part 4 34. Are macpas LEAVE and CYCLE statements undocumented ? Yes. 35. Are macpas ellipsis (...) parameters undocumented ? Yes. 36. Is the macpas R

Re: [fpc-pascal] More syntax questions (part 3)

2023-12-16 Thread Michael Van Canneyt via fpc-pascal
On Sat, 16 Dec 2023, Wayne Sherman wrote: On Sat, Dec 16, 2023 at 7:35 AM Michael Van Canneyt wrote: Hm. Lot of corrections to do.. I'll be busy tonight :-) Are these grammars in GIT so others can help by submitting merge requests? That way you can spread the love :-) Everything concern

Re: [fpc-pascal] More syntax questions (part 3)

2023-12-16 Thread Wayne Sherman via fpc-pascal
On Sat, Dec 16, 2023 at 7:35 AM Michael Van Canneyt wrote: > Hm. Lot of corrections to do.. I'll be busy tonight :-) Are these grammars in GIT so others can help by submitting merge requests? That way you can spread the love :-) ___ fpc-pascal maillist

Re: [fpc-pascal] More syntax questions (part 3)

2023-12-16 Thread Michael Van Canneyt via fpc-pascal
On Sat, 16 Dec 2023, Adriaan van Os via fpc-pascal wrote: More questions about the FreePascal Language Reference (version 3.2.0) part 3 26. Am I correct to assume the following equivalents for rules that I couldn't find a definiton for: formal-parameter-list =

Re: [fpc-pascal] More syntax questions (part 2)

2023-12-16 Thread Michael Van Canneyt via fpc-pascal
On Sat, 16 Dec 2023, Adriaan van Os via fpc-pascal wrote: More questions about the FreePascal Language Reference (version 3.2.0) part 2 17. For the following rules, I couldn't find a definition in the Language Reference. Can I assume they can all be defined as ? object-type-i

[fpc-pascal] More syntax questions (part 4)

2023-12-16 Thread Adriaan van Os via fpc-pascal
More questions about the FreePascal Language Reference (version 3.2.0), part 4 34. Are macpas LEAVE and CYCLE statements undocumented ? 35. Are macpas ellipsis (...) parameters undocumented ? 36. Is the macpas RETURN statement undocumented ? 37. Shouldn't the macpas "mwpascal" modifier be ad

Re: [fpc-pascal] More syntax questions (and more to follow)

2023-12-16 Thread Michael Van Canneyt via fpc-pascal
On Sat, 16 Dec 2023, Adriaan van Os via fpc-pascal wrote: Michael Van Canneyt via fpc-pascal wrote: Thanks for the replies. Please note that the syntax diagrams are NOT meant to be exhaustive. They are an aid to explain the syntax. I strive to make them as correct as possible, but they mak

[fpc-pascal] More syntax questions (part 3)

2023-12-16 Thread Adriaan van Os via fpc-pascal
More questions about the FreePascal Language Reference (version 3.2.0) part 3 26. Am I correct to assume the following equivalents for rules that I couldn't find a definiton for: formal-parameter-list = parameter-declaration . parameter-list

[fpc-pascal] More syntax questions (part 2)

2023-12-16 Thread Adriaan van Os via fpc-pascal
More questions about the FreePascal Language Reference (version 3.2.0) part 2 17. For the following rules, I couldn't find a definition in the Language Reference. Can I assume they can all be defined as ? object-type-identifier = identifier . field-identifie

Re: [fpc-pascal] More syntax questions (and more to follow)

2023-12-16 Thread Adriaan van Os via fpc-pascal
Michael Van Canneyt via fpc-pascal wrote: Thanks for the replies. Please note that the syntax diagrams are NOT meant to be exhaustive. They are an aid to explain the syntax. I strive to make them as correct as possible, but they make no pretense to being complete. Anyway, I strive to make the

Re: [fpc-pascal] More syntax questions (and more to follow)

2023-12-16 Thread Michael Van Canneyt via fpc-pascal
On Sat, 16 Dec 2023, Adriaan van Os via fpc-pascal wrote: More questions about the FreePascal Language Reference (version 3.2.0) 1. Section 17.1 defines a rule and raise-statement = "raise" [ exception-instance [ exception-address ] ] . exception-address = "at" exception-address [ ","

[fpc-pascal] More syntax questions (and more to follow)

2023-12-16 Thread Adriaan van Os via fpc-pascal
More questions about the FreePascal Language Reference (version 3.2.0) 1. Section 17.1 defines a rule and raise-statement = "raise" [ exception-instance [ exception-address ] ] . exception-address = "at" exception-address [ "," address-expression ] . a) Is it correct that d

Re: [fpc-pascal] case statement

2023-12-16 Thread Michael Van Canneyt via fpc-pascal
On Fri, 15 Dec 2023, Adriaan van Os wrote: Michael Van Canneyt via fpc-pascal wrote: The fact that the semicolon before the else is optional ? I don't see a semicolon in the formal syntax. This works: OK, than an optional semicolon must be added to the rule exceptionhandlers = [ ex

Re: [fpc-pascal] method-definition

2023-12-16 Thread Michael Van Canneyt via fpc-pascal
On Sat, 16 Dec 2023, Hairy Pixels via fpc-pascal wrote: On Dec 15, 2023, at 8:56 PM, Adriaan van Os via fpc-pascal wrote: What complicates things, is that many conflicting rules have the same name in the Language Reference. For example, conceptually we have object-methods, record-metho