[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: gpic bug report
From: |
Ted Harding |
Subject: |
RE: gpic bug report |
Date: |
Sat, 30 Sep 2000 09:23:49 +0100 (BST) |
On 30-Sep-00 Dwight Aplevich wrote:
> INPUT FILES:
> gpic input file bug.pic:
> .PS
> A: [xy = 5]; print A.xy
> .PE
>
> DESCRIPTION OF INCORRECT BEHAVIOUR:
> The term A.xy is parsed incorrectly as A .x y and gives the error
> message:
> gpic:bug.pic:2: there is no variable `y'
>
> SUGGESTED FIX [optional]:
> The correct parse is A . xy
> Requires revised lexical analysis.
I'm not at all sure this is a bug, according to my understanding of
'pic' block syntax.
The construct A.Something accesses the _placename_ of a _named_ object
consructed within the block, e.g. by
A: [ ... ; Something: ... ; ... ]
and of course user-defined names have to start with an uppercase letter.
In the example A: [xy = 5]; print A.xy the item xy is a _variable_,
not a name, and so cannot be referred to using that construct.
In addition there are the "builtin" expression components ".x", ".y" etc.,
which are accessed by _place_.x, _place_.y etc., and do not start with
uppercase.
So it seems to me that 'pic' was doing its best with a construct
which did not comply with the semantics of the block mechanism.
At best I might agree that the attempt to parse A.xy as A.x y
is inappropriate and the error message might better be simply
"syntax error" on the grounds that ".xy" is not a valid component
of the A.* construct.
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 284 7749
Date: 30-Sep-00 Time: 09:23:49
------------------------------ XFMail ------------------------------
- gpic bug report, Dwight Aplevich, 2000/09/29
- RE: gpic bug report,
Ted Harding <=