Sign in Join

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

Mailing lists / fpc-devel / 2014-11

Clarify expression grammar

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Vsevolod Alekseyev

Hi all,

in the FPC reference at
http://www.freepascal.org/docs-html/ref/refse68.html#x127-13700012.1 , the formal grammar spec only goes down as far as factor. Can I please see the grammar for variable reference? A variable reference can be an arbitrarily complex thing; for example,
MyStructArray[MyFunction(I)*10+1].StructMember[Ord(J)] is a perfectly valid variable reference.

The reason I'm asking, I noticed a funny thing is the way fcl-passrc parses expressions; without knowledge about the underlying grammar I can't tell if it's a bug or not.

Reply by email

Hans-Peter Diettrich
to Vsevolod Alekseyev
Show quoted text 9 lines
Hi all, in the FPC reference at http://www.freepascal.org/docs-html/ref/refse68.html#x127-13700012.1 , the formal grammar spec only goes down as far as factor. Can I please see the grammar for variable reference? A variable reference can be an arbitrarily complex thing; for example, MyStructArray[MyFunction(I)*10+1].StructMember[Ord(J)] is a perfectly valid variable reference.

ACK
I'm also missing the "^", "." and "[...]" operators/selectors from the list of operators.

DoDi

Reply by email

Hans-Peter Diettrich
to Vsevolod Alekseyev: in the FPC reference at http://www.freepascal.org/docs-html/ref/refse68.html#x127-13700012…
Show quoted text 9 lines
Hi all, in the FPC reference at http://www.freepascal.org/docs-html/ref/refse68.html#x127-13700012.1 , the formal grammar spec only goes down as far as factor. Can I please see the grammar for variable reference? A variable reference can be an arbitrarily complex thing; for example, MyStructArray[MyFunction(I)*10+1].StructMember[Ord(J)] is a perfectly valid variable reference.

ACK
I'm also missing the "^", "." and "[...]" operators/selectors from the list of operators.

[This is a second post, the first one didn't show up yet]

DoDi

Reply by email